/* ============================================================
   Clinic treatment page / post layout  —  v3 (themeable)
   Banner + breadcrumbs → content that starts with a floated
   featured image → sidebar. No header / footer styles.

   Scoped under .lat- so it won't clash with Hello Elementor /
   Elementor's own CSS. Used by single.php and page.php.

   ── RE-COLOURING FOR ANOTHER WEBSITE ──────────────────────
   All colours, fonts and banner settings live in the THEMES
   section right below. To make a new scheme:
     1. Copy the ".lat-theme-gold" block, rename it
        (e.g. ".lat-theme-blue") and change the values.
     2. In single.php set   $lat_theme = 'blue';
        (add its Google Font to $lat_theme_fonts if it needs one).
   Nothing else in this file has to change.
   ============================================================ */

/* Full-bleed: undo Hello Elementor's 1140px .site-main cap so the
   banner can span the whole screen (.lat-container re-limits the width). */
html body .site-main.lat-page { max-width: none; width: 100%; margin: 0; padding: 0; }

.lat-page *,
.lat-page *::before,
.lat-page *::after { box-sizing: border-box; }

/* ================= THEMES =================
   Token guide
   --accent        borders, icons, list markers, focus ring
   --accent-text   links + small accent text (kept dark enough to read)
   --accent-dark   link hover
   --soft          soft panel background (table headers, FAQ rows, quotes)
   --line          hairline borders
   --ink           headings / bold text        --ink-soft   body text
   --h2-* / --h3-color   content headings
   --font-body / --font-heading / --font-size
   --banner-*      banner background, optional photo, breadcrumb accent   */

/* ---- THEME: orange (default) — peach + orange, dark text, serif banner title ---- */
.lat-page,
.lat-page.lat-theme-orange {
  --accent: #e9490b;
  --accent-text: #c93d05;
  --accent-dark: #a63204;
  --soft: #fdf1e6;
  --line: #efd6c7;
  --ink: #3d3d3d;
  --ink-soft: #3d3d3d;
  --h2-color: #3d3d3d;
  --h2-weight: 700;
  --h2-size: clamp(24px, 2.8vw, 32px);
  --h3-color: #3d3d3d;
  --font-body: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-size: 16px;
  --title-weight: 600;
  --banner-color: #3f382d;
  --banner-image: none;                 /* e.g. url('https://your-site.com/wp-content/uploads/banner.jpg') */
  --banner-overlay: rgba(28, 22, 14, .58);
  --banner-layers: linear-gradient(var(--banner-overlay), var(--banner-overlay)), var(--banner-image);
  --banner-pad: 84px 24px 76px;
  --banner-accent: #ff7a3d;             /* breadcrumb separators */
  --crumb-sep: "\2192";
}

