/* 
Dogs East - Main Styles
*/

/* ---------- DESIGN TOKENS (Default: Light) ---------- */
:root {
    /* Default background image */
    --site-background-image: url('/assets/images/topo.webp');

    /* Core brand colors */
    --color-blue-dark: #1A3263;
    --color-blue: #547792;
    --color-orange: #ffe2cbb9;
    --color-grey: #E8E2DB;

    /* Color gradient */
    --topbar-gradient: linear-gradient(180deg, #17005a 0%, #2a6a94 100%);

    /* Text */
    --text-primary: #000000;
    --text-inverse: #ffffff;

    /* Backgrounds */
    --bg-page: var(--color-grey);
    --bg-nav: var(--color-blue);
    --bg-content: var(--color-orange);
    --bg-mobile-menu: rgba(33, 54, 72, 0.96);

    /* Overlays / imagery */
    --overlay-topo-opacity: 0.35;

    /* Interactive */
    --hover-bg: rgba(125, 167, 223, 0.9);
    --mobile-item-bg: rgba(255, 255, 255, 0.10);
    --mobile-item-bg-hover: rgba(255, 255, 255, 0.18);

    /* Borders */
    --border-light: rgba(255, 255, 255, 0.12);

    /* Shadows */
    --shadow-header: 0 2px 10px rgba(0, 0, 0, 0.12);
    --shadow-card: 0 4px 8px rgba(0, 0, 0, 0.10);

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 14px;
    --space-lg: 18px;
    --space-xl: 24px;
    --space-2xl: 40px;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 14px;
    --radius-xl: 18px;

    /* Sizing */
    --header-height: 52px;

    /* Wider layout (laptop-friendly) */
    --wrap-max: 1320px;
    --content-max: 1100px;

    /* Mobile gutter so topo shows on sides */
    --mobile-gutter: 12px;

    /* Z-index */
    --z-bg: -1;
    --z-header: 1500;
    --z-mobile-nav: 1400;

    /* Motion */
    --ease: ease;
    --dur-fast: 120ms;
    --dur-med: 160ms;
    --dur-slow: 180ms;
}

/* ---------- DARK MODE (toggle by setting: <html data-theme="dark">) ---------- */
html[data-theme="dark"] {
    /* Keep brand hues but shift surfaces darker for readability */
    --text-primary: #E8EAF0;
    --text-inverse: #0B0F17;

    /* Page + surfaces */
    --bg-page: #0E141B;
    --bg-nav: #152C52;
    /* darker take on your blue-dark */
    --bg-content: #1C2430;
    /* replaces orange card for night readability */
    --bg-mobile-menu: rgba(10, 14, 20, 0.96);

    /* Background image */
    --overlay-topo-opacity: 0.22;
    /* reduce topo strength at night */

    /* Interactive */
    --hover-bg: rgba(125, 167, 223, 0.22);
    --mobile-item-bg: rgba(255, 255, 255, 0.06);
    --mobile-item-bg-hover: rgba(255, 255, 255, 0.10);

    /* Borders / shadows */
    --border-light: rgba(255, 255, 255, 0.10);
    --shadow-header: 0 2px 10px rgba(0, 0, 0, 0.35);
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* ---------- BASE ---------- */

html,
body {
    height: 100%;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-family: Arial, sans-serif;
    margin: 0;
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: var(--z-bg);
    background: var(--site-background-image) center / cover no-repeat;
    opacity: var(--overlay-topo-opacity);
    transition: background-image 0.8s ease, opacity 0.8s ease;
}

/* ---------- LAYOUT ---------- */

.wrap {
    max-width: var(--wrap-max);
    margin: 0 auto;
    padding: 0 16px;
}

.page {
    padding: var(--space-xl) 0 var(--space-2xl);
}

/* ---------- CONTENT ---------- */

.content {
    background:
        linear-gradient(rgba(255, 226, 203, 0.84), rgba(255, 226, 203, 0.84)),
        url('/assets/images/topo.webp') center / cover no-repeat;
    padding: clamp(18px, 3vw, var(--space-2xl));
    border-radius: var(--radius-xl);
    max-width: var(--content-max);
    margin: var(--space-lg) auto var(--space-2xl);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(3px);
}

.content {
    flex: 1 0 auto;
}

/* Center wide pages that intentionally break out of the narrower .wrap. */
@media (min-width: 721px) {
    section.content.activity-log-content,
    section.content:has(table) {
        position: relative !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
}

@media (min-width: 981px) {
    section.content.calendar-page {
        position: relative !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
}

/* Mobile: show topo “border” on the left/right by creating a gutter */
@media (max-width: 720px) {
    .content {
        margin: var(--space-lg) var(--mobile-gutter);
        max-width: none;
        border-radius: var(--radius-xl);
    }
}

/* ---------- TYPOGRAPHY HELPERS ---------- */

h1,
h2,
h3 {
    margin: 0 0 var(--space-md);
    line-height: 1.15;
}

h1 {
    font-size: clamp(26px, 3.2vw, 40px);
    letter-spacing: 0.2px;
}

h2 {
    font-size: clamp(18px, 2.2vw, 26px);
    margin-top: var(--space-2xl);
}

h3 {
    font-size: 16px;
    margin-bottom: var(--space-sm);
}

p {
    margin: 0 0 var(--space-md);
    line-height: 1.5;
}

.muted {
    opacity: 0.85;
}

.bullet-list {
    margin: 0;
    padding-left: 18px;
}

.bullet-list li {
    margin: 0 0 8px;
}

/* ---------- BUTTONS / LINKS ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    border: 1px solid rgba(0, 0, 0, 0.10);
    transition: transform var(--dur-fast) var(--ease),
        filter var(--dur-fast) var(--ease),
        background-color var(--dur-fast) var(--ease);
    cursor: pointer;
    user-select: none;
}

.btn:hover,
.btn:focus-visible {
    transform: translateY(-1px);
    filter: brightness(1.02);
    outline: none;
}

.btn-primary {
    background: rgba(26, 50, 99, 0.95);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.45);
    color: var(--text-primary);
    border-color: rgba(0, 0, 0, 0.10);
}

.text-link {
    color: rgba(26, 50, 99, 0.95);
    text-decoration: none;
    font-weight: 700;
}

.text-link:hover,
.text-link:focus-visible {
    text-decoration: underline;
    outline: none;
}

/* Dark mode tweaks for buttons/links */
html[data-theme="dark"] .btn-secondary {
    background: rgba(255, 255, 255, 0.10);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.10);
}

html[data-theme="dark"] .text-link {
    color: #9CC6FF;
}

/* ---------- HOME PAGE (CARD-BASED) ---------- */

.home-hero {
    padding: var(--space-xl);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.35);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    margin-bottom: var(--space-xl);
}

html[data-theme="dark"] .home-hero {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.10);
}

.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: var(--space-md);
}

