/* ==========================================================================
   WiseBridgeX design system
   Direction: "WiseBridgeX Scholarly Authority" (active Novamira design)
   Every container is a proportion. No bare px max-width anywhere.
   ========================================================================== */

:root {
  /* Palette */
  --wbx-bg: #F5F1E8;
  --wbx-surface: #FFFFFF;
  --wbx-ink: #10254A;
  --wbx-accent: #2E6E6B;
  --wbx-gold: #B8892B;
  --wbx-gold-text: #7E6019;
  --wbx-muted: #5C6675;
  --wbx-deep: #0B1A36;
  --wbx-line: #E4DECF;

  /* Type */
  --wbx-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --wbx-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wbx-arabic: "Noto Kufi Arabic", Tahoma, Arial, sans-serif;

  --wbx-body: 1.125rem;      /* 18px */
  --wbx-small: 0.9375rem;    /* 15px */
  --wbx-h1: clamp(2.5rem, 1.6rem + 2.6vw, 4rem);
  --wbx-h2: clamp(1.9rem, 1.3rem + 1.5vw, 2.75rem);
  --wbx-h3: clamp(1.45rem, 1.2rem + 0.7vw, 1.85rem);
  --wbx-h4: 1.25rem;
  --wbx-lh-body: 1.65;
  --wbx-lh-tight: 1.08;
  --wbx-measure: 62ch;

  /* Space */
  --wbx-xs: 8px;
  --wbx-sm: 14px;
  --wbx-md: 24px;
  --wbx-lg: 40px;
  --wbx-xl: 64px;
  --wbx-gutter: clamp(24px, 4.5vw, 72px);
  --wbx-row: clamp(28px, 3vw, 44px);
  --wbx-section: clamp(34px, 3.6vw, 52px);
  --wbx-section-lg: clamp(56px, 6vw, 96px);

  /* Zones */
  --wbx-display: 70%;
  --wbx-reading: 50vw;
  --wbx-narrow: 35vw;

  /* Shape */
  --wbx-r-sm: 2px;
  --wbx-r-md: 4px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
html { scroll-behavior: auto; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body,
body.ast-plain-container,
body.ast-page-builder-template {
  background: var(--wbx-bg) !important;
  color: var(--wbx-ink);
  font-family: var(--wbx-sans);
  font-size: var(--wbx-body);
  line-height: var(--wbx-lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body .entry-content p,
body .entry-content li,
body p,
body li,
body td,
body th,
body input,
body select,
body textarea,
body button,
body .button {
  font-family: var(--wbx-sans);
}
body .entry-content p,
body .entry-content li,
body p,
body li { font-size: var(--wbx-body); line-height: var(--wbx-lh-body); }

h1, h2, h3, h4, h5, h6,
.entry-title,
.wp-block-post-title,
body .entry-content h1, body .entry-content h2, body .entry-content h3,
body .entry-content h4, body .entry-content h5, body .entry-content h6 {
  font-family: var(--wbx-serif);
  font-weight: 600;
  color: var(--wbx-ink);
  letter-spacing: -0.01em;
  margin-block: 0 0.5em;
}
h1, .entry-title, body .entry-content h1 { font-size: var(--wbx-h1); line-height: var(--wbx-lh-tight); }
h2, body .entry-content h2 { font-size: var(--wbx-h2); line-height: 1.12; }
h3, body .entry-content h3 { font-size: var(--wbx-h3); line-height: 1.2; }
h4, body .entry-content h4 { font-size: var(--wbx-h4); line-height: 1.3; }
h5, h6, body .entry-content h5, body .entry-content h6 { font-size: var(--wbx-body); line-height: 1.35; font-family: var(--wbx-sans); font-weight: 600; }

a, .entry-content a { color: var(--wbx-accent); text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover, .entry-content a:hover { color: var(--wbx-ink); }
a:focus-visible { outline: 2px solid var(--wbx-accent); outline-offset: 3px; }

small, .wbx-small, figcaption, .wp-block-image figcaption, .wp-element-caption {
  font-size: var(--wbx-small) !important;
  color: var(--wbx-muted);
  line-height: 1.5;
}

blockquote, .wp-block-quote {
  font-family: var(--wbx-serif);
  font-size: 1.5rem;
  line-height: 1.35;
  border-inline-start: 3px solid var(--wbx-gold);
  padding-inline-start: var(--wbx-md);
  margin-inline: 0;
  color: var(--wbx-ink);
}
.wp-block-quote p { font-family: var(--wbx-serif); font-size: 1.5rem; line-height: 1.35; }
.wp-block-quote cite { font-family: var(--wbx-sans); font-size: var(--wbx-small); color: var(--wbx-muted); font-style: normal; }

hr, .wp-block-separator { border: 0; border-top: 1px solid var(--wbx-line); margin-block: var(--wbx-lg); opacity: 1; }
.wp-block-separator.is-style-wide { width: 100%; }

/* No shadows, no gradients, anywhere. */
.entry-content *, .site-header *, .site-footer * { box-shadow: none !important; text-shadow: none !important; }

/* --------------------------------------------------------------------------
   Theme container: kill the pixel cap, own the width
   -------------------------------------------------------------------------- */
body .ast-container,
body .site-content .ast-container,
body .ast-plain-container .site-content > .ast-container {
  max-width: none !important;
  width: 100% !important;
  padding-inline: var(--wbx-gutter) !important;
  margin-inline: auto;
}
body.ast-plain-container #primary,
body.ast-plain-container .ast-article-single,
body.ast-plain-container .entry-content {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
}
body .ast-plain-container .site-content > .ast-container { flex-direction: column; }
body .entry-content > * { max-width: none; }

/* Astra global group padding trap: neutralise, then we set our own. */
body .entry-content .wp-block-group { padding: 0; }

/* Global site padding under the header, above the footer. */
body.ast-plain-container #content { padding-block: 0; }

/* --------------------------------------------------------------------------
   The two-zone layout law
   -------------------------------------------------------------------------- */

/* Display zone: 70% of the viewport, centred. */
.entry-content .wbx-display,
.wbx-display {
  display: grid;
  grid-template-columns: 1fr min(var(--wbx-display), 100%) 1fr;
}
.entry-content .wbx-display > *,
.wbx-display > * { grid-column: 2; }

/* Reading zone: 50vw, centred. Prose only. */
.entry-content .wbx-reading,
.wbx-reading {
  width: min(var(--wbx-reading), 100%);
  margin-inline: auto;
}
.entry-content .wbx-reading > p,
.entry-content .wbx-reading > ul,
.entry-content .wbx-reading > ol,
.wbx-reading > p { max-width: var(--wbx-measure); }

/* Narrow zone: 35vw, centred. Tables, tier lists, forms. */
.entry-content .wbx-narrow,
.wbx-narrow {
  width: min(var(--wbx-narrow), 100%);
  margin-inline: auto;
}

/* Pull a narrow element out to the display zone. */
.entry-content .wbx-pull-wide,
.wbx-pull-wide {
  width: var(--wbx-display);
  margin-inline-start: 50%;
  transform: translateX(-50%);
}
html[dir="rtl"] .wbx-pull-wide { transform: translateX(50%); }

/* Full bleed past the theme container. */
.entry-content .wbx-bleed,
.wbx-bleed,
.entry-content .alignfull {
  margin-inline: calc(50% - 50vw) !important;
  width: 100vw !important;
  max-width: 100vw !important;
}
.entry-content .wbx-bleed > .wbx-inner,
.wbx-bleed > .wbx-inner {
  padding-inline: var(--wbx-gutter);
}

/* Section rhythm */
.entry-content .wbx-section,
.wbx-section { padding-block: var(--wbx-section); }
.entry-content .wbx-section-lg,
.wbx-section-lg { padding-block: var(--wbx-section-lg); }
.entry-content .wbx-row,
.wbx-row { padding-block: var(--wbx-row); }
.entry-content .wbx-section + .wbx-section { padding-block-start: 0; }

/* Below 1024, everything is full width inside the gutter. */
@media (max-width: 1024px) {
  :root { --wbx-display: 100%; --wbx-reading: 100%; --wbx-narrow: 100%; }
  .entry-content .wbx-pull-wide, .wbx-pull-wide { width: 100%; margin-inline-start: 0; transform: none; }
}

/* --------------------------------------------------------------------------
   Section heading with the gold rule (the one decorative mark)
   -------------------------------------------------------------------------- */
.entry-content .wbx-head,
.wbx-head { margin-block-end: var(--wbx-md); }
.entry-content .wbx-head::before,
.wbx-head::before {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  background: var(--wbx-gold);
  margin-block-end: var(--wbx-sm);
}
.entry-content .wbx-head > h1,
.entry-content .wbx-head > h2,
.entry-content .wbx-head > h3,
.wbx-head > h2 { margin-block: 0 0.35em; }
.entry-content .wbx-standfirst,
.wbx-standfirst {
  color: var(--wbx-muted);
  font-size: var(--wbx-body);
  max-width: var(--wbx-measure);
  margin-block: 0;
}
.entry-content .wbx-head.is-centered { text-align: center; }
.entry-content .wbx-head.is-centered::before { margin-inline: auto; }
.entry-content .wbx-head.is-centered .wbx-standfirst { margin-inline: auto; }

/* Eyebrow: rationed, at most one per three sections. */
.entry-content .wbx-eyebrow,
.wbx-eyebrow {
  font-family: var(--wbx-sans);
  font-size: var(--wbx-small);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wbx-accent);
  margin-block: 0 var(--wbx-xs);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.entry-content .wp-block-button .wp-block-button__link,
.entry-content .wp-block-button__link,
.wp-block-button__link,
.ast-button,
.button,
button.wbx-btn,
a.wbx-btn,
.wbx-btn {
  display: inline-block;
  font-family: var(--wbx-sans);
  font-size: var(--wbx-body);
  font-weight: 600;
  line-height: 1.2;
  min-height: 48px;
  padding: 0.8em 1.5em;
  border-radius: var(--wbx-r-md) !important;
  border: 1px solid var(--wbx-ink);
  background: var(--wbx-ink) !important;
  color: var(--wbx-bg) !important;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}
.entry-content .wp-block-button .wp-block-button__link:hover,
.wp-block-button__link:hover,
.wbx-btn:hover { background: var(--wbx-deep) !important; color: #FFFFFF !important; border-color: var(--wbx-deep); }

.entry-content .wp-block-button.is-style-outline .wp-block-button__link,
.wp-block-button.is-style-outline .wp-block-button__link,
.wbx-btn.is-outline {
  background: transparent !important;
  color: var(--wbx-ink) !important;
  border: 1px solid var(--wbx-ink);
}
.entry-content .wp-block-button.is-style-outline .wp-block-button__link:hover,
.wbx-btn.is-outline:hover { background: var(--wbx-ink) !important; color: var(--wbx-bg) !important; }

/* On dark ground: gold outline, parchment text */
.wbx-dark .wp-block-button .wp-block-button__link,
.wbx-dark .wbx-btn { background: var(--wbx-gold) !important; color: var(--wbx-deep) !important; border-color: var(--wbx-gold); }
.wbx-dark .wp-block-button .wp-block-button__link:hover,
.wbx-dark .wbx-btn:hover { background: var(--wbx-bg) !important; color: var(--wbx-deep) !important; border-color: var(--wbx-bg); }
.wbx-dark .wp-block-button.is-style-outline .wp-block-button__link,
.wbx-dark .wbx-btn.is-outline { background: transparent !important; color: var(--wbx-bg) !important; border-color: var(--wbx-bg); }

.entry-content .wp-block-button { background: transparent !important; border-radius: 0 !important; }
.entry-content .wp-block-buttons { gap: var(--wbx-sm); }

/* Text link with an arrow, for entries */
.entry-content .wbx-more,
.wbx-more { font-weight: 600; text-decoration: none; }
.entry-content .wbx-more::after,
.wbx-more::after { content: " \2192"; }
html[dir="rtl"] .wbx-more::after { content: " \2190"; }

/* --------------------------------------------------------------------------
   Grids and entries
   -------------------------------------------------------------------------- */
.entry-content .wbx-grid,
.wbx-grid {
  display: grid;
  gap: var(--wbx-md);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22vw), 1fr));
}
.entry-content .wbx-grid.is-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 30vw), 1fr)); }
.entry-content .wbx-grid.is-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16vw), 1fr)); }
@media (max-width: 1024px) {
  .entry-content .wbx-grid, .wbx-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 40vw), 1fr)); }
}
@media (max-width: 640px) {
  .entry-content .wbx-grid, .wbx-grid, .entry-content .wbx-grid.is-2, .entry-content .wbx-grid.is-4 { grid-template-columns: 1fr; }
}

