/* ================================================================
   Medizuno — public website styles
   Palette: navy (#0d2b5e), medical blue (#1a73e8), light blue (#eaf3fd),
   light gray (#f5f8fc), white. Professional, clean, medical.
   ================================================================ */

:root {
    --navy: #0d2b5e;
    --navy-deep: #081d42;
    --navy-soft: #143a7b;
    --blue: #1a73e8;
    --blue-strong: #1258c3;
    --blue-soft: #eaf3fd;
    --blue-glow: rgba(26, 115, 232, 0.35);
    --green: #16a86f;
    --violet: #7c5cdf;
    --orange: #f59e0b;
    --teal: #06b6d4;
    --bg: #ffffff;
    --bg-soft: #f5f8fc;
    --bg-panel: #ffffff;
    --line: #e4ebf4;
    --text: #1f2b40;
    --text-soft: #5a6b85;
    /* Darkened from #8a97ab (2.95:1 on white) to meet 4.5:1 for small text. */
    --text-faint: #5f6f86;
    --danger: #dc3545;
    --ok: #16a86f;
    --focus: #1a73e8;
    --link: #1a73e8;
    --radius: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 2px 10px rgba(13, 43, 94, 0.06);
    --shadow-md: 0 10px 30px rgba(13, 43, 94, 0.10);
    --shadow-lg: 0 24px 60px rgba(13, 43, 94, 0.16);
    --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

[data-theme="dark"] {
    --bg: #0b1524;
    --bg-soft: #0e1a2d;
    --bg-panel: #101f36;
    --line: #1e3050;
    --text: #dbe6f5;
    --text-soft: #9db2cf;
    /* Lightened from #6d84a6 (4.32:1) to meet 4.5:1 on #101f36 panels. */
    --text-faint: #93a9c9;
    --blue-soft: #12254a;
    --focus: #8ab4ff;
    --link: #8ab4ff;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    /* Offset is applied directly to heading targets via scroll-margin-top
       below, so do not add scroll-padding here (it would double the gap). */
}

/* Prevent any horizontal scrolling (off-canvas mobile drawer, decorative
   blobs). `clip` keeps position:sticky working, unlike `hidden`. */
html, body { overflow-x: clip; }
@supports not (overflow: clip) {
    html, body { overflow-x: hidden; }
}

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    font-size: 15.5px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-strong); }

.med-container {
    width: min(1240px, 92%);
    margin: 0 auto;
}

/* ================================================================
   Header — clean single-row navigation (top bar removed by design)
   ================================================================ */

/* The header is injected into #site-header together with the news bar.
   `display: contents` removes that wrapper's box so the sticky header can
   travel with the page instead of being trapped inside a 98px-tall parent. */
#site-header { display: contents; }

/* The header/news bar are painted by JS. Reserve their exact combined height
   until .med-header exists so the hero does not jump ~98px on mobile. */
body:not(:has(.med-header))::before {
    content: "";
    display: block;
    height: 117px;
}
@media (max-width: 700px) {
    body:not(:has(.med-header))::before { height: 98px; }
}
@media print {
    body:not(:has(.med-header))::before { display: none; }
}

.med-header {
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 90;
    transition: box-shadow 0.25s, background 0.25s, transform 0.25s;
}

.med-header.is-stuck {
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    box-shadow: var(--shadow-md);
}

.med-header__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 78px;
}

.med-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.med-logo__mark { width: 44px; height: 44px; flex-shrink: 0; }

.med-logo__text { display: flex; flex-direction: column; line-height: 1.15; }
.med-logo__text strong { font-size: 24px; color: var(--navy); letter-spacing: -0.4px; font-weight: 800; }
.med-logo__text strong em { font-style: normal; color: var(--blue); font-weight: 800; }
.med-logo__text small { color: var(--text-soft); font-size: 10.5px; letter-spacing: 0.4px; }

.med-nav ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }

.med-nav__item { position: relative; }

