/*
Theme Name: Dabilien Hannover
Theme URI: https://maklerteam-hannover.de/
Author: Dabilien Immobilienagentur
Description: Theme für die Hannover-Seiten der Dabilien Immobilienagentur (Daoud Immobilienservice GmbH): Startseite, Verkauf, Bewertung, 13 Stadtteil-Seiten, Kontaktformular mit Anfragen-Statistik.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: dabilien
*/

/* WordPress-Ergänzungen */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
body.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .site-header { top: 46px; } }
.wp-block-html { margin: 0; }

/* ==========================================================
   Daoud Immobilien – Immobilienmakler Hannover
   Keine externen Fonts (DSGVO-freundlich, schneller Ladezeit)
   ========================================================== */

:root {
  --green-900: #062239;
  --green-800: #0a3658;
  --green-700: #0f4c7a;
  --green-100: #e6eef6;
  --brass: #e3a924;
  --brass-dark: #9a6a0c;
  --paper: #f8f7f3;
  --white: #ffffff;
  --ink: #14202b;
  --muted: #55606b;
  --line: #e1e3e6;
  --radius: 14px;
  --shadow: 0 18px 40px -22px rgba(6, 34, 57, .45);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}
img, svg { max-width: 100%; display: block; }
a { color: var(--green-700); }
a:hover { color: var(--brass-dark); }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  color: var(--green-900);
  margin: 0 0 .6em;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--white { background: var(--white); }
.section--green { background: var(--green-900); color: #e3ebf3; }
.section--green h2, .section--green h3 { color: var(--white); }
.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brass-dark);
  margin-bottom: 14px;
}
.section--green .eyebrow { color: var(--brass); }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 680px; }
.section--green .lead { color: #b4c4d4; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--brass); color: var(--white); padding: 8px 14px; z-index: 100;
}
.skip-link:focus { left: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 650;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background .2s, color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--brass); color: var(--white); }
.btn--primary:hover { background: var(--brass-dark); color: var(--white); }
.btn--ghost { border-color: currentColor; color: var(--white); }
.btn--ghost:hover { background: var(--white); color: var(--green-900); }
.btn--dark { background: var(--green-800); color: var(--white); }
.btn--dark:hover { background: var(--green-900); color: var(--white); }

/* ---------- Header ---------- */
.topbar {
  background: var(--green-900);
  color: #b4c4d4;
  font-size: .85rem;
}
.topbar .container { display: flex; justify-content: space-between; gap: 16px; padding-top: 7px; padding-bottom: 7px; flex-wrap: wrap; }
.topbar a { color: var(--white); text-decoration: none; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--green-900); }
.logo svg { width: 38px; height: 38px; }
.logo strong { font-family: var(--serif); font-size: 1.35rem; display: block; line-height: 1; }
.logo small { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

.nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.nav a {
  display: block; padding: 9px 13px; border-radius: 8px;
  text-decoration: none; color: var(--ink); font-weight: 550; font-size: .97rem;
}
.nav a:hover, .nav a[aria-current="page"] { background: var(--green-100); color: var(--green-900); }
.nav .btn { padding: 10px 20px; margin-left: 8px; color: var(--white); }
.nav .btn:hover { background: var(--brass-dark); color: var(--white); }

.nav-toggle {
  display: none; background: none; border: 0; padding: 10px; cursor: pointer;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--green-900); margin: 5px 0; transition: .25s; }

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; left: 0; right: 0; top: 76px;
    background: var(--paper); border-bottom: 1px solid var(--line);
    display: none; padding: 12px 20px 22px;
  }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; }
  .nav .btn { margin: 10px 0 0; justify-content: center; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(ellipse at 85% 10%, rgba(227, 169, 36, .22), transparent 55%),
    linear-gradient(160deg, var(--green-800), var(--green-900) 70%);
  color: #e3ebf3;
  overflow: hidden;
}
.hero .container { position: relative; z-index: 2; padding-top: clamp(70px, 10vw, 120px); padding-bottom: clamp(150px, 18vw, 230px); }
.hero h1 { color: var(--white); max-width: 820px; }
.hero h1 em { font-style: normal; color: var(--brass); }
.hero .lead { color: #c3d1de; font-size: 1.25rem; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.hero-skyline {
  position: absolute; left: 0; right: 0; bottom: -1px; z-index: 1;
  width: 100%; height: auto; color: var(--paper);
}
.hero--small .container { padding-bottom: clamp(110px, 13vw, 170px); }

