/* health.css - "Know more, worry less" health library page
   shape used for photos: rounded corners with one square corner */

.health-page {
    --hl-shape: 22px 22px 22px 0;
    --hl-shape-flip: 22px 22px 0 22px;
    padding-bottom: 4rem;
    color: #4E5866;
    overflow-x: hidden;
}

.health-page h1,
.health-page h2,
.health-page h3,
.health-page h4 {
    color: var(--navy-dark);
}

/* small light blue label with a line before it */
.hl-eyebrow {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0 0 1rem;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-text);
}
.hl-eyebrow::before {
    content: "";
    width: 28px;
    height: 2px;
    background: var(--accent);
}

/* small linked credit next to a fact */
.hl-cite {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.75rem;
    font-style: normal;
    letter-spacing: 0.02em;
    color: var(--text-soft);
    text-decoration: none;
}
.hl-cite:hover {
    color: var(--navy);
    text-decoration: underline;
}
.hl-cite .icon {
    width: 11px;
    height: 11px;
}

/* 1. Intro */

.hl-hero {
    display: grid;
    gap: 2.5rem;
    align-items: center;
    padding-top: 2.5rem;
}

.hl-hero h1 {
    margin: 0;
    font-size: clamp(2.5rem, 7vw, 4.25rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
}
/* heartbeat line under "worry less." */
.hl-hero h1 span {
    display: inline-block;
    padding-bottom: 22px;
    color: var(--navy);
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12'%3E%3Cpath d='M1 6H50l5-5 6 10 5-7 3 2h50' fill='none' stroke='%23858568' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") left bottom / 170px 16px no-repeat;
}

.hl-lead {
    max-width: 34rem;
    margin: 1.5rem 0 0;
    font-size: 1.125rem;
    line-height: 1.65;
}

/* contents list, like the front of a booklet */
.hl-contents {
    display: grid;
    margin: 2rem 0 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--border);
}
.hl-contents a {
    display: flex;
    align-items: baseline;
    gap: 0.9rem;
    padding: 0.7rem 0.25rem;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    color: var(--navy);
    text-decoration: none;
    transition: color 0.2s, padding-left 0.2s;
}
.hl-contents a span {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--accent-text);
}
.hl-contents a:hover {
    padding-left: 0.6rem;
    color: var(--navy-dark);
}

/* photo with a solid light blue block behind its square corner */
.hl-hero-media {
    position: relative;
    margin: 0;
    padding: 0 0 1.25rem 1.25rem;
}
.hl-hero-media::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 65%;
    height: 70%;
    border-radius: var(--hl-shape);
    background: var(--accent-light);
}
.hl-hero-media img {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: var(--hl-shape);
    object-fit: cover;
    object-position: 35% 50%;
}
/* small note card */
.hl-hero-note {
    position: absolute;
    right: 1rem;
    bottom: 0;
    padding: 0.85rem 1.1rem;
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 4px;
    background: var(--white);
    font-size: 0.8125rem;
    line-height: 1.4;
}
.hl-hero-note strong {
    display: block;
    font-size: 0.9375rem;
    color: var(--navy-dark);
}

/* 2. Key numbers (count up, see health.js) */

.hl-numbers {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem 1.5rem;
    margin-top: 3.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border);
}
.hl-number-value {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0;
}
.hl-number-value strong {
    font-size: clamp(2.5rem, 6vw, 3.75rem);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--navy-dark);
    font-variant-numeric: tabular-nums;
}
.hl-number-value span {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--accent-text);
}
.hl-number > p:not(.hl-number-value) {
    max-width: 16rem;
    margin: 0.75rem 0 0.5rem;
    font-size: 0.9375rem;
    line-height: 1.5;
}

/* 3. Chapters */

.hl-chapter {
    margin-top: 5rem;
}
.hl-chapter-head {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}
/* outlined 01, 02, 03 */

.hl-chapter-head h2 {
    margin: 0 0 0.4rem;
    font-size: 1.75rem;
}
.hl-chapter-head p {
    max-width: 40rem;
    margin: 0;
    line-height: 1.6;
}

/* one illness: wide photo, card over its edge, details below */
.hl-topic {
    padding: 2.5rem 0 3rem;
    scroll-margin-top: calc(var(--header-height) + 1rem);
}
.hl-topic + .hl-topic {
    border-top: 1px solid var(--border);
}

.hl-topic-photo {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: var(--hl-shape);
    object-fit: cover;
    filter: saturate(0.95);
}
.is-left .hl-topic-photo {
    border-radius: var(--hl-shape-flip);
}

