/* ============================================
   Gallery Page — Premium Professional Design
   ============================================ */

/* ---- Ambient Glow ---- */
.gallery-panel .section {
    position: relative;
    overflow: hidden;
}

.gallery-panel .section::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(11, 61, 46, 0.04) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.gallery-panel .section::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -150px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(201, 162, 77, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.gallery-panel .container {
    position: relative;
    z-index: 1;
}

/* ============ Section Tabs ============ */
.gallery-section-tabs {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 40px;
    position: relative;
}

.gallery-section-tabs::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--primary));
    border-radius: 3px;
}

.gallery-tab {
    padding: 16px 44px;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.gallery-tab:first-child {
    border-radius: 30px 0 0 30px;
}

.gallery-tab:last-child {
    border-radius: 0 30px 30px 0;
    border-left: none;
}

.gallery-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.gallery-tab.active::before,
.gallery-tab:hover::before {
    left: 0;
}

.gallery-tab.active,
.gallery-tab:hover {
    color: #fff;
    box-shadow: 0 6px 24px rgba(11, 61, 46, 0.25);
}

.gallery-tab span {
    position: relative;
    z-index: 1;
}

.gallery-tab i {
    position: relative;
    z-index: 1;
    margin-right: 8px;
    font-size: 1.1em;
}

/* ============ Panel ============ */
.gallery-panel {
    display: none;
    animation: galleryFadeIn 0.6s ease;
}

.gallery-panel.active {
    display: block;
}

@keyframes galleryFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============ Section Header ============ */
.gallery-section-header {
    text-align: center;
    margin-bottom: 50px;
}

.gallery-section-header .badge {
    display: inline-block;
    padding: 8px 24px;
    background: linear-gradient(135deg, rgba(11, 61, 46, 0.08), rgba(201, 162, 77, 0.08));
    color: var(--primary);
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    border-radius: 30px;
    margin-bottom: 18px;
    border: 1px solid rgba(11, 61, 46, 0.1);
}

.gallery-section-header h2 {
    font-size: 2.4rem;
    color: var(--primary);
    margin-bottom: 14px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.gallery-section-header p {
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.7;
}

/* ============================================
   EVENT CAROUSEL — Premium Cards
   ============================================ */

/* ---- Staggered Reveal Animation ---- */
.event-carousel-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.event-carousel-section.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Section Card ---- */
.event-carousel-section {
    margin-bottom: 28px;
    padding: 0;
    border-radius: 20px;
    background: #fff;
    border: 1px solid rgba(11, 61, 46, 0.06);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.03),
        0 4px 16px rgba(11, 61, 46, 0.05);
    position: relative;
    overflow: hidden;
}

.event-carousel-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--gold) 50%, var(--primary-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.event-carousel-section:hover {
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.04),
        0 20px 60px rgba(11, 61, 46, 0.1);
}

.event-carousel-section:hover::before {
    transform: scaleX(1);
}

.event-carousel-section:last-child {
    margin-bottom: 0;
}

/* ---- Header with Title + Nav ---- */
.event-carousel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px 16px;
    position: relative;
    z-index: 1;
}

.event-carousel-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.event-carousel-title .event-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(145deg, var(--primary), var(--primary-light));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(11, 61, 46, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.event-carousel-section:hover .event-icon {
    transform: scale(1.08) rotate(-3deg);
    box-shadow: 0 6px 20px rgba(11, 61, 46, 0.3);
}

.event-title-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.event-title-text h3 {
    font-size: 1.25rem;
    color: var(--primary);
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.2px;
    line-height: 1.2;
}

.event-title-text .photo-count {
    font-size: 0.72rem;
    color: var(--text-gray);
    font-weight: 500;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.event-title-text .photo-count i {
    color: var(--gold);
    font-size: 0.7rem;
}

/* ---- Nav Controls ---- */
.event-carousel-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.carousel-counter {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary);
    min-width: 48px;
    text-align: center;
    letter-spacing: 0.5px;
    font-variant-numeric: tabular-nums;
}

.event-nav-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1.5px solid rgba(11, 61, 46, 0.12);
    background: #fff;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.8rem;
}

.event-nav-btn:hover {
    background: var(--primary);
    color: var(--gold);
    border-color: var(--primary);
    transform: scale(1.1);
    box-shadow: 0 4px 14px rgba(11, 61, 46, 0.25);
}

/* ============ Carousel Track ============ */
.event-carousel-wrapper {
    position: relative;
    overflow: hidden;
    margin: 0 20px;
}

.event-carousel-track {
    display: flex;
    transition: transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* ============ Slide Cards ============ */
.event-slide {
    flex: 0 0 calc(100% / 3);
    padding: 0 6px;
    box-sizing: border-box;
    cursor: pointer;
}

.event-slide-inner {
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(145deg, #FFF8EE, #FFF0DB);
}

.event-slide-inner:hover {
    transform: translateY(-6px);
    box-shadow:
        0 12px 28px rgba(11, 61, 46, 0.12),
        0 4px 10px rgba(0, 0, 0, 0.06);
}

.event-slide-inner img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    object-position: center;
    image-orientation: from-image;
    display: block;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.event-slide-inner:hover img {
    transform: scale(1.04);
}

/* ---- Overlay ---- */
.event-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 25%,
        rgba(11, 61, 46, 0.06) 55%,
        rgba(11, 61, 46, 0.75) 90%,
        rgba(11, 61, 46, 0.92) 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 18px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.event-slide-inner:hover .event-slide-overlay {
    opacity: 1;
}

.event-slide-overlay .overlay-title {
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.event-slide-overlay .overlay-counter {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.68rem;
    font-weight: 500;
    margin-top: 2px;
    letter-spacing: 0.5px;
}

.event-slide-overlay .zoom-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.8rem;
    transform: translateY(-8px);
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) 0.05s;
    border: 1px solid rgba(255,255,255,0.15);
}

.event-slide-inner:hover .zoom-icon {
    transform: translateY(0);
    opacity: 1;
}

/* ============ Progress Bar ============ */
.event-carousel-progress {
    margin: 16px 28px 20px;
    height: 3px;
    background: rgba(11, 61, 46, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.event-carousel-progress .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--gold));
    border-radius: 3px;
    transition: width 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    min-width: 8%;
}

