/* 
Dogs East - Main Styles
*/

/* ---------- DESIGN TOKENS (Default: Light) ---------- */
:root {
    /* 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: url("/assets/images/topo.png") center / cover no-repeat;
    opacity: var(--overlay-topo-opacity);
}

/* ---------- 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-color: var(--bg-content);
    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;
}

/* 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);
}

/* 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;
}

/* ---------- 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;
}

/* ---------- 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: 720px) {

    .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-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: 721px) {
    .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-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;
    }
}

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:
        0 10px 24px rgba(0, 0, 0, 0.14),
        0 2px 6px rgba(0, 0, 0, 0.08);
    transition:
        box-shadow var(--dur-fast) var(--ease),
        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: 18px;
    height: 18px;
    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;
    }
}