/*
 * 2026 design, screens 10-13 "Pacijenti" and the other pages on page-templates/Gutenberg_template.php
 * (template-parts/sd/patients/*.php). Loaded on every page after sante-design.css: every rule is scoped to
 * .sd-patients… classes. The page content is the theme's old ACF blocks (sante-widgets/widget-block/*.php, styled by
 * sante-widgets/sante-widget.css); inside .sd-patients-content they get the design's look.
 */

/* ---------- Layout ---------- */
.sd-patients { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 40px; }
.sd-patients__main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.sd-patients__side { flex: 1 1 280px; max-width: 340px; display: flex; flex-direction: column; gap: 16px; }
.sd-patients__pdf { align-self: flex-start; }
.sd-patients a:focus-visible, .sd-patients-chapters a:focus-visible { outline: 3px solid #1a1a1a; outline-offset: 2px; }

/* ---------- Content: baseline. :where() keeps it below every block class, so a block's own style still decides ---------- */
.sd-patients-content { font-size: 15px; line-height: 1.6; overflow-wrap: break-word; }
:where(.sd-patients-content) p { margin: 0 0 12px; font-size: 15px; line-height: 1.6; }
:where(.sd-patients-content) h2 { margin: 28px 0 12px; font-size: 22px; font-weight: 700; line-height: 1.2; color: var(--sd-ink); }
:where(.sd-patients-content) :is(h3, h4, h5) { margin: 16px 0 8px; font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--sd-ink); }
:where(.sd-patients-content) :is(ul, ol) { margin: 0 0 12px; padding-left: 20px; }
:where(.sd-patients-content) li { margin: 0 0 6px; }
:where(.sd-patients-content) img { max-width: 100%; height: auto; }
:where(.sd-patients-content) figure { margin: 0 0 20px; }
.sd-patients-content > :first-child { margin-top: 0; }
.sd-patients-content > :last-child { margin-bottom: 0; }
.sd-patients-content li p { margin: 0; font-size: inherit; }
.sd-patients-content .wp-block-image img { border-radius: var(--sd-radius); }
/* The design's lead: the text the editors put before the table of contents. */
.sd-patients-content > p:has(~ .sd-patients-toc),
.sd-patients-content > .bloc_description_section:has(~ .sd-patients-toc) p { font-size: 17px; }