.med-nav__item > a {
    display: block;
    padding: 10px 12px;
    color: var(--text);
    font-weight: 600;
    font-size: 14.5px;
    border-bottom: 2.5px solid transparent;
    border-radius: 8px 8px 0 0;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.med-nav__item > a:hover { color: var(--blue); background: var(--blue-soft); }
.med-nav__item > a.is-active { color: var(--blue); border-bottom-color: var(--blue); }

.med-nav__sub {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: 0 0 10px 10px;
    box-shadow: var(--shadow-md);
    list-style: none;
    margin: 0;
    padding: 8px;
    flex-direction: column;
    gap: 2px;
}
.med-nav__item.has-sub:hover .med-nav__sub { display: flex; }
.med-nav__sub a { display: block; padding: 8px 12px; color: var(--text-soft); border-radius: 8px; font-size: 14px; }
.med-nav__sub a:hover { background: var(--blue-soft); color: var(--blue); }

.med-header__actions { display: flex; align-items: center; gap: 8px; }

/* ================================================================
   News bar — slim headline marquee above the main header
   ================================================================ */

.med-newsbar {
    display: flex;
    align-items: center;
    height: 38px;
    overflow: hidden;
    background: linear-gradient(90deg, #0d2b5e 0%, var(--blue) 58%, #164a9f 100%);
    color: #eaf2ff;
    position: relative;
    z-index: 60;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.med-newsbar__label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    align-self: stretch;
    padding: 0 16px 0 18px;
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    color: #ffffff;
    background: rgba(7, 20, 49, 0.32);
    border-right: 1px solid rgba(255, 255, 255, 0.16);
}

.med-newsbar__label i {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6ee7b7;
}
.med-newsbar__label i::after {
    content: "";
    position: absolute;
    inset: -1px;
    border: 1px solid rgba(110, 231, 187, 0.55);
    border-radius: 50%;
    animation: med-news-pulse 2s ease-out infinite;
}

@keyframes med-news-pulse {
    0%        { transform: scale(1); opacity: 0.8; }
    70%, 100% { transform: scale(2.2); opacity: 0; }
}

.med-newsbar__viewport {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
}

/* The track holds the SAME list twice; animating to translateX(-50%)
   moves exactly one copy → a seamless, infinite right-to-left loop. */
.med-newsbar__track {
    display: flex;
    align-items: center;
    width: max-content;
    white-space: nowrap;
    animation: med-news-marquee 46s linear infinite;
    will-change: transform;
}

.med-newsbar__group {
    display: flex;
    align-items: center;
    gap: 40px;
    padding-right: 40px;
}

.med-newsbar__track a {
    color: #eaf2ff;
    font-size: 13px;
    font-weight: 600;
    transition: color 0.2s;
}
.med-newsbar__track a:hover { color: #9ec7ff; text-decoration: underline; text-underline-offset: 3px; }

.med-newsbar__sep { color: rgba(255, 255, 255, 0.4); font-size: 10px; }

@keyframes med-news-marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* Pause the scroll while the reader hovers a headline. */
.med-newsbar:hover .med-newsbar__track { animation-play-state: paused; }

.med-quicksearch {
    display: flex;
    align-items: center;
    background: var(--bg-soft);
    border: 1.5px solid var(--line);
    border-radius: 999px;
    padding: 4px 6px 4px 16px;
    transition: border 0.2s, box-shadow 0.2s;
    max-width: 250px;
}
.med-quicksearch:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-glow); }
.med-quicksearch input {
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 13.5px;
    color: var(--text);
    width: 168px;
    padding: 6px 8px 6px 0;
    outline: none;
}
.med-quicksearch button {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}
.med-quicksearch button:hover { background: var(--blue-strong); }

.med-iconbtn {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1.5px solid var(--line);
    background: var(--bg-panel);
    color: var(--blue);
    border-radius: 12px;
    cursor: pointer;
    font-size: 17px;
    transition: border 0.2s, transform 0.2s, background 0.2s;
}
.med-iconbtn:hover { border-color: var(--blue); transform: translateY(-1px); }
.med-burger { display: none; }

/* ================================================================
   Page hero (generic inner pages)
   ================================================================ */

.med-pagehero {
    background: linear-gradient(140deg, var(--navy) 0%, var(--navy-soft) 60%, #10408a 100%);
    color: #fff;
    padding: 46px 0 40px;
    position: relative;
    overflow: hidden;
}
.med-pagehero::after {
    content: '';
    position: absolute;
    right: -60px; top: -60px;
    width: 280px; height: 280px;
    background: radial-gradient(circle, rgba(47, 127, 241, 0.35), transparent 65%);
}
.med-pagehero h1 { margin: 0 0 8px; font-size: 34px; letter-spacing: -0.5px; }
.med-pagehero p { margin: 0; color: #b9cdf2; max-width: 640px; }
.med-breadcrumb { display: flex; gap: 8px; align-items: center; font-size: 13px; color: #a9c4ee; margin-bottom: 14px; }
.med-breadcrumb a { color: #e6efff; }
.med-breadcrumb svg { opacity: 0.7; }

/* ================================================================
   Hero — full-bleed background slider (8 images, cross-fade + zoom)
   ================================================================ */

.med-hero {
    position: relative;
    height: 430px; /* compact hero — reduced from 560px */
    overflow: hidden;
    isolation: isolate;
}

.med-hero__bg { position: absolute; inset: 0; z-index: -2; }

/* All 8 photos are stacked in the SAME container, absolutely positioned.
   Exactly one slide is ever visible: every other one stays fully hidden
   (opacity:0 + visibility:hidden + z-index:0). */
.med-hero__slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    visibility: hidden;
    z-index: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 1s ease, visibility 0s linear 1s, transform 4.5s cubic-bezier(0.2, 0.6, 0.3, 1);
    will-change: opacity, transform;
    background: #0d2b5e; /* visible instantly if an image is slow */
}

.med-hero__slide img { display: block; width: 100%; height: 100%; object-fit: cover; }

.med-hero__slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
    transition: opacity 1s ease, visibility 0s, transform 4.5s cubic-bezier(0.2, 0.6, 0.3, 1);
    transform: scale(1.08);
}

/* Readability scrim — dark navy wash that keeps text crisp over
   every photo while allowing the imagery to stay visible. */
.med-hero__scrim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(100deg, rgba(7, 20, 49, 0.88) 0%, rgba(7, 20, 49, 0.62) 42%, rgba(7, 20, 49, 0.18) 72%, rgba(10, 26, 60, 0.38) 100%),
        linear-gradient(180deg, rgba(7, 20, 49, 0.25) 0%, transparent 30%, rgba(7, 20, 49, 0.45) 100%);
}

/* Floating decorative glow blobs */
.med-hero__blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    pointer-events: none;
    animation: med-blob 16s ease-in-out infinite alternate;
}
.med-hero__blob--1 {
    width: 320px; height: 320px;
    right: -70px; top: -90px;
    background: radial-gradient(circle, rgba(47, 127, 241, 0.55), transparent 70%);
}
.med-hero__blob--2 {
    width: 260px; height: 260px;
    right: 24%; bottom: -110px;
    background: radial-gradient(circle, rgba(22, 168, 111, 0.35), transparent 70%);
    animation-delay: -8s;
}
@keyframes med-blob {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(-40px, 26px, 0) scale(1.12); }
}

