/* =================================================
        Section 1: Global Reset & Base Styles
================================================= */

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

html {
    width: 100%;
    /* clip (not hidden): still kills horizontal scroll gaps, but does not
       force overflow-y to auto — that combination was breaking position:sticky */
    overflow-x: clip;
}

body {
    width: 100%;
    font-family: "Courier New", Courier, monospace;
    color: #333333;
    background-color: #f9f9f9;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* Do NOT lock height:100% — that + flex made main a scroll strip with a stuck footer */
    height: auto;
    overflow-x: clip;
    overflow-y: visible;
}

/* =================================================
        Section 2: Multi-Tiered Header Styles
================================================= */

.site-header {
    width: 100%;
    position: static;
    flex: 0 0 auto;
}

/* Gives every header row a crisp 1px white bottom border with zero extra gap */
.header-row {
    border: none;
    border-bottom: 1px solid #ffffff;
    width: 100%;
    margin-bottom: 0;
}

/* 1. Green Row */
.green-row {
    background-color: #99cc66;
    padding: 0.8rem 0;
    color: #ffffff;
}

.header-nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.nav-left a, .nav-left span {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.nav-left .divider {
    margin: 0 0.8rem;
}

.nav-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    line-height: 0;
    min-width: 2.25rem;
    min-height: 2.25rem;
}

.nav-home:hover,
.nav-home:focus {
    opacity: 0.9;
}

.nav-home-icon {
    display: block;
}

.nav-sep {
    margin: 0 0.55rem;
    opacity: 0.75;
}

.nav-section {
    opacity: 0.95;
}

/* Sticky green tab strip: back + category filters, hung 1px under blue bar.
   Pins to the viewport top once the chrome header scrolls away (top: 0).
   If .site-header later becomes sticky, raise --header-sticky-offset. */
:root {
    --header-sticky-offset: 0px;
    --header-tab-green: #99cc66;
    --header-tab-orange: #fbb03b; /* .orange-stripe */
    --header-tab-active: #e67e22;
    /* Match .dynamic-content-wrapper / list content column */
    --header-tabs-content-max: 1100px;
    --header-tabs-content-pad: 20px;
    /* Decorative ears only — not part of any button */
    --header-tab-cap-w: 1.1rem;
}

.header-tabs {
    position: sticky;
    top: var(--header-sticky-offset, 0px);
    z-index: 200;
    margin-top: 1px; /* hang just under .blue-row / its 1px white edge */
    padding: 0;
    width: 100%;
    flex: 0 0 auto;
    align-self: stretch;
    background: transparent; /* no white bar — page/.site-main bg shows through */
    pointer-events: none; /* only the hanging pill receives clicks */
}

/* Same horizontal column as floating list content (.dynamic-content-wrapper) */
.header-tabs__align {
    pointer-events: none;
    width: 100%;
    max-width: var(--header-tabs-content-max);
    margin: 0 auto;
    padding: 0 var(--header-tabs-content-pad);
    box-sizing: border-box;
    background: transparent;
}

/*
 * Desktop/tablet: cap | buttons | cap — 1px gaps show page bg between chips.
 * Mobile: two rows (see @media block); no caps on phone.
 */
.header-tabs__chip-scroller {
    display: contents;
}

.header-tabs__scroll-btn {
    display: none;
}

.header-tabs__sticky-wrap {
    pointer-events: auto;
}

.header-tabs__desk-only {
    display: contents;
}

.header-tabs__inner {
    pointer-events: auto;
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 1px;
    margin: 0;
    width: max-content;
    max-width: 100%;
    box-sizing: border-box;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.16));
    overflow: visible;
}

/* Unlabeled green flourishes — slant lives ONLY here */
.header-tabs__cap {
    flex: 0 0 var(--header-tab-cap-w);
    width: var(--header-tab-cap-w);
    align-self: stretch;
    background-color: var(--header-tab-green);
    pointer-events: none;
    border: none;
    border-radius: 0;
}

/* Tablet/desktop: lower outer corners rounded only */
@media (min-width: 769px) {
    .header-tabs__cap--ear {
        clip-path: none;
        border-radius: 0;
    }

    .header-tabs__cap--start.header-tabs__cap--ear {
        border-bottom-left-radius: 8px;
    }

    .header-tabs__cap--end.header-tabs__cap--ear {
        border-bottom-right-radius: 8px;
    }
}

.header-tabs__buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    flex: 0 0 auto;
    width: max-content;
    max-width: 100%;
    gap: 1px;
    min-width: 0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background: transparent;
    border-radius: 0;
    clip-path: none;
    transform: none;
}

.header-tabs .content-back {
    display: flex;
    flex: 0 0 auto;
    align-items: stretch;
    gap: 1px;
    margin: 0;
    padding: 0;
    background: transparent;
    clip-path: none;
    transform: none;
}

/* Desktop: chips flow with home/back inside .header-tabs__buttons */
.header-tabs__filters {
    display: contents;
}

@media (min-width: 769px) {
    .header-tabs__chip-scroller {
        display: contents;
    }
}

/* Every chip is a true axis-aligned rectangle — no slant/skew/clip */
.header-tabs__tab,
.header-tabs .content-back__link,
.header-tabs .nav-btn,
.header-tabs .sub-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 1 auto;
    margin: 0;
    padding: 0.5rem 1.05rem;
    background-color: var(--header-tab-green);
    color: #ffffff;
    font-family: "Courier New", Courier, monospace;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    line-height: 1.2;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    border: none;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    transform: none;
    clip-path: none;
    transition: background-color 0.15s ease, opacity 0.15s ease;
    box-sizing: border-box;
    max-width: 100%;
}

.header-tabs .content-back__link {
    font-size: 1.15rem;
    min-width: 2.4rem;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
}

.header-tabs__home {
    min-width: 2.4rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.header-tabs__home-icon {
    display: block;
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
}

/* Logged-in CMS admin marker (next to home/back); star → CMS, menu → Log out */
.header-tabs__admin-wrap {
    position: relative;
    display: inline-flex;
    align-items: stretch;
    flex: 0 0 auto;
}

.header-tabs__admin-cluster {
    display: inline-flex;
    align-items: stretch;
    gap: 1px;
    flex: 0 0 auto;
}

.header-tabs__admin,
.header-tabs__admin-menuhit {
    min-width: 2.4rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    background-color: var(--header-tab-active);
    opacity: 0.92;
    color: #ffffff;
    text-decoration: none;
}

.header-tabs__admin {
    cursor: pointer;
    user-select: none;
}

.header-tabs__admin-menuhit {
    min-width: 1.65rem;
    padding-left: 0.35rem;
    padding-right: 0.45rem;
    cursor: pointer;
    user-select: none;
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    font-size: 0.75rem;
    line-height: 1;
    border: none;
}

.header-tabs__admin:hover,
.header-tabs__admin:focus,
.header-tabs__admin-menuhit:hover,
.header-tabs__admin-menuhit:focus {
    background-color: var(--header-tab-orange);
    color: #ffffff;
    text-decoration: none;
    opacity: 1;
}

.header-tabs__admin-icon {
    display: block;
    width: 0.9rem;
    height: 0.9rem;
    flex: 0 0 auto;
}

.header-tabs__admin-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 40;
    flex-direction: column;
    min-width: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.header-tabs__admin-item {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0.45rem 0.75rem;
    background-color: var(--header-tab-orange);
    color: #ffffff !important;
    font-family: "Courier New", Courier, monospace;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-decoration: none !important;
    white-space: nowrap;
    border: none;
    border-radius: 0;
    box-sizing: border-box;
}

.header-tabs__admin-item:visited,
.header-tabs__admin-item:hover,
.header-tabs__admin-item:focus,
.header-tabs__admin-item:active {
    color: #ffffff !important;
    text-decoration: none !important;
}

.header-tabs__admin-item + .header-tabs__admin-item {
    border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.header-tabs__admin-wrap.is-open .header-tabs__admin-menu,
.header-tabs__admin-wrap:focus-within .header-tabs__admin-menu {
    display: flex;
}

@media (hover: hover) and (pointer: fine) {
    .header-tabs__admin-wrap:hover .header-tabs__admin-menu {
        display: flex;
    }
}

.header-tabs__admin-item:hover,
.header-tabs__admin-item:focus {
    background-color: var(--header-tab-active);
    color: #ffffff;
    text-decoration: none;
}

.header-tabs__tab:hover,
.header-tabs__tab:focus,
.header-tabs .content-back__link:hover,
.header-tabs .content-back__link:focus,
.header-tabs .nav-btn:hover,
.header-tabs .sub-filter-btn:hover {
    background-color: var(--header-tab-orange);
    color: #ffffff;
    text-decoration: none;
    opacity: 1;
    transform: none;
    clip-path: none;
}

.header-tabs .nav-btn.is-active,
.header-tabs .sub-filter-btn.is-active,
.header-tabs__tab.is-active {
    background-color: var(--header-tab-active);
    color: #ffffff;
    clip-path: none;
    transform: none;
    border-radius: 0;
}

@media (max-width: 768px) {
    .header-tabs:not(.header-tabs--has-filters) {
        display: none;
    }

    .header-tabs--has-filters {
        position: sticky;
        top: var(--header-sticky-offset, 0px);
        z-index: 200;
        pointer-events: none;
    }

    .header-tabs__align {
        padding: 0;
        max-width: none;
        pointer-events: none;
    }

    .header-tabs__sticky-wrap {
        width: 100%;
        pointer-events: auto;
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.16));
    }

    .header-tabs__sticky-wrap .header-tabs__inner {
        width: 100%;
        max-width: 100%;
        filter: none;
        gap: 0;
    }

    .header-tabs__cap--ear,
    .header-tabs__desk-only {
        display: none !important;
    }

    .header-tabs__buttons {
        width: 100%;
        max-width: 100%;
        flex-wrap: nowrap;
        gap: 0;
    }

    .header-tabs__chip-scroller {
        display: flex;
        align-items: stretch;
        width: 100%;
        gap: 0;
        background: transparent;
        border-left: 1px solid #ffffff;
        border-right: 1px solid #ffffff;
        border-bottom: 1px solid #ffffff;
        box-sizing: border-box;
    }

    .header-tabs__scroll-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        min-width: 3rem;
        min-height: 3rem;
        padding: 0 0.5rem;
        border: none;
        border-right: 1px solid #ffffff;
        box-sizing: border-box;
        background-color: var(--header-tab-green);
        color: #ffffff;
        font-family: "Courier New", Courier, monospace;
        font-size: 1.15rem;
        line-height: 1;
        cursor: pointer;
        appearance: none;
        -webkit-appearance: none;
    }

    .header-tabs__scroll-btn[hidden] {
        display: none !important;
    }

    .header-tabs__filters {
        display: flex;
        flex: 1 1 auto;
        flex-wrap: nowrap;
        align-items: stretch;
        gap: 0;
        min-width: 0;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        background-color: var(--header-tab-green);
        box-sizing: border-box;
    }

    .header-tabs__chip-scroller.is-fits {
        justify-content: center;
    }

    .header-tabs__chip-scroller.is-fits .header-tabs__filters {
        flex: 0 0 auto;
        width: max-content;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        justify-content: center;
        overflow-x: visible;
    }

    .header-tabs__chip-scroller:not(.is-fits) .header-tabs__filters {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
        max-width: none;
        margin: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .header-tabs__filters::-webkit-scrollbar {
        display: none;
        height: 0;
    }

    .header-tabs__chip-scroller .nav-btn,
    .header-tabs__chip-scroller .sub-filter-btn {
        flex: 0 0 auto;
        font-size: 0.9rem;
        min-width: 3rem;
        min-height: 3rem;
        padding: 0.65rem 1rem;
        white-space: nowrap;
        border-right: 1px solid #ffffff;
        box-sizing: border-box;
    }

    .header-tabs__scroll-btn--next {
        border-right: none;
    }
}

