/* CAVARO Immobilien – Basis-Styles
   Farben:  Blau #1b1b57 · Text #23232f · Grau-Text #3d3d4d / #5b5b6e · Fläche #F7F7F8 · Linien #ececf0 / #dcdce3
   Schriften: Cormorant Garamond (Überschriften), Sora (Fließtext), DM Mono (Labels, Menü, Buttons)
   Die Abschnitts-Styles stehen in blocks.css (1:1 aus dem HTML-Entwurf). */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #FFFFFF; }
img { max-width: 100%; }

a { color: #1b1b57; text-decoration: none; }
a:hover { color: #3a3a8a; }

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #1b1b57;
  outline-offset: 3px;
}
input:focus, select:focus, textarea:focus { border-color: #1b1b57 !important; }

/* Abstände: generierte Abschnitte setzen ihre Abstände selbst */
body .cv-g { margin-block-start: 0; }
body .cv-linkwrap { margin: 0; }
body .cv-main { margin: 0; }
body .wp-site-blocks > * { margin-block-start: 0; }
body .wp-block-post-content > * { margin-block-start: 0; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

/* ---------- Header ---------- */
body .cv-site-header { background: #FFFFFF; border-bottom: 1px solid #ececf0; margin: 0; }
body .cv-header-inner {
  max-width: 1320px; margin: 0 auto; padding: 26px 24px 0;
  display: flex; flex-direction: column; align-items: center; gap: 18px; position: relative;
}
.cv-logo { display: flex; align-items: center; gap: 14px; }
.cv-logo img { display: block; width: auto; mix-blend-mode: multiply; }
.cv-logo-icon { height: 46px; }
.cv-logo-word { height: 20px; }

/* Hauptnavigation (core/navigation) im Stil des Entwurfs */
body .cv-nav-main {
  font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  gap: 0 40px; margin: 0;
}
body .cv-nav-main .wp-block-navigation__container { gap: 0 40px; justify-content: center; }
body .cv-nav-main .wp-block-navigation-item__content {
  display: inline-block; padding: 14px 0; border-bottom: 1px solid transparent; color: #1b1b57;
}
body .cv-nav-main .wp-block-navigation-item__content:hover { color: #3a3a8a; }
body .cv-nav-main .current-menu-item > .wp-block-navigation-item__content,
body .cv-nav-main .wp-block-navigation-item__content[aria-current="page"] { border-bottom-color: #1b1b57; }

/* Burger-Button und Handy-Menü */
body .cv-nav-main .wp-block-navigation__responsive-container-open,
body .cv-nav-main .wp-block-navigation__responsive-container-close { color: #1b1b57; }
body .cv-nav-main .wp-block-navigation__responsive-container-open { width: 48px; height: 48px; align-items: center; justify-content: center; }
/* Burger-Symbol wie im Entwurf: drei feine Linien */
body .cv-nav-main .wp-block-navigation__responsive-container-open svg { display: none; }
body .cv-nav-main .wp-block-navigation__responsive-container-open::before {
  content: ""; width: 24px; height: 16px;
  background:
    linear-gradient(currentColor, currentColor) top / 100% 1.2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 100% 1.2px no-repeat,
    linear-gradient(currentColor, currentColor) bottom / 100% 1.2px no-repeat;
}
body .cv-nav-main .wp-block-navigation__responsive-container.is-menu-open {
  background: #FFFFFF; color: #1b1b57; padding: 20px 24px calc(24px + env(safe-area-inset-bottom));
}
body .cv-nav-main .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
  padding-top: 64px; align-items: stretch;
}
body .cv-nav-main .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
  flex-direction: column; align-items: stretch; gap: 0; width: 100%; border-top: 1px solid #ececf0;
}
body .cv-nav-main .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { width: 100%; justify-content: center; }
body .cv-nav-main .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item .wp-block-navigation-item__content {
  display: block; width: 100%; text-align: center; padding: 20px 0 !important; font-size: 13px; letter-spacing: .18em; border-bottom: 1px solid #ececf0;
}
body .cv-nav-main .wp-block-navigation__responsive-container.is-menu-open .current-menu-item > .wp-block-navigation-item__content { border-bottom-color: #ececf0; background: #F7F7F8; }
body .cv-nav-main .wp-block-navigation__responsive-container-close { top: 22px; right: 18px; }
body .cv-nav-main .wp-block-navigation__responsive-container-close svg { width: 28px; height: 28px; }

@media (max-width: 760px) {
  body .cv-nav-main { position: absolute; right: 16px; top: 26px; }
  /* Burger schon ab 760 px statt WordPress-Standard 600 px – wie im Entwurf */
  body .cv-nav-main .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
  body .cv-nav-main .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
  .cv-topline { display: none; }
}

/* ---------- Brotkrumen ---------- */
.cv-crumbs a { color: inherit; }
.cv-crumbs a:hover { text-decoration: underline; text-underline-offset: 4px; }
.cv-crumbs-sep { margin: 0 10px; }

/* ---------- FAQ (core/details) ---------- */
body .cv-faq-item { margin: 0; }
body .cv-faq-item > summary {
  list-style: none; cursor: pointer; min-height: 44px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 24px 0; text-align: left;
  font-family: 'Cormorant Garamond', serif; font-weight: 400; font-size: 23px; line-height: 1.3; color: #1b1b57;
}
body .cv-faq-item > summary::-webkit-details-marker { display: none; }
body .cv-faq-item > summary::after {
  content: ""; flex: 0 0 14px; width: 14px; height: 14px;
  background:
    linear-gradient(currentColor, currentColor) center / 14px 1px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1px 14px no-repeat;
}
body .cv-faq-item[open] > summary::after {
  background: linear-gradient(currentColor, currentColor) center / 14px 1px no-repeat;
}
body .cv-faq-item > summary:hover { color: #3a3a8a; }

/* ---------- Kontaktformular ---------- */
.cv-form input, .cv-form select, .cv-form textarea { border-radius: 0; }
.cv-form button { transition: background-color .2s ease; }
.cv-form button:hover { background: #3a3a8a !important; }
.cv-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cv-form-notice { grid-column: 1 / -1; margin: 0; padding: 16px 20px; font-size: 14px; border-left: 2px solid #1b1b57; background: #FFFFFF; }
.cv-form-notice--error { border-left-color: #a3263b; }

/* ---------- Textseiten / Beiträge / Archiv ---------- */
body .cv-prose-page { padding: 110px 24px 150px; text-align: left; }
body .cv-prose-page > .cv-crumbs { display: block; text-align: center; font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: #5b5b6e; }
body .cv-prose-title { margin: 24px auto 56px; text-align: center; font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 400; font-size: clamp(40px, 5.4vw, 72px); line-height: 1.05; color: #1b1b57; }
body .cv-prose-date { font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: #5b5b6e; margin: -36px 0 40px; }
body .cv-prose { color: #3d3d4d; }
body .cv-prose h2 { margin-top: 2em; font-size: clamp(28px, 3vw, 40px); }
body .cv-prose h3 { margin-top: 1.6em; font-size: 26px; }
body .cv-prose a { text-decoration: underline; text-underline-offset: 4px; }
body .cv-prose ul, body .cv-prose ol { padding-left: 1.2em; }
body .cv-archive { padding: 110px 24px 150px; }
body .cv-eyebrow { margin: 0 0 22px; text-align: center; font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: #1b1b57; }
body .cv-archive-grid { gap: 48px 28px; }
body .cv-archive-title { margin: 24px 0 8px; font-size: 28px; line-height: 1.2; }
body .cv-archive-title a { color: #1b1b57; }
body .cv-archive-excerpt { color: #3d3d4d; }
body .cv-404 { text-align: center; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Kontaktseite: Kontaktzeile im Footer ausblenden – steht bereits oben auf der Seite */
body.page-kontakt .cv-footer-contact { display: none; }

/* Verlinkte Bilder (Partner-Logos): Link als Block, wie im Entwurf */
body .wp-block-image[class*="cv-img"] > a { display: block; }

/* =====================================================================
   UX-Feinschliff (Schritt 4) – Gestaltung bleibt, Bedienung wird besser
   ===================================================================== */

/* Lesbarkeit: keine einzelnen Wörter in der letzten Zeile */
h1, h2, h3, .wp-block-heading { text-wrap: balance; }
p { text-wrap: pretty; }

/* Touch: kein Doppeltipp-Zoom, dezentes Tipp-Feedback */
a, button, summary, input, select, textarea, label { touch-action: manipulation; }
html { -webkit-tap-highlight-color: rgba(27, 27, 87, 0.12); }

/* Sprungmarken nicht unter dem fixierten Header verstecken */
[id] { scroll-margin-top: 110px; }

/* Fixierter Header: bleibt beim Scrollen sichtbar und wird kompakter */
body .cv-header-part { position: sticky; top: 0; z-index: 100; margin: 0; }
body.admin-bar .cv-header-part { top: 32px; }
@media (max-width: 782px) { body.admin-bar .cv-header-part { top: 46px; } }
body .cv-site-header { transition: box-shadow .25s ease; }
body .cv-header-inner { transition: padding .25s ease, gap .25s ease; }
.cv-logo img { transition: height .25s ease; }
body .cv-topbar { background: #FFFFFF; }
body.cv-scrolled .cv-site-header { box-shadow: 0 1px 0 #ececf0, 0 8px 24px -18px rgba(27, 27, 87, .35); }
@media (min-width: 761px) {
  body.cv-scrolled .cv-header-inner { padding-top: 12px; gap: 4px; }
  body.cv-scrolled .cv-logo-icon { height: 34px; }
  body.cv-scrolled .cv-logo-word { height: 16px; }
}

/* Einheitliche Hover-Zustände für Text-Links (unterstrichene Links im Entwurf) */
body [class*="cv-link-"] { transition: color .2s ease, text-decoration-color .2s ease; text-decoration-color: currentColor; }
body [class*="cv-link-"]:hover { text-decoration-color: transparent; }
body .cv-btn-1, body .cv-btn-2, body .cv-btn-3, body a[class*="cv-btn-"] { transition: background-color .2s ease, color .2s ease; }

/* Leistungs-Kacheln: Foto reagiert dezent auf die Maus */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  body .wp-block-image[class*="cv-img"]:not(.cv-fullbleed) { overflow: hidden; }
  body .wp-block-image[class*="cv-img"]:not(.cv-fullbleed) img { transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
  body .wp-block-group:hover > .wp-block-image[class*="cv-img"]:not(.cv-fullbleed) img { transform: scale(1.03); }
}

/* Handy-Aktionsleiste: Anrufen / Anfrage – immer mit dem Daumen erreichbar */
.cv-actionbar { display: none; }
@media (max-width: 760px) {
  .cv-actionbar {
    display: grid; grid-template-columns: 1fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    background: #FFFFFF; border-top: 1px solid #ececf0; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); gap: 8px;
    box-shadow: 0 -8px 24px -18px rgba(27, 27, 87, .4);
  }
  .cv-actionbar a {
    display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px;
    font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
    border: 1px solid #1b1b57; color: #1b1b57;
  }
  .cv-actionbar a.is-primary { background: #1b1b57; color: #FFFFFF; }
  .cv-actionbar svg { width: 16px; height: 16px; flex: 0 0 auto; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  body .cv-topbar { display: none; }

  /* Hero: Text auf Fotos besser lesbar */
  body [class*="cv-overlay-"]::before { background-image: linear-gradient(to top, rgba(14, 14, 40, .55), rgba(14, 14, 40, 0) 70%); }

  /* Größere Tippflächen im Footer */
  body .cv-footer a { display: inline-block; padding-top: 8px !important; padding-bottom: 8px !important; }
  body .cv-footer [class*="cv-flex-"] > a { display: block; }

  /* Formular: mehr Platz für die Felder */
  body .cv-form { padding: 28px 20px !important; gap: 18px !important; }
  body .cv-form input:not([type="checkbox"]), body .cv-form select, body .cv-form textarea { font-size: 16px; } /* verhindert Zoom auf iOS */

  body .cv-form button[type="submit"] { width: 100%; }

  /* FAQ: Fragen etwas kompakter */
  body .cv-faq-item > summary { font-size: 21px; padding: 20px 0; }
}