.home-section {
    margin-top: var(--space-2xl);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-md);
}

@media (max-width: 920px) {
    .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
}

.card,
.card-link,
.event-card {
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    padding: var(--space-lg);
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .card-link,
html[data-theme="dark"] .event-card {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.10);
}

.card-link {
    display: block;
    color: inherit;
    text-decoration: none;
    transition: transform var(--dur-fast) var(--ease), filter var(--dur-fast) var(--ease);
}

.card-link:hover,
.card-link:focus-visible {
    transform: translateY(-2px);
    filter: brightness(1.02);
    outline: none;
}

.card-link p,
.card p,
.event-card p {
    margin-bottom: 0;
    opacity: 0.92;
}

/* Events */
.event-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-md);
}

@media (max-width: 920px) {
    .event-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .event-grid {
        grid-template-columns: 1fr;
    }
}

.event-date {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 0.4px;
    padding: 6px 10px;
    border-radius: 999px;
    margin-bottom: var(--space-sm);
    background: rgba(26, 50, 99, 0.12);
}

html[data-theme="dark"] .event-date {
    background: rgba(156, 198, 255, 0.18);
}

/* Row actions */
.home-row-actions {
    margin-top: var(--space-md);
}

/* Facebook feed */
.facebook-feed-section {
    width: 100%;
    padding: 0;
}

/* Lower homepage two-column layout */
.home-lower-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, 0.95fr);
    align-items: stretch;
    gap: clamp(var(--space-lg), 3vw, var(--space-2xl));
    margin-top: var(--space-2xl);
}

.home-lower-column {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: var(--space-xl);
}

.home-lower-column > .home-section {
    margin-top: 0;
}

.home-lower-column--left .card-grid {
    flex: 1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 1fr;
}

.get-involved-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: var(--space-xl);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.45);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.get-involved-panel > h2 {
    margin-top: 0;
}