/* Feed wall (?pageid=feed) — phone / iPad gutters */
.feed-wall {
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    padding: 1.25rem 1.25rem 4rem;
}

.feed-wall .feed-composer,
.feed-wall .feed-card {
    box-sizing: border-box;
    max-width: 100%;
}

.feed-load-more-btn {
    background: var(--header-tab-green);
    color: #fff;
    border: none;
    padding: 10px 20px;
    font-family: "Courier New", Courier, monospace;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.feed-load-more-btn:hover,
.feed-load-more-btn:focus {
    background: var(--header-tab-orange);
    color: #fff;
}

.feed-load-more-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

.feed-load-sentinel {
    display: block;
    width: 1px;
    height: 1px;
    margin: 0 auto;
}

.feed-wall input[type="text"],
.feed-wall input[type="date"],
.feed-wall input[type="file"],
.feed-wall textarea {
    max-width: 100%;
}

@media (max-width: 768px) {
    .feed-wall {
        padding: 0.85rem 0.85rem 3.5rem;
    }

    .feed-wall .feed-composer {
        padding: 14px 14px !important;
    }

    .feed-wall .feed-card {
        padding: 14px 14px !important;
    }

    .feed-wall .feed-card h2 {
        font-size: 1.05rem !important;
        word-break: break-word;
    }
}

/* Guest sign-in — house = home only; ▾ opens login (hover desktop / tap mobile) */
.header-tabs__home-wrap {
    display: inline-flex;
    align-items: stretch;
    gap: 1px;
    flex: 0 0 auto;
}

.header-tabs__home-login {
    position: relative;
    display: inline-flex;
    align-items: stretch;
    flex: 0 0 auto;
}

.header-tabs__home-menuhit {
    min-width: 1.65rem;
    padding-left: 0.35rem;
    padding-right: 0.45rem;
    cursor: pointer;
    user-select: none;
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    font-size: 0.75rem;
    line-height: 1;
    border: none;
    color: #ffffff;
    touch-action: manipulation;
}

@media (max-width: 768px) {
    .header-tabs__home-menuhit {
        min-width: 2.1rem;
        padding-left: 0.5rem;
        padding-right: 0.55rem;
        font-size: 0.85rem;
    }
}

.header-tabs__home-login-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 45;
    width:  min(280px, calc(100vw - 2rem));
    margin: 0;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.98);
    border-left: 4px solid #fbb03b;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
    box-sizing: border-box;
    text-align: left;
}

.header-tabs__home-login.is-open .header-tabs__home-login-menu,
.header-tabs__home-login:focus-within .header-tabs__home-login-menu {
    display: block;
}

@media (hover: hover) and (pointer: fine) {
    .header-tabs__home-login:hover .header-tabs__home-login-menu {
        display: block;
    }
}

.header-tabs__home-login-error {
    color: #c0392b;
    font-size: 0.8rem;
    margin: 0 0 8px;
    font-family: "Courier New", Courier, monospace;
}

.header-tabs__home-login-label {
    display: block;
    font-size: 0.72rem;
    color: #555;
    margin-bottom: 3px;
}

.header-tabs__home-login-input {
    width: 100%;
    padding: 7px 8px;
    box-sizing: border-box;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.header-tabs__home-login-submit {
    background: #e67e22;
    color: #fff;
    border: none;
    padding: 7px 12px;
    font-weight: bold;
    cursor: pointer;
    font-family: "Courier New", Courier, monospace;
    font-size: 0.85rem;
}

/* 2 & 4. Thin Orange Strips */
.orange-stripe {
    background-color: #fbb03b;
    height: 11px;
}

/* 3. Hero Image Row */
.hero-row {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 380px;
    display: flex;
    align-items: flex-end;
}

/* Darkens image slightly so white text pops clearly */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.22);
    z-index: 1;
}

.hero-content-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 5rem 1.5rem 2rem 1.5rem;
    color: #ffffff;
}

.hero-text h1 {
    font-size: 2.8rem;
    font-weight: normal;
    margin-bottom: 0.2rem;
    letter-spacing: 0.5px;
}

.hero-text p {
    font-size: 1.05rem;
    opacity: 0.95;
}

.hero-socials {
    display: flex;
    gap: 1rem;
}

.hero-socials a {
    color: #ffffff;
    transition: opacity 0.2s ease;
}

.hero-socials a:hover {
    opacity: 0.7;
}

/* 5. Blue Row */
.blue-row {
    background-color: #94b2b5;
    height: 13px;
}

/* =================================================
        Section 3: Main Content Area
================================================= */

.site-main {
    flex: 1 0 auto;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    background-color: #333333 !important;
    /* Never set overflow-x here: it forces overflow-y:auto and traps scroll between header/footer */
    overflow: visible;
}

.site-main-inner {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    /* Extra bottom pad so floating grid cards / shadows clear the footer */
    padding: 2rem 1.5rem 7rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 15px; /* Locked to 15px to match the internal grid gap perfectly */
    box-sizing: border-box;
}

/* =================================================
        Section 4: Multi-Tiered Footer Styles
================================================= */

.site-footer {
    width: 100%;
    max-width: 100%;
    margin-top: 0;
    position: static; /* never sticky/fixed — page scrolls as one document */
    flex: 0 0 auto;
    overflow: visible;
    box-sizing: border-box;
}

.footer-row {
    border: none;
    border-bottom: 1px solid #ffffff;
    width: 100%;
    max-width: 100%;
    margin-bottom: 0;
    box-sizing: border-box;
}
.site-footer .blue-row {
    background-color: #94b2b5;
    height: 14px;
}

.site-footer .orange-stripe {
    background-color: #fbb03b;
    height: 8px;
}

.site-footer .green-row {
    background-color: #99cc66;
    padding: 2.5rem 0;
    color: #ffffff;
    position: relative;
}

.footer-inner,
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2.5rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    column-gap: 2.5rem;
    row-gap: 0.35rem;
    flex-wrap: wrap;
}

.footer-content p {
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-align: right;
}

.footer-copy {
    margin-left: auto;
}