/* ---- THEME: gold — warm gold + brown, sans headings ---- */
.lat-page.lat-theme-gold {
  --accent: #94653a;
  --accent-text: #94653a;
  --accent-dark: #6f4a28;
  --soft: #f8f5f0;
  --line: #e6dccd;
  --ink: #2b2a28;
  --ink-soft: #4a4744;
  --h2-color: #94653a;
  --h2-weight: 400;
  --h2-size: clamp(26px, 3vw, 34px);
  --h3-color: #94653a;
  --font-body: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size: 17px;
  --title-weight: 400;
  --banner-color: #94653a;
  --banner-layers:
    radial-gradient(circle at 85% 0%, rgba(255,255,255,.14), transparent 55%),
    linear-gradient(135deg, #6f4a28 0%, #94653a 100%);
  --banner-pad: 56px 24px 44px;
  --banner-accent: rgba(255,255,255,.7);
  --crumb-sep: "\203A";
}

/* ---- Structure tokens shared by every theme ---- */
.lat-page {
  --paper: #ffffff;
  --radius: 4px;
  --lat-sticky-top: 24px;      /* raise if your site header is sticky */
  --lat-anchor-offset: 24px;   /* same idea, for TOC jump links */
  font-family: var(--font-body);
  font-size: var(--font-size);
  line-height: 1.9;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.lat-page a:focus-visible,
.lat-page button:focus-visible,
.lat-page summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ================= BANNER + BREADCRUMBS ================= */
.lat-page .lat-banner {
 background-image: linear-gradient(90deg, #F0680F 0%, #C9440E 80%) !important;
  background-image: var(--banner-layers);
  background-size: cover;
  background-position: center;
  color: #fff;
  text-align: center;
  padding: var(--banner-pad);
}
.lat-page .lat-banner-inner { max-width: 1240px; margin: 0 auto; }
.lat-page .lat-banner-title { margin: 0 0 16px; color: #fff; font-family: var(--font-heading); font-size: clamp(28px, 4.4vw, 46px); font-weight: var(--title-weight); line-height: 1.2; letter-spacing: .01em; }

.lat-page .lat-breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2px 10px; margin: 0; padding: 0; font-size: 14px; line-height: 1.6; }
.lat-page .lat-breadcrumbs li { display: flex; align-items: center; gap: 10px; margin: 0; padding: 0; }
.lat-page .lat-breadcrumbs li + li::before { content: var(--crumb-sep); font-size: 16px; line-height: 1; color: var(--banner-accent); }
.lat-page .lat-breadcrumbs a { color: #fff; text-decoration: none; opacity: .95; }
.lat-page .lat-breadcrumbs a:hover { text-decoration: underline; opacity: 1; }
.lat-page .lat-breadcrumbs [aria-current="page"] { opacity: .85; }
.lat-page .lat-banner a:focus-visible { outline-color: #fff; }

/* ================= MAIN GRID ================= */
.lat-page .lat-container { max-width: 1240px; margin: 0 auto; padding: 48px 24px 80px; }
.lat-page .lat-grid { display: grid; grid-template-columns: minmax(0, 2.7fr) minmax(280px, 1fr); gap: 48px; align-items: start; }
.lat-page .lat-entry { min-width: 0; display: flow-root; }   /* flow-root contains the floated image */

/* ================= FEATURED IMAGE (first thing in the article) =================
   Floats right at the very top; the first lines of content wrap beside it. */
.lat-page .lat-hero-image { float: right; width: 44%; max-width: 420px; margin: 6px 0 20px 32px; border: 1px solid var(--line); background: var(--soft); }
.lat-page .lat-hero-image img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }

/* ================= POST CONTENT ================= */
/* Everything below is scoped to .lat-content — the box that wraps whatever
   you write in the WordPress editor. Add new markup in the editor and it
   picks up this styling automatically; nothing else to configure. */
.lat-page .lat-content > :first-child { margin-top: 0; }
.lat-page .lat-content > :last-child { margin-bottom: 0; }

/* ---- Paragraphs ---- */
.lat-page .lat-content p { margin: 0 0 18px; color: var(--ink-soft); }
.lat-page .lat-content .lat-lead { margin: 0 0 14px; font-size: 18px; font-weight: 700; letter-spacing: .01em; text-transform: uppercase; color: var(--ink-soft); }

/* ---- Inline emphasis: <b> <strong> <i> <em> <u> <mark> <small> <sub> <sup> ---- */
.lat-page .lat-content strong,
.lat-page .lat-content b { color: var(--ink); font-weight: 700; }
.lat-page .lat-content em,
.lat-page .lat-content i { font-style: italic; }
.lat-page .lat-content u { text-decoration: underline; text-underline-offset: 2px; }
.lat-page .lat-content mark { background: var(--soft); color: var(--ink); padding: 0 4px; border-radius: 2px; }
.lat-page .lat-content small { font-size: 85%; color: var(--ink-soft); }
.lat-page .lat-content sub,
.lat-page .lat-content sup { font-size: 70%; }

/* ---- Headings h1–h6 ----
   The page title already uses .lat-banner-title, so h1 only appears if you
   add a Heading block set to "H1" inside the body text. */
.lat-page .lat-content h1 { font-size: clamp(30px, 3.6vw, 40px); font-weight: 700; line-height: 1.25; color: var(--ink); margin: 36px 0 16px; scroll-margin-top: var(--lat-anchor-offset); }
.lat-page .lat-content h2 { font-size: var(--h2-size); font-weight: var(--h2-weight); line-height: 1.3; color: var(--h2-color); margin: 32px 0 14px; scroll-margin-top: var(--lat-anchor-offset); }
.lat-page .lat-content h3 { font-size: 20px; font-weight: 700; line-height: 1.4; color: var(--h3-color); margin: 26px 0 10px; scroll-margin-top: var(--lat-anchor-offset); }
.lat-page .lat-content h4 { font-size: 17px; font-weight: 700; line-height: 1.5; color: var(--ink); margin: 20px 0 8px; }
.lat-page .lat-content h5 { font-size: 15px; font-weight: 700; line-height: 1.5; color: var(--ink); margin: 18px 0 8px; text-transform: uppercase; letter-spacing: .03em; }
.lat-page .lat-content h6 { font-size: 14px; font-weight: 700; line-height: 1.5; color: var(--ink-soft); margin: 16px 0 6px; text-transform: uppercase; letter-spacing: .04em; }
.lat-page .lat-content h1 + p, .lat-page .lat-content h1 + h2,
.lat-page .lat-content h2 + p, .lat-page .lat-content h2 + h3,
.lat-page .lat-content h3 + p, .lat-page .lat-content h3 + h4,
.lat-page .lat-content h4 + p, .lat-page .lat-content h5 + p, .lat-page .lat-content h6 + p { margin-top: 0; }

/* ---- Links ---- */
.lat-page .lat-content a { color: var(--accent-text); font-weight: 700; text-decoration: none; }
.lat-page .lat-content a:hover { color: var(--accent-dark); text-decoration: underline; }

/* ---- Lists: <ul> <ol> <li>, including nesting ---- */
.lat-page .lat-content ul,
.lat-page .lat-content ol { margin: 0 0 18px; padding-left: 22px; color: var(--ink-soft); }
.lat-page .lat-content li { margin-bottom: 8px; line-height: 1.7; }
.lat-page .lat-content li::marker { color: var(--accent); font-weight: 700; }
.lat-page .lat-content ol { list-style: decimal; }
.lat-page .lat-content ul { list-style: disc; }
.lat-page .lat-content li > ul,
.lat-page .lat-content li > ol { margin: 8px 0 0; }
.lat-page .lat-content li > ul > li::marker { color: var(--ink-soft); }

/* ---- Blockquote ---- */
.lat-page .lat-content blockquote { border-left: 3px solid var(--accent); background: var(--soft); padding: 16px 20px; border-radius: var(--radius); color: var(--ink-soft); margin: 0 0 20px; }
.lat-page .lat-content blockquote p:last-child { margin-bottom: 0; }
.lat-page .lat-content blockquote cite { display: block; margin-top: 10px; font-size: 14px; font-style: normal; font-weight: 700; color: var(--ink); }

/* ---- Horizontal rule ---- */
.lat-page .lat-content hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }

/* ---- Single images ---- */
.lat-page .lat-content img { max-width: 100%; height: auto; border-radius: var(--radius); }
.lat-page .lat-content .wp-block-image,
.lat-page .lat-content figure { margin: 0 0 20px; }
.lat-page .lat-content .wp-block-image figcaption,
.lat-page .lat-content figure figcaption { margin-top: 8px; font-size: 13px; line-height: 1.5; color: var(--ink-soft); text-align: center; }
.lat-page .lat-content .wp-block-image.alignleft { float: left; margin: 4px 24px 16px 0; max-width: 45%; }
.lat-page .lat-content .wp-block-image.alignright { float: right; margin: 4px 0 16px 24px; max-width: 45%; }
.lat-page .lat-content .wp-block-image.aligncenter { margin-left: auto; margin-right: auto; text-align: center; }

/* ---- 3 images in one row ----
   Easiest in the editor: select the 3 images → Gallery block → set
   "Columns" to 3. That block is .wp-block-gallery and is forced to 3
   columns (2 on tablet, 1 on phone) below, with rounded corners, a
   hover zoom and styled captions. */
.lat-page .lat-content .wp-block-gallery,
.lat-page .lat-content .gallery { display: grid !important; grid-template-columns: repeat(3, 1fr) !important; gap: 16px; margin: 8px 0 24px; list-style: none; padding: 0; }
.lat-page .lat-content .wp-block-gallery .wp-block-image,
.lat-page .lat-content .gallery .gallery-item { margin: 0; }
.lat-page .lat-content .wp-block-gallery img,
.lat-page .lat-content .gallery img { display: block; width: 100%; height: 100%; aspect-ratio: 1 / 1; object-fit: cover; margin: 0; transition: transform .25s ease; }
.lat-page .lat-content .wp-block-gallery figure:hover img,
.lat-page .lat-content .gallery .gallery-item:hover img { transform: scale(1.04); }
.lat-page .lat-content .wp-block-gallery figcaption,
.lat-page .lat-content .gallery .gallery-caption { margin-top: 6px; }

/* Fallback if you'd rather place 3 plain <img> tags yourself (e.g. inside a
   Group / Custom HTML block) instead of using the Gallery block: wrap them
   in <div class="lat-img-row"> … </div> and they'll match the same layout. */
.lat-page .lat-content .lat-img-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 8px 0 24px; }
.lat-page .lat-content .lat-img-row img { display: block; width: 100%; height: 100%; aspect-ratio: 1 / 1; object-fit: cover; margin: 0; border-radius: var(--radius); }

/* Tables (pricing, targeted areas …) */
.lat-page .lat-content table { width: 100%; border-collapse: collapse; margin: 6px 0 24px; font-size: 15px; line-height: 1.6; }
.lat-page .lat-content th,
.lat-page .lat-content td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; vertical-align: top; color: var(--ink-soft); }
.lat-page .lat-content th { background: var(--soft); color: var(--ink); font-weight: 700; text-align: center; }
.lat-page .lat-content td ul,
.lat-page .lat-content td ol { margin: 0; }

/* ================= TABLE OF CONTENTS (compact toggle box) =================
   Injected before the first <h2>. Closed by default; sits beside the
   floated image when there is room, otherwise drops below it. */
.lat-page .lat-content .lat-toc { display: flow-root; width: min(100%, 320px); margin: 6px 0 22px; padding: 0 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.lat-page .lat-content .lat-toc > summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 0; list-style: none; cursor: pointer; font-size: 15px; font-weight: 700; line-height: 1.4; color: var(--ink); }
.lat-page .lat-content .lat-toc > summary::-webkit-details-marker { display: none; }
.lat-page .lat-content .lat-toc > summary::after { content: "+"; flex: 0 0 26px; height: 26px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 3px; font-size: 18px; font-weight: 400; line-height: 1; color: var(--accent); }
.lat-page .lat-content .lat-toc[open] > summary::after { content: "\2212"; }
.lat-page .lat-content .lat-toc ul { margin: 0 0 12px; padding-left: 18px; }
.lat-page .lat-content .lat-toc li { margin-bottom: 4px; font-size: 15px; line-height: 1.6; }
.lat-page .lat-content .lat-toc a { color: var(--ink-soft); font-weight: 400; }
.lat-page .lat-content .lat-toc a:hover { color: var(--accent-text); }

/* ================= FAQ ACCORDION =================
   Any native <details>/<summary> in the content (also the Gutenberg
   "Details" block) becomes an accordion row. */
.lat-page .lat-content details:not(.lat-toc) { margin: 0 0 10px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.lat-page .lat-content details:not(.lat-toc) > summary { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; list-style: none; cursor: pointer; background: var(--soft); border-radius: var(--radius); font-size: 16px; font-weight: 700; line-height: 1.5; color: var(--accent-text); }
.lat-page .lat-content details:not(.lat-toc) > summary::-webkit-details-marker { display: none; }
.lat-page .lat-content details:not(.lat-toc) > summary::before { content: "+"; flex: 0 0 16px; font-weight: 700; }
.lat-page .lat-content details:not(.lat-toc)[open] > summary::before { content: "\2212"; }
.lat-page .lat-content details:not(.lat-toc)[open] > summary { border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.lat-page .lat-content details:not(.lat-toc) > :not(summary) { margin-inline: 16px; }
.lat-page .lat-content details:not(.lat-toc) > summary + * { margin-top: 14px; }

/* ================= SHORTCODE SLOTS =================
   single.php wraps each of your Elementor-template shortcodes in one of:
   .lat-slot--callback / --reviewed / --booking  (sidebar)
   .lat-slot--doctors  / --consult  (under the article content)
   The wrappers only add spacing / stickiness — the Elementor template
   styles its own content. */
.lat-page .lat-slot { min-width: 0; }
.lat-page .lat-slot--doctors { margin: 40px 0 0; }
.lat-page .lat-slot--consult { margin: 32px 0 0; }

/* ================= ENTRY FOOTER (byline + tags) ================= */
.lat-page .lat-entry-foot { clear: both; margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.7; color: var(--ink-soft); }
.lat-page .lat-entry-foot p { margin: 0; }
.lat-page .lat-entry-foot p + p { margin-top: 4px; }
.lat-page .lat-entry-foot strong { color: var(--ink); }
.lat-page .lat-entry-foot a { color: var(--accent-text); }

/* ================= SIDEBAR ================= */
.lat-page .lat-sidebar { align-self: stretch; min-width: 0; display: flex; flex-direction: column; gap: 28px; }

/* Only the booking slot sticks — the whole sidebar is taller than most screens,
   so sticking all of it would hide the submit button. If your booking template
   is taller than the screen, delete this rule. */
@media (min-width: 901px) {
  .lat-page .lat-slot--booking { position: sticky; top: var(--lat-sticky-top); }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1100px) {
  .lat-page .lat-grid { gap: 36px; }
  .lat-page .lat-hero-image { width: 40%; margin-left: 24px; }
  .lat-page .lat-content .wp-block-gallery,
  .lat-page .lat-content .gallery,
  .lat-page .lat-content .lat-img-row { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 900px) {
  .lat-page .lat-container { padding-top: 36px; }
  .lat-page .lat-grid { grid-template-columns: 1fr; }
  /* sidebar drops under the content as a 2-up grid */
  .lat-page .lat-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
  .lat-page .lat-slot--callback { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .lat-page .lat-sidebar { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .lat-page { font-size: 16px; line-height: 1.8; }
  .lat-page .lat-banner { padding: 48px 16px 40px; }
  .lat-page .lat-container { padding: 28px 16px 56px; }

  /* featured image stops floating and becomes a full-width lead image */
  .lat-page .lat-hero-image { float: none; width: 100%; max-width: 100%; margin: 0 0 20px; }
  .lat-page .lat-hero-image img { aspect-ratio: 4 / 3; }

  .lat-page .lat-content .lat-toc { width: 100%; }
  .lat-page .lat-content .wp-block-gallery,
  .lat-page .lat-content .gallery,
  .lat-page .lat-content .lat-img-row { grid-template-columns: 1fr !important; }
  .lat-page .lat-content .wp-block-image.alignleft,
  .lat-page .lat-content .wp-block-image.alignright { float: none; max-width: 100%; margin: 0 0 16px; }
  .lat-page .lat-content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}