html[data-theme="dark"] .get-involved-panel {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.10);
}

@media (max-width: 560px) {
    .home-lower-column--left .card-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    .home-lower-grid {
        grid-template-columns: 1fr;
    }
}

.facebook-feed-shell {
    min-height: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(26, 50, 99, 0.18);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.7);
}

html[data-theme="dark"] .facebook-feed-shell {
    background: rgba(12, 18, 30, 0.55);
    border-color: rgba(156, 198, 255, 0.22);
}

.facebook-feed-frame {
    width: 100%;
    min-height: 540px;
    padding: var(--space-md);
    text-align: center;
}

.facebook-feed-frame iframe {
    display: block;
    width: 500px;
    max-width: 100%;
    height: 540px;
    margin: 0 auto;
    border: 0;
}

@media (max-width: 620px) {
    .facebook-feed-frame {
        padding: 0;
    }
}

/* Contact strip */
.contact-strip .contact-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-md);
}

@media (max-width: 720px) {
    .contact-strip .contact-grid {
        grid-template-columns: 1fr;
    }
}

.label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.3px;
    opacity: 0.85;
    margin-bottom: 6px;
}

.value {
    font-weight: 700;
}

/* Homepage title image with logo beside it */

.home-title-hero {
    padding: clamp(14px, 2vw, 24px);
}

.home-title-layout {
    display: grid;
    grid-template-columns: 165px minmax(0, 1fr);
    align-items: center;
    gap: clamp(16px, 3vw, 32px);
}

.home-title-logo-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
}

.home-title-logo {
    padding-top: 10px;
    width: clamp(150px, 18vw, 220px);
    height: auto;
    display: block;
    filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.18));
}

.home-title-banner-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
}

.home-title-banner {
    width: min(100%, 780px);
    height: auto;
    display: block;
    border-radius: calc(var(--radius-xl) - 4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

/* Tablet/mobile: stack the logo above the banner */
@media (max-width: 720px) {
    .home-title-layout {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .home-title-logo {
        width: 130px;
    }

    .home-title-banner {
        width: 100%;
    }
}

/* ---------- EMERGENCY CALLOUT ---------- */

.emergency-callout {
    margin-top: var(--space-2xl);
}

.emergency-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-lg);

    padding: var(--space-lg);
    border-radius: var(--radius-xl);

    background: rgba(26, 50, 99, 0.10);
    border: 1px solid rgba(26, 50, 99, 0.20);

    box-shadow:
        0 12px 26px rgba(0, 0, 0, 0.10),
        0 4px 10px rgba(0, 0, 0, 0.06);
}

.emergency-title {
    margin: 0 0 var(--space-sm);
}

.emergency-lead {
    font-weight: 800;
    margin-bottom: var(--space-sm);
}

.emergency-strong {
    font-size: 18px;
    letter-spacing: 0.3px;
}

.emergency-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 2px;
}

@media (max-width: 720px) {
    .emergency-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .emergency-actions {
        justify-content: flex-start;
    }
}

html[data-theme="dark"] .emergency-inner {
    background: rgba(156, 198, 255, 0.10);
    border-color: rgba(156, 198, 255, 0.18);
}

/* ---------- HEADER / NAV ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    background: var(--topbar-gradient);
    box-shadow: var(--shadow-header);
}

.header-inner {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;

    /* contained + centered like the rest of the site */
    padding-left: 0;
    padding-right: 0;
}

/* Brand pinned left */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-inverse);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.2px;
    font-size: 16px;
    line-height: 1;
    white-space: nowrap;
}

.brand-logo {
    height: 28px;
    width: auto;
    display: block;
}

.brand-text {
    display: inline-block;
}

.desktop-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-list--desktop {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 2px;
}

.nav-link {
    color: var(--text-inverse);
    text-decoration: none;
    font-size: 14px;
    padding: var(--space-sm) 10px;
    border-radius: var(--radius-md);
    line-height: 1;
    transition: background-color var(--dur-fast) var(--ease);
}

.nav-link:hover,
.nav-link:focus-visible {
    background: var(--hover-bg);
    outline: none;
}

.nav-group,
.nav-group details {
    position: relative;
}

.nav-group summary {
    cursor: pointer;
    list-style: none;
}

.nav-group summary::-webkit-details-marker {
    display: none;
}

.nav-group summary::after {
    content: " ▾";
    font-size: 11px;
}

