/*
Theme Name: Beton Machine
Theme URI: https://betonmachine.co/
Description: Custom lightweight theme for Beton Machine (betonmachine.co). Replaces Astra. Trilingual (FA/EN/AR) with Polylang, RTL-aware via CSS logical properties.
Version: 0.4.13
Author: Romo7
Text Domain: beton-machine
*/

/* ============ Fonts (files live in /wp-content/uploads/2026/11/ on the server) ============ */
@font-face { font-family: 'Estedad'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/fonts/Estedad-Bold.ttf') format('truetype'); }
@font-face { font-family: 'Estedad'; font-style: normal; font-weight: 500; font-display: swap; src: url('assets/fonts/Estedad-Bold.ttf') format('truetype'); }
@font-face { font-family: 'Estedad'; font-style: normal; font-weight: 600; font-display: swap; src: url('assets/fonts/Estedad-Bold.ttf') format('truetype'); }
@font-face { font-family: 'Estedad'; font-style: normal; font-weight: 700; font-display: swap; src: url('assets/fonts/Estedad-Bold.ttf') format('truetype'); }
@font-face { font-family: 'Estedad'; font-style: normal; font-weight: 800; font-display: swap; src: url('assets/fonts/Estedad-Bold.ttf') format('truetype'); }
@font-face { font-family: 'Estedad'; font-style: normal; font-weight: 900; font-display: swap; src: url('assets/fonts/Estedad-Bold.ttf') format('truetype'); }
@font-face { font-family: 'Vazirmatn'; font-style: normal; font-weight: 400; font-display: swap; src: url('/wp-content/uploads/2026/11/Vazirmatn-Regular.ttf') format('truetype'); }
@font-face { font-family: 'Vazirmatn'; font-style: normal; font-weight: 500; font-display: swap; src: url('/wp-content/uploads/2026/11/Vazirmatn-Medium.ttf') format('truetype'); }
@font-face { font-family: 'Vazirmatn'; font-style: normal; font-weight: 700; font-display: swap; src: url('/wp-content/uploads/2026/11/Vazirmatn-Bold.ttf') format('truetype'); }

/* ============ Tokens ============ */
:root {
  --bm-navy: #1F2A44;
  --bm-navy-deep: #0B1E3A;
  --bm-orange: #E8762B;
  --bm-orange-brand: #F47435;
  --bm-grey: #97989A;
  --bm-grey-dark: #6E6F71;
  --bm-grey-light: #E3E4E5;
  --bm-grey-line: #C6C7C8;
  --bm-grey-bg: #F1F2F2;
  --bm-ink: #111111;
  --bm-text: #2B3345;
  --bm-muted: #5A6478;
  --bm-border: #C6C7C8;
  --bm-white: #FFFFFF;
  --bm-font-head: 'Estedad', 'Vazirmatn', Helvetica, Arial, sans-serif;
  --bm-font-body: 'Vazirmatn', Helvetica, Arial, sans-serif;
  --bm-max: 1200px;
  --bm-radius: 12px;
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--bm-font-body);
  font-size: 17px;
  line-height: 1.8;
  color: var(--bm-text);
  background: var(--bm-white);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--bm-font-head); color: var(--bm-navy); line-height: 1.4; margin: 0 0 16px; }
h1 { font-size: 40px; }
h2 { font-size: 34px; }
h3 { font-size: 20px; }
p { margin: 0 0 16px; }
a { color: var(--bm-orange); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
[dir="ltr"] { unicode-bidi: embed; }
.bm-ltr { direction: ltr; unicode-bidi: embed; }
.bm-container { max-width: var(--bm-max); margin-inline: auto; padding-inline: 20px; }

/* ============ Buttons ============ */
.bm-btn {
  display: inline-block;
  background: var(--bm-orange);
  color: var(--bm-white);
  font-family: var(--bm-font-head);
  font-weight: 700;
  font-size: 16px;
  padding: 14px 32px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s ease, transform .15s ease;
}
.bm-btn:hover { background: var(--bm-orange-brand); text-decoration: none; transform: translateY(-1px); }
.bm-btn--outline {
  background: transparent;
  color: var(--bm-white);
  box-shadow: inset 0 0 0 2px var(--bm-white);
}
.bm-btn--outline:hover { background: rgba(255,255,255,.12); }

/* ============ Header ============ */
.bm-topbar { background: var(--bm-grey-dark); color: rgba(255,255,255,.85); font-size: 14px; }
.bm-topbar .bm-container { display: flex; justify-content: flex-end; padding-block: 6px; }
.bm-topbar a { color: rgba(255,255,255,.85); }
.bm-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bm-white);
  border-bottom: 1px solid var(--bm-border);
  box-shadow: 0 2px 12px rgba(31,42,68,.06);
}
.bm-header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-block: 16px;
}
.bm-logo img { display: block; width: 210px; height: auto; }
.bm-nav { margin-inline-start: auto; }
.bm-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.bm-nav a {
  display: block;
  padding: 10px 14px;
  color: var(--bm-navy);
  font-family: var(--bm-font-head);
  font-weight: 600;
  font-size: 16px;
  border-radius: 8px;
  text-decoration: none;
}
.bm-nav a:hover, .bm-nav .current-menu-item > a { color: var(--bm-orange); text-decoration: none; }
/* Dropdowns */
.bm-nav li { position: relative; }
.bm-nav .sub-menu {
  display: none;
  position: absolute;
  inset-inline-start: 0;
  top: 100%;
  min-width: 260px;
  background: var(--bm-white);
  border: 1px solid var(--bm-border);
  border-radius: 0 0 var(--bm-radius) var(--bm-radius);
  box-shadow: 0 12px 32px rgba(31,42,68,.14);
  padding: 8px;
  flex-direction: column;
  z-index: 110;
}
.bm-nav li:hover > .sub-menu, .bm-nav li:focus-within > .sub-menu { display: flex; }
.bm-nav .sub-menu a { font-size: 15px; padding: 9px 12px; }
.bm-header-actions { display: flex; align-items: center; gap: 12px; }
.bm-header-actions .bm-btn { padding: 10px 20px; font-size: 15px; white-space: nowrap; }
.bm-lang-switcher { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.bm-lang-switcher a {
  display: block;
  padding: 6px 10px;
  color: var(--bm-muted);
  font-size: 14px;
  font-weight: 700;
  border-radius: 6px;
  text-decoration: none;
}
.bm-lang-switcher a:hover { color: var(--bm-navy); text-decoration: none; }
.bm-lang-switcher .current-lang a { background: var(--bm-grey-bg); color: var(--bm-navy); }
.bm-menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; margin-inline-start: auto; }
.bm-menu-toggle span { display: block; width: 26px; height: 2px; background: var(--bm-navy); margin: 5px 0; border-radius: 2px; }

