/* ================================================================
   J&G EVENT GALLERY — Vibrant Filmstrip Concept
   Inspired by: bold background · horizontal photo strip · big type
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap');

/* ── Section shell ── */
#jg-event-gallery {
    --jg-accent: #C9A96E;
    --jg-accent-light: #E8D5A7;
    --jg-bg: #0B0B14;
    --jg-bg-subtle: #111122;
    background: var(--jg-bg);
    padding: 100px 0 0;
    position: relative;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
}

/* Decorative glow behind header */
#jg-event-gallery::before {
    content: '';
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(201,169,110,0.08) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* ── Header area (left-aligned, like the reference) ── */
.jg-gallery-wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 56px;
    position: relative;
    z-index: 1;
}

.jg-gallery-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 56px;
}

.jg-gallery-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3.5px;
    text-transform: uppercase;
    color: var(--jg-accent);
    margin-bottom: 20px;
    max-width: fit-content;
}

.jg-gallery-tag::before {
    content: '';
    width: 28px;
    height: 2px;
    background: var(--jg-accent);
    border-radius: 2px;
}

.jg-gallery-heading {
    font-size: clamp(52px, 7vw, 96px);
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -3px;
    line-height: 0.95;
    margin: 0 0 24px;
    text-transform: uppercase;
}

.jg-gallery-sub {
    font-size: 17px;
    color: rgba(255,255,255,0.40);
    margin: 0;
    max-width: 420px;
    line-height: 1.6;
    letter-spacing: 0.2px;
}

/* ── Filmstrip section ── */
.jg-filmstrip-section {
    position: relative;
    margin-top: 20px;
}

/* ── Photo filmstrip (auto-scrolling horizontal strip) ── */
.jg-filmstrip {
    display: flex;
    overflow: hidden;
    position: relative;
    padding: 20px 0;
}

.jg-filmstrip-track {
    display: flex;
    gap: 16px;
    animation: jg-filmstrip-scroll 35s linear infinite;
    will-change: transform;
}

.jg-filmstrip-track:hover {
    animation-play-state: paused;
}

@keyframes jg-filmstrip-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Individual photo in the strip */
.jg-film-photo {
    flex: 0 0 280px;
    height: 200px;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.35s ease, transform 0.4s cubic-bezier(0.25,1,0.5,1), box-shadow 0.4s ease;
}

.jg-film-photo:hover {
    border-color: var(--jg-accent);
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 20px 50px rgba(201,169,110,0.18), 0 8px 20px rgba(0,0,0,0.4);
    z-index: 5;
}

.jg-film-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.25,1,0.5,1);
}

.jg-film-photo:hover img {
    transform: scale(1.08);
}

/* Photo hover overlay with event title */
.jg-film-photo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11,11,20,0.92) 0%, rgba(11,11,20,0.2) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px 18px;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.jg-film-photo:hover .jg-film-photo-overlay {
    opacity: 1;
}

.jg-film-photo-title {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
    line-height: 1.3;
}

.jg-film-photo-count {
    font-size: 11px;
    color: var(--jg-accent);
    font-weight: 600;
}

/* ── Featured / Hero image (overlapping the strip) ── */
.jg-featured-card {
    position: relative;
    margin: -60px auto 0;
    max-width: 520px;
    z-index: 10;
}

.jg-featured-frame {
    background: #1a1a2e;
    border-radius: 24px;
    overflow: hidden;
    box-shadow:
        0 40px 80px rgba(0,0,0,0.5),
        0 0 0 1px rgba(201,169,110,0.15),
        0 0 120px rgba(201,169,110,0.06);
    cursor: pointer;
    transition: transform 0.5s cubic-bezier(0.25,1,0.5,1), box-shadow 0.5s ease;
    position: relative;
}

.jg-featured-frame:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 52px 100px rgba(0,0,0,0.6),
        0 0 0 2px rgba(201,169,110,0.35),
        0 0 160px rgba(201,169,110,0.10);
}

.jg-featured-frame img {
    width: 100%;
    height: 340px;
    object-fit: cover;
    display: block;
}

.jg-featured-info {
    padding: 28px 30px 30px;
    background: linear-gradient(145deg, #14142a 0%, #0d0d1a 100%);
}

.jg-featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--jg-accent);
    margin-bottom: 14px;
}

.jg-featured-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--jg-accent);
    animation: jg-pulse 2s ease-in-out infinite;
}

@keyframes jg-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.3; transform: scale(0.6); }
}

.jg-featured-title {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 10px;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.jg-featured-desc {
    font-size: 14px;
    color: rgba(255,255,255,0.45);
    margin: 0 0 20px;
    line-height: 1.65;
}

.jg-featured-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--jg-accent) 0%, #b8924f 100%);
    color: #0B0B14;
    font-size: 13px;
    font-weight: 700;
    padding: 12px 26px;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: all 0.35s ease;
    text-transform: uppercase;
}

.jg-featured-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(201,169,110,0.35);
    background: linear-gradient(135deg, var(--jg-accent-light) 0%, var(--jg-accent) 100%);
}