.page-view-count {
    margin-right: 1.5rem;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    opacity: 0.55;
    text-align: left;
    flex: 0 0 auto;
}

/* =================================================
        Section 5: Responsive Layout Adjustments
================================================= */

@media (max-width: 768px) {
    .hero-content-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        padding-bottom: 1.5rem;
    }
    
    .hero-text h1 {
        font-size: 2.1rem;
    }

    .hero-text p {
        font-size: 0.95rem;
    }

    .hero-row {
        min-height: 300px;
    }
}

/* =================================================================
   Section 6: Template 1 - Custom 5-Block Asymmetric Mosaic Layout
   ================================================================= */

.cody-mosaic-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 270px;
    gap: 15px;
    width: 100%;
}

.cody-mosaic-grid .mosaic-tile {
    position: relative;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cody-mosaic-grid .mosaic-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.cody-mosaic-grid .mosaic-tile.image-panel {
    color: #ffffff;
    align-items: flex-end;
}

.cody-mosaic-grid .mosaic-tile.image-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 30%, rgba(0,0,0,0.75) 100%);
}

.cody-mosaic-grid .mosaic-tile.text-panel {
    background: #ffffff;
    color: #2c2c2c;
    align-items: flex-start;
}

.cody-mosaic-grid .mosaic-content {
    position: relative;
    z-index: 2;
    padding: 30px;
    width: 100%;
}

.cody-mosaic-grid .mosaic-content h2,
.cody-mosaic-grid-reversed .mosaic-content h2,
.cody-mosaic-grid-banner .mosaic-content h2 {
    margin: 0 0 10px 0;
    font-size: 1.7rem;
    line-height: 1.15;
    font-family: inherit;
}

.cody-mosaic-grid .mosaic-content p,
.cody-mosaic-grid-reversed .mosaic-content p,
.cody-mosaic-grid-banner .mosaic-content p {
    margin: 0;
    font-size: 1.0rem;
    opacity: 0.9;
}

.cody-mosaic-grid .mosaic-tile.tile-1 {
    grid-column: 1 / 3; 
    grid-row: 1 / 3;    
}

.cody-mosaic-grid .mosaic-tile.tile-2 {
    grid-column: 3;
    grid-row: 1;
}

.cody-mosaic-grid .mosaic-tile.tile-3 {
    grid-column: 4;
    grid-row: 1;
}

.cody-mosaic-grid .mosaic-tile.tile-4 {
    grid-column: 3;
    grid-row: 2;
}

.cody-mosaic-grid .mosaic-tile.tile-5 {
    grid-column: 4;
    grid-row: 2;
}

@media (max-width: 1024px) and (min-width: 769px) {
    .cody-mosaic-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: auto;
    }
    .cody-mosaic-grid .mosaic-tile {
        grid-column: auto !important;
        grid-row: auto !important;
        min-height: 270px;
    }
    .cody-mosaic-grid .mosaic-tile.tile-1 {
        grid-column: span 2 !important;
        min-height: 340px;
    }
}

@media (max-width: 768px) {
    .cody-mosaic-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }
    .cody-mosaic-grid .mosaic-tile {
        grid-column: 1 / -1 !important;
        grid-row: auto !important;
        min-height: 260px;
    }
}

/* =================================================================
   Section 7: Template 2 - Reversed Custom 5-Block Asymmetric Mosaic Layout
   ================================================================= */

.cody-mosaic-grid-reversed {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 270px;
    gap: 15px;
    width: 100%;
}

.cody-mosaic-grid-reversed .mosaic-tile {
    position: relative;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cody-mosaic-grid-reversed .mosaic-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.cody-mosaic-grid-reversed .mosaic-tile.image-panel {
    color: #ffffff;
    align-items: flex-end;
}

.cody-mosaic-grid-reversed .mosaic-tile.image-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 30%, rgba(0,0,0,0.75) 100%);
}

.cody-mosaic-grid-reversed .mosaic-tile.text-panel {
    background: #ffffff;
    color: #2c2c2c;
    align-items: flex-start;
}

.cody-mosaic-grid-reversed .mosaic-content {
    position: relative;
    z-index: 2;
    padding: 30px;
    width: 100%;
}

.cody-mosaic-grid-reversed .mosaic-tile.tile-2 {
    grid-column: 1;
    grid-row: 1;
}

.cody-mosaic-grid-reversed .mosaic-tile.tile-3 {
    grid-column: 2;
    grid-row: 1;
}

.cody-mosaic-grid-reversed .mosaic-tile.tile-4 {
    grid-column: 1;
    grid-row: 2;
}

.cody-mosaic-grid-reversed .mosaic-tile.tile-5 {
    grid-column: 2;
    grid-row: 2;
}

.cody-mosaic-grid-reversed .mosaic-tile.tile-1 {
    grid-column: 3 / 5;
    grid-row: 1 / 3;
}

@media (max-width: 1024px) and (min-width: 769px) {
    .cody-mosaic-grid-reversed {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: auto;
    }
    .cody-mosaic-grid-reversed .mosaic-tile {
        grid-column: auto !important;
        grid-row: auto !important;
        min-height: 270px;
    }
    .cody-mosaic-grid-reversed .mosaic-tile.tile-1 {
        grid-column: span 2 !important;
        min-height: 340px;
    }
}

@media (max-width: 768px) {
    .cody-mosaic-grid-reversed {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }
    .cody-mosaic-grid-reversed .mosaic-tile {
        grid-column: 1 / -1 !important;
        grid-row: auto !important;
        min-height: 260px;
    }
}

/* =================================================================
   Section 8: Template 3 - Custom 6-Block Mosaic Layout (2 Large, 4 Small)
   ================================================================= */

.cody-mosaic-grid-banner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 330px;
    gap: 15px;
    width: 100%;
}

.cody-mosaic-grid-banner .mosaic-tile {
    position: relative;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cody-mosaic-grid-banner .mosaic-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.cody-mosaic-grid-banner .mosaic-tile.image-panel {
    color: #ffffff;
    align-items: flex-end;
}

.cody-mosaic-grid-banner .mosaic-tile.image-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 30%, rgba(0,0,0,0.75) 100%);
}

.cody-mosaic-grid-banner .mosaic-tile.text-panel {
    background: #ffffff;
    color: #2c2c2c;
    align-items: flex-start;
}

.cody-mosaic-grid-banner .mosaic-content {
    position: relative;
    z-index: 2;
    padding: 30px;
    width: 100%;
}

.cody-mosaic-grid-banner .mosaic-tile.tile-1 {
    grid-column: 1 / 3; 
    grid-row: 1;    
}

.cody-mosaic-grid-banner .mosaic-tile.tile-2 {
    grid-column: 3;     
    grid-row: 1;
}

.cody-mosaic-grid-banner .mosaic-tile.tile-3 {
    grid-column: 4;     
    grid-row: 1;
}

.cody-mosaic-grid-banner .mosaic-tile.tile-4 {
    grid-column: 1;     
    grid-row: 2;
}

.cody-mosaic-grid-banner .mosaic-tile.tile-5 {
    grid-column: 2;     
    grid-row: 2;
}

.cody-mosaic-grid-banner .mosaic-tile.tile-6 {
    grid-column: 3 / 5; 
    grid-row: 2;        
}

@media (max-width: 1024px) and (min-width: 769px) {
    .cody-mosaic-grid-banner {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: auto;
    }
    .cody-mosaic-grid-banner .mosaic-tile {
        grid-column: auto !important;
        grid-row: auto !important;
        min-height: 270px;
    }
    .cody-mosaic-grid-banner .mosaic-tile.tile-1,
    .cody-mosaic-grid-banner .mosaic-tile.tile-6 {
        grid-column: span 2 !important;
        min-height: 320px;
    }
}

@media (max-width: 768px) {
    .cody-mosaic-grid-banner {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }
    .cody-mosaic-grid-banner .mosaic-tile {
        grid-column: 1 / -1 !important;
        grid-row: auto !important;
        min-height: 260px;
    }
}

/* =================================================
        Reusable Navigation Buttons Component
================================================= */

.nav-buttons-container,
.sub-nav-custom-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.65rem 0.75rem;
    margin: 2rem 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    /* Soft horizontal scroll if a long label still won't wrap */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

/* Legacy: chips used to sit under listing intros; filters now live in .header-tabs */
.cody-text-block + .nav-buttons-container,
.cody-text-block + .sub-nav-custom-container {
    margin-top: 0.35rem;
}

.nav-btn,
.sub-filter-btn {
    background-color: #94b2b5;
    color: #ffffff;
    font-family: "Courier New", Courier, monospace;
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid #ffffff;
    border-radius: 4px;
    text-decoration: none;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s ease, transform 0.2s ease;
    flex: 0 1 auto;
    max-width: 100%;
    white-space: normal;
    text-align: center;
    box-sizing: border-box;
}

.nav-btn:hover,
.sub-filter-btn:hover {
    background-color: #7d9a9d;
    transform: translateY(-2px);
}

