/* ============================================
   SD EVENTS - GALLERY PAGE 
   Premium Gallery with Stunning Transitions
   ============================================ */

/* ===== HERO SLIDER ===== */
.gallery-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    background: var(--dark);
}

.gallery-hero-slider {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.gallery-hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.15);
    transition: opacity 1.2s cubic-bezier(.4, 0, .2, 1), transform 6s cubic-bezier(.4, 0, .2, 1);
    z-index: 1;
}

.gallery-hero-slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

.gallery-hero-slide.exit {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 1s ease, transform 1s ease;
    z-index: 1;
}

.gallery-hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Slide Captions */
.slide-caption {
    position: absolute;
    bottom: 120px;
    right: 60px;
    text-align: right;
    z-index: 3;
    opacity: 0;
    transform: translateX(30px);
    transition: opacity .8s ease .5s, transform .8s ease .5s;
}

.gallery-hero-slide.active .slide-caption {
    opacity: 1;
    transform: translateX(0);
}

.slide-tag {
    display: inline-block;
    padding: 6px 20px;
    background: var(--gold-gradient);
    color: var(--dark);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    border-radius: var(--radius-full);
    margin-bottom: 10px;
}

.slide-caption h3 {
    color: var(--white);
    font-size: var(--text-2xl);
    text-shadow: 0 2px 20px rgba(0,0,0,.5);
}

/* Hero Overlay */
.gallery-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(26, 26, 46, 0.3) 0%,
        rgba(26, 26, 46, 0.1) 40%,
        rgba(26, 26, 46, 0.4) 70%,
        rgba(26, 26, 46, 0.85) 100%
    );
    z-index: 3;
}

/* Hero Content */
.gallery-hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 4;
    text-align: center;
    padding: 0 var(--space-xl) 140px;
    animation: fadeInUp 1s ease .3s backwards;
}

.gallery-hero-label {
    font-family: var(--font-accent);
    font-size: var(--text-lg);
    color: var(--gold-light);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: var(--space-md);
    font-style: italic;
}

.gallery-hero-content h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: var(--white);
    margin-bottom: var(--space-lg);
    line-height: 1.1;
}

.gallery-hero-content h1 span {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gallery-hero-desc {
    font-size: var(--text-lg);
    color: rgba(255,255,255,.75);
    max-width: 600px;
    margin: 0 auto var(--space-xl);
}

/* Hero Controls */
.gallery-hero-controls {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.slider-arrow {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    border: 2px solid rgba(255,255,255,.3);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-base);
    background: rgba(255,255,255,.05);
    backdrop-filter: blur(10px);
}

.slider-arrow:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--dark);
    transform: scale(1.1);
    box-shadow: var(--shadow-gold);
}

.slider-counter {
    font-family: var(--font-heading);
    color: var(--white);
    font-size: var(--text-xl);
    letter-spacing: 3px;
}

.slider-counter span:first-child {
    color: var(--gold);
    font-weight: 700;
}

/* Progress Bar */
.slider-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255,255,255,.15);
    z-index: 5;
}

.slider-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--gold-gradient);
    border-radius: 0 2px 2px 0;
}

/* ===== IMAGE RIBBON ===== */
.image-ribbon {
    overflow: hidden;
    background: var(--dark);
    padding: 20px 0;
    position: relative;
}

.image-ribbon::before,
.image-ribbon::after {
    content: '';
    position: absolute;
    top: 0;
    width: 120px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.image-ribbon::before {
    left: 0;
    background: linear-gradient(90deg, var(--dark) 0%, transparent 100%);
}

.image-ribbon::after {
    right: 0;
    background: linear-gradient(-90deg, var(--dark) 0%, transparent 100%);
}

.ribbon-track {
    display: flex;
    gap: 15px;
    animation: ribbonScroll 40s linear infinite;
    width: max-content;
}

.ribbon-item {
    flex-shrink: 0;
    width: 200px;
    height: 130px;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    border: 2px solid rgba(212,175,55,.2);
    transition: all var(--transition-base);
}

.ribbon-item:hover {
    border-color: var(--gold);
    transform: scale(1.08) translateY(-5px);
    box-shadow: 0 8px 30px rgba(212,175,55,.25);
}

.ribbon-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.ribbon-item:hover img {
    transform: scale(1.1);
}

@keyframes ribbonScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== GALLERY FILTER ===== */
.gallery-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: var(--space-3xl);
}

.gallery-filter-btn {
    padding: 12px 28px;
    border-radius: var(--radius-full);
    border: 2px solid var(--gray-light);
    color: var(--charcoal);
    font-weight: 600;
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all .4s cubic-bezier(.4, 0, .2, 1);
    background: transparent;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gallery-filter-btn i {
    font-size: var(--text-xs);
    transition: transform var(--transition-base);
}

.gallery-filter-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212,175,55,.15);
}

