/* Long-form service pages (fertility-nutritionist, ivf-nutrition, iui-nutrition, natural-conception-nutrition,
   low-amh-diet, male-fertility-nutrition). Loaded after styles.css and programmes.css, and uses their tokens.
   Markup comes from website-extras/dev-tools/service-pages/build.py. Do not edit the generated pages. */

.sp-page {
    --sp-green-ink: var(--health-green);   /* the brand green, as on the rest of the site (owner's decision) */
    --sp-green-deep: #5dab3a;      /* the site's own darker stop of the brand gradient */
    --sp-measure: 740px;           /* about 70 characters per line at the article font size */
    --sp-ink: #333333;
    --sp-muted: #4d4d4d;
    --sp-focus: var(--wellness-blue);
}

/* ---------- Skip link ---------- */
.sp-skip {
    position: absolute; left: 16px; top: -80px; z-index: 2000;
    background: var(--charcoal); color: #fff; padding: 12px 20px; border-radius: var(--radius-full);
    font-weight: 600; font-size: 15px; transition: top .15s;
}
.sp-skip:focus { top: 12px; outline: 3px solid var(--sp-focus); outline-offset: 2px; }

/* ---------- Hero ---------- */
.sp-hero { padding: 96px 0 36px; background: var(--off-white); border-bottom: 1px solid var(--border-color); }
.sp-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.sp-hero-copy { min-width: 0; }
.sp-hero .section-tag { margin-bottom: 14px; }
.sp-hero h1 { font-size: clamp(1.85rem, 4.4vw, 2.85rem); line-height: 1.16; margin: 0 0 18px; overflow-wrap: break-word; text-wrap: balance; }
.sp-lede {
    font-family: var(--font-serif); font-style: italic; font-size: clamp(1.08rem, 2vw, 1.28rem);
    line-height: 1.6; color: var(--sp-muted); max-width: 36em; margin: 0;
}
.sp-hero-cta { margin-top: 26px; }
.sp-hero .btn { min-height: 48px; }
/* Primary button: solid dark green so the white label passes AA (the programme pages' light green outline does not) */
.sp-hero .btn-slide-green { background: linear-gradient(145deg, var(--health-green), #5dab3a); border-color: var(--health-green); color: #fff; }
.sp-hero .btn-slide-green .btn-slide-fill { background: var(--sp-green-deep); }
.sp-hero .btn-slide-green:hover .btn-slide-text { color: #fff; }
.sp-hero .btn:focus-visible, .sp-btn:focus-visible, .sp-related-card:focus-visible,
.sp-article a:focus-visible, .sp-toc a:focus-visible, .sp-toc-mobile summary:focus-visible,
.blog-cta a:focus-visible { outline: 3px solid var(--sp-focus); outline-offset: 3px; border-radius: 6px; }
.blog-cta .bcta-btn:focus-visible { outline-color: #fff; border-radius: 999px; }

.sp-hero-media { max-width: 460px; width: 100%; margin: 4px 0 0; }
.sp-hero-media img {
    width: 100%; height: auto; border-radius: var(--radius-lg); background: var(--calm-beige);
    box-shadow: var(--shadow-lg);
}
.sp-hero-media--portrait img { aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 14%; }

@media (min-width: 769px) {
    .sp-hero { padding: 128px 0 60px; }
}
@media (min-width: 720px) {
    .sp-hero-grid { grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: center; }
    .sp-hero-media { margin: 0; }
}
@media (min-width: 960px) {
    .sp-hero-grid { grid-template-columns: minmax(0, 1fr) 460px; gap: 64px; }
}

/* ---------- Layout: article + sticky contents ---------- */
.sp-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; padding-top: 28px; padding-bottom: 56px; }
.sp-article { min-width: 0; }
.sp-toc { display: none; }

.sp-toc-mobile { border: 1px solid var(--border-color); border-radius: var(--radius-md); background: var(--off-white); }
.sp-toc-mobile summary {
    list-style: none; cursor: pointer; position: relative; min-height: 52px; padding: 13px 52px 13px 18px;
    font-weight: 600; display: flex; align-items: center;
}
.sp-toc-mobile summary::-webkit-details-marker { display: none; }
.sp-toc-mobile summary::after {
    content: '+'; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
    font-size: 1.5rem; font-weight: 400; color: var(--sp-green-ink); line-height: 1;
}
.sp-toc-mobile[open] summary::after { content: '\2212'; }
.sp-toc ol, .sp-toc-mobile ol { list-style: none; margin: 0; }
.sp-toc-mobile ol { padding: 0 8px 10px; }
.sp-toc-mobile a, .sp-toc a {
    display: flex; align-items: center; min-height: 44px; padding: 8px 12px; font-size: .95rem; line-height: 1.4;
    border-radius: var(--radius-sm);
}
.sp-toc-mobile a:hover, .sp-toc a:hover { color: var(--sp-green-ink); background: rgba(var(--health-green-rgb), 0.1); }

@media (min-width: 1024px) {
    .sp-layout { grid-template-columns: minmax(0, var(--sp-measure)) 280px; justify-content: center; gap: 64px; padding-top: 52px; padding-bottom: 72px; }
    .sp-article { grid-column: 1; grid-row: 1; }
    .sp-aside { grid-column: 2; grid-row: 1; position: sticky; top: 104px; align-self: start; max-height: calc(100vh - 128px); overflow-y: auto; overscroll-behavior: contain; }
    .sp-toc-mobile { display: none; }
    .sp-toc { display: block; border-left: 2px solid var(--border-color); padding-left: 6px; }
    .sp-toc-title { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--sp-muted); padding: 0 12px 8px; margin: 0; }
    .sp-toc a { min-height: 36px; font-size: .88rem; padding: 6px 12px; border-left: 3px solid transparent; margin-left: -9px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
    .sp-toc a[aria-current="true"] { color: var(--sp-green-ink); font-weight: 600; border-left-color: var(--health-green); background: rgba(var(--health-green-rgb), 0.1); }
}

/* ---------- Article typography ---------- */
.sp-article { font-size: 1.0625rem; line-height: 1.8; color: var(--sp-ink); overflow-wrap: break-word; }
.sp-article > :first-child { margin-top: 0; }
.sp-article p { margin: 0 0 1.15em; }
.sp-article h2 {
    font-size: clamp(1.45rem, 3vw, 1.9rem); line-height: 1.25; margin: 0 0 .6em; padding-top: 1.5em; margin-top: 1.5em;
    border-top: 1px solid var(--border-color); scroll-margin-top: 104px; clear: both; text-wrap: balance;
}
.sp-article h3 { font-size: 1.22rem; line-height: 1.35; margin: 1.8em 0 .5em; scroll-margin-top: 104px; text-wrap: balance; }
.sp-article h4 { font-size: 1.05rem; margin: 1.5em 0 .4em; }
.sp-article ul, .sp-article ol { display: flow-root; margin: 0 0 1.25em 1.35em; }
.sp-article ul { list-style: disc; }
.sp-article ol { list-style: decimal; }
.sp-article li { margin-bottom: .5em; padding-left: .2em; }
.sp-article li::marker { color: var(--sp-green-ink); }
.sp-article li > ul, .sp-article li > ol { margin-top: .5em; margin-bottom: .3em; }
.sp-article strong { font-weight: 600; }
.sp-article em { font-style: italic; }
.sp-article a:not(.sp-btn):not([role="doc-noteref"]):not([role="doc-backlink"]) {
    color: inherit; text-decoration: underline; text-decoration-color: var(--health-green);
    text-decoration-thickness: 2px; text-underline-offset: 3px;
}
.sp-article a:not(.sp-btn):not([role="doc-noteref"]):not([role="doc-backlink"]):hover { color: var(--sp-green-ink); }
.sp-rule { border: 0; border-top: 1px solid var(--border-color); margin: 2em 0; }
.sp-quote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--health-green); color: var(--sp-muted); }
.sp-note { font-size: .92rem; color: var(--sp-muted); }

/* ---------- Quick answer callout ---------- */
.sp-answer {
    background: rgba(var(--health-green-rgb), 0.09); border: 1px solid rgba(var(--health-green-rgb), 0.28);
    border-left: 5px solid var(--health-green); border-radius: var(--radius-md); padding: 20px 20px 8px; margin: 1.6em 0 2em; clear: both;
}
.sp-article .sp-answer h2.sp-answer-title {
    font-size: 1.12rem; line-height: 1.4; margin: 0 0 .6em; padding: 0; border: 0; color: var(--sp-green-ink); text-wrap: pretty;
}
.sp-answer p:last-child { margin-bottom: 1em; }
@media (min-width: 769px) { .sp-answer { padding: 26px 30px 12px; } }

/* ---------- CTA links inside the article ---------- */
.sp-cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.4em 0 2em; }
.sp-btn {
    display: inline-flex; align-items: center; justify-content: center; text-align: center; min-height: 48px;
    padding: 12px 24px; border-radius: var(--radius-full); font-weight: 600; font-size: .95rem; line-height: 1.35;
    border: 1.5px solid var(--charcoal); color: var(--charcoal); background: var(--white);
    transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.sp-btn--primary { background: linear-gradient(145deg, var(--health-green), #5dab3a); border-color: var(--health-green); color: #fff; box-shadow: 0 4px 12px rgba(var(--health-green-rgb), 0.25); }
.sp-btn--primary:hover { background: var(--sp-green-deep); border-color: var(--sp-green-deep); color: #fff; transform: translateY(-2px); }
.sp-btn--ghost:hover { background: var(--charcoal); color: #fff; transform: translateY(-2px); }
.sp-article .sp-btn--primary { color: #fff; }
@media (max-width: 480px) { .sp-cta-row .sp-btn { width: 100%; } }

/* ---------- Tables ---------- */
.sp-table-wrap {
    clear: both; overflow-x: auto; margin: 1.5em 0 1.8em; border: 1px solid var(--border-color); border-radius: var(--radius-md);
    background:
        linear-gradient(to right, #fff 30%, rgba(255,255,255,0)) 0 0 / 40px 100% no-repeat local,
        linear-gradient(to left, #fff 30%, rgba(255,255,255,0)) 100% 0 / 40px 100% no-repeat local,
        radial-gradient(farthest-side at 0 50%, rgba(0,0,0,.14), rgba(0,0,0,0)) 0 0 / 14px 100% no-repeat scroll,
        radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,.14), rgba(0,0,0,0)) 100% 0 / 14px 100% no-repeat scroll,
        #fff;
}
.sp-table-wrap:focus-visible { outline: 3px solid var(--sp-focus); outline-offset: 2px; }
.sp-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .95rem; line-height: 1.55; }
.sp-table th, .sp-table td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border-color); }
.sp-table thead th { background: rgba(var(--health-green-rgb), 0.14); font-weight: 600; font-size: .86rem; letter-spacing: .02em; border-bottom: 2px solid rgba(var(--health-green-rgb), 0.5); }
.sp-table tbody th { font-weight: 600; background: rgba(var(--health-green-rgb), 0.05); min-width: 140px; }
.sp-table tbody tr:nth-child(even) td { background: rgba(51, 51, 51, 0.022); }
.sp-table tbody tr:last-child th, .sp-table tbody tr:last-child td { border-bottom: 0; }
.sp-table td p { margin: 0; }
@media (max-width: 640px) {
    .sp-table-wrap { overflow-x: visible; border: 0; border-radius: 0; background: none; margin-right: 0; }
    .sp-table { min-width: 0; }
    .sp-table, .sp-table tbody, .sp-table tr, .sp-table th, .sp-table td { display: block; width: 100%; }
    .sp-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
    .sp-table tr { background: var(--white); border: 1px solid var(--border-color); border-radius: var(--radius-md); overflow: hidden; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
    .sp-table th, .sp-table td { border: 0; overflow-wrap: anywhere; padding: 11px 16px; }
    .sp-table tbody th { background: rgba(var(--health-green-rgb), 0.12); min-width: 0; }
    .sp-table tbody tr:nth-child(even) td { background: none; }
    .sp-table td + td { border-top: 1px solid var(--border-color); }
    .sp-table td[data-label]::before { content: attr(data-label); display: block; font-size: .78rem; font-weight: 600; letter-spacing: .02em; color: var(--sp-muted); margin-bottom: 2px; }
}

/* ---------- Figures ---------- */
.sp-figure { margin: 1.8em 0; }
.sp-figure img { width: 100%; height: auto; border-radius: var(--radius-md); background: var(--calm-beige); box-shadow: var(--shadow-sm); }
.sp-figure figcaption { font-size: .9rem; line-height: 1.55; color: var(--sp-muted); margin-top: .6em; }
.sp-figure--portrait { max-width: 340px; margin-left: auto; margin-right: auto; }
.sp-figure--portrait img { aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 15%; }
@media (min-width: 860px) {
    .sp-figure--portrait { float: right; width: 300px; margin: .5em 0 1.2em 2em; }
}

/* ---------- Reference markers and list ---------- */
.sp-cite { font-size: .72em; line-height: 0; vertical-align: super; white-space: nowrap; margin-left: 1px; }
.sp-cite a { color: var(--sp-green-ink); font-weight: 600; padding: 3px 1px; text-decoration: none; border-radius: 4px; }
.sp-cite a:hover { text-decoration: underline; }
.sp-cite-sep { color: var(--sp-muted); }
.sp-refs { clear: both; }
.sp-ref-list { font-size: .92rem; line-height: 1.65; color: var(--sp-muted); margin-left: 1.5em; }
.sp-ref-list li { margin-bottom: .8em; padding-left: .3em; overflow-wrap: anywhere; scroll-margin-top: 110px; border-radius: var(--radius-sm); }
.sp-ref-list li:target { background: rgba(var(--health-green-rgb), 0.16); outline: 6px solid rgba(var(--health-green-rgb), 0.16); }
.sp-ref-list a { color: inherit; text-decoration: underline; text-decoration-color: var(--health-green); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.sp-article .sp-ref-list a:not([role="doc-backlink"]) { color: inherit; }
.sp-backlinks { white-space: normal; }
.sp-backlink { display: inline-block; padding: 2px 6px; text-decoration: none !important; font-weight: 600; }
@media (pointer: coarse) {
    .sp-backlink { min-width: 44px; min-height: 44px; text-align: center; line-height: 40px; padding: 0 8px; }
}

/* ---------- FAQ ---------- */
.sp-faq { clear: both; margin-top: 1.2em; }
.sp-faq-item { border: 1px solid var(--border-color); border-radius: var(--radius-md); background: var(--white); margin-bottom: 12px; padding: 0 20px; }
.sp-faq-item[open] { border-color: rgba(var(--health-green-rgb), 0.55); background: var(--off-white); }
.sp-faq-item summary {
    cursor: pointer; list-style: none; position: relative; min-height: 56px; display: flex; align-items: center;
    padding: 12px 34px 12px 0; font-weight: 600; font-size: 1.02rem; line-height: 1.45;
}
.sp-faq-item summary::-webkit-details-marker { display: none; }
.sp-faq-item summary::after {
    content: '+'; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.5rem; font-weight: 400;
    color: var(--sp-green-ink); line-height: 1;
}
.sp-faq-item[open] summary::after { content: '\2212'; }
.sp-faq-item summary:focus-visible { outline: 3px solid var(--sp-focus); outline-offset: 3px; border-radius: var(--radius-sm); }
.sp-faq-a { padding: 0 0 8px; color: #404040; }
.sp-faq-a p:last-child { margin-bottom: .8em; }

/* ---------- Educational note ---------- */
.sp-disclaimer {
    clear: both; background: var(--calm-beige); border: 1px solid rgba(var(--health-green-rgb), 0.3);
    border-left: 5px solid var(--gold-accent); border-radius: var(--radius-md); padding: 18px 22px; margin: 2.6em 0 1.2em;
    font-size: .95rem; line-height: 1.65;
}
.sp-disclaimer p { margin: 0 0 .4em; }
.sp-disclaimer .sp-reviewed { color: var(--sp-muted); font-size: .88rem; margin: 0; }
.sp-disclaimer + .sp-refs h2 { margin-top: 1.2em; }

/* ---------- Related guides ---------- */
.sp-related { background: var(--off-white); border-block: 1px solid var(--border-color); padding: 52px 0 56px; }
.sp-related h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); margin: 0 0 22px; }
.sp-related-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.sp-related-card {
    display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 22px 22px 20px; background: var(--white);
    border: 1px solid var(--border-color); border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
    transition: border-color .2s, transform .2s, box-shadow .2s;
}
.sp-related-card:hover { border-color: var(--health-green); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.sp-related-name { font-weight: 600; font-size: 1.05rem; line-height: 1.35; }
.sp-related-why { color: var(--sp-muted); font-size: .93rem; line-height: 1.6; }
.sp-related-go { margin-top: auto; padding-top: 10px; font-size: .9rem; font-weight: 600; color: var(--sp-green-ink); }
@media (min-width: 640px) { .sp-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .sp-related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }

/* ---------- Closing band: a slightly deeper green than the blog default so the white text passes AA ---------- */
.sp-page .blog-cta { padding-top: 56px; }
.sp-page .bcta-btn { min-height: 48px; justify-content: center; }
.sp-page .bcta-white { color: var(--sp-green-ink); }
.sp-page .bcta-outline:hover { color: var(--sp-green-ink); }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .sp-skip, .sp-btn, .sp-related-card, .btn-slide-fill, .btn-slide-text, .bcta-btn { transition: none; }
    .sp-btn:hover, .sp-related-card:hover, .bcta-btn:hover { transform: none; }
}

/* ---------- Print ---------- */
@media print {
    .navbar, .whatsapp-float, .sp-skip, .sp-aside, .sp-hero-cta, .sp-cta-row, .sp-related, .blog-cta, .footer, .sp-backlinks { display: none !important; }
    body { background: #fff; color: #000; }
    .sp-hero { padding: 0 0 12px; background: none; border: 0; }
    .sp-hero-grid { display: block; }
    .sp-hero-media { display: none; }
    .sp-layout { display: block; padding: 0; }
    .sp-article { font-size: 11pt; line-height: 1.5; }
    .sp-article h2, .sp-article h3 { break-after: avoid; }
    .sp-table-wrap { overflow: visible; border: 0; }
    .sp-table { min-width: 0; font-size: 10pt; }
    .sp-table tr, .sp-figure, .sp-faq-item, .sp-answer { break-inside: avoid; }
    .sp-faq-item { border: 0; border-bottom: 1px solid #ccc; border-radius: 0; padding: 0; }
    .sp-faq-item summary::after { content: none; }
    details::details-content { content-visibility: visible; display: block; }
    .sp-refs a[href^="http"]::after { content: ''; }
    .sp-article a { text-decoration: none; color: inherit; }
}