.nav-btn.is-active,
.sub-filter-btn.is-active {
    background-color: #e67e22;
}

@media (max-width: 768px) {
    .nav-buttons-container,
    .sub-nav-custom-container {
        justify-content: flex-start;
        gap: 0.5rem;
        padding-bottom: 4px;
    }

    .nav-btn,
    .sub-filter-btn {
        font-size: 0.85rem;
        padding: 0.55rem 0.9rem;
        letter-spacing: 0.3px;
    }
}

/* =================================================================
   Section: Template - Center Feature Mosaic Layout (Big Feature Middle)
   ================================================================= */

.cody-mosaic-grid-center {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 270px;
    gap: 15px;
    width: 100%;
}

.cody-mosaic-grid-center .mosaic-tile {
    position: relative;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cody-mosaic-grid-center .mosaic-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.cody-mosaic-grid-center .mosaic-tile.image-panel {
    color: #ffffff;
    align-items: flex-end;
}

.cody-mosaic-grid-center .mosaic-tile.image-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 30%, rgba(0,0,0,0.75) 100%);
}

.cody-mosaic-grid-center .mosaic-tile.text-panel {
    background: #ffffff;
    color: #2c2c2c;
    align-items: flex-start;
}

.cody-mosaic-grid-center .mosaic-content {
    position: relative;
    z-index: 2;
    padding: 30px;
    width: 100%;
}

.cody-mosaic-grid-center .mosaic-tile.tile-1 {
    grid-column: 1;
    grid-row: 1;
}

.cody-mosaic-grid-center .mosaic-tile.tile-2 {
    grid-column: 1;
    grid-row: 2;
}

.cody-mosaic-grid-center .mosaic-tile.tile-3 {
    grid-column: 2 / 4;
    grid-row: 1 / 3;
}

.cody-mosaic-grid-center .mosaic-tile.tile-4 {
    grid-column: 4;
    grid-row: 1;
}

.cody-mosaic-grid-center .mosaic-tile.tile-5 {
    grid-column: 4;
    grid-row: 2;
}

@media (max-width: 1024px) and (min-width: 769px) {
    .cody-mosaic-grid-center {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: auto;
    }
    .cody-mosaic-grid-center .mosaic-tile {
        grid-column: auto !important;
        grid-row: auto !important;
        min-height: 270px;
    }
    .cody-mosaic-grid-center .mosaic-tile.tile-3 {
        grid-column: span 2 !important;
        min-height: 340px;
    }
}

@media (max-width: 768px) {
    .cody-mosaic-grid-center {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }
    .cody-mosaic-grid-center .mosaic-tile {
        grid-column: 1 / -1 !important;
        grid-row: auto !important;
        min-height: 260px;
    }
}

 /* =================================================================
   Section: Template - Two Big Features Side-by-Side (4 Tiles Total)
   ================================================================= */

.cody-mosaic-grid-double {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 330px;
    gap: 15px;
    width: 100%;
}

.cody-mosaic-grid-double .mosaic-tile {
    position: relative;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cody-mosaic-grid-double .mosaic-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.cody-mosaic-grid-double .mosaic-tile.image-panel {
    color: #ffffff;
    align-items: flex-end;
}

.cody-mosaic-grid-double .mosaic-tile.image-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 30%, rgba(0,0,0,0.75) 100%);
}

.cody-mosaic-grid-double .mosaic-tile.text-panel {
    background: #ffffff;
    color: #2c2c2c;
    align-items: flex-start;
}

.cody-mosaic-grid-double .mosaic-content {
    position: relative;
    z-index: 2;
    padding: 30px;
    width: 100%;
}

.cody-mosaic-grid-double .mosaic-tile.tile-1 {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
}

.cody-mosaic-grid-double .mosaic-tile.tile-2 {
    grid-column: 3 / 5;
    grid-row: 1 / 3;
}

@media (max-width: 1024px) and (min-width: 769px) {
    .cody-mosaic-grid-double {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: auto;
    }
    .cody-mosaic-grid-double .mosaic-tile {
        grid-column: span 2 !important;
        grid-row: auto !important;
        min-height: 320px;
    }
}

@media (max-width: 768px) {
    .cody-mosaic-grid-double {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }
    .cody-mosaic-grid-double .mosaic-tile {
        grid-column: 1 / -1 !important;
        grid-row: auto !important;
        min-height: 260px;
    }
}

/* =================================================================
   Section: Template - Uniform 8-Block Grid (No Big Features)
   ================================================================= */

.cody-mosaic-grid-uniform-8 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 200px;
    gap: 15px;
    width: 100%;
}

.cody-mosaic-grid-uniform-8 .mosaic-tile {
    position: relative;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cody-mosaic-grid-uniform-8 .mosaic-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.cody-mosaic-grid-uniform-8 .mosaic-tile.image-panel {
    color: #ffffff;
    align-items: flex-end;
}

.cody-mosaic-grid-uniform-8 .mosaic-tile.image-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 30%, rgba(0,0,0,0.75) 100%);
}

.cody-mosaic-grid-uniform-8 .mosaic-tile.text-panel {
    background: #ffffff;
    color: #2c2c2c;
    align-items: flex-start;
}

.cody-mosaic-grid-uniform-8 .mosaic-content {
    position: relative;
    z-index: 2;
    padding: 20px;
    width: 100%;
}

.cody-mosaic-grid-uniform-8 .mosaic-content h2 {
    font-size: 1.3rem;
    margin: 0 0 5px 0;
}

.cody-mosaic-grid-uniform-8 .mosaic-content p {
    font-size: 0.9rem;
}

.cody-mosaic-grid-uniform-8 .mosaic-tile {
    grid-column: auto;
    grid-row: auto;
}

@media (max-width: 1024px) {
    .cody-mosaic-grid-uniform-8 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .cody-mosaic-grid-uniform-8 {
        grid-template-columns: 1fr;
    }
}

/* =================================================
        Reusable Modular Text Block Component
================================================= */

.cody-text-block {
    max-width: 1400px;
    width: 100%;
    margin: 1.5rem auto;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
}

.cody-text-block-inner {
    max-width: 900px;
}

.cody-text-block-larger {
    max-width: 908px;
}

.cody-text-block h2.block-title {
    font-size: 3.2rem;
    font-weight: normal;
    color: #ffffff;
    margin: 0;
    line-height: 1;
    font-family: inherit;
}

.cody-text-block .block-subtitle {
    font-size: 0.95rem;
    color: #fbb03b;
    letter-spacing: 0.4rem;
    margin: 0.4rem 0 1.2rem 0.2rem;
    text-transform: uppercase;
    font-weight: bold;
}