.gallery-filter-btn:hover i {
    transform: scale(1.2);
}

.gallery-filter-btn.active {
    background: var(--gold-gradient);
    border-color: transparent;
    color: var(--dark);
    box-shadow: var(--shadow-gold);
    transform: translateY(-2px);
}

.gallery-filter-btn.active i {
    color: var(--dark);
}

/* ===== MASONRY GALLERY GRID ===== */
.gallery-masonry {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    grid-auto-rows: 280px;
}

/* Make some items span 2 rows for masonry effect */
.gallery-card:nth-child(1) { grid-row: span 2; }
.gallery-card:nth-child(3) { grid-row: span 2; }
.gallery-card:nth-child(6) { grid-row: span 2; }
.gallery-card:nth-child(8) { grid-row: span 2; }
.gallery-card:nth-child(11) { grid-row: span 2; }
.gallery-card:nth-child(14) { grid-row: span 2; }

/* Some items span 2 columns */
.gallery-card:nth-child(5) { grid-column: span 2; }
.gallery-card:nth-child(12) { grid-column: span 2; }

.gallery-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all .5s cubic-bezier(.4, 0, .2, 1), opacity .4s ease, transform .4s ease;
}

.gallery-card.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.gallery-card.show {
    opacity: 1;
    transform: scale(1);
    position: relative;
    width: auto;
    height: auto;
}

.gallery-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.gallery-card-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .8s cubic-bezier(.4, 0, .2, 1), filter .5s ease;
}

.gallery-card:hover .gallery-card-inner img {
    transform: scale(1.12);
    filter: brightness(0.7);
}

/* Card Overlay */
.gallery-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        0deg,
        rgba(26, 26, 46, 0.95) 0%,
        rgba(26, 26, 46, 0.4) 40%,
        transparent 60%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 25px;
    opacity: 0;
    transition: opacity .5s cubic-bezier(.4, 0, .2, 1);
}

.gallery-card:hover .gallery-card-overlay {
    opacity: 1;
}

.gallery-card-content {
    transform: translateY(20px);
    transition: transform .5s cubic-bezier(.4, 0, .2, 1) .1s;
}

.gallery-card:hover .gallery-card-content {
    transform: translateY(0);
}

.gallery-card-tag {
    display: inline-block;
    padding: 4px 14px;
    background: var(--gold-gradient);
    color: var(--dark);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: var(--radius-full);
    margin-bottom: 10px;
}

.gallery-card-overlay h4 {
    color: var(--white);
    font-size: var(--text-xl);
    margin-bottom: 5px;
}

.gallery-card-overlay p {
    color: rgba(255,255,255,.7);
    font-size: var(--text-sm);
    margin-bottom: 0;
}

.gallery-card-overlay p i {
    color: var(--gold);
    margin-right: 5px;
}

/* Zoom Icon */
.gallery-card-zoom {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    border-radius: var(--radius-full);
    background: var(--gold);
    color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-base);
    transform: scale(0) rotate(-45deg);
    transition: transform .4s cubic-bezier(.68, -.55, .27, 1.55) .15s;
    box-shadow: var(--shadow-gold);
}

.gallery-card:hover .gallery-card-zoom {
    transform: scale(1) rotate(0);
}

/* ===== PARALLAX SECTION ===== */
.gallery-parallax {
    position: relative;
    padding: 120px 0;
    overflow: hidden;
    text-align: center;
}

.gallery-parallax-bg {
    position: absolute;
    inset: -30px;
    z-index: 1;
    transition: transform .1s linear;
}

.gallery-parallax-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-parallax-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(
        135deg,
        rgba(26, 26, 46, 0.88) 0%,
        rgba(128, 0, 32, 0.6) 50%,
        rgba(26, 26, 46, 0.88) 100%
    );
}

.gallery-parallax-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.gallery-parallax-content i.fa-quote-left {
    font-size: 3rem;
    color: var(--gold);
    margin-bottom: var(--space-lg);
    opacity: .5;
}

.gallery-parallax-content h2 {
    color: var(--white);
    font-size: var(--text-4xl);
    margin-bottom: var(--space-lg);
    line-height: 1.3;
}

.gallery-parallax-content > p {
    color: rgba(255,255,255,.75);
    font-size: var(--text-lg);
    font-style: italic;
    margin-bottom: var(--space-2xl);
}

.parallax-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-3xl);
    padding-top: var(--space-xl);
    border-top: 1px solid rgba(255,255,255,.15);
}

.parallax-stat {
    text-align: center;
}

.stat-num {
    display: block;
    font-family: var(--font-heading);
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 5px;
}

