/*
Theme Name: Legarec
Theme URI: https://legarec.fr/
Author: Legarec
Description: Thème sur mesure, léger, en HTML/CSS/JS, pour le site de Legarec, cabinet de recouvrement de créances.
Version: 2.0.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: legarec
*/

/* ---------- Fonts (self-hosted, no Google request) ---------- */
@font-face { font-family: "Playfair Display"; src: url("assets/fonts/playfair-display.woff2") format("woff2"); font-weight: 500 800; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("assets/fonts/cinzel.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("assets/fonts/open-sans.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Open Sans"; src: url("assets/fonts/open-sans-italic.woff2") format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
	/* Brand colours taken from the Legarec logo: navy #0b2b4b and gold #b89963. */
	--navy: #0b2b4b;
	--navy-2: #123a61;
	--blue: #1d4a79;
	--blue-dark: #0b2b4b;
	--gold: #b89963;
	--gold-dark: #8a6d3b;
	--sand: #dcc9a6;
	--sand-light: #f6f2ea;
	--paper: #faf8f5;
	--ink: #1f2328;
	--muted: #5b6470;
	--line: #e6e0d8;
	--white: #fff;
	--radius: 14px;
	--shadow: 0 10px 30px rgba(13, 34, 51, .08);
	--wrap: 1180px;
	--font-head: "Playfair Display", Georgia, "Times New Roman", serif;
	--font-brand: "Cinzel", "Trajan Pro", Georgia, serif;
	--font-body: "Open Sans", "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 1rem/1.7 var(--font-body); color: var(--ink); background: var(--white); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-dark); }
h1, h2, h3, h4, h5, h6, .stat__value { font-variant-numeric: lining-nums; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); font-weight: 700; line-height: 1.15; color: var(--navy); margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.55rem); }
h4 { font-size: 1.25rem; }
p { margin: 0 0 1.1em; }
strong { font-weight: 700; color: var(--navy); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 1000; width: auto; height: auto; clip: auto; padding: 10px 16px; background: var(--white); color: var(--navy); border-radius: 8px; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 40px, 780px); margin-inline: auto; }
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--sand { background: var(--sand-light); }
.section--navy { background: var(--navy); color: #c9d3dc; }
.section--navy h2, .section--navy h3, .section--navy h4, .section--navy strong { color: var(--white); }
.section__head { max-width: 720px; margin-bottom: 48px; }
.section__head--center { margin-inline: auto; text-align: center; }
.eyebrow { display: inline-block; font: 700 .78rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: 14px; }
.section--navy .eyebrow, .hero .eyebrow { color: var(--gold); }
.lead { font-size: 1.15rem; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border: 2px solid var(--blue); border-radius: 999px; background: var(--blue); color: var(--white); font: 700 .95rem/1 var(--font-body); text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s; }
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: var(--white); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .55); }
.btn--ghost:hover { background: var(--white); color: var(--navy); border-color: var(--white); }
.btn--light { background: var(--white); color: var(--navy); border-color: var(--white); }
.btn--light:hover { background: var(--sand); border-color: var(--sand); color: var(--navy); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.link-arrow { font-weight: 700; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.link-arrow::after { content: "→"; transition: transform .2s; }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Header ---------- */
/* No backdrop-filter here: it would become the containing block of the fixed mobile menu. */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--white); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 4px 20px rgba(13, 34, 51, .06); }
.admin-bar .site-header { top: 32px; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 78px; }
.site-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); }
.site-logo img { height: 50px; width: auto; }
.site-logo__name { display: block; font: 700 1.55rem/1 var(--font-brand); letter-spacing: .06em; color: var(--navy); }
.site-logo__tag { display: block; margin-top: 5px; font: 600 .58rem/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--navy); }
.site-logo__tag span { color: var(--gold); }
.nav { display: flex; align-items: center; gap: 6px; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav > ul, .nav .menu { display: flex; align-items: center; gap: 2px; }
.nav li { position: relative; }
.nav a { display: block; padding: 10px 14px; color: var(--navy); font-weight: 600; font-size: .95rem; text-decoration: none; border-radius: 8px; }
.nav a:hover, .nav .current-menu-item > a, .nav .current-menu-ancestor > a, .nav .current_page_item > a { color: var(--blue); }
.nav .menu-item-has-children > a::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); }
.nav .sub-menu { position: absolute; top: 100%; left: 0; min-width: 270px; padding: 10px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s, transform .18s, visibility .18s; }
.nav li:hover > .sub-menu, .nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.nav .sub-menu a { padding: 10px 12px; font-weight: 600; }
.nav .sub-menu a:hover { background: var(--sand-light); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-actions .btn { padding: 11px 20px; }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 50%; background: transparent; color: var(--navy); cursor: pointer; }
.icon-btn:hover { background: var(--sand-light); }
.icon-btn svg { width: 20px; height: 20px; }
.search-form { display: flex; gap: 10px; }
.search-form input[type="search"] { flex: 1; }

