/* Gallery Hero Section */
.gallery-hero {
    position: relative;
    height: 70vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1f2e 0%, #2d3a52 50%, #1a1f2e 100%);
    overflow: hidden;
}

.gallery-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(197, 161, 90, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(197, 161, 90, 0.08) 0%, transparent 50%);
    animation: heroGlow 10s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../img/pattern-overlay.png') repeat;
    opacity: 0.03;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold), var(--color-gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(197, 161, 90, 0.3);
    letter-spacing: 2px;
    animation: titleShine 3s ease-in-out infinite;
}

@keyframes titleShine {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 300;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--color-gold);
    font-size: 2rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* Gallery Section */
.gallery-section {
    padding: 6rem 0;
    background: linear-gradient(180deg, #1b2433 0%, #0f1419 100%);
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 1rem auto 0;
    line-height: 1.8;
}

/* Gallery Grid - Masonry Layout */
.gallery-grid {
    column-count: 4;
    column-gap: 1.5rem;
    padding: 0 1rem;
}

@media (max-width: 1200px) {
    .gallery-grid { column-count: 3; }
}

@media (max-width: 768px) {
    .gallery-grid { column-count: 2; }
}

@media (max-width: 480px) {
    .gallery-grid { column-count: 1; }
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 16px;
    background: rgba(27, 36, 51, 0.5);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.15s; }
.gallery-item:nth-child(3) { animation-delay: 0.2s; }
.gallery-item:nth-child(4) { animation-delay: 0.25s; }
.gallery-item:nth-child(5) { animation-delay: 0.3s; }
.gallery-item:nth-child(6) { animation-delay: 0.35s; }
.gallery-item:nth-child(7) { animation-delay: 0.4s; }
.gallery-item:nth-child(8) { animation-delay: 0.45s; }
.gallery-item:nth-child(n+9) { animation-delay: 0.5s; }

.gallery-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(197, 161, 90, 0.3);
    z-index: 10;
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(197, 161, 90, 0.3), rgba(197, 161, 90, 0.1));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    border-radius: 16px;
}

.gallery-item:hover::before {
    opacity: 1;
}

.gallery-item::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold));
    border-radius: 16px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
    border-radius: 16px;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    z-index: 2;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item-title {
    color: var(--color-gold);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.gallery-item-date {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

/* Loading State */
.gallery-loading {
    text-align: center;
    padding: 6rem 2rem;
    color: var(--color-gold);
}

.loading-spinner-large {
    width: 80px;
    height: 80px;
    border: 4px solid rgba(197, 161, 90, 0.2);
    border-top-color: var(--color-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 2rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.gallery-loading p {
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Error State */
.gallery-error {
    text-align: center;
    padding: 6rem 2rem;
    color: var(--color-red-accent);
}

.gallery-error i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.gallery-error p {
    font-size: 1.1rem;
}

/* Load More Button */
.load-more-container {
    text-align: center;
    padding: 4rem 0 2rem;
}

.btn-load-more {
    padding: 1rem 3rem;
    background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold));
    color: var(--color-navy);
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(197, 161, 90, 0.3);
    text-transform: uppercase;
}

.btn-load-more:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(197, 161, 90, 0.5);
}

.btn-load-more i {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.btn-load-more:hover i {
    transform: translateY(3px);
}

/* Gallery Lightbox */
.gallery-lightbox {
    display: none;
    position: fixed;
    z-index: 10000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.97);
    backdrop-filter: blur(10px);
}

.gallery-lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.lightbox-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image-container {
    position: relative;
    max-width: 80vw;
    max-height: 90vh;
    animation: scaleIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lightbox-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    display: none;
}

.lightbox-loading.active {
    display: block;
}

.loading-spinner-lightbox {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(197, 161, 90, 0.3);
    border-top-color: var(--color-gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-image-container img {
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.8);
    border: 3px solid rgba(197, 161, 90, 0.3);
}

.lightbox-info {
    position: absolute;
    bottom: -60px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
}

.lightbox-info p {
    margin: 0.5rem 0;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.lightbox-counter {
    color: var(--color-gold) !important;
    font-weight: 600;
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold));
    color: var(--color-navy);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(197, 161, 90, 0.5);
    z-index: 10003;
}

.lightbox-close:hover {
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 6px 25px rgba(197, 161, 90, 0.7);
}

.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold));
    color: var(--color-navy);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(197, 161, 90, 0.5);
    z-index: 10002;
}

.lightbox-nav:hover {
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 6px 25px rgba(197, 161, 90, 0.7);
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .gallery-hero {
        height: 50vh;
        min-height: 400px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .gallery-section {
        padding: 3rem 0;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .gallery-grid {
        column-gap: 1rem;
        padding: 0 0.5rem;
    }

    .gallery-item {
        margin-bottom: 1rem;
        border-radius: 12px;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .lightbox-nav {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-info {
        bottom: -80px;
    }

    .lightbox-image-container img {
        max-height: 70vh;
    }

    .btn-load-more {
        padding: 0.8rem 2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .gallery-hero {
        height: 40vh;
        min-height: 300px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .gallery-grid {
        column-gap: 0.75rem;
        padding: 0 0.25rem;
    }
    
    .gallery-item {
        margin-bottom: 0.75rem;
        border-radius: 10px;
    }
    
    .lightbox-nav {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .lightbox-image-container img {
        max-height: 60vh;
    }
}

/* Smooth Transitions */
* {
    transition-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
