/* =========================================
   EVENT GALLERY — Archive & Single
   ========================================= */

/* ---- Archive: Hero ---- */
.event-archive-hero {
    padding: 40px 0 20px;
}
.event-archive-hero__title {
    font-size: var(--font-h1);
    font-weight: 700;
    color: var(--fs-color-primary);
    margin: 0;
}

/* ---- Archive: List ---- */
.event-archive-list {
    padding: 20px 0 60px;
}

/* ---- Archive: Card ---- */
.event-card {
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: transform var(--transition), box-shadow var(--transition);
    height: 100%;
}
.event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.13);
}
.event-card a {
    display: block;
    color: inherit;
    text-decoration: none;
    height: 100%;
}
.event-card__thumb {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--bg-muted);
}
.event-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.event-card:hover .event-card__thumb img {
    transform: scale(1.05);
}
.event-card__count {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.event-card__body {
    padding: 14px 16px 16px;
}
.event-card__title {
    font-size: var(--font-h3);
    font-weight: 700;
    color: var(--fs-color-primary);
    margin: 0 0 8px;
    line-height: 1.35;
}
.event-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}
.event-card__date {
    font-size: 13px;
    color: var(--fs-color-primary);
    display: flex;
    align-items: center;
    gap: 5px;
}
.event-card__brands {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* ---- Shared: Brand tag ---- */
.event-brand-tag {
    display: inline-block;
    background: color-mix(in srgb, var(--fs-color-primary) 10%, transparent);
    color: var(--fs-color-primary);
    border: 1px solid color-mix(in srgb, var(--fs-color-primary) 25%, transparent);
    font-size: 12px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    line-height: 1.6;
}

/* ---- Single: Hero ---- */
.event-single-hero {
    position: relative;
    max-height: 520px;
    overflow: hidden;
    background: #111;
}
.event-single-hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0.55;
}
.event-single-hero__placeholder {
    height: 400px;
    background: linear-gradient(135deg, var(--fs-color-primary) 0%, color-mix(in srgb, var(--fs-color-primary) 60%, #000) 100%);
}
.event-single-hero__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 0;
    background: linear-gradient(to right, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
}
.event-single-hero__title {
    font-size: var(--font-h1);
    font-weight: 700;
    color: #fff !important;
    margin: 0 0 12px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.event-single-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 12px;
}
.event-meta-item {
    color: rgba(255,255,255,0.92);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}
.event-single-hero__brands {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.event-single-hero__brands .event-brand-tag {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border-color: rgba(255,255,255,0.4);
}

/* ---- Single: Description ---- */
.event-single-desc {
    padding: 32px 0 0;
}
.event-single-desc__content {
    max-width: 780px;
    font-size: var(--font-body-large);
    color: #444;
    line-height: 1.75;
}

/* ---- Single: Gallery ---- */
.event-gallery-section {
    padding: 32px 0 60px;
}

/* Masonry grid */
.event-gallery-grid {
    margin: 0 -6px;
}
.event-gallery-sizer,
.event-gallery-item {
    width: 25%;
    padding: 6px;
    box-sizing: border-box;
}
.event-gallery-item a {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-muted);
}
.event-gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.35s ease, opacity 0.35s ease;
}
.event-gallery-item a:hover img {
    transform: scale(1.04);
    opacity: 0.88;
}

/* ---- Responsive: Masonry ---- */
@media (max-width: 1024px) {
    .event-gallery-sizer,
    .event-gallery-item { width: 33.333%; }
}
@media (max-width: 640px) {
    .event-gallery-sizer,
    .event-gallery-item { width: 50%; }
    .event-single-hero { max-height: 380px; }
    .event-single-hero__overlay { padding-bottom: 24px; }
}
@media (max-width: 400px) {
    .event-gallery-sizer,
    .event-gallery-item { width: 100%; }
}

/* =========================================
   SLIDESHOW MODE
   ========================================= */
.event-slideshow-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Main slider */
.event-slideshow-main {
    width: 100%;
    border-radius: var(--radius);
    overflow: hidden;
}
.event-slideshow-main .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-muted);
    max-height: 580px;
}
.event-slideshow-main .swiper-slide button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-height: 580px;
    background: none;
    border: none;
    padding: 0;
    cursor: zoom-in;
}
.event-slideshow-main .swiper-slide img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 580px;
    object-fit: contain;
    display: block;
}
.event-slideshow-main .swiper-button-prev,
.event-slideshow-main .swiper-button-next {
    color: #fff;
    background: rgba(0,0,0,0.35);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background var(--transition);
}
.event-slideshow-main .swiper-button-prev:hover,
.event-slideshow-main .swiper-button-next:hover {
    background: rgba(0,0,0,0.65);
}
.event-slideshow-main .swiper-button-prev::after,
.event-slideshow-main .swiper-button-next::after {
    font-size: 16px;
}

/* Thumbnail strip */
.event-slideshow-thumbs {
    width: 100%;
}
.event-slideshow-thumbs .swiper-slide {
    cursor: pointer;
    opacity: 0.5;
    border-radius: 6px;
    overflow: hidden;
    aspect-ratio: 1;
    transition: opacity var(--transition);
}
.event-slideshow-thumbs .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.event-slideshow-thumbs .swiper-slide-thumb-active {
    opacity: 1;
    outline: 2px solid var(--fs-color-primary);
    outline-offset: 1px;
}

@media (max-width: 640px) {
    .event-single-hero__overlay { padding: 28px 0; }
}

/* =========================================
   LIGHTBOX OVERLAY (Swiper-based)
   ========================================= */
.event-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
}
.event-lightbox__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.92);
    cursor: pointer;
}
.event-lightbox__inner {
    position: relative;
    z-index: 1;
    width: 90vw;
    max-width: 1100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.event-lightbox__close {
    position: absolute;
    top: -44px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    padding: 0 6px;
    opacity: 0.8;
    transition: opacity var(--transition);
}
.event-lightbox__close:hover { opacity: 1; }

.event-lightbox__swiper {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}
.event-lightbox__swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 80vh;
    background: #000;
}
.event-lightbox__swiper .swiper-slide img {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}
.event-lightbox__swiper .swiper-button-prev,
.event-lightbox__swiper .swiper-button-next {
    color: #fff;
    background: rgba(0,0,0,0.4);
    width: 44px;
    height: 44px;
    border-radius: 50%;
}
.event-lightbox__swiper .swiper-button-prev::after,
.event-lightbox__swiper .swiper-button-next::after { font-size: 16px; }
.event-lightbox__swiper .swiper-pagination {
    color: rgba(255,255,255,0.75);
    font-size: 13px;
}
.event-lightbox__caption {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    text-align: center;
    min-height: 20px;
}

/* Prevent body scroll when lightbox open */
body.event-lb-open { overflow: hidden; }

/* Trigger buttons look like regular clickable images */
.event-gallery-item .event-lb-trigger,
.event-slideshow-main .event-lb-trigger {
    display: block;
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

@media (max-width: 640px) {
    .event-lightbox__inner { width: 96vw; }
    .event-lightbox__swiper .swiper-slide { max-height: 70vh; }
    .event-lightbox__swiper .swiper-slide img { max-height: 70vh; }
}