.med-hero__content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 22px 0;
}

.med-hero__copy { max-width: 660px; }

.med-hero__badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #dbe9ff;
    font-weight: 700;
    font-size: 12px;
    padding: 6px 15px;
    border-radius: 999px;
    margin-bottom: 14px;
    letter-spacing: 0.3px;
    box-shadow: 0 8px 24px rgba(5, 15, 40, 0.25);
}

.med-hero__title {
    margin: 0;
    font-size: clamp(32px, 3.5vw, 46px);
    line-height: 1.08;
    letter-spacing: -1.2px;
    color: #ffffff;
    font-weight: 800;
    text-wrap: balance;
    text-shadow: 0 2px 24px rgba(5, 15, 40, 0.45);
}
.med-hero__title .alt {
    display: block;
    /* Solid light blue keeps the accent readable for WAVE/screen readers;
       transparent gradient text fails WCAG contrast on dark backgrounds. */
    color: #9ec7ff;
}

.med-hero__text {
    margin: 12px 0 20px;
    color: #d7e3f5;
    font-size: 16.5px;
    line-height: 1.6;
    max-width: 540px;
    text-shadow: 0 1px 14px rgba(5, 15, 40, 0.5);
}

.med-hero__search {
    display: flex;
    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    padding: 5px 5px 5px 18px;
    box-shadow: 0 18px 44px rgba(5, 15, 40, 0.4);
    max-width: 560px;
    transition: border 0.25s, box-shadow 0.25s, background 0.25s;
}
.med-hero__search:focus-within {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(158, 199, 255, 0.75);
    box-shadow: 0 0 0 5px rgba(47, 127, 241, 0.25), 0 18px 44px rgba(5, 15, 40, 0.4);
}
.med-hero__search svg { color: #c9d9f2; align-self: center; flex-shrink: 0; }

.med-hero__search input {
    border: 0;
    background: transparent;
    flex: 1;
    min-width: 0;
    font: inherit;
    font-size: 14.5px;
    color: #ffffff;
    padding: 10px 12px 10px 10px;
    outline: none;
}
.med-hero__search input::placeholder { color: #b7c9e6; }

.med-hero__search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    color: #fff;
    font-size: 14px;
    background: linear-gradient(135deg, var(--blue) 0%, #164a9f 100%);
    padding: 10px 26px;
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(26, 115, 232, 0.45);
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}
.med-hero__search button:hover {
    transform: translateY(-2px) scale(1.02);
    filter: brightness(1.08);
    box-shadow: 0 12px 28px rgba(26, 115, 232, 0.55);
}
.med-hero__search button:active { transform: translateY(0); }

.med-hero__trust {
    display: flex;
    gap: 18px;
    margin-top: 22px;
    flex-wrap: wrap;
}

.med-trust {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 10px 16px 10px 10px;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(5, 15, 40, 0.3);
    transition: transform 0.25s, background 0.25s;
}
.med-trust:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.16);
}

.med-trust__icon {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 6px 16px rgba(5, 15, 40, 0.25);
    color: var(--blue);
    flex-shrink: 0;
}
.med-trust__icon--green { color: var(--green); }
.med-trust__icon--orange { color: var(--orange); }
.med-trust strong { display: block; color: #ffffff; font-size: 13.5px; }
.med-trust small { color: #c7d6ef; font-size: 12px; }

/* --- Slider controls -------------------------------------------- */

.med-hero__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50%;
    cursor: pointer;
    opacity: 0.75;
    transition: opacity 0.2s, background 0.2s, transform 0.2s;
}
.med-arrow,
.med-hero__arrow { appearance: none; }
.med-hero__arrow:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.24);
}
.med-hero__arrow--prev { left: 18px; }
.med-hero__arrow--next { right: 18px; }
.med-hero__arrow--prev:hover { transform: translateY(-50%) scale(1.08); }
.med-hero__arrow--next:hover { transform: translateY(-50%) scale(1.08); }
.med-hero__arrow svg { stroke: currentColor; }

