/* EasyLove — shared blog & article stylesheet
   Brand-aligned, theme-aware (light/dark via prefers-color-scheme + [data-theme]).
   Fonts: Quicksand (display) + Nunito (body) via Google Fonts (full Vietnamese
   coverage); system stack as fallback. */

:root {
    --g1: #FF5F8F;
    --g2: #FF8A5B;
    --purple: #8B7CFF;
    --pink-strong: #BE2D64;
    --bg: #FBF9FD;
    --surface: #FFFFFF;
    --glass: rgba(255, 255, 255, .62);
    --glass-b: rgba(255, 255, 255, .8);
    --text: #221826;
    --muted: #6B5E70;
    --soft: #FFE1EA;
    --soft2: #EFE9FF;
    --line: #F0E8EF;
    --shadow: 0 20px 50px rgba(190, 45, 100, .10), 0 4px 14px rgba(190, 45, 100, .06);
    --font: 'Nunito', -apple-system, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-display: 'Quicksand', 'Nunito', system-ui, sans-serif;
    --measure: 1120px;   /* = nav .wrap width, so article aligns with the header */
}

:root[data-theme="dark"] {
    --pink-strong: #FF9DBB;
    --bg: #0F1015;
    --surface: #1A1B22;
    --glass: rgba(26, 27, 34, .6);
    --glass-b: rgba(255, 255, 255, .09);
    --text: #F3F0F5;
    --muted: #A79DAC;
    --soft: #2B1E2A;
    --soft2: #221F33;
    --line: #26222E;
    --shadow: 0 24px 60px rgba(0, 0, 0, .55);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
        --pink-strong: #FF9DBB;
        --bg: #0F1015;
        --surface: #1A1B22;
        --glass: rgba(26, 27, 34, .6);
        --glass-b: rgba(255, 255, 255, .09);
        --text: #F3F0F5;
        --muted: #A79DAC;
        --soft: #2B1E2A;
        --soft2: #221F33;
        --line: #26222E;
        --shadow: 0 24px 60px rgba(0, 0, 0, .55);
    }
}

* { box-sizing: border-box; margin: 0 }

html { scroll-behavior: smooth }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

::selection { background: var(--g1); color: #fff }

a { color: var(--pink-strong) }

img { max-width: 100%; height: auto }

/* ── ambient aurora (shared with home) ── */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden }

.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .45 }

