/* Gallery Page Specific Styles */
.gallery-hero {
    background: linear-gradient(rgba(107, 50, 7, 0.6), rgba(107, 50, 7, 0.5)), url('assets/3.png');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 100px 0;
}

.gallery-hero h1 {
    font-family: 'Lanchitas', cursive;
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.gallery-hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
}

.gallery-content {
    padding: 80px 0;
    background: #f9f9f9;
}

/* Filter Dropdown for Mobile */
.filter-dropdown {
    display: none;
    width: 100%;
    max-width: 300px;
    margin: 0 auto 30px;
    position: relative;
}

.filter-select {
    width: 100%;
    padding: 15px 20px;
    background: white;
    border: 2px solid var(--light-gray);
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 20px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Filter Buttons for Desktop */
.gallery-controls {
    margin-bottom: 40px;
    text-align: center;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.filter-btn {
    padding: 12px 25px;
    background-color: white;
    border: 2px solid var(--light-gray);
    border-radius: 50px;
    color: var(--gray);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.filter-btn.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Gallery Grid - 3x3 layout */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform 0.3s;
    aspect-ratio: 1/1;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 15px;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h3 {
    font-size: 1rem;
    margin-bottom: 3px;
}

.gallery-overlay p {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80%;
    margin: auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    z-index: 2001;
}

.close-lightbox:hover {
    color: var(--primary);
}

#lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    padding: 15px;
    background: rgba(0, 0, 0, 0.7);
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: 50px;
    height: 50px;
    margin-top: -25px;
    color: white;
    font-weight: bold;
    font-size: 24px;
    transition: 0.3s;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2001;
}

.prev:hover, .next:hover {
    background-color: rgba(249, 115, 22, 0.8);
}

.next {
    right: 20px;
}

.prev {
    left: 20px;
}

/* RESPONSIVE STYLES */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .gallery-hero {
        padding: 80px 0;
    }
    
    .gallery-hero h1 {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .gallery-hero {
        padding: 70px 0;
    }
    
    .gallery-hero h1 {
        font-size: 2.2rem;
    }
    
    .gallery-content {
        padding: 60px 0;
    }
    
    /* Show dropdown, hide buttons on mobile */
    .filter-dropdown {
        display: block;
    }
    
    .filter-buttons {
        display: none;
    }
    
    .gallery-item {
        aspect-ratio: 1/1;
    }
    
    .lightbox-content {
        max-width: 95%;
        max-height: 70%;
    }
    
    .close-lightbox {
        top: 15px;
        right: 20px;
        font-size: 30px;
    }
    
    .prev, .next {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .gallery-hero h1 {
        font-size: 1.8rem;
    }
    
    .gallery-hero p {
        font-size: 1rem;
        padding: 0 15px;
    }
    
    .filter-select {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    .gallery-overlay {
        padding: 10px;
    }
    
    .gallery-overlay h3 {
        font-size: 0.9rem;
    }
    
    .gallery-overlay p {
        font-size: 0.75rem;
    }
}

@media (max-width: 360px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}