/* ---------- Hero ---------- */
.hero { position: relative; color: var(--white); background: var(--navy) center/cover no-repeat; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(13, 34, 51, .94) 0%, rgba(13, 34, 51, .78) 45%, rgba(13, 34, 51, .35) 100%); }
.hero__inner { padding: clamp(90px, 14vw, 170px) 0 clamp(80px, 12vw, 140px); max-width: 760px; }
.hero h1 { color: var(--white); margin-bottom: 22px; }
.hero p { font-size: 1.15rem; color: #d9e1e8; max-width: 600px; margin-bottom: 34px; }
.hero--center .hero__inner { margin-inline: auto; text-align: center; }
.hero--center p { margin-inline: auto; }
.hero--center .btn-row { justify-content: center; }

.page-hero { background: var(--sand-light); padding: clamp(60px, 9vw, 110px) 0 clamp(48px, 7vw, 80px); position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; right: -80px; top: -40px; width: 380px; height: 380px; background: url("assets/img/legarec-mark.png") center/contain no-repeat; opacity: .06; pointer-events: none; }
.page-hero h1 { max-width: 900px; margin-bottom: 18px; }
.page-hero .lead { max-width: 720px; margin: 0; }
.breadcrumbs { font-size: .85rem; color: var(--muted); margin-bottom: 18px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--blue); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--white); padding: 30px 26px; }
.stat__value { font: 700 clamp(2.3rem, 4.4vw, 3rem)/1.05 var(--font-head); color: var(--navy); }
.stat__label { margin-top: 8px; color: var(--muted); font-size: .95rem; line-height: 1.5; }
.stats-band { margin-top: -56px; position: relative; z-index: 2; }
.stats-band .stats { box-shadow: var(--shadow); }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; transition: transform .2s, box-shadow .2s, border-color .2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.card h3 { font-size: 1.6rem; margin-bottom: 12px; }
.card p { color: var(--muted); font-size: .97rem; }
.card .link-arrow { margin-top: auto; }
.card__icon { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 22px; border-radius: 14px; background: var(--sand-light); color: var(--gold-dark); }
.card__icon svg { width: 26px; height: 26px; }
.section--navy .card { background: var(--navy-2); border-color: rgba(255, 255, 255, .08); }
.section--navy .card p { color: #b8c4cf; }
.section--navy .card__icon { background: rgba(255, 255, 255, .08); color: var(--gold); }

.steps { counter-reset: step; }
.step { position: relative; padding-top: 74px; }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); position: absolute; top: 0; left: 0; font: 700 3.4rem/1 var(--font-head); color: var(--gold); }
.step h3 { font-size: 1.6rem; }
.step p { color: var(--muted); }

/* ---------- Quote ---------- */
.quote { position: relative; max-width: 900px; padding-left: 0; }
.quote::before { content: "“"; display: block; font: 700 7rem/.6 var(--font-head); color: var(--gold); margin-bottom: 18px; }
.quote p { font: 600 clamp(1.7rem, 3.2vw, 2.4rem)/1.25 var(--font-head); color: var(--navy); margin: 0; }