/* ---- Hash highlight ---- */
.event-carousel-section.highlight {
    animation: highlightPulse 2.5s ease;
}

@keyframes highlightPulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(11, 61, 46, 0.05); }
    15%, 75% {
        box-shadow: 0 0 0 3px var(--gold), 0 8px 40px rgba(200, 169, 81, 0.2);
    }
}

/* ============================================
   LIGHTBOX
   ============================================ */
.gallery-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.92);
    -webkit-backdrop-filter: blur(30px);
    backdrop-filter: blur(30px);
    align-items: center;
    justify-content: center;
    animation: lightboxIn 0.35s ease;
}

.gallery-lightbox.active {
    display: flex;
}

@keyframes lightboxIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    color: #fff;
    margin-top: 18px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    opacity: 0.85;
}

.lightbox-close {
    position: absolute;
    top: -55px;
    right: -10px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.08);
}

.lightbox-prev { left: -75px; }
.lightbox-next { right: -75px; }

/* ============================================
   GALLERY CTA SECTION
   ============================================ */
.gallery-cta-section {
    position: relative;
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary) 0%, #0a3526 50%, var(--primary-light) 100%);
    overflow: hidden;
}

.gallery-cta-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(201, 162, 77, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.gallery-cta-content {
    text-align: center;
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
}

.gallery-cta-icon {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(201, 162, 77, 0.3);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 1.6rem;
    color: var(--gold);
}

.gallery-cta-content h2 {
    font-size: 2.2rem;
    color: #fff;
    margin-bottom: 14px;
    font-weight: 800;
}

.gallery-cta-content p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 32px;
}

.gallery-cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.gallery-cta-buttons .btn {
    padding: 14px 32px;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.gallery-cta-buttons .btn-primary {
    background: var(--gold);
    color: var(--primary);
    border: 2px solid var(--gold);
}

.gallery-cta-buttons .btn-primary:hover {
    background: #dcb35c;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(201, 162, 77, 0.35);
}

.btn-outline-gold {
    background: transparent;
    color: var(--gold);
    border: 2px solid rgba(201, 162, 77, 0.4);
}

.btn-outline-gold:hover {
    background: rgba(201, 162, 77, 0.1);
    border-color: var(--gold);
    transform: translateY(-2px);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .event-slide {
        flex: 0 0 calc(100% / 2);
    }

    .gallery-section-header h2 {
        font-size: 1.9rem;
    }

    .event-carousel-section {
        border-radius: 18px;
    }

    .event-carousel-header {
        padding: 18px 22px 14px;
    }

    .event-carousel-wrapper {
        margin: 0 14px;
    }

    .event-carousel-progress {
        margin: 14px 22px 18px;
    }
}

@media (max-width: 768px) {
    .event-slide {
        flex: 0 0 100%;
    }

    .event-slide-inner img {
        aspect-ratio: 16 / 10;
    }

    .gallery-tab {
        padding: 12px 22px;
        font-size: 0.8rem;
        letter-spacing: 1px;
    }

    .event-carousel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 16px 14px 12px;
    }

    .event-carousel-wrapper {
        margin: 0 10px;
    }

    .event-carousel-progress {
        margin: 12px 14px 16px;
    }

    .event-title-text h3 {
        font-size: 1.1rem;
    }

    .gallery-section-header h2 {
        font-size: 1.5rem;
    }

    .event-carousel-section {
        margin-bottom: 16px;
        border-radius: 16px;
    }

    .event-carousel-title .event-icon {
        width: 42px;
        height: 42px;
        font-size: 0.95rem;
        border-radius: 11px;
    }

    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }

    .lightbox-nav {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .lightbox-close {
        top: -48px;
        right: 0;
    }

    .gallery-cta-section {
        padding: 60px 0;
    }

    .gallery-cta-content h2 {
        font-size: 1.7rem;
    }

    .gallery-cta-icon {
        width: 56px;
        height: 56px;
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .gallery-section-tabs {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .gallery-section-tabs::after {
        display: none;
    }

    .gallery-tab {
        width: 85%;
        border-radius: 30px !important;
        border-left: 2px solid var(--primary) !important;
        padding: 14px 24px;
    }

    .gallery-section-header h2 {
        font-size: 1.3rem;
    }

    .gallery-section-header .badge {
        font-size: 0.65rem;
        padding: 6px 16px;
        letter-spacing: 2px;
    }

    .event-nav-btn {
        width: 34px;
        height: 34px;
        border-radius: 9px;
    }

    .carousel-counter {
        font-size: 0.7rem;
        min-width: 40px;
    }

    .event-carousel-section {
        margin-bottom: 14px;
        border-radius: 14px;
    }

    .event-carousel-header {
        padding: 14px 12px 10px;
    }

    .event-carousel-wrapper {
        margin: 0 8px;
    }

    .event-carousel-progress {
        margin: 10px 12px 14px;
    }

    .event-slide-inner {
        border-radius: 10px;
    }

    .gallery-cta-content h2 {
        font-size: 1.4rem;
    }

    .gallery-cta-buttons .btn {
        padding: 12px 24px;
        font-size: 0.82rem;
        width: 100%;
        justify-content: center;
    }
}