.nav-submenu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: calc(var(--z-header) + 1);
    min-width: 210px;
    margin: 0;
    padding: 8px;
    list-style: none;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    background: var(--bg-mobile-menu);
    box-shadow: var(--shadow-card);
}

.nav-submenu::before {
    content: "";
    position: absolute;
    right: 0;
    bottom: 100%;
    left: 0;
    height: 9px;
}

.nav-submenu a {
    display: block;
    padding: 11px 12px;
    border-radius: var(--radius-md);
    color: var(--text-inverse);
    text-decoration: none;
    white-space: nowrap;
}

.nav-submenu a:hover,
.nav-submenu a:focus-visible {
    background: var(--mobile-item-bg-hover);
    outline: none;
}

.nav-members {
    margin-left: 6px;
    padding-left: 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.28);
}

.nav-link--donate,
.mobile-link--donate {
    background: #ffffff;
    color: var(--color-blue-dark);
    font-weight: 900;
}

.nav-link--donate:hover,
.nav-link--donate:focus-visible,
.mobile-link--donate:hover,
.mobile-link--donate:focus-visible {
    background: #ffe2cb;
    color: var(--color-blue-dark);
}

.nav-social-label {
    margin-left: 8px;
}

.desktop-nav .nav-social-label {
    display: none;
}

/* ---------- HAMBURGER ---------- */

.nav-toggle {
    display: none;
    background: transparent;
    border: 0;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
}

.nav-toggle:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.75);
    outline-offset: 2px;
}

.nav-toggle-bars {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-inverse);
    position: relative;
    border-radius: 2px;
    transition: background var(--dur-slow) var(--ease);
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
    content: "";
    position: absolute;
    left: 0;
    width: 22px;
    height: 2px;
    background: var(--text-inverse);
    border-radius: 2px;
    transition: transform var(--dur-slow) var(--ease), top var(--dur-slow) var(--ease);
}

.nav-toggle-bars::before {
    top: -7px;
}

.nav-toggle-bars::after {
    top: 7px;
}

.site-header.is-open .nav-toggle-bars {
    background: transparent;
}

.site-header.is-open .nav-toggle-bars::before {
    top: 0;
    transform: rotate(45deg);
}

.site-header.is-open .nav-toggle-bars::after {
    top: 0;
    transform: rotate(-45deg);
}

body.menu-open {
    overflow: hidden;
}

/* ---------- MOBILE OVERLAY MENU ---------- */

.mobile-nav {
    display: none;
}

/* ---------- MOBILE ---------- */
@media (max-width: 980px) {

    .desktop-nav {
        display: none;
    }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
    }

    .mobile-nav {
        display: block;
        position: fixed;

        inset:
            calc(var(--header-height) + var(--space-sm)) var(--space-sm) var(--space-sm) var(--space-sm);

        z-index: var(--z-mobile-nav);
        background: var(--bg-mobile-menu);
        border-radius: var(--radius-xl);
        border: 1px solid var(--border-light);
        box-shadow: var(--shadow-card);

        overflow-y: auto;
            -webkit-overflow-scrolling: touch;

        opacity: 0;
        visibility: hidden;
        pointer-events: none;

        transition:
            opacity var(--dur-med) var(--ease),
            visibility 0s linear var(--dur-med);
    }

    .mobile-nav::before {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.08);
        z-index: -1;
    }

    .site-header.is-open+.mobile-nav {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transition: opacity var(--dur-med) var(--ease);
    }

    .nav-list--mobile {
        list-style: none;
        margin: 0;
        padding: var(--space-lg);
        display: flex;
        flex-direction: column;
        gap: var(--space-md);
    }

    .mobile-nav-heading {
        margin: var(--space-sm) 4px calc(-1 * var(--space-sm));
        padding-top: var(--space-sm);
        border-top: 1px solid rgba(255, 255, 255, 0.16);
        color: rgba(255, 255, 255, 0.72);
        font-size: 12px;
        font-weight: 800;
        letter-spacing: 0.12em;
        text-transform: uppercase;
    }

    .mobile-link {
        min-height: 56px;
        display: flex;
        align-items: center;
        justify-content: center;

        font-size: 18px;
        font-weight: 650;
        text-decoration: none;
        color: var(--text-inverse);

        background: var(--mobile-item-bg);
        border: 1px solid var(--border-light);
        border-radius: var(--radius-lg);

        transition:
            background var(--dur-fast) var(--ease),
            transform var(--dur-fast) var(--ease);
    }

    .mobile-link:hover,
    .mobile-link:focus-visible {
        background: var(--mobile-item-bg-hover);
        transform: translateY(-1px);
        outline: none;
    }
}