.hl-topic-card {
    position: relative;
    margin: -3rem 0.75rem 0;
    padding: 1.5rem 1.4rem;
    border: 1px solid var(--border);
    border-top: 3px solid var(--accent);
    border-radius: 0 0 6px 6px;
    background: var(--white);
}

.hl-topic-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-text);
}
.hl-topic-label .icon {
    width: 20px;
    height: 20px;
    color: var(--accent);
}
.hl-topic h3 {
    margin: 0.5rem 0 0;
    font-size: 1.875rem;
    line-height: 1.15;
}
.hl-short {
    margin: 0.75rem 0 0;
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.55;
    color: var(--navy);
}

/* key fact with a big quote mark and its credit */
.hl-fact {
    margin: 1.25rem 0 0;
    padding: 0;
}
.hl-fact p {
    margin: 0;
    font-size: 1.0625rem;
    font-style: italic;
    line-height: 1.6;
}
.hl-fact p::before {
    content: "\201C";
    margin-right: 0.15rem;
    font-size: 2.25rem;
    font-style: normal;
    font-weight: 700;
    line-height: 0;
    vertical-align: -0.6rem;
    color: var(--accent);
}
.hl-fact cite {
    display: block;
    margin-top: 0.4rem;
    font-style: normal;
}
.hl-fact .hl-cite::before {
    content: "\2014\00a0";
}

/* lists and the doctor box */
.hl-details {
    display: grid;
    gap: 1.75rem;
    margin-top: 2rem;
}
.hl-details h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.6rem;
    font-size: 0.8125rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.hl-details ul {
    margin: 0;
    padding: 0;
    list-style: none;
    line-height: 1.55;
}
.hl-details li {
    position: relative;
    padding-left: 1.1rem;
}
.hl-details li + li {
    margin-top: 0.4rem;
}
/* light blue dot */
.hl-details li::before {
    content: "";
    position: absolute;
    top: 0.6em;
    left: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}
/* ticks instead of dots */
.hl-details .hl-ticks li {
    padding-left: 1.6rem;
}
.hl-ticks li::before {
    display: none;
}
.hl-ticks .icon {
    position: absolute;
    top: 0.15rem;
    left: 0;
    width: 18px;
    height: 18px;
    color: var(--accent);
}

/* when to see a doctor */
.hl-doctor {
    align-self: start;
    padding: 1.25rem;
    border-left: 3px solid var(--accent);
    border-radius: 4px;
    background: var(--accent-light);
}
.hl-doctor .icon {
    width: 18px;
    height: 18px;
    color: var(--navy);
}
.hl-doctor p {
    margin: 0;
    line-height: 1.55;
}
/* capital first letter after "See a doctor when" */
.hl-doctor p::first-letter {
    text-transform: uppercase;
}

/* 4. Vaccines */

.hl-vaccine {
    display: grid;
    margin-top: 5rem;
    border-radius: 12px;
    overflow: hidden;
    background: var(--accent-light);
}
.hl-vaccine img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    filter: saturate(0.95);
}
.hl-vaccine-text {
    padding: 2rem 1.5rem 2.25rem;
}
.hl-vaccine-text h2 {
    margin: 0 0 0.75rem;
    font-size: 1.875rem;
}
.hl-vaccine-text p {
    line-height: 1.65;
}

/* 5. Emergencies */

.hl-urgent {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
    padding: 2rem 1.5rem;
    border: 1px solid #F5C2C7;
    border-left: 4px solid var(--error);
    border-radius: 8px;
    background: #FDF1F2;
}
.hl-urgent-text h2 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
}
.hl-urgent-text h2 .icon {
    color: var(--error);
}
.hl-urgent-text p {
    margin: 0;
    line-height: 1.6;
}
.hl-urgent-numbers {
    display: grid;
    gap: 0.75rem;
}
.hl-urgent-numbers > a {
    display: flex;
    flex-direction: column;
    padding: 0.85rem 1.1rem;
    border: 1px solid #F5C2C7;
    border-radius: 6px;
    background: var(--white);
    text-decoration: none;
    transition: border-color 0.2s;
}
.hl-urgent-numbers > a:hover {
    border-color: var(--error);
}
.hl-urgent-numbers strong {
    font-size: 1.375rem;
    color: var(--error);
}
.hl-urgent-numbers span {
    font-size: 0.8125rem;
    color: #4E5866;
}
.hl-urgent-note {
    grid-column: 1 / -1;
    margin: 0;
    font-size: 0.75rem;
}
.hl-urgent-note a {
    color: inherit;
}