/* ============ Content ============ */
.bm-main { min-height: 60vh; }
.bm-page { padding-block: 48px 64px; }
.bm-page-title { margin-bottom: 8px; }
.entry-content > * { margin-bottom: 24px; }
.entry-content > *:last-child { margin-bottom: 0; }
.entry-content img { border-radius: var(--bm-radius); }
.entry-content figure { margin: 0 0 24px; }
.entry-content figcaption { font-size: 14px; color: var(--bm-muted); text-align: center; margin-top: 8px; }
.entry-content table { border-collapse: collapse; width: 100%; margin-bottom: 24px; }
.entry-content th, .entry-content td { border: 1px solid var(--bm-border); padding: 10px 14px; text-align: start; }
.entry-content th { background: var(--bm-grey-bg); font-family: var(--bm-font-head); }

/* ============ Footer ============ */
.bm-footer { background: var(--bm-navy); color: rgba(255,255,255,.85); margin-top: 0; border-top: 4px solid var(--bm-grey); }
.bm-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  padding-block: 56px 40px;
}
.bm-footer h3 { color: var(--bm-white); font-size: 18px; margin-bottom: 18px; }
.bm-footer p { font-size: 15px; line-height: 1.8; }
.bm-footer a { color: rgba(255,255,255,.85); }
.bm-footer a:hover { color: var(--bm-orange-brand); text-decoration: none; }
.bm-footer ul { list-style: none; margin: 0; padding: 0; }
.bm-footer ul li { margin-bottom: 10px; font-size: 15px; }
.bm-footer-logo { max-width: 160px; margin-bottom: 16px; }
.bm-footer-bottom { border-top: 1px solid rgba(255,255,255,.14); }
.bm-footer-bottom .bm-container {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-block: 18px;
  font-size: 14px;
  color: rgba(255,255,255,.6);
}

/* ============ Responsive ============ */
@media (max-width: 921px) {
  h1 { font-size: 28px; }
  h2 { font-size: 24px; }
  .bm-menu-toggle { display: block; }
  .bm-nav {
    display: none;
    position: absolute;
    inset-inline: 0;
    top: 100%;
    background: var(--bm-white);
    border-bottom: 1px solid var(--bm-border);
    box-shadow: 0 12px 24px rgba(31,42,68,.12);
    padding: 12px 20px 20px;
    margin-inline-start: 0;
  }
  .bm-header.bm-nav-open .bm-nav { display: block; }
  .bm-nav ul { flex-direction: column; gap: 0; }
  .bm-nav .sub-menu {
    display: none;
    position: static;
    box-shadow: none;
    border: none;
    padding-inline-start: 16px;
  }
  .bm-nav li.bm-sub-open > .sub-menu { display: flex; }
  .bm-header-actions .bm-btn { display: none; }
  .bm-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 560px) {
  .bm-footer-grid { grid-template-columns: 1fr; }
  .bm-topbar .bm-container { justify-content: center; }
}

/* ==========================================================================
   HOMEPAGE (ported from the old inline blocks + Additional CSS, rewritten
   class-based — no position selectors, no !important wars).
   Live values preserved; CO-NELE refinements folded in where noted.
   ========================================================================== */

/* --- Section headings: navy H2 + short orange underline bar (all pages) --- */
.entry-content h2 { color: var(--bm-navy); }
.entry-content h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: var(--bm-orange);
  border-radius: 2px;
  margin-top: 12px;
}

/* --- Homepage rhythm --- */
.home .entry-content > h2 { padding-top: 56px; margin: 0 0 16px; font-size: 34px; line-height: 1.35; }
.home .entry-content > h3 { font-size: 19px; line-height: 1.4; }
.home .entry-content > p { margin: 0 0 12px; }
.home .entry-content > .wp-block-group,
.home .entry-content > .wp-block-columns { padding-top: 72px; padding-bottom: 72px; }
.home .entry-content > .wp-block-html { padding-top: 0; padding-bottom: 0; }
.home .entry-content > h2 + .wp-block-columns,
.home .entry-content > h2 + p + .wp-block-columns,
.home .entry-content > h2 + p + p + .wp-block-columns { padding-top: 20px; }
.home .entry-content > .wp-block-buttons { padding-bottom: 40px; }

