﻿/* ============================================================
   Cardio Care â€” public design system ("Pulse" v2)
   Clinical Light theme (default). Tokens are structured so a
   Premium Dark / Soft Medical theme can be added later by
   re-declaring the token block under a [data-theme] scope.

   Invariants (README "Security & accessibility notes"):
   - --pulse-red is graphics-only; text uses --pulse-red-text.
   - No inline styles/scripts anywhere (CSP: style-src 'self').
   ============================================================ */

/* Self-hosted fonts (latin subsets) â€” no third-party requests */
@font-face {
    font-family: "Space Grotesk";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("/assets/fonts/SpaceGrotesk-500.woff2") format("woff2");
}

@font-face {
    font-family: "Space Grotesk";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("/assets/fonts/SpaceGrotesk-700.woff2") format("woff2");
}

@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/assets/fonts/IBMPlexSans-400.woff2") format("woff2");
}

@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("/assets/fonts/IBMPlexSans-600.woff2") format("woff2");
}

@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("/assets/fonts/IBMPlexSans-700.woff2") format("woff2");
}

@font-face {
    font-family: "IBM Plex Mono";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/assets/fonts/IBMPlexMono-400.woff2") format("woff2");
}

/* --- Design tokens --------------------------------------------------- */

:root {
    /* Brand red â€” graphics vs. text split is an accessibility invariant */
    --pulse-red: #EE344E;       /* signature accent â€” graphics / ECG only  */
    --pulse-red-text: #B81D34;  /* accent darkened for text: 6.4:1 on white */
    --primary: #AF1631;         /* deep medical red â€” CTAs, key highlights  */
    --primary-dark: #8C1027;
    --primary-soft: #F9E3E7;    /* light red wash for hovers / tints        */
    --primary-border: rgba(175, 22, 49, 0.16);

    /* Deep charcoal-navy â€” headings, footer, dark panels */
    --navy: #1C2434;
    --navy-deep: #131A28;
    --navy-soft: #27334A;

    /* Supporting cool accents (used sparingly) */
    --vital-teal: #D6455A;      /* focus companion / fine accents (rose)    */
    --blue-soft: #4A6FA0;       /* soft medical blue â€” data details         */

    /* Legacy alias kept for older notes/docs; primary now carries it */
    --clinical-navy: var(--primary);

    /* Surfaces & text */
    --mist: #FAF6F6;            /* page background â€” soft off-white          */
    --surface: #FFFFFF;
    --surface-2: #F5EEEF;
    --ink: #221A1E;
    --ink-soft: #63535A;
    --border: #E8DCDF;

    /* Type */
    --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
    --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
    --font-data: "IBM Plex Mono", "Cascadia Mono", Consolas, monospace;

    /* Layout scale */
    --container-max: 74rem;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 26px;
    --radius: var(--radius-lg);   /* legacy alias */

    /* Elevation */
    --shadow-sm: 0 1px 2px rgba(34, 26, 30, 0.05), 0 2px 8px rgba(34, 26, 30, 0.04);
    --shadow-md: 0 2px 6px rgba(34, 26, 30, 0.05), 0 12px 28px rgba(156, 27, 46, 0.09);
    --shadow-lg: 0 4px 12px rgba(34, 26, 30, 0.06), 0 24px 56px rgba(156, 27, 46, 0.14);
    --shadow-soft: var(--shadow-md); /* legacy alias */

    /* Motion */
    --transition-fast: 140ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 260ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 480ms cubic-bezier(0.22, 0.61, 0.36, 1);

    /* Gradients */
    --grad-primary: linear-gradient(135deg, #C81E3C 0%, #96122A 100%);
    --grad-navy: linear-gradient(150deg, #222E44 0%, #131A28 78%);
}

/* --- Reset / base --------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1.025rem;
    line-height: 1.7;
    color: var(--ink);
    background: var(--mist);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-kerning: normal;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--navy);
    line-height: 1.22;
    letter-spacing: -0.01em;
    font-weight: 700;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--pulse-red-text);
    text-underline-offset: 0.16em;
}

::selection {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

/* Two-tone focus ring: navy carries the 3:1 non-text contrast (WCAG 2.2
   AA 1.4.11); the white gap keeps it visible on red surfaces too. */
:focus-visible {
    outline: 3px solid var(--navy);
    outline-offset: 2px;
    box-shadow: 0 0 0 2px #fff, 0 0 0 6px rgba(238, 52, 78, 0.45);
}

.site-footer :focus-visible,
.topbar :focus-visible {
    outline-color: #fff;
    box-shadow: 0 0 0 2px var(--navy), 0 0 0 6px rgba(255, 255, 255, 0.5);
}

@media (forced-colors: active) {
    :focus-visible {
        outline: 3px solid CanvasText;
        box-shadow: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* --- Scroll-reveal system (classes applied by main.js only, so the
       no-JS experience is fully visible content) ---------------------- */

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.65s ease,
        transform 0.65s cubic-bezier(0.22, 0.61, 0.36, 1);
    transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* --- Utilities ------------------------------------------------------ */

.container {
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: 1.25rem;
}

/* Same outer width as .container so page titles and body share one left edge.
   Readable measure lives on .prose (left-aligned), not a centered narrow box. */
.container--prose {
    max-width: var(--container-max);
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--navy);
    color: #fff;
    padding: 0.75rem 1.25rem;
    z-index: 100;
    border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
    left: 0;
}

.mono {
    font-family: var(--font-data);
    font-size: 0.95em;
}

.button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.7rem;
    border-radius: 999px;
    border: 2px solid transparent;
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-body);
    font-size: 0.98rem;
    line-height: 1.3;
    cursor: pointer;
    min-height: 44px;
    overflow: hidden;
    transition:
        transform var(--transition-fast),
        box-shadow var(--transition-normal),
        background-color var(--transition-fast),
        border-color var(--transition-fast),
        color var(--transition-fast);
}

.button:active {
    transform: translateY(1px) scale(0.99);
}

.button--primary {
    background: var(--grad-primary);
    color: #fff;
    box-shadow: 0 6px 18px rgba(150, 18, 42, 0.28);
}

.button--primary::after {
    /* shine sweep */
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.22) 50%, transparent 70%);
    transform: translateX(-110%);
    transition: transform 600ms ease;
    pointer-events: none;
}

.button--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(150, 18, 42, 0.36);
}

.button--primary:hover::after {
    transform: translateX(110%);
}

.button--outline {
    background: rgba(255, 255, 255, 0.6);
    color: var(--primary-dark);
    border-color: rgba(175, 22, 49, 0.45);
}