/* ---------- DESKTOP SAFETY ---------- */
@media (min-width: 981px) {
    .mobile-nav {
        display: none !important;
    }
}

/* ---------- FOOTER ---------- */

.site-footer {
    margin-top: auto;
    padding: var(--space-xl) 0;
    background: rgba(26, 50, 99, 0.92);
    color: #ffffff;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.15);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.footer-title {
    font-weight: 800;
    letter-spacing: 0.4px;
    font-size: 14px;
}

.footer-muted {
    font-size: 12px;
    opacity: 0.85;
    margin-top: 4px;
}

.footer-visitor-count {
    font-size: clamp(15px, 1.5vw, 19px);
    font-weight: 700;
    letter-spacing: 0.3px;
    text-align: center;
}

.footer-visitor-count strong {
    margin-left: 0.3em;
    font-variant-numeric: tabular-nums;
}

.footer-right {
    text-align: right;
}

@media (max-width: 720px) {
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }

    .footer-right {
        text-align: left;
    }

    .footer-visitor-count {
        text-align: left;
    }
}

html[data-theme="dark"] .site-footer {
    background: rgba(12, 18, 30, 0.95);
}

/* ---------- MEET THE TEAM CAROUSEL ---------- */

.team-carousel {
    display: grid;
    grid-template-columns: 42px 1fr 42px;
    gap: var(--space-sm);
    align-items: center;
    margin-top: var(--space-md);
}

.team-nav {
    height: 42px;
    width: 42px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.55);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--dur-fast) var(--ease), filter var(--dur-fast) var(--ease);
}

.team-nav:hover,
.team-nav:focus-visible {
    transform: translateY(-1px);
    filter: brightness(1.02);
    outline: none;
}

.team-viewport {
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: var(--radius-xl);
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.team-viewport::-webkit-scrollbar {
    display: none;
}

.team-track {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: var(--space-md);
    transform: none !important;
}

.team-slide {
    flex: 0 0 230px;
    scroll-snap-align: start;
}

@media (max-width: 920px) {
    .team-slide {
        flex-basis: 210px;
    }
}

@media (max-width: 560px) {
    .team-carousel {
        grid-template-columns: 36px 1fr 36px;
    }

    .team-nav {
        height: 36px;
        width: 36px;
        font-size: 20px;
    }

    .team-slide {
        flex: 0 0 100%;
    }

    .team-track {
        gap: var(--space-sm);
    }
}

.team-card {
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: none;
    transition: transform var(--dur-fast) var(--ease);
}

.team-card img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.team-card figcaption {
    padding: 10px 12px;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 0.2px;
    opacity: 0.9;
}

html[data-theme="dark"] .team-nav,
html[data-theme="dark"] .team-card {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.10);
}

/* ---------- POLICIES & STANDARDS (match card style) ---------- */

.policies-card .policies-title {
    margin-top: 0;
}

.policies-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg);
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

html[data-theme="dark"] .policies-links {
    border-top-color: rgba(255, 255, 255, 0.10);
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {

    .nav-link,
    .mobile-nav,
    .mobile-link,
    .nav-toggle-bars::before,
    .nav-toggle-bars::after,
    .btn,
    .card-link {
        transition: none !important;
    }
}

/* ---------- NAV SOCIAL ICON ---------- */

.nav-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-sm);
}

.nav-icon {
    width: 24px;
    height: 24px;
    display: block;
}

/* Optional: make icon slightly bolder on hover */
.nav-social-link:hover .nav-icon,
.nav-social-link:focus-visible .nav-icon {
    transform: scale(1.1);
    transition: transform var(--dur-fast) var(--ease);
}

@media (max-width: 720px) {
    .nav-social-link {
        justify-content: center;
        gap: 8px;
    }

    .nav-icon {
        width: 20px;
        height: 20px;
    }
}