.cody-text-block a,
.cody-text-block a:link,
.cody-text-block a:visited {
    color: #fbb03b;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cody-text-block a:hover,
.cody-text-block a:focus {
    color: #e67e22;
}

.cody-text-block p {
    font-size: 1.05rem;
    color: #ffffff;
    opacity: 0.9;
    line-height: 1.7;
    letter-spacing: 0.5px;
}

/* =================================================================
   Section 9: Text Card Vibrant Fades
   ================================================================= */

/* --- ORANGE FADES --- */
.mosaic-tile.text-panel.fade-orange-left-to-right {
    background: linear-gradient(90deg, rgba(251, 176, 59, 0.85) 0%, rgba(255, 255, 255, 1) 100%) !important;
}
.mosaic-tile.text-panel.fade-orange-right-to-left {
    background: linear-gradient(270deg, rgba(251, 176, 59, 0.85) 0%, rgba(255, 255, 255, 1) 100%) !important;
}
.mosaic-tile.text-panel.fade-orange-top-to-bottom,
.mosaic-tile.text-panel.fade-orange-vertical {
    background: linear-gradient(180deg, rgba(251, 176, 59, 0.85) 0%, rgba(255, 255, 255, 1) 100%) !important;
}
.mosaic-tile.text-panel.fade-orange-bottom-to-top,
.mosaic-tile.text-panel.fade-orange-bottom-up {
    background: linear-gradient(0deg, rgba(251, 176, 59, 0.85) 0%, rgba(255, 255, 255, 1) 100%) !important;
}

/* --- GREEN FADES --- */
.mosaic-tile.text-panel.fade-green-left-to-right {
    background: linear-gradient(90deg, rgba(153, 204, 102, 0.85) 0%, rgba(255, 255, 255, 1) 100%) !important;
}
.mosaic-tile.text-panel.fade-green-right-to-left {
    background: linear-gradient(270deg, rgba(153, 204, 102, 0.85) 0%, rgba(255, 255, 255, 1) 100%) !important;
}
.mosaic-tile.text-panel.fade-green-top-to-bottom,
.mosaic-tile.text-panel.fade-green-vertical {
    background: linear-gradient(180deg, rgba(153, 204, 102, 0.85) 0%, rgba(255, 255, 255, 1) 100%) !important;
}
.mosaic-tile.text-panel.fade-green-bottom-to-top,
.mosaic-tile.text-panel.fade-green-bottom-up {
    background: linear-gradient(0deg, rgba(153, 204, 102, 0.85) 0%, rgba(255, 255, 255, 1) 100%) !important;
}

/* --- BLUE FADES --- */
.mosaic-tile.text-panel.fade-blue-left-to-right {
    background: linear-gradient(90deg, rgba(148, 178, 181, 0.85) 0%, rgba(255, 255, 255, 1) 100%) !important;
}
.mosaic-tile.text-panel.fade-blue-right-to-left {
    background: linear-gradient(270deg, rgba(148, 178, 181, 0.85) 0%, rgba(255, 255, 255, 1) 100%) !important;
}
.mosaic-tile.text-panel.fade-blue-top-to-bottom,
.mosaic-tile.text-panel.fade-blue-vertical {
    background: linear-gradient(180deg, rgba(148, 178, 181, 0.85) 0%, rgba(255, 255, 255, 1) 100%) !important;
}
.mosaic-tile.text-panel.fade-blue-bottom-to-top,
.mosaic-tile.text-panel.fade-blue-bottom-up {
    background: linear-gradient(0deg, rgba(148, 178, 181, 0.85) 0%, rgba(255, 255, 255, 1) 100%) !important;
}

/* =================================================
        Section 10: Universal Gallery View Styles
================================================= */

.gallery-section {
    margin-bottom: 35px;
}

.gallery-section-header {
    padding: 10px 0;
    font-family: "Courier New", Courier, monospace;
    border-bottom: 1px solid #444;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.gallery-section-title {
    margin: 0;
    font-size: 1.25rem;
    color: #ffffff;
    font-weight: normal;
    letter-spacing: 0.05rem;
    text-transform: uppercase;
}

.gallery-back-btn {
    color: #bbb;
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    border: 1px solid #555;
    padding: 4px 10px;
    transition: all 0.3s ease;
}

.gallery-back-btn:hover {
    color: #ffffff;
    border-color: #ffffff;
    background-color: rgba(255, 255, 255, 0.05);
}

/* -------------------------------------------------
   Gallery album / folder index
   Full-page galleries (Mis Casas etc.): dark bordered rows.
   Single-post embeds: same row layout on white card (no dark panel).
   Mobile: stack name/count; never default blue.
   ------------------------------------------------- */
.gallery-album-index {
    width: 100%;
    max-width: 720px;
    box-sizing: border-box;
}

.gallery-album-index-intro {
    color: #ccc;
    font-family: "Courier New", Courier, monospace;
    font-size: 0.95rem;
    margin: 0 0 1.25rem 0;
}

.gallery-album-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 720px;
}

.gallery-album-item {
    margin: 0;
    padding: 0;
}

a.gallery-album-link,
a.gallery-album-link:link,
a.gallery-album-link:visited,
a.gallery-album-link:hover,
a.gallery-album-link:active,
a.gallery-album-link:focus {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
    padding: 14px 18px;
    border: 1px solid #555;
    border-radius: 0;
    background-color: #1a1a1a;
    color: #ffffff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.08rem;
    font-size: 0.9rem;
    font-family: "Courier New", Courier, monospace;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    -webkit-tap-highlight-color: rgba(251, 176, 59, 0.25);
}

a.gallery-album-link:hover,
a.gallery-album-link:focus {
    border-color: #fbb03b;
    background-color: #222;
    color: #ffffff;
    text-decoration: none;
}

.gallery-album-name {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    color: #fbb03b;
    line-height: 1.35;
    word-break: break-word;
}

.gallery-album-meta {
    display: block;
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    color: #999;
    font-size: 0.75rem;
    letter-spacing: 0.04rem;
    white-space: nowrap;
    line-height: 1.35;
}

.gallery-album-toolbar {
    margin-bottom: 8px;
}

/* Single-post: album rows on white page — no dark panel */
.single-post-gallery.gallery-embed .gallery-album-index {
    background: none;
    border: none;
    padding: 0;
    max-width: 100%;
}

.single-post-gallery.gallery-embed .gallery-album-index-intro {
    color: #2c3e50;
    margin: 0.75rem 0 0.85rem 0;
}

.single-post-gallery.gallery-embed .gallery-album-list {
    max-width: 100%;
}

.single-post-gallery.gallery-embed a.gallery-album-link,
.single-post-gallery.gallery-embed a.gallery-album-link:link,
.single-post-gallery.gallery-embed a.gallery-album-link:visited,
.single-post-gallery.gallery-embed a.gallery-album-link:hover,
.single-post-gallery.gallery-embed a.gallery-album-link:active,
.single-post-gallery.gallery-embed a.gallery-album-link:focus {
    background-color: transparent;
    border: 1px solid #c8c8c8;
    color: #2c3e50;
}

.single-post-gallery.gallery-embed a.gallery-album-link:hover,
.single-post-gallery.gallery-embed a.gallery-album-link:focus {
    border-color: #e67e22;
    background-color: rgba(251, 176, 59, 0.08);
    color: #2c3e50;
    text-decoration: none;
}

.single-post-gallery.gallery-embed .gallery-album-name {
    color: #e67e22;
}

.single-post-gallery.gallery-embed .gallery-album-meta {
    color: #666;
}

/* Narrow phones: stack name + count */
@media (max-width: 480px) {
    a.gallery-album-link,
    a.gallery-album-link:link,
    a.gallery-album-link:visited,
    .single-post-gallery.gallery-embed a.gallery-album-link {
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 6px;
        padding: 14px 14px;
        min-height: 52px;
    }

    .gallery-album-name,
    .single-post-gallery.gallery-embed .gallery-album-name {
        width: 100%;
        font-size: 0.85rem;
    }

    .gallery-album-meta,
    .single-post-gallery.gallery-embed .gallery-album-meta {
        font-size: 0.72rem;
    }
}

/* -------------------------------------------------
   Lazy gallery thumbs (shared dynamic gallery)
   ------------------------------------------------- */
.gallery-lazy-grid .gallery-thumb-link {
    padding: 0;
    background-color: #1a1a1a;
    background-image: none !important;
}

.gallery-lazy-grid .gallery-thumb-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    z-index: 1;
}

.gallery-lazy-grid .gallery-thumb-link .mosaic-content {
    min-height: 0;
    padding: 0;
}

.gallery-lazy-grid .gallery-thumb-link.is-gallery-deferred,
.gallery-lazy-grid .gallery-thumb-link[hidden] {
    display: none !important;
}

.gallery-section-count {
    margin: 6px 0 0 0;
    font-size: 0.75rem;
    color: #999;
    letter-spacing: 0.04rem;
    text-transform: uppercase;
}

/* Compact single-album header (drop stacked “Main album” + heavy gaps) */
.gallery-section-compact {
    margin-bottom: 0;
}

.gallery-section-header-compact {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 10px;
    padding: 0 0 8px 0;
    margin: 0 0 10px 0;
    border-bottom: 1px solid #444;
}

.gallery-section-title-inline {
    margin: 0;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    color: #ffffff;
    font-weight: normal;
}

.gallery-section-count-inline {
    margin: 0;
    font-size: 0.75rem;
    color: #999;
    letter-spacing: 0.04rem;
    text-transform: uppercase;
}

.dynamic-gallery-wrapper.is-single-album {
    gap: 8px !important;
    margin-bottom: 0 !important;
}

.dynamic-gallery-wrapper.is-hybrid-gallery {
    gap: 28px !important;
}

.dynamic-gallery-wrapper.is-hybrid-gallery .gallery-album-index-intro {
    margin-top: 0.25rem;
}

.single-post-gallery.gallery-embed {
    margin-top: 1.5rem;
}

.single-post-gallery.gallery-embed .gallery-embed-heading {
    margin: 0 0 0.35rem 0;
    padding-bottom: 0;
    border-bottom: none;
    font-size: 1.15rem;
    font-weight: normal;
    letter-spacing: 0.05rem;
    text-transform: uppercase;
    color: #2c3e50;
    font-family: "Courier New", Courier, monospace;
}

.single-post-gallery.gallery-embed .gallery-section-title-inline {
    color: #2c3e50;
}

.single-post-gallery.gallery-embed .dynamic-gallery-wrapper.is-single-album .gallery-section-header-compact {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 12px;
}

.gallery-load-more {
    margin: 16px auto 0 auto;
    display: inline-block;
    background-color: transparent;
    border: 1px solid #fbb03b;
    color: #fbb03b;
    text-transform: uppercase;
    letter-spacing: 0.15rem;
    font-size: 0.85rem;
    padding: 0.6rem 1.4rem;
    cursor: pointer;
    font-family: inherit;
}

.gallery-load-more:hover {
    background-color: #fbb03b;
    color: #111;
}

.gallery-empty-note {
    color: #ccc;
    text-align: center;
    font-family: "Courier New", Courier, monospace;
}

/* =================================================
        The 411 — naughty escalating “sure?” gag
================================================= */

.naughty-cock-intro {
    font-size: 1.55rem !important;
    line-height: 1.55 !important;
    letter-spacing: 0.35px;
}