.button--outline:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.glass-panel {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

@media (prefers-contrast: more), (forced-colors: active) {
    .glass-panel {
        background: #fff;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

.section-heading {
    font-size: clamp(1.6rem, 3.6vw, 2.15rem);
    margin: 0 0 0.75rem;
}

.section-intro {
    color: var(--ink-soft);
    max-width: 38rem;
    margin-top: 0.35rem;
    font-size: 1.05rem;
    line-height: 1.7;
}

/* --- Topbar --------------------------------------------------------- */

.topbar {
    background: var(--navy-deep);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.84rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.topbar__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-block: 0.45rem;
    flex-wrap: wrap;
}

.topbar__hours {
    font-family: var(--font-data);
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.78);
}

.topbar__links {
    display: flex;
    gap: 1.4rem;
}

.topbar__links a {
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.topbar__links a:hover {
    color: #fff;
    text-decoration: underline;
}

@media (max-width: 640px) {
    .topbar__hours {
        display: none;
    }

    .topbar__inner {
        justify-content: center;
    }
}

/* --- Header / nav --------------------------------------------------- */

.site-header {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(14px) saturate(150%);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    transition: box-shadow var(--transition-normal), background-color var(--transition-normal);
}

.site-header.is-scrolled {
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 8px 24px rgba(34, 26, 30, 0.08);
}

@media (prefers-contrast: more), (forced-colors: active) {
    .site-header {
        background: #fff;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 0.7rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    line-height: 1.2;
}

.brand__mark {
    flex: none;
    width: 38px;
    height: 38px;
    color: var(--pulse-red);
}

.brand__mark svg {
    display: block;
    width: 100%;
    height: 100%;
}

.brand__name {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.22rem;
    color: var(--navy);
    letter-spacing: -0.01em;
}

.brand__sub {
    display: block;
    font-size: 0.74rem;
    color: var(--ink-soft);
}

.site-header__cta {
    display: inline-flex;
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    min-height: 40px;
}

@media (max-width: 1080px) {
    .site-header__cta {
        display: none;
    }
}

.nav-toggle {
    display: none;
    background: none;
    border: 0;
    padding: 10px;
    cursor: pointer;
    border-radius: var(--radius-sm);
}

.nav-toggle__bar {
    display: block;
    width: 24px;
    height: 2px;
    border-radius: 2px;
    background: var(--navy);
    margin: 5px 0;
    transition: transform var(--transition-normal), opacity var(--transition-fast);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Forced-colors mode drops background-color, which would leave the hamburger
   bars invisible â€” draw them with borders instead. */
@media (forced-colors: active) {
    .nav-toggle {
        border: 1px solid ButtonText;
    }

    .nav-toggle__bar {
        background: none;
        border-top: 2px solid ButtonText;
        height: 0;
    }
}

.site-nav {
    display: flex;
    gap: 0.15rem;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
}

.site-nav a,
.nav-trigger__link {
    position: relative;
    text-decoration: none;
    padding: 0.6rem 0.75rem;
    display: inline-block;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--navy);
    transition: color var(--transition-fast), background-color var(--transition-fast);
}

.site-nav > .nav-item > a:hover,
.nav-trigger:hover {
    background: var(--surface-2);
}

/* animated underline on top-level items */
.site-nav > .nav-item > a::after,
.nav-trigger__link::after {
    content: "";
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.3rem;
    height: 2px;
    border-radius: 2px;
    background: var(--pulse-red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-normal);
}

.site-nav > .nav-item > a:hover::after,
.site-nav > .nav-item > a[aria-current="page"]::after,
.nav-trigger__link:hover::after,
.nav-trigger__link[aria-current="page"]::after {
    transform: scaleX(1);
}

.site-nav a[aria-current="page"],
.nav-trigger__link[aria-current="page"] {
    color: var(--pulse-red-text);
    font-weight: 600;
}

/* Keep label + chevron as one unit */
.nav-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    border-radius: var(--radius-sm);
    max-width: 100%;
    transition: background-color var(--transition-fast);
}

.nav-trigger__link {
    padding-right: 0;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.nav-trigger__link::after {
    right: 0;
}

.nav-caret {
    background: none;
    border: 0;
    cursor: pointer;
    padding: 0.55rem 0.55rem 0.55rem 0;
    color: var(--navy);
    line-height: 1;
    min-height: 44px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-caret__icon {
    display: block;
    width: 0.85rem;
    height: 0.55rem;
    transition: transform var(--transition-normal);
}

.nav-caret[aria-expanded="true"] {
    color: var(--pulse-red-text);
}

.nav-caret[aria-expanded="true"] .nav-caret__icon,
.nav-item.has-children:hover .nav-caret__icon {
    transform: rotate(180deg);
}

.nav-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 20rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    list-style: none;
    margin: 0;
    padding: 0.45rem;
    z-index: 60;
    animation: dropdown-in 180ms ease both;
}

@keyframes dropdown-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.nav-item.is-open .nav-dropdown,
.nav-item.has-children:hover .nav-dropdown {
    display: block;
}

.nav-dropdown a {
    display: block;
    padding: 0.55rem 0.75rem;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    color: var(--ink);
}

.nav-dropdown a:hover {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

@media (max-width: 900px) {
    .nav-toggle {
        display: block;
    }

    .site-nav-wrap {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }

    .site-nav-wrap.is-open {
        display: block;
        animation: drawer-in 220ms ease both;
    }

    @keyframes drawer-in {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: none;
        }
    }

    .site-nav {
        flex-direction: column;
        align-items: stretch;
        padding: 0.5rem 1rem 1rem;
    }

    .nav-item {
        flex-wrap: wrap;
    }

    .nav-item > a,
    .nav-trigger {
        flex: 1;
        width: 100%;
    }

    .nav-trigger__link {
        flex: 1;
    }

    .site-nav > .nav-item > a::after,
    .nav-trigger__link::after {
        display: none;
    }

    /* Mobile: only open when toggled â€” not on hover */
    .nav-item.has-children:hover .nav-dropdown {
        display: none;
    }

    .nav-dropdown {
        position: static;
        display: none;
        width: 100%;
        box-shadow: none;
        border: 0;
        border-left: 2px solid var(--primary-soft);
        border-radius: 0;
        margin-left: 0.75rem;
        animation: none;
    }

    .nav-item.is-open .nav-dropdown {
        display: block;
    }
}

/* --- Hero ----------------------------------------------------------- */

.block-hero {
    position: relative;
    padding-block: 5.5rem 4.5rem;
    background:
        radial-gradient(42rem 26rem at 88% -22%, rgba(238, 52, 78, 0.13), transparent 62%),
        radial-gradient(34rem 22rem at -12% 112%, rgba(28, 36, 52, 0.08), transparent 62%),
        radial-gradient(rgba(28, 36, 52, 0.045) 1px, transparent 1.5px),
        var(--mist);
    background-size: auto, auto, 24px 24px, auto;
    overflow: hidden;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background: #fff;
    border: 1px solid var(--primary-border);
    border-radius: 999px;
    padding: 0.35rem 0.95rem;
    color: var(--pulse-red-text);
    font-family: var(--font-data);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin: 0 0 1rem;
    box-shadow: var(--shadow-sm);
}

.hero-eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--pulse-red);
    animation: eyebrow-pulse 1.8s ease-in-out infinite;
}

@keyframes eyebrow-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(238, 52, 78, 0.45); }
    50% { box-shadow: 0 0 0 6px rgba(238, 52, 78, 0); }
}

