:root{--accent:#20c5a5;--bg:#06251f;--header:#051f1a;--panel:#092e27;--panel2:#0b382f;--line:#126554;--soft:#16947d;--ink:#f4f4f4;--muted:#b1bbb8;--paper:#fff;--paperInk:#1d1d1d}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--ink);font:15px/1.55 Arial,Helvetica,sans-serif}.shell{width:min(1460px,calc(100% - 64px));margin:auto}.site-header{position:sticky;top:0;z-index:40;background:var(--header);backdrop-filter:blur(10px);border-bottom:1px solid var(--line)}.header-row{height:96px;display:flex;align-items:center;gap:34px}.brand{display:flex;align-items:center;color:#fff;text-decoration:none;font-size:22px;font-weight:900;letter-spacing:-.02em;white-space:nowrap;transition:color .2s ease}.brand:hover{color:var(--accent)}.brand-text{max-width:260px;overflow:hidden;text-overflow:ellipsis}.header-search{width:min(440px,34vw);height:46px;background:var(--panel2);border:1px solid transparent;border-radius:9px;display:flex;align-items:center;padding:0 15px;gap:10px;transition:border-color .2s,box-shadow .2s}.header-search:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 18%,transparent)}.header-search span{color:#aaa;font-size:22px}.header-search input{width:100%;background:transparent;border:0;outline:0;color:#fff;font-size:16px}.header-search input::placeholder{color:#929292}.main-nav{margin-left:auto;display:flex;align-items:center;gap:34px}.main-nav a{color:#8f8f8f;text-decoration:none;font-weight:700}.main-nav a:hover{color:#fff}.main-nav a.active{color:var(--accent)}.gallery-shell{padding:30px 0 70px}.photo-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;align-items:start}.photo-card{display:block;position:relative;margin:0;break-inside:avoid;border-radius:8px;overflow:hidden;background:var(--panel);text-decoration:none;color:#fff}.photo-card img{display:block;width:100%;height:auto;aspect-ratio:4/3;object-fit:cover;min-height:0;background:var(--panel2);transition:transform .25s ease,filter .25s ease}.photo-card:hover img{transform:scale(1.018);filter:brightness(.82)}.photo-caption{position:absolute;left:0;right:0;bottom:0;padding:38px 15px 13px;background:linear-gradient(transparent,rgba(0,0,0,.78));opacity:0;transform:translateY(5px);transition:.2s}.photo-card:hover .photo-caption{opacity:1;transform:none}.photo-caption b{font-size:14px;text-shadow:0 1px 3px #000}.feed-sentinel{height:1px}.feed-status{text-align:center;color:#777;padding:14px 0 0}.detail-shell{padding:36px 0 70px}.detail-article{max-width:1040px;margin:auto;background:var(--paper);color:var(--paperInk);border-radius:12px;overflow:hidden}.detail-figure{margin:0;background:#0c0c0c}.detail-figure>img{display:block;width:100%;max-height:760px;object-fit:contain;margin:auto}.detail-figure figcaption{padding:26px 42px 12px}.detail-figure h1{margin:0 0 9px;font-size:38px;line-height:1.15}.detail-figure p{margin:0;color:#666;font-size:17px}.article-body{padding:18px 42px 46px;font:18px/1.8 Georgia,serif}.article-body p{margin:0 0 24px}.article-meta{display:flex;gap:10px;margin-bottom:25px;font:12px/1.2 Arial,sans-serif;text-transform:uppercase;letter-spacing:.08em}.article-meta span{background:#f0f2f3;padding:7px 10px;border-radius:20px}.related{margin-top:44px}.section-head{display:flex;justify-content:space-between;align-items:end;margin-bottom:16px}.section-head h2{margin:0;font-size:26px}.section-head span{color:#888}.related-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}.related-grid a{display:block;color:#eee;text-decoration:none}.related-grid img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:8px;background:var(--panel2)}.related-grid span{display:block;padding-top:7px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.search-page{padding:42px 0 70px}.search-title h1{font-size:34px;margin:0}.search-title p{color:#8f8f8f;margin:5px 0 25px}.mobile-search{display:none;margin-bottom:28px}.mobile-search input{flex:1;background:var(--panel2);border:1px solid var(--line);border-radius:8px 0 0 8px;color:#fff;padding:13px}.mobile-search button{border:0;border-radius:0 8px 8px 0;background:var(--accent);font-weight:800;padding:0 18px}.status-box{max-width:900px;margin:50px auto;padding:50px;text-align:center;border:1px solid var(--line);border-radius:12px;background:var(--panel)}.text-page{max-width:900px;padding:52px 0 80px}.text-page h1{font-size:38px}.text-page h2{margin-top:34px}.text-page p{color:#bbb;font-size:17px}.text-page a{color:var(--accent)}.site-footer{border-top:1px solid var(--line);color:#8c8c8c;padding:30px 0 18px}.footer-row{display:flex;justify-content:space-between;gap:30px}.footer-row>div strong,.footer-row>div span{display:block}.footer-row strong{color:#fff;font-size:17px}.footer-row nav{display:flex;gap:18px}.footer-row a{color:#aaa;text-decoration:none}.footer-row a:hover{color:#fff}.footer-bottom{border-top:1px solid var(--line);margin-top:24px;padding-top:16px;font-size:12px}@media(max-width:900px){.shell{width:min(100% - 30px,1460px)}.header-row{height:76px;gap:18px}.header-search{flex:1;width:auto}.main-nav{display:none}.related-grid{grid-template-columns:repeat(3,1fr)}}@media(max-width:640px){.shell{width:min(100% - 20px,1460px)}.brand{font-size:18px;max-width:145px}.header-search{height:42px}.gallery-shell{padding-top:14px}.photo-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.photo-card{margin-bottom:10px;border-radius:5px}.photo-caption{display:none}.detail-shell{width:100%;padding-top:0}.detail-article{border-radius:0}.detail-figure figcaption,.article-body{padding-left:20px;padding-right:20px}.detail-figure h1{font-size:29px}.article-body{font-size:17px}.related{padding:0 10px}.section-head span{display:none}.related-grid{grid-template-columns:repeat(2,1fr);gap:10px}.search-page{padding-top:24px}.mobile-search{display:flex}.search-page .photo-grid{columns:2 150px}.footer-row{display:block}.footer-row nav{margin-top:20px;flex-wrap:wrap}}

/* ===== Categories: same masonry system as homepage ===== */

.category-photo-card .category-caption{
    display:block;
    opacity:1;
    transform:none;
    padding:55px 16px 14px;
    pointer-events:none;
}

.category-photo-card .category-caption b{
    font-size:18px;
    line-height:1.25;
}

.category-image-placeholder{
    display:block;
    width:100%;
    min-height:260px;
    background:linear-gradient(135deg,var(--panel2),var(--soft));
}

@media(max-width:640px){

    .category-photo-card .category-caption{
        display:block;
        opacity:1;
        transform:none;
        padding:40px 10px 10px;
    }

    .category-photo-card .category-caption b{
        font-size:15px;
    }

    .category-image-placeholder{
        min-height:180px;
    }
}

/* ===== FIXED MASONRY COLUMNS ===== */
.photo-grid{
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:24px !important;
    align-items:start !important;
    columns:auto !important;
}

.photo-column{
    display:flex;
    flex-direction:column;
    gap:24px;
    min-width:0;
}

.photo-column .photo-card{
    display:block !important;
    position:relative !important;
    width:100% !important;
    height:auto !important;
    aspect-ratio:auto !important;
    margin:0 !important;
}

.photo-column .photo-card img{
    position:relative !important;
    inset:auto !important;
    display:block !important;
    width:100% !important;
    height:auto !important;
    min-height:0 !important;
    aspect-ratio:auto !important;
    object-fit:contain !important;
}

@media(max-width:640px){
    .photo-grid{
        grid-template-columns:repeat(2,minmax(0,1fr)) !important;
        gap:10px !important;
    }

    .photo-column{
        gap:10px;
    }
}

/* ===== Gallery Pagination ===== */
.gallery-pagination{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:18px;
    margin:46px auto 0;
    width:100%;
}

.gallery-pagination a,
.gallery-pagination .pagination-disabled{
    min-width:130px;
    height:48px;
    padding:0 24px;
    border:1px solid var(--line);
    border-radius:10px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-size:15px;
    font-weight:800;
    text-decoration:none;
    transition:
        border-color .2s ease,
        background .2s ease,
        transform .15s ease;
}

.gallery-pagination a{
    color:#fff;
    background:var(--panel2);
    cursor:pointer;
    box-shadow:0 4px 14px rgba(0,0,0,.18);
}

.gallery-pagination a:hover{
    border-color:var(--accent);
    background:var(--panel);
    transform:translateY(-1px);
}

.gallery-pagination a:active{
    transform:translateY(0);
}

.gallery-pagination .pagination-disabled{
    color:var(--muted);
    background:var(--panel);
    opacity:.38;
    cursor:default;
}

.pagination-count{
    min-width:150px;
    text-align:center;
    white-space:nowrap;
    font-size:15px;
    font-weight:800;
    color:var(--ink);
}



/* ===== TRUE 6 IMAGE LAZY LOAD ===== */
.photo-column .photo-card img.lazy-pending{
    display:block !important;
    width:100% !important;
    height:auto !important;
    aspect-ratio:4/3 !important;
    min-height:0 !important;
    background:var(--panel2) !important;
    object-fit:cover !important;
}


/* ==========================================================
   MASTER MOBILE LAYOUT
   Desktop layout remains unchanged.
   ========================================================== */

.mobile-menu-button,
.mobile-site-menu{
    display:none;
}

@media (max-width:700px){

    /* ---------- Header ---------- */

    .header-row{
        position:relative;
        display:flex;
        align-items:center;
        gap:10px;
        flex-wrap:nowrap;
    }

    .brand{
        flex:0 0 auto;
    }

    .header-search{
        flex:1 1 auto;
        min-width:0;
        width:auto;
        max-width:none;
        margin:0;
    }

    .header-search input{
        width:100%;
        min-width:0;
        font-size:14px;
    }

    .main-nav{
        display:none !important;
    }

    .mobile-menu-button{
        display:flex;
        flex:0 0 42px;
        width:42px;
        height:42px;
        padding:9px;
        border:0;
        border-radius:9px;
        background:rgba(255,255,255,.08);
        cursor:pointer;
        align-items:center;
        justify-content:center;
        flex-direction:column;
        gap:5px;
    }

    .mobile-menu-button span{
        display:block;
        width:23px;
        height:2px;
        border-radius:2px;
        background:#fff;
    }

    .mobile-site-menu{
        display:none;
        position:absolute;
        z-index:1000;
        top:calc(100% + 8px);
        right:0;
        width:min(300px,calc(100vw - 24px));
        padding:8px;
        border:1px solid var(--line);
        border-radius:12px;
        background:var(--header);
        box-shadow:0 15px 40px rgba(0,0,0,.35);
    }

    .mobile-site-menu.open{
        display:block;
    }

    .mobile-site-menu a{
        display:block;
        width:100%;
        padding:13px 14px;
        border-radius:8px;
        color:#fff;
        text-decoration:none;
        font-size:15px;
        font-weight:600;
    }

    .mobile-site-menu a:hover{
        background:rgba(255,255,255,.08);
    }

    /* ---------- Homepage: ONE large image per row ---------- */

    .gallery-shell{
        width:100%;
    }

    .photo-grid{
        display:grid !important;
        grid-template-columns:minmax(0,1fr) !important;
        gap:18px !important;
        width:100% !important;
    }

    .photo-card{
        display:block !important;
        width:100% !important;
        max-width:none !important;
    }

    .photo-card img{
        display:block !important;
        width:100% !important;
        height:auto !important;
        max-height:none !important;
        object-fit:contain !important;
    }

    .photo-caption{
        width:100%;
    }

    /* ---------- Footer links on RIGHT ---------- */

    .footer-row{
        display:flex;
        flex-direction:column;
        align-items:stretch;
    }

    .footer-row nav{
        width:100%;
        display:flex;
        justify-content:flex-end !important;
        text-align:right !important;
        flex-wrap:wrap;
        gap:12px;
    }

    .footer-bottom{
        text-align:right;
    }
}

/* ===== FLEXIBLE HEADER SEARCH / NEVER CROP BRAND ===== */
.brand,
.brand-text{
    flex-shrink:0 !important;
    max-width:none !important;
    overflow:visible !important;
    text-overflow:clip !important;
    white-space:nowrap !important;
}

.header-search{
    flex:1 1 440px !important;
    width:auto !important;
    min-width:120px !important;
    max-width:440px !important;
}

.main-nav{
    flex-shrink:0;
}

@media(max-width:700px){
    .brand{
        max-width:none !important;
        flex:0 0 auto !important;
    }

    .brand-text{
        max-width:none !important;
    }

    .header-search{
        flex:1 1 auto !important;
        min-width:0 !important;
        max-width:none !important;
        width:auto !important;
    }
}


/* ===== GALLERY LAZY LOAD SPINNER ===== */
.gallery-loading-spinner{
    width:100%;
    min-height:90px;
    display:flex;
    align-items:center;
    justify-content:center;
}

.gallery-loading-spinner span{
    width:42px;
    height:42px;
    border:4px solid rgba(255,255,255,.18);
    border-top-color:var(--accent);
    border-radius:50%;
    animation:gallerySpinner .7s linear infinite;
}

@keyframes gallerySpinner{
    to{transform:rotate(360deg)}
}

/* ===== BIG BLACK / WHITE LOADING SPINNER ===== */
.gallery-loading-spinner{
    width:100% !important;
    min-height:180px !important;
    margin:25px 0 !important;
    background:#000 !important;
    border-radius:12px !important;
    align-items:center !important;
    justify-content:center !important;
}

.gallery-loading-spinner span{
    width:72px !important;
    height:72px !important;
    border:7px solid rgba(255,255,255,.22) !important;
    border-top-color:#fff !important;
    border-right-color:#fff !important;
    border-radius:50% !important;
    animation:gallerySpinner .65s linear infinite !important;
}


/* ===== FINAL CATEGORIES MASONRY ===== */

#categoryGrid.category-masonry{
    display:block !important;
    grid-template-columns:none !important;
    gap:0 !important;
    columns:3 !important;
    column-gap:24px !important;
    column-fill:balance !important;
    width:100% !important;
}

