/* ============================================
   GALERIA - JV BELEZA & ESTÉTICA
   ============================================ */

/* ==================== GALLERY HERO ==================== */
.gallery-hero {
    padding: 8rem 0 4rem;
    background: linear-gradient(135deg, var(--primary-black) 0%, var(--bg-dark) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.gallery-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(212, 165, 116, 0.03) 10px,
        rgba(212, 165, 116, 0.03) 20px
    );
    pointer-events: none;
}

.gallery-hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: var(--spacing-sm);
    position: relative;
    z-index: 1;
}

.gallery-hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--primary-gold);
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ==================== GALLERY SECTION ==================== */
.section-gallery {
    padding: var(--spacing-xxl) 0;
    background-color: var(--bg-light);
}

/* ==================== GALLERY GRID ==================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

/* Responsive Grid */
@media screen and (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }
}

@media screen and (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
}

/* ==================== GALLERY ITEM ==================== */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background-color: var(--bg-dark);
    aspect-ratio: 1;
    cursor: pointer;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.gallery-item-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-slow);
}

.gallery-item:hover img,
.gallery-item:hover video {
    transform: scale(1.1);
}

/* ==================== GALLERY OVERLAY ==================== */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(10, 10, 10, 0.7) 0%,
        rgba(92, 58, 30, 0.8) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

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

.gallery-icon {
    color: var(--text-white);
    transform: scale(0.8);
    transition: transform var(--transition-normal);
}

.gallery-item:hover .gallery-icon {
    transform: scale(1);
}

/* ==================== LIGHTBOX ==================== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

/* Lightbox Content */
.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.lightbox-content img,
.lightbox-content video {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-content video {
    outline: none;
}

/* Lightbox Close Button */
.lightbox-close {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background-color: rgba(212, 165, 116, 0.2);
    border: 2px solid var(--primary-gold);
    border-radius: 50%;
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10002;
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
}

.lightbox-close:hover {
    background-color: var(--primary-gold);
    transform: rotate(90deg);
}

/* Lightbox Navigation Buttons */
.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background-color: rgba(212, 165, 116, 0.2);
    border: 2px solid var(--primary-gold);
    border-radius: 50%;
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10002;
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
}

.lightbox-nav:hover {
    background-color: var(--primary-gold);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 2rem;
}

.lightbox-next {
    right: 2rem;
}

/* Lightbox Counter */
.lightbox-counter {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(212, 165, 116, 0.2);
    border: 2px solid var(--primary-gold);
    color: var(--text-white);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    z-index: 10002;
    backdrop-filter: blur(10px);
}

/* Mobile Responsiveness for Lightbox */
@media screen and (max-width: 768px) {
    .lightbox-close {
        top: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }

    .lightbox-nav {
        width: 50px;
        height: 50px;
    }

    .lightbox-prev {
        left: 1rem;
    }

    .lightbox-next {
        right: 1rem;
    }

    .lightbox-counter {
        bottom: 1rem;
        font-size: 0.9rem;
        padding: 0.5rem 1.25rem;
    }

    .lightbox-content {
        max-width: 95vw;
        max-height: 80vh;
    }

    .lightbox-content img,
    .lightbox-content video {
        max-height: 80vh;
    }
}

@media screen and (max-width: 480px) {
    .lightbox-nav {
        width: 45px;
        height: 45px;
    }

    .lightbox-nav svg {
        width: 30px;
        height: 30px;
    }

    .lightbox-close svg {
        width: 24px;
        height: 24px;
    }
}

/* ==================== CTA SECTION ==================== */
.section-cta {
    background: linear-gradient(135deg, var(--primary-black) 0%, var(--bg-dark) 100%);
    padding: var(--spacing-xxl) 0;
    position: relative;
    overflow: hidden;
}

.section-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(212, 165, 116, 0.03) 10px,
        rgba(212, 165, 116, 0.03) 20px
    );
    pointer-events: none;
}

.cta-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.cta-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: var(--spacing-sm);
}

.cta-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--primary-gold);
    margin-bottom: var(--spacing-lg);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

/* ==================== LOADING STATE ==================== */
.gallery-item video::-webkit-media-controls {
    display: none !important;
}

.gallery-item video::-webkit-media-controls-enclosure {
    display: none !important;
}

.gallery-item video::-webkit-media-controls-panel {
    display: none !important;
}

/* ==================== ACCESSIBILITY ==================== */
.lightbox-close:focus,
.lightbox-nav:focus {
    outline: 3px solid var(--primary-gold);
    outline-offset: 3px;
}

/* ==================== PREVENT BODY SCROLL WHEN LIGHTBOX IS OPEN ==================== */
body.lightbox-open {
    overflow: hidden;
}

/* ==================== VIDEO CONTROLS IN LIGHTBOX ==================== */
.lightbox-content video {
    cursor: pointer;
}

.lightbox-content video::-webkit-media-controls-panel {
    background-color: rgba(0, 0, 0, 0.8);
}

/* ==================== SMOOTH TRANSITIONS ==================== */
* {
    -webkit-tap-highlight-color: transparent;
}

.gallery-item,
.lightbox,
.lightbox-close,
.lightbox-nav {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}