/* ---------- Split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split__media img { border-radius: var(--radius); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

/* ---------- Prose (page and article content) ---------- */
.prose { font-size: 1.05rem; }
.prose > * + h2 { margin-top: 2em; }
.prose > * + h3 { margin-top: 1.6em; }
.prose h2 { font-size: clamp(1.9rem, 3.4vw, 2.4rem); }
.prose h3 { font-size: 1.6rem; }
.prose h4 { font-size: 1.3rem; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--gold); }
.prose img { border-radius: var(--radius); margin: 1.6em auto; }
.prose figure { margin: 1.6em 0; }
.prose blockquote { margin: 1.6em 0; padding: 18px 24px; border-left: 4px solid var(--sand); background: var(--sand-light); border-radius: 0 10px 10px 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.list-check { list-style: none; padding: 0 !important; }
.list-check li { position: relative; padding-left: 34px; }
.list-check li::before { content: ""; position: absolute; left: 0; top: .3em; width: 22px; height: 22px; border-radius: 50%; background: var(--sand-light) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b89963' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/12px no-repeat; }
.list-x li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6470' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E"); }
.callout { margin: 2em 0; padding: 26px 28px; background: var(--sand-light); border-radius: var(--radius); }
.callout > :last-child { margin-bottom: 0; }
.callout--blue { background: #eef2f7; }
.numbered h2 { display: flex; gap: 14px; align-items: baseline; }
.numbered h2 span { color: var(--gold-dark); }

/* Layout with sticky side navigation on long pages */
.content-layout { display: grid; grid-template-columns: 250px 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.toc { position: sticky; top: 110px; font-size: .92rem; }
.toc__title { font: 700 .78rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 16px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.4; }
.toc a:hover, .toc a.is-active { color: var(--navy); border-left-color: var(--blue); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--navy); color: #c9d3dc; border-radius: calc(var(--radius) + 6px); padding: clamp(36px, 6vw, 64px); display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center; background-image: radial-gradient(circle at 100% 0, rgba(184, 153, 99, .28), transparent 55%); }
.cta-band h2 { color: var(--white); margin-bottom: 10px; font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.cta-band p { margin: 0; max-width: 560px; }

/* ---------- Posts ---------- */
.post-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.post-card__media { display: block; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--navy) 0%, var(--blue-dark) 100%); overflow: hidden; position: relative; }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.post-card__media--empty::after { content: ""; position: absolute; inset: 22% 30%; background: url("assets/img/legarec-mark.png") center/contain no-repeat; opacity: .35; filter: brightness(0) invert(1); }
.post-card__body { padding: 24px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.post-card__meta { font-size: .82rem; color: var(--muted); margin-bottom: 10px; }
.post-card h3 { font-size: 1.5rem; line-height: 1.1; margin-bottom: 12px; }
.post-card h3 a { color: var(--navy); text-decoration: none; }
.post-card h3 a:hover { color: var(--blue); }
.post-card p { color: var(--muted); font-size: .95rem; }
.post-card .link-arrow { margin-top: auto; }

.article-header { padding: clamp(56px, 8vw, 96px) 0 40px; background: var(--sand-light); }
.article-header h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: .9rem; }
.article-cover { margin-top: 40px; }
.article-cover img { border-radius: var(--radius); width: 100%; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 40px 0 0; padding: 0; list-style: none; }
.tags a { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--sand-light); color: var(--navy); font-size: .85rem; text-decoration: none; }
.tags a:hover { background: var(--sand); }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line); }
.post-nav a { display: block; text-decoration: none; color: var(--navy); font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; line-height: 1.15; }
.post-nav span { display: block; font: 600 .8rem/1.4 var(--font-body); color: var(--muted); margin-bottom: 6px; }
.post-nav__next { text-align: right; }
.pagination { margin-top: 56px; display: flex; justify-content: center; }
.pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--navy); font-weight: 600; }
.pagination .current { background: var(--navy); border-color: var(--navy); color: var(--white); }