.jg-featured-btn svg {
    transition: transform 0.3s ease;
}

.jg-featured-btn:hover svg {
    transform: translateX(4px);
}

/* ── Bottom event cards row ── */
.jg-events-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 56px 56px 88px;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.jg-event-tile {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
    height: 260px;
    border: 1px solid rgba(255,255,255,0.06);
    transition: border-color 0.4s ease, transform 0.45s cubic-bezier(0.25,1,0.5,1);
}

.jg-event-tile:hover {
    border-color: rgba(201,169,110,0.40);
    transform: translateY(-6px);
}

.jg-event-tile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25,1,0.5,1);
}

.jg-event-tile:hover .jg-event-tile-img {
    transform: scale(1.08);
}

.jg-event-tile-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(11,11,20,0.95) 0%, rgba(11,11,20,0.3) 45%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
}

.jg-event-tile-num {
    position: absolute;
    top: 18px;
    left: 18px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--jg-accent);
    background: rgba(10,10,20,0.6);
    border: 1px solid rgba(201,169,110,0.25);
    padding: 5px 14px;
    border-radius: 100px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

[dir="rtl"] .jg-event-tile-num {
    left: auto;
    right: 18px;
}

.jg-event-tile-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 6px;
    line-height: 1.25;
    transition: color 0.3s ease;
}

.jg-event-tile:hover .jg-event-tile-title {
    color: var(--jg-accent-light);
}

.jg-event-tile-gallery {
    font-size: 11px;
    color: rgba(255,255,255,0.40);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.jg-event-tile-gallery svg {
    opacity: 0.5;
}

/* ── Scroll reveal ── */
.jg-reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.25, 1, 0.5, 1);
}

.jg-reveal.jg-visible {
    opacity: 1;
    transform: translateY(0);
}

.jg-reveal:nth-child(2) { transition-delay: 0.08s; }
.jg-reveal:nth-child(3) { transition-delay: 0.14s; }
.jg-reveal:nth-child(4) { transition-delay: 0.20s; }

/* ── Lightbox ── */
.jg-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.jg-lightbox.jg-lb-open {
    opacity: 1;
    pointer-events: all;
}

.jg-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 4, 12, 0.97);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.jg-lightbox-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    max-width: 92vw;
}

.jg-lb-img {
    max-width: 78vw;
    max-height: 74vh;
    object-fit: contain;
    border-radius: 14px;
    box-shadow: 0 40px 100px rgba(0,0,0,0.9);
    transition: opacity 0.25s ease;
    display: block;
}

.jg-lb-caption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 2px;
    gap: 16px;
}

.jg-lb-title {
    color: rgba(255,255,255,0.80);
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.jg-lb-counter {
    color: rgba(255,255,255,0.30);
    font-size: 13px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Lightbox buttons */
.jg-lb-btn {
    position: absolute;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.11);
    color: rgba(255,255,255,0.75);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.25s, border-color 0.25s, color 0.25s;
    z-index: 3;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.jg-lb-btn:hover {
    background: rgba(201,169,110,0.18);
    border-color: rgba(201,169,110,0.38);
    color: var(--jg-accent);
}

.jg-lb-close { top: 24px; right: 24px; }
.jg-lb-prev  { left: 28px; top: 50%; transform: translateY(-50%); }
.jg-lb-next  { right: 28px; top: 50%; transform: translateY(-50%); }

/* ── Responsive ── */
@media (max-width: 1024px) {
    #jg-event-gallery { padding: 72px 0 0; }
    .jg-gallery-wrap { padding: 0 32px; }
    .jg-gallery-header { margin-bottom: 40px; }

    .jg-film-photo {
        flex: 0 0 220px;
        height: 160px;
    }

    .jg-featured-card { max-width: 420px; }
    .jg-featured-frame img { height: 260px; }

    .jg-events-row {
        grid-template-columns: 1fr 1fr;
        padding: 40px 32px 64px;
    }
}

@media (max-width: 640px) {
    #jg-event-gallery { padding: 56px 0 0; }
    .jg-gallery-wrap { padding: 0 20px; }
    .jg-gallery-heading { letter-spacing: -1.5px; }

    .jg-film-photo {
        flex: 0 0 180px;
        height: 130px;
        border-radius: 10px;
    }

    .jg-filmstrip-track { gap: 10px; }

    .jg-featured-card { max-width: 100%; margin: -40px 20px 0; }
    .jg-featured-frame img { height: 220px; }
    .jg-featured-frame { border-radius: 18px; }
    .jg-featured-info { padding: 22px 24px 24px; }
    .jg-featured-title { font-size: 19px; }

    .jg-events-row {
        grid-template-columns: 1fr;
        padding: 32px 20px 56px;
        gap: 14px;
    }

    .jg-event-tile { height: 220px; }
    .jg-lb-img     { max-width: 95vw; max-height: 65vh; }
    .jg-lb-prev    { left: 10px; }
    .jg-lb-next    { right: 10px; }
    .jg-lb-close   { top: 12px; right: 12px; }
}
