/* Gallery Page Styles */

/* --- Hero Section --- */
.gallery-hero {
    height: 60vh;
    /* Ensure you have a banner image, using one from site folder as placeholder */
    background: url('../images/banner_images/1.jpg'); 
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-top: 0;
    position: relative;
}

.gallery-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.9) 100%);
    z-index: 1;
}

.hero-content {
    z-index: 2;
    position: relative;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.hero-highlight {
    color: var(--primary-red);
}

/* --- Filters --- */
.gallery-section {
    padding: 4rem 2rem;
    background: #fff;
    min-height: 80vh;
}

.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 2px solid #eee;
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.filter-btn:hover {
    border-color: var(--primary-red);
    color: var(--primary-red);
}

.filter-btn.active {
    background: var(--primary-red);
    color: white;
    border-color: var(--primary-red);
    box-shadow: 0 5px 15px rgba(225, 6, 0, 0.3);
}

/* --- Grid --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    height: 250px;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    background: #f0f0f0; /* Placeholder color */
}

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

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

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

.item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.overlay-icon {
    color: white;
    font-size: 2rem;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

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

/* --- Lightbox --- */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
}

.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 1000px;
    max-height: 80vh;
    object-fit: contain;
    animation: zoom 0.4s;
    border: 2px solid white;
    border-radius: 5px;
}

@keyframes zoom {
    from {transform:scale(0.9); opacity: 0;} 
    to {transform:scale(1); opacity: 1;}
}

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

.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--primary-red);
    text-decoration: none;
    cursor: pointer;
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 30px;
    transition: 0.3s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0,0,0,0.3);
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev:hover, .next:hover {
    background-color: var(--primary-red);
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
    font-size: 1.1rem;
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .gallery-filters {
        gap: 0.5rem;
    }
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    .lightbox-content {
        width: 95%;
    }
}