.hero-layout {
    position: relative;
}

.hero-copy {
    position: relative;
    z-index: 1;
    max-width: 46rem;
}

.hero-heading {
    font-size: clamp(2.05rem, 5vw, 3.15rem);
    letter-spacing: -0.018em;
    margin: 0 0 0.55rem;
    max-width: 42rem;
    line-height: 1.15;
}

.ecg-divider {
    color: var(--pulse-red);
    width: 240px;
    height: 24px;
    margin: 0.5rem 0 1rem;
    filter: drop-shadow(0 2px 6px rgba(238, 52, 78, 0.35));
}

.ecg-divider svg {
    width: 100%;
    height: 100%;
}

.hero-lede {
    max-width: 38rem;
    color: var(--ink-soft);
    font-size: 1.08rem;
    line-height: 1.65;
    margin-top: 0;
}

.hero-actions {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-top: 1.75rem;
}

/* Watermark heart â€” a real anatomical-model photograph, fully inside the
   hero (never hung off an edge). Fades toward the copy so headline contrast
   is never compromised. Decorative only; no motion. */
.hero-watermark {
    position: absolute;
    inset: 8% 3.5% 8% auto;
    width: min(32rem, 42%);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    opacity: 0.48;
    pointer-events: none;
    user-select: none;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 26%, #000 92%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 26%, #000 92%, transparent 100%);
}

.hero-watermark__art {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: right center;
}

@media (prefers-contrast: more) {
    .hero-watermark {
        opacity: 0.10;
    }
}

/* Doctor portrait â€” about intro */
.doctor-portrait {
    margin: 0;
    justify-self: end;
    width: 100%;
    max-width: 360px;
}

.doctor-portrait__frame {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    background: #0b0b0b;
    box-shadow:
        0 0 0 3px #fff,
        0 0 0 6px rgba(238, 52, 78, 0.35),
        0 24px 52px rgba(156, 27, 46, 0.22);
}

.doctor-portrait__frame::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 28%;
    background: linear-gradient(to top, rgba(19, 26, 40, 0.45), transparent);
    pointer-events: none;
}

.doctor-portrait img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center 12%;
}

.doctor-portrait__caption {
    margin-top: 0.9rem;
    text-align: center;
}

.doctor-portrait__caption strong {
    display: block;
    color: var(--navy);
    font-family: var(--font-display);
    font-size: 1.02rem;
}

.doctor-portrait__caption span {
    display: block;
    margin-top: 0.2rem;
    color: var(--ink-soft);
    font-size: 0.85rem;
    line-height: 1.4;
}

.about-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
    gap: 2rem 3rem;
    align-items: center;
}

.about-intro .prose {
    max-width: none;
}

.block-rich-text--with-portrait {
    padding-block: 3.5rem;
}

@media (max-width: 800px) {
    .about-intro {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .doctor-portrait {
        justify-self: center;
        max-width: 280px;
        order: -1;
    }

    .block-hero {
        padding-block: 3rem 2.5rem;
    }

    /* On small screens the watermark stays fully inside the hero and
       drops behind the copy at low opacity so the headline stays readable. */
    .hero-watermark {
        inset: 6% 5% 6% auto;
        width: min(20rem, 62%);
        opacity: 1.0;
        -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 42%, #000 90%, transparent 100%);
        mask-image: linear-gradient(90deg, transparent 0%, #000 42%, #000 90%, transparent 100%);
    }
}

/* --- Stats ---------------------------------------------------------- */

.block-stats {
    padding-block: 1.5rem 3rem;
    background:
        radial-gradient(40rem 20rem at 50% 0%, rgba(238, 52, 78, 0.08), transparent 70%),
        var(--mist);
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: stretch;
}

.stat-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.55rem;
    min-height: 8.5rem;
    padding: 1.6rem 1.15rem 1.5rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.stat-tile::before {
    /* top accent bar */
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--grad-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-slow);
}

.stat-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-border);
}

.stat-tile:hover::before,
.stat-tile.is-visible::before {
    transform: scaleX(1);
}

.stat-tile.glass-panel {
    /* Prefer solid white for readable numbers over frosted glass */
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: var(--radius-lg);
}

.stat-tile__number {
    display: block;
    width: 100%;
    font-family: var(--font-data);
    font-size: clamp(1.2rem, 2.3vw, 1.75rem);
    font-weight: 700;
    line-height: 1.25;
    color: var(--primary-dark);
    text-wrap: balance;
    overflow-wrap: anywhere;
    hyphens: auto;
}

.stat-tile__label {
    display: block;
    width: 100%;
    color: var(--ink);
    font-size: 0.98rem;
    font-weight: 500;
    line-height: 1.4;
    text-wrap: balance;
    max-width: 16rem;
}

@media (max-width: 700px) {
    .stats-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stats-row {
        grid-template-columns: 1fr;
    }

    .stat-tile {
        min-height: 7rem;
        padding: 1.35rem 1.25rem;
    }
}

/* --- Sections / blocks ---------------------------------------------- */

.block-rich-text,
.block-services,
.block-testimonials,
.block-faq,
.block-gallery,
.block-credentials,
.block-map,
.block-video,
.block-custom {
    padding-block: 3rem;
}

.prose {
    color: var(--ink);
    max-width: 40rem;
    margin-inline: 0;
    font-size: 1.06rem;
    line-height: 1.78;
    letter-spacing: 0.005em;
}

/* Policy / terms pages — use the full container width */
.prose--wide,
.block-rich-text--legal .prose {
    max-width: none;
    width: 100%;
}

/* Service and condition detail — article plus a right-hand column */
.detail-page {
    padding-block: 2.5rem 1rem;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(16.5rem, 22rem);
    gap: 2rem 2.75rem;
    align-items: start;
}

.detail-layout__main {
    min-width: 0;
}

.prose--detail {
    max-width: none;
}

.detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: sticky;
    top: 5.5rem;
}

.detail-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.15rem 1.15rem 1rem;
    box-shadow: var(--shadow-sm);
}

