/* gallery.css - v42 (Fixing Navigation & Alignment) */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700&display=swap');

/* NATZURE PHOTOGRAPHY */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #1b1b1b; 
    color: #e0e0e0;
    overflow-x: hidden;
}

a { 
    text-decoration: none; 
    color: inherit; 
    transition: color 0.3s ease; 
}

/* NAVIGATION CONTAINER */
#nav-container {
    padding: 0 40px; 
    height: 80px;
    background-color: #1b1b1b; 
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    z-index: 2000;
    
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* TOP ROW Wrapper */
.nav-top-row {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* LEFT SIDE: Desktop Breadcrumbs */
#breadcrumbs {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.site-title {
    font-size: 1.2rem;
    font-weight: 700; 
    color: #fff;
    letter-spacing: 2px;
    cursor: pointer;
    white-space: nowrap;
}
.site-title:hover { color: #ccc; }

.crumb-separator { margin: 0 10px; color: #555; }
.crumb-link { cursor: pointer; color: #aaa; transition: color 0.3s; }
.crumb-link:hover { color: #fff; }
.crumb-link.active { color: #fff; font-weight: 600; cursor: default; }

/* HAMBURGER (Hidden on Desktop) */
.menu-toggle {
    display: none; 
    font-size: 1.8rem;
    color: #fff;
    cursor: pointer;
    padding: 10px; /* Provides a nice click area */
    user-select: none;
    /* Remove default margins so we can align perfectly */
    margin: 0; 
}

/* RIGHT SIDE: Menu */
#dropdown {
    flex: 0 0 auto;
    display: flex;
    align-items: center; 
    gap: 25px;
    font-size: 0.9rem;
    border-left: 1px solid #555; 
    padding-left: 30px;
    margin-left: 30px;
    height: 40px;
}

/* Mobile Breadcrumbs (Inside Menu) */
.mobile-crumbs {
    display: none;
}

.drop-item {
    position: relative;
    cursor: pointer;
    color: #aaa;
    text-transform: uppercase;
    white-space: nowrap;
    font-weight: 400;
    transition: all 0.3s ease;
    padding: 15px 0; 
}

.drop-item.active {
    color: #fff;
    font-weight: 700;
    border-bottom: 2px solid #fff; 
}

.drop-item:hover {
    color: #fff;
}

/* Desktop Flyout */
.flyout {
    display: none;
    position: absolute;
    top: 100%; 
    right: 0;
    background: #222;
    border: 1px solid #333;
    min-width: 200px;
    z-index: 2001;
    padding: 5px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.drop-item:hover .flyout {
    display: block;
}

.flyout a {
    display: block;
    padding: 12px 20px;
    color: #ccc;
    font-weight: 400;
    border: none;
    white-space: nowrap;
}

.flyout a:hover {
    background: #333;
    color: #fff;
}

/* HERO */
#hero-container {
    margin-bottom: 40px;
    position: relative;
    z-index: 1; 
}

.hero {
    height: 60vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#hero-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
}

.hero-text {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 20px;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 300;
    text-transform: uppercase;
    color: #fff;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
    line-height: 1.2;
}

.page-title {
    text-align: center;
    margin: 40px 0 20px;
}

.page-title h1 {
    font-size: 2.5rem;
    font-weight: 300;
    margin: 0;
    color: #fff;
    text-transform: uppercase;
}

.album-description {
    max-width: 800px;
    margin: 0 auto 50px;
    text-align: center;
    line-height: 1.6;
    color: #aaa;
    padding: 0 20px;
}

/* GALLERY GRID */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-auto-rows: 10px;
    gap: 20px;
    padding: 20px 40px 100px;
}

.gallery-item, .folder-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}

.folder-card {
    background: #222; 
    border-radius: 4px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.6);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.folder-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.9);
    z-index: 10;
}

.gallery-item {
    background: transparent; 
    box-shadow: none;        
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7); 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.folder-card img {
    width: 100%;
    height: 250px; 
    object-fit: contain;
    background: #000;
    display: block;
    order: 2; 
}

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