.b1 { width: 55vmax; height: 55vmax; background: radial-gradient(circle, #FF5F8F44, transparent 65%); top: -20vmax; right: -14vmax }
.b2 { width: 44vmax; height: 44vmax; background: radial-gradient(circle, #8B7CFF3d, transparent 65%); top: 40%; left: -18vmax }
.b3 { width: 40vmax; height: 40vmax; background: radial-gradient(circle, #FF8A5B36, transparent 65%); bottom: -16vmax; right: 4vmax }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px }

/* ── nav ── */
/* :not(.crumb) is load-bearing: the breadcrumb is ALSO a <nav>, so a bare
   `nav` rule made it sticky at top:0 too — it stacked on top of the header
   ("breadcrumb đè lên nav"). Scoping fixes position, glass bg AND border. */
nav:not(.crumb) {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(18px) saturate(170%);
    -webkit-backdrop-filter: blur(18px) saturate(170%);
    background: color-mix(in srgb, var(--bg) 90%, transparent);
    border-bottom: 1px solid var(--line);
}

.nav-in { display: flex; align-items: center; gap: 22px; height: 64px }

.brand {
    display: flex; align-items: center; gap: 10px;
    font-weight: 800; font-size: 19px; letter-spacing: -.02em;
    color: var(--text); text-decoration: none;
}

.brand svg { width: 32px; height: 32px }

.nav-links { display: flex; align-items: center; gap: 20px; margin-left: auto }

.nav-links a {
    color: var(--muted); text-decoration: none;
    font-size: 14.5px; font-weight: 700; transition: color .18s;
}

.nav-links a:hover { color: var(--pink-strong) }

.tgl {
    border: 1px solid var(--line); background: var(--surface); color: var(--text);
    border-radius: 999px; min-width: 38px; height: 38px; padding: 0 13px;
    font-size: 14px; font-weight: 800; font-family: inherit;
    cursor: pointer; display: grid; place-items: center;
    text-decoration: none; transition: transform .15s;
}

.tgl:active { transform: scale(.92) }

/* group language + theme into a tight cluster on desktop (they sit inside
   .nav-links, so pull the theme button toward the language one) */
@media (min-width: 721px) {
    .nav-links .lang-tgl { margin-left: 4px }
    .nav-links .nav-tool + .nav-tool { margin-left: -12px }
}

/* ── mobile header: compact so it never overflows 360-400px widths ── */
@media (max-width: 560px) {
    .wrap { padding: 0 16px }
    .nav-in { gap: 10px; height: 56px }
    .brand { font-size: 16px; gap: 7px }
    .brand svg { width: 26px; height: 26px }
    .nav-links { gap: 12px }
    .nav-links a { font-size: 13px }
    .tgl { min-width: 32px; height: 32px; padding: 0 9px; font-size: 13px }
    .crumb { font-size: 12px; margin-top: 18px }
}

@media (max-width: 640px) {
    .nav-links a.hide-sm { display: none }
}

/* ── breadcrumb ── */
.crumb {
    max-width: var(--measure);
    margin: 28px auto 0;
    padding: 0 24px;
    font-size: 13px;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.crumb a { color: var(--muted); text-decoration: none; font-weight: 700 }
.crumb a:hover { color: var(--pink-strong) }
.crumb span[aria-current] { color: var(--text); font-weight: 700 }
.crumb .sep { opacity: .5 }

/* ── article ── */
.article { padding: 8px 0 40px }

.article-head {
    max-width: var(--measure);
    margin: 0 auto;
    padding: 28px 24px 8px;
    text-align: left;
}

.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--soft); color: var(--pink-strong);
    font-weight: 800; font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
    border-radius: 999px; padding: 7px 15px; margin-bottom: 16px;
}

.article-head h1 {
    font-size: clamp(30px, 5vw, 46px);
    line-height: 1.12;
    letter-spacing: -.03em;
    font-weight: 800;
    text-wrap: balance;
    margin-bottom: 14px;
}

.article-head .grad {
    background: linear-gradient(120deg, var(--g1), var(--g2));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

.article-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
    color: var(--muted); font-size: 14px; font-weight: 600;
}

.article-meta .dot { opacity: .5 }

.byline { display: inline-flex; align-items: center; gap: 9px }

.avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(120deg, var(--g1), var(--g2));
    display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 14px;
    flex: none;
}

/* ── prose ── */
.prose {
    max-width: var(--measure);
    margin: 0 auto;
    padding: 8px 24px 0;
    font-size: 18px;
    line-height: 1.75;
    color: var(--text);
}

.prose > p { margin: 0 0 22px; color: var(--text) }

.prose .lead-p { font-size: 20px; color: var(--muted) }

.prose h2 {
    font-size: clamp(23px, 3.4vw, 30px);
    letter-spacing: -.02em; font-weight: 800;
    margin: 40px 0 12px; text-wrap: balance;
}

.prose h3 {
    font-size: clamp(19px, 2.6vw, 22px);
    letter-spacing: -.01em; font-weight: 800;
    margin: 30px 0 8px;
}

.prose ul, .prose ol { margin: 0 0 22px; padding-left: 1.3em }
.prose li { margin-bottom: 9px }

.prose a { color: var(--pink-strong); text-decoration-thickness: 1.5px; text-underline-offset: 2px }

.prose blockquote {
    margin: 28px 0;
    padding: 4px 22px;
    border-left: 4px solid var(--g1);
    color: var(--text);
    font-size: 20px;
    font-style: italic;
    line-height: 1.55;
}

.prose figure { margin: 28px 0 }
.prose figure img { width: 100%; border-radius: 20px; box-shadow: var(--shadow); display: block }
.prose figcaption { margin-top: 10px; color: var(--muted); font-size: 13.5px; text-align: center }

/* ── brand inline illustrations (line-art SVG) ── */
figure.illo-hero {
    max-width: var(--measure);
    margin: 20px auto 0;
    padding: 0 24px;
}

figure.illo-hero svg,
.prose figure.illo svg {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

figure.illo-hero figcaption {
    margin-top: 10px;
    color: var(--muted);
    font-size: 13.5px;
    text-align: center;
}

.prose figure.illo { margin: 30px 0 }

.prose code {
    background: var(--soft2);
    border-radius: 6px;
    padding: 2px 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .9em;
}

.prose pre {
    background: var(--soft2);
    border-radius: 14px;
    padding: 16px 18px;
    overflow-x: auto;
    margin: 0 0 22px;
}

.prose pre code { background: none; padding: 0 }

/* ── medical / info disclaimer callout ── */
.callout {
    max-width: var(--measure);
    margin: 30px auto;
    padding: 18px 22px;
    background: var(--glass);
    border: 1px solid var(--glass-b);
    border-left: 4px solid var(--purple);
    border-radius: 16px;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.callout svg { width: 24px; height: 24px; flex: none; margin-top: 2px; color: var(--purple) }

.callout .c-body { font-size: 14.5px; color: var(--muted); line-height: 1.6 }
.callout .c-body strong { color: var(--text) }
.callout .c-body a { color: var(--pink-strong) }

/* ── app CTA band ── */
.cta-band {
    box-sizing: border-box;
    width: calc(100% - 48px);
    max-width: calc(var(--measure) - 48px);
    margin: 44px auto;
    padding: 34px 30px;
    border-radius: 26px;
    background: linear-gradient(120deg, var(--g1), var(--g2));
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 18px 44px rgba(226, 58, 110, .3);
}

.cta-band::before {
    content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%;
    background: rgba(255, 255, 255, .14); top: -90px; right: -60px;
}

.cta-band h2 { color: #fff; font-size: clamp(22px, 3vw, 28px); letter-spacing: -.02em; margin: 0 0 8px; position: relative }
.cta-band p { opacity: .95; margin: 0 auto 18px; max-width: 34rem; position: relative }

.cta-btn {
    display: inline-block;
    background: #fff; color: var(--pink-strong);
    font-weight: 800; font-size: 15px; font-family: inherit;
    border: none; border-radius: 999px; padding: 13px 30px;
    cursor: pointer; text-decoration: none; position: relative;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .18); transition: transform .16s;
}

.cta-btn:hover { transform: translateY(-2px) }
.cta-btn:active { transform: scale(.96) }

/* ── social share row ── */
.share-row {
    max-width: var(--measure);
    margin: 34px auto 0;
    padding: 0 24px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.share-row .share-label {
    font-weight: 800;
    font-size: 14px;
    color: var(--muted);
    margin-right: 2px;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    transition: transform .15s, color .18s, border-color .18s;
}

.share-btn:hover { transform: translateY(-2px); color: var(--pink-strong); border-color: var(--pink-strong) }
.share-btn:active { transform: scale(.94) }
.share-btn svg { width: 20px; height: 20px }
.share-btn .share-glyph { font-family: var(--font-display); font-weight: 800; font-size: 20px; line-height: 1 }

/* ── related articles ── */
.related {
    max-width: 1120px;
    margin: 40px auto 0;
    padding: 0 24px;
}

.related h2 {
    font-size: clamp(22px, 3vw, 28px); letter-spacing: -.02em; font-weight: 800;
    text-align: center; margin-bottom: 24px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.post-card {
    display: flex;
    flex-direction: column;
    background: var(--glass);
    border: 1px solid var(--glass-b);
    border-radius: 22px;
    padding: 24px 22px;
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text);
    transition: transform .25s cubic-bezier(.34, 1.56, .64, 1);
}

.post-card:hover { transform: translateY(-6px) }

.post-card .p-thumb {
    display: block;
    margin: -6px -4px 15px;
    border-radius: 15px;
    overflow: hidden;
    aspect-ratio: 40 / 15;
    background: linear-gradient(120deg, var(--soft), var(--soft2));
}

.post-card .p-thumb svg { width: 100%; height: 100%; display: block }

.post-card .p-eyebrow {
    color: var(--pink-strong); font-weight: 800; font-size: 11.5px;
    letter-spacing: .12em; text-transform: uppercase; margin-bottom: 10px;
}

.post-card h3 { font-size: 19px; letter-spacing: -.015em; line-height: 1.25; margin-bottom: 8px }
.post-card p { color: var(--muted); font-size: 14.5px; line-height: 1.55; flex: 1 }

.post-card .p-foot {
    margin-top: 16px; display: flex; align-items: center; gap: 8px;
    color: var(--muted); font-size: 13px; font-weight: 700;
}

.post-card .p-more { color: var(--pink-strong); margin-left: auto; display: inline-flex; align-items: center; gap: 4px }

/* ── blog listing header ── */
.list-head { text-align: center; padding: 44px 0 12px }

.list-head .eyebrow { margin-bottom: 16px }

.list-head h1 {
    font-size: clamp(32px, 5vw, 48px); letter-spacing: -.03em; font-weight: 800;
    text-wrap: balance; margin-bottom: 12px;
}

.list-head p { color: var(--muted); font-size: 17px; max-width: 40rem; margin: 0 auto }

.list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 22px;
    padding: 26px 0 60px;
}

/* ── footer (multi-column, balanced) ── */
footer {
    border-top: 1px solid var(--line);
    padding: 44px 0 22px;
    color: var(--muted);
    font-size: 13.5px;
    margin-top: 20px;
}

.foot {
    display: grid;
    grid-template-columns: 1.7fr 1fr 1fr;
    gap: 34px;
    align-items: start;
}
.foot-brand { display: flex; flex-direction: column; gap: 12px; min-width: 0 }
.foot-logo {
    display: inline-flex; align-items: center; gap: 9px;
    font-family: var(--font-display); font-weight: 800; font-size: 18px;
    color: var(--text); text-decoration: none;
}
.foot-logo svg { width: 28px; height: 28px }
.foot-tag { color: var(--muted); font-size: 14px; max-width: 30rem; margin: 0 }
.foot-age {
    align-self: flex-start; background: var(--soft); color: var(--pink-strong);
    font-weight: 800; font-size: 12px; border-radius: 999px; padding: 4px 12px;
}
.foot-col { display: flex; flex-direction: column; gap: 10px; min-width: 0 }
.foot-col h4 {
    font-family: var(--font-display); font-size: 13px; letter-spacing: .08em;
    text-transform: uppercase; color: var(--text); margin: 0 0 2px;
}
.foot-col a { color: var(--muted); font-weight: 700; font-size: 14px; text-decoration: none }
.foot-col a:hover { color: var(--pink-strong) }
.foot-share { display: flex; gap: 9px; flex-wrap: wrap }
.foot-bottom {
    display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center;
    justify-content: space-between; margin-top: 30px; padding-top: 18px;
    border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted);
}
@media (max-width: 720px) {
    .foot { grid-template-columns: 1fr; gap: 26px; text-align: center; justify-items: center }
    .foot-brand { align-items: center }
    .foot-tag { margin: 0 auto }
    .foot-col { align-items: center }
    .foot-share { justify-content: center }
    .foot-bottom { flex-direction: column; text-align: center; justify-content: center; gap: 8px }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important }
    html { scroll-behavior: auto }
}

/* R8 VN-safe brand fonts: Quicksand headings, Nunito body */
h1,h2,h3{font-family:var(--font-display)}
/* keep the brand wordmark on the body font (Nunito) to match the home nav */
.brand{font-family:var(--font)}

/* ── mobile hamburger menu (checkbox hack, no JS) ── */
/* language + theme controls live INSIDE .nav-links: an inline right-aligned
   row on desktop, full-width menu rows in the mobile dropdown. */
.burger { display: none }
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0 }
.nav-links .nav-tool { text-decoration: none }
.nav-links .tgl { color: var(--text) }
@media (max-width: 720px) {
    .burger { display: inline-flex; align-items: center; justify-content: center; margin-left: auto;
        width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line);
        background: var(--surface); color: var(--text); cursor: pointer }
    .nav-links { display: none; position: absolute; top: 56px; right: 12px; left: 12px; margin-left: 0;
        align-items: stretch; flex-direction: column; gap: 2px; background: var(--surface);
        border: 1px solid var(--line); border-radius: 16px; padding: 8px; box-shadow: var(--shadow); z-index: 60 }
    .nav-toggle:checked ~ .nav-links { display: flex }
    .nav-toggle:checked ~ .nav-links a { display: block; padding: 12px 14px; border-radius: 10px; font-size: 15.5px }
    .nav-toggle:checked ~ .nav-links a:active { background: var(--soft) }
    .nav-toggle:checked ~ .nav-links .tgl {
        width: 100%; min-width: 0; height: auto; min-height: 44px; margin: 0;
        display: flex; align-items: center; justify-content: flex-start;
        border: none; background: transparent; color: var(--text);
        border-radius: 10px; padding: 12px 14px; font-size: 15.5px; font-weight: 700;
    }
    .nav-toggle:checked ~ .nav-links .tgl:active { background: var(--soft); transform: none }
    .nav-toggle:checked ~ .nav-links .lang-tgl { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 14px }
}