.naughty-cock-intro-img,
.naughty-cock-intro img {
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 400px;
    height: auto;
    max-height: min(50vh, 420px);
    object-fit: contain;
    object-position: left center;
    margin: 0 0 1rem 0;
}

.naughty-cock-gag {
    margin-top: 1.75rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    max-width: 48rem;
}

.naughty-cock-gag-question {
    margin: 0;
    color: #fbb03b;
    opacity: 1;
    line-height: 1.45;
    letter-spacing: 0.4px;
    font-size: 1.15rem;
    transition: font-size 0.25s ease;
}

.naughty-cock-gag[data-step="1"] .naughty-cock-gag-question {
    font-size: 1.45rem;
}

.naughty-cock-gag[data-step="2"] .naughty-cock-gag-question {
    font-size: 1.85rem;
}

.naughty-cock-gag[data-step="3"] .naughty-cock-gag-question {
    font-size: 2.25rem;
}

.naughty-cock-gag-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    width: 100%;
}

.naughty-cock-gag-btn {
    display: inline-block;
    padding: 0.65rem 1.5rem;
    background-color: transparent;
    border: 1px solid #fbb03b;
    color: #fbb03b;
    text-transform: uppercase;
    letter-spacing: 0.15rem;
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.2s ease, padding 0.25s ease, font-size 0.25s ease, border-color 0.25s ease;
}

.naughty-cock-gag-btn-alt {
    border-color: #888;
    color: #ccc;
    text-transform: none;
    letter-spacing: 0.04rem;
    font-weight: normal;
}

.naughty-cock-gag[data-step="1"] .naughty-cock-gag-btn {
    padding: 0.8rem 1.75rem;
    font-size: 1rem;
}

.naughty-cock-gag[data-step="2"] .naughty-cock-gag-btn {
    padding: 0.95rem 2rem;
    font-size: 1.15rem;
}

.naughty-cock-gag[data-step="3"] .naughty-cock-gag-btn {
    padding: 1.1rem 2.4rem;
    font-size: 1.35rem;
    border-width: 2px;
}

.naughty-cock-gag[data-step="3"] .naughty-cock-gag-btn-alt {
    border-width: 1px;
}

.naughty-cock-gag-btn:hover,
.naughty-cock-gag-btn:focus {
    background-color: #fbb03b;
    color: #111;
    outline: none;
}

.naughty-cock-gag-btn-alt:hover,
.naughty-cock-gag-btn-alt:focus {
    background-color: #555;
    border-color: #ccc;
    color: #fff;
}

.naughty-cock-gag-btn:active {
    transform: translateY(1px);
}

.naughty-cock-gag-btn:disabled,
.naughty-cock-gag-btn-alt:disabled {
    opacity: 0.55;
    cursor: wait;
}

/* Escape interstitial — silly loading / impatient reset */
.naughty-cock-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(2px);
}

.naughty-cock-overlay[hidden] {
    display: none !important;
}

.naughty-cock-overlay-card {
    max-width: 28rem;
    width: 100%;
    padding: 2rem 1.75rem;
    background: #1a1a1a;
    border: 1px solid #fbb03b;
    text-align: center;
    box-sizing: border-box;
    animation: naughty-overlay-pop 0.35s cubic-bezier(0.22, 1.4, 0.36, 1) both;
}

.naughty-cock-overlay-spinner {
    width: 2.5rem;
    height: 2.5rem;
    margin: 0 auto 1.25rem auto;
    border: 3px solid rgba(251, 176, 59, 0.25);
    border-top-color: #fbb03b;
    border-radius: 50%;
    animation: naughty-overlay-spin 0.7s linear infinite;
}

.naughty-cock-overlay.is-reset .naughty-cock-overlay-spinner {
    border-top-color: #ff5555;
    border-color: rgba(255, 85, 85, 0.25);
    border-top-color: #ff5555;
}

.naughty-cock-overlay-msg {
    margin: 0;
    color: #fbb03b;
    font-size: 1.35rem;
    line-height: 1.4;
    letter-spacing: 0.3px;
    font-family: inherit;
}

.naughty-cock-overlay.is-reset .naughty-cock-overlay-msg {
    color: #ff7777;
    font-size: 1.45rem;
}

@keyframes naughty-overlay-spin {
    to { transform: rotate(360deg); }
}

@keyframes naughty-overlay-pop {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.naughty-cock-reveal {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto 2.5rem auto;
    padding: 0 1.5rem;
    box-sizing: border-box;
    text-align: left;
}

/* Beat .cody-text-block p (white / 1.05rem) — punchline must stand out */
.naughty-cock-reveal p.naughty-cock-punchline,
p.naughty-cock-punchline#naughty-cock-punchline {
    display: block;
    width: 100%;
    max-width: 40rem;
    margin: 0 0 1.75rem 0;
    padding: 0;
    text-align: left !important;
    color: #fbb03b !important;
    opacity: 1 !important;
    font-size: 3.4rem !important;
    line-height: 1.2 !important;
    letter-spacing: 0.3px !important;
    font-weight: normal !important;
    font-family: inherit;
}

.naughty-cock-reveal.is-revealed p.naughty-cock-punchline {
    animation: naughty-punchline-bounce 0.75s cubic-bezier(0.22, 1.4, 0.36, 1) both;
}

@keyframes naughty-punchline-bounce {
    0% {
        opacity: 0;
        transform: translateY(18px) scale(0.92);
    }
    55% {
        opacity: 1;
        transform: translateY(-6px) scale(1.04);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.naughty-cock-gallery {
    width: 100%;
}

@media (max-width: 768px) {
    .naughty-cock-intro {
        font-size: 1.3rem !important;
    }

    .naughty-cock-reveal p.naughty-cock-punchline,
    p.naughty-cock-punchline#naughty-cock-punchline {
        font-size: 2.35rem !important;
        line-height: 1.25 !important;
        max-width: 100%;
    }

    .naughty-cock-gag[data-step="2"] .naughty-cock-gag-question {
        font-size: 1.55rem;
    }

    .naughty-cock-gag[data-step="3"] .naughty-cock-gag-question {
        font-size: 1.75rem;
    }

    .naughty-cock-gag[data-step="3"] .naughty-cock-gag-btn {
        font-size: 1.15rem;
        padding: 0.95rem 1.75rem;
    }
}

/* =================================================
        Section 11: Blog Floating Style
================================================= */

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 450px), 1fr));
    gap: 40px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 20px 48px 20px;
    box-sizing: border-box;
}

.content-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 20px;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.dynamic-content-wrapper {
    width: 100%;
    max-width: 1100px;
    margin: 2rem auto 0 auto;
    padding: 0 20px 2.5rem 20px;
    box-sizing: border-box;
}