.folder-header {
    order: 1; 
    background: #2a2a2a;
    padding: 15px 20px;
    border-bottom: 1px solid #333;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.folder-header h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.folder-footer {
    order: 3;
    background: #1f1f1f;
    padding: 20px; 
    border-top: 1px solid #333;
    height: 130px; 
    flex-grow: 0; 
    flex-shrink: 0;
    overflow: hidden;
}

.folder-footer p {
    margin: 0;
    font-size: 0.85rem;
    color: #bbb;
    font-style: italic;
    text-align: center;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* LIGHTBOX */
#lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.96);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
}

#lightbox.active {
    display: flex;
}

#lb-img {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    box-shadow: 0 0 50px rgba(0,0,0,0.6);
}

.lb-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0,0,0,0.8);
    padding: 20px;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    text-align: center;
    pointer-events: none;
    z-index: 3002;
}

.lb-close, .lb-next, .lb-prev {
    position: absolute;
    color: #fff;
    cursor: pointer;
    z-index: 3001;
    font-size: 3rem;
    user-select: none;
    transition: color 0.3s ease;
}

.lb-close:hover, .lb-next:hover, .lb-prev:hover {
    color: #ccc;
}

.lb-close {
    top: 20px;
    right: 30px;
    font-size: 2.5rem;
}

.lb-prev {
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
}

.lb-next {
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
}

.loading, .error {
    text-align: center;
    padding: 100px 20px;
    font-size: 1.5rem;
    color: #888;
}

.error {
    color: #ff6b6b;
}

/* MOBILE */
@media (max-width: 768px) {
    .gallery {
        grid-template-columns: 1fr;
        padding: 20px;
    }
    
    #nav-container {
        /* V42: Matches the padding of the menu toggle's clickable area */
        padding: 15px;
        height: 80px; 
    }

    .nav-top-row {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .site-title-mobile {
        display: block !important; 
        font-size: 1.1rem;
        font-weight: 700;
        color: #fff;
        text-transform: uppercase;
        letter-spacing: 2px;
        cursor: pointer;
    }

    /* V42 FIX: Force hide desktop breadcrumbs on mobile */
    #breadcrumbs {
        display: none !important;
    }

    /* V42: Vertical, Right-Aligned to Edge */
    .mobile-crumbs {
        display: flex;
        flex-direction: column;
        align-items: flex-end; 
        
        /* Padding matches the container padding (15px) so it aligns with Hamburger */
        padding: 15px 15px 15px 0; 
        
        background: #111;
        border-bottom: 2px solid #333;
        font-size: 0.75rem; 
        color: #bbb;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    .mobile-crumb-line {
         padding-bottom: 6px;
    }
    
    .mobile-crumb-line.active {
        color: #fff;
    }

    .menu-toggle {
        display: block;
        /* Aligns to far right */
        margin-left: auto; 
    }

    #dropdown {
        display: none !important; 
        position: absolute;
        top: 80px; 
        left: 0;
        width: 100%;
        background-color: #1b1b1b; 
        border-bottom: 2px solid #444;
        box-shadow: 0 10px 20px rgba(0,0,0,0.8);
        flex-direction: column;
        height: auto;
        padding: 0;
        margin: 0;
        border-left: none;
        z-index: 2000; 
    }

    #dropdown.show {
        display: flex !important;
    }

    .drop-item {
        width: 100%;
        text-align: center;
        padding: 20px;
        border-top: 1px solid #333;
    }

    .flyout {
        position: static; 
        width: 100%;
        background: #111;
        box-shadow: none;
        border: none;
        padding: 0;
    }
    
    .flyout a {
        border-top: 1px solid #222;
        color: #888;
        padding: 15px;
        background: #0d0d0d;
        text-align: center;
    }

    .gallery-item img {
        min-height: 100px;
        background-color: #111;
    }
}