/*
Theme Name: Patment Invest
Theme URI: https://patmentinvest.co.ke
Author: Patment Invest
Description: A fast, standard WordPress theme for Patment Invest: turnkey apartment and commercial construction in Kenya. Fully server-rendered, editable from the WordPress dashboard (menus, pages, Customizer, Projects). No page builder or JavaScript framework required.
Version: 2.3.1
Requires at least: 6.3
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: patment-invest
*/

:root {
  --navy: #1f3e61;
  --navy-dark: #152b45;
  --red: #d62f24;
  --red-dark: #b3241b;
  --sky: #77d3f7;
  --ink: #1a202c;
  --muted: #5b6676;
  --line: #e4e8ee;
  --soft: #f5f7fa;
  --white: #fff;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(21, 43, 69, .08);
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); }
a:hover { color: var(--red); }
h1, h2, h3, h4 { line-height: 1.2; color: var(--navy); margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }

.screen-reader-text {
  position: absolute !important; clip: rect(1px, 1px, 1px, 1px);
  width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 999; background: #fff; padding: 10px 14px; clip: auto; width: auto; height: auto; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section--soft { background: var(--soft); }
.section--navy { background: var(--navy); color: #fff; }
.section--navy h2, .section--navy h3 { color: #fff; }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--red); margin-bottom: 10px; }
.section--navy .eyebrow { color: var(--sky); }
.lead { font-size: 1.1rem; color: var(--muted); }
.section--navy .lead { color: #cfdbea; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; font-weight: 700; font-size: .95rem;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-dark); color: #fff; }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-dark); color: #fff; }
.btn--ghost { border-color: rgba(255, 255, 255, .7); color: #fff; }
.btn--ghost:hover { background: #fff; color: var(--navy); }
.btn--outline { border-color: var(--navy); color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: #fff; }
.btn--wa { background: #1fa855; color: #fff; }
.btn--wa:hover { background: #178a45; color: #fff; }

/* Top bar */
.topbar { background: var(--navy-dark); color: #cfdbea; font-size: .82rem; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 16px; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; }
.topbar a { color: #fff; text-decoration: none; font-weight: 600; }
.topbar a:hover { color: var(--sky); }
.topbar__links { display: flex; gap: 20px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 82px; gap: 20px; }
.site-logo img { height: 54px; width: auto; }
.site-title { font-weight: 800; font-size: 1.3rem; text-decoration: none; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; }
.main-nav li { position: relative; }
.main-nav a { display: block; padding: 10px 14px; text-decoration: none; font-weight: 600; font-size: .95rem; color: var(--ink); border-radius: 8px; }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current-menu-ancestor > a { color: var(--red); }
.main-nav .sub-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 260px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px; flex-direction: column; align-items: stretch; gap: 0; }
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { display: flex; }
.main-nav .sub-menu a { font-weight: 500; }
.header-cta { display: flex; gap: 10px; align-items: center; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; width: 44px; height: 44px; cursor: pointer; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 20px; height: 2px; background: var(--navy); position: relative; margin: 0 auto; content: ''; }
.nav-toggle span::before { position: absolute; top: -6px; left: 0; }
.nav-toggle span::after { position: absolute; top: 6px; left: 0; }

@media (max-width: 1100px) {
  .nav-toggle { display: block; }
  .header-cta .btn { display: none; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 10px 20px 20px; max-height: calc(100vh - 120px); overflow-y: auto; }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; }
  .main-nav .sub-menu { display: flex; position: static; border: 0; box-shadow: none; padding: 0 0 0 14px; min-width: 0; }
}

/* Hero */
.hero { position: relative; color: #fff; background: var(--navy-dark) center/cover no-repeat; }
.hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(21, 43, 69, .93) 0%, rgba(21, 43, 69, .75) 55%, rgba(21, 43, 69, .35) 100%); }
.hero .wrap { position: relative; padding-top: 110px; padding-bottom: 110px; }
.hero__badge { display: inline-block; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .3); padding: 6px 14px; border-radius: 999px; font-size: .8rem; font-weight: 600; margin-bottom: 20px; }
.hero h1 { color: #fff; max-width: 780px; }
.hero p { font-size: 1.15rem; max-width: 620px; color: #dbe6f3; margin-bottom: 30px; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Stats */
.stats { background: transparent; margin-top: -44px; position: relative; z-index: 2; }
.stats + .section { padding-top: 56px; }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
.stat { padding: 26px 20px; text-align: center; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat strong { display: block; font-size: 1.15rem; color: var(--navy); }
.stat span { font-size: .85rem; color: var(--muted); }
@media (max-width: 780px) { .stats__grid { grid-template-columns: 1fr 1fr; } .stat:nth-child(2) { border-right: 0; } .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }

/* Cards */
.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid--3, .grid--4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid--3, .grid--4, .grid--2 { grid-template-columns: 1fr; } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; transition: box-shadow .2s, transform .2s; display: flex; flex-direction: column; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card .icon { width: 48px; height: 48px; border-radius: 12px; background: #eaf1f9; color: var(--navy); display: grid; place-items: center; margin-bottom: 18px; font-size: 1.3rem; font-weight: 800; }
.card p { color: var(--muted); font-size: .95rem; flex: 1; }
.card .more { font-weight: 700; font-size: .9rem; text-decoration: none; color: var(--red); }
.card .more::after { content: ' →'; }
.card h3 a { text-decoration: none; }

/* Projects */
.project-card { padding: 0; overflow: hidden; }
.project-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.project-card__body { padding: 22px 24px 26px; }
.project-card .tag { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--red); }

/* Steps */
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 980px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .steps { grid-template-columns: 1fr; } }
.step { counter-increment: s; position: relative; padding-top: 56px; }
.step::before { content: counter(s); position: absolute; top: 0; left: 0; width: 42px; height: 42px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 800; display: grid; place-items: center; }
.step h3 { color: #fff; }
.step p { color: #cfdbea; font-size: .95rem; }

/* Areas */
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip { padding: 12px 22px; border: 1px solid var(--line); border-radius: 999px; background: #fff; text-decoration: none; font-weight: 700; }
.chip:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

/* Calculator */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
@media (max-width: 820px) { .calc { grid-template-columns: 1fr; padding: 22px; } }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; padding: 12px 14px; border: 1px solid #cdd5e0; border-radius: 10px; font: inherit; background: #fff; color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--navy); border-color: var(--navy); }
.calc__result { background: var(--soft); border-radius: var(--radius); padding: 24px; }
.calc__result dl { margin: 0; }
.calc__row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.calc__row:last-child { border-bottom: 0; }
.calc__row dt { color: var(--muted); }
.calc__row dd { margin: 0; font-weight: 700; }
.calc__row.big dd { font-size: 1.4rem; color: var(--red); }
.fineprint { font-size: .78rem; color: var(--muted); margin-top: 14px; }

/* FAQ */
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; padding: 0 22px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 18px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; color: var(--navy); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.4rem; line-height: 1; color: var(--red); }
.faq details[open] summary::after { content: '–'; }
.faq details p { color: var(--muted); padding-bottom: 18px; margin: 0; }

/* CTA band */
.cta-band { background: linear-gradient(120deg, var(--navy) 0%, var(--navy-dark) 100%); color: #fff; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #cfdbea; max-width: 600px; margin: 0 auto 26px; }
.cta-band .hero__actions { justify-content: center; }

/* Page / post content */
.page-hero { background: var(--navy); color: #fff; padding: 56px 0; }
.page-hero h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0; max-width: 860px; }
.breadcrumbs { font-size: .85rem; color: #b7c7dc; margin-bottom: 12px; }
.breadcrumbs a { color: #fff; text-decoration: none; }
.content-area { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; padding: 56px 0 72px; align-items: start; }
.content-area.no-sidebar { grid-template-columns: minmax(0, 820px); justify-content: center; }
@media (max-width: 980px) { .content-area { grid-template-columns: 1fr; } }
.entry-content { font-size: 1.05rem; }
.entry-content h2 { margin-top: 1.6em; font-size: 1.6rem; }
.entry-content h3 { margin-top: 1.4em; }
.entry-content img { border-radius: var(--radius); }
.entry-content figure { margin: 1.6em 0; }
.entry-content figcaption { font-size: .85rem; color: var(--muted); margin-top: 8px; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li { margin-bottom: .4em; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: .95rem; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.entry-content th { background: var(--soft); }
.sidebar-box { background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; position: sticky; top: 100px; }
.sidebar-box + .sidebar-box { position: static; }
.sidebar-box h3 { font-size: 1.05rem; }
.sidebar-box ul { list-style: none; padding: 0; margin: 0 0 16px; }
.sidebar-box li a { display: block; padding: 8px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-size: .92rem; font-weight: 600; }
.sidebar-box .btn { width: 100%; margin-top: 8px; }
.child-grid { margin-top: 40px; }
.post-meta { font-size: .85rem; color: var(--muted); margin-bottom: 18px; }
.pagination { margin-top: 32px; display: flex; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; }
.pagination .current { background: var(--navy); color: #fff; border-color: var(--navy); }

/* Forms */
.pi-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .pi-form .row { grid-template-columns: 1fr; } }
.pi-form .hp { position: absolute; left: -9999px; }
.notice { padding: 14px 18px; border-radius: 10px; margin-bottom: 20px; font-weight: 600; }
.notice--ok { background: #e6f6ec; color: #14532d; border: 1px solid #b7e4c7; }
.notice--err { background: #fdecea; color: #7f1d1d; border: 1px solid #f5c2bd; }

/* Footer */
.site-footer { background: var(--navy-dark); color: #b7c7dc; padding: 64px 0 0; font-size: .93rem; }
.site-footer h3 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.site-footer a { color: #cfdbea; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 44px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-logo { background: #fff; border-radius: 10px; padding: 8px 12px; display: inline-block; margin-bottom: 14px; }
.footer-logo img { height: 40px; width: auto; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding: 20px 0; font-size: .82rem; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Floating WhatsApp */
.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 60; width: 58px; height: 58px; border-radius: 50%; background: #1fa855; color: #fff; display: grid; place-items: center; box-shadow: 0 8px 22px rgba(0, 0, 0, .25); text-decoration: none; }
.wa-float:hover { background: #178a45; color: #fff; }
.wa-float svg { width: 30px; height: 30px; fill: currentColor; }

/* WordPress core */
.alignleft { float: left; margin: 0 1.2em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.2em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: .85rem; color: var(--muted); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

@media (max-width: 640px) {
  .topbar .wrap > span:first-child { display: none; }
  .topbar .wrap { justify-content: center; }
  .hero .wrap { padding-top: 64px; padding-bottom: 80px; }
  .section { padding: 52px 0; }
  .btn { width: 100%; }
  .hero__actions { flex-direction: column; }
  .wa-float { width: 52px; height: 52px; }
}

/* Keep tall phone photos in articles from dominating the page */
.entry-content img { max-height: 520px; width: 100%; object-fit: cover; }
.entry-content .grid img, .entry-content figure.grid img { max-height: 340px; }

/* ===== Data-driven pages ===== */
.small { font-size: .88rem; color: var(--muted); }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--red); margin-bottom: 8px; }
.card h4 { margin: 16px 0 4px; font-size: .95rem; color: var(--navy); }
.check-list { list-style: none; padding: 0; margin: 10px 0 16px; }
.check-list li { position: relative; padding-left: 24px; margin-bottom: 8px; font-size: .93rem; }
.check-list li::before { content: '✓'; position: absolute; left: 0; top: 0; color: var(--red); font-weight: 800; }
.section--navy .check-list li, .stage .check-list li { color: #dbe6f3; }
ul.plain { list-style: none; padding: 0; margin: 0 0 16px; }
ul.plain li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.impact { background: #fff5f4; border-left: 3px solid var(--red); padding: 10px 14px; border-radius: 0 8px 8px 0; font-size: .92rem; color: var(--ink); }
.deliverable { font-size: .88rem; color: var(--navy); }

.page-hero--rich { padding: 64px 0 56px; background: linear-gradient(120deg, var(--navy-dark) 0%, var(--navy) 100%); }
.page-hero--rich .eyebrow { color: var(--sky); }
.page-hero--rich h1 { max-width: 980px; font-size: clamp(1.7rem, 3.6vw, 2.5rem); margin-bottom: 14px; }
.page-hero__sub { color: #cfdbea; max-width: 820px; font-size: 1.05rem; margin: 0 0 24px; }
.post-meta--light { color: #b7c7dc; margin: 0; }

.factbar { margin-top: -28px; position: relative; z-index: 2; }
.factbar .stat strong { font-size: .98rem; line-height: 1.35; }
.factbar .stat span { display: block; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .07em; font-size: .7rem; font-weight: 700; }
.stats__grid--6 { grid-template-columns: repeat(6, 1fr); }
.stats__grid--6 .stat strong { font-size: .88rem; }
@media (max-width: 980px) { .stats__grid--6 { grid-template-columns: 1fr 1fr 1fr; } .stats__grid--6 .stat { border-bottom: 1px solid var(--line); } }
@media (max-width: 560px) { .stats__grid--6 { grid-template-columns: 1fr 1fr; } }

.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 14px; }
.facts--4 { grid-template-columns: repeat(4, 1fr); }
.facts div { background: var(--soft); border-radius: 10px; padding: 10px 12px; }
.facts span { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.facts strong { font-size: .88rem; color: var(--navy); line-height: 1.35; display: block; }
@media (max-width: 820px) { .facts--4 { grid-template-columns: 1fr 1fr; } }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.two-col--wide { grid-template-columns: 1.3fr 1fr; }
.two-col--form { grid-template-columns: 1.2fr 1fr; }
@media (max-width: 900px) { .two-col, .two-col--wide, .two-col--form { grid-template-columns: 1fr; } }
.intake { position: relative; }

/* Pillars */
.pillars { display: grid; gap: 20px; }
.pillar { display: grid; grid-template-columns: 72px 1fr; gap: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.pillar__num { font-size: 2rem; font-weight: 800; color: var(--red); line-height: 1; }
.pillar__sub { color: var(--red); font-weight: 600; font-size: .92rem; margin-bottom: 8px; }
@media (max-width: 640px) { .pillar { grid-template-columns: 1fr; padding: 22px; } }

/* Stages */
.stages { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.stage { display: grid; grid-template-columns: 56px 1fr; gap: 18px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius); padding: 24px; }
.stage__num { width: 46px; height: 46px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 800; display: grid; place-items: center; }
.stage__meta { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--sky); font-weight: 700; }
.stage h3 { color: #fff; margin: 4px 0 8px; }
.stage p { color: #cfdbea; margin-bottom: 8px; font-size: .96rem; }
.stage .deliverable { color: #fff; }
.stage details { margin-top: 8px; }
.stage summary { cursor: pointer; color: var(--sky); font-weight: 700; font-size: .9rem; }

/* Cases / testimonials */
.cases { display: grid; gap: 24px; }
.case .case__top h3 { margin-bottom: 2px; }
.metric-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 16px; }
.metric-tiles div { background: var(--navy); color: #fff; border-radius: 10px; padding: 12px 14px; }
.metric-tiles strong { display: block; font-size: 1.1rem; }
.metric-tiles span { font-size: .78rem; color: #b7c7dc; }
.testimonials { margin-top: 28px; }
.quote { margin: 0; }
.quote blockquote { margin: 0 0 16px; font-size: 1rem; font-style: italic; color: var(--ink); }
.quote figcaption strong { display: block; color: var(--navy); }
.quote figcaption span { display: block; font-size: .85rem; color: var(--muted); }
.quote figcaption em { display: block; margin-top: 8px; font-weight: 700; font-style: normal; color: var(--red); font-size: .88rem; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin: 1.2em 0; }
.data-table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 620px; }
.data-table th { background: var(--navy); color: #fff; text-align: left; padding: 12px 14px; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.data-table td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.entry-content .data-table th { border: 0; background: var(--navy); }

/* Service/area sections */
.factors { display: grid; gap: 14px; }
.factor { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; }
.factor h3 { margin-bottom: 6px; }
.why__item { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius); padding: 22px; }
.why__item p { color: #cfdbea; margin: 0; }
.sign h3 { font-size: 1.05rem; }
.equation .rows > div { display: block; }
.rows > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.rows > div:last-child { border-bottom: 0; }
.rows dt { color: var(--muted); flex: 0 0 42%; }
.rows dd { margin: 0; font-weight: 700; text-align: right; }
.equation .rows dd { text-align: left; display: block; margin-top: 2px; }

/* Calculator v2 */
.calc2 { display: grid; grid-template-columns: 1fr 1.05fr; gap: 32px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
@media (max-width: 900px) { .calc2 { grid-template-columns: 1fr; padding: 20px; } }
.calc2 .field label, .calc2 legend { font-weight: 700; font-size: .88rem; color: var(--navy); }
.calc2 input[type=range] { width: 100%; accent-color: var(--red); padding: 0; }
.range-scale { display: flex; justify-content: space-between; font-size: .68rem; color: var(--muted); margin-top: 4px; gap: 4px; }
.calc2 fieldset { border: 0; padding: 0; margin: 0 0 16px; }
.calc2 legend { padding: 0; margin-bottom: 8px; }
.seg label { display: flex; gap: 10px; align-items: center; padding: 11px 14px; border: 1px solid #cdd5e0; border-radius: 10px; margin-bottom: 8px; cursor: pointer; font-weight: 500; font-size: .92rem; }
.seg label:has(input:checked) { border-color: var(--navy); background: #eaf1f9; }
.seg input { width: auto; accent-color: var(--red); }
.seg--inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.seg--inline legend { width: 100%; }
.seg--inline label { margin: 0; padding: 8px 16px; }
.calc2__result { background: var(--soft); border-radius: var(--radius); padding: 26px; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.kpi { background: #fff; border-radius: 10px; padding: 14px; border: 1px solid var(--line); }
.kpi span { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
.kpi strong { font-size: 1.15rem; color: var(--navy); }
.kpi--big { grid-column: 1 / -1; background: var(--navy); }
.kpi--big span { color: #b7c7dc; }
.kpi--big strong { font-size: 2rem; color: #fff; }
.calc2 .notes { margin: 16px 0; font-size: .86rem; color: var(--muted); }
.calc2 .notes p { margin-bottom: 8px; }
.calc2 .btn { width: 100%; text-align: center; }

/* Articles */
.article { max-width: 820px; margin: 0 auto; padding: 48px 0 72px; }
.article__hero img, .article__fig img { width: 100%; max-height: 520px; object-fit: cover; border-radius: var(--radius); }
.article__hero figcaption, .article__fig figcaption { font-size: .85rem; color: var(--muted); margin-top: 8px; }
.article__fig { margin: 1.6em 0; }
.highlight { background: #eef4fb; border-left: 4px solid var(--navy); border-radius: 0 var(--radius) var(--radius) 0; padding: 20px 24px; margin: 1.6em 0; }
.highlight h3 { font-size: 1.05rem; }
.highlight p:last-child { margin-bottom: 0; }
.highlight--cta { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; border-left-color: var(--red); background: #fff5f4; }
.highlight--cta p { margin: 0; flex: 1 1 320px; }
.article__related { margin-top: 36px; }
.entry-content section > h2:first-child { margin-top: 1.4em; }
.corridors .card { height: 100%; }
.typology h3 { margin-bottom: 10px; }

.table-caption { font-size: .82rem; color: var(--muted); margin: -.6em 0 1.4em; }
.entry-content p a, .highlight a { color: var(--red); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.entry-content .faq { margin: 1em 0 1.5em; }
.entry-content .faq details p { margin: 0; }
.article figure { margin: 0 0 1.4em; }
.article .article__fig { margin: 1.6em 0; }

/* ===== Block-based content (v2.3) ===== */
.entry-full > .alignfull, .entry-full > .wp-block-cover { width: 100%; max-width: none; margin-left: 0; margin-right: 0; }
.wp-block-group > p:last-child { margin-bottom: 0; }
.wrap.wp-block-group { max-width: var(--wrap); margin-left: auto; margin-right: auto; padding-left: 20px; padding-right: 20px; }
.hero__actions, .wp-block-buttons.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 0; }
.cta-band .hero__actions { justify-content: center; }
.wp-block-button { margin: 0; }
.wp-block-button .wp-block-button__link { display: inline-flex; align-items: center; justify-content: center; padding: 13px 24px; border-radius: 999px; font-weight: 700; font-size: .95rem; text-decoration: none; border: 2px solid transparent; line-height: 1.3; transition: background .2s, color .2s; }
.wp-block-button.btn-red .wp-block-button__link { background: var(--red); color: #fff; }
.wp-block-button.btn-red .wp-block-button__link:hover { background: var(--red-dark); color: #fff; }
.wp-block-button.btn-navy .wp-block-button__link { background: var(--navy); color: #fff; }
.wp-block-button.btn-wa .wp-block-button__link { background: #1fa855; color: #fff; }
.wp-block-button.btn-wa .wp-block-button__link:hover { background: #178a45; }
.wp-block-button.btn-ghost .wp-block-button__link { background: transparent; border-color: rgba(255,255,255,.7); color: #fff; }
.wp-block-button.btn-ghost .wp-block-button__link:hover { background: #fff; color: var(--navy); }
.wp-block-button.btn-outline .wp-block-button__link { background: transparent; border-color: var(--navy); color: var(--navy); }
.wp-block-button.btn-outline .wp-block-button__link:hover { background: var(--navy); color: #fff; }

/* Cover (homepage hero) */
.wp-block-cover { position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; box-sizing: border-box; color: #fff; }
.wp-block-cover .wp-block-cover__background { position: absolute; inset: 0; opacity: .8; }
.wp-block-cover .wp-block-cover__image-background { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.wp-block-cover .wp-block-cover__inner-container { position: relative; z-index: 1; width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 90px 20px; }
.hero-cover h1 { color: #fff; max-width: 780px; }
.hero-cover p { font-size: 1.15rem; max-width: 620px; color: #dbe6f3; margin-bottom: 30px; }
.hero-cover p.hero__badge { font-size: .8rem; max-width: none; color: #fff; margin-bottom: 20px; }

/* Stats and fact bars */
.stat p { margin: 0; }
.stat-label { font-size: .85rem; color: var(--muted); }
.stat-value { font-weight: 700; color: var(--navy); font-size: 1.15rem; margin-bottom: 4px !important; order: -1; }
.stat { display: flex; flex-direction: column; }
.factbar .stat-label { text-transform: uppercase; letter-spacing: .07em; font-size: .7rem; font-weight: 700; order: -1; margin-bottom: 6px !important; }
.factbar .stat-value { font-size: .98rem; line-height: 1.35; order: 0; }
.stats__grid--6 .stat-value { font-size: .88rem; }
.hero + .stats, .wp-block-cover + .stats { margin-top: -44px; }
.facts > .wp-block-group { background: var(--soft); border-radius: 10px; padding: 10px 12px; }
.facts p { margin: 0; }
.fact-label { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; color: var(--muted) !important; margin-bottom: 2px !important; }
.fact-value { font-size: .88rem; font-weight: 700; color: var(--navy) !important; line-height: 1.35; }
.facts--1 { grid-template-columns: 1fr; }
.equation .facts > .wp-block-group { background: none; padding: 8px 0; border-bottom: 1px solid var(--line); border-radius: 0; }

/* Cards, tags, links */
.card .more, p.more { margin-top: auto; }
.more a { font-weight: 700; font-size: .9rem; text-decoration: none; color: var(--red); }
.more a::after { content: ' →'; }
.card h3 a, .card h3 a:hover { text-decoration: none; }
.chips p.chip { margin: 0; padding: 0; border: 0; background: none; }
.chips p.chip a { display: block; padding: 12px 22px; border: 1px solid var(--line); border-radius: 999px; background: #fff; text-decoration: none; font-weight: 700; color: var(--navy); }
.chips p.chip a:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
p.eyebrow { margin-bottom: 10px; }
.page-hero--rich .wp-block-buttons { margin-top: 8px; }

/* Pillars, stages */
.pillar__num p { margin: 0; }
.stage__num p { margin: 0; }
.stage__meta { margin-bottom: 4px; }
.stage .wp-block-details summary { color: var(--sky); }
.stage .wp-block-details { margin-top: 8px; }
.stage .check-list li { color: #dbe6f3; }

/* Metric tiles, quotes */
.metric-tiles > .wp-block-group { background: var(--navy); color: #fff; border-radius: 10px; padding: 12px 14px; }
.metric-tiles p { margin: 0; }
.metric-value { font-size: 1.1rem; font-weight: 800; color: #fff !important; }
.metric-label { font-size: .78rem; color: #b7c7dc !important; }
.quote__text { font-style: italic; color: var(--ink) !important; font-size: 1rem !important; }
.quote__name { color: var(--navy); margin-bottom: 0 !important; }
.quote__outcome { font-weight: 700; color: var(--red) !important; font-size: .88rem; flex: 0 !important; }
.card.quote p { flex: 0 1 auto; }

/* Tables as blocks */
.wp-block-table.data-table { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin: 1.2em 0; }
.wp-block-table.data-table table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 620px; border: 0; }
.wp-block-table.data-table figcaption { padding: 10px 14px; font-size: .82rem; color: var(--muted); text-align: left; margin: 0; background: #fff; }
.wp-block-table.data-table th { border: 0; }
.wp-block-table.data-table td { border: 0; border-top: 1px solid var(--line); }

/* Images and gallery */
.wp-block-image { margin: 0 0 1.4em; }
.wp-block-image img { border-radius: var(--radius); width: 100%; height: auto; }
.wp-element-caption, .wp-block-image figcaption { font-size: .82rem; color: var(--muted); margin-top: 8px; text-align: left; }
.survey-gallery .wp-block-image { margin: 0; }
.survey-gallery .wp-block-image img { aspect-ratio: 16 / 10; object-fit: cover; }
.project-card .wp-block-image img { border-radius: 0; aspect-ratio: 4 / 3; object-fit: cover; }
.project-card .wp-block-image { margin: 0; }
.card.project-card { padding: 0; overflow: hidden; }
.card.project-card > .wp-block-group, .card.project-card > p, .card.project-card > h3 { margin-left: 24px; margin-right: 24px; }
.card.project-card > .wp-block-group:last-child, .card.project-card > p:last-child { margin-bottom: 24px; }

/* Article column */
.article.wp-block-group { max-width: 820px; margin: 0 auto; padding: 48px 0 72px; }
.article > .wp-block-image:first-child img { max-height: 520px; object-fit: cover; }
.article .wp-block-image img { max-height: 520px; object-fit: cover; }
.highlight.wp-block-group.highlight--cta { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.highlight--cta > p { flex: 1 1 320px; margin: 0; }

/* Accordions */
.faq .wp-block-details, .wp-block-details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; padding: 0 22px; }
.wp-block-details summary { cursor: pointer; font-weight: 700; padding: 18px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; color: var(--navy); }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: '+'; font-size: 1.4rem; line-height: 1; color: var(--red); }
.wp-block-details[open] summary::after { content: '–'; }
.wp-block-details > p { color: var(--muted); padding-bottom: 18px; margin: 0; }
.stage .wp-block-details { background: transparent; border: 0; padding: 0; margin-bottom: 0; }
.stage .wp-block-details summary { padding: 6px 0; }
.stage .wp-block-details summary::after { color: var(--sky); }

/* Disclaimer */
.disclaimer-box { background: #f7f8fa; border: 1px solid var(--line); border-left: 4px solid var(--navy); border-radius: var(--radius); padding: 22px 26px; font-size: .88rem; color: var(--muted); }
.disclaimer-box h3 { font-size: 1rem; margin-bottom: 8px; }
.disclaimer-box p { margin: 0 0 .7em; }
.disclaimer-box a { color: var(--red); font-weight: 600; }
.footer-disclaimer { font-size: .78rem; color: #8ea3bd; max-width: 760px; margin: 0; }
.footer-disclaimer a { color: #cfdbea; text-decoration: underline; }
.consent-note { font-size: .78rem; color: var(--muted); margin: 12px 0 0; }

/* Header: keep menu items and the CTA on one line with the longer menu */
.main-nav a { padding: 10px 10px; white-space: nowrap; }
.header-cta .btn { white-space: nowrap; padding: 11px 18px; font-size: .88rem; }
.site-header .wrap { gap: 12px; }
@media (max-width: 1180px) { .main-nav a { padding: 10px 7px; font-size: .88rem; } .header-cta .btn { padding: 10px 14px; font-size: .82rem; } }
.grid > *, .two-col > *, .stats__grid > * { min-width: 0; }
.facts p, .stat p, .card p { overflow-wrap: anywhere; }
.wp-block-table.data-table { min-width: 0; width: auto; display: block; border-collapse: separate; font-size: inherit; }
.wp-block-cover .wp-block-cover__image-background { z-index: 0; }
.wp-block-cover .wp-block-cover__background { z-index: 1; }
.wp-block-cover .wp-block-cover__inner-container { z-index: 2; }