.stat-text {
    font-size: var(--text-sm);
    color: rgba(255,255,255,.6);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ===== SHOWCASE CAROUSEL ===== */
.showcase-carousel {
    overflow: hidden;
    border-radius: var(--radius-xl);
    position: relative;
}

.showcase-track {
    display: flex;
    transition: transform .7s cubic-bezier(.4, 0, .2, 1);
}

.showcase-slide {
    min-width: 100%;
    padding: 0 5px;
}

.showcase-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 0;
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(212,175,55,.15);
    min-height: 450px;
}

.showcase-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .8s ease;
}

.showcase-card:hover img {
    transform: scale(1.05);
}

.showcase-info {
    padding: var(--space-3xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.showcase-info h3 {
    font-size: var(--text-3xl);
    color: var(--dark);
    margin-bottom: var(--space-lg);
    position: relative;
}

.showcase-info h3::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--gold-gradient);
    margin-top: 15px;
    border-radius: 2px;
}

.showcase-info p {
    font-size: var(--text-base);
    color: var(--gray);
    line-height: 1.8;
    margin-bottom: var(--space-xl);
}

.showcase-location {
    font-size: var(--text-sm);
    color: var(--gold-dark);
    font-weight: 600;
}

.showcase-location i {
    margin-right: 6px;
}

/* Showcase Controls */
.showcase-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    padding: var(--space-xl) 0;
    position: relative;
    z-index: 901;
}

.showcase-arrow {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    background: var(--white);
    border: 2px solid var(--gold);
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: var(--text-base);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.showcase-arrow:hover {
    background: var(--gold);
    color: var(--white);
    transform: scale(1.1);
    box-shadow: var(--shadow-gold);
}

.showcase-dots {
    display: flex;
    gap: 8px;
}

.showcase-dot {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    background: var(--gray-light);
    cursor: pointer;
    transition: all var(--transition-base);
}

.showcase-dot.active {
    background: var(--gold);
    width: 36px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(212,175,55,.4);
}

/* ===== CTA SECTION ===== */
.gallery-cta-section {
    position: relative;
    overflow: hidden;
}

.gallery-cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(212,175,55,.08) 0%, transparent 70%);
    border-radius: var(--radius-full);
    animation: float 6s ease-in-out infinite;
}

.gallery-cta-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(128,0,32,.1) 0%, transparent 70%);
    border-radius: var(--radius-full);
    animation: float 8s ease-in-out infinite reverse;
}

.btn-outline-white {
    padding: 14px 36px;
    border: 2px solid rgba(255,255,255,.4);
    color: var(--white);
    font-weight: 600;
    border-radius: var(--radius-full);
    font-size: var(--text-base);
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-outline-white:hover {
    background: var(--white);
    color: var(--dark);
    border-color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255,255,255,.15);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .gallery-masonry {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 250px;
    }
}

@media (max-width: 991px) {
    .gallery-masonry {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 240px;
    }
    
    .gallery-card:nth-child(5),
    .gallery-card:nth-child(12) {
        grid-column: span 1;
    }

    .showcase-card {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .showcase-card img {
        height: 300px;
    }

    .showcase-info {
        padding: var(--space-xl);
    }

    .slide-caption {
        right: 30px;
        bottom: 100px;
    }

    .parallax-stats {
        gap: var(--space-xl);
    }
}

@media (max-width: 768px) {
    .gallery-hero {
        min-height: 500px;
    }

    .gallery-hero-content {
        padding-bottom: 120px;
    }

    .gallery-hero-controls {
        bottom: 35px;
        gap: var(--space-lg);
    }

    .slider-arrow {
        width: 42px;
        height: 42px;
    }

    .gallery-filter {
        gap: 8px;
    }

    .gallery-filter-btn {
        padding: 10px 20px;
        font-size: 12px;
    }

    .gallery-masonry {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 200px;
        gap: 12px;
    }

    .gallery-card:nth-child(1),
    .gallery-card:nth-child(3),
    .gallery-card:nth-child(6),
    .gallery-card:nth-child(8),
    .gallery-card:nth-child(11),
    .gallery-card:nth-child(14) {
        grid-row: span 1;
    }

    .gallery-parallax {
        padding: 80px 0;
    }

    .gallery-parallax-content h2 {
        font-size: var(--text-2xl);
    }

    .parallax-stats {
        flex-direction: column;
        gap: var(--space-lg);
    }

    .stat-num {
        font-size: var(--text-2xl);
    }

    .slide-caption {
        display: none;
    }

    .ribbon-item {
        width: 150px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    .gallery-masonry {
        grid-template-columns: 1fr;
        grid-auto-rows: 250px;
    }

    .gallery-hero-content h1 {
        font-size: 2rem;
    }

    .gallery-filter-btn {
        padding: 8px 16px;
        font-size: 11px;
    }

    .gallery-filter-btn i {
        display: none;
    }

    .showcase-card img {
        height: 220px;
    }
}