.grid-card {
    position: relative;
    background: transparent;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.card-image img {
    width: 100%;
    max-width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
}

.card-textbox {
    background: rgba(255, 255, 255, 0.96);
    margin: -70px 30px 0 30px;
    padding: 25px 20px;
    position: relative;
    text-align: center;
    border: 1px solid #dcdcdc;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 12px 0 40px 0;
    }

    .content-grid-compact {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .card-image img {
        height: 240px;
    }

    .card-textbox {
        margin: -40px 12px 0 12px;
        padding: 18px 14px;
    }

    .dynamic-content-wrapper {
        padding: 0 12px 2rem 12px;
        margin-top: 1.25rem;
    }

    .list-item-row {
        flex-wrap: wrap;
        gap: 12px;
    }
}

.card-textbox h2 {
    font-family: "Courier New", Courier, monospace;
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.card-textbox p {
    font-size: 0.95rem;
    color: #333;
    line-height: 1.5;
    margin-bottom: 20px;
}

.read-more-btn {
    display: inline-block;
    padding: 8px 22px;
    background: transparent;
    color: #2c3e50;
    border: 1px solid #2c3e50;
    text-decoration: none;
    font-family: "Courier New", Courier, monospace;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: all 0.2s ease;
}

.read-more-btn:hover {
    background: #2c3e50;
    color: #fff;
}

.sub-nav-filter {
    text-align: center;
    margin: 40px 0;
}

.sub-nav-filter a {
    display: inline-block;
    margin: 0 15px;
    text-decoration: none;
    color: #fff;
    background: #88a69a;
    padding: 10px 25px;
    border-radius: 20px;
    font-weight: bold;
    letter-spacing: 1px;
}

.sub-nav-filter a.active {
    background: #e67e22;
}

/* =================================================
        Section 12: Single Post & Gallery Styling
================================================= */

.single-post-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 30px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
    border: 1px solid #dcdcdc;
}

.back-link-wrapper {
    margin-bottom: 25px;
}

.back-btn {
    font-family: "Courier New", Courier, monospace;
    color: #2c3e50;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: bold;
    border-bottom: 1px dashed #2c3e50;
    padding-bottom: 2px;
}

.back-btn:hover {
    color: #e67e22;
    border-color: #e67e22;
}

.single-post-header h1 { 
    font-family: "Courier New", Courier, monospace;
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

/* Spotify embed from CMS video_url (playlist / album / track / episode / show) */
.single-post-spotify__frame {
    width: 100%;
    border: 1px solid #dcdcdc;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    line-height: 0;
}

.single-post-spotify__frame iframe {
    display: block;
    width: 100%;
    max-width: 100%;
    border: 0;
    border-radius: 12px;
}

.single-post-spotify__fallback {
    margin: 10px 0 0;
    font-family: "Courier New", Courier, monospace;
    font-size: 0.9rem;
}

.single-post-spotify__fallback a {
    color: #2c3e50;
    text-decoration: none;
    border-bottom: 1px dashed #2c3e50;
}

.single-post-spotify__fallback a:hover {
    color: #e67e22;
    border-color: #e67e22;
}

.single-post-body {
    font-size: 1.05rem;
    color: #333;
    line-height: 1.7;
    margin-bottom: 40px;
}

.single-post-body a {
    color: #e67e22;
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: break-word;
}

.single-post-body a:hover,
.single-post-body a:focus {
    color: #d35400;
}

.single-post-body--scrambled {
    letter-spacing: 0.02em;
    opacity: 0.92;
}

.single-post-gallery h3 {
    font-family: "Courier New", Courier, monospace;
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border: 1px solid #ddd;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: block;
    transition: transform 0.2s ease;
}

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

.task-card.private-locked {
    background: #333 !important;
    color: #888 !important;
    filter: blur(4px);
    user-select: none;
    pointer-events: none;
    opacity: 0.7;
    transform: none !important;
}

.task-card.private-locked:hover {
    transform: none !important;
    box-shadow: 2px 5px 10px rgba(0,0,0,0.2) !important;
}

.private-locked-banner {
    text-align: center;
    font-weight: bold;
    font-size: 0.9em;
    padding: 20px 0;
    color: #aaa;
}

/* =================================================================
   Section 13: Persona Bento Grid & Truth Narrative Component
   ================================================================= */

.persona-section {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    box-sizing: border-box;
    overflow-wrap: anywhere;
}

.persona-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    width: 100%;
    margin-bottom: 2rem;
}

.persona-tile {
    padding: 30px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    color: #111111;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.persona-tile h2,
.persona-tile h3,
.persona-tile h4 {
    margin: 0 0 15px 0;
    font-weight: 900;
    font-family: inherit;
    line-height: 1.15;
}

.persona-tile h2 { font-size: 2rem; }
.persona-tile h3 { font-size: 1.6rem; }
.persona-tile h4 { font-size: 1.5rem; }

.persona-tile p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    font-weight: 600;
}

.persona-tile a {
    color: inherit;
    text-decoration: none;
}

/* --- Exact Grid Placements & Colors --- */

.tile-orange {
    grid-column: 1 / 3;
    grid-row: 1;
    background-color: #ff4500;
    color: #ffffff;
}
.tile-orange h2, .tile-orange p { color: #ffffff; }

.tile-amber {
    grid-column: 1 / 2;
    grid-row: 2;
    background-color: #fbb03b;
}

.tile-lime {
    grid-column: 2 / 3;
    grid-row: 2;
    background-color: #ccff00;
}

.tile-green {
    grid-column: 3 / 4;
    grid-row: 1 / 3;
    background-color: #99cc66;
}

.tile-blue {
    grid-column: 4 / 5;
    grid-row: 1 / 3;
    background-color: #94b2b5;
}

.tile-yellow-wide {
    grid-column: 3 / 5;
    grid-row: 3;
    background-color: #ccff00;
}

/* Responsive layout adjustments for mobile/iPad */
@media (max-width: 1024px) {
    .persona-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .tile-orange { grid-column: span 2; grid-row: auto; }
    .tile-amber { grid-column: 1; grid-row: auto; }
    .tile-lime { grid-column: 2; grid-row: auto; }
    .tile-green { grid-column: span 2; grid-row: auto; }
    .tile-blue { grid-column: span 2; grid-row: auto; }
    .tile-yellow-wide { grid-column: span 2; grid-row: auto; }
}

@media (max-width: 768px) {
    .persona-grid {
        grid-template-columns: 1fr;
    }
    .persona-tile {
        grid-column: 1 / -1 !important;
        grid-row: auto !important;
    }
}

/* =================================================================
   Creature of Habit (the_411) — match narrative monospace + gold links
   ================================================================= */

.creature-habit-section {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem 1.5rem;
    box-sizing: border-box;
    overflow-wrap: anywhere;
    font-family: "Courier New", Courier, monospace;
    color: #ffffff;
}

.creature-habit-section a,
.creature-habit-section a:link,
.creature-habit-section a:visited {
    color: #fbb03b;
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: break-word;
}

.creature-habit-section a:hover,
.creature-habit-section a:focus {
    color: #e67e22;
}

.creature-habit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    width: 100%;
    max-width: 100%;
    margin: 2rem 0;
    box-sizing: border-box;
}

.ch-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 0;
}

.ch-tile {
    padding: 30px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    color: #111111;
    box-sizing: border-box;
    overflow-wrap: anywhere;
    font-family: "Courier New", Courier, monospace;
}

.ch-tile h3 {
    margin: 0 0 15px 0;
    font-size: 1.8rem;
    font-weight: normal;
    font-family: "Courier New", Courier, monospace;
    letter-spacing: 0.02em;
}

.ch-tile p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.65;
    font-weight: normal;
    font-family: "Courier New", Courier, monospace;
}

.ch-tile a,
.ch-tile a:link,
.ch-tile a:visited {
    color: #fbb03b;
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: break-word;
}

.ch-tile a:hover,
.ch-tile a:focus {
    color: #ffe0a3;
}

