/* ============================================
   GALLERY PAGE CSS - Only for gallery.html
   ============================================ */

/* Add spacing between page header and first category */
.gallery-category:first-of-type {
    margin-top: 30px;
}

/* MAIN CATEGORY HEADINGS - Green background */
.gallery-category > h2 {
	background: var(--secondary) !important;
    color: var(--white);
    padding: 15px 20px;
    margin-bottom: 30px;
    margin-top: 0;
    font-size: 28px;
}

/* SUBCATEGORY HEADINGS - Dark/Black background */
.gallery-subcategory h3 {
    background: var(--primary) !important;  /* Dark/Black */
    color: var(--white);
    padding: 10px 15px;
    margin-bottom: 20px;
    font-size: 22px;
}

/* Category spacing */
.gallery-category {
    margin-bottom: 60px;
}

/* Subcategory spacing */
.gallery-subcategory {
    margin-bottom: 40px;
}

/* Image Grid Layout */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Individual Gallery Item */
.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
    background: #f0f0f0;
}

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

/* Hover Effect - Zoom Image */
.gallery-item:hover img {
    transform: scale(1.05);
}

/* Overlay that appears on hover */
.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 ease;
}

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

.gallery-overlay h4 {
    color: white;
    margin: 0;
    font-size: 14px;
}

/* Lightbox - Full screen image viewer */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    cursor: pointer;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 85%;
    object-fit: contain;
}

.lightbox-caption {
    color: white;
    margin-top: 15px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
}

/* Responsive - Tablets and Phones */
@media (max-width: 768px) {
    .gallery-category > h2 {
        font-size: 22px;
    }
    .gallery-subcategory h3 {
        font-size: 18px;
    }
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 10px;
    }
}