/* ---------- Forms ---------- */
input[type="text"], input[type="email"], input[type="tel"], input[type="search"], textarea { width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); font: inherit; color: var(--ink); transition: border-color .2s, box-shadow .2s; }
input:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(184, 153, 99, .25); }
textarea { min-height: 150px; resize: vertical; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { margin-bottom: 16px; }
.form-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .82rem; color: var(--muted); margin: 14px 0 0; }
.notice { padding: 14px 18px; border-radius: 10px; margin-bottom: 20px; font-weight: 600; }
.notice--ok { background: #e7f6ee; color: #14633a; }
.notice--error { background: #fdecec; color: #9b1c1c; }

/* ---------- Contact + footer ---------- */
.contact { background: var(--navy); color: #c9d3dc; }
.contact .split { align-items: start; }
.contact h2 { color: var(--white); }
.contact-card { background: var(--white); color: var(--ink); border-radius: calc(var(--radius) + 4px); padding: clamp(26px, 4vw, 40px); }
.contact-list { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 18px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list svg { width: 22px; height: 22px; flex: none; color: var(--gold); margin-top: 3px; }
.contact-list a { color: var(--white); text-decoration: none; font-weight: 600; }
.contact-list a:hover { color: var(--sand); }
.site-footer { background: #0a1a28; color: #8fa0b0; font-size: .92rem; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding: 60px 0 40px; }
.site-footer h2 { font: 700 .78rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--white); margin-bottom: 18px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #b9c6d2; text-decoration: none; }
.site-footer a:hover { color: var(--white); }
.footer-logo { display: inline-block; background: var(--white); padding: 10px 14px; border-radius: 10px; margin-bottom: 18px; }
.footer-logo img { height: 44px; width: auto; }
.site-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding: 22px 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: .85rem; }

/* ---------- 404 / search ---------- */
.empty-state { text-align: center; padding: 40px 0; }
.empty-state .search-form { max-width: 480px; margin: 24px auto 0; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
	.js .reveal { opacity: 1; transform: none; }
}

/* ---------- WordPress core classes ---------- */
.alignleft { float: left; margin: .4em 1.6em 1em 0; }
.alignright { float: right; margin: .4em 0 1em 1.6em; }
.aligncenter { margin-inline: auto; }
.wp-caption-text, figcaption { font-size: .85rem; color: var(--muted); text-align: center; margin-top: 8px; }
.sticky, .gallery-caption, .bypostauthor { }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
	.grid--4 { grid-template-columns: repeat(2, 1fr); }
	.stats { grid-template-columns: repeat(2, 1fr); }
	.content-layout { grid-template-columns: 1fr; }
	.toc { display: none; }
}
@media (max-width: 960px) {
	.grid--3 { grid-template-columns: 1fr 1fr; }
	.split { grid-template-columns: 1fr; }
	.cta-band { grid-template-columns: 1fr; }
	.site-footer__grid { grid-template-columns: 1fr 1fr; }
	.site-footer__grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } .page-hero::after { width: 240px; height: 240px; right: -70px; } }
@media (max-width: 640px) {
	.grid--2, .grid--3, .grid--4, .form-row { grid-template-columns: 1fr; }
	.stats { grid-template-columns: 1fr 1fr; }
	.stat { padding: 22px 18px; }
	.site-footer__grid { grid-template-columns: 1fr; }
	.post-nav { grid-template-columns: 1fr; }
	.post-nav__next { text-align: left; }
	.site-logo img { height: 44px; }
}

/* ---------- Footer brand ---------- */
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; text-decoration: none; }
.footer-brand img { height: 46px; width: auto; filter: brightness(0) invert(1); opacity: .95; }
.footer-brand .site-logo__name, .footer-brand .site-logo__tag { color: var(--white); }
@media (max-width: 420px) { .site-header .site-logo__tag { display: none; } .site-logo__name { font-size: 1.35rem; } }

/* ---------- Legarec additions ---------- */
.grid--5 { grid-template-columns: repeat(5, 1fr); }
.card--compact { align-items: flex-start; padding: 26px 22px; }
.card--compact h3 { font-size: 1.2rem; margin: 0; }
.card--compact .card__icon { margin-bottom: 16px; }
.motto { margin: 8px 0 0; font: 700 1.5rem/1.2 var(--font-head); color: var(--gold) !important; }
.section--navy .link-arrow { color: var(--gold); }
.contact-page .split { align-items: start; }
@media (max-width: 1080px) { .grid--5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .grid--5 { grid-template-columns: 1fr 1fr; } }

/* ---------- Header: menu button + logo | services | Contact ---------- */
.site-header__left { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.site-logo__tag { white-space: nowrap; }
.drawer-toggle { margin-left: -8px; }
.nav .menu--flat { gap: 0; }
.nav .menu--flat a { position: relative; padding: 10px 12px; font-size: .92rem; white-space: nowrap; }
.nav .menu--flat a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; background: var(--gold); transform: scaleX(0); transition: transform .2s; }
.nav .menu--flat a:hover::after, .nav .menu--flat .current-menu-item > a::after { transform: scaleX(1); }
.nav .menu--flat .current-menu-item > a { color: var(--navy); }
.header-cta { padding: 11px 22px; }
.header-cta[aria-current] { background: var(--navy); border-color: var(--navy); }
@media (max-width: 1320px) { .site-header .site-logo__tag { display: none; } }
@media (max-width: 1180px) { .site-header .nav { display: none; } }
@media (max-width: 420px) { .header-cta { padding: 10px 16px; } }

/* ---------- Left sidebar ---------- */
.drawer { position: fixed; inset: 0; z-index: 200; visibility: hidden; transition: visibility 0s .3s; }
.drawer.is-open { visibility: visible; transition: none; }
.drawer__overlay { position: absolute; inset: 0; background: rgba(11, 43, 75, .45); opacity: 0; transition: opacity .3s; }
.drawer.is-open .drawer__overlay { opacity: 1; }
.drawer__panel { position: absolute; top: 0; bottom: 0; left: 0; width: min(380px, 88vw); display: flex; flex-direction: column; gap: 28px; padding: 22px 26px 30px; background: var(--white); overflow-y: auto; box-shadow: 20px 0 50px rgba(11, 43, 75, .18); transform: translateX(-100%); transition: transform .3s ease; }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.drawer__head .site-logo img { height: 42px; }
.drawer__head .site-logo__name { font-size: 1.35rem; }
.drawer__title { font: 700 .74rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: 12px; }
.drawer__links { list-style: none; margin: 0; padding: 0; }
.drawer__links a { display: flex; align-items: center; gap: 14px; padding: 11px 12px; margin: 0 -12px; border-radius: 10px; color: var(--navy); font-weight: 600; text-decoration: none; }
.drawer__links a:hover { background: var(--sand-light); }
.drawer__links a[aria-current] { background: var(--sand-light); box-shadow: inset 3px 0 0 var(--gold); }
.drawer__links svg { width: 20px; height: 20px; flex: none; color: var(--gold-dark); }
.drawer__sublinks { list-style: none; margin: 2px 0 8px 21px; padding: 0 0 0 18px; border-left: 1px solid var(--line); }
.drawer__sublinks a { padding: 8px 12px; font-weight: 500; font-size: .93rem; line-height: 1.35; }
.drawer .search-form { flex-wrap: wrap; }
.drawer .search-form .btn { padding: 12px 18px; }
.drawer__contact .contact-list { margin: 0; gap: 12px; font-size: .92rem; }
.drawer__contact .contact-list a { color: var(--navy); }
.drawer__contact .contact-list a:hover { color: var(--gold-dark); }
.drawer__contact .contact-list svg { color: var(--gold-dark); width: 18px; height: 18px; }
.drawer__motto { margin: auto 0 0; padding-top: 20px; border-top: 1px solid var(--line); font: 700 1.2rem/1.3 var(--font-head); color: var(--navy); }
