/* ============================================
   GALLERY PAGE STYLES
   ============================================ */

/* Hero Header - Matches Reviews Page Style */
.galleryPageHeader {
    width: 100%;
    min-height: 35vh;
    padding-top: 14vh;
    padding-bottom: 6vh;
    position: relative;
    overflow: hidden;

    display: flex;
    justify-content: center;
    align-items: center;

    background-image: url("../content/Images/IMG_20250715_110209752_1.jpg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover; 

    background-attachment: fixed; 
}

/* Hide unused filter tabs without removing from HTML */
.filterHidden {
    display: none !important;
}

.galleryPageHeader::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(60, 75, 65, 0.3) 0%, rgba(40, 50, 45, 0.4) 100%);
}

.galleryHeaderContent {
    width: 80vw;
    text-align: center;
    color: white;
    position: relative;
    z-index: 2;
}

.galleryPageTitle {
    font-family: 'Noto Serif', serif;
    font-size: clamp(2rem, 3.5vw + 0.5rem, 3.5rem);
    font-weight: 400;
    margin-bottom: 1%;
    letter-spacing: -0.02em;
    color: white;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    opacity: 0;
    animation: titleReveal 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes titleReveal {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.galleryPageSubtitle {
    font-family: 'Noto Sans', sans-serif;
    font-size: clamp(0.95rem, 1.2vw + 0.3rem, 1.4rem);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    opacity: 0;
    animation: subtitleReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

@keyframes subtitleReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Filter Tabs */
.galleryFilters {
    width: 100%;
    background: var(--white, #ffffff);
    padding: 2.5vh 0;
    position: sticky;
    top: 10vh;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid var(--gray-200, #e8ece8);
}

.filterContainer {
    width: 80vw;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filterBtn {
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.95em;
    font-weight: 500;
    padding: 0.7em 1.8em;
    border: 2px solid var(--gray-300, #d0d4d0);
    border-radius: 4px;
    background: transparent;
    color: var(--gray-600, #555555);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filterBtn:hover {
    border-color: var(--primary, #5c7a65);
    color: var(--primary, #5c7a65);
}

.filterBtn.active {
    background: var(--primary, #5c7a65);
    border-color: var(--primary, #5c7a65);
    color: white;
}

/* Gallery Container */
.galleryContainer {
    width: 100%;
    background: linear-gradient(180deg, #f0f4f0 0%, #e8ece8 100%);
    padding: 6vh 0 10vh 0;
}

/* Masonry Grid */
.galleryGrid {
    width: 80vw;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 250px;
    gap: 1.5rem;
}

/* Gallery Items */
.galleryItem {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.galleryItem:hover,
.galleryItem.is-active {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

/* Size Variations for Masonry Effect */
.galleryItem.tall {
    grid-row: span 2;
}

.galleryItem.wide {
    grid-column: span 2;
}

/* Gallery Images */
.galleryItem img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.galleryItem:hover img,
.galleryItem.is-active img {
    transform: scale(1.08);
}

/* Hover Overlay */
.galleryOverlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 0%,
        transparent 40%,
        rgba(26, 51, 38, 0.9) 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.galleryItem:hover .galleryOverlay,
.galleryItem.is-active .galleryOverlay {
    opacity: 1;
}

.galleryLabel {
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent, #e09900);
    margin-bottom: 0.5rem;
}

.galleryTitle {
    font-family: 'Noto Serif', serif;
    font-size: 1.4em;
    font-weight: 500;
    color: white;
    margin: 0;
}

.galleryDesc {
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.8);
    margin: 0.3rem 0 0 0;
}

/* CTA Section - Matches Reviews Page Style */
.galleryCTA {
    width: 100%;
    padding: 10vh 0;
    background: linear-gradient(135deg, var(--primary, #5c7a65) 0%, var(--primary-dark, #4a6052) 100%);
    text-align: center;
    position: relative;
}

.galleryCTA .ctaContent {
    width: 80vw;
    max-width: 700px;
    margin: auto;
    color: white;
    position: relative;
    z-index: 1;
}

.galleryCTA .ctaTitle {
    font-family: 'Noto Serif', serif;
    font-size: clamp(1.5rem, 2.5vw + 0.3rem, 2.5rem);
    font-weight: 400;
    margin-bottom: 2vh;
    color: white;
}

.galleryCTA .ctaSubtitle {
    font-family: 'Noto Sans', sans-serif;
    font-size: clamp(0.9rem, 1vw + 0.3rem, 1.15rem);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 4vh;
}

.galleryCTA .ctaContact {
    font-family: 'Noto Sans', sans-serif;
    font-size: clamp(1rem, 1.1vw + 0.3rem, 1.3rem);
    color: white;
}

.galleryCTA .ctaContact strong {
    color: #ffd700;
    font-weight: 600;
}

/* ============================================
   GALLERY RESPONSIVE STYLES
   ============================================ */

@media (max-width: 1200px) {
    .galleryGrid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 220px;
    }
    
    .galleryItem.wide {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .galleryPageHeader {
        background-attachment: scroll;
    }
    
    .galleryFilters {
        top: 8vh;
        padding: 2vh 0;
    }
    
    .filterBtn {
        font-size: 0.85em;
        padding: 0.6em 1.2em;
    }
    
    .galleryGrid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 180px;
        gap: 1rem;
    }
    
    .galleryItem.wide {
        grid-column: span 1;
    }

    .galleryTitle {
        font-size: 1em;
    }

    .galleryLabel {
        font-size: 0.65em;
    }

    .galleryDesc {
        font-size: 0.8em;
    }
    
}

@media (max-width: 480px) {
    .galleryPageHeader {
        min-height: 30vh;
        padding-top: 12vh;
        padding-bottom: 5vh;
    }
    
    .filterContainer {
        gap: 0.5rem;
    }
    
    .filterBtn {
        font-size: 0.8em;
        padding: 0.5em 1em;
    }
    
    .galleryGrid {
        grid-template-columns: 1fr;
        grid-auto-rows: 220px;
    }
    
    .galleryItem.tall,
    .galleryItem.wide {
        grid-column: span 1;
        grid-row: span 1;
    }

    .galleryOverlay {
        padding: 1rem;
    }

    .galleryTitle {
        font-size: 1.1em;
    }
    
    .galleryCTA {
        padding: 8vh 0;
    }
    
}

/* ============================================
   LIGHTBOX STYLES
   ============================================ */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

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

/* Dark overlay background */
.lightboxOverlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 20, 15, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Close button */
.lightboxClose {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;

    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    
    color: white;
    font-size: 2rem;
    line-height: 1;
    padding-bottom: 0.1em;
    
    cursor: pointer;
    z-index: 10;
    
    transition: all 0.3s ease;
}

.lightboxClose:hover {
    background: var(--accent, #e09900);
    border-color: var(--accent, #e09900);
    transform: rotate(90deg);
}

/* Navigation arrows */
.lightboxNav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    
    width: 60px;
    height: 60px;
    
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    
    color: white;
    cursor: pointer;
    z-index: 10;
    
    display: flex;
    align-items: center;
    justify-content: center;
    
    transition: all 0.3s ease;
}

.lightboxNav svg {
    width: 24px;
    height: 24px;
}

.lightboxNav:hover {
    background: var(--primary, #5c7a65);
    border-color: var(--primary, #5c7a65);
    transform: translateY(-50%) scale(1.1);
}

.lightboxPrev {
    left: 2rem;
}

.lightboxNext {
    right: 2rem;
}

/* Main content area */
.lightboxContent {
    position: relative;
    z-index: 5;
    max-width: 80vw;
    max-height: 85vh;
    
    display: flex;
    flex-direction: column;
    align-items: center;
    
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox.active .lightboxContent {
    transform: scale(1) translateY(0);
}

/* Image */
.lightboxImage {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    
    border-radius: 4px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
}

/* Info panel below image */
.lightboxInfo {
    text-align: center;
    padding: 1.5rem 2rem;
    margin-top: 1rem;
    
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    
    min-width: 300px;
}

.lightboxLabel {
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent, #e09900);
}

.lightboxTitle {
    font-family: 'Noto Serif', serif;
    font-size: 1.6em;
    font-weight: 500;
    color: white;
    margin: 0.5rem 0 0 0;
}

.lightboxDesc {
    font-family: 'Noto Sans', sans-serif;
    font-size: 1em;
    color: rgba(255, 255, 255, 0.7);
    margin: 0.3rem 0 0 0;
}

/* Counter */
.lightboxCounter {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.6);
    
    z-index: 10;
}

/* Hide info elements if empty */
.lightboxDesc:empty,
.lightboxLabel:empty {
    display: none;
}

/* ============================================
   LIGHTBOX RESPONSIVE STYLES
   ============================================ */

@media (max-width: 768px) {
    .lightboxClose {
        top: 1rem;
        right: 1rem;
        width: 44px;
        height: 44px;
        font-size: 1.6rem;
    }
    
    .lightboxNav {
        width: 50px;
        height: 50px;
    }
    
    .lightboxNav svg {
        width: 20px;
        height: 20px;
    }
    
    .lightboxPrev {
        left: 1rem;
    }
    
    .lightboxNext {
        right: 1rem;
    }
    
    .lightboxContent {
        max-width: 95vw;
        max-height: 80vh;
    }
    
    .lightboxImage {
        max-height: 55vh;
    }
    
    .lightboxInfo {
        padding: 1rem 1.5rem;
        min-width: auto;
        width: 90%;
    }
    
    .lightboxTitle {
        font-size: 1.3em;
    }
}

@media (max-width: 480px) {
    .lightboxNav {
        top: auto;
        bottom: 5rem;
        transform: none;
    }
    
    .lightboxPrev {
        left: calc(50% - 70px);
    }
    
    .lightboxNext {
        right: calc(50% - 70px);
    }
    
    .lightboxNav:hover {
        transform: scale(1.1);
    }
    
    .lightboxCounter {
        bottom: 1rem;
    }
}