/* ========================================
   PHOTOGRAPHY PAGE - GALLERY LAYOUT
   ======================================== */

/* Page Background */
body.page-photography {
    overflow-x: hidden;
    background: var(--paper-white, #FDFCFA);
}

body.page-photography::before {
    background-color: var(--paper-white, #FDFCFA);
}

/* Header - Always solid on this page (no hero) */
body.page-photography .site-header {
    background: var(--paper-white, #FDFCFA) !important;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05) !important;
}

body.page-photography .site-header.transparent {
    background: var(--paper-white, #FDFCFA) !important;
}

body.page-photography .site-header.transparent .logo-dark {
    display: block !important;
}

body.page-photography .site-header.transparent .logo-light {
    display: none !important;
}

body.page-photography .site-header .mobile-menu-toggle span,
body.page-photography .site-header.transparent .mobile-menu-toggle span {
    background: var(--text-dark, #2c2c2c) !important;
}

/* ========================================
   MAIN LAYOUT
   ======================================== */

.gallery-layout {
    display: flex;
    min-height: 100vh;
    padding-top: var(--header-height, 80px);
}

/* ========================================
   LEFT SIDEBAR - Desktop Only
   ======================================== */

.gallery-sidebar {
    position: fixed;
    left: 0;
    top: var(--header-height, 80px);
    width: 200px;
    height: calc(100vh - var(--header-height, 80px));
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    z-index: 10;
    background: var(--paper-white, #FDFCFA);
}

.sidebar-title {
    display: none;
}

.filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-list li {
    margin-bottom: 1rem;
}

/* Divider between Featured and categories */
.filter-list li.filter-divider {
    margin: 0.5rem 0 1.25rem 0;
    padding: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.filter-list a {
    font-family: var(--font-accent, 'Montserrat', sans-serif);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-dark, #2c2c2c);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.7;
    transition: opacity 0.3s ease, color 0.3s ease;
    cursor: pointer;
}

.filter-list a:hover {
    opacity: 1;
    color: var(--accent-rose, #D4A5A5);
}

.filter-list a.active {
    opacity: 1;
    font-weight: 600;
    color: var(--accent-rose, #D4A5A5);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 2rem;
    text-align: center;
}

.sidebar-footer a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dark, #2c2c2c);
    text-decoration: none;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.sidebar-footer a:hover {
    opacity: 1;
    color: var(--accent-rose, #D4A5A5);
}

.sidebar-footer .icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: 0.85rem;
}

.sidebar-footer .icon-circle svg {
    width: 16px;
    height: 16px;
}

.sidebar-footer .footer-text {
    font-family: var(--font-accent, 'Montserrat', sans-serif);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ========================================
   MOBILE FILTERS - Two Row Layout
   ======================================== */

.mobile-filters {
    display: none;
    padding: calc(var(--header-height, 80px) + 1.25rem) 0.5rem 1.25rem 0.5rem;
    text-align: center;
    background: var(--paper-white, #FDFCFA);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.mobile-filters-bottom {
    padding: 1.25rem 0.5rem;
    border-bottom: none;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.filters-bottom-label {
    font-family: var(--font-display, 'Cormorant Garamond', serif);
    font-size: 1rem;
    font-weight: 300;
    font-style: italic;
    color: var(--text-dark, #2c2c2c);
    opacity: 0.5;
    text-align: center;
    margin: 0 0 0.75rem 0;
    letter-spacing: 1px;
}

.mobile-filters-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
    font-family: var(--font-accent, 'Montserrat', sans-serif);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Hide the old separators */
.mobile-filters-list .separator {
    display: none;
}

/* Row containers */
.mobile-filters-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
}

.mobile-filters-list a {
    display: inline-block;
    padding: 0.5rem 0.65rem;
    color: var(--text-dark, #2c2c2c);
    text-decoration: none;
    opacity: 0.6;
    transition: opacity 0.3s ease, color 0.3s ease;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    line-height: 1.5;
}

.mobile-filters-list a:hover {
    opacity: 1;
    color: var(--accent-rose, #D4A5A5);
}

.mobile-filters-list a.active {
    opacity: 1;
    font-weight: 600;
    color: var(--accent-rose, #D4A5A5);
}

/* ========================================
   GALLERY CONTENT AREA
   ======================================== */

.gallery-content {
    flex: 1;
    margin-left: 200px;
    padding: 2rem;
    background: var(--paper-white, #FDFCFA);
    min-height: calc(100vh - var(--header-height, 80px));
}

/* ========================================
   STANDARD MASONRY GRID (Category Views)
   ======================================== */

.gallery-grid {
    column-count: 3;
    column-gap: 1.25rem;
    max-width: 1600px;
    margin: 0 auto;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease, opacity 0.3s ease;
}

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

/* ========================================
   FEATURED VIEW - Larger Masonry Layout
   Fewer columns + more spacing for showcase feel
   ======================================== */

.gallery-grid.featured-view {
    column-count: 2;
    column-gap: 1.5rem;
}

.gallery-grid.featured-view .gallery-item {
    margin-bottom: 1.5rem;
    border-radius: 2px;
}

/* Larger overlay text in featured view */
.gallery-grid.featured-view .gallery-item-overlay .overlay-title {
    font-size: 1.25rem;
}

.gallery-grid.featured-view .gallery-item-overlay .overlay-description {
    font-size: 0.85rem;
    -webkit-line-clamp: 3;
}

/* ========================================
   FEATURED ITEMS IN CATEGORY VIEWS
   White space framing effect
   ======================================== */

.gallery-item.featured-in-category {
    /* Add white space padding around the image */
    padding: 0.75rem;
    background: white;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 1.25rem;
}

.gallery-item.featured-in-category img {
    /* Image inside the white frame */
    border-radius: 1px;
}

/* ========================================
   HOVER OVERLAY - Title, Description & Location
   ======================================== */

.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 1rem 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
    color: white;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

/* Adjust overlay position for framed items */
.gallery-item.featured-in-category .gallery-item-overlay {
    bottom: 0.75rem;
    left: 0.75rem;
    right: 0.75rem;
}

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

.gallery-item-overlay .overlay-title {
    font-family: var(--font-display, 'Cormorant Garamond', serif);
    font-size: 1.1rem;
    font-weight: 400;
    margin: 0 0 0.35rem 0;
    line-height: 1.3;
}

.gallery-item-overlay .overlay-description {
    font-family: var(--font-body, 'Montserrat', sans-serif);
    font-size: 0.75rem;
    font-weight: 300;
    margin: 0 0 0.5rem 0;
    opacity: 0.85;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-item-overlay .overlay-location {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--font-accent, 'Montserrat', sans-serif);
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.75;
    margin-top: 0.25rem;
}

.gallery-item-overlay .overlay-location svg {
    flex-shrink: 0;
}

/* Hide overlay on touch devices (show in lightbox instead) */
@media (hover: none) {
    .gallery-item-overlay {
        display: none;
    }
}

/* ========================================
   GRID SIZE VARIATIONS
   ======================================== */

.gallery-item.grid-wide {
    margin-bottom: 1.5rem;
}

.gallery-item.grid-tall {
    margin-bottom: 1.5rem;
}

.gallery-item.grid-large {
    margin-bottom: 2rem;
}

.gallery-item.grid-large .gallery-item-overlay .overlay-title {
    font-size: 1.3rem;
}

/* Item hidden by filter */
.gallery-item.hidden {
    display: none;
}

/* Loading state */
.gallery-item.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    min-height: 200px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

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

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    z-index: 10001;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease, background 0.3s ease;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-nav:hover {
    opacity: 1;
    background: rgba(255,255,255,0.2);
}

.lightbox-prev {
    left: 1rem;
}

.lightbox-next {
    right: 1rem;
}

.lightbox-counter {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-family: var(--font-accent, 'Montserrat', sans-serif);
    font-size: 0.75rem;
    letter-spacing: 2px;
    opacity: 0.6;
}

/* Info Button */
.lightbox-info-btn {
    position: absolute;
    bottom: 3.5rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: all 0.3s ease;
    z-index: 10002;
}

.lightbox-info-btn:hover {
    opacity: 1;
    background: rgba(255,255,255,0.25);
}

.lightbox-info-btn.active {
    background: var(--accent-rose, #D4A5A5);
    border-color: var(--accent-rose, #D4A5A5);
    opacity: 1;
}

.lightbox-info-btn svg {
    width: 20px;
    height: 20px;
}

/* Metadata Panel */
.lightbox-metadata {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 0;
    overflow: hidden;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 100%);
    color: white;
    text-align: center;
    transition: max-height 0.3s ease, padding 0.3s ease;
    z-index: 10001;
}

.lightbox-metadata.expanded {
    max-height: 300px;
    padding: 2rem 2rem 3rem;
}

.lightbox-metadata-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.lightbox-metadata-close:hover {
    opacity: 1;
}

.lightbox-metadata .meta-title {
    font-family: var(--font-display, 'Cormorant Garamond', serif);
    font-size: 1.5rem;
    font-weight: 400;
    margin: 0 0 0.75rem 0;
    color: white;
}

.lightbox-metadata .meta-description {
    font-family: var(--font-body, 'Montserrat', sans-serif);
    font-size: 0.875rem;
    font-weight: 300;
    line-height: 1.6;
    margin: 0 0 1rem 0;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.lightbox-metadata .meta-location {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--font-accent, 'Montserrat', sans-serif);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.75;
}

.lightbox-metadata .meta-location svg {
    flex-shrink: 0;
}

/* ========================================
   CTA SECTION
   ======================================== */

.cta-section {
    background: var(--paper-white, #FDFCFA);
    padding: 5rem 2rem;
    text-align: center;
    margin-left: 200px;
}

.cta-section h2 {
    font-family: var(--font-display, 'Cormorant Garamond', serif);
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 0.75rem;
    color: var(--text-dark, #2c2c2c);
}

.cta-section p {
    font-family: var(--font-body, 'Montserrat', sans-serif);
    font-size: 1rem;
    margin-bottom: 2rem;
    opacity: 0.7;
}

.cta-button {
    display: inline-block;
    padding: 16px 40px;
    background: var(--accent-rose, #D4A5A5);
    color: white;
    border-radius: 4px;
    font-family: var(--font-accent, 'Montserrat', sans-serif);
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.3s ease;
}

.cta-button:hover {
    background: var(--accent-rose-hover, #C39595);
    color: white;
}

/* ========================================
   FOOTER ADJUSTMENT FOR SIDEBAR
   ======================================== */

body.page-photography .site-footer {
    margin-left: 200px;
}

/* ========================================
   RESPONSIVE BREAKPOINTS
   ======================================== */

/* Large screens */
@media (max-width: 1400px) {
    .gallery-grid {
        column-count: 2;
    }
    
    .gallery-grid.featured-view {
        column-count: 2;
    }
}

/* Medium screens */
@media (max-width: 1024px) {
    .gallery-grid {
        column-count: 2;
    }
    
    .gallery-grid.featured-view {
        column-count: 2;
    }    
    .gallery-sidebar {
        width: 180px;
        padding: 2rem 1.5rem;
    }
    
    .gallery-content {
        margin-left: 180px;
    }
    
    .cta-section,
    body.page-photography .site-footer {
        margin-left: 180px;
    }
}

/* Tablet and Mobile */
@media (max-width: 900px) {
    .gallery-sidebar {
        display: none;
    }
    
    .mobile-filters {
        display: block;
    }
    
    .gallery-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .gallery-grid {
        column-count: 2;
        column-gap: 0.75rem;
    }
    
        .gallery-grid.featured-view {
        column-count: 2;
        column-gap: 1rem;
    }
    
    .gallery-grid.featured-view .gallery-item {
        margin-bottom: 1rem;
    }
    
    .gallery-item {
        margin-bottom: 0.75rem;
    }
    
    .gallery-item.featured-in-category {
        padding: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .cta-section,
    body.page-photography .site-footer {
        margin-left: 0;
    }
    
    /* Lightbox mobile */
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .lightbox-info-btn {
        bottom: 3rem;
        right: 0.75rem;
        width: 40px;
        height: 40px;
    }
    
    .lightbox-metadata.expanded {
        padding: 1.5rem 1rem 2.5rem;
    }
    
    .lightbox-metadata .meta-title {
        font-size: 1.2rem;
    }
    
    .lightbox-metadata .meta-description {
        font-size: 0.8rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .gallery-grid {
        column-count: 1;
    }
    
 .gallery-grid.featured-view {
        column-count: 1;
        column-gap: 0;
    }
    
    .gallery-grid.featured-view .gallery-item {
        margin-bottom: 1.25rem;
    }
    
    .mobile-filters-list {
        font-size: 0.75rem;
    }
    
    .mobile-filters-list a {
        padding: 0.5rem 0.75rem;
    }
    
    .lightbox-content {
        max-width: 95vw;
    }
    
    .lightbox-image {
        max-height: 80vh;
    }
}

/* ========================================
   GRID SIZE VARIATIONS
   Works in both Featured and Category views
   ======================================== */

/* Grid size variations in category views (column-count masonry) */
/* In category views, grid-wide/large/tall just get subtle emphasis */
.gallery-item.grid-wide {
    margin-bottom: 1.5rem;
}

.gallery-item.grid-tall img {
    min-height: 500px;
    object-fit: cover;
}

.gallery-item.grid-large {
    margin-bottom: 2rem;
}

.gallery-item.grid-large img {
    min-height: 450px;
    object-fit: cover;
}

@media (max-width: 900px) {
    .gallery-item.grid-tall img {
        min-height: 350px;
    }
    
    .gallery-item.grid-large img {
        min-height: 300px;
    }
}

@media (max-width: 480px) {
    .gallery-item.grid-tall img,
    .gallery-item.grid-large img {
        min-height: auto;
    }
}

/* ========================================
   MOBILE CATEGORY HEADING
   ======================================== */

.mobile-category-heading {
    display: none;
    text-align: center;
    padding: 1rem 1.5rem 0.5rem;
    background: transparent;
}

.mobile-category-title {
    font-family: var(--font-display, 'Cormorant Garamond', serif);
    font-size: 2rem;
    font-weight: 300;
    margin: 0 0 0.25rem 0;
    color: var(--text-dark, #2c2c2c);
    letter-spacing: 1px;
}

.mobile-category-tagline {
    font-family: var(--font-body, 'Montserrat', sans-serif);
    font-size: 1rem;
    font-weight: 300;
    font-style: italic;
    color: var(--text-dark, #2c2c2c);
    opacity: 0.7;
    margin: 0;
    letter-spacing: 0.5px;
}

@media (max-width: 900px) {
    .mobile-category-heading {
        display: block;
    }
}