.detail-card h2 {
    position: relative;
    margin: 0 0 0.85rem;
    padding-bottom: 0.55rem;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -0.01em;
}

.detail-card h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 2.2rem;
    height: 3px;
    border-radius: 999px;
    background: var(--primary);
}

.detail-card--book {
    background:
        radial-gradient(12rem 8rem at 110% -20%, rgba(238, 52, 78, 0.28), transparent 60%),
        var(--navy);
    border-color: transparent;
    color: #fff;
}

.detail-card--book h2 {
    color: #fff;
}

.detail-card--book h2::after {
    background: #fff;
}

.detail-card--book p {
    margin: 0 0 0.9rem;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.92rem;
    line-height: 1.55;
}

.detail-card--book .button {
    width: 100%;
    justify-content: center;
}

.detail-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.detail-links a {
    display: block;
    padding: 0.48rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--navy);
    font-weight: 600;
    font-size: 0.92rem;
    line-height: 1.35;
    text-decoration: none;
}

.detail-links li:last-child a {
    border-bottom: 0;
}

.detail-links a:hover {
    color: var(--primary-dark);
}

.detail-card__all {
    display: inline-block;
    margin-top: 0.7rem;
    color: var(--pulse-red-text);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
}

.detail-card__all:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-sidebar {
        position: static;
    }
}

.prose h2, .prose h3 {
    margin-top: 1.75em;
    margin-bottom: 0.45em;
    letter-spacing: -0.008em;
    line-height: 1.28;
}

.prose p {
    margin-block: 0.95em;
}

.prose a {
    color: var(--pulse-red-text);
    text-decoration-color: rgba(184, 29, 52, 0.35);
    transition: text-decoration-color var(--transition-fast);
}

.prose a:hover {
    text-decoration-color: var(--pulse-red-text);
}

.prose li + li {
    margin-top: 0.35em;
}

.prose code {
    font-family: var(--font-data);
    font-size: 0.88em;
    background: var(--surface-2);
    border-radius: 4px;
    padding: 0.1em 0.35em;
    overflow-wrap: anywhere;
}

/* Wide tables (e.g. the cookie list) scroll inside their own box on phones. */
.table-scroll {
    overflow-x: auto;
    margin-block: 1.1em;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.prose table {
    width: 100%;
    min-width: 32rem;
    border-collapse: collapse;
    font-size: 0.95rem;
    line-height: 1.55;
}

.prose th,
.prose td {
    padding: 0.65rem 0.8rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--border);
}

.prose td code {
    white-space: nowrap;
    overflow-wrap: normal;
}

.prose th {
    background: var(--surface-2);
    font-weight: 600;
}

.prose tbody tr:last-child td {
    border-bottom: 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.2rem;
    margin-top: 1.5rem;
}

.service-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.4rem 1.35rem;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition:
        transform var(--transition-normal),
        box-shadow var(--transition-normal),
        border-color var(--transition-normal);
}

.service-card::before {
    /* top accent that draws in on hover */
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--grad-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-normal);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-border);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card h3 {
    margin: 0;
    font-size: 1.08rem;
}

.service-card p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.93rem;
    flex: 1;
}

.service-card__more {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--pulse-red-text);
    font-size: 0.88rem;
    font-weight: 600;
    margin-top: 0.35rem;
}

.service-card__more::after {
    content: "\2192";
    transition: transform var(--transition-normal);
}

.service-card:hover .service-card__more::after {
    transform: translateX(4px);
}

.testimonial-slider {
    position: relative;
}

.testimonial-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: min(90%, 24rem);
    gap: 1.1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 1rem 0.25rem 1.4rem;
    scrollbar-color: rgba(175, 22, 49, 0.35) var(--surface-2);
}

.testimonial-slider.is-enhanced .testimonial-track {
    scrollbar-width: none;
}

.testimonial-slider.is-enhanced .testimonial-track::-webkit-scrollbar {
    display: none;
}

.testimonial-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    margin-top: 0.15rem;
}

.testimonial-controls[hidden] {
    display: none;
}

.testimonial-controls__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.7rem;
    height: 2.7rem;
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--navy);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition:
        background-color var(--transition-fast),
        border-color var(--transition-fast),
        color var(--transition-fast),
        transform var(--transition-fast);
}

.testimonial-controls__btn svg {
    width: 1.15rem;
    height: 1.15rem;
}

.testimonial-controls__btn:hover,
.testimonial-controls__btn:focus-visible {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-1px);
}