/* An entry: a course, a service, a product, a post. Bordered, never shadowed. */
.entry-content .wbx-entry,
.wbx-entry {
  display: flex;
  flex-direction: column;
  gap: var(--wbx-xs);
  border: 1px solid var(--wbx-line);
  border-radius: var(--wbx-r-md);
  background: var(--wbx-surface);
  padding: var(--wbx-md);
  min-height: 100%;
}
.entry-content .wbx-entry > h3,
.entry-content .wbx-entry > h4,
.wbx-entry > h3 { font-size: var(--wbx-h4); line-height: 1.25; margin: 0; }
.entry-content .wbx-entry > p,
.wbx-entry > p { margin: 0; color: var(--wbx-muted); font-size: var(--wbx-body); }
.entry-content .wbx-entry .wbx-price,
.wbx-price {
  font-family: var(--wbx-serif);
  font-size: var(--wbx-h3);
  font-weight: 600;
  color: var(--wbx-ink);
  margin-block: var(--wbx-xs) 0;
  line-height: 1.1;
}
.entry-content .wbx-entry .wbx-price small,
.wbx-price small { font-family: var(--wbx-sans); font-weight: 400; font-size: var(--wbx-small) !important; color: var(--wbx-muted); }
.entry-content .wbx-entry > .wbx-more,
.wbx-entry > .wbx-more { margin-block-start: auto; padding-block-start: var(--wbx-sm); }
.entry-content .wbx-entry .wbx-lang,
.wbx-lang {
  display: inline-block;
  font-size: var(--wbx-small) !important;
  font-weight: 600;
  color: var(--wbx-gold-text);
  border: 1px solid var(--wbx-gold);
  border-radius: var(--wbx-r-sm);
  padding: 2px 8px;
  align-self: flex-start;
  line-height: 1.4;
}
.entry-content .wbx-entry .wp-block-image,
.wbx-entry .wp-block-image { margin: calc(-1 * var(--wbx-md)) calc(-1 * var(--wbx-md)) var(--wbx-sm); }
.entry-content .wbx-entry .wp-block-image img,
.wbx-entry img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--wbx-r-md) var(--wbx-r-md) 0 0; display: block; }