/* ==========================================
   Global Site Marquee
========================================== */
.site-marquee {
    width: 100%;
    background: linear-gradient(90deg, #1a3263, #547792);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 1px solid rgba(0, 0, 0, 0.10);
    overflow: hidden;
    position: relative;
    z-index: 20;
    min-height: 52px;
    display: flex;
    align-items: center;
}

.site-marquee__inner {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0.85rem 1rem;
    overflow: hidden;
}

.site-marquee__track {
    display: inline-flex;
    align-items: center;
    gap: 4rem;
    white-space: nowrap;
    min-width: max-content;
    padding-left: 100%;
    animation: dogsEastMarqueeScroll 18s linear infinite;
}

.site-marquee__text {
    display: inline-block;
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    white-space: nowrap;
}

.site-marquee:hover .site-marquee__track {
    animation-play-state: paused;
}

@keyframes dogsEastMarqueeScroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-100%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-marquee__track {
        animation: none;
        padding-left: 0;
        display: block;
    }

    .site-marquee__text[aria-hidden="true"] {
        display: none;
    }
}

.back-to-top {
    position: fixed;
    right: 20px;
    bottom: var(--back-to-top-bottom, 20px);
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 999px;
    background: var(--color-blue);;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition:
        opacity 0.2s ease,
        visibility 0.2s ease,
        transform 0.2s ease,
        bottom 0.2s ease,
        background 0.2s ease;
    z-index: 1600;
}

.back-to-top:hover {
    background: var(--color-blue-dark);;
    transform: translateY(0) scale(1.05);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.9);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .back-to-top {
        right: 14px;
        width: 42px;
        height: 42px;
        font-size: 20px;
    }
}

/* Evaluation Forms */

.evaluation-form-list {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.evaluation-form-link {
    display: block;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(0, 0, 0, 0.08);
    font-weight: 600;
}

.evaluation-form-link::before {
    content: "🐾";
    margin-right: 0.5rem;
    text-decoration: none;
}

.evaluation-form-link:hover {
    transform: translateY(-1px);
}

.evaluation-form-disabled {
    color: #777;
    background: rgba(180, 180, 180, 0.25);
    border: 1px dashed rgba(0, 0, 0, 0.18);
    cursor: not-allowed;
    opacity: 0.7;
    text-decoration: none;
}

.evaluation-form-disabled::before {
    content: "🐾";
    margin-right: 0.5rem;
}

.evaluation-form-disabled small {
    display: inline-block;
    margin-left: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #8a4b4b;
}

.home-title-k9-layout {
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(520px, 700px) minmax(220px, 300px);
    gap: 1rem;
    align-items: stretch;
    justify-content: center;
}

.home-title-center--text {
    max-width: 700px;
    justify-self: center;
    width: 100%;
}

.home-title-k9-layout--no-dogs {
    grid-template-columns: 1fr;
}

.home-title-center {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 0.5rem;
    align-items: center;
}

.home-title-text-wrap {
    display: grid;
    gap: 0.25rem;
    align-content: center;
    min-width: 0;
    transform: translateX(-1.25rem);
}

.home-title-center--text {
    max-width: 700px;
    justify-self: center;
    width: 100%;

    border-radius: 24px;
    background:
        linear-gradient(rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.58)),
        url('/assets/images/topo.webp') center / cover no-repeat;
    border: 1px solid rgba(255, 255, 255, 0.62);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.10);
}

.home-title-center--text .home-title-logo {
    width: clamp(190px, 14vw, 245px);
    padding-top: 0;
}

.home-title-k9-layout--no-dogs .home-title-center {
    max-width: 950px;
    margin: 0 auto;
}

.home-title-text-wrap {
    display: grid;
    gap: 0.25rem;
    align-content: center;
    min-width: 0;
}

.home-title-kicker {
    margin: 0;
    font-size: clamp(0.68rem, 0.82vw, 0.88rem);
    letter-spacing: 0.055em;
    text-transform: uppercase;
    color: rgba(26, 50, 99, 0.88);
    white-space: nowrap;
}

.home-title-main {
    margin: 0;
    font-size: 50px;
    line-height: 0.92;
    font-weight: 950;
    letter-spacing: -0.055em;
    color: var(--color-blue-dark, #1A3263);
}

.home-title-subtitle {
    margin: 0;
    font-size: 25px;
    line-height: 0.96;
    font-weight: 900;
    color: rgba(26, 50, 99, 0.92);
}

.home-title-dog-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    gap: 0;
    height: 100%;
    min-height: 0;
}

.home-title-dog-grid-left,
.home-title-dog-grid-right {
    justify-self: stretch;
}

.home-title-dog-card {
    margin: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    border-radius: 22px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: 0 8px 22px rgba(16, 24, 40, 0.12);
}