.tile-fridays { background-color: #b84a23; color: #ffffff; }
.tile-fridays h3,
.tile-fridays p { color: #ffffff; }

.tile-tuesdays { background-color: #7f7f7f; color: #ffffff; }
.tile-tuesdays h3,
.tile-tuesdays p { color: #ffffff; }

.tile-mornings { background-color: #3b3b3b; color: #ffffff; }
.tile-mornings h3,
.tile-mornings p { color: #ffffff; }

.tile-nov-mar { background-color: #fbb03b; color: #1a1a1a; }
.tile-nov-mar h3,
.tile-nov-mar p { color: #1a1a1a; }
.tile-nov-mar a,
.tile-nov-mar a:link,
.tile-nov-mar a:visited { color: #5c2e00; }
.tile-nov-mar a:hover,
.tile-nov-mar a:focus { color: #2c3e50; }

.tile-weekly { background-color: #3b3b3b; color: #ffffff; }
.tile-weekly h3,
.tile-weekly p { color: #ffffff; }

.tile-xmas { background-color: #b5e48c; color: #1a1a1a; }
.tile-xmas h3,
.tile-xmas p { color: #1a1a1a; }
.tile-xmas a,
.tile-xmas a:link,
.tile-xmas a:visited { color: #2c5a1e; }
.tile-xmas a:hover,
.tile-xmas a:focus { color: #1a1a1a; }

.creature-habit-section .tile-image {
    background-image: linear-gradient(0deg, rgba(0,0,0,0.1), rgba(0,0,0,0.1)), url('/assets/images/grid_time.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    min-height: 100%;
    flex: 1;
}

@media (max-width: 1024px) {
    .creature-habit-grid {
        grid-template-columns: 1fr;
    }
    .creature-habit-section .tile-image {
        min-height: 280px;
    }
}

@media (max-width: 768px) {
    .creature-habit-section,
    .persona-section {
        padding: 1.25rem 1rem 2rem 1rem;
    }

    .ch-tile {
        padding: 20px;
    }

    .ch-tile h3 {
        font-size: 1.45rem;
    }

    .footer-content {
        padding: 0 1.25rem;
        justify-content: center;
    }

    .page-view-count {
        margin-right: 0;
        text-align: center;
        width: 100%;
    }

    .footer-copy {
        margin-left: 0;
        text-align: center;
        width: 100%;
    }
}


/* Home grids, phones only: image + text tiles with the same URL share one cell. */
@media (max-width: 768px) {
    [class*="cody-mosaic-grid"].has-merged-tiles > .mosaic-tile {
        grid-row: var(--m-row) !important;
    }
    [class*="cody-mosaic-grid"].has-merged-tiles > .mosaic-tile.merge-text {
        z-index: 2;
        background: none !important;
        box-shadow: none;
        color: #ffffff;
        align-items: flex-end;
        transform: none;
    }
    [class*="cody-mosaic-grid"].has-merged-tiles > .mosaic-tile.merge-text .mosaic-content {
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
    }
    [class*="cody-mosaic-grid"].has-merged-tiles > .mosaic-tile.merge-text::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 20%, rgba(0, 0, 0, 0.75) 100%);
    }
    [class*="cody-mosaic-grid"].has-merged-tiles > .mosaic-tile.merge-image::before {
        background: none;
    }
}

/* =================================================================
   Comics & Collectibles + Wine Cellar (Public)
   ================================================================= */
.col-wrap,
.cellar-wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

.col-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.col-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.col-chip,
.col-btn {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 999px;
    background: #ececec;
    color: #222;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    border: 1px solid #d4d4d4;
}

.col-chip.is-active,
.col-btn-admin {
    background: #224b7a;
    color: #fff;
    border-color: #224b7a;
}

.col-empty,
.col-muted {
    color: #666;
    font-size: 0.95rem;
}

.col-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
}

.col-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: #222;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.col-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.col-card-img-wrap {
    position: relative;
    aspect-ratio: 3 / 4;
    background: #f0f0f0;
    overflow: hidden;
}

.col-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.col-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-weight: 600;
}

.col-card-priv {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(180, 90, 0, 0.92);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
}

.col-card-body {
    padding: 12px;
}

.col-card-type {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
    margin-bottom: 4px;
}

.col-card-title {
    margin: 0 0 4px;
    font-size: 1rem;
    line-height: 1.25;
}

.col-card-sub {
    margin: 0 0 6px;
    font-size: 0.84rem;
    color: #555;
}

.col-card-price {
    font-weight: 700;
    color: #1f6b3a;
    font-size: 0.95rem;
}

.col-single-card {
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    padding: 20px;
}

.col-single-grid {
    display: grid;
    grid-template-columns: minmax(240px, 380px) 1fr;
    gap: 24px;
    align-items: start;
}

.col-main-photo {
    width: 100%;
    max-height: 520px;
    object-fit: contain;
    background: #f5f5f5;
    border-radius: 6px;
    display: block;
}

.col-photo-caption {
    font-size: 0.8rem;
    color: #666;
    margin-top: 6px;
    text-align: center;
}

.col-no-photo {
    aspect-ratio: 3 / 4;
    background: #f0f0f0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
}

.col-thumb-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.col-thumb-btn {
    border: 2px solid #ddd;
    background: #fff;
    border-radius: 6px;
    padding: 3px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 0.72rem;
    color: #444;
}

.col-thumb-btn.is-active {
    border-color: #224b7a;
}

.col-thumb-btn img {
    width: 56px;
    height: 70px;
    object-fit: cover;
    border-radius: 3px;
}

.col-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.col-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 4px;
    background: #eaeaea;
    color: #333;
}

.col-badge-priv {
    background: #c76b00;
    color: #fff;
}

.col-badge-grade {
    background: #224b7a;
    color: #fff;
}

.col-single-title {
    margin: 0 0 6px;
    font-size: 1.6rem;
}

.col-meta-line {
    margin: 0 0 12px;
    color: #555;
    font-size: 0.98rem;
}

.col-latest-value {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
    background: #eef8f1;
    border: 1px solid #c5e6cf;
    padding: 8px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.col-price {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1f6b3a;
}

.col-price-meta {
    font-size: 0.85rem;
    color: #466651;
}

.col-notes h3,
.col-values-box h3 {
    margin: 14px 0 8px;
    font-size: 1.05rem;
}

.col-table-scroll {
    overflow-x: auto;
}

.col-val-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.col-val-table th,
.col-val-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e6e6e6;
    text-align: left;
}

.col-val-table th {
    background: #f6f6f6;
    font-weight: 700;
}

/* Wine Cellar Rack Grid */
.cellar-summary {
    display: flex;
    gap: 8px;
    font-size: 0.95rem;
    color: #333;
}

.cellar-rack-card {
    background: #fff;
    border: 1px solid #e0dcd6;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.cellar-rack-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.cellar-rack-head h3 {
    margin: 0;
    font-size: 1.15rem;
}

.cellar-rack-count {
    font-size: 0.85rem;
    color: #666;
}

.cellar-grid-scroll {
    overflow-x: auto;
    padding-bottom: 4px;
}

.cellar-grid {
    display: grid;
    gap: 8px;
}

.cellar-slot {
    min-height: 76px;
    border-radius: 8px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    box-sizing: border-box;
}

.cellar-slot.is-empty {
    background: #f7f5f2;
    border: 1px dashed #cfc7bc;
    color: #9b9286;
}

.cellar-slot.is-filled {
    background: linear-gradient(160deg, #5d1b2c 0%, #3a0f1b 100%);
    border: 1px solid #7a263c;
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.cellar-slot.is-filled:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(93, 27, 44, 0.35);
}

.slot-coord {
    position: absolute;
    top: 4px;
    left: 6px;
    font-size: 0.65rem;
    opacity: 0.75;
    font-weight: 700;
}

.slot-vintage {
    font-size: 0.75rem;
    font-weight: 700;
    color: #f6d38b;
    margin-top: 8px;
}

.slot-label {
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.15;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.slot-var {
    font-size: 0.68rem;
    opacity: 0.85;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cellar-pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cellar-unplaced-pill {
    border: 1px solid #7a263c;
    background: #fdf6f8;
    color: #4a1423;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    display: inline-flex;
    flex-direction: column;
    text-align: left;
    font-size: 0.86rem;
}

.cellar-past-box {
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    padding: 12px 16px;
}

.cellar-past-box summary {
    cursor: pointer;
    font-weight: 700;
    color: #333;
}

.cellar-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.cellar-modal-card {
    background: #fff;
    color: #222;
    border-radius: 10px;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4);
}

.cellar-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.cellar-modal-photo-wrap {
    background: #1a1215;
    text-align: center;
}

.cellar-modal-photo-wrap img {
    max-width: 100%;
    max-height: 280px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.cellar-modal-body {
    padding: 18px 20px 20px;
}

.cellar-modal-loc {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #7a263c;
    margin-bottom: 4px;
}

.cellar-modal-title {
    margin: 0 0 4px;
    font-size: 1.35rem;
}

.cellar-modal-sub {
    margin: 0 0 10px;
    color: #555;
    font-size: 0.95rem;
}

.cellar-modal-rating {
    display: inline-block;
    background: #f5efe0;
    color: #6b4e00;
    font-weight: 700;
    font-size: 0.86rem;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.cellar-modal-notes {
    margin: 0 0 14px;
    white-space: pre-line;
    line-height: 1.5;
    font-size: 0.94rem;
}

.cellar-modal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 768px) {
    .col-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .col-single-grid {
        grid-template-columns: 1fr;
    }
}

.col-search-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    align-items: center;
}

.col-search-input {
    flex: 2 1 220px;
    padding: 9px 12px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.col-search-select,
.col-search-year {
    flex: 1 1 120px;
    padding: 9px 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
}

.col-search-year {
    max-width: 110px;
}

.col-result-count {
    font-size: 0.88rem;
    color: #555;
    margin-bottom: 12px;
}

.col-pager {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-top: 20px;
}

.cellar-row-btn {
    background: none;
    border: none;
    padding: 0;
    color: #5d1b2c;
    font: inherit;
    text-align: left;
    cursor: pointer;
    text-decoration: underline;
}

.col-guest-unlock {
    font-size: 0.85rem;
    color: #555;
}

.col-guest-unlock > summary {
    cursor: pointer;
    list-style: none;
    color: #224b7a;
    text-decoration: underline;
}

.col-guest-unlock > summary::-webkit-details-marker {
    display: none;
}

.col-guest-unlock-form {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    align-items: center;
}

.col-guest-unlock-form input[type="password"] {
    padding: 8px 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
    min-width: 160px;
}

.col-guest-unlock.is-open {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.col-guest-unlock-note {
    color: #19592e;
    font-weight: 600;
}

.col-bar-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.col-bar-meta .col-result-count,
.col-bar-meta .col-pager {
    margin: 0;
}

.col-lookup-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.col-thumb-btn {
    text-decoration: none;
    color: inherit;
}

/* Dynamic tile grid reusing home .cody-mosaic-grid .mosaic-tile rules */
.cody-mosaic-grid.is-dynamic-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 260px;
    gap: 14px;
    margin-top: 0;
}

.cody-mosaic-grid.is-dynamic-grid .mosaic-tile {
    grid-column: auto !important;
    grid-row: auto !important;
    min-height: 240px;
    border: 0;
    padding: 0;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.cody-mosaic-grid.is-dynamic-grid .mosaic-content {
    padding: 16px;
}

.cody-mosaic-grid.is-dynamic-grid .mosaic-content h2 {
    font-size: 1.05rem;
    line-height: 1.25;
    margin: 0 0 4px 0;
}

.cody-mosaic-grid.is-dynamic-grid .mosaic-content p {
    font-size: 0.8rem;
    margin: 0;
    opacity: 0.92;
}

@media (max-width: 1024px) and (min-width: 769px) {
    .cody-mosaic-grid.is-dynamic-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 240px;
    }
}

@media (max-width: 768px) {
    .cody-mosaic-grid.is-dynamic-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 210px;
        gap: 10px;
    }
    .cody-mosaic-grid.is-dynamic-grid .mosaic-tile {
        grid-column: auto !important;
        min-height: 200px;
    }
}