/* Plain list entry, no border: for a "how it works" or a feature list. Divider rows. */
.entry-content .wbx-rows > *,
.wbx-rows > * { padding-block: var(--wbx-md); border-block-start: 1px solid var(--wbx-line); }
.entry-content .wbx-rows > *:last-child,
.wbx-rows > *:last-child { border-block-end: 1px solid var(--wbx-line); }

/* Two-column split: content and asset. Hero family. */
.entry-content .wbx-split,
.wbx-split {
  display: grid;
  grid-template-columns: 55fr 45fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
}
.entry-content .wbx-split.is-even { grid-template-columns: 1fr 1fr; }
.entry-content .wbx-split.is-reverse > :first-child { order: 2; }
.entry-content .wbx-split img,
.wbx-split img { width: 100%; height: auto; display: block; border-radius: var(--wbx-r-md); }
.entry-content .wbx-split .wbx-figure,
.wbx-figure { aspect-ratio: 4 / 3; background: var(--wbx-line); border-radius: var(--wbx-r-md); overflow: hidden; }
.entry-content .wbx-split .wbx-figure img { aspect-ratio: 4 / 3; object-fit: cover; height: 100%; }
@media (max-width: 1024px) {
  .entry-content .wbx-split, .wbx-split, .entry-content .wbx-split.is-even { grid-template-columns: 1fr; }
  .entry-content .wbx-split.is-reverse > :first-child { order: 0; }
}

/* Hero */
.entry-content .wbx-hero,
.wbx-hero { padding-block: var(--wbx-section-lg); }
.entry-content .wbx-hero h1,
.wbx-hero h1 { margin-block-end: 0.4em; }
.entry-content .wbx-hero .wbx-lede,
.wbx-lede { font-size: clamp(1.15rem, 1rem + 0.5vw, 1.35rem); line-height: 1.5; color: var(--wbx-muted); max-width: 40ch; margin-block: 0 var(--wbx-md); }
.entry-content .wbx-hero .wp-block-buttons { margin-block: 0; }