.trust {
  display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 38px; padding: 0; list-style: none;
  font-size: .95rem; color: #c3d1de;
}
.trust li::before { content: "✓"; color: var(--brass); font-weight: 700; margin-right: 8px; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: .88rem; margin-bottom: 18px; color: #9db1c4; }
.breadcrumb a { color: #e3ebf3; }

/* ---------- Grids & 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); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card .icon {
  width: 52px; height: 52px; border-radius: 12px;
  background: var(--green-100); color: var(--green-700);
  display: grid; place-items: center; margin-bottom: 18px;
}
.card .icon svg { width: 26px; height: 26px; }
.card p:last-child { margin-bottom: 0; }
.card-link { font-weight: 650; text-decoration: none; }
.card-link::after { content: " →"; }

.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.panel {
  background: var(--green-800);
  border-radius: 22px;
  padding: clamp(28px, 4vw, 44px);
  color: #e3ebf3;
  box-shadow: var(--shadow);
}
.panel h3 { color: var(--white); }

/* ---------- Steps ---------- */
.steps { counter-reset: step; display: grid; gap: 18px; padding: 0; margin: 0; list-style: none; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 22px 24px 22px 80px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 22px; top: 20px;
  font-family: var(--serif); font-size: 1.7rem; color: var(--brass);
}
.steps h3 { margin-bottom: .3em; font-size: 1.15rem; }
.steps p { margin: 0; color: var(--muted); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; text-align: center; }
@media (max-width: 640px) { .stats { grid-template-columns: 1fr; gap: 28px; } }
.stat strong { display: block; font-family: var(--serif); font-size: clamp(2rem, 4vw, 2.8rem); color: var(--brass); line-height: 1.1; }
.stat span { font-size: .95rem; color: #b4c4d4; }

/* ---------- Districts ---------- */
.district-tags { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; list-style: none; margin: 26px 0 0; }
.district-tags a {
  display: inline-block; padding: 8px 16px; border-radius: 999px;
  background: var(--white); border: 1px solid var(--line);
  text-decoration: none; color: var(--green-800); font-weight: 550; font-size: .95rem;
}
.district-tags a:hover { background: var(--green-800); color: var(--white); border-color: var(--green-800); }

.district { scroll-margin-top: 100px; }
.district h3 { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.district h3 small { font-family: var(--sans); font-size: .8rem; font-weight: 600; color: var(--brass-dark); letter-spacing: .05em; }

/* ---------- Checklist ---------- */
.checklist { list-style: none; padding: 0; margin: 0 0 1em; }
.checklist li { position: relative; padding-left: 32px; margin-bottom: 12px; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 6px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--brass) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/11px no-repeat;
}

/* ---------- FAQ ---------- */
.faq { max-width: 860px; margin: 40px auto 0; }
.faq details {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); margin-bottom: 12px; padding: 0 24px;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 30px 20px 0; position: relative;
  font-weight: 650; font-size: 1.06rem; color: var(--green-900);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 14px; font-size: 1.6rem; color: var(--brass); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 6px; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.form label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.form input, .form select, .form textarea {
  width: 100%; padding: 13px 15px; font: inherit; font-size: 1rem;
  border: 1px solid #c9ced4; border-radius: 10px; background: var(--white); color: var(--ink);
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--brass); border-color: var(--brass); }
.form textarea { min-height: 130px; resize: vertical; }
.form .consent { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; font-weight: 400; color: var(--muted); }
.form .consent input { width: auto; margin-top: 4px; }
.panel .form label { color: #e3ebf3; }
.panel .form .consent { color: #b4c4d4; }
.panel .form .consent a { color: var(--white); }
.form-note { font-size: .85rem; color: var(--muted); margin: 0; }
.form-success { display: none; padding: 16px; border-radius: 10px; background: var(--green-100); color: var(--green-900); font-weight: 600; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--brass-dark), var(--brass));
  color: var(--white); border-radius: 22px;
  padding: clamp(32px, 5vw, 56px);
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.cta-band h2 { color: var(--white); margin-bottom: .2em; }
.cta-band p { margin: 0; opacity: .92; }

/* ---------- Prose (Rechtstexte, Ratgeber) ---------- */
.prose { max-width: 780px; }
.prose h2 { font-size: 1.6rem; margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }
.placeholder { background: #fff3cf; padding: 0 4px; border-radius: 4px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-900); color: #a7b8c9; font-size: .95rem; padding: 64px 0 28px; }
.site-footer h4 { color: var(--white); font-family: var(--serif); font-size: 1.1rem; margin: 0 0 14px; font-weight: 600; }
.site-footer a { color: #e3ebf3; text-decoration: none; }
.site-footer a:hover { color: var(--brass); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 34px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); margin-top: 44px; padding-top: 22px;
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: .85rem;
}
.site-footer .logo { color: var(--white); margin-bottom: 14px; }
.site-footer .logo small { color: #a7b8c9; }

/* ---------- Mobile call button ---------- */
.call-fab {
  display: none; position: fixed; right: 16px; bottom: 16px; z-index: 60;
  background: var(--brass); color: var(--white); border-radius: 999px;
  padding: 14px 20px; font-weight: 700; text-decoration: none; box-shadow: var(--shadow);
}
@media (max-width: 760px) { .call-fab { display: inline-flex; gap: 8px; align-items: center; } }

/* ---------- Reveal animation ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
  .reveal.visible { opacity: 1; transform: none; }
}

/* ---------- Responsive Feinschliff (alle Endgeräte) ---------- */
html, body { overflow-x: hidden; }
h1, h2, h3, p, li, a, summary { overflow-wrap: break-word; }
@media (max-width: 760px) { h1, h2, h3, p, li, summary { hyphens: auto; -webkit-hyphens: auto; } }
@media (min-width: 641px) and (max-width: 960px) {
  .grid-3 > :last-child:nth-child(odd), .grid-4 > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
input, select, textarea, button { max-width: 100%; }
.nav-toggle { min-width: 44px; min-height: 44px; }
@media (max-width: 760px) {
  body { font-size: 1rem; padding-bottom: 76px; } /* Platz für Anruf-Button */
  .topbar { display: none; }
  .hero .lead { font-size: 1.08rem; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .card { padding: 24px; }
  .cta-band .btn { width: 100%; justify-content: center; }
  .steps li { padding: 18px 18px 18px 64px; }
  .steps li::before { left: 16px; font-size: 1.4rem; }
}
@media (max-width: 400px) {
  .container { padding: 0 16px; }
  .logo strong { font-size: 1.12rem; }
  .logo small { font-size: .62rem; letter-spacing: .08em; }
  .logo svg { width: 32px; height: 32px; }
  .faq details { padding: 0 16px; }
  .panel { border-radius: 16px; padding: 22px 18px; }
}
@media (min-width: 761px) and (max-width: 1024px) {
  .hero h1 { max-width: 100%; }
}

/* ---------- Markenfarben Dabilien: Gold-Flächen mit dunkler Schrift (Kontrast) ---------- */
.btn--primary, .nav .btn, .call-fab { color: var(--green-900); }
.btn--primary:hover, .nav .btn:hover { background: #c98f0f; color: var(--green-900); }
.cta-band { color: var(--green-900); background: linear-gradient(120deg, #d99b14, var(--brass)); }
.cta-band h2 { color: var(--green-900); }
.section--green .eyebrow, .hero h1 em { color: var(--brass); }
.stat strong { color: var(--brass); }

/* ---------- Logo-Bilder ---------- */
.logo img { display: block; height: 60px; width: auto; }
@media (max-width: 760px) { .logo img { height: 48px; } }
.site-footer .logo img { height: 60px; }
@media (max-width: 400px) { .logo img { height: 42px; } }

/* ---------- Stadtteil-Seiten ---------- */
.split--top { align-items: start; }
@media (min-width: 861px) { .split--top aside .panel { position: sticky; top: 100px; } }
.price-tag { font-size: .95rem; color: var(--muted); }
.price-tag strong { color: var(--green-800); }
.price-box {
  margin-top: 26px; padding: 22px 24px; border-radius: var(--radius);
  background: var(--green-100); border-left: 4px solid var(--brass);
}
.price-box span { display: block; font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.price-box strong { display: block; font-family: var(--serif); font-size: 2.2rem; color: var(--green-900); line-height: 1.2; }
.price-box small { display: block; font-size: .82rem; color: var(--muted); margin-top: 6px; }
.source-note { font-size: .85rem; color: var(--muted); margin-top: 22px; }

/* Spam-Schutz-Feld unsichtbar */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-error { display: none; padding: 16px; border-radius: 10px; background: #fde8e8; color: #8a1c1c; font-weight: 600; }

/* Anliegen-Auswahl */
.choice { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.choice legend { font-weight: 600; font-size: .92rem; margin-bottom: 8px; padding: 0; }
.choice label { margin: 0; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span {
  display: flex; align-items: center; justify-content: center; text-align: center; min-height: 52px;
  padding: 10px 8px; border-radius: 10px; border: 1px solid #c9ced4; background: var(--white);
  color: var(--ink); font-weight: 600; font-size: .92rem; line-height: 1.25; transition: .15s;
}
.choice input:checked + span { background: var(--brass); border-color: var(--brass); color: var(--green-900); }
.choice input:focus-visible + span { outline: 2px solid var(--white); outline-offset: 2px; }
.panel .choice legend { color: #e3ebf3; }
.opt { font-weight: 400; opacity: .7; }
@media (max-width: 420px) { .choice { grid-template-columns: 1fr; } .choice span { min-height: 44px; } }

/* ---------- Stadtteil-Fotos ---------- */
.hero--photo { background: var(--green-900); }
.hero--photo .hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center; z-index: 0;
}
.hero--photo .hero-shade {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(100deg, rgba(6, 34, 57, .92) 0%, rgba(6, 34, 57, .78) 45%, rgba(6, 34, 57, .35) 100%);
}
.hero--photo .container { position: relative; z-index: 2; }
.hero--photo .hero-skyline { z-index: 2; }
@media (max-width: 760px) {
  .hero--photo .hero-shade { background: linear-gradient(180deg, rgba(6, 34, 57, .80), rgba(6, 34, 57, .92)); }
}
.photo-credit {
  font-size: .78rem; color: var(--muted); text-align: right;
  margin: 10px auto 0; padding-top: 0; padding-bottom: 0;
}
.photo-credit a { color: var(--muted); }

.card--img { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.card--img .card-img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .4s ease; }
.card--img:hover .card-img { transform: scale(1.03); }
.card--img > a { display: block; overflow: hidden; }
.card--img .card-body { padding: 26px 28px 28px; }
@media (max-width: 760px) { .card--img .card-body { padding: 22px; } }

.credits { padding-left: 1.2em; font-size: .92rem; }
.credits li { margin-bottom: 6px; }

/* Startseite: Rathauskuppel sichtbar halten */
.hero--photo .hero-bg[src*="seiten/start"] { object-position: center 20%; }
