/* Malerbetrieb Baunach – Theme-Styles (Frontend + Editor) */

:root {
  --bb-ink: var(--wp--preset--color--ink);
  --bb-slate: var(--wp--preset--color--slate);
  --bb-slate-dark: var(--wp--preset--color--slate-dark);
  --bb-accent: var(--wp--preset--color--accent);
  --bb-accent-dark: var(--wp--preset--color--accent-dark);
  --bb-paper: var(--wp--preset--color--paper);
  --bb-line: var(--wp--preset--color--line);
  --bb-muted: var(--wp--preset--color--muted);
  --bb-radius: 14px;
  --bb-shadow: 0 10px 30px rgba(29, 38, 45, .08);
}

html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { -webkit-font-smoothing: antialiased; }

/* Abschnitte direkt aneinander, ohne Lücken */
.wp-site-blocks > *,
.bb-main,
.bb-main > *,
.wp-block-post-content > .alignfull { margin-block: 0; }

/* ---------- Header ---------- */
.bb-site-header {
  position: sticky; top: 0; z-index: 50;
  /* Kein backdrop-filter: würde das Vollbild-Menü (position: fixed) auf die Header-Höhe beschneiden. */
  background: #fff;
  border-bottom: 1px solid var(--bb-line);
}
.admin-bar .bb-site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .bb-site-header { top: 46px; } }
.bb-header__inner { min-height: 76px; gap: 24px; }
.bb-header__nav { gap: 28px; }
.bb-header .wp-block-navigation { font-weight: 600; font-size: .97rem; gap: 28px; }
.bb-header .wp-block-navigation a { color: var(--bb-ink); text-decoration: none; }
.bb-header .wp-block-navigation a:hover { color: var(--bb-accent-dark); }
/* Mobiles Vollbild-Menü: groß und linksbündig */
.bb-header .wp-block-navigation__responsive-container.is-menu-open { padding: 24px 24px 40px; }
.bb-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
.bb-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { align-items: flex-start !important; width: 100%; }
.bb-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 48px; }
.bb-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 0; }
.bb-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { width: 100%; font-size: 1.3rem; border-bottom: 1px solid var(--bb-line); }
.bb-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a { display: block; width: 100%; padding: 14px 0; }
.bb-header .wp-block-navigation__responsive-container-open svg,
.bb-header .wp-block-navigation__responsive-container-close svg { width: 30px; height: 30px; }
.bb-header .wp-block-button__link { padding: .6em 1.2em; }
.bb-header .wp-block-site-logo img,
.bb-logo img { height: auto; }
.bb-logo { margin: 0; }
@media (max-width: 600px) {
  .bb-header .bb-header__cta { display: none !important; } /* sonst überschreibt die Flex-Layout-Regel von WordPress das */
  .bb-header .wp-block-site-logo img, .bb-header .bb-logo img { width: 110px !important; }
}

/* ---------- Typo-Bausteine ---------- */
.bb-eyebrow {
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--bb-accent-dark); margin-bottom: .6em !important;
}
.bb-eyebrow + .wp-block-heading { margin-top: 0; }
.bb-lead { font-size: 1.15rem; color: var(--bb-muted); max-width: 720px; }
.bb-lead--dark { color: var(--bb-ink); }

