/* ==========================================================================
   Taharas Hamishpacha Simplified — text version
   /halachos-of-taharas-hamishpacha-chabad/{section}

   The body of each section is a Google-Docs export. HalachosTextController
   scopes its stylesheet to .halachos-content and strips the parts that fight
   the site: the webfont import, every font-family (Comic Sans, Calibri,
   Times), and flat #000 body text. What survives is the halachic emphasis —
   the reds, blues and greens, the underlines and highlights.

   This file supplies the rest from the redesign tokens, so the page reads as
   part of the site rather than as a pasted document.
   ========================================================================== */

.halachos-actions {
    width: 100%;
    text-align: center;
    margin: 24px 0 40px;
}

.halachos-empty {
    text-align: center;
    color: var(--text-paragraph);
    padding: 48px 16px;
}

/* ── Content shell ────────────────────────────────────────────────────── */
.redesign .halachos-content {
    max-width: 820px;
    margin: 0 auto;
    padding: 8px 0 24px;
    /* The export's type is set in absolute points, so font-size can't scale
       it without flattening the hierarchy the slides rely on. Zoom keeps the
       proportions and just makes the whole block legible. */
    zoom: 1.2;
    /* Manrope carries no Hebrew, so name a Hebrew face before the generic
       fallback — a handful of slides quote Hebrew words. */
    font-family: var(--font-body), 'Noto Sans Hebrew', 'Arial Hebrew', sans-serif;
    color: var(--text-heading);
    text-align: left;
}

@media (max-width: 900px) {
    .redesign .halachos-content { zoom: 1.08; }
}

@media (max-width: 600px) {
    .redesign .halachos-content { zoom: 1; }
}

/* Docs exports set font-family per span; the controller strips those rules,
   and this catches anything inline that slipped through. */
.redesign .halachos-content [style*="font-family"] {
    font-family: inherit !important;
}

.redesign .halachos-content p,
.redesign .halachos-content li {
    margin: 0 0 10px;
    line-height: 1.6;
}

.redesign .halachos-content ul,
.redesign .halachos-content ol {
    margin: 0 0 18px;
    padding-left: 26px;
}

/* Docs numbers its ordered lists with CSS counters seeded on a `.start`
   class. Lists that lost that class during export carry on from whatever
   the previous counter held, which is how a list ends up reading "0. A. B."
   Native markers are seeded per list and honour the `start` attribute.

   The [class] attribute selector is load-bearing: the export's own
   `ol.lst-kix_list_3-0 { list-style-type: none }` would otherwise outrank a
   plain `.halachos-content ol` and leave the list with no marker at all. */
.redesign .halachos-content ol[class] {
    list-style: decimal outside;
}

.redesign .halachos-content ol[class] ol[class] {
    list-style: lower-alpha outside;
}

.redesign .halachos-content ol[class] ol[class] ol[class] {
    list-style: lower-roman outside;
}

.redesign .halachos-content ol[class] > li::before {
    content: none;
}

/* Docs emits empty <p> elements by the dozen as spacers. */
.redesign .halachos-content p:empty {
    margin: 0;
    height: 6px;
}

/* Headings the export renders as bold display text. */
.redesign .halachos-content h1,
.redesign .halachos-content h2,
.redesign .halachos-content h3,
.redesign .halachos-content h4 {
    font-family: var(--font-display);
    font-weight: 400;
    color: var(--text-heading);
    margin: 28px 0 12px;
}

/* ── Images ───────────────────────────────────────────────────────────────
   The controller removes the export's pinned width/height, so the intrinsic
   ratio is intact; these rules keep it that way at any viewport. Diagrams
   are centred with a little breathing room, like figures elsewhere. */
.redesign .halachos-content img {
    display: block;
    max-width: 100%;
    /* width/height attributes carry the document ratio; auto on both lets the
       max-* bounds scale the image down without distorting it. */
    width: auto;
    height: auto;
    /* Slide graphics were drawn full-page — uncapped, one raindrop fills the
       viewport. A pixel cap keeps a figure and its caption on screen together;
       vh units would be multiplied by the wrapper's zoom and undershoot. */
    max-height: 480px;
    margin: 20px auto;
    border-radius: 8px;
}

/* The export's crop wrapper (geometry already stripped server-side) is an
   inline-block that would otherwise shrink-wrap the image off-centre. */
.redesign .halachos-content span:has(> img) {
    display: block;
    text-align: center;
}

.redesign .halachos-content table {
    max-width: 100%;
}

.redesign .halachos-content a {
    color: var(--brand-dark-slate);
    overflow-wrap: anywhere;
}

.redesign .halachos-content a:hover {
    color: var(--brand-dark-slate-darker);
}

/* ── Slide boxes ──────────────────────────────────────────────────────────
   Parallel items presented side by side on a slide — e.g. the three bedikos
   (Hefsek Taharah / Day 1 / Day 7) on the hefsek-taharah tab. Built from the
   same peach card treatment used across the redesign. */
.redesign .halachos-content .hal-boxes {
    display: grid;
    gap: 18px;
    margin: 12px 0 30px;
}

.redesign .halachos-content .hal-boxes--3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 720px) {
    .redesign .halachos-content .hal-boxes--3 {
        grid-template-columns: 1fr;
    }
}

.redesign .halachos-content .hal-box {
    border: 1px solid var(--brand-border-peach);
    border-radius: 12px;
    background: var(--neutral-white);
    overflow: hidden;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.redesign .halachos-content .hal-box__title {
    margin: 0;
    padding: 12px 14px;
    background: var(--brand-offwhite-peach);
    border-bottom: 1px solid var(--brand-border-peach);
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 0.4px;
    color: var(--brand-dark-slate);
    /* Cormorant defaults to old-style figures, which drop the "1" in DAY 1
       below the caps next to it. Lining figures sit level with the letters. */
    font-variant-numeric: lining-nums;
}

.redesign .halachos-content .hal-box__body {
    margin: 0;
    padding: 18px 16px;
    line-height: 1.55;
    color: var(--text-paragraph);
    flex: 1 1 auto;
}

.redesign .halachos-content .hal-box__body strong {
    color: var(--text-heading);
    font-weight: 600;
}

.redesign .halachos-content .hal-u {
    text-decoration: underline;
    text-underline-offset: 2px;
}