.testimonial-controls__play {
    width: 3rem;
    height: 3rem;
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.testimonial-controls__play:hover,
.testimonial-controls__play:focus-visible {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.testimonial-controls__play .icon-play,
.testimonial-slider:not(.is-playing) .testimonial-controls__play .icon-pause {
    display: none;
}

.testimonial-slider:not(.is-playing) .testimonial-controls__play .icon-play,
.testimonial-slider.is-playing .testimonial-controls__play .icon-pause {
    display: block;
}

.testimonial-card {
    position: relative;
    scroll-snap-align: start;
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    margin: 0;
    padding: 1.6rem 1.4rem 1.35rem;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.testimonial-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.testimonial-card::before {
    /* oversized quote glyph */
    content: "\201C";
    position: absolute;
    top: 0.2rem;
    right: 1rem;
    font-family: var(--font-display);
    font-size: 4.2rem;
    line-height: 1;
    color: var(--primary-soft);
    pointer-events: none;
}

.testimonial-card blockquote {
    margin: 0 0 0.75rem;
    flex: 1;
    position: relative;
}

.testimonial-card__name {
    font-weight: 600;
    color: var(--navy);
    display: block;
}

.testimonial-card__stars {
    color: var(--pulse-red-text);
    letter-spacing: 0.15em;
}

.faq-list {
    margin-top: 1.25rem;
    max-width: 52rem;
}

.faq-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 0.65rem;
    overflow: hidden;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.faq-item:hover {
    border-color: var(--primary-border);
}

.faq-item[open] {
    border-color: var(--primary-border);
    box-shadow: var(--shadow-sm);
}

.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
    padding: 1rem 1.2rem;
    font-weight: 600;
    color: var(--navy);
    list-style: none;
    transition: background-color var(--transition-fast);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary:hover {
    background: var(--mist);
}

.faq-item summary::after {
    content: "";
    flex: none;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--pulse-red-text);
    border-bottom: 2px solid var(--pulse-red-text);
    transform: rotate(45deg);
    margin-top: -4px;
    transition: transform var(--transition-normal);
}

.faq-item[open] summary::after {
    transform: rotate(225deg);
    margin-top: 4px;
}

.faq-item__answer {
    padding: 0 1.2rem 1.1rem;
    color: var(--ink);
    animation: faq-open 260ms ease both;
}

@keyframes faq-open {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.block-cta {
    padding-block: 3rem;
}

.cta-panel {
    position: relative;
    padding: 2.5rem 2.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    border-radius: var(--radius-xl);
    background:
        radial-gradient(30rem 18rem at 108% -40%, rgba(238, 52, 78, 0.35), transparent 62%),
        radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1.5px),
        var(--grad-navy);
    background-size: auto, 22px 22px, auto;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-lg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    overflow: hidden;
}

.cta-panel h2 {
    margin: 0 0 0.35rem;
    color: #fff;
}

.cta-panel p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    max-width: 38rem;
}

@media (forced-colors: active) {
    .cta-panel {
        border: 1px solid CanvasText;
    }
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.85rem;
    margin-top: 1.5rem;
    align-items: stretch;
}

.gallery-item {
    margin: 0;
    border-radius: 0;
    overflow: hidden;
    background: var(--surface-2, #f0f2f5);
    box-shadow: none;
    border: 1px solid var(--border);
    aspect-ratio: 1 / 1;
}

.gallery-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: opacity var(--transition-normal);
}

.gallery-item:hover img {
    opacity: 0.92;
}

.gallery-item--album {
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
}

.gallery-item--album img,
.gallery-item__placeholder {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.gallery-item__placeholder {
    background: var(--surface-2, #e8ebf0);
}

.gallery-item__album-meta {
    position: absolute;
    inset: auto 0 0 0;
    padding: 1.6rem 0.75rem 0.65rem;
    background: linear-gradient(transparent, rgba(12, 16, 26, 0.78));
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.gallery-item__album-title {
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-item__album-count {
    font-size: 0.78rem;
    opacity: 0.9;
}

.gallery-item--album:hover img {
    opacity: 0.92;
}

.credentials-heading {
    margin: 1.9rem 0 0.6rem;
    font-size: 1.12rem;
}

.credentials-list {
    margin: 0;
    padding-left: 1.25rem;
}

.credentials-list li {
    margin-bottom: 0.45rem;
}

.credentials-list li::marker {
    color: var(--pulse-red-text);
}

.map-layout {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1.5rem;
    margin-top: 1.25rem;
}

.map-frame {
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 320px;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.map-frame iframe {
    width: 100%;
    height: 100%;
    min-height: 320px;
    border: 0;
    display: block;
}

.map-details h3 {
    margin: 1rem 0 0.25rem;
    font-size: 1rem;
}

.map-details h3:first-child {
    margin-top: 0;
}

.map-details p {
    margin: 0 0 0.5rem;
}

@media (max-width: 800px) {
    .map-layout {
        grid-template-columns: 1fr;
    }
}

.video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #000;
    margin-top: 1.25rem;
    box-shadow: var(--shadow-md);
}

.video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-caption {
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.video-frame--native video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.video-description {
    color: var(--ink);
    max-width: 52rem;
    margin: 1rem 0 0;
}

/* External video without a supported player â€” admin-provided cover linking
   to the original. */
.video-cover-card {
    display: block;
    max-width: 46rem;
    margin-top: 1.25rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.video-cover-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.video-cover-card__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-cover-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-cover-card__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(19, 26, 40, 0.7);
    color: #fff;
    transition: background-color var(--transition-fast), transform var(--transition-normal);
}

.video-cover-card__play svg {
    width: 30px;
    height: 30px;
}

.video-cover-card:hover .video-cover-card__play {
    background: var(--primary);
    transform: translate(-50%, -50%) scale(1.07);
}

.video-cover-card__label {
    display: block;
    padding: 0.9rem 1.25rem;
    font-weight: 600;
    color: var(--pulse-red-text);
}

.error-page {
    padding-block: 5rem;
    text-align: center;
}

.error-page .button {
    margin-top: 1rem;
}

/* --- Section pages (services / conditions / blog) --------------------- */

.page-head {
    position: relative;
    padding-block: 2.75rem 2.15rem;
    background:
        radial-gradient(36rem 20rem at 92% -30%, rgba(255, 255, 255, 0.14), transparent 60%),
        radial-gradient(28rem 18rem at -8% 120%, rgba(0, 0, 0, 0.12), transparent 55%),
        var(--primary);
    color: #fff;
}

.page-head__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: nowrap;
}

.page-head__bar .breadcrumb {
    min-width: 0;
    flex: 1;
}

.page-head__bar .breadcrumb ol {
    flex-wrap: nowrap;
}

.page-head__bar .breadcrumb [aria-current="page"] {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 42rem;
}

.page-head__back {
    flex: none;
    margin-left: auto;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.55);
}

.page-head__back:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: #fff;
    color: #fff;
}

@media (max-width: 700px) {
    .page-head__bar {
        flex-wrap: wrap;
    }

    .page-head__bar .breadcrumb [aria-current="page"] {
        max-width: 16rem;
    }
}

.page-head h1 {
    font-size: clamp(1.9rem, 4.6vw, 2.8rem);
    letter-spacing: -0.02em;
    margin: 0.4rem 0 0.6rem;
    color: #fff;
}

.page-head .section-intro {
    color: rgba(255, 255, 255, 0.88);
    max-width: 52rem;
}

.page-head .post-byline,
.page-head .card-tag {
    color: rgba(255, 255, 255, 0.82);
}

.page-head .breadcrumb ol {
    color: rgba(255, 255, 255, 0.78);
}

.page-head .breadcrumb li + li::before {
    color: rgba(255, 255, 255, 0.55);
}

.page-head .breadcrumb a {
    color: rgba(255, 255, 255, 0.88);
    text-decoration-color: rgba(255, 255, 255, 0.35);
}

.page-head .breadcrumb a:hover {
    color: #fff;
    text-decoration-color: #fff;
}

.page-head .breadcrumb [aria-current="page"] {
    color: #fff;
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    font-size: 0.83rem;
    font-family: var(--font-data);
    letter-spacing: 0.01em;
    color: var(--ink-soft);
}

.breadcrumb li + li::before {
    content: "\203A";
    margin-right: 0.4rem;
    color: var(--ink-soft);
}

.breadcrumb a {
    color: var(--ink-soft);
    text-decoration-color: rgba(99, 83, 90, 0.4);
}

.breadcrumb a:hover {
    color: var(--pulse-red-text);
}

.service-card__title {
    margin: 0;
    font-size: 1.08rem;
}

.card-tag {
    display: inline-block;
    font-family: var(--font-data);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--pulse-red-text);
    margin-bottom: 0.35rem;
}

.pill-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin: 0.85rem 0 0;
    padding: 0;
}

.pill {
    display: inline-block;
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--border);
    text-decoration: none;
    font-size: 0.9rem;
    color: var(--ink);
    box-shadow: var(--shadow-sm);
    transition:
        border-color var(--transition-fast),
        background-color var(--transition-fast),
        color var(--transition-fast),
        transform var(--transition-fast);
}