/* ---------- Abschnitte ---------- */
.bb-section { padding-top: clamp(64px, 9vw, 110px); padding-bottom: clamp(64px, 9vw, 110px); }
.bb-paper { background: var(--bb-paper); }
.bb-dark { background: var(--bb-slate-dark); color: #eef1f3; }
.bb-dark h2 { color: #fff; }
.bb-dark .bb-eyebrow { color: var(--bb-accent); }
.bb-dark .bb-lead { color: #c9d0d5; }

.bb-intro { text-align: center; margin-bottom: 44px; }
.bb-intro .bb-lead { margin-left: auto; margin-right: auto; }

.wp-block-columns.bb-split { gap: 56px; align-items: center; }

/* ---------- Hero ---------- */
.bb-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--bb-paper) 0%, #e9e9e9 100%);
  padding-top: clamp(70px, 11vw, 140px); padding-bottom: clamp(70px, 10vw, 120px);
}
.bb-hero::after {
  content: ""; position: absolute; right: -120px; bottom: -60px; width: 520px; height: 140px;
  background: var(--bb-accent); opacity: .18; border-radius: 80px; transform: rotate(-14deg);
  pointer-events: none;
}
.bb-hero > * { position: relative; z-index: 1; }
.bb-hero__grid { gap: 48px; align-items: center; }
.bb-hero h1 { margin-top: 0; margin-bottom: .2em; }
.bb-hero__sub { color: var(--bb-slate); font-weight: 700; font-size: clamp(1.2rem, 2.6vw, 1.75rem); margin-top: 0 !important; }
.bb-hero .bb-lead { font-size: 1.12rem; }
.bb-hero .wp-block-buttons { margin-top: 1.6em; gap: 14px; }

.bb-badge { background: #fff; border-radius: var(--bb-radius); box-shadow: var(--bb-shadow); padding: 30px; }
.bb-badge > * { margin-block: 0; }
.bb-badge__num { font-size: 3.4rem; line-height: 1; font-weight: 800; color: var(--bb-slate); }
.bb-ticks { list-style: none; padding: 0; margin-top: 18px !important; }
.bb-ticks li { padding: 8px 0 8px 30px; position: relative; border-top: 1px solid var(--bb-line); font-weight: 600; }
.bb-ticks li::before {
  content: ""; position: absolute; left: 4px; top: 15px; width: 12px; height: 7px;
  border-left: 3px solid var(--bb-accent-dark); border-bottom: 3px solid var(--bb-accent-dark); transform: rotate(-45deg);
}

/* ---------- Buttons ---------- */
.wp-block-button.is-style-outline > .wp-block-button__link {
  border: 2px solid currentColor; padding: calc(.85em - 2px) calc(1.5em - 2px);
  color: var(--bb-slate); background: transparent;
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--bb-slate); border-color: var(--bb-slate); color: #fff; }
.wp-block-button__link { transition: background .2s, color .2s, transform .2s; }
.wp-block-button__link:hover { transform: translateY(-1px); }

/* ---------- Leistungen ---------- */
.bb-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 1100px) { .bb-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .bb-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .bb-cards { grid-template-columns: 1fr; } }
.bb-cards > *, .bb-benefits > *, .bb-steps > *, .bb-gallery > *, .bb-quotes > * { margin: 0 !important; }

.bb-card {
  position: relative; background: #fff; border: 1px solid var(--bb-line); border-radius: var(--bb-radius);
  padding: 90px 22px 24px; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.bb-card:hover { transform: translateY(-3px); box-shadow: var(--bb-shadow); border-color: transparent; }
.bb-card::before {
  content: ""; position: absolute; top: 24px; left: 22px; width: 48px; height: 48px;
  border-radius: 12px; background: var(--bb-paper);
}
.bb-card::after {
  content: ""; position: absolute; top: 35px; left: 33px; width: 26px; height: 26px;
  background: var(--bb-slate);
  -webkit-mask: var(--bb-icon) center / contain no-repeat; mask: var(--bb-icon) center / contain no-repeat;
}
.bb-card h3 { margin: 0 0 .5em; hyphens: manual; overflow-wrap: break-word; }
.bb-card p { color: var(--bb-muted); font-size: .95rem; margin: 0; }

.bb-icon-roller     { --bb-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='16' height='6' rx='1'/%3E%3Cpath d='M19 6h2v5h-9v3'/%3E%3Crect x='10' y='14' width='4' height='7' rx='1'/%3E%3C/svg%3E"); }
.bb-icon-wallpaper  { --bb-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='3' width='16' height='18' rx='1'/%3E%3Cpath d='M9 3v18M15 3v18'/%3E%3C/svg%3E"); }
.bb-icon-lacquer    { --bb-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4l6 6-9 9H5v-6z'/%3E%3Cpath d='M12 6l6 6'/%3E%3C/svg%3E"); }
.bb-icon-spatula    { --bb-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 17l9-9 4 4-9 9H3z'/%3E%3Cpath d='M14 6l2-2 4 4-2 2'/%3E%3C/svg%3E"); }
.bb-icon-house      { --bb-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11l9-7 9 7'/%3E%3Cpath d='M5 10v10h14V10'/%3E%3Cpath d='M10 20v-6h4v6'/%3E%3C/svg%3E"); }
.bb-icon-insulation { --bb-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='1'/%3E%3Cpath d='M3 9h18M3 14h18M9 4v5M15 9v5M9 14v6'/%3E%3C/svg%3E"); }
.bb-icon-drywall    { --bb-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 3v18M20 3v18M4 8h16M4 16h16'/%3E%3C/svg%3E"); }
.bb-icon-scaffold   { --bb-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 3v18M19 3v18M5 7h14M5 12h14M5 17h14M5 7l14 5'/%3E%3C/svg%3E"); }
.bb-icon-heater     { --bb-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='6' width='14' height='14' rx='2'/%3E%3Cpath d='M9 3c0 1.5 1 1.5 1 3M14 3c0 1.5 1 1.5 1 3M8 11h8M8 15h8'/%3E%3C/svg%3E"); }
.bb-icon-garden     { --bb-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21v-8'/%3E%3Cpath d='M12 13c-4 0-6-3-6-7 4 0 6 3 6 7z'/%3E%3Cpath d='M12 11c0-4 2-7 6-7 0 4-2 7-6 7z'/%3E%3Cpath d='M4 21h16'/%3E%3C/svg%3E"); }

/* ---------- Boxen & Listen ---------- */
.bb-box { background: #fff; color: var(--bb-ink); border-radius: var(--bb-radius); padding: 34px; box-shadow: var(--bb-shadow); }
.bb-box--paper { background: var(--bb-paper); box-shadow: none; }
.bb-box > :first-child { margin-top: 0; }
.bb-checklist { list-style: none; padding: 0; display: grid; gap: 12px; }
.bb-checklist li { position: relative; padding-left: 34px; }
.bb-checklist li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--bb-accent);
}
.bb-checklist li::after {
  content: ""; position: absolute; left: 7px; top: 9px; width: 8px; height: 5px;
  border-left: 2px solid var(--bb-ink); border-bottom: 2px solid var(--bb-ink); transform: rotate(-45deg);
}

/* ---------- Vorteile ---------- */
.bb-benefits { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.bb-benefit { background: #fff; padding: 18px 20px; border-radius: 12px; border-left: 4px solid var(--bb-accent); font-weight: 600; }

/* ---------- Ablauf ---------- */
.bb-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; counter-reset: bb-step; }
.bb-step { padding: 32px 26px 26px; background: #fff; border-radius: var(--bb-radius); border: 1px solid var(--bb-line); }
.bb-step::before {
  counter-increment: bb-step; content: counter(bb-step);
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  background: var(--bb-slate); color: #fff; font-weight: 800; font-size: 1.3rem; margin-bottom: 18px;
}
.bb-step h3 { margin: 0 0 .4em; }
.bb-step p { color: var(--bb-muted); margin: 0; }
@media (max-width: 800px) { .bb-steps { grid-template-columns: 1fr; } }

/* ---------- Galerie-Platzhalter ---------- */
.bb-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.bb-gallery__item {
  aspect-ratio: 4 / 3; border-radius: var(--bb-radius); display: grid; place-items: center;
  background: linear-gradient(135deg, #dadada, #c6c6c6); color: var(--bb-slate); font-weight: 600; font-size: .9rem;
}
.bb-gallery__item:nth-child(2) { background: linear-gradient(135deg, #d2d2d2, #bcbcbc); }
.bb-gallery__item:nth-child(4) { background: linear-gradient(135deg, #e4e4e4, #cfcfcf); }
.bb-gallery__item:nth-child(6) { background: linear-gradient(135deg, #d6d6d6, #c0c0c0); }
@media (max-width: 800px) { .bb-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.wp-block-gallery { border-radius: var(--bb-radius); }

/* ---------- Kundenstimmen ---------- */
.bb-quotes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.bb-quote { background: #fff; border-radius: var(--bb-radius); padding: 28px; box-shadow: var(--bb-shadow); }
.bb-quote p { font-size: 1.05rem; margin: 0; }
.bb-stars { color: var(--bb-accent); letter-spacing: 3px; font-size: 1.15rem !important; margin-bottom: 10px !important; }
@media (max-width: 900px) { .bb-quotes { grid-template-columns: 1fr; } }

/* ---------- CTA ---------- */
.bb-cta { background: var(--bb-accent); padding-top: clamp(56px, 8vw, 90px); padding-bottom: clamp(56px, 8vw, 90px); }
.bb-cta__inner { gap: 32px; }
.bb-cta__text { max-width: 640px; }
.bb-cta__text h2 { margin: 0 0 .3em; }
.bb-cta__text p { margin: 0; }
.bb-btn-dark > .wp-block-button__link { background: var(--bb-ink); color: #fff; }
.bb-btn-dark > .wp-block-button__link:hover { background: var(--bb-slate-dark); color: #fff; }
.bb-cta .is-style-outline > .wp-block-button__link { color: var(--bb-ink); }
.bb-cta .is-style-outline > .wp-block-button__link:hover { background: var(--bb-ink); border-color: var(--bb-ink); color: #fff; }

/* ---------- Unterseiten ---------- */
.bb-page-hero { background: var(--bb-slate-dark); color: #c9d0d5; padding-top: 70px; padding-bottom: 60px; }
.bb-page-hero h1 { color: #fff; margin: 0; }
.bb-page-hero .wp-block-post-date { color: var(--bb-accent); font-weight: 600; margin-bottom: .5em; }
.bb-note { background: #f1f1f1; border: 1px solid var(--bb-accent); border-radius: 10px; padding: 14px 18px; }
.bb-section > .wp-block-heading { margin-top: 1.6em; }
.bb-section > h2.wp-block-heading { font-size: 1.4rem; }
.bb-section > .bb-intro h2.wp-block-heading { font-size: var(--wp--preset--font-size--x-large); }

/* ---------- Kontakt ---------- */
.wp-block-columns.bb-contact { gap: 48px; margin-top: 2em; }
.bb-contact__item strong { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--bb-muted); }
.bb-contact__item a { text-decoration: none; font-weight: 600; }

.bb-form p { margin: 0 0 16px; }
.bb-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .bb-form__row { grid-template-columns: 1fr; } }
.bb-form label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.bb-form input, .bb-form select, .bb-form textarea {
  width: 100%; box-sizing: border-box; font: inherit; padding: 12px 14px;
  border: 1.5px solid var(--bb-line); border-radius: 10px; background: #fff; color: var(--bb-ink);
}
.bb-form input:focus, .bb-form select:focus, .bb-form textarea:focus {
  outline: none; border-color: var(--bb-slate); box-shadow: 0 0 0 3px rgba(70, 83, 94, .15);
}
.bb-form textarea { min-height: 150px; resize: vertical; }
.bb-form__check { display: flex; gap: 10px; align-items: flex-start; }
.bb-form__check input { width: auto; margin-top: 5px; }
.bb-form__check label { font-weight: 400; font-size: .9rem; color: var(--bb-muted); }
.bb-form button { border: 0; cursor: pointer; }
.bb-form__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.bb-form-msg { padding: 14px 18px; border-radius: 10px; font-weight: 600; }
.bb-form-msg--ok { background: #e8f4e8; border: 1px solid #7fb27f; }
.bb-form-msg--error { background: #fdeceb; border: 1px solid #d98a84; }

/* ---------- Footer ---------- */
.bb-footer { background: var(--bb-ink); color: #b7c0c6; padding-top: 60px; padding-bottom: 28px; font-size: .95rem; }
.bb-footer a { color: #dfe4e7; text-decoration: none; }
.bb-footer a:hover { color: var(--bb-accent); }
.bb-footer h3 { color: #fff; font-size: 1rem; margin-top: 0; }
.bb-footer__grid { gap: 40px; }
.bb-footer__logo { background: #fff; display: inline-block; padding: 10px 14px; border-radius: 10px; }
.bb-footer__logo > * { margin: 0; }
.bb-plain-list { list-style: none; padding: 0; display: grid; gap: 8px; }
/* Trennstrich genau mittig zwischen den beiden „Datenschutz“ (Seiten-Liste und letzte Zeile) */
.bb-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 32.5px !important; padding-top: 33.5px; }
.bb-footer__bottom { gap: 12px; }
.bb-footer__bottom > p { margin: 0; }
/* Impressum · Datenschutz immer rechtsbündig (auch wenn die Zeile am Handy umbricht) – unter dem Nach-oben-Button */
.bb-footer__legal { margin-left: auto !important; }

/* ---------- Nach-oben-Button ---------- */
.bb-to-top {
  position: fixed; right: max(20px, calc((100vw - 1160px) / 2 + 20px)); bottom: 20px; z-index: 60;
  width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer; padding: 0;
  display: grid; place-items: center;
  background: var(--bb-slate); color: #fff; box-shadow: 0 6px 18px rgba(29, 38, 45, .25);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .25s, visibility .25s, transform .25s, background .2s;
}
.bb-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
/* Hover nur bei Geräten mit Maus – auf Touch-Geräten bliebe die Farbe nach dem Antippen „hängen“ */
@media (hover: hover) { .bb-to-top:hover { background: var(--bb-accent-dark); } }
.bb-to-top:focus-visible { outline: 3px solid var(--bb-accent); outline-offset: 3px; }
.bb-to-top svg { width: 22px; height: 22px; }
@media (max-width: 600px) { .bb-to-top { width: 44px; height: 44px; } }

/* Handy: Impressum · Datenschutz oben, © darunter – beide rechtsbündig */
@media (max-width: 600px) {
  .bb-footer__bottom { flex-direction: column; align-items: flex-end !important; gap: 6px; }
  .bb-footer__legal { order: -1; margin-left: 0 !important; }
}

/* ===== Variante „Grau“: Anpassungen für Text auf dunklem Akzent ===== */
.bb-eyebrow { color: #6e7175; }
.bb-dark .bb-eyebrow, .bb-page-hero .wp-block-post-date { color: #b9bcbf; }
.bb-checklist li::after { border-color: #fff; }
.bb-ticks li::before { border-color: var(--bb-slate); }
.bb-cta { background: #dcdddf; }
.bb-footer a:hover { color: #fff; }
.bb-note { border-color: #9a9da1; }