.home-title-dog-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* The old banner image is not used in this hero anymore */
.home-title-k9-layout .home-title-banner-wrap,
.home-title-k9-layout .home-title-banner {
    display: none;
}

.home-title-hero {
    min-height: 0;
}

@media (max-width: 1200px) {
    .home-title-k9-layout {
        grid-template-columns: minmax(190px, 260px) minmax(500px, 680px) minmax(190px, 260px);
    }

    .home-title-center {
        grid-template-columns: 180px minmax(0, 1fr);
        gap: 1rem;
    }

    .home-title-center--text .home-title-logo {
        width: clamp(170px, 13vw, 215px);
    }

    .home-title-main {
        font-size: clamp(2.5rem, 4vw, 4rem);
    }

    .home-title-subtitle {
        font-size: clamp(1.35rem, 2.3vw, 2.35rem);
    }

    .home-title-kicker {
        font-size: clamp(0.68rem, 0.85vw, 0.85rem);
    }
}

@media (max-width: 1050px) {
    .home-title-k9-layout {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas:
            "center center"
            "left right";
        align-items: stretch;
    }

    .home-title-center {
        grid-area: center;
        grid-template-columns: 170px 1fr;
    }

    .home-title-dog-grid-left {
        grid-area: left;
    }

    .home-title-dog-grid-right {
        grid-area: right;
        display: grid;
    }

    .home-title-dog-grid {
        grid-template-columns: 1fr;
        height: auto;
        order: initial;
    }

    .home-title-dog-card {
        aspect-ratio: 1 / 1;
        height: auto;
    }
}

@media (max-width: 700px) {
    .home-title-k9-layout {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas:
            "center center"
            "left right";
        gap: 0.75rem;
    }

    .home-title-center {
        grid-area: center;
        grid-template-columns: 1fr;
        text-align: center;
        padding: 1rem;
    }

    .home-title-logo-wrap {
        justify-self: center;
    }

    .home-title-center--text .home-title-logo {
        width: 160px;
    }

    .home-title-main {
        font-size: clamp(2rem, 11vw, 3.2rem);
    }

    .home-title-subtitle {
        font-size: clamp(1.15rem, 6vw, 1.8rem);
    }

    .home-title-kicker {
        white-space: normal;
        letter-spacing: 0.04em;
        font-size: 0.72rem;
    }

    .home-title-text-wrap {
        display: grid;
        gap: 0.25rem;
        align-content: center;
        min-width: 0;
        margin-left: 0;
        transform: none;
    }

    .home-title-dog-grid-left {
        grid-area: left;
    }

    .home-title-dog-grid-right {
        grid-area: right;
        display: grid;
    }

    .home-title-dog-grid {
        grid-template-columns: 1fr;
        max-width: none;
        justify-self: stretch;
    }

    .home-title-dog-card {
        border-radius: 18px;
        aspect-ratio: 1 / 1;
    }
}

/* =========================================================
   One-time session welcome
========================================================= */

body.welcome-is-open {
    overflow: hidden;
}

.site-welcome {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(155deg, #0d1d3d 0%, #1a3263 48%, #365f83 100%);
    isolation: isolate;
    animation: welcome-arrive 500ms ease-out both;
}

.site-welcome.is-leaving {
    pointer-events: none;
    animation: welcome-depart 650ms cubic-bezier(.65, 0, .35, 1) both;
}

.site-welcome-map {
    position: absolute;
    inset: -8%;
    z-index: -3;
    background: url('/assets/images/topo.webp') center / cover no-repeat;
    opacity: 0;
    mix-blend-mode: screen;
    filter: grayscale(1) contrast(1.25);
    transform: scale(1.08);
    animation: welcome-map 2.8s 150ms ease-out forwards;
}

.site-welcome::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background: radial-gradient(circle at 50% 43%, rgba(255,255,255,.14), transparent 34%);
}

.site-welcome-ridge {
    position: absolute;
    left: -5%;
    right: -5%;
    bottom: -2px;
    z-index: -1;
    height: 31vh;
    background: #10264b;
    clip-path: polygon(0 68%, 8% 58%, 15% 63%, 24% 39%, 31% 53%, 40% 30%, 48% 49%, 57% 23%, 66% 47%, 76% 34%, 84% 55%, 92% 42%, 100% 58%, 100% 100%, 0 100%);
    transform: translateY(100%);
    animation: welcome-ridge 1s 300ms cubic-bezier(.2,.75,.2,1) forwards;
}