.pill:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary-dark);
    transform: translateY(-2px);
}

.related-strip {
    padding-block: 0.5rem 2rem;
}

.care-network-note {
    margin-top: 2rem;
    padding: 1.1rem 1.35rem;
    background: #fff;
    border: 1px solid var(--border);
    border-left: 4px solid var(--pulse-red);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    color: var(--ink-soft);
    width: 100%;
    box-shadow: var(--shadow-sm);
}

.post-byline {
    color: var(--ink-soft);
    font-size: 0.92rem;
    font-family: var(--font-data);
    margin: 0.25rem 0 0;
}

.post-featured {
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
}

.post-disclaimer {
    margin-top: 1.75rem;
}

.article-panel .post-disclaimer {
    margin-bottom: 0;
}

.prose--article > p:last-child {
    margin-bottom: 0;
}

/* --- Blog article layout (on-site posts) ------------------------------ */

.blog-article__body,
.blog-index {
    padding-block: 2.5rem 3.5rem;
}

.blog-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(15rem, 20rem);
    gap: 2rem 2.25rem;
    align-items: start;
}

.blog-layout__main {
    min-width: 0;
}

.article-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.35rem 1.5rem 1.6rem;
}

.article-panel .post-hero {
    margin: -1.35rem -1.5rem 1.45rem;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: none;
}

.prose--article {
    max-width: none;
}

.post-hero {
    position: relative;
    margin: 0 0 1.6rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface-2);
    box-shadow: var(--shadow-md);
}

.post-hero__img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
    vertical-align: middle;
}

.post-hero__date {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    display: inline-block;
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: #fff;
    font-family: var(--font-data);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow: var(--shadow-sm);
}

.post-date-inline {
    margin: 0 0 1.25rem;
    color: var(--pulse-red-text);
    font-family: var(--font-data);
    font-size: 0.88rem;
}

.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    position: sticky;
    top: 5.5rem;
}

.blog-widget {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.2rem 1.15rem;
    box-shadow: var(--shadow-sm);
}

.blog-widget__title {
    position: relative;
    margin: 0 0 1.15rem;
    padding-bottom: 0.7rem;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -0.01em;
}

.blog-widget__title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 2.6rem;
    height: 3px;
    border-radius: 999px;
    background: var(--primary);
}

.blog-recent {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.05rem;
}

.blog-recent__item {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
}

.blog-recent__item--thumb {
    grid-template-columns: 3.4rem minmax(0, 1fr);
    align-items: start;
    gap: 0.75rem;
}

.blog-recent__thumb {
    display: block;
    width: 3.4rem;
    height: 3.4rem;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.blog-recent__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blog-recent__copy {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

.blog-recent__link {
    color: var(--navy);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.4;
}

.blog-recent__link:hover {
    color: var(--pulse-red-text);
}

.blog-recent__date {
    color: var(--pulse-red-text);
    font-family: var(--font-data);
    font-size: 0.78rem;
    letter-spacing: 0.01em;
}

.blog-cats {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.blog-cats__link {
    display: grid;
    grid-template-columns: 1.7rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.55rem;
    padding: 0.65rem 0.15rem;
    color: var(--navy);
    text-decoration: none;
    border-bottom: 1px solid rgba(232, 220, 223, 0.8);
    transition: color var(--transition-fast);
}

.blog-cats li:last-child .blog-cats__link {
    border-bottom: 0;
}

.blog-cats__link:hover,
.blog-cats__link.is-active {
    color: var(--pulse-red-text);
}

.blog-cats__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--ink-soft);
}

.blog-cats__link:hover .blog-cats__icon,
.blog-cats__link.is-active .blog-cats__icon {
    border-color: var(--primary-border);
    color: var(--pulse-red-text);
    background: var(--primary-soft);
}

.blog-cats__icon svg {
    width: 0.85rem;
    height: 0.85rem;
}

.blog-cats__name {
    font-size: 0.95rem;
    font-weight: 600;
}

.blog-cats__count {
    font-family: var(--font-data);
    font-size: 0.85rem;
    color: var(--ink);
}

@media (max-width: 900px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        position: static;
        order: 2;
    }
}

/* --- Contact / appointment form --------------------------------------- */

.block-contact {
    padding-block: 2.5rem 1.5rem;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 860px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }
}

.contact-form-panel {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 2rem 1.9rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.contact-details {
    position: sticky;
    top: 90px;
    background: transparent;
}

.contact-details h3 {
    margin: 1.1rem 0 0.2rem;
    font-size: 0.98rem;
}

.contact-details p {
    margin: 0 0 0.5rem;
}

.field {
    margin-bottom: 1.05rem;
}

.field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--navy);
    font-size: 0.95rem;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font: inherit;
    background: #fff;
    color: var(--ink);
    min-height: 46px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.field input:hover,
.field select:hover,
.field textarea:hover {
    border-color: rgba(175, 22, 49, 0.35);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(238, 52, 78, 0.12);
    outline: none;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(238, 52, 78, 0.18);
}

.field textarea {
    min-height: auto;
    resize: vertical;
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
    border-color: var(--pulse-red);
    background: #FFF9FA;
}

.field-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

@media (max-width: 560px) {
    .field-pair {
        grid-template-columns: 1fr;
    }
}

.field-hint {
    color: var(--ink-soft);
    font-size: 0.85rem;
}

.field-hint-inline {
    color: var(--ink-soft);
    font-weight: 400;
    font-size: 0.82rem;
}

.radio {
    font-weight: 400;
}

.radio input {
    width: auto;
    min-height: auto;
    margin-right: 0.4rem;
    accent-color: var(--primary);
}

.consent-field {
    background: var(--mist);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.9rem 1.05rem;
}

.consent-field--error {
    outline: 2px solid var(--pulse-red);
}

.form-actions--start {
    display: flex;
    justify-content: flex-start;
    margin-top: 1.25rem;
}

.alert {
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    border: 1px solid transparent;
}

.alert--error {
    background: #FDECEE;
    color: #8F1D2C;
    border-color: #F5C1C8;
}

.alert ul {
    margin: 0.4rem 0 0;
    padding-left: 1.2rem;
}

/* --- Footer ---------------------------------------------------------- */

.site-footer {
    position: relative;
    background:
        radial-gradient(38rem 20rem at 88% 0%, rgba(238, 52, 78, 0.10), transparent 60%),
        var(--navy-deep);
    color: rgba(255, 255, 255, 0.88);
    margin-top: 4rem;
    padding-block: 3rem 1.25rem;
    font-size: 0.92rem;
}

