/*
Theme Name: ISV-BAUMANN
Theme URI: https://isv-baumann.de
Author: Sachverständigenbüro Baumann
Description: Schlichtes, Apple-inspiriertes Block-Theme für das Sachverständigenbüro Baumann. Alle Inhalte sind im Block-Editor bearbeitbar.
Version: 1.0.5
Requires at least: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: isv-baumann
*/

/* ---------- Grundlagen ---------- */
body { -webkit-font-smoothing: antialiased; }
h1, h2, h3 { text-wrap: balance; hyphens: auto; -webkit-hyphens: auto; }
p { text-wrap: pretty; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid #0066cc; outline-offset: 3px; border-radius: 6px; }

/* ---------- Kopfzeile ---------- */
.wp-site-blocks > header.wp-block-template-part { position: sticky; top: 0; z-index: 50; }
.admin-bar .wp-site-blocks > header.wp-block-template-part { top: 32px; }
.isv-header { background: rgba(251,251,253,.82); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid rgba(0,0,0,.08); }
.isv-header .isv-brand { font-size: 17px; font-weight: 700; letter-spacing: .06em; margin: 0; }
.isv-header .isv-brand a { color: #1d1d1f; text-decoration: none; }
.isv-header .isv-brand-sub { font-size: 12px; color: #6e6e73; margin: 0; letter-spacing: 0; }
.isv-header .wp-block-navigation { font-size: 13px; }
.isv-header .wp-block-navigation a { color: #1d1d1f; opacity: .85; }
.isv-header .wp-block-button__link { font-size: 13px; padding: 6px 15px; }

/* ---------- Abschnitte ---------- */
.isv-section { padding-top: clamp(72px, 9vw, 112px); padding-bottom: clamp(72px, 9vw, 112px); }
.isv-bg-light { background: #f5f5f7; }
.isv-center > :is(h1, h2, h3, p) { text-align: center; }
.isv-center > .wp-block-buttons { justify-content: center; }
.isv-eyebrow { font-size: 21px; font-weight: 600; color: #6e6e73; margin-bottom: 8px !important; }
.isv-lead { font-size: clamp(19px, 2vw, 24px); line-height: 1.38; max-width: 700px; margin-left: auto !important; margin-right: auto !important; }
.isv-sub { font-size: 21px; color: #6e6e73; max-width: 660px; margin-left: auto !important; margin-right: auto !important; }
.isv-muted { color: #6e6e73; }
.isv-small { font-size: 14px; color: #6e6e73; }

/* Hero */
.isv-hero { padding-top: clamp(56px, 8vw, 96px); }
.isv-hero h1 { max-width: 1000px; margin-left: auto; margin-right: auto; }
@keyframes isv-rise { from { opacity: 0; transform: translateY(32px); } to { opacity: 1; transform: none; } }
.isv-hero > * { animation: isv-rise 1s cubic-bezier(.2,.8,.2,1) both; }
.isv-hero > *:nth-child(2) { animation-delay: .12s; }
.isv-hero > *:nth-child(n+3) { animation-delay: .24s; }

/* Bilder */
.isv-img-round img, .isv-img-round { border-radius: 30px; }
.isv-img-wide img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; border-radius: 30px; }

/* Karten */
.isv-grid { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 20px !important; }
.isv-grid-wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.isv-card { position: relative; background: #fff; border-radius: 28px; padding: 36px 30px; }
.isv-bg-light .isv-card { background: #fff; }
:not(.isv-bg-light) > .isv-card.isv-on-white, .isv-card.isv-light { background: #f5f5f7; }
.isv-card h3 { margin-top: 0; }
.isv-card p { color: #6e6e73; }
.isv-card .isv-tag { font-size: 13px; font-weight: 600; color: #6e6e73; margin-bottom: 6px; }

/* Verlinkte Karte: ganze Fläche klickbar */
.isv-card-link { transition: transform .5s cubic-bezier(.2,.8,.2,1), box-shadow .5s cubic-bezier(.2,.8,.2,1); }
.isv-card-link h3 a { color: inherit; }
.isv-card-link h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.isv-card-link:hover { transform: translateY(-4px) scale(1.01); box-shadow: 0 18px 44px rgba(0,0,0,.10); }
.isv-card-link:hover h3 a { text-decoration: none; }
.isv-card-link .isv-more { color: #0066cc; margin-bottom: 0; }
.isv-card-link .isv-more::after { content: " ›"; display: inline-block; transition: transform .3s; }
.isv-card-link:hover .isv-more::after { transform: translateX(4px); }

/* Große Wege-Kacheln */
.isv-tile { border-radius: 30px; padding: clamp(36px, 5vw, 56px); transition: transform .6s cubic-bezier(.2,.8,.2,1), box-shadow .6s; }
.isv-tile:hover { transform: scale(1.01); box-shadow: 0 24px 60px rgba(0,0,0,.10); }
.isv-tile h2, .isv-tile h3 { font-size: clamp(32px, 3.6vw, 52px); }

/* Dunkle Flächen */
.isv-dark { background: #2b2d2f; color: #f5f5f7; border-radius: 30px; padding: clamp(56px, 8vw, 104px) clamp(24px, 4vw, 56px) !important; }
.isv-dark p { color: #c7c7cc; }
.isv-dark a { color: #64b5ff; }
.isv-dark .isv-card { background: #3a3c3f; }
.isv-dark .isv-card p { color: #c7c7cc; }
.isv-dark .isv-card .isv-tag { color: #64b5ff; }
.isv-tile.isv-dark { padding: clamp(36px, 5vw, 56px) !important; }

/* Ablauf mit automatischer Nummerierung */
.isv-steps { counter-reset: isvstep; }
.isv-step { counter-increment: isvstep; display: flex; flex-direction: column; background: #f5f5f7; border-radius: 28px; padding: 36px 30px 30px; }
.isv-step::before { content: counter(isvstep); display: block; font-size: 56px; line-height: 1; font-weight: 700; letter-spacing: -.03em; color: #0066cc; margin-bottom: 22px; }
.isv-step p { color: #6e6e73; }
.isv-step .isv-note { margin-top: auto; padding: 16px 18px; border-radius: 16px; background: #fff; color: #1d1d1f; font-size: 15px; line-height: 1.45; }

/* Hinweis-Kasten */
.isv-notice { background: #f5f5f7; border-radius: 28px; padding: 32px 40px 32px 104px !important; position: relative; }
.isv-notice::before { content: "!"; position: absolute; left: 36px; top: 34px; width: 48px; height: 48px; border-radius: 50%; background: #0066cc; color: #fff; font-size: 22px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.isv-notice p:first-child { font-size: 14px; font-weight: 600; color: #6e6e73; margin-bottom: 4px; }
.isv-notice p { font-size: 19px; }
@media (max-width: 600px) { .isv-notice { padding: 92px 24px 28px !important; } .isv-notice::before { left: 24px; top: 24px; } }

/* Checkliste */
ul.isv-check { list-style: none; padding-left: 0; }
ul.isv-check li { padding: 14px 0 14px 34px; border-bottom: 1px solid #d2d2d7; background: no-repeat 0 16px / 22px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230066cc' stroke-width='2'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }

/* Fragen (Details-Block) */
.isv-faq .wp-block-details { border-bottom: 1px solid #d2d2d7; padding: 0; margin: 0; }
.isv-faq .wp-block-details:first-of-type { border-top: 1px solid #d2d2d7; }
.isv-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 76px; font-size: 21px; font-weight: 600; }
.isv-faq summary::-webkit-details-marker { display: none; }
.isv-faq summary::after { content: "+"; font-size: 30px; font-weight: 300; color: #0066cc; transition: transform .3s; }
.isv-faq details[open] summary::after { transform: rotate(45deg); }
.isv-faq details p { color: #6e6e73; margin: 0 0 28px; }

/* Externe Links */
.isv-ext h3 a::after { content: ""; position: absolute; inset: 0; }
.isv-ext .isv-tag::after { content: " ↗"; }

/* Fußzeile */
.isv-footer { background: #fff; border-top: 1px solid #d2d2d7; font-size: 12px; color: #6e6e73; }
.isv-footer a { color: #424245; }
.isv-footer h2 { font-size: 12px; font-weight: 600; color: #1d1d1f; letter-spacing: 0; margin-bottom: 6px; }

/* Tabellen */
.wp-block-table { overflow-x: auto; }
.wp-block-table table { border-collapse: collapse; min-width: 520px; }
.wp-block-table td, .wp-block-table th { border: 0; border-top: 1px solid #d2d2d7; padding: 12px 16px 12px 0; text-align: left; vertical-align: top; }

/* Einblenden beim Scrollen entfernt (Version 1.0.5): Safari zeigte Inhalte teils nur blass oder gar nicht. */
@media (prefers-reduced-motion: reduce) { .isv-hero > * { animation: none; } .isv-card-link, .isv-tile { transition: none; } }

/* ---------- Ergänzungen ---------- */
.isv-image-band { padding-bottom: 8px; }
.isv-card .wp-block-image img, .isv-card .wp-block-image { border-radius: 20px; }
.isv-card .wp-block-image { margin-top: 24px; margin-bottom: 0; }
.isv-big { font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
.isv-big a { color: #1d1d1f; }
.wp-block-button.is-style-outline > .wp-block-button__link { background: transparent; color: #0066cc; border: 1px solid currentColor; }
.isv-dark .wp-block-button.is-style-outline > .wp-block-button__link { color: #f5f5f7; }
.isv-tile.isv-dark .isv-more { color: #64b5ff; }
.isv-tile .isv-tag { color: #a1a1a6; }
.isv-faq summary { padding: 0; }
.isv-faq .wp-block-details > *:not(summary) { margin-left: 0; }
.isv-section .isv-faq { max-width: 820px; margin-left: auto; margin-right: auto; text-align: left; }
.isv-section ul.isv-check { max-width: 820px; }

/* Rechenbeispiel Restnutzungsdauer */
.isv-calc { display: flex; flex-wrap: wrap; gap: 40px 64px; text-align: left; margin-top: 40px; }
.isv-calc-inputs { flex: 1 1 320px; display: flex; flex-direction: column; gap: 28px; }
.isv-calc-inputs label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: #a1a1a6; }
.isv-calc-inputs output { font-size: 30px; font-weight: 700; color: #f5f5f7; letter-spacing: -.02em; }
.isv-calc-inputs input[type=range] { width: 100%; min-height: 44px; accent-color: #f5f5f7; }
.isv-calc fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.isv-calc legend { font-size: 14px; color: #a1a1a6; margin-bottom: 10px; }
.isv-calc .isv-radio { flex-direction: row; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid #55575c; border-radius: 980px; color: #f5f5f7; font-size: 15px; cursor: pointer; }
.isv-calc .isv-radio:has(input:checked) { background: #f5f5f7; color: #1d1d1f; }
.isv-calc .isv-radio input { accent-color: #1d1d1f; }
.isv-calc-result { flex: 1 1 380px; background: #3a3c3f; border-radius: 28px; padding: 36px 32px; }
.isv-bar-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin-bottom: 22px; font-size: 15px; color: #a1a1a6; }
.isv-bar-row strong { color: #f5f5f7; }
.isv-bar { grid-column: 1 / -1; height: 14px; background: #4a4c50; border-radius: 980px; overflow: hidden; }
.isv-bar i { display: block; height: 100%; background: #86868b; border-radius: 980px; transition: width .5s cubic-bezier(.2,.8,.2,1); }
.isv-bar i.is-accent { background: #64b5ff; }
.isv-calc-label { margin: 28px 0 4px; padding-top: 24px; border-top: 1px solid #55575c; font-size: 15px; }
.isv-calc-gain { margin: 0; font-size: clamp(40px, 5vw, 60px); font-weight: 700; letter-spacing: -.03em; color: #64b5ff !important; line-height: 1.05; }

/* Mobile Feinheiten */
@media (max-width: 781px) {
  .isv-header .isv-brand-sub { display: none; }
  .isv-card { padding: 28px 24px; }
}
.isv-legal { padding-top: 0; }
.isv-legal h2 { font-size: 24px; margin-top: 40px; padding-top: 28px; border-top: 1px solid #d2d2d7; }
.isv-hero:not(.isv-center) h1 { margin-left: 0; }

/* Partner und Mitgliedschaften */
.isv-partners { display: flex !important; flex-wrap: wrap; justify-content: center; gap: 20px !important; }
.isv-partners .wp-block-image { margin: 0; width: 260px; max-width: 100%; height: 132px; padding: 24px 28px; background: #fff; border-radius: 22px; display: flex; align-items: center; justify-content: center; box-sizing: border-box; }
.isv-partners .wp-block-image img { max-height: 84px; width: auto; object-fit: contain; filter: grayscale(1); opacity: .75; transition: filter .4s, opacity .4s; border-radius: 0; }
.isv-partners .wp-block-image:hover img { filter: none; opacity: 1; }
/* Team und Qualifikationen */
ul.isv-team { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 16px; }
ul.isv-team li { font-size: 15px; color: #6e6e73; }
ul.isv-team strong { color: #1d1d1f; font-size: 17px; }
ul.isv-chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
ul.isv-chips li { padding: 8px 14px; border-radius: 980px; background: #fff; font-size: 14px; }
/* Fußzeile: Logo und Social Media */
.isv-footer-top { padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid #d2d2d7; }
.isv-footer-top .wp-block-image img { width: 240px; height: auto; }
.isv-footer-top .wp-block-button__link { font-size: 15px; padding: 9px 18px; }
ul.isv-cross { list-style: none; padding-left: 0; }
ul.isv-cross li { padding: 14px 0 14px 34px; border-bottom: 1px solid #d2d2d7; background: no-repeat 0 16px / 22px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b42318' stroke-width='2'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E"); }

/* ---------- Korrekturen nach Livetest (Version 1.0.1) ---------- */
/* Karten in Rastern sauber auf einer Linie (kein versetzter Abstand) */
.isv-grid > *, .isv-partners > *, .isv-steps > * { margin-block-start: 0 !important; }
/* Abschnittsüberschriften und Einleitung zentriert wie im Entwurf */
.isv-section:not(.isv-legal):not(#ueber-uns) > h2 { text-align: center; }
.isv-section:not(.isv-legal):not(#ueber-uns) > h2 + p { text-align: center; color: #6e6e73; font-size: clamp(19px, 2vw, 21px); max-width: 660px; margin-left: auto !important; margin-right: auto !important; }
.isv-section > ul.isv-check, .isv-section > ul.isv-cross { margin-left: auto !important; margin-right: auto !important; }
/* Große Kacheln (zwei nebeneinander) mit großer Überschrift */
.isv-grid-wide > .isv-card > h3, .isv-tile h2, .isv-tile h3 { font-size: clamp(30px, 3.4vw, 48px); line-height: 1.06; }
/* Sechs Kacheln: drei pro Reihe statt vier plus zwei */
@media (min-width: 900px) {
  .isv-grid:has(> :nth-child(6):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* Über uns: Bild links, Text rechts */
#ueber-uns { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 64px; align-items: start; padding-left: max(22px, calc((100% - 1180px) / 2)) !important; padding-right: max(22px, calc((100% - 1180px) / 2)) !important; }
#ueber-uns > * { grid-column: 2; max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; }
#ueber-uns > .wp-block-image:first-child { grid-column: 1; grid-row: 1 / span 12; margin: 0; position: sticky; top: 90px; }
#ueber-uns > .wp-block-image:first-child img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 30px; }
#ueber-uns > h2 { font-size: clamp(32px, 4vw, 52px); }
@media (max-width: 900px) {
  #ueber-uns { display: block; }
  #ueber-uns > .wp-block-image:first-child { position: static; margin-bottom: 32px; }
  #ueber-uns > .wp-block-image:first-child img { aspect-ratio: 16 / 10; }
}
/* Kontaktkarten: E-Mail-Adresse bricht nicht unschön um */
.isv-big { font-size: clamp(18px, 1.7vw, 24px); }
.isv-big a { white-space: nowrap; }
/* Fußzeile: vier Spalten nebeneinander */
.isv-footer .isv-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }

/* Version 1.0.2: ruhigere Silbentrennung auf dem Handy */
h1, h2, h3 { hyphenate-limit-chars: 12 5 5; }
@media (max-width: 600px) {
  #ueber-uns > h2 { font-size: 30px; }
  .isv-section h2 { font-size: clamp(28px, 8vw, 36px); }
}