.site-welcome-ridge--back {
    bottom: 7vh;
    height: 35vh;
    background: rgba(84, 119, 146, 0.72);
    filter: blur(1px);
    animation-delay: 150ms;
}

.site-welcome-search-ring {
    position: absolute;
    left: 50%;
    top: 47%;
    width: min(56vw, 620px);
    aspect-ratio: 1;
    border: 1px solid rgba(255,255,255,.46);
    border-radius: 50%;
    opacity: 0;
    transform: translate(-50%, -50%) scale(.15);
    animation: welcome-search 1.8s 650ms ease-out forwards;
}

.site-welcome-content {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 8px;
    width: min(90vw, 720px);
    padding: 32px;
    text-align: center;
}

.site-welcome-logo {
    width: clamp(78px, 10vw, 128px);
    height: auto;
    opacity: 0;
    filter: drop-shadow(0 12px 20px rgba(0,0,0,.28));
    transform: translateY(24px) scale(.88);
    animation: welcome-mark 700ms 500ms cubic-bezier(.2,.8,.2,1) forwards;
}

.site-welcome h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(3rem, 9vw, 6.5rem);
    line-height: .95;
    letter-spacing: -.04em;
    opacity: 0;
    transform: translateY(18px);
    animation: welcome-copy 650ms 850ms ease-out forwards;
}

.site-welcome-kicker,
.site-welcome-message {
    margin: 0;
    opacity: 0;
    text-transform: uppercase;
    letter-spacing: .16em;
    animation: welcome-copy 650ms 1.15s ease-out forwards;
}

.site-welcome-kicker {
    font-size: clamp(.68rem, 1.4vw, .9rem);
    font-weight: 800;
    color: #dbeaf4;
}

.site-welcome-message {
    margin-top: 6px;
    font-size: clamp(.82rem, 1.8vw, 1.1rem);
    font-weight: 700;
    color: #f4dec0;
    animation-delay: 1.45s;
}

.site-welcome-line {
    width: min(260px, 48vw);
    height: 2px;
    margin-top: 13px;
    background: linear-gradient(90deg, transparent, #f4dec0, transparent);
    transform: scaleX(0);
    animation: welcome-line 900ms 1.55s ease-out forwards;
}

.site-welcome-paws {
    position: absolute;
    left: 10%;
    top: 52%;
    display: flex;
    gap: 34px;
    color: rgba(255,255,255,.58);
    transform: rotate(-18deg);
}

.site-welcome-paws span {
    opacity: 0;
    font-size: 12px;
    transform: scale(.4);
    animation: welcome-paw 350ms ease-out forwards;
}

.site-welcome-paws span:nth-child(1) { animation-delay: 1.35s; }
.site-welcome-paws span:nth-child(2) { animation-delay: 1.62s; }
.site-welcome-paws span:nth-child(3) { animation-delay: 1.89s; }

.site-welcome-skip {
    position: absolute;
    top: max(18px, env(safe-area-inset-top));
    right: max(18px, env(safe-area-inset-right));
    z-index: 2;
    border: 1px solid rgba(255,255,255,.34);
    border-radius: 999px;
    padding: 9px 14px;
    color: #ffffff;
    background: rgba(0,0,0,.16);
    font: inherit;
    font-size: .82rem;
    font-weight: 750;
    cursor: pointer;
}

.site-welcome-skip:hover,
.site-welcome-skip:focus-visible {
    background: rgba(255,255,255,.15);
    outline: 2px solid rgba(255,255,255,.55);
    outline-offset: 2px;
}

@keyframes welcome-arrive { from { opacity: 0; } to { opacity: 1; } }
@keyframes welcome-depart { to { opacity: 0; transform: scale(1.025); } }
@keyframes welcome-map { to { opacity: .22; transform: scale(1); } }
@keyframes welcome-ridge { to { transform: translateY(0); } }
@keyframes welcome-mark { to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes welcome-copy { to { opacity: 1; transform: translateY(0); } }
@keyframes welcome-line { to { transform: scaleX(1); } }
@keyframes welcome-paw { to { opacity: 1; transform: scale(1); } }
@keyframes welcome-search {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(.15); }
    38% { opacity: .52; }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .site-welcome,
    .site-welcome *,
    .site-welcome::after {
        animation-duration: 1ms !important;
        animation-delay: 0ms !important;
    }
}