/* 6. Book */

.hl-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    margin-top: 2rem;
    padding: 2rem 1.5rem;
    border-radius: 12px;
    background: var(--navy);
    text-align: center;
    color: rgba(255, 255, 255, 0.85);
}
.hl-cta img {
    flex-shrink: 0;
    width: 130px;
    height: 130px;
    border-radius: 18px 18px 18px 0;
    object-fit: cover;
}
.health-page .hl-cta h2 {
    margin: 0 0 0.25rem;
    font-size: 1.625rem;
    color: var(--white);
}
.hl-cta p {
    margin: 0 0 1.25rem;
}

/* 7. Note and photo credits (small print) */

.hl-credits {
    margin-top: 3rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
    line-height: 1.7;
    color: var(--text-soft);
}
.hl-credits p {
    max-width: 62rem;
    margin: 0 0 0.5rem;
}
.hl-credits a {
    color: var(--text-soft);
}
.hl-credits a:hover {
    color: var(--navy);
}

/* Tablet up */
@media (min-width: 768px) {
    .hl-contents {
        grid-template-columns: 1fr 1fr;
        column-gap: 2rem;
    }

    .hl-numbers {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
    /* thin lines between the numbers */
    .hl-number + .hl-number {
        padding-left: 1.5rem;
        border-left: 1px solid var(--border);
    }

    .hl-chapter-head h2 {
        font-size: 2.125rem;
    }

    /* wide photo, card overlaps it on the left or right */
    .hl-topic {
        padding: 3.5rem 0;
    }
    .hl-topic-photo {
        aspect-ratio: 21 / 9;
    }
    .hl-topic-card {
        width: 62%;
        margin-top: -7rem;
        padding: 2rem 2.25rem;
    }
    .is-right .hl-topic-card {
        margin-right: 2.5rem;
        margin-left: auto;
    }
    .is-left .hl-topic-card {
        margin-left: 2.5rem;
        margin-right: auto;
    }
    .hl-topic h3 {
        font-size: 2.25rem;
    }

    .hl-details {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        padding: 0 2.5rem;
    }
    .hl-doctor {
        grid-column: 1 / -1;
    }

    /* photo fills the left half */
    .hl-vaccine {
        grid-template-columns: 1fr 1fr;
        align-items: stretch;
    }
    .hl-vaccine img {
        height: 100%;
        min-height: 360px;
        object-position: 15% 50%;
    }
    .hl-vaccine-text {
        align-self: center;
        padding: 3rem;
    }
    .hl-vaccine-text h2 {
        font-size: 2.25rem;
    }

    .hl-urgent {
        grid-template-columns: 1fr 1.3fr;
        align-items: center;
        padding: 2.5rem;
    }
    .hl-urgent-numbers {
        grid-template-columns: repeat(3, 1fr);
    }

    .hl-cta {
        flex-direction: row;
        gap: 2rem;
        padding: 1.75rem 2.5rem 1.75rem 1.75rem;
        text-align: left;
    }
    .hl-cta > div {
        display: flex;
        flex: 1;
        flex-wrap: wrap;
        align-items: center;
        column-gap: 2rem;
    }
    .hl-cta h2 {
        flex-basis: 100%;
    }
    .hl-cta p {
        flex: 1;
        margin: 0;
    }
    .hl-cta .btn {
        width: auto;
    }
}

/* Desktop */
@media (min-width: 960px) {
    .hl-hero {
        grid-template-columns: 1.05fr 0.95fr;
        gap: 3.5rem;
        padding-top: 3.5rem;
    }
    .hl-hero-media img {
        aspect-ratio: 5 / 6;
    }
    .hl-hero-note {
        right: auto;
        left: -1.5rem;
        bottom: 2.5rem;
    }

    /* three columns: lists and doctor box side by side */
    .hl-details {
        grid-template-columns: 1fr 1fr 1fr;
    }
    .hl-doctor {
        grid-column: auto;
    }
}

/* contents grouped by category (no numbers) */
.hl-contents-groups {
    display: grid;
    gap: 1.25rem;
    margin-top: 2rem;
}
.hl-contents-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.25rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-text);
}
.hl-contents-title .icon {
    width: 16px;
    height: 16px;
}
.hl-contents-group .hl-contents {
    margin: 0;
}
.hl-contents a {
    align-items: center;
}
.hl-contents a .icon {
    flex: none;
    width: 18px;
    height: 18px;
    color: var(--accent);
}
@media (min-width: 900px) {
    .hl-contents-groups {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.5rem;
    }
    .hl-contents-group .hl-contents {
        grid-template-columns: 1fr;
    }
}