.site-footer::before {
    /* red pulse line across the top edge */
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--pulse-red) 18%, var(--pulse-red) 82%, transparent);
    opacity: 0.85;
}

/* Practice block + up to four admin-managed link columns + contact.
   Column count is data-driven (empty menus are skipped), so the grid
   flexes: wide bookend columns, narrow link columns between. */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
    gap: 2rem 1.75rem;
}

.footer-col--practice,
.footer-col--contact {
    min-width: 13rem;
}

@media (max-width: 1000px) {
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-col--practice,
    .footer-col--contact {
        grid-column: span 3;
    }
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-col--practice,
    .footer-col--contact {
        grid-column: span 2;
    }
}

@media (max-width: 560px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-col--practice,
    .footer-col--contact {
        grid-column: auto;
    }
}

.footer-brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    color: #fff;
    margin: 0 0 0.5rem;
}

.footer-col__title {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.55);
    margin: 0 0 0.7rem;
    font-family: var(--font-data);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-col li {
    margin-bottom: 0.45rem;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.site-footer a:hover {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.footer-contact span {
    color: rgba(255, 255, 255, 0.55);
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    list-style: none;
    margin: 0.85rem 0 0;
    padding: 0;
}

.social-links li {
    margin: 0;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.45rem;
    height: 2.45rem;
    border-radius: 50%;
    text-decoration: none;
    transition:
        background-color var(--transition-fast),
        border-color var(--transition-fast),
        color var(--transition-fast),
        transform var(--transition-fast);
}

.social-links a svg {
    width: 1.15rem;
    height: 1.15rem;
}

.social-links--footer a {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.social-links--footer a:hover,
.social-links--footer a:focus-visible {
    text-decoration: none;
    background: var(--pulse-red);
    border-color: var(--pulse-red);
    color: #fff;
    transform: translateY(-2px);
}

.social-links--light {
    margin-top: 0.55rem;
}

.social-links--light a {
    color: var(--navy);
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.social-links--light a:hover,
.social-links--light a:focus-visible {
    text-decoration: none;
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

.footer-address {
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    margin-top: 2.25rem;
    padding-top: 1.1rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom p {
    margin: 0;
}

.footer-bottom__links {
    display: flex;
    gap: 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* --- Mobile action bar ------------------------------------------------ */

.mobile-action-bar {
    display: none;
}

@media (max-width: 720px) {
    .mobile-action-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        display: flex;
        z-index: 80;
        background: rgba(255, 255, 255, 0.92);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid var(--border);
        box-shadow: 0 -4px 16px rgba(34, 26, 30, 0.10);
        padding-bottom: env(safe-area-inset-bottom, 0);
    }

    .mobile-action-bar a {
        flex: 1;
        text-align: center;
        padding: 0.9rem 0.5rem;
        text-decoration: none;
        font-weight: 600;
        font-size: 0.95rem;
        color: var(--navy);
        min-height: 44px;
    }

    .mobile-action-bar__primary {
        background: var(--grad-primary);
        color: #fff !important;
    }

    body {
        padding-bottom: 56px; /* keep content clear of the action bar */
    }
}

/* --- Legacy Phase-0 scaffold classes (kept for safety) ---------------- */

.hero {
    padding-block: 3.5rem;
}

.hero__eyebrow {
    color: var(--pulse-red-text);
    font-family: var(--font-data);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.85rem;
}

.hero__lede {
    color: var(--ink-soft);
    max-width: 40rem;
}

/* --- Reviews: field errors, star input, cards, CTA -------------------- */

.field-error {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    color: #8F1D2C;
    font-size: 0.86rem;
    margin: 0.35rem 0 0;
}

.field-error::before {
    content: "!";
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #8F1D2C;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    transform: translateY(1px);
}

input[aria-invalid="true"],
textarea[aria-invalid="true"],
select[aria-invalid="true"] {
    border-color: var(--pulse-red) !important;
    background: #FFF9FA;
}

/* Star rating input: reversed row so CSS sibling selectors light up
   every star at or below the hovered/selected one. */
.rating-field legend {
    font-weight: 600;
    color: var(--navy);
    font-size: 0.95rem;
    padding: 0;
    margin-bottom: 0.35rem;
}

fieldset.rating-field {
    border: 0;
    padding: 0;
    margin: 0 0 1.05rem;
}

.rating-input {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 0.15rem;
}

.rating-input input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.rating-input label {
    font-size: 2rem;
    line-height: 1;
    color: #D9CBCE;
    cursor: pointer;
    padding: 0.1rem 0.15rem;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.rating-input label:hover,
.rating-input label:hover ~ label,
.rating-input input:checked ~ label {
    color: var(--pulse-red);
}

.rating-input label:hover {
    transform: scale(1.12);
}

.rating-input input:focus-visible + label {
    outline: 3px solid var(--navy);
    outline-offset: 2px;
    border-radius: 6px;
}

/* Honeypot: parked off-screen, still submittable by naive bots. */
.hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    height: 1px;
    overflow: hidden;
}

.testimonial-card__source {
    display: block;
    margin-top: 0.35rem;
    color: var(--ink-soft);
    font-family: var(--font-data);
    font-size: 0.75rem;
    letter-spacing: 0.02em;
}

.testimonial-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
}

.testimonial-head .section-heading {
    margin: 0;
}

.testimonial-head .button {
    margin-left: auto;
    flex-shrink: 0;
}

.review-dialog {
    width: min(32rem, calc(100vw - 1.5rem));
    max-height: calc(100vh - 1.5rem);
    padding: 0;
    border: 0;
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow-lg);
    color: inherit;
}

.review-dialog::backdrop {
    background: rgba(28, 36, 52, 0.55);
}

.review-dialog__panel {
    position: relative;
    padding: 1.6rem 1.5rem 1.4rem;
    overflow: auto;
    max-height: calc(100vh - 1.5rem);
}

.review-dialog__close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--navy);
    cursor: pointer;
}

.review-dialog__close svg {
    width: 1.15rem;
    height: 1.15rem;
}

.review-dialog__close:hover,
.review-dialog__close:focus-visible {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.review-dialog .section-heading {
    padding-right: 2.2rem;
    margin-bottom: 0.4rem;
}

.review-dialog__intro {
    margin: 0 0 1.1rem;
    color: var(--ink-soft);
    font-size: 0.95rem;
    line-height: 1.55;
}

.review-dialog .review-success .section-heading {
    padding-right: 0;
}

.contact-form-panel--review {
    max-width: 44rem;
    margin-inline: auto;
}

.review-success {
    text-align: center;
    padding: 1.5rem 0.5rem;
}

/* --- Gallery albums, event grid, lightbox, video cards ----------------- */

.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.2rem;
    margin-top: 1.5rem;
}

.gallery-albums-heading {
    margin-top: 2rem;
}

.album-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 0;
    overflow: hidden;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.album-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-border);
}

