/* GALLERY.CSS - Estilos específicos da seção Gallery */

.gallery-section {
    padding: 5rem 0;
    background-color: hsl(var(--background));
}

.gallery-container {
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.gallery-header {
    text-align: center;
    margin-bottom: 4rem;
}

.gallery-title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

.gallery-subtitle {
    font-family: 'Dancing Script', cursive;
    font-size: 1.5rem;
    color: hsl(var(--primary));
    margin-bottom: 1.5rem;
}

.gallery-description {
    font-size: 1.125rem;
    color: hsl(var(--muted-foreground));
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.75;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: 1rem;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-elegant);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img { transform: scale(1.1); }

.gallery-overlay {position:absolute;inset:0;background:rgba(0,0,0,0);transition:.3s ease;}
.gallery-item:hover .gallery-overlay{background:rgba(0,0,0,.2);}
.gallery-overlay-text{position:absolute;bottom:1rem;left:1rem;color:#fff;font-size:.9rem;font-weight:500;opacity:0;transition:.3s ease;}
.gallery-item:hover .gallery-overlay-text{opacity:1;}

/* Modal base (hidden by default until .active) */
.gallery-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: none;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.gallery-counter {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: .75rem;
    letter-spacing: .08em;
    font-weight: 600;
    background: rgba(0,0,0,.4);
    padding: .4rem .9rem;
    border-radius: 999px;
    pointer-events: none;
}

.gallery-modal.active {
    display: flex;
}

.gallery-modal img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 0.5rem;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.gallery-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.gallery-nav.prev {
    left: 1.25rem;
}

.gallery-nav.next {
    right: 1.25rem;
}

.gallery-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    padding: 0.75rem;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.gallery-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive */
@media (min-width: 768px) {
    .gallery-title {
        font-size: 3.5rem;
    }
    
    .gallery-subtitle {
        font-size: 2rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