/* category heading: light blue icon badge instead of a number */
.hl-chapter-icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--accent-light);
    color: var(--accent-text);
}
.hl-chapter-icon .icon {
    width: 30px;
    height: 30px;
}

/* 4. How the page flows: shortcuts, soft bands, section headings and a gentle fade in */

/* three shortcut cards under the intro */
.hl-ways {
    display: grid;
    gap: 0.75rem;
    margin-top: 2rem;
}
.hl-way {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #FFFFFF;
    color: #4E5866;
    font-size: 0.9375rem;
    line-height: 1.45;
    text-decoration: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.hl-way strong {
    display: block;
    font-size: 1.0625rem;
    color: var(--navy-dark);
}
.hl-way > .icon {
    width: 18px;
    height: 18px;
    color: var(--accent-text);
    transition: transform 0.25s ease;
}
.hl-way:hover {
    border-color: var(--accent);
    box-shadow: 0 10px 24px rgba(13, 37, 63, 0.08);
    transform: translateY(-2px);
}
.hl-way:hover > .icon {
    transform: translateX(4px);
}
.hl-way-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent-light);
    color: var(--accent-text);
}
.hl-way-icon .icon {
    width: 20px;
    height: 20px;
}

/* soft full-width band behind the finder and the news, so each part reads as its own space */
.hl-band {
    margin-top: 5rem;
    padding: 4rem 0;
   background: linear-gradient(180deg, #FAF8F4 0%, #F6F1E9 100%);
    border-top: 1px solid #E3ECF4;
    border-bottom: 1px solid #E3ECF4;
}

/* the same heading style for every part: light blue label, big title, short line */
.hl-section-head {
    margin-top: 5rem;
}
.hl-section-head h2 {
    margin: 0;
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    letter-spacing: -0.01em;
}
.hl-section-head > p:not(.hl-eyebrow) {
    max-width: 40rem;
    margin: 0.75rem 0 0;
    font-size: 1.0625rem;
    line-height: 1.6;
}
.hl-section-head + .hl-chapter {
    margin-top: 3.5rem;
}

/* news card sits on the band without its own shadow */
.hl-news .news-card {
    box-shadow: 0 10px 30px rgba(13, 37, 63, 0.06);
}

/* jumping to a part stops below the sticky header */
#a-z,
#guides,
#news {
    scroll-margin-top: calc(var(--header-height) + 1rem);
}

/* each part fades up a little the first time it comes into view (health.js adds is-in) */
.js .hl-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.js .hl-reveal.is-in {
    opacity: 1;
    transform: none;
}

@media (min-width: 760px) {
    .hl-ways {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .hl-way {
        grid-template-columns: 1fr;
        align-content: start;
        gap: 0.75rem;
        padding: 1.25rem;
    }
    .hl-way > .icon {
        justify-self: start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .js .hl-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .hl-way,
    .hl-way > .icon {
        transition: none;
    }
    /* Visual Health Focus Spotlight Cards */
.health-visual-spotlight {
    background: linear-gradient(135deg, #f0f7ff 0%, #e3f0ff 100%);
    border: 1px solid #cce3ff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(11, 60, 93, 0.05);
}
.health-spotlight-header h3 {
    color: #0b3c5d;
    font-size: 1.4rem;
    margin-bottom: 8px;
}
.health-spotlight-header p {
    color: #555;
    margin-bottom: 20px;
}
.health-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}
.health-cat-card {
    background: #ffffff;
    border: 1px solid #b3d7ff;
    border-radius: 10px;
    padding: 20px 15px;
    text-align: center;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
.health-cat-card:hover {
    transform: translateY(-3px);
    background: #0b3c5d;
    border-color: #0b3c5d;
    box-shadow: 0 6px 15px rgba(11, 60, 93, 0.15);
}
.health-cat-card:hover .cat-icon,
.health-cat-card:hover strong {
    color: #ffffff;
}
.cat-icon {
    font-size: 1.8rem;
    display: block;
    margin-bottom: 8px;
}
.health-cat-card strong {
    color: #0b3c5d;
    font-size: 0.9rem;
    display: block;
}
}