.album-card__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    background: var(--surface-2);
}

.album-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-slow);
}

.album-card:hover .album-card__media img {
    transform: scale(1.04);
}

.album-card__count {
    position: absolute;
    right: 0.7rem;
    bottom: 0.7rem;
    background: rgba(19, 26, 40, 0.75);
    color: #fff;
    font-family: var(--font-data);
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
}

.album-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 1.1rem 1.2rem 1.15rem;
}

.album-card__title {
    margin: 0;
    font-size: 1.05rem;
}

.album-card__meta {
    color: var(--ink-soft);
    font-size: 0.78rem;
}

.album-card__desc {
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.gallery-grid--album .gallery-item {
    box-shadow: var(--shadow-sm);
}

.gallery-item__open {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
    border-radius: 0;
    line-height: 0;
}

.gallery-item__open img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: opacity var(--transition-normal);
}

.gallery-item:hover .gallery-item__open img {
    opacity: 0.92;
}

.album-back {
    margin-top: 2rem;
}

/* Lightbox */
body.lightbox-open {
    overflow: hidden;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(12, 16, 26, 0.92);
    padding: 3.5rem 4.5rem;
}

.lightbox[hidden] {
    display: none;
}

.lightbox__figure {
    margin: 0;
    max-width: min(70rem, 100%);
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

.lightbox__img {
    max-width: 100%;
    max-height: calc(100vh - 9rem);
    width: auto;
    height: auto;
    border-radius: 0;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.lightbox__caption {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.92rem;
    text-align: center;
    max-width: 46rem;
}

.lightbox__caption[hidden] {
    display: none;
}

.lightbox__counter {
    position: absolute;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    margin: 0;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.8rem;
}

.lightbox__btn {
    position: absolute;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.lightbox__btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox__btn svg {
    width: 22px;
    height: 22px;
}

.lightbox__btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.lightbox__close { top: 1rem; right: 1rem; }
.lightbox__prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 1rem; top: 50%; transform: translateY(-50%); }

@media (max-width: 640px) {
    .lightbox {
        padding: 3.25rem 0.75rem;
    }

    .lightbox__prev { left: 0.4rem; }
    .lightbox__next { right: 0.4rem; }
}

/* Shared content list â€” vertical stack of horizontal rows
   (thumbnail left, title/copy right). Used by Media + Blog. */
.content-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.content-row {
    display: grid;
    grid-template-columns: minmax(140px, 240px) minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    color: inherit;
    text-decoration: none;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.content-row:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-border);
    color: inherit;
}

.content-row__media {
    position: relative;
    display: block;
    min-height: 120px;
    background: var(--surface-2, #eef1f5);
    overflow: hidden;
}

.content-row__media--video {
    background: #0b0f18;
}

.content-row__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-normal);
}

.content-row:hover .content-row__media img {
    transform: scale(1.04);
}

.content-row__media .video-cover-card__play {
    position: absolute;
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    margin: 0;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
}

.content-row:hover .content-row__media .video-cover-card__play {
    transform: translate(-50%, -50%) scale(1.07);
    background: var(--primary);
}

.content-row__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
    padding: 1.1rem 1.35rem;
}

.content-row__title {
    margin: 0;
    font-size: clamp(1.02rem, 2.2vw, 1.2rem);
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.content-row__desc {
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.92rem;
    line-height: 1.5;
}

.content-row .service-card__more {
    margin-top: 0.45rem;
}

.content-row:hover .service-card__more::after {
    transform: translateX(4px);
}

@media (max-width: 640px) {
    .content-row {
        grid-template-columns: 1fr;
    }

    .content-row__media {
        aspect-ratio: 16 / 9;
        min-height: 0;
    }
}

/* Video detail player still uses .video-card__media */
.video-card__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background: #0b0f18;
    overflow: hidden;
}

.video-card__media video,
.video-card__media iframe,
.video-card__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    object-fit: cover;
}

.video-card__poster {
    position: absolute;
    inset: 0;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.video-card__media .video-cover-card__play {
    position: absolute;
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    margin: 0;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* Video detail (/media/{slug}) */
.video-detail {
    padding-block: 2.25rem 3rem;
}

.video-panel {
    padding: 1rem 1rem 1.35rem;
}

.video-detail__player {
    margin: 0 0 1.15rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: none;
    background: #0b0f18;
}

.video-detail__player .video-card__media {
    border-radius: var(--radius-md);
}

.video-detail__body {
    max-width: none;
    margin: 0;
    padding: 0.15rem 0.35rem 0;
}

.video-detail__watch {
    margin: 1rem 0.35rem 0;
}

.video-detail__body p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 1.05rem;
    line-height: 1.65;
}

/* --- Site popup (admin-managed) --------------------------------------- */

.site-popup {
    width: min(34rem, calc(100vw - 1.5rem));
    max-height: calc(100vh - 1.5rem);
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 18px 48px rgba(28, 36, 52, 0.22);
    overflow: hidden;
}

.site-popup::backdrop {
    background: rgba(19, 26, 40, 0.48);
}

.site-popup__panel {
    position: relative;
    max-height: calc(100vh - 1.5rem);
    overflow: auto;
}

.site-popup__close {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    z-index: 2;
    width: 2.2rem;
    height: 2.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--navy);
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(28, 36, 52, 0.12);
}

.site-popup__close svg {
    width: 1rem;
    height: 1rem;
}

.site-popup__close:hover,
.site-popup__close:focus-visible {
    background: var(--surface-2);
    color: var(--primary-dark);
}

.site-popup__media {
    margin: 0;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
}

.site-popup__media img {
    display: block;
    width: 100%;
    height: auto;
}

.site-popup__content {
    padding: 1.35rem 1.4rem 1.4rem;
}

.site-popup__heading {
    margin: 0 0 0.75rem;
    padding-right: 2rem;
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2.8vw, 1.45rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.012em;
    color: var(--navy);
}

.site-popup__body {
    color: var(--ink-soft);
    font-size: 0.98rem;
    line-height: 1.65;
}

.site-popup__body p {
    margin: 0 0 0.8rem;
}

.site-popup__body p:last-child {
    margin-bottom: 0;
}

.site-popup__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1.25rem;
}

@media (max-width: 520px) {
    .site-popup__content {
        padding: 1.15rem 1.1rem 1.2rem;
    }

    .site-popup__actions {
        flex-direction: column;
    }

    .site-popup__actions .button {
        width: 100%;
        justify-content: center;
    }
}

