/*
Theme Name: CwC Berlin Onepager
Theme URI: https://cwc-immobilien.berlin
Author: Erol Likos
Description: Onepager-Theme für cwc-immobilien.berlin auf Basis der Unternehmenspräsentation: Ankernavigation, Header-Foto, Sektionen, Google-Bewertungen (Places API), Bezirksseiten, Kontaktformular (Plugin cwc-kontakt).
Version: 2.0.5
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cwc-berlin
*/

/* ---------- Schriften (self-hosted, SIL OFL; metrische Klone von Cambria/Calibri) ---------- */
@font-face { font-family: 'Caladea'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/fonts/caladea-400.woff2') format('woff2'); }
@font-face { font-family: 'Caladea'; font-style: normal; font-weight: 700; font-display: swap; src: url('assets/fonts/caladea-700.woff2') format('woff2'); }
@font-face { font-family: 'Caladea'; font-style: italic; font-weight: 400; font-display: swap; src: url('assets/fonts/caladea-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'Carlito'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/fonts/carlito-400.woff2') format('woff2'); }
@font-face { font-family: 'Carlito'; font-style: normal; font-weight: 700; font-display: swap; src: url('assets/fonts/carlito-700.woff2') format('woff2'); }
@font-face { font-family: 'Carlito'; font-style: italic; font-weight: 400; font-display: swap; src: url('assets/fonts/carlito-400-italic.woff2') format('woff2'); }

/* ---------- Tokens ---------- */
:root {
	--navy: #15263b; --navy2: #1e3450; --navy3: #24405f;
	--gold: #c39a4e; --gold2: #d8b877;
	--cream: #f7f5f0; --line: #e4e0d6;
	--text: #222; --muted: #5b6470; --on-dark: #c9d3de;
	--serif: 'Caladea', Cambria, Georgia, serif;
	--sans: 'Carlito', Calibri, 'Segoe UI', Arial, sans-serif;
	--bar: 70px; --max: 1200px; --pad: 30px;
	--cwc-navy: var(--navy); --cwc-gold: var(--gold);
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar) + 10px); }
body { margin: 0; font-family: var(--sans); font-size: 18px; line-height: 1.55; color: var(--text); background: #fff; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.2; margin: 0 0 .5em; color: var(--navy); }
h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.kicker { font-family: var(--sans); font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); font-weight: 700; margin-bottom: .8em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 720px; }
.mt { margin-top: 40px; }
.sec { padding: 90px 0; }
.sec-cream { background: var(--cream); }
.sec-dark { background: var(--navy); color: var(--on-dark); }
.sec-dark h2, .sec-dark h3 { color: #fff; }
.sec-dark .lead { color: var(--on-dark); }
.sec-dark .kicker { color: var(--gold2); }
.sec-dark a { color: #fff; }
.grid { display: grid; gap: 28px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .g3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .g2, .g3 { grid-template-columns: 1fr; } .sec { padding: 60px 0; } :root { --pad: 18px; } }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Kopfleiste + Ankernavigation ---------- */
.bar { position: sticky; top: 0; z-index: 20; height: var(--bar); background: #fff; border-bottom: 1px solid var(--line); }
.admin-bar .bar { top: 32px; }
.bar .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo { font-family: var(--sans); font-size: 28px; font-weight: 700; color: #444; text-decoration: none; white-space: nowrap; letter-spacing: .1px; }
.logo span { font-weight: 400; }
.nav { display: flex; gap: 26px; }
.nav a { text-decoration: none; color: var(--navy); font-size: 1rem; letter-spacing: .02em; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a:focus { border-color: var(--gold); }
.burger { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; padding: 0; }
.burger span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px auto; }
@media (max-width: 1080px) {
	.nav { display: none; position: absolute; top: var(--bar); left: 0; right: 0; background: var(--navy); flex-direction: column; gap: 0; padding: 10px 0 16px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
	.nav a { color: #fff; padding: 12px var(--pad); border: 0; }
	.nav.open { display: flex; }
	.burger { display: block; }
	.logo { font-size: 24px; }
}
@media (max-width: 782px) { .admin-bar .bar { top: 46px; } }

/* ---------- Hero ---------- */
.hero { position: relative; height: 60vh; min-height: 420px; background: var(--navy2) center/cover no-repeat; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(21,38,59,.05) 30%, rgba(21,38,59,.75) 100%); }
.hero .wrap { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 50px; }
.hero .kicker { color: var(--gold2); }
.hero h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3.4rem); margin: 0 0 .2em; text-shadow: 0 2px 20px rgba(0,0,0,.4); }
.hero p { color: #fff; font-size: clamp(1.1rem, 2vw, 1.5rem); margin: 0; font-family: var(--serif); font-style: italic; text-shadow: 0 1px 10px rgba(0,0,0,.4); }
.hero .cta { margin-top: 24px; display: flex; gap: 14px; flex-wrap: wrap; }
.btn { display: inline-block; font-family: var(--sans); font-weight: 700; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; padding: 14px 28px; border-radius: 4px; text-decoration: none; border: 1px solid var(--gold); background: var(--navy); color: var(--gold2); transition: .2s; cursor: pointer; line-height: 1.2; }
.btn:hover, .btn:focus { background: var(--gold); color: var(--navy); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover, .btn-gold:focus { background: var(--gold2); color: var(--navy); }

/* ---------- Kennzahlen ---------- */
.facts { background: var(--navy2); color: #fff; }
.facts .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: 28px 20px; text-align: center; border-left: 1px solid rgba(255,255,255,.08); }
.fact:first-child { border: 0; }
.fact b { display: block; font-family: var(--serif); font-size: 2.2rem; color: var(--gold2); line-height: 1.1; }
.fact span { font-size: .95rem; color: var(--on-dark); }
@media (max-width: 700px) { .facts .wrap { grid-template-columns: repeat(2, 1fr); } .fact:nth-child(3) { border: 0; } }

/* ---------- Wer wir sind ---------- */
.about .grid { grid-template-columns: 1.1fr .9fr; align-items: start; }
.about .side { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--gold); padding: 26px 28px; }
.about .side h3 { margin-top: 0; }
.about .side ul { margin: 0; padding-left: 1.1em; }
.about .side li { margin-bottom: .4em; }
@media (max-width: 800px) { .about .grid { grid-template-columns: 1fr; } }

/* ---------- Berater ---------- */
.berater .grid { grid-template-columns: 360px 1fr; align-items: start; gap: 48px; }
.card-person { background: var(--cream); padding: 22px 22px 26px; text-align: center; border-radius: 6px; }
.card-person img { border-radius: 50%; width: 220px; height: 220px; object-fit: cover; object-position: 50% 15%; margin: 0 auto 16px; }
.card-person h3 { margin: 0; font-size: 1.5rem; }
.card-person .role { color: var(--gold); font-weight: 700; }
.card-person .team { font-size: .95rem; color: var(--muted); margin-top: 14px; }
.feature { display: flex; gap: 18px; align-items: flex-start; padding: 18px 0; border-bottom: 1px solid var(--line); }
.feature:last-child { border: 0; }
.ico { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--gold); color: var(--navy); display: grid; place-items: center; }
.ico svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { margin: 0 0 .2em; font-size: 1.15rem; }
.feature p { margin: 0; color: var(--muted); }
@media (max-width: 800px) { .berater .grid { grid-template-columns: 1fr; } .card-person { max-width: 360px; margin: 0 auto; } }

/* ---------- Ingenieur-Vorteil ---------- */
.vorteil .col { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 6px; padding: 26px; }
.vorteil h3 { color: var(--gold2); font-size: 1.1rem; margin-bottom: .8em; }
.check { list-style: none; margin: 0; padding: 0; }
.check li { position: relative; padding-left: 28px; margin-bottom: .7em; color: #fff; }
.check li::before { content: ''; position: absolute; left: 0; top: .45em; width: 14px; height: 7px; border-left: 2px solid var(--gold2); border-bottom: 2px solid var(--gold2); transform: rotate(-45deg); }
.vorteil .foot { margin-top: 30px; text-align: center; font-size: .9rem; letter-spacing: .08em; color: var(--on-dark); }

/* ---------- Kacheln (Leistungen, Vermarktung) ---------- */
.tile { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 26px; display: flex; gap: 16px; align-items: flex-start; }
.tile h3 { margin: 0 0 .25em; font-size: 1.1rem; }
.tile p { margin: 0; color: var(--muted); font-size: 1rem; }
.sec-dark .tile { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.1); }
.sec-dark .tile p { color: var(--on-dark); }

/* ---------- Ablauf ---------- */
.steps { list-style: none; padding: 0; counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 40px; }
.step { position: relative; padding-left: 68px; }
.step::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 0; width: 50px; height: 50px; border-radius: 50%; background: var(--navy); color: var(--gold2); font-family: var(--serif); font-size: 1.4rem; font-weight: 700; display: grid; place-items: center; }
.step h3 { font-size: 1.1rem; margin: 6px 0 .3em; }
.step p { margin: 0; color: var(--muted); font-size: 1rem; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Referenzen ---------- */
.ref { background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.ref img { aspect-ratio: 3/2; object-fit: cover; width: 100%; }
.ref .body { padding: 18px 20px 20px; }
.badge { display: inline-block; font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; padding: 5px 10px; border-radius: 3px; background: var(--navy); color: var(--gold2); margin-bottom: 10px; }
.badge.gold { background: var(--gold); color: var(--navy); }
.ref h3 { font-size: 1.05rem; margin: 0 0 .4em; }
.ref .loc { color: var(--gold); font-weight: 700; font-size: .95rem; }
.ref .facts-line { color: var(--muted); font-size: .95rem; }

/* ---------- Bewertungen ---------- */
.rating { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; margin-bottom: 36px; }
.rating .score { font-family: var(--serif); font-size: 4rem; font-weight: 700; color: var(--navy); line-height: 1; }
.stars { color: var(--gold); font-size: 1.6rem; letter-spacing: .1em; display: block; line-height: 1.2; }
.rating .txt { color: var(--muted); }
.rating .txt strong { color: var(--navy); }
.review { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.review .head { display: flex; align-items: center; gap: 12px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: var(--gold2); font-weight: 700; display: grid; place-items: center; font-family: var(--serif); flex: none; }
.review .name { font-weight: 700; line-height: 1.1; }
.review .meta { font-size: .85rem; color: var(--muted); }
.review .stars { font-size: 1rem; }
.review q { font-family: var(--serif); font-style: italic; font-size: 1.05rem; quotes: '„' '“'; }
.review .src { font-size: .8rem; color: var(--muted); margin-top: auto; }
.google-note { font-size: .85rem; color: var(--muted); margin-top: 18px; }
.awards { margin-top: 60px; padding-top: 40px; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; align-items: start; }
.award { text-align: center; }
.award img { height: 90px; width: auto; margin: 0 auto 12px; object-fit: contain; }
.award b { display: block; color: var(--navy); }
.award span { font-size: .9rem; color: var(--muted); }
@media (max-width: 700px) { .awards { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Einsatzgebiet ---------- */
.area { border-radius: 6px; padding: 26px; border: 1px solid var(--line); background: #fff; }
.area.berlin { background: var(--navy); color: var(--on-dark); border-color: var(--navy); }
.area.berlin h3 { color: #fff; }
.area h3 { display: flex; align-items: center; gap: 10px; }
.area .pin { width: 34px; height: 34px; border-radius: 50%; background: var(--gold); display: grid; place-items: center; color: var(--navy); flex: none; }
.area .pin svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.area ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 20px; }
.area li { margin-bottom: .35em; break-inside: avoid; }
.area.berlin ul { columns: 1; }
.area.berlin a { color: #fff; text-decoration: none; border-bottom: 1px solid var(--gold); }
.area.berlin a:hover { color: var(--gold2); }
.area.berlin .intro { margin: 0 0 6px; }
.area.berlin .foot { font-size: .9rem; margin: 14px 0 0; }
.orte { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.ort { position: relative; border-radius: 6px; overflow: hidden; background: var(--navy2); min-height: 160px; }
.ort img { aspect-ratio: 3/2; object-fit: cover; width: 100%; }
.ort a { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 18px; color: #fff; text-decoration: none; font-family: var(--serif); font-size: 1.4rem; font-weight: 700; background: linear-gradient(0deg, rgba(21,38,59,.85), rgba(21,38,59,0) 60%); }
.ort a small { display: block; font-family: var(--sans); font-weight: 400; font-size: .85rem; color: var(--gold2); letter-spacing: .1em; text-transform: uppercase; }
.ort-start a { position: static; aspect-ratio: 3/2; background: var(--navy); }
@media (max-width: 700px) { .orte { grid-template-columns: 1fr; } }

/* ---------- Kontakt ---------- */
.kontakt .grid { grid-template-columns: 1fr 1fr; gap: 50px; }
.kontakt dl { margin: 30px 0 0; display: grid; grid-template-columns: 130px 1fr; gap: 8px 16px; }
.kontakt dt { color: var(--gold2); font-weight: 700; font-size: .95rem; }
.kontakt dd { margin: 0; color: #fff; }
.form { background: #fff; border-radius: 6px; padding: 28px; color: var(--text); }
.form a { color: var(--navy); }
@media (max-width: 800px) { .kontakt .grid { grid-template-columns: 1fr; } }

/* Kontaktformular (Plugin cwc-kontakt) */
.cwck { --cwck-accent: var(--navy); }
.cwck label { display: block; font-size: .9rem; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.cwck input:not([type="checkbox"]), .cwck textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid #cfd4db; border-radius: 4px; margin-bottom: 14px; background: #fff; }
.cwck input:focus, .cwck textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.cwck textarea { min-height: 120px; }
.cwck .cwck-consent { display: flex; gap: 10px; align-items: flex-start; font-size: .85rem; color: var(--muted); margin-bottom: 16px; }
.cwck .cwck-consent input { width: auto; margin: 4px 0 0; }
.cwck .cwck-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cwck .cwck-msg { padding: 12px 14px; border-radius: 4px; margin-bottom: 16px; font-size: .95rem; }
.cwck .cwck-ok { background: #e8f3ea; color: #1f5a2c; border: 1px solid #b7dcc0; }
.cwck .cwck-err { background: #fbeaea; color: #7a1f1f; border: 1px solid #efc2c2; }
.cwck button { font: inherit; }

/* ---------- Footer ---------- */
.footer { background: var(--cream); padding: 50px 0 20px; font-size: .9em; border-top: 1px solid var(--line); }
.footer .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.footer address { font-style: normal; }
.footer p { margin: 0 0 12px; }
.footer a { color: var(--navy); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color .2s; }
.footer a:hover, .footer a:focus { color: var(--gold); }
.footer .links a { display: block; margin-bottom: 10px; }
.copy { text-align: center; letter-spacing: 1px; font-size: .8em; margin-top: 40px; color: var(--muted); }
@media (max-width: 640px) { .footer .cols { grid-template-columns: 1fr; } }

/* ---------- Textseiten (Impressum, Datenschutz) ---------- */
.cwc-page { max-width: 900px; margin: 40px auto 60px; padding: 0 var(--pad); }
.cwc-page h1 { font-size: 2em; margin: 0 0 .8em; }
.cwc-page h2 { font-size: 1.4em; margin: 1.4em 0 .6em; }
.cwc-page h3 { font-size: 1.15em; }
.cwc-page a { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }

/* ---------- Bezirksseiten (Inhalt aus dem alten Theme: .fq-hero, .cwc-sticky-parent, .mri-padded, .wp-caption) ---------- */
.bezirk-inhalt .fq-hero { position: relative; height: 50vh; min-height: 340px; overflow: hidden; background: var(--navy2); }
.bezirk-inhalt .fq-hero p { margin: 0; height: 100%; }
.bezirk-inhalt .fq-hero-img { width: 100%; height: 100%; object-fit: cover; }
.bezirk-inhalt .fq-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(21,38,59,.05) 30%, rgba(21,38,59,.75) 100%); }
.bezirk-inhalt .cwc-hero-overlay { position: absolute; z-index: 1; left: 0; right: 0; bottom: 40px; margin: 0 auto; max-width: var(--max); padding: 0 var(--pad); color: #fff; font-size: clamp(1.3rem, 2.5vw, 1.9rem); font-weight: 400; text-shadow: 0 2px 20px rgba(0,0,0,.4); }
.bezirk-inhalt .cwc-hero-overlay a { color: #fff; text-decoration: none; }
.bezirk-inhalt .cwc-hero-overlay br { display: none; }
.bezirk-inhalt .cwc-hero-overlay strong { display: block; font-size: clamp(2rem, 4.5vw, 3.2rem); line-height: 1.15; margin-top: .2em; }
.bezirk-inhalt .cwc-scroll-down { display: none; }
.bezirk-inhalt .cwc-sticky-parent { max-width: var(--max); margin: 0 auto; padding: 50px var(--pad) 70px; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 60px; align-items: start; }
.bezirk-inhalt article { min-width: 0; }
.bezirk-inhalt article section { margin-bottom: 50px; }
.bezirk-inhalt article section > p { margin: 0 0 1em; }
.bezirk-inhalt h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin: 0 0 .6em; }
.bezirk-inhalt .wp-caption { width: auto !important; max-width: 100%; margin: 24px 0 28px; }
.bezirk-inhalt .wp-caption img { width: 100%; border-radius: 6px; }
.bezirk-inhalt .wp-caption-text { font-size: .85rem; color: var(--muted); margin: 8px 0 0; font-style: italic; }
.bezirk-inhalt article a { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
.bezirk-inhalt aside { padding-top: 0 !important; }
.bezirk-inhalt aside > div { position: sticky; top: calc(var(--bar) + 20px) !important; padding: 26px !important; background: var(--cream); border: 1px solid var(--line); border-radius: 6px; }
.bezirk-inhalt aside h2 { font-size: 1.3rem; }
.bezirk-inhalt aside .wp-caption { margin: 0 0 16px; }
.bezirk-inhalt aside .wp-caption img { border-radius: 50%; width: 160px; height: 160px; object-fit: cover; object-position: 50% 15%; margin: 0 auto; }
.bezirk-inhalt aside .wp-caption-text { text-align: center; }
.bezirk-inhalt aside p { font-size: 1rem; }
.bezirk-inhalt aside a[href^="tel"] { font-family: var(--serif); font-size: 1.2rem !important; color: var(--navy); letter-spacing: 0; }
@media (max-width: 900px) {
	.bezirk-inhalt .cwc-sticky-parent { grid-template-columns: 1fr; gap: 30px; }
	.bezirk-inhalt aside > div { position: static !important; }
}