/* ---------- Content: table of contents (SdPatients::content()) ---------- */
.sd-patients-toc { margin: 0 0 20px; padding: 16px 20px; border-radius: var(--sd-radius); background: var(--sd-soft); }
.sd-patients-toc .sd-patients-toc__title { margin: 0 0 6px; color: var(--sd-muted); font-size: 13px; font-weight: 700; letter-spacing: .06em; line-height: 1.4; text-transform: uppercase; }
.sd-patients-toc ul { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.sd-patients-toc li { margin: 0; font-size: 14px; line-height: 1.4; }
.sd-patients-toc a { color: var(--sd-ink); font-weight: 600; text-decoration: none; }
.sd-patients-toc a:hover { color: var(--sd-orange-dark); text-decoration: underline; }

/* ---------- Content: the theme's ACF blocks (selectors mirror sante-widget.css to win at equal specificity) ---------- */
.sd-patients-content .bloc_description_section p { font-size: 15px; }
.sd-patients-content .bloc_title_section,
.sd-patients-content .bloc_title_section_icon { margin: 28px 0 12px; }
.sd-patients-content .bloc_title_section h2 { margin: 0; font-size: 22px; font-weight: 700; scroll-margin-top: 16px; }
.sd-patients-content .bloc_title_section_icon .bloc_title_section { margin: 0; min-width: 0; }
/* flex: none: a long title next to it must wrap instead of squeezing the icon box out of square. */
.sd-patients-content .bloc_title_section_icon .bloc_title_section_icon_img { flex: none; margin-right: 14px; border-color: var(--sd-line); line-height: 0; }
/* The section separator is the design's section rule; its mouse-only "gore" control is not part of the design. */
.sd-patients-content .bloc_separator_sante { margin: 0; border-bottom: 1px solid var(--sd-line); }
.sd-patients-content .bloc_separator_sante span { display: none; }
.sd-patients-content .block_lista_investigatii { margin: 0 0 12px; }
.sd-patients-content .block_lista_investigatii h3 { margin: 4px 0 8px; font-size: 15px; font-weight: 700; line-height: 1.3; }
.sd-patients-content .block_lista_investigatii .block_lista_investigatii_row { padding-top: 0; }
.sd-patients-content .block_lista_investigatii ul.block_lista_investigatii_list { display: block; margin: 0; padding-left: 20px; }
.sd-patients-content ul.block_lista_investigatii_list li,
.sd-patients-content ul.block_lista_investigatii_list li.inv_left_item { width: auto; margin: 0 0 6px; font-size: 15px; }
.sd-patients-content .bloc-lista-simpla :is(ul, ol) li.bloc-lista-simpla-list { margin: 0 0 6px; font-size: 15px; list-style-image: none; }
.sd-patients-content .bloc_list_sublist ol.bloc_list_sublist_ordonated li.bloc_list_sublist_main_li { margin: 0 0 12px; font-size: 15px; }
.sd-patients-content .bloc_list_sublist .bloc_list_sublist_insile_list ul li { list-style-image: none; }
/* "[SANTE]-Sectiune Detaliata": its heading reads as a section title, its text as the design's highlighted note. */
.sd-patients-content .bloc_details_sections { display: block; margin: 28px 0 12px; padding: 0; border: 0; background: none; }
.sd-patients-content .bloc_details_sections .bloc_details_sections_icons { display: none; }
.sd-patients-content .bloc_details_sections .bloc_details_sections_details { width: auto; color: var(--sd-ink); font-size: 15px; font-weight: 400; }
.sd-patients-content .bloc_details_sections .bloc_details_sections_details h2 { margin: 0 0 12px; color: var(--sd-ink); font-size: 22px; font-weight: 700; }
.sd-patients-content .bloc_details_sections .bloc_details_sections_details p { margin: 0; padding: 12px 16px; border-left: 4px solid var(--sd-orange); border-radius: 0 var(--sd-radius) var(--sd-radius) 0; background: #fff8f0; }
.sd-patients-content .bloc_details_sections .bloc_details_sections_details p:empty { display: none; }
.sd-patients-content .block_link_sante { padding: 0 0 12px; }
.sd-patients-content .block_link_sante .block_link_sante_details { margin: 0; font-size: 15px; }
.sd-patients-content .block_link_sante .block_link_sante_link a { display: inline-flex; align-items: center; min-height: 44px; padding: 4px 20px; border: 1.5px solid var(--sd-orange); border-radius: 999px; background: #fff; color: var(--sd-orange-text); font-size: 15px; font-weight: 700; }
.sd-patients-content .block_link_sante .block_link_sante_link a:hover { background: var(--sd-orange-soft); }
.sd-patients-content .block_link_sante .block_link_sante_link a svg { display: none; }
.sd-patients-content .block_tabel_sante { margin: 0 0 16px; }
.sd-patients-content .block_tabel_sante .table { margin: 0; font-size: 14px; }
.sd-patients-content .block_tabel_sante .sante_tabel_head_data tr th { padding: 12px; background: var(--sd-soft); font-size: 14px; font-weight: 700; }
.sd-patients-content .block_tabel_sante .table-responsive table tbody tr td { white-space: normal; }

/* ---------- Content: product block (SdPatients::block(): heading, shared product card as a row, notes) ---------- */
.sd-patients-product { margin: 28px 0 12px; }
.sd-patients-product > h2 { margin: 0 0 12px; scroll-margin-top: 16px; }
/* A run of product blocks (the NIPT price lists) is one list of cards; SdPatients::content() drops its headings. */
.sd-patients-product + .sd-patients-product { margin-top: 12px; }
.sd-patients-pcard.sd-pcard { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 16px 20px; border-color: var(--sd-orange); }
.sd-patients-pcard .sd-pcard__name { flex: 1 1 220px; }
.sd-patients-pcard.sd-pcard .sd-btn { align-self: center; margin-top: 0; }
/* The design's filled button for these rows; the turquoise "U korpi" state (.sd-btn--incart) stays as it is. */
.sd-patients-pcard .sd-btn--outline:not(.sd-btn--incart) { border-color: var(--sd-orange); background: var(--sd-orange); color: var(--sd-on-orange); }
.sd-patients-pcard .sd-btn--outline:not(.sd-btn--incart):hover { border-color: var(--sd-orange-dark); background: var(--sd-orange-dark); color: var(--sd-on-orange); }
.sd-patients-product .sd-patients-product__note { margin: 8px 0 0; font-size: 13px; }

/* ---------- Order banner under the "how to order" content ---------- */
.sd-patients-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border: 1px solid var(--sd-orange-line); border-radius: var(--sd-radius-lg); background: var(--sd-orange-soft); }
.sd-patients-banner p { margin: 0; }
.sd-patients-banner strong { display: block; font-size: 18px; line-height: 1.3; }
.sd-patients-banner .sd-muted { display: block; margin-top: 4px; font-size: 14px; }

/* ---------- Sidebar ---------- */
.sd-patients-promo { display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: var(--sd-radius-lg); background: var(--sd-orange); color: var(--sd-on-orange); }
.sd-patients-promo__kicker { font-size: 13px; font-weight: 600; }
.sd-patients-promo strong { font-size: 22px; line-height: 1.15; }
.sd-patients-promo__text { font-size: 14px; line-height: 1.4; }
.sd-patients-promo .sd-btn { background: #fff; color: var(--sd-orange-text); }
.sd-patients-promo .sd-btn:hover { background: var(--sd-orange-soft); color: var(--sd-orange-text); }
.sd-patients-title { margin: 0 0 8px; color: var(--sd-ink); font-size: 14px; font-weight: 700; line-height: 1.3; }
.sd-patients-nav ul, .sd-patients-chapters ul { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.sd-patients-nav ul { gap: 4px; }
.sd-patients-nav li, .sd-patients-chapters li { margin: 0; }
.sd-patients-nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border: 1px solid #eee; border-radius: var(--sd-radius); color: var(--sd-ink); font-size: 14px; font-weight: 600; line-height: 1.3; text-decoration: none; }
.sd-patients-nav a:hover { border-color: var(--sd-orange); color: var(--sd-orange-dark); }
.sd-patients-nav a.is-current { border-color: var(--sd-orange-line); background: var(--sd-orange-soft); color: var(--sd-orange-text); }
/* The chapter list also sits in the blog sidebar (template-parts/sd/patients/guide-chapters.php): it styles itself. */
.sd-patients-chapters .sd-patients-chapters__link { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid #eee; color: var(--sd-ink); font-size: 14px; font-weight: 600; line-height: 1.3; text-decoration: none; }
.sd-patients-chapters li:last-child .sd-patients-chapters__link { border-bottom: 0; }
.sd-patients-chapters .sd-patients-chapters__link:hover { color: var(--sd-orange-dark); }
.sd-patients-help { display: flex; flex-direction: column; gap: 6px; border-color: #ececec; background: var(--sd-soft); font-size: 14px; }
.sd-patients-help .sd-patients-title { margin: 0; }
.sd-patients-help__phone { align-self: flex-start; color: var(--sd-ink); font-weight: 600; }
.sd-patients-help__more { align-self: flex-start; font-weight: 700; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .sd-patients { gap: 28px; }
  .sd-patients__side { max-width: none; }
  .sd-patients-banner { display: none; } /* stacked, the sidebar's promotion with the same offer follows right away */
}
@media (max-width: 640px) {
  .sd-patients-content .bloc_title_section h2,
  .sd-patients-content .bloc_details_sections .bloc_details_sections_details h2,
  :where(.sd-patients-content) h2 { font-size: 20px; }
  .sd-patients-pcard.sd-pcard { padding: 14px 16px; }
  .sd-patients-banner { padding: 16px; }
}