/* --- Hero slider --- */
.bm-hero { position: relative; overflow: hidden; min-height: 600px; display: flex; align-items: center; justify-content: center; text-align: center; color: #fff; background: var(--bm-navy-deep); }
.bm-hero-slides { position: absolute; inset: 0; }
.bm-hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.25s ease; }
.bm-hero-slide.is-active { opacity: 1; }
.bm-hero-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bm-hero-slide.is-active img { animation: bmKenBurns 7.5s ease-out forwards; }
@keyframes bmKenBurns { from { transform: scale(1); } to { transform: scale(1.1); } }
.bm-hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 30, 58, .22) 0%, rgba(11, 30, 58, .42) 55%, rgba(11, 30, 58, .62) 100%); z-index: 1; }
.bm-hero-content { position: relative; z-index: 2; max-width: 920px; margin: 0 auto; padding: 80px 24px; }
.bm-hero-content .hero-eyebrow { color: var(--bm-orange); font-weight: 700; font-size: 72px; line-height: 1.2; margin: 0 0 16px; text-shadow: 0 2px 10px rgba(11, 30, 58, .35); }
.bm-hero-content h1 { color: #fff; font-size: clamp(30px, 4.6vw, 56px); line-height: 1.25; font-weight: 800; margin: 0 0 16px; }
.bm-hero-content h1::after { display: none; }
.bm-hero-sub { color: #fff; font-size: clamp(17px, 2.4vw, 24px); line-height: 1.5; margin: 0 auto 28px; max-width: 820px; }
html[lang^="fa"] .bm-hero-content h1 { line-height: 1.45; }
html[lang^="fa"] .bm-hero-sub { line-height: 1.8; }
.bm-hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
/* The primary/secondary selectors are included because the EN/AR homepages'
   hero buttons carry ONLY bm-hero-btn-primary / bm-hero-btn-secondary (no
   base bm-hero-btn) — without these they render with no padding or radius
   (found 2026-11-21 via screenshot; FA buttons carry the base class). */
.bm-hero-btn, .bm-hero-ctas a.bm-hero-btn-primary, .bm-hero-ctas a.bm-hero-btn-secondary { display: inline-block; padding: 13px 30px; border-radius: 6px; font-weight: 700; font-size: 17px; line-height: 1.3; text-decoration: none; transition: transform .3s ease, box-shadow .3s ease, background-color .3s ease; }
.bm-hero-ctas a.bm-hero-btn-primary { background: var(--bm-orange); color: #fff; }
.bm-hero-ctas a.bm-hero-btn-primary:hover { background: #d1661f; color: #fff; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(232, 118, 43, .35); }
.bm-hero-ctas a.bm-hero-btn-secondary { background: transparent; border: 2px solid #fff; color: #fff; }
.bm-hero-ctas a.bm-hero-btn-secondary:hover { border-color: var(--bm-orange); color: #fff; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(232, 118, 43, .35); }
.bm-hero-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .16); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.bm-hero-arrow:hover { background: var(--bm-orange); border-color: var(--bm-orange); }
.bm-hero-prev { inset-inline-start: 16px; }
.bm-hero-next { inset-inline-end: 16px; }
.bm-hero-dots { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: 10px; }
.bm-hero-dot { position: relative; overflow: hidden; width: 14px; height: 14px; border-radius: 50%; border: none; background: rgba(255, 255, 255, .55); cursor: pointer; padding: 0; }
.bm-hero-dot.is-active { background: var(--bm-orange); }
/* Dot progress fill: the cover span retracts over the 6s slide. */
.bm-hero-dot .bm-dot-fill { position: absolute; top: 0; height: 100%; width: 0; background: rgba(255, 255, 255, .55); pointer-events: none; border-radius: inherit; }
html[lang^="fa"] .bm-hero-dot .bm-dot-fill,
html[lang^="ar"] .bm-hero-dot .bm-dot-fill { left: 0; }
html[lang^="en"] .bm-hero-dot .bm-dot-fill { right: 0; }
.bm-hero-dot.is-active .bm-dot-fill { animation: bmDotFill 6s linear forwards; }
@keyframes bmDotFill { from { width: 100%; } to { width: 0%; } }
@media (prefers-reduced-motion: reduce) {
  .bm-hero-slide { transition: none; }
  .bm-hero-slide.is-active img { animation: none; }
  .bm-hero-dot .bm-dot-fill { display: none; }
}

/* --- Stats band: navy band, orange top borders, white text, orange numbers --- */
.bm-stats {
  background: var(--bm-navy);
  border-radius: 12px;
  padding: 56px 32px;
  margin: 48px 0 64px;
}
.bm-stats .wp-block-column {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2px;
  padding: 26px 12px 0;
  background: transparent;
  border: none;
  border-top: 3px solid var(--bm-orange);
  box-shadow: none;
  min-height: 0;
}
.bm-stats p { margin: 0; padding: 0; border: 0; color: #fff; text-align: center; }
.bm-stats .has-x-large-font-size { font-size: 48px; line-height: 1.1; color: var(--bm-orange); font-weight: 700; }
.bm-stats .has-x-large-font-size strong { color: var(--bm-orange); }

/* --- National project band --- */
.bm-national { background: var(--bm-navy); color: #fff; text-align: center; padding: 40px 24px; margin: 0; }
.bm-national h2 { color: #fff; font-size: 32px; line-height: 1.6; margin: 0 0 14px; }
.bm-national h2::after { display: none; }
.bm-national p { color: #fff; }

/* --- Product cards: equal-height flex columns, fixed image, pinned button --- */
.home .entry-content .wp-block-columns { gap: 20px; align-items: stretch; }
.home .entry-content .wp-block-columns .wp-block-column { display: flex; flex-direction: column; }
.bm-products .wp-block-column .wp-block-image { margin: 0; }
.bm-products .wp-block-column .wp-block-image img { width: 100%; height: 230px; object-fit: cover; border-radius: 0; }
/* --- Product photo framing (v0.2.9): the card slot is portrait (~160x190)
   but the photos are landscape, so object-fit: cover shows only the middle
   ~56% of each photo. Shift the crop window onto each photo's subject
   (checked visually per photo). Order is the fixed product order: Van,
   Truck, Dumper, Batching, Automixer, Trailer — if the order ever changes,
   these move with the POSITION, not the product, so re-check them then.
   Dumper / Batching / Trailer are fine centered (no rule needed). --- */
.bm-products .wp-block-column:nth-child(1) .wp-block-image img { object-position: 100% 50%; }
.bm-products .wp-block-column:nth-child(2) .wp-block-image img { object-position: 30% 50%; }
.bm-products .wp-block-column:nth-child(5) .wp-block-image img { object-position: 25% 50%; }
/* --- Product card text (v0.3.0): name + one spec line, Liebherr-style.
   The card <p> now SHOWS — it holds the capacity line ("تا ۲ مترمکعب" etc.,
   set by content edit). The old orange spec chips stay hidden: only 1 of
   the 6 cards (Van) carries the bm-chips class on its <p>, the other 5 hold
   their bm-chip spans in plain <p> elements, so hide the spans directly. --- */
.bm-products .wp-block-column p { display: block; font-size: 15px; line-height: 1.6; color: var(--bm-muted); margin: 0 20px 20px; text-align: start; }
.bm-products .bm-chip { display: none; }
/* --- Product card title (v0.3.0): start-aligned, at the top of the text
   block (the v0.2.11 vertical centering is gone now the spec line sits
   below it). min-height keeps the spec lines aligned across cards. --- */
.bm-products .wp-block-column h3 { font-size: 20px; line-height: 1.4; min-height: 56px; margin: 16px 20px 6px; text-align: start; }
.bm-products .wp-block-column h3 a { color: var(--bm-navy); text-decoration: none; }
.bm-products .wp-block-column h3 a:hover { color: var(--bm-orange); }
.bm-products .wp-block-column .wp-block-buttons { margin-top: auto; padding-top: 12px; padding-bottom: 0; }
.bm-products .wp-block-column .wp-block-buttons .wp-block-button__link { width: 100%; text-align: center; }

/* --- Centered intro blocks (v0.2.4): Who We Are heading + paragraph and the
   factory lines (the content adds class "bm-center" to those blocks) --- */
.home .entry-content > h2.bm-center,
.home .entry-content > p.bm-center { text-align: center; }
.home .entry-content > h2.bm-center::after { margin-inline: auto; }

/* --- Products prominence (v0.2.4, restyled v0.3.0): grey panel + white cards,
   flush image, no orange top border — depth comes from the shadow. The
   !important is deliberate: the card columns carry an inline
   background-color from the editor that only !important can override. --- */
/* --- Products 3+3 (v0.3.2, fixed v0.3.3, fixed AGAIN v0.3.4): two rows of
   three LARGE cards instead of six narrow ones — the single biggest Liebherr
   gap (6-across cards were ~190px wide with 4-line titles). Scoped to
   .bm-products so the stats/Who-We-Are columns are untouched.
   v0.3.2 FAILED: WP core block-library forces flex-wrap: nowrap !important
   AND .wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column
   {flex-basis:0;flex-grow:1} (0,3,0) at min-width 782px.
   v0.3.3 FAILED: bm-products is a class ON the .wp-block-columns element
   itself (<div class="wp-block-columns bm-products">), NOT a parent group —
   so the descendant selectors matched nothing. Use COMPOUND selectors.
   The wrap needs !important (our 0,2,0 beats core's 0,1,0 among
   !importants); the column selector reaches (0,4,0) via
   :not(.is-not-stacked-on-mobile). Scoped to min-width 782px so mobile
   keeps core's 100% stacking. --- */
@media (min-width: 782px) {
  .bm-products.wp-block-columns { flex-wrap: wrap !important; }
  .bm-products.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column { flex: 0 0 calc(33.333% - 14px); }
}
.bm-products { background: var(--bm-grey-bg); padding: 24px; border-radius: 16px; }
.bm-products .wp-block-column { background-color: #fff !important; border: 1px solid var(--bm-grey-line); border-radius: 12px; box-shadow: 0 10px 30px rgba(31, 42, 68, .12); overflow: hidden; }
.bm-products .wp-block-column h3 { text-wrap: balance; }
/* --- Products section title (v0.3.0): plain centered heading, no box (the
   v0.2.8 orange-bordered box is gone — Liebherr direction).
   The Products H2 is the heading block immediately before the .bm-products
   group on each homepage (FA/EN/AR). :has() selects it with no content edit;
   browsers without :has() support simply keep the old left-aligned heading.
   Specificity (0,3,2) beats the container rule (0,2,2), so margin/padding
   are fully restated here. The orange ::after bar is centered under it. */
body.home .entry-content > h2:has(+ .bm-products) {
  text-align: center;
  padding: 56px 20px 0;
  margin: 0 auto 28px;
}
body.home .entry-content > h2:has(+ .bm-products)::after { margin-inline: auto; }
/* Spec chips */
.bm-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 10px 0 0; text-align: center; }
.bm-chip { display: inline-block; padding: 3px 12px; border: 1px solid var(--bm-orange); border-radius: 999px; background: #fff; color: var(--bm-navy); font-size: 13px; line-height: 1.7; margin: 3px; }
/* Card hover lift */
.entry-content .wp-block-column.has-background { transition: transform .35s ease, box-shadow .35s ease; }
.entry-content .wp-block-column.has-background:hover { transform: translateY(-8px); box-shadow: 0 18px 40px rgba(31, 42, 68, .16); }
.bm-lift .wp-block-column { transition: transform .35s ease, box-shadow .35s ease; }
.bm-lift .wp-block-column:hover { transform: translateY(-8px); box-shadow: 0 18px 40px rgba(31, 42, 68, .16); }

/* --- Projects slider --- */
.bm-projects { background: var(--bm-grey-bg); padding: 48px 24px; margin: 0; }
.bm-projects .bm-projects-title { font-size: 35px; font-weight: 800; color: var(--bm-navy); text-align: center; line-height: 1.4; margin: 0 0 36px; padding-bottom: 20px; position: relative; }
.bm-projects .bm-projects-title::before { display: none; content: none; }
.bm-projects .bm-projects-title::after { content: ""; display: block; width: 80px; height: 4px; background: var(--bm-orange); border-radius: 2px; margin: 14px auto 0; }
.bm-projects .bm-slider { position: relative; max-width: 1000px; margin: 0 auto; background: #fff; border: 1px solid var(--bm-grey-line); border-top: 4px solid var(--bm-orange); border-radius: 12px; box-shadow: 0 16px 40px rgba(31, 42, 68, .22), 0 4px 12px rgba(31, 42, 68, .12); overflow: hidden; }
.bm-projects .bm-slides { display: grid; }
.bm-projects .bm-slide { grid-area: 1/1; opacity: 0; visibility: hidden; transition: opacity .8s ease, visibility 0s linear .8s; }
.bm-projects .bm-slide.is-active { opacity: 1; visibility: visible; transition: opacity .8s ease; }
.bm-projects .bm-slide-body { padding: 28px 80px 12px; text-align: center; }
.bm-projects .bm-slide-body h3 { font-size: 26px; font-weight: 700; color: var(--bm-navy); line-height: 1.5; margin: 0 0 8px; }
.bm-projects .bm-meta { color: var(--bm-grey-dark); font-weight: 700; font-size: 16px; margin: 0 0 12px; }
.bm-projects .bm-summary { font-size: 18px; line-height: 1.8; color: #333f52; margin: 0 0 20px; }
.bm-projects .bm-more { display: inline-block; background: var(--bm-orange); color: #fff; font-weight: 700; font-size: 17px; padding: 14px 32px; border-radius: 8px; text-decoration: none; box-shadow: 0 6px 16px rgba(232, 118, 43, .35); transition: transform .3s ease, box-shadow .3s ease; }
.bm-projects .bm-more:hover { background: #c85f1d; color: #fff; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(232, 118, 43, .35); }
.bm-projects .bm-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--bm-orange); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(232, 118, 43, .4); z-index: 2; }
.bm-projects .bm-arrow:hover { background: #c85f1d; }
.bm-projects .bm-prev { inset-inline-start: 16px; }
.bm-projects .bm-next { inset-inline-end: 16px; }
.bm-projects .bm-dots { display: flex; justify-content: center; gap: 10px; padding: 10px 0 20px; }
.bm-projects .bm-dot { width: 14px; height: 14px; border-radius: 50%; border: 0; background: var(--bm-grey); cursor: pointer; padding: 0; }
.bm-projects .bm-dot.is-active { background: var(--bm-orange); }

/* --- Why cards --- */
.bm-why { background: var(--bm-grey-bg); }
.bm-why .wp-block-column { background: #fff; border: 1px solid var(--bm-grey-line); border-radius: 12px; padding: 22px; min-height: 240px; height: 100%; }

/* --- FAQ items: light cards with orange inline-start border --- */
.home .entry-content > h3 {
  background: var(--bm-grey-bg);
  border: 1px solid var(--bm-grey-line);
  border-inline-start: 4px solid var(--bm-orange);
  border-radius: 12px 12px 0 0;
  padding: 16px 20px 8px;
  margin-bottom: 0;
}
.home .entry-content > h3 + p {
  background: var(--bm-grey-bg);
  border: 1px solid var(--bm-grey-line);
  border-inline-start: 4px solid var(--bm-orange);
  border-radius: 0 0 12px 12px;
  padding: 0 20px 16px;
  margin-top: 0;
  margin-bottom: 32px;
}

/* --- News strip --- */
.bm-news { background: var(--bm-grey-bg); padding: 72px 24px 76px; text-align: center; }
.bm-news-title { color: var(--bm-navy); font-size: 36px; margin: 0 0 28px; position: relative; }
.bm-news-title::after { content: ""; display: block; width: 80px; height: 4px; background: var(--bm-orange); margin: 14px auto 0; border-radius: 2px; }
.bm-news-intro { color: var(--bm-grey-dark); font-size: 18px; line-height: 1.8; margin: 0 auto 28px; max-width: 800px; }
.bm-news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 1000px; margin: 0 auto 28px; }
.bm-news-grid a { display: block; overflow: hidden; border: 1px solid var(--bm-grey-line); border-radius: 12px; position: relative; transition: transform .35s ease, box-shadow .35s ease; }
/* --- News photo badge overlay (v0.2.9, resized v0.2.11): the badge baked into
   the files is cropped away on the 6 portrait photos by the 4/3 object-fit:
   cover display (their bottom ~25% is cut off). This overlay guarantees a
   crisp badge on all 12 photos, in the slider and on the News page grid.
   Size: the baked badge measures exactly 15% of the photo width with ~4%
   margins (verified 2026-11-20 on news-12); the 15% overlay at 8px offset
   covers the baked MARK fully on landscapes (only a hairline white-tile
   sliver can peek, invisible white-on-white). The mark inside badge.png is
   330px on the 512 canvas (was 390px) so the logo reads smaller. --- */
.bm-news-grid a::after { content: ""; position: absolute; bottom: 8px; right: 8px; width: 15%; aspect-ratio: 1; background: url('assets/badge.png') center / cover no-repeat; border-radius: 20%; box-shadow: 0 2px 8px rgba(31, 42, 68, .25); z-index: 1; }
/* --- News page gallery badge (v0.2.11): the News page uses the standard WP
   gallery block (wp-block-gallery, is-cropped), NOT .bm-news-grid, so the
   v0.2.9 overlay never matched there — and the is-cropped display cuts the
   baked badge off every photo. Same overlay badge, scoped to the gallery
   holding the news-* photos (all 3 languages share the same files). --- */
.wp-block-gallery:has(img[src*="/news-"]) .wp-block-image { position: relative; }
.wp-block-gallery:has(img[src*="/news-"]) .wp-block-image::after { content: ""; position: absolute; bottom: 8px; right: 8px; width: 15%; aspect-ratio: 1; background: url('assets/badge.png') center / cover no-repeat; border-radius: 20%; box-shadow: 0 2px 8px rgba(31, 42, 68, .25); z-index: 1; }
.bm-news-grid a:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(31, 42, 68, .16); }
.bm-news-grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.bm-news .bm-more { display: inline-block; background: var(--bm-orange); color: #fff; padding: 11px 26px; border-radius: 8px; font-weight: 700; font-size: 15px; text-decoration: none; margin-top: 18px; transition: transform .3s ease, box-shadow .3s ease, background-color .3s ease; }
.bm-news .bm-more:hover { background: #c85f1d; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(232, 118, 43, .35); }

/* --- News slider (v0.2.3): 4 slides x 3 photos, crossfade like the projects slider --- */
.bm-news-slider { position: relative; max-width: 1000px; margin: 0 auto 8px; }
.bm-news-slider .bm-slides { display: grid; }
.bm-news-slider .bm-slide { grid-area: 1/1; opacity: 0; visibility: hidden; transition: opacity .8s ease, visibility 0s linear .8s; }
.bm-news-slider .bm-slide.is-active { opacity: 1; visibility: visible; transition: opacity .8s ease; }
.bm-news-slider .bm-news-grid { margin-bottom: 0; }
.bm-news-slider .bm-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--bm-orange); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(232, 118, 43, .4); z-index: 2; }
.bm-news-slider .bm-arrow:hover { background: #c85f1d; }
.bm-news-slider .bm-prev { inset-inline-start: 12px; }
.bm-news-slider .bm-next { inset-inline-end: 12px; }
.bm-news-slider .bm-dots { display: flex; justify-content: center; gap: 10px; padding: 18px 0 4px; }
.bm-news-slider .bm-dot { width: 14px; height: 14px; border-radius: 50%; border: 0; background: var(--bm-grey); cursor: pointer; padding: 0; }
.bm-news-slider .bm-dot.is-active { background: var(--bm-orange); }

/* --- CTA band --- */
.bm-cta { background: var(--bm-navy); color: #fff; text-align: center; padding: 48px 24px; border-radius: 12px; margin: 36px 0; }
.bm-cta h2 { color: #fff; margin: 0 0 12px; }
.bm-cta h2::after { display: none; }
.bm-cta p { color: #fff; }

/* --- Buttons: subtle shadow; filled buttons go navy on hover --- */
.wp-block-button__link { box-shadow: 0 2px 8px rgba(0, 0, 0, .15); transition: transform .3s ease, box-shadow .3s ease; }
.wp-block-button__link:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(232, 118, 43, .35); }
.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover { background: var(--bm-navy); }

/* --- Scroll reveal --- */
.bm-js .bm-reveal { opacity: 0; transform: translateY(30px); transition: opacity .5s ease, transform .5s ease; }
.bm-js .bm-reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .bm-js .bm-reveal { opacity: 1; transform: none; transition: none; }
}

/* --- Inner pages: calm rhythm + card treatment --- */
body.page .entry-content h1 { font-size: 38px; line-height: 1.3; }
body.page:not(.home) .entry-content h2 { font-size: 32px; line-height: 1.35; margin: 40px 0 12px; }
body.page:not(.home) .entry-content h3 { font-size: 20px; line-height: 1.4; margin: 28px 0 8px; }
body:not(.home) .entry-content > h2 { padding-top: 48px; border-top: 1px solid var(--bm-grey-line); }
body:not(.home) .entry-content > h2:first-child { padding-top: 0; border-top: none; }
body:not(.home) .entry-content > .wp-block-columns {
  background: #fff;
  border: 1px solid var(--bm-grey-line);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .06);
  padding: 24px;
  margin-top: 24px;
  margin-bottom: 32px;
}
body.page .entry-content .wp-block-group { padding-top: 32px; padding-bottom: 32px; }
body.page:not(.home) .entry-content .wp-block-columns .wp-block-column .wp-block-image img { height: 200px; object-fit: cover; }
/* Projects page grid cards */
.projects-grid .wp-block-column { border: 1px solid var(--bm-grey-line); border-top: 4px solid #F97316; border-radius: 12px; box-shadow: 0 2px 10px rgba(16, 24, 40, .06); overflow: hidden; }

/* --- Contact forms (CF7): right-align on RTL languages --- */
body.rtl .wpcf7-form,
body.rtl .wpcf7-form p,
body.rtl .wpcf7-form label { direction: rtl; text-align: right; }
body.rtl .wpcf7-form input[type="text"],
body.rtl .wpcf7-form input[type="email"],
body.rtl .wpcf7-form input[type="tel"],
body.rtl .wpcf7-form textarea,
body.rtl .wpcf7-form select { direction: rtl; text-align: right; }
body.rtl .wpcf7-form input[type="submit"] { float: right; }

/* --- Contact Form 7 (v0.2.5): theme the form to match the site --- */
.wpcf7-form { max-width: 640px; }
.wpcf7-form p { margin: 0 0 16px; }
.wpcf7-form label { display: block; font-weight: 600; color: var(--bm-navy); margin-bottom: 6px; font-size: 15px; }
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form select,
.wpcf7-form textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--bm-border); border-radius: 8px; font-family: inherit; font-size: 15px; line-height: 1.5; color: var(--bm-text); background: #fff; }
.wpcf7-form textarea { min-height: 120px; resize: vertical; }
.wpcf7-form input:focus,
.wpcf7-form select:focus,
.wpcf7-form textarea:focus { outline: none; border-color: var(--bm-orange); box-shadow: 0 0 0 3px rgba(232, 118, 43, .18); }
.wpcf7-form input[type="submit"] { background: var(--bm-orange); color: #fff; border: 0; padding: 14px 32px; border-radius: 8px; font-weight: 700; font-size: 16px; cursor: pointer; }
.wpcf7-form input[type="submit"]:hover { background: #D6661F; }
.wpcf7-form .wpcf7-response-output { border-radius: 8px; padding: 12px 14px; margin: 16px 0 0; }

/* --- Footer hours (v0.2.5): balance the wrap so the time range doesn't orphan --- */
.bm-footer-hours { text-wrap: balance; }

/* ============ Premium pass (v0.4.0) ============
   Restraint, not decoration: one typographic voice, quiet surfaces,
   ruled datasheets, generous rhythm. Applies site-wide via the theme. */

/* --- Dropdowns: larger, roomier, quiet hover (was 15px, tight) --- */
.bm-nav .sub-menu {
  min-width: 280px;
  padding: 10px;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(31,42,68,.16);
}
.bm-nav .sub-menu a {
  font-size: 16px;
  padding: 11px 14px;
  line-height: 1.6;
  border-radius: 8px;
}
.bm-nav .sub-menu a:hover { background: var(--bm-grey-bg); color: var(--bm-navy); }

/* --- Inner pages only (.bm-page is page.php/index.php/404.php, never the
   front page): editorial measure for prose, media/tables stay full width --- */
.bm-page .entry-content > p,
.bm-page .entry-content > h2,
.bm-page .entry-content > h3,
.bm-page .entry-content > ul { max-width: 820px; }

/* --- Inner pages: more air between sections --- */
.bm-page { padding-block: 64px 80px; }
.bm-page .entry-content h2:not(:first-child) { margin-top: 56px; }
.bm-page .entry-content h3:not(:first-child) { margin-top: 36px; }

/* --- Tables: horizontal hairlines only (was a full grid) --- */
.entry-content table { border-collapse: collapse; }
.entry-content th, .entry-content td {
  border: none;
  border-bottom: 1px solid var(--bm-border);
  padding: 12px 14px;
}

/* --- Project lead box: quiet datasheet callout (was yellow highlighter).
   The box is inline-styled in post_content, so !important is required. --- */
.entry-content div[style*="FFF8D6"] {
  background-color: #F5F7FA !important;
  border: none !important;
  border-inline-start: 4px solid var(--bm-orange) !important;
}
.entry-content div[style*="FFF8D6"] p { font-size: 1.15em !important; }

/* --- Products pages (FA 28 / EN 12 / AR 86): spec paragraphs become
   ruled datasheet rows; product sections get real separation --- */
body.page-id-28 .entry-content .wp-block-group__inner-container > p,
body.page-id-12 .entry-content .wp-block-group__inner-container > p,
body.page-id-86 .entry-content .wp-block-group__inner-container > p {
  padding-block: 10px;
  border-bottom: 1px solid var(--bm-border);
  margin-bottom: 0;
}
body.page-id-28 .entry-content .wp-block-group__inner-container > p:last-of-type,
body.page-id-12 .entry-content .wp-block-group__inner-container > p:last-of-type,
body.page-id-86 .entry-content .wp-block-group__inner-container > p:last-of-type {
  border-bottom: none;
}
body.page-id-28 .entry-content > .wp-block-group,
body.page-id-12 .entry-content > .wp-block-group,
body.page-id-86 .entry-content > .wp-block-group { margin-bottom: 56px; }

/* --- Homepage on mobile: compact, nothing hidden --- */
@media (max-width: 768px) {
  .bm-page { padding-block: 40px 56px; }
  .home .entry-content > h2 { font-size: 28px; line-height: 1.45; padding-top: 40px; margin-bottom: 12px; }
  .home .entry-content > .wp-block-group,
  .home .entry-content > .wp-block-columns { padding-top: 36px; padding-bottom: 36px; }
  .home .entry-content > h3 { font-size: 17px; line-height: 1.5; margin-bottom: 6px; }
  .home .entry-content > h3 + p { font-size: 15px; line-height: 1.7; margin: 0 0 14px; }
  .home .entry-content > .wp-block-buttons { padding-bottom: 20px; }
  .bm-hero { min-height: 420px; }
  .bm-hero-content { padding: 32px 18px 46px; }
  .bm-hero-content .hero-eyebrow { font-size: 44px; margin: 0 0 8px; }
  .bm-hero-content h1 { font-size: 23px; line-height: 1.4; margin: 0 0 12px; }
  .bm-hero-sub { font-size: 14px; line-height: 1.7; margin: 0 0 18px; }
  .bm-hero-btn, .bm-hero-ctas a.bm-hero-btn-primary, .bm-hero-ctas a.bm-hero-btn-secondary { padding: 11px 22px; font-size: 15px; }
  .bm-hero-arrow { width: 36px; height: 36px; font-size: 19px; }
  .bm-hero-prev { inset-inline-start: 6px; }
  .bm-hero-next { inset-inline-end: 6px; }
  .bm-hero-dots { bottom: 14px; }
  .bm-hero-dot { width: 11px; height: 11px; }
  .bm-national { padding: 28px 20px; }
  .bm-national h2 { font-size: 24px; line-height: 1.45; margin-bottom: 10px; }
  .bm-national p { font-size: 16px; line-height: 1.7; }
  .bm-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; padding: 32px 20px; }
  .bm-stats .wp-block-column { margin: 0; padding: 14px 10px; }
  .bm-stats .has-x-large-font-size { font-size: 26px; line-height: 1.3; margin: 0 0 2px; }
  .bm-products { gap: 12px; margin-bottom: 8px; }
  body.home .entry-content > h2:has(+ .bm-products) { padding: 40px 18px 0; margin-top: 0; }
  .bm-products > .wp-block-column { padding: 0; margin: 0; }
  .bm-products .wp-block-column figure.wp-block-image img { height: 180px; }
  .bm-products .wp-block-column > p { font-size: 14px; line-height: 1.6; margin: 0 0 8px; }
  /* v0.4.2: centre product card texts on mobile (title + capacity line) */
  .bm-products .wp-block-column h3,
  .bm-products .wp-block-column > p { text-align: center; }
  .bm-chips { gap: 5px; margin: 8px 0 0; }
  .bm-chip { font-size: 11px; line-height: 1.6; padding: 2px 9px; }
  .bm-why { padding: 24px 20px; margin-bottom: 16px; }
  .bm-why .wp-block-columns { gap: 12px; }
  .bm-why .wp-block-column { min-height: 0; padding: 14px 16px; margin-bottom: 0; }
  .bm-why .wp-block-column > p { font-size: 14px; line-height: 1.6; margin: 0; }
  .bm-news { padding: 28px 16px 32px; }
  .bm-news-title { font-size: 24px; line-height: 1.4; margin: 0 0 16px; }
  .bm-news-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; gap: 12px; max-width: none; padding-bottom: 6px; }
  .bm-news-grid a { flex: 0 0 78%; scroll-snap-align: start; }
  /* News slider (v0.2.3): stack each slide's 3 photos vertically on mobile */
  .bm-news-slider .bm-news-grid { display: grid; grid-template-columns: 1fr; gap: 12px; overflow: visible; padding-bottom: 0; }
  .bm-news-slider .bm-news-grid a { flex: none; scroll-snap-align: none; }
  .bm-news-grid img { aspect-ratio: 4/3; }
}

/* --- Homepage container alignment (v0.2.2) ---
   front-page.php renders the_content with NO .bm-container wrapper (sections
   are full-width by design), so direct-child text elements had zero horizontal
   inset and ran edge-to-edge on desktop. Constrain them to the 1200px
   container; keep the bands full-width but align their inner content.
   NOTE (v0.2.1 lesson): the "inner pages" rules body.page .entry-content h2/h3
   matched the homepage too (body has class "page") at specificity (0,2,2) and
   beat this rule's margin-inline:auto — they are now scoped :not(.home), and
   this rule uses body.home (0,2,2) so it wins on equal specificity by order. */
body.home .entry-content > h2,
body.home .entry-content > p,
body.home .entry-content > h3,
body.home .entry-content > .wp-block-buttons {
  max-width: var(--bm-max);
  margin-inline: auto;
  padding-inline: 20px;
}
/* Stats band: a rounded box inside the container, not edge-to-edge */
.bm-stats {
  max-width: var(--bm-max);
  margin-inline: auto;
}
/* Products + Why bands: full-width backgrounds, content aligned to the container */
.bm-products,
.bm-why {
  padding-inline: max(20px, calc((100vw - var(--bm-max)) / 2));
}
@media (max-width: 921px) {
  .bm-stats { margin-inline: 20px; }
}