#categoryGrid.category-masonry > .category-photo-card{
    display:inline-block !important;
    width:100% !important;
    height:auto !important;
    margin:0 0 24px 0 !important;
    break-inside:avoid !important;
    -webkit-column-break-inside:avoid !important;
    page-break-inside:avoid !important;
    vertical-align:top !important;
}

#categoryGrid.category-masonry > .category-photo-card img{
    display:block !important;
    width:100% !important;
    height:auto !important;
    max-height:none !important;
    aspect-ratio:auto !important;
    object-fit:contain !important;
}

@media(max-width:900px){
    #categoryGrid.category-masonry{
        columns:2 !important;
        column-gap:14px !important;
    }

    #categoryGrid.category-masonry > .category-photo-card{
        margin-bottom:14px !important;
    }
}

@media(max-width:520px){
    #categoryGrid.category-masonry{
        columns:2 !important;
        column-gap:10px !important;
    }

    #categoryGrid.category-masonry > .category-photo-card{
        margin-bottom:10px !important;
    }
}

/* ===== MOBILE: PREVENT HORIZONTAL SCROLL ===== */
html,
body{
    width:100%;
    max-width:100%;
    overflow-x:hidden;
}

@media(max-width:700px){
    .site-header,
    main,
    .shell,
    .gallery-shell,
    .site-footer{
        max-width:100% !important;
        overflow-x:hidden !important;
    }

    img,
    video,
    iframe,
    canvas,
    svg{
        max-width:100% !important;
    }
}

/* ===== FIX MOBILE MENU AFTER HORIZONTAL SCROLL LOCK ===== */
@media(max-width:700px){

    .site-header,
    .header-row{
        overflow:visible !important;
    }

    .mobile-site-menu{
        overflow-y:auto !important;
        overflow-x:hidden !important;
        max-height:calc(100vh - 90px) !important;
    }
}