.med-hero__dots {
    position: absolute;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    z-index: 4;
    display: flex;
    gap: 0;
    /* Reserve the injected dot row so it does not resize on JS paint. */
    min-width: 214px;
    padding: 8px 14px;
    background: rgba(7, 20, 49, 0.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
}

/* 24x24 hit area; the small visual dot is a pseudo-element so touch targets
   are large without changing the design. Only transform animates. */
.med-hero__dot {
    appearance: none;
    box-sizing: border-box;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    background: none;
    display: grid;
    place-items: center;
    cursor: pointer;
}
.med-hero__dot::after {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    transition: transform 0.3s ease;
}
.med-hero__dot:hover::after { background: rgba(255, 255, 255, 0.75); transform: scale(1.15); }
.med-hero__dot.is-active::after {
    transform: scaleX(2.889);
    background: linear-gradient(90deg, #6ea8ff, #2f7ff1);
}

/* --- Hero entrance + floating chips ------------------------------ */

[data-anim] {
    /* Keep text fully opaque so contrast tools and screen readers see the
       real colours; animate position only. */
    transform: translateY(26px);
    animation: med-hero-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
[data-anim="1"] { animation-delay: 0.15s; }
[data-anim="2"] { animation-delay: 0.3s; }
[data-anim="3"] { animation-delay: 0.45s; }
[data-anim="4"] { animation-delay: 0.62s; }
[data-anim="5"] { animation-delay: 0.8s; }
[data-anim="6"] { animation-delay: 0.98s; }

@keyframes med-hero-in {
    from { transform: translateY(26px); }
    to   { transform: translateY(0); }
}

.med-hero__floats { position: absolute; inset: 0; pointer-events: none; z-index: 2; }

.med-hero__float {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff;
    border-radius: 999px;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 12px 30px rgba(5, 15, 40, 0.35);
    white-space: nowrap;
    animation: med-float 5.5s ease-in-out infinite;
}
.med-hero__float::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6ee7b7, #2f7ff1);
    box-shadow: 0 0 10px rgba(110, 231, 183, 0.8);
}

.med-hero__float--1 { top: 20%; right: 8%; animation-delay: 0.4s; }
.med-hero__float--2 { top: 46%; right: 20%; animation-delay: 1.3s; }
.med-hero__float--3 { bottom: 17%; right: 13%; animation-delay: 2.2s; }

@keyframes med-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* ================================================================
   Scroll-reveal animations
   ================================================================ */

[data-reveal] {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-reveal].is-revealed {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .med-hero__float, .med-hero__blob { animation: none; }
    [data-anim] { animation: none; opacity: 1; transform: none; }
    [data-reveal] { opacity: 1; transform: none; transition: none; }
    .med-hero__slide { transition: none; }
    .med-hero__slide.is-active { animation: none; transform: none; }
    html { scroll-behavior: auto; }
    .med-btn, .med-card, .med-hero__search button, .med-trust { transition: none; }
}

/* ================================================================
   Footer contact line (moved from the retired top bar)
   ================================================================ */

.med-footer__contact {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.med-footer__contact span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #9db7df;
    font-size: 13px;
}
.med-footer__contact svg { color: #6f93c9; flex-shrink: 0; }
.med-footer__contact a { color: #cfdffb; }
.med-footer__contact a:hover { color: #ffffff; }

/* ================================================================
   Category strip
   ================================================================ */

.med-categories { padding: 34px 0 10px; }

.med-categories__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 8px 14px;
}

.med-cat {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 12px;
    border-radius: 12px;
    transition: background 0.2s, transform 0.2s;
}
.med-cat:hover { background: var(--blue-soft); transform: translateY(-2px); }
.med-cat:hover small { color: var(--blue); }

.med-cat__icon {
    width: 54px; height: 54px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 8px 18px rgba(13, 43, 94, 0.14);
}
.med-cat__icon--health { background: linear-gradient(135deg, #21c086, #119a63); }
.med-cat__icon--medicine { background: linear-gradient(135deg, #3787f7, #1d5ecf); }
.med-cat__icon--pharmacy { background: linear-gradient(135deg, #8b66ec, #6b48d4); }
.med-cat__icon--lifestyle { background: linear-gradient(135deg, #ffb327, #ec8816); }
.med-cat__icon--wellness { background: linear-gradient(135deg, #19c5de, #0a9fb6); }

.med-cat__text { display: flex; flex-direction: column; min-width: 0; }
.med-cat__text strong { color: var(--navy); font-size: 16px; }
.med-cat__text small {
    color: var(--text-soft);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

/* ================================================================
   Section headers
   ================================================================ */

.med-section { padding: 30px 0 46px; }

.med-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.med-section__title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-size: 25px;
    color: var(--navy);
    letter-spacing: -0.4px;
}
.med-section__title::before {
    content: '';
    width: 5px;
    height: 26px;
    border-radius: 4px;
    background: var(--blue);
    box-shadow: 0 6px 14px var(--blue-glow);
}
.med-section__title small { color: var(--text-faint); font-weight: 500; font-size: 13px; }

.med-link {
    color: #1668d2;
    font-weight: 700;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.med-link:hover { gap: 10px; }

/* ================================================================
   Article cards + grid
   ================================================================ */

.med-layout {
    display: grid;
    grid-template-columns: 1fr 330px;
    gap: 34px;
    align-items: start;
}

.med-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.med-grid--2 { grid-template-columns: repeat(2, 1fr); }

.med-card {
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    display: flex;
    flex-direction: column;
}
.med-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: #cfe0fa;
}

.med-card__media { position: relative; display: block; aspect-ratio: 16 / 10.5; overflow: hidden; background: var(--blue-soft); }
.med-card__media picture { display: block; width: 100%; height: 100%; }
.med-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.med-card:hover .med-card__media img { transform: scale(1.06); }

.med-card__placeholder {
    width: 100%; height: 100%;
    display: grid; place-items: center;
    color: rgba(255, 255, 255, 0.92);
}

.med-card__badge {
    position: absolute;
    top: 12px; left: 12px;
    background: var(--blue);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}
.med-card__badge:hover { background: var(--navy); color: #fff; }
.med-card__badge a { color: inherit; display: block; }
.med-card__badge--health { background: var(--green); }
.med-card__badge--pharmacy { background: var(--violet); }
.med-card__badge--lifestyle { background: var(--orange); }
.med-card__badge--wellness { background: var(--teal); }
.med-card__badge--medicine { background: var(--blue); }

.med-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.med-card__title { margin: 0; font-size: 17.5px; line-height: 1.4; letter-spacing: -0.2px; }
.med-card__title a { color: var(--navy); }
.med-card__title a:hover { color: var(--blue); }
.med-card__excerpt { margin: 0; color: var(--text-soft); font-size: 13.8px; line-height: 1.55; flex: 1; }

.med-card__meta {
    display: flex;
    gap: 16px;
    color: var(--text-faint);
    font-size: 12.5px;
    border-top: 1px dashed var(--line);
    padding-top: 12px;
    margin-top: 2px;
}
.med-card__meta span { display: inline-flex; align-items: center; gap: 6px; }

/* Skeletons */
.med-skeleton {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--bg-soft);
}
.med-skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, var(--line) 50%, transparent 100%);
    transform: translateX(-100%);
    animation: med-shimmer 1.4s infinite;
}
.med-skeleton--card { height: 320px; }
@keyframes med-shimmer {
    100% { transform: translateX(100%); }
}

/* ================================================================
   Sidebar: popular posts + newsletter box
   ================================================================ */

.med-side__box {
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 22px;
    margin-bottom: 24px;
}

.med-side__title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    font-size: 18px;
    color: var(--navy);
}

.med-popular { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }

.med-popular__item { display: flex; align-items: center; gap: 12px; }
.med-popular__num {
    width: 26px; height: 26px;
    border-radius: 8px;
    background: var(--blue-soft);
    color: var(--blue);
    display: grid; place-items: center;
    font-weight: 800;
    font-size: 13px;
    flex-shrink: 0;
}
.med-popular__link { display: flex; gap: 12px; align-items: center; color: inherit; flex: 1; min-width: 0; }
.med-popular__link picture { display: block; width: 56px; height: 50px; flex-shrink: 0; }
.med-popular__link picture img { width: 56px; height: 50px; object-fit: cover; border-radius: 9px; flex-shrink: 0; }
.med-popular__link img { width: 56px; height: 50px; object-fit: cover; border-radius: 9px; flex-shrink: 0; }
.med-popular__noimg { width: 56px; height: 50px; border-radius: 9px; background: var(--blue-soft); flex-shrink: 0; }
.med-popular__link span { min-width: 0; }
.med-popular__link strong {
    display: block; color: var(--text); font-size: 13.8px; line-height: 1.35; font-weight: 600;
    overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.med-popular__link:hover strong { color: var(--blue); }

/* Sidebar "More categories" — compact cards for inside the sidebar box.
   minmax() auto-stacks to one column when the box is narrow, so the
   category text always stays inside the box (never squeezed out). */
.med-followcats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 6px;
    margin-top: 14px;
}
.med-followcats .med-cat {
    min-width: 0;            /* grid child may never exceed its cell */
    padding: 12px 10px;
    gap: 10px;
    /* keep row layout even on phones (homepage centred look not wanted here) */
    flex-direction: row;
    align-items: center;
    text-align: left;
}
.med-followcats .med-cat__icon { width: 42px; height: 42px; border-radius: 12px; }
.med-followcats .med-cat__icon svg { width: 18px; height: 18px; }
.med-followcats .med-cat__text { min-width: 0; width: auto; max-width: 100%; }
.med-followcats .med-cat__text strong {
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.med-followcats .med-cat__text small {
    font-size: 11.5px;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: clip;
    white-space: normal;
}
.med-popular__link small { color: var(--text-faint); font-size: 11.5px; display: inline-flex; align-items: center; gap: 5px; margin-top: 3px; }

/* Newsletter box */
.med-newsletter {
    background: linear-gradient(150deg, var(--blue) 0%, #0d3f9c 100%);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 34px 28px;
    box-shadow: 0 16px 34px rgba(26, 115, 232, 0.3);
}
.med-newsletter::before,
.med-newsletter::after {
    content: "";
    display: block;
    height: 6px;
}
.med-newsletter__title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.35;
    color: #fff;
    letter-spacing: -0.2px;
}
.med-newsletter__title svg { flex: 0 0 auto; }
.med-newsletter p { margin: 0 0 20px; color: #dce8fc; font-size: 13.4px; line-height: 1.6; }
.med-newsletter__form {
    background: #fff;
    border-radius: 999px;
    display: flex;
    padding: 5px;
    position: relative;
}
.med-newsletter__form input {
    flex: 1;
    border: 0;
    outline: none;
    min-width: 0;
    padding: 13px 8px 13px 16px;
    font: inherit;
    font-size: 13.8px;
    color: #1f2b40;
    border-radius: 999px;
}
.med-newsletter__form button {
    border: 0;
    background: #1a73e8;
    color: #fff;
    font-weight: 700;
    font-size: 13.2px;
    padding: 13px 22px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s;
}
.med-newsletter__form button:hover { background: #135ab4; }
.med-newsletter__form button:disabled { opacity: 0.65; cursor: wait; }
.med-newsletter__foot { margin: 16px 0 0; font-size: 11.4px; color: #c6d9f9; }
.med-newsletter__foot a { color: #fff; text-decoration: underline; }

/* ================================================================
   Ads
   ================================================================ */

.med-ad { margin: 0; overflow: hidden; border-radius: 10px; }
.med-ad img { width: 100%; }
[data-ad-slot="header"] { margin-bottom: 6px; text-align: center; }
[data-ad-slot="sidebar"] .med-ad, [data-ad-slot="sidebar"] .med-ad img { width: 100%; }

/* ================================================================
   Blog listing + filters
   ================================================================ */

.med-filterbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 22px 0;
}
.med-chip {
    border: 1.5px solid var(--line);
    background: var(--bg-panel);
    color: var(--text-soft);
    font-weight: 600;
    font-size: 13.5px;
    padding: 8px 16px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s;
}
.med-chip:hover { border-color: var(--blue); color: var(--blue); }
.med-chip.is-active { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 6px 14px var(--blue-glow); }

.med-pag {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 34px;
    flex-wrap: wrap;
}
.med-pag__page {
    min-width: 40px; height: 40px;
    border-radius: 10px;
    border: 1.5px solid var(--line);
    background: var(--bg-panel);
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}
.med-pag__page:hover { border-color: var(--blue); color: var(--blue); }
.med-pag__page.is-current { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 6px 14px var(--blue-glow); }
.med-pag__dots { color: var(--text-faint); padding: 0 4px; }

/* ================================================================
   Article full page
   ================================================================ */

.med-article {
    background: var(--bg-panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 34px 40px;
}

.med-article__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    align-items: center;
    color: var(--text-soft);
    font-size: 13.5px;
    margin: 16px 0 26px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}
.med-article__meta span, .med-article__meta a { display: inline-flex; align-items: center; gap: 7px; }
.med-article__avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid var(--blue-soft); }

.med-article__featured {
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 26px;
    box-shadow: var(--shadow-md);
}
.med-article__featured picture { display: block; width: 100%; }
.med-article__featured img { width: 100%; max-height: 480px; object-fit: cover; }

/* rich content typography */
.med-prose { font-size: 16px; line-height: 1.78; color: var(--text); }
.med-prose h2 {
    font-size: 23px;
    color: var(--navy);
    margin: 34px 0 12px;
    letter-spacing: -0.3px;
    padding-left: 12px;
    border-left: 4px solid var(--blue);
}
.med-prose h3 { font-size: 18.5px; color: var(--navy); margin: 26px 0 10px; }
/* Generated heading anchors must clear the sticky header on mobile + desktop. */
.med-prose h2[id], .med-prose h3[id], .med-prose h4[id], .med-prose h5[id], .med-prose h6[id] { scroll-margin-top: 84px; }
.med-prose p { margin: 0 0 16px; }
.med-prose ul, .med-prose ol { margin: 0 0 18px; padding-left: 24px; }
.med-prose li { margin-bottom: 8px; }
.med-prose blockquote {
    margin: 20px 0;
    padding: 16px 22px;
    background: var(--blue-soft);
    border-left: 4px solid var(--blue);
    border-radius: 10px;
    color: var(--navy);
    font-style: italic;
}
.med-prose img { border-radius: 12px; margin: 10px 0; box-shadow: var(--shadow-sm); }
.med-prose table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14.5px; }
.med-prose th { background: var(--navy); color: #fff; text-align: left; padding: 10px 14px; }
.med-prose th:first-child { border-radius: 8px 0 0 0; }
.med-prose th:last-child { border-radius: 0 8px 0 0; }
.med-prose td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.med-prose tr:nth-child(even) td { background: var(--bg-soft); }
.med-prose a { text-decoration: underline; text-underline-offset: 3px; }
.med-prose code { background: var(--bg-soft); padding: 2px 7px; border-radius: 6px; font-size: 14px; }
.med-prose figure { margin: 20px 0; }
.med-prose figcaption { color: var(--text-faint); font-size: 13px; margin-top: 6px; }

.med-article__tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; }
.med-article__tags a {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--bg-soft); border: 1.5px solid var(--line);
    color: var(--text-soft); font-size: 12.8px; font-weight: 600;
    border-radius: 999px; padding: 6px 14px; transition: all 0.2s;
}
.med-article__tags a:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }

.med-review {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: #f0f9f4;
    border: 1px solid #cdeeda;
    border-radius: var(--radius);
    padding: 16px 18px;
    margin-top: 26px;
}
[data-theme="dark"] .med-review { background: #0d2a22; border-color: #16493a; }
.med-review__icon { color: var(--ok); flex-shrink: 0; margin-top: 2px; }
.med-review p { margin: 0; font-size: 13.5px; color: var(--text-soft); line-height: 1.55; }
.med-review strong { color: var(--text); display: block; margin-bottom: 3px; }

.med-refs { margin-top: 30px; border-top: 1px solid var(--line); padding-top: 20px; }
.med-refs h3 { font-size: 16px; color: var(--navy); margin: 0 0 12px; display: flex; gap: 8px; align-items: center; }
.med-refs ol { margin: 0; padding-left: 20px; color: var(--text-soft); font-size: 13.8px; }
.med-refs li { margin-bottom: 8px; }
.med-refs a { word-break: break-word; }

/* Related posts */
.med-related { margin-top: 40px; padding-top: 26px; border-top: 1px solid var(--line); }

/* Author box */
.med-authorbox {
    display: flex;
    gap: 20px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: 34px;
}
.med-authorbox img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: var(--shadow-sm); flex-shrink: 0; }
.med-authorbox h3 { margin: 0 0 3px; color: var(--navy); font-size: 17px; }
.med-authorbox .med-qual { color: #1668d2; font-size: 12.8px; font-weight: 700; margin: 0 0 8px; }
.med-authorbox p { margin: 0; color: var(--text-soft); font-size: 13.8px; line-height: 1.6; white-space: pre-line; }

/* ================================================================
   Search page
   ================================================================ */

.med-searchbar {
    display: flex;
    background: var(--bg-panel);
    border: 2px solid var(--line);
    border-radius: 999px;
    padding: 5px 5px 5px 22px;
    max-width: 720px;
    box-shadow: var(--shadow-sm);
    transition: border 0.2s;
    margin: 0 auto;
}
.med-searchbar:focus-within { border-color: var(--blue); box-shadow: 0 0 0 5px var(--blue-glow); }
.med-searchbar input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: inherit; font-size: 15.5px; color: var(--text); padding: 10px 10px; }
.med-searchbar button {
    border: 0; background: var(--blue); color: #fff; font-weight: 700;
    font-size: 14.5px; padding: 11px 26px; border-radius: 999px; cursor: pointer;
    display: inline-flex; align-items: center; gap: 8px;
    transition: background 0.2s;
}
.med-searchbar button:hover { background: var(--blue-strong); }

.med-empty { text-align: center; padding: 60px 20px; color: var(--text-soft); }
.med-empty svg { color: var(--text-faint); margin-bottom: 12px; }
.med-empty h3 { color: var(--navy); margin: 0 0 6px; font-size: 20px; }

/* ================================================================
   Static pages (about / policies / contact)
   ================================================================ */

.med-page { background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 40px 46px; }
.med-page .med-prose { animation: med-fade 0.4s ease; }

@keyframes med-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 30px 0; }
.stat-box { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-align: center; }
.stat-box strong { display: block; font-size: 30px; color: var(--blue); letter-spacing: -1px; }
.stat-box span { color: var(--text-soft); font-size: 13px; }

/* Contact page */
.contact-grid { display: grid; grid-template-columns: 340px 1fr; gap: 30px; align-items: start; }

.contact-card { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; }
.contact-card h3 { margin: 0 0 18px; color: var(--navy); font-size: 17px; }
.contact-line { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; font-size: 14px; color: var(--text-soft); }
.contact-line svg { color: var(--blue); flex-shrink: 0; margin-top: 2px; }
.contact-line a { color: var(--text); font-weight: 600; }
.contact-line a:hover { color: var(--blue); }

.med-form { display: grid; gap: 16px; }
.med-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.med-field { display: flex; flex-direction: column; gap: 6px; }
.med-field label { font-size: 13px; font-weight: 700; color: var(--navy); }
.med-field label small { font-weight: 500; color: var(--text-faint); }
.med-field input, .med-field select, .med-field textarea {
    border: 1.5px solid var(--line);
    background: var(--bg);
    color: var(--text);
    border-radius: 10px;
    padding: 11px 14px;
    font: inherit;
    font-size: 14.5px;
    outline: none;
    transition: border 0.2s, box-shadow 0.2s;
    width: 100%;
}
.med-field textarea { min-height: 140px; resize: vertical; }
.med-field input:focus, .med-field select:focus, .med-field textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px var(--blue-glow);
}
.med-btn {
    background: linear-gradient(135deg, var(--blue), #2f8bff);
    color: #fff;
    font-weight: 700;
    border: 0;
    font-size: 15px;
    padding: 13px 28px;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex; align-items: center; gap: 9px;
    box-shadow: 0 8px 20px rgba(26, 115, 232, 0.3);
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    justify-self: start;
}
.med-btn:hover { transform: translateY(-1px); background: var(--blue-strong); }
.med-btn:disabled { opacity: 0.6; cursor: wait; transform: none; }

/* ================================================================
   Toasts
   ================================================================ */

.med-toast {
    position: fixed;
    bottom: 26px;
    left: 50%;
    transform: translate(-50%, 20px);
    background: var(--navy);
    color: #fff;
    padding: 14px 22px;
    border-radius: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 14px;
    box-shadow: var(--shadow-lg);
    z-index: 200;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    max-width: min(90vw, 480px);
}
.med-toast.is-in { opacity: 1; transform: translate(-50%, 0); }
.med-toast--error { background: #a93232; }
.med-toast__icon {
    width: 22px; height: 22px;
    display: grid; place-items: center;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    flex-shrink: 0;
    font-size: 11px;
}

/* ================================================================
   Unsubscribe page
   ================================================================ */

.med-confirm { text-align: center; padding: 70px 20px; }
.med-confirm med-h { display: block; font-size: 26px; color: var(--navy); font-weight: 800; margin: 16px 0 8px; }
.med-confirm p { color: var(--text-soft); }

/* ================================================================
   Footer
   ================================================================ */

.med-footer { background: var(--navy); color: #9db7e4; margin-top: 30px; }

.med-footer__grid {
    display: grid;
    grid-template-columns: 1.35fr 0.8fr 0.9fr 1fr 0.7fr;
    gap: 34px;
    padding: 52px 0 40px;
}

.med-footer__about p { margin: 18px 0 16px; font-size: 13.8px; line-height: 1.65; color: #93aed9; max-width: 300px; }

.med-logo--light .med-logo__text strong { color: #fff; }
.med-logo--light .med-logo__text small { color: #7d9ccf; }

.med-footer__col h4 {
    color: #fff;
    font-size: 15px;
    letter-spacing: 0.2px;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.med-footer__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.med-footer__col a { color: #93aed9; font-size: 13.8px; transition: color 0.2s, padding-left 0.2s; }
.med-footer__col a:hover { color: #fff; padding-left: 4px; }

.med-footer__socials { display: flex; gap: 10px; }
.med-footer__social {
    width: 36px; height: 36px;
    display: grid; place-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cddcf5;
    border-radius: 10px;
    transition: all 0.2s;
}
.med-footer__social:hover { background: var(--blue); color: #fff; transform: translateY(-2px); }

.med-footer__bottom { border-top: 1px solid rgba(255, 255, 255, 0.08); }
.med-footer__bottomrow {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding: 16px 0;
    font-size: 12.5px;
    color: #7d9ccf;
}

/* ================================================================
   404 / misc
   ================================================================ */

.med-404 { text-align: center; padding: 90px 20px; }
.med-404 strong { font-size: 110px; color: var(--blue); letter-spacing: -4px; display: block; }
.med-404 h1 { color: var(--navy); margin: 6px 0 10px; }
.med-404 p { color: var(--text-soft); }

.med-hidden { display: none !important; }

.med-hero--split{position:relative;background:#06142e;overflow:hidden}
.med-hero__split-wrap{display:grid;grid-template-columns:repeat(12,1fr);min-height:680px}
.med-hero__split-left{grid-column:1/7;display:flex;align-items:center;padding:60px 24px;z-index:5}
.med-hero__split-inner{max-width:620px;margin-left:auto;margin-right:40px}
.med-hero__split-right{grid-column:7/-1;position:relative}
.med-hero--split .med-hero__bg,.med-hero--split .med-hero__slide{position:absolute;inset:0;width:100%;height:100%}
.med-hero--split .med-hero__slide{object-fit:cover;opacity:0;transition:opacity 1s}
.med-hero--split .med-hero__slide.is-active{opacity:1}
.med-hero__split-fade{position:absolute;inset:0;background:linear-gradient(90deg,#06142e 0%,rgba(6,20,46,.92) 28%,transparent 72%);z-index:3}
.med-hero--split .med-hero__dots{left:calc((100vw - 1180px)/2 + 24px);bottom:28px;transform:none}
@media(max-width:920px){.med-hero__split-wrap{grid-template-columns:1fr}.med-hero__split-left{grid-column:1/-1}.med-hero__split-right{position:absolute;inset:0}.med-hero__split-fade{background:linear-gradient(180deg,rgba(6,20,46,.95) 0%,transparent 62%)}.med-hero--split .med-hero__dots{left:50%;transform:translateX(-50%)}}

/* ================================================================
   Accessibility fixes (WCAG 2.1 AA) — WAVE homepage audit
   ================================================================ */

/* Visually hidden but available to assistive technology. */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    /* Explicit dark colour: hidden labels sit over the white form field in
       WAVE's contrast checker. */
    color: #1f2b40;
}

.med-newsletter__form input::placeholder {
    color: #5a6b85;
    opacity: 1;
}

/* Visible keyboard focus for every interactive element. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

/* The dark theme keeps the navy brand colour for backgrounds/accents, but
   text must use the light theme tokens to meet 4.5:1 (large text 3:1). */
[data-theme="dark"] .med-section__title,
[data-theme="dark"] .med-side__title,
[data-theme="dark"] .med-card__title a,
[data-theme="dark"] .med-cat__text strong,
[data-theme="dark"] .med-prose h2,
[data-theme="dark"] .med-prose h3,
[data-theme="dark"] .med-prose h4,
[data-theme="dark"] .med-empty h3,
[data-theme="dark"] .med-404 h1 {
    color: var(--text);
}

[data-theme="dark"] .med-link,
[data-theme="dark"] .med-popular__num {
    color: #8ab4ff;
}

/* Article-page dark-theme text that still inherited light-theme brand colours. */
[data-theme="dark"] .med-authorbox h3 {
    color: var(--text);
}
[data-theme="dark"] .med-authorbox .med-qual {
    color: var(--text-soft);
}

/* Header logo + active nav text also inherited navy/blue on the dark header. */
[data-theme="dark"] .med-logo__text strong,
[data-theme="dark"] .med-logo__text strong em,
[data-theme="dark"] .med-nav__item > a:hover,
[data-theme="dark"] .med-nav__item > a.is-active {
    color: #dbe6f5;
}