/* Dark statement section */
.entry-content .wbx-dark,
.wbx-dark { background: var(--wbx-deep); color: var(--wbx-bg); }
.entry-content .wbx-dark h1, .entry-content .wbx-dark h2, .entry-content .wbx-dark h3, .entry-content .wbx-dark h4,
.wbx-dark h2, .wbx-dark h3 { color: var(--wbx-gold); }
.entry-content .wbx-dark p, .entry-content .wbx-dark li, .wbx-dark p { color: var(--wbx-bg); }
.entry-content .wbx-dark .wbx-standfirst, .wbx-dark .wbx-standfirst { color: #C9CFDA; }
.entry-content .wbx-dark a:not(.wp-block-button__link), .wbx-dark a:not(.wbx-btn) { color: var(--wbx-bg); }
.entry-content .wbx-dark .wbx-head::before { background: var(--wbx-gold); }
.entry-content .wbx-dark .wbx-entry { background: transparent; border-color: rgba(245, 241, 232, 0.25); }
.entry-content .wbx-dark .wbx-entry > p { color: #C9CFDA; }
.entry-content .wbx-dark .wbx-price { color: var(--wbx-bg); }
.entry-content .wbx-dark .wbx-rows > * { border-color: rgba(245, 241, 232, 0.25); }

/* Surface section: white ground, for tables and forms */
.entry-content .wbx-surface,
.wbx-surface { background: var(--wbx-surface); border-block: 1px solid var(--wbx-line); }

/* --------------------------------------------------------------------------
   Tables and tier tables
   -------------------------------------------------------------------------- */
.entry-content table,
.entry-content .wp-block-table table,
table.wbx-tiers {
  width: 100%;
  border-collapse: collapse;
  background: var(--wbx-surface);
  border: 1px solid var(--wbx-line);
  border-radius: var(--wbx-r-md);
  font-size: var(--wbx-body);
}
.entry-content table th,
.entry-content table td,
table.wbx-tiers th, table.wbx-tiers td {
  padding: 0.75em 1em;
  border: 0;
  border-block-end: 1px solid var(--wbx-line);
  text-align: start;
  vertical-align: top;
  font-size: var(--wbx-body);
  line-height: 1.45;
}
.entry-content table thead th,
table.wbx-tiers thead th {
  background: var(--wbx-ink);
  color: var(--wbx-bg);
  font-weight: 600;
  border-block-end: 3px solid var(--wbx-gold);
}
.entry-content table tbody tr:last-child td { border-block-end: 0; }
.entry-content table td.wbx-td-price,
.wbx-td-price { font-family: var(--wbx-serif); font-weight: 600; white-space: nowrap; color: var(--wbx-ink); }
.entry-content .wp-block-table { overflow-x: auto; }
.entry-content .wp-block-table figcaption { text-align: start; }
@media (max-width: 640px) {
  .entry-content table th, .entry-content table td { padding: 0.6em 0.7em; }
}

/* --------------------------------------------------------------------------
   Prose
   -------------------------------------------------------------------------- */
.entry-content .wbx-prose > p,
.entry-content .wbx-prose > ul,
.entry-content .wbx-prose > ol,
.entry-content .wbx-prose > h2,
.entry-content .wbx-prose > h3,
.entry-content .wbx-prose > blockquote { max-width: var(--wbx-measure); }
.entry-content .wbx-prose > h2 { margin-block-start: 1.4em; }
.entry-content .wbx-prose > h3 { margin-block-start: 1.2em; }
.entry-content ul, .entry-content ol { padding-inline-start: 1.3em; }
.entry-content li { margin-block-end: 0.35em; }

/* Owner edit-note: dashed box she deletes as she fills the page. */
.entry-content .wbx-note,
.wbx-note {
  border: 1px dashed var(--wbx-gold);
  border-radius: var(--wbx-r-md);
  padding: var(--wbx-sm) var(--wbx-md);
  color: var(--wbx-gold-text);
  font-size: var(--wbx-small) !important;
  background: rgba(184, 137, 43, 0.06);
}
body:not(.logged-in) .wbx-note { display: none; }

/* FAQ accordion (core details block) */
.entry-content .wp-block-details {
  border-block-start: 1px solid var(--wbx-line);
  padding-block: var(--wbx-sm);
}
.entry-content .wp-block-details:last-of-type { border-block-end: 1px solid var(--wbx-line); }
.entry-content .wp-block-details summary {
  font-family: var(--wbx-serif);
  font-size: var(--wbx-h4);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: var(--wbx-sm);
  min-height: 44px;
  align-items: center;
}
.entry-content .wp-block-details summary::-webkit-details-marker { display: none; }
.entry-content .wp-block-details summary::after { content: "+"; color: var(--wbx-gold); font-size: 1.5rem; line-height: 1; }
.entry-content .wp-block-details[open] summary::after { content: "\2212"; }
.entry-content .wp-block-details > *:not(summary) { max-width: var(--wbx-measure); }

/* --------------------------------------------------------------------------
   Forms (Fluent Forms and core)
   -------------------------------------------------------------------------- */
.entry-content .fluentform,
.wbx-form { max-width: 100%; }
.fluentform .ff-el-input--label label { font-size: var(--wbx-body) !important; font-weight: 600; color: var(--wbx-ink); }
.fluentform .ff-el-form-control,
.fluentform input[type="text"], .fluentform input[type="email"], .fluentform textarea, .fluentform select,
input[type="text"], input[type="email"], input[type="search"], input[type="url"], input[type="tel"], textarea, select {
  font-family: var(--wbx-sans);
  font-size: var(--wbx-body) !important;
  color: var(--wbx-ink);
  background: var(--wbx-surface);
  border: 1px solid var(--wbx-line) !important;
  border-radius: var(--wbx-r-sm) !important;
  min-height: 48px;
  padding: 0.6em 0.9em;
  box-shadow: none !important;
}
.fluentform .ff-el-form-control:focus, input:focus, textarea:focus, select:focus { border-color: var(--wbx-accent) !important; outline: 2px solid var(--wbx-accent); outline-offset: 1px; }
.fluentform .ff-btn-submit,
.fluentform .ff-btn { background: var(--wbx-ink) !important; color: var(--wbx-bg) !important; border: 1px solid var(--wbx-ink) !important; border-radius: var(--wbx-r-md) !important; font-size: var(--wbx-body) !important; font-weight: 600; min-height: 48px; padding: 0.8em 1.5em !important; }
.fluentform .ff-btn-submit:hover { background: var(--wbx-deep) !important; }
.fluentform .ff-el-is-error .text-danger, .fluentform .ff-errors-in-stack { font-size: var(--wbx-small) !important; }

/* --------------------------------------------------------------------------
   Images
   -------------------------------------------------------------------------- */
.entry-content img { max-width: 100%; height: auto; }
.entry-content .wp-block-image img { border-radius: var(--wbx-r-md); }
.entry-content picture img, .entry-content picture { display: block; }

/* --------------------------------------------------------------------------
   Arabic and RTL
   -------------------------------------------------------------------------- */
html[dir="rtl"] body,
html[lang^="ar"] body,
:lang(ar) {
  font-family: var(--wbx-arabic);
}
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3, html[dir="rtl"] h4, html[dir="rtl"] h5, html[dir="rtl"] h6,
html[dir="rtl"] .entry-title,
html[dir="rtl"] body .entry-content h1, html[dir="rtl"] body .entry-content h2, html[dir="rtl"] body .entry-content h3, html[dir="rtl"] body .entry-content h4,
html[dir="rtl"] blockquote, html[dir="rtl"] .wp-block-quote p,
html[dir="rtl"] .wbx-price, html[dir="rtl"] .wbx-td-price,
html[dir="rtl"] .wp-block-details summary,
html[dir="rtl"] .entry-content p, html[dir="rtl"] .entry-content li, html[dir="rtl"] p, html[dir="rtl"] li,
html[dir="rtl"] td, html[dir="rtl"] th, html[dir="rtl"] input, html[dir="rtl"] textarea, html[dir="rtl"] select, html[dir="rtl"] button,
html[dir="rtl"] .wp-block-button__link, html[dir="rtl"] .wbx-btn, html[dir="rtl"] .wbx-eyebrow {
  font-family: var(--wbx-arabic) !important;
  letter-spacing: 0;
}
html[dir="rtl"] h1, html[dir="rtl"] .entry-title, html[dir="rtl"] body .entry-content h1 { line-height: 1.3; }
html[dir="rtl"] h2, html[dir="rtl"] body .entry-content h2 { line-height: 1.35; }
html[dir="rtl"] h3, html[dir="rtl"] h4, html[dir="rtl"] body .entry-content h3 { line-height: 1.4; }
html[dir="rtl"] body, html[dir="rtl"] .entry-content p, html[dir="rtl"] .entry-content li { line-height: 1.9; }
html[dir="rtl"] .wbx-eyebrow { text-transform: none; letter-spacing: 0; }
html[dir="rtl"] .wbx-head { text-align: start; }

/* --------------------------------------------------------------------------
   Header (base tokens; the menu itself is styled in Phase 3)
   -------------------------------------------------------------------------- */
body .site-header,
body .ast-primary-header-bar,
body .main-header-bar {
  background: var(--wbx-bg) !important;
  border-block-end: 1px solid var(--wbx-line);
}
body .site-title a, body .site-title a:hover { color: var(--wbx-ink); font-family: var(--wbx-serif); font-weight: 700; text-decoration: none; }
body .site-description { color: var(--wbx-muted); font-size: var(--wbx-small); }

/* --------------------------------------------------------------------------
   Footer (base tokens)
   -------------------------------------------------------------------------- */
body .site-footer,
body .ast-footer-row,
body .site-below-footer-wrap,
body .site-above-footer-wrap,
body .site-primary-footer-wrap {
  background: var(--wbx-deep) !important;
  color: var(--wbx-bg);
}
body .site-footer a { color: var(--wbx-bg); text-decoration: none; }
body .site-footer a:hover { color: var(--wbx-gold); }
body .site-footer h2, body .site-footer h3, body .site-footer h4, body .site-footer .widget-title { color: var(--wbx-gold); font-size: var(--wbx-h4); }
body .site-footer p, body .site-footer li { color: var(--wbx-bg); font-size: var(--wbx-small); }

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */
.wbx-muted { color: var(--wbx-muted); }
.wbx-accent { color: var(--wbx-accent); }
.wbx-gold-text { color: var(--wbx-gold-text); }
.wbx-serif { font-family: var(--wbx-serif); }
.wbx-mt-0 { margin-block-start: 0 !important; }
.wbx-mb-0 { margin-block-end: 0 !important; }
.wbx-mb-lg { margin-block-end: var(--wbx-lg) !important; }
.wbx-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Tap targets */
@media (max-width: 760px) {
  .entry-content a.wp-block-button__link, .wbx-btn, .fluentform .ff-btn { width: 100%; text-align: center; }
  .entry-content .wbx-hero { padding-block: var(--wbx-section); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ==========================================================================
   Phase 3: header, primary menu, mobile drawer, footer
   ========================================================================== */

/* Header bar: collapse to its content so dropdowns sit under the text. */
body .ast-primary-header-bar .site-primary-header-wrap,
body .ast-primary-header-bar .ast-builder-grid-row { min-height: 0; }
body .ast-primary-header-bar .ast-builder-grid-row { padding-block: clamp(10px, 1vw, 16px); align-items: center; }
body .site-logo-img .custom-logo-link img { width: clamp(170px, 14vw, 240px) !important; height: auto; max-width: none; }

/* Primary menu items */
body .ast-builder-menu-1 .main-header-menu,
body .main-header-menu { gap: 0; }
body .ast-builder-menu-1 .main-header-menu > .menu-item > .menu-link,
body .main-header-menu > .menu-item > .menu-link {
  font-family: var(--wbx-sans);
  font-size: 1.0625rem;              /* 17px */
  font-weight: 500;
  color: var(--wbx-ink) !important;
  padding: 0.55em clamp(8px, 0.9vw, 16px) !important;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  letter-spacing: 0;
  text-transform: none;
  border-radius: var(--wbx-r-md);
  transition: color 120ms ease, background-color 120ms ease;
}
body .main-header-menu > .menu-item > .menu-link:hover,
body .main-header-menu > .menu-item:hover > .menu-link,
body .main-header-menu > .menu-item.current-menu-item > .menu-link,
body .main-header-menu > .menu-item.current-menu-ancestor > .menu-link {
  color: var(--wbx-accent) !important;
  background: transparent;
}
body .main-header-menu > .menu-item.current-menu-item > .menu-link,
body .main-header-menu > .menu-item.current-menu-ancestor > .menu-link { text-decoration: underline; text-underline-offset: 0.35em; text-decoration-thickness: 2px; text-decoration-color: var(--wbx-gold); }
body .main-header-menu .ast-header-navigation-arrow .ast-icon svg { width: 0.7em; height: 0.7em; fill: currentColor; }

/* Dropdowns: white, hairline border, no shadow, sentence case */
body .main-header-menu .sub-menu,
body .ast-desktop .main-header-menu .sub-menu {
  background: var(--wbx-surface) !important;
  border: 1px solid var(--wbx-line) !important;
  border-radius: var(--wbx-r-md);
  box-shadow: none !important;
  padding: 6px 0;
  min-width: min(22vw, 100%);
  width: max-content;
  max-width: min(32vw, 90vw);
}
body .main-header-menu .sub-menu .menu-item .menu-link,
body .ast-desktop .main-header-menu .sub-menu .menu-link {
  font-family: var(--wbx-sans);
  font-size: 1rem;
  font-weight: 400;
  text-transform: none !important;
  letter-spacing: 0;
  color: var(--wbx-ink) !important;
  padding: 0.6em 1.1em !important;
  border: 0 !important;
  min-height: 44px;
  display: flex;
  align-items: center;
  white-space: normal;
  line-height: 1.35;
}
body .main-header-menu .sub-menu .menu-item .menu-link:hover,
body .main-header-menu .sub-menu .menu-item.current-menu-item .menu-link { background: var(--wbx-bg) !important; color: var(--wbx-accent) !important; }
body .main-header-menu .sub-menu .menu-item:first-child .menu-link { font-weight: 600; border-block-end: 1px solid var(--wbx-line) !important; margin-block-end: 4px; }
body .main-header-menu .sub-menu .ast-icon.icon-arrow { display: none; }
body .submenu-with-border .sub-menu { border-color: var(--wbx-line) !important; }
body .ast-desktop .main-header-menu.submenu-with-border .sub-menu .menu-link { border-color: var(--wbx-line) !important; }

/* Header button */
body .ast-header-button-1 .ast-custom-button,
body .ast-builder-button-wrap .ast-custom-button {
  font-family: var(--wbx-sans);
  font-size: 1rem !important;
  font-weight: 600 !important;
  background: var(--wbx-ink) !important;
  color: var(--wbx-bg) !important;
  border: 1px solid var(--wbx-ink) !important;
  border-radius: var(--wbx-r-md) !important;
  padding: 0.65em 1.2em !important;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  margin-inline-start: clamp(8px, 1vw, 20px);
  white-space: nowrap;
  text-decoration: none;
}
body .ast-header-button-1 .ast-custom-button:hover { background: var(--wbx-deep) !important; border-color: var(--wbx-deep) !important; color: #FFFFFF !important; }

/* Mobile trigger and drawer */
body .ast-mobile-header-content, body .ast-mobile-popup-drawer .ast-mobile-popup-inner { background: var(--wbx-bg) !important; }
body .ast-button-wrap .menu-toggle,
body .ast-mobile-menu-trigger-minimal { color: var(--wbx-ink) !important; background: transparent !important; border: 1px solid var(--wbx-line) !important; border-radius: var(--wbx-r-md); min-height: 44px; min-width: 44px; }
body .ast-mobile-popup-drawer .ast-mobile-popup-header .menu-toggle-close { color: var(--wbx-ink); min-height: 44px; min-width: 44px; }
body .ast-mobile-popup-drawer .main-header-menu .menu-item .menu-link {
  font-family: var(--wbx-sans);
  font-size: 1.125rem;
  color: var(--wbx-ink) !important;
  padding: 0.7em var(--wbx-md) !important;
  min-height: 48px;
  border-block-end: 1px solid var(--wbx-line) !important;
  text-transform: none;
}
body .ast-mobile-popup-drawer .main-header-menu .sub-menu { background: var(--wbx-surface) !important; border: 0 !important; box-shadow: none !important; }
body .ast-mobile-popup-drawer .main-header-menu .sub-menu .menu-link { padding-inline-start: calc(var(--wbx-md) * 2) !important; font-size: 1rem; }
body .ast-mobile-popup-drawer .ast-builder-button-wrap { padding: var(--wbx-md); }
body .ast-mobile-popup-drawer .ast-builder-button-wrap .ast-custom-button { width: 100%; justify-content: center; margin: 0; }
body .ast-mobile-popup-drawer .ast-menu-toggle { color: var(--wbx-ink); min-height: 44px; min-width: 44px; }

/* RTL header mirrors through logical properties; Arabic menu font */
html[dir="rtl"] .main-header-menu > .menu-item > .menu-link,
html[dir="rtl"] .main-header-menu .sub-menu .menu-link,
html[dir="rtl"] .ast-custom-button { font-family: var(--wbx-arabic) !important; }

/* Footer */
body .wbx-footer { background: var(--wbx-deep); color: var(--wbx-bg); border-block-start: 3px solid var(--wbx-gold); }
body .wbx-footer .wbx-footer-inner { padding-inline: var(--wbx-gutter); }
body .wbx-footer .wbx-footer-grid {
  display: grid;
  gap: var(--wbx-lg) var(--wbx-md);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16vw), 1fr));
  padding-block-end: var(--wbx-lg);
}
@media (max-width: 1024px) { body .wbx-footer .wbx-footer-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 38vw), 1fr)); } }
@media (max-width: 640px) { body .wbx-footer .wbx-footer-grid { grid-template-columns: 1fr; } }
body .wbx-footer h3 { font-family: var(--wbx-serif); font-size: 1.25rem; color: var(--wbx-gold); margin-block: 0 var(--wbx-sm); }
body .wbx-footer p, body .wbx-footer li { color: var(--wbx-bg); font-size: 1rem; line-height: 1.6; margin: 0; }
body .wbx-footer ul { list-style: none; padding: 0; margin: 0; }
body .wbx-footer li { margin-block-end: 0.45em; }
body .wbx-footer a { color: var(--wbx-bg); text-decoration: none; display: inline-block; min-height: 32px; line-height: 32px; }
body .wbx-footer a:hover { color: var(--wbx-gold); text-decoration: underline; text-underline-offset: 0.2em; }
body .wbx-footer .wbx-more { font-weight: 600; }
body .wbx-footer .wbx-footer-bottom { border-block-start: 1px solid rgba(245, 241, 232, 0.2); padding-block-start: var(--wbx-md); }
body .wbx-footer .wbx-footer-bottom p { font-size: var(--wbx-small); color: #C9CFDA; }
html[dir="rtl"] .wbx-footer h3, html[dir="rtl"] .wbx-footer p, html[dir="rtl"] .wbx-footer li { font-family: var(--wbx-arabic) !important; }

/* Blog archive and single post: keep the theme markup, apply the zones */
body.blog #primary, body.archive #primary, body.search #primary { width: min(var(--wbx-display), 100%); margin-inline: auto !important; }
body.single-post .entry-content > * { max-width: var(--wbx-measure); margin-inline: auto; }
body.single-post .entry-content > .alignwide { max-width: var(--wbx-display); }
body.single-post .entry-content > .alignfull, body.single-post .entry-content > .wbx-bleed { max-width: none; }
body.single-post .ast-single-post .entry-header, body.single-post .ast-single-entry-banner { width: min(var(--wbx-reading), 100%); margin-inline: auto; }
body .ast-archive-description, body .ast-archive-title { font-family: var(--wbx-serif); }
body .ast-article-post { background: var(--wbx-surface); border: 1px solid var(--wbx-line); border-radius: var(--wbx-r-md); padding: var(--wbx-md); box-shadow: none !important; }
body .ast-article-post .entry-title a { color: var(--wbx-ink); text-decoration: none; }
body .ast-article-post .entry-title a:hover { color: var(--wbx-accent); }
body .entry-meta, body .entry-meta a { font-size: var(--wbx-small); color: var(--wbx-muted); text-transform: none; letter-spacing: 0; }

/* Page title where the theme prints it (blog page, archives, 404) */
body .ast-archive-title, body .entry-header .entry-title { font-size: var(--wbx-h1); line-height: var(--wbx-lh-tight); }
body.error404 .ast-404-layout-1 { padding-block: var(--wbx-section-lg); }
body.error404 .ast-404-layout-1 .page-title { font-family: var(--wbx-serif); }

/* ==========================================================================
   Corrections after the first rendered check (home at 390/820/1366/1920)
   ========================================================================== */

/* Astra scales the root to 91.2% on tablet and phone, which drags 18px body
   text down to 16.4px. Hold the root at 100% so the type floor holds. */
html, html.ast-desktop { font-size: 100% !important; }

/* The gutter is a pure proportion on desktop, so the zones measure the same
   percentage of the viewport at 1366 and 1920 (the 72px cap broke that). */
:root { --wbx-gutter: max(24px, 4.5vw); }

/* Section rhythm lost to the group-padding reset (higher specificity). */
.entry-content .wp-block-group.wbx-section, .wp-block-group.wbx-section { padding-block: var(--wbx-section); }
.entry-content .wp-block-group.wbx-section-lg, .wp-block-group.wbx-section-lg { padding-block: var(--wbx-section-lg); }
.entry-content .wp-block-group.wbx-row, .wp-block-group.wbx-row { padding-block: var(--wbx-row); }
.entry-content .wp-block-group.wbx-hero, .wp-block-group.wbx-hero { padding-block: var(--wbx-section-lg); }
.entry-content .wp-block-group.wbx-inner.wbx-section-lg { padding-block: var(--wbx-section-lg); padding-inline: var(--wbx-gutter); }
.entry-content .wp-block-group.wbx-section + .wp-block-group.wbx-section { padding-block-start: 0; }
.entry-content .wp-block-group.wbx-hero + .wp-block-group.wbx-section { padding-block-start: 0; }
body.ast-plain-container #content, body #content { padding-block-end: var(--wbx-section-lg); }

/* WordPress flow layout gives every sibling a top margin; inside our grids,
   splits, rows and entries the gap does that job. */
.entry-content .wbx-grid > *, .wbx-grid > *,
.entry-content .wbx-split > *, .wbx-split > *,
.entry-content .wbx-rows > *, .wbx-rows > *,
.entry-content .wbx-entry > *, .wbx-entry > *,
.wbx-footer .wbx-footer-grid > *, .wbx-footer .wbx-footer-col > * { margin-block-start: 0 !important; }
.entry-content .wbx-entry > * + * { margin-block-start: var(--wbx-xs) !important; }
.entry-content .wbx-entry > .wbx-more { margin-block-start: auto !important; }
.entry-content .wbx-entry > h3 + p { margin-block-start: var(--wbx-xs) !important; }

/* One design, not many: a fixed column count that only collapses. */
.entry-content .wbx-grid, .wbx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.entry-content .wbx-grid.is-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.entry-content .wbx-grid.is-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
body .wbx-footer .wbx-footer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1024px) {
  .entry-content .wbx-grid, .wbx-grid, .entry-content .wbx-grid.is-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body .wbx-footer .wbx-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .entry-content .wbx-grid, .wbx-grid, .entry-content .wbx-grid.is-2, .entry-content .wbx-grid.is-4 { grid-template-columns: minmax(0, 1fr); }
  body .wbx-footer .wbx-footer-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Hero buttons sit side by side at laptop width. */
.entry-content .wbx-hero .wp-block-button .wp-block-button__link { font-size: 1.0625rem; padding: 0.75em 1.25em; }
.entry-content .wbx-hero .wp-block-buttons { gap: var(--wbx-sm); flex-wrap: wrap; }

/* Placeholder figure carries the arch mark on parchment line, so an unfilled
   slot still reads as designed rather than empty. */
.entry-content .wbx-split .wbx-figure, .entry-content .wbx-figure, .wbx-figure {
  background-color: var(--wbx-line);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 90 220 130'%3E%3Cpath d='M30 178 A80 80 0 0 1 190 178' fill='none' stroke='%2310254A' stroke-width='14' stroke-linecap='round' opacity='.18'/%3E%3Cline x1='76' y1='172' x2='144' y2='135' stroke='%23B8892B' stroke-width='13' stroke-linecap='round' opacity='.35'/%3E%3Cline x1='144' y1='172' x2='76' y2='135' stroke='%23B8892B' stroke-width='13' stroke-linecap='round' opacity='.35'/%3E%3Cline x1='12' y1='178' x2='208' y2='178' stroke='%2310254A' stroke-width='15' stroke-linecap='round' opacity='.18'/%3E%3Cline x1='28' y1='178' x2='28' y2='212' stroke='%2310254A' stroke-width='14' stroke-linecap='round' opacity='.18'/%3E%3Cline x1='192' y1='178' x2='192' y2='212' stroke='%2310254A' stroke-width='14' stroke-linecap='round' opacity='.18'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 34%;
  display: flex; align-items: flex-end; justify-content: center;
  padding: var(--wbx-sm);
}
.entry-content .wbx-figure > .wbx-note { margin: 0; }

/* Heading rule: the gold bar must not inherit a flow margin either. */
.entry-content .wbx-head > * { margin-block-start: 0 !important; }
.entry-content .wbx-head > h1 + p, .entry-content .wbx-head > h2 + p, .entry-content .wbx-head > h3 + p { margin-block-start: var(--wbx-xs) !important; }

/* Hero split leans to the copy so both actions fit on one line at 1366. */
.entry-content .wbx-hero .wbx-split { grid-template-columns: 60fr 40fr; }
@media (max-width: 1024px) { .entry-content .wbx-hero .wbx-split { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .entry-content .wp-block-buttons > .wp-block-button { width: 100%; }
  .entry-content .wp-block-button .wp-block-button__link { width: 100%; text-align: center; }
}

/* Pull quote: the body-text rule outranked the quote rule. */
body .entry-content blockquote.wp-block-quote,
body .entry-content blockquote {
  border: 0;
  border-inline-start: 3px solid var(--wbx-gold);
  padding: 0.25em 0 0.25em var(--wbx-md);
  margin: var(--wbx-md) 0;
  background: transparent;
  font-style: normal;
}
body .entry-content blockquote.wp-block-quote p,
body .entry-content blockquote p {
  font-family: var(--wbx-serif);
  font-size: 1.5rem;
  line-height: 1.35;
  font-style: normal;
  color: var(--wbx-ink);
  margin: 0;
}
body .entry-content blockquote.wp-block-quote cite,
body .entry-content blockquote cite {
  display: block;
  margin-block-start: var(--wbx-xs);
  font-family: var(--wbx-sans);
  font-size: var(--wbx-small);
  font-style: normal;
  color: var(--wbx-muted);
}
html[dir="rtl"] body .entry-content blockquote p { font-family: var(--wbx-arabic) !important; line-height: 1.6; }

/* Plain three-column family for the pillars row: rule on top, no card. Distinct from the bordered entries. */
.entry-content .wbx-grid.is-plain > .wbx-entry { border: 0; background: transparent; border-radius: 0; padding: var(--wbx-sm) 0 0; border-block-start: 3px solid var(--wbx-gold); }
.entry-content .wbx-grid.is-plain > .wbx-entry > h3 { font-size: var(--wbx-h3); }
