/*
Theme Name: Malermeister Scheel – Farbe
Description: Farbenfrohes Block-Theme für Malermeister Uwe Scheel, Burscheid, im Stil des Werbebanners: Aquarell-Farbwolke, Foto, fünf Leistungen mit Farb-Icons, Ablauf, FAQ und Anfrage in 3 Schritten. Alle Texte im Website-Editor bearbeitbar.
Version: 3.8
Requires at least: 6.5
Requires PHP: 7.4
Author: Malermeister Uwe Scheel
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: scheel-farbe
*/

:root {
  --c-ink: var(--wp--preset--color--ink);
  --c-muted: var(--wp--preset--color--muted);
  --c-line: var(--wp--preset--color--line);
  --c-wall: var(--wp--preset--color--wall);
  --c-dark: var(--wp--preset--color--dark);
  --c-blue: var(--wp--preset--color--blue);
  --c-magenta: var(--wp--preset--color--magenta);
  --c-green: var(--wp--preset--color--green);
  --c-orange: var(--wp--preset--color--orange);
  --c-purple: var(--wp--preset--color--purple);
  --script: var(--wp--preset--font-family--script);
  --rainbow: linear-gradient(90deg, #F08A1C, #F7C51E 18%, #6E9E1E 36%, #2BA8D8 54%, #1E4FA3 70%, #7A3E96 85%, #D0175C);
}
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
:focus-visible { outline: 3px solid var(--c-orange); outline-offset: 2px; }
.wp-site-blocks > * + * { margin-block-start: 0; }

/* ---------- Kopfbereich ---------- */
header.wp-block-template-part { position: relative; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); }
header.wp-block-template-part::after { content: ""; display: block; height: 4px; background: var(--rainbow); }
.sf-header { min-height: 78px; padding-block: 8px; max-width: 1200px; margin-inline: auto; }
.sf-brand { gap: 0 !important; }
.sf-brand .wp-block-site-tagline { order: -1; font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--c-ink); margin: 0; line-height: 1.2; }
.sf-brand .wp-block-site-title { font-family: var(--script); font-weight: 400; font-size: 2rem; line-height: 1; margin: 0; }
.sf-brand .wp-block-site-title a { color: var(--c-blue); text-decoration: none; }
.sf-nav { margin: 0; display: flex; gap: 28px; align-items: center; }
.sf-nav a { color: var(--c-ink); text-decoration: none; font-weight: 600; font-size: .98rem; }
.sf-nav a:hover { color: var(--c-magenta); }
.sf-nav a.sf-phone { color: var(--c-blue); }
@media (max-width: 1000px) { .sf-nav a:not(.sf-phone) { display: none; } }
@media (max-width: 680px) { .sf-nav, .sf-header .wp-block-buttons { display: none !important; } }

/* ---------- Allgemein ---------- */
.sf-section { padding-block: 88px; }
.sf-wall { background: var(--c-wall); }
.sf-intro { color: var(--c-muted); max-width: 42em; font-size: 1.08rem; }
.sf-script { font-family: var(--script); color: var(--c-blue); font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.2; }
.sf-rainbow-line { height: 4px; border-radius: 2px; background: var(--rainbow); border: 0; }
.wp-block-button.is-style-outline .wp-block-button__link { background: #fff; color: var(--c-blue); border: 2px solid var(--c-blue); }
.sf-btn-magenta .wp-block-button__link { background: var(--c-magenta); }

/* ---------- Einstieg ---------- */
.sf-hero-text > .wp-block-heading, .sf-hero-text > .sf-slogan { max-width: none; }
.sf-hero .sf-slogan::after { content: ""; position: absolute; left: -4%; right: -2%; bottom: -14px; height: 10px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 14' preserveAspectRatio='none'%3E%3Cpath d='M2 12 C120 10 260 6 398 2 L398 4 C260 8.5 120 12.5 2 13.6 Z' fill='%231E2228'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.sf-region .wp-block-columns { gap: 64px; }
.sf-region p { color: var(--c-muted); }
.sf-region .sf-intro { font-size: 1.15rem; color: var(--c-ink); }
.sf-hero .sf-hero-photo img { display: block; width: 100%; height: auto; }
.sf-hero .sf-lead { color: #3E4552; font-weight: 500; text-shadow: 0 0 14px #fff, 0 0 6px #fff, 0 0 2px #fff; }
.sf-h1-kicker { display: block; font-family: var(--wp--preset--font-family--body); font-size: clamp(1.4rem, 3.4vw, 2.6rem); font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--c-ink); line-height: 1.2; margin-bottom: .05em; }
.sf-hero h1::before { content: ""; display: block; width: min(820px, 100%); height: 8px; border-radius: 4px; background: var(--rainbow); margin-bottom: 26px; }
.sf-kicker { font-size: .95rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; margin: 0 !important; color: var(--c-ink); }
.sf-hero h1 { font-family: var(--script); font-weight: 400; font-size: clamp(3.6rem, 10vw, 8rem); line-height: 1; letter-spacing: 0; margin: .05em 0 0 !important; color: var(--c-blue); }
.sf-hero .sf-slogan { font-family: var(--script); color: var(--c-ink); font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.1; margin: -.15em 0 34px !important; display: table; position: relative; margin-left: clamp(0px, 24vw, 330px) !important; }
.sf-claim { font-weight: 800; font-size: clamp(1.6rem, 3.2vw, 2.3rem); line-height: 1.15; text-transform: uppercase; margin: 0 0 20px !important; }
.sf-claim span { display: block; }
.sf-claim span:nth-child(1) { color: var(--c-blue); }
.sf-claim span:nth-child(2) { color: var(--c-magenta); }
.sf-claim span:nth-child(3) { color: var(--c-green); }
.sf-lead { color: var(--c-muted); font-size: 1.08rem; max-width: 34em; }
.sf-hero .wp-block-buttons { margin-top: 26px; }

/* Einstieg wie auf dem Banner: Name oben, darunter Text links und Foto rechts */
.sf-hero { position: relative; overflow: hidden; padding-block: 40px 0; }
@media (min-width: 901px) {
  .sf-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 470px) minmax(0, 730px) minmax(0, 1fr); grid-template-areas: ". h1 h1 ." ". sl sl ." ". claim photo ." ". lead photo ." ". btn photo ." ". fill photo ."; grid-template-rows: auto auto auto auto auto 1fr; column-gap: 0; }
  .sf-hero-text { display: contents; }
  .sf-hero-text > .wp-block-heading { grid-area: h1; position: relative; z-index: 2; }
  .sf-hero-text > .sf-slogan { grid-area: sl; z-index: 2; justify-self: start; }
  .sf-hero-text > .sf-claim { grid-area: claim; position: relative; z-index: 2; margin: 6px 0 18px !important; }
  .sf-hero-text > .sf-lead { grid-area: lead; align-self: end; position: relative; z-index: 2; margin: 0 0 22px !important; }
  .sf-hero-text > .wp-block-buttons { grid-area: btn; position: relative; z-index: 2; margin: 0 0 72px !important; }
  .sf-hero .sf-hero-photo { grid-area: photo; position: relative !important; z-index: 1; width: calc(100% + 140px); max-width: none !important; margin: -40px 0 0 -140px !important; align-self: end; pointer-events: none; }
  .sf-hero .sf-hero-photo img { display: block; width: 100%; height: auto; }
}

/* ---------- Leistungen (5 Farb-Icons) ---------- */
.sf-services { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; margin-top: 44px !important; }
.sf-services > * { margin: 0 !important; }
.sf-svc { text-align: center; display: flex; flex-direction: column; align-items: center; padding: 8px 6px; }
.sf-svc::before { content: ""; width: 92px; height: 92px; border-radius: 50%; margin-bottom: 16px; background-position: center; background-repeat: no-repeat; background-size: 100% 100%; box-shadow: 0 10px 22px -12px rgba(0,0,0,.45); }
.sf-svc:nth-child(1)::before { background-image: url("assets/icon-malerarbeiten.png"); }
.sf-svc:nth-child(2)::before { background-image: url("assets/icon-fassade.png"); }
.sf-svc:nth-child(3)::before { background-image: url("assets/icon-kreativ.png"); }
.sf-svc:nth-child(4)::before { background-image: url("assets/icon-schimmel.png"); }
.sf-svc:nth-child(5)::before { background-image: url("assets/icon-altbau.png"); }
.sf-svc h3 { text-transform: uppercase; font-size: .86rem; letter-spacing: .02em; margin: 0 0 8px; hyphens: auto; }
.sf-svc p { color: var(--c-muted); font-size: .95rem; margin: 0 0 12px; }
.sf-svc .wp-block-buttons { margin-top: auto; justify-content: center; }
.sf-more .wp-block-button__link { background: transparent; color: var(--c-blue); padding: 0; font-size: .95rem; text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 1000px) { .sf-services { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .sf-services { grid-template-columns: 1fr; gap: 0; }
  .sf-svc { display: grid; grid-template-columns: 64px 1fr; column-gap: 16px; text-align: left; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--c-line); }
  .sf-svc::before { width: 64px; height: 64px; margin: 0; grid-row: 1 / span 3; }
  .sf-svc h3 { font-size: .95rem; margin-top: 4px; }
  .sf-svc p { margin-bottom: 6px; }
  .sf-svc .wp-block-buttons { justify-content: flex-start; }
}

/* ---------- Ablauf ---------- */
.sf-dark { background: var(--c-dark); color: #fff; }
.sf-dark h2 { color: #fff; }
.sf-dark .sf-intro { color: #BFC3C9; }
.sf-steps { list-style: none; counter-reset: s; margin-top: 40px !important; margin-bottom: 0 !important; padding: 0 !important; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.sf-steps li { counter-increment: s; color: #BFC3C9; padding-top: 18px; border-top: 4px solid var(--c-orange); }
.sf-steps li:nth-child(2) { border-color: var(--c-green); } .sf-steps li:nth-child(3) { border-color: #2BA8D8; } .sf-steps li:nth-child(4) { border-color: var(--c-magenta); }
.sf-steps li::before { content: counter(s); display: block; font-family: var(--script); font-size: 3rem; line-height: 1; color: #fff; margin-bottom: 10px; }
.sf-steps strong { display: block; color: #fff; font-weight: 700; font-size: 1.15rem; margin-bottom: 6px; }
@media (max-width: 860px) { .sf-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .sf-steps { grid-template-columns: 1fr; } }

/* ---------- Über uns ---------- */
.sf-about .wp-block-columns { gap: 64px; }
.sf-facts { list-style: none; padding: 0 !important; margin: 0; }
.sf-facts li { padding: 14px 0 14px 22px; border-bottom: 1px solid var(--c-line); position: relative; }
.sf-facts li::before { content: ""; position: absolute; left: 0; top: 22px; width: 10px; height: 10px; border-radius: 50%; background: var(--c-orange); }
.sf-facts li:nth-child(2)::before { background: var(--c-green); } .sf-facts li:nth-child(3)::before { background: var(--c-blue); } .sf-facts li:nth-child(4)::before { background: var(--c-purple); } .sf-facts li:nth-child(5)::before { background: var(--c-magenta); }
.sf-facts strong { display: block; font-weight: 700; }
.sf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sf-chips span { display: inline-block; padding: 7px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--c-line); font-weight: 600; font-size: .92rem; }
.sf-small { color: var(--c-muted); font-size: .95rem; }

/* ---------- FAQ ---------- */
.sf-faq .wp-block-details { border-bottom: 1px solid var(--c-line); padding: 18px 0; margin: 0 !important; }
.sf-faq .wp-block-details summary { font-weight: 700; font-size: 1.08rem; cursor: pointer; list-style: none; position: relative; padding-right: 40px; }
.sf-faq .wp-block-details summary::-webkit-details-marker { display: none; }
.sf-faq .wp-block-details summary::after { content: "+"; position: absolute; right: 6px; top: -6px; font-size: 1.7rem; font-weight: 500; color: var(--c-magenta); transition: transform .2s; }
.sf-faq .wp-block-details[open] summary::after { transform: rotate(45deg); }
.sf-faq .wp-block-details p { color: var(--c-muted); margin: 10px 0 0; max-width: 46em; }

/* ---------- Vorher / Nachher ---------- */
.sf-vn-wrap { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 3; max-width: 900px; user-select: none; }
.sf-vn-wrap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; margin: 0; }
.sf-vn-wrap .after { clip-path: inset(0 0 0 var(--pos, 50%)); }
.sf-vn-wrap .divider { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 3px; margin-left: -1.5px; background: #fff; pointer-events: none; }
.sf-vn-wrap .divider::after { content: ""; position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.sf-vn-wrap input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.sf-vn-wrap .lbl { position: absolute; top: 14px; padding: 4px 10px; border-radius: 6px; background: rgba(38,38,38,.75); color: #fff; font-size: .85rem; font-weight: 600; pointer-events: none; }
.sf-vn-wrap .lbl.l { left: 14px; } .sf-vn-wrap .lbl.r { right: 14px; }

/* ---------- Anfrage in 3 Schritten ---------- */
.sf-request .wp-block-columns { gap: 56px; }
.sf-contact-lines { font-size: 1.15rem; }
.sf-contact-lines a { font-weight: 700; }
.sf-form { background: #fff; color: var(--c-ink); border-radius: 20px; padding: 32px; box-shadow: 0 30px 60px -30px rgba(30,79,163,.35); border: 1px solid var(--c-line); position: relative; overflow: hidden; }
.sf-form::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--rainbow); }
.sf-form .progress { display: flex; gap: 6px; margin-bottom: 22px; }
.sf-form .progress span { flex: 1; height: 6px; border-radius: 3px; background: var(--c-line); }
.sf-form .progress span.on { background: var(--c-blue); }
.sf-form .progress span.on:nth-child(2) { background: var(--c-magenta); }
.sf-form .progress span.on:nth-child(3) { background: var(--c-green); }
.sf-form .stepinfo { color: var(--c-muted); font-size: .9rem; margin: 0 0 4px; }
.sf-form h3 { margin: 0 0 18px; font-size: 1.45rem; font-weight: 800; color: var(--c-blue); }
.sf-form .step + .step { margin-top: 28px; }
.sf-form.js .step { display: none; margin-top: 0; }
.sf-form.js .step.active { display: block; }
.sf-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sf-tiles label, .sf-pills label { cursor: pointer; }
.sf-tiles input, .sf-pills input { position: absolute; opacity: 0; pointer-events: none; }
.sf-tiles span { display: flex; align-items: center; gap: 10px; padding: 14px; border: 1.5px solid var(--c-line); border-radius: 12px; font-weight: 600; min-height: 54px; background: #fff; }
.sf-tiles span i { width: 18px; height: 18px; border-radius: 50%; flex: 0 0 18px; }
.sf-tiles input:checked + span { border-color: var(--c-blue); background: #EDF2FB; box-shadow: inset 0 0 0 1px var(--c-blue); }
.sf-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.sf-pills span { display: inline-block; padding: 9px 16px; border: 1.5px solid var(--c-line); border-radius: 999px; font-weight: 600; font-size: .93rem; background: #fff; }
.sf-pills input:checked + span { background: var(--c-blue); border-color: var(--c-blue); color: #fff; }
.sf-tiles input:focus-visible + span, .sf-pills input:focus-visible + span { outline: 3px solid var(--c-orange); outline-offset: 2px; }
.sf-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sf-form .field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.sf-form .field label, .sf-form .group-label { font-weight: 700; font-size: .93rem; }
.sf-form .group-label { display: block; margin-bottom: 8px; }
.sf-form input[type=text], .sf-form input[type=email], .sf-form input[type=tel], .sf-form select, .sf-form textarea { width: 100%; box-sizing: border-box; font: inherit; color: inherit; background: #fff; border: 1.5px solid #CBD2DD; border-radius: 10px; padding: 12px; }
.sf-form input:focus, .sf-form select:focus, .sf-form textarea:focus { border-color: var(--c-blue); outline: none; box-shadow: 0 0 0 3px #D6E1F5; }
.sf-form textarea { min-height: 110px; resize: vertical; }
.sf-form .nav { display: flex; gap: 10px; margin-top: 8px; }
.sf-form button { border: 0; border-radius: 999px; padding: 14px 22px; font: 700 1rem var(--wp--preset--font-family--body); cursor: pointer; }
.sf-form .next { background: var(--c-blue); color: #fff; flex: 1; }
.sf-form .send { background: var(--c-magenta); color: #fff; flex: 1; }
.sf-form .back { background: var(--c-wall); color: var(--c-ink); }
.sf-form:not(.js) .next, .sf-form:not(.js) .back { display: none; }
.sf-form .hint { font-size: .86rem; color: var(--c-muted); margin: 8px 0 0; }
.sf-form .error { color: #B3261E; font-weight: 600; font-size: .95rem; min-height: 1.3em; margin: 0 0 8px; }
.sf-form .sent { display: none; padding: 16px; border-radius: 12px; background: #FFF4E5; margin-top: 14px; }
@media (max-width: 520px) { .sf-form { padding: 24px 20px; } .sf-form .row { grid-template-columns: 1fr; } .sf-tiles span { padding: 12px 10px; font-size: .9rem; } }

/* ---------- Banner-Leiste ---------- */
.sf-band { background: var(--c-dark); color: #fff; padding-block: 44px 40px; text-align: center; }
.sf-band-line { font-weight: 800; font-size: clamp(1.4rem, 3.6vw, 2.4rem); letter-spacing: .02em; margin: 0 0 14px !important; }
.sf-band-line a { color: #fff; text-decoration: none; }
.sf-band .sf-rainbow-line { max-width: 760px; margin: 0 auto 12px !important; }
.sf-band .sf-script { color: #fff; margin: 0 !important; }

/* ---------- Unterseiten ---------- */
.sf-page { padding-block: 64px 88px; }
.sf-page h1 { font-family: var(--wp--preset--font-family--body); }
.sf-page h2 { font-size: 1.5rem; margin-top: 1.8em; }
.todo { background: #FFE9A8; color: #3A2E00; padding: 0 4px; border-radius: 3px; }

/* ---------- Fußbereich ---------- */
footer.wp-block-template-part { background: var(--c-wall); color: var(--c-muted); }
.sf-footer { padding-block: 56px 32px; font-size: .98rem; }
.sf-footer p { margin: 0; }
.sf-info { gap: 40px; }
.sf-info h3 { font-size: 1.1rem; margin: 0 0 10px; display: flex; align-items: center; gap: 10px; color: var(--c-ink); }
.sf-info h3::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--c-orange); }
.sf-info .wp-block-column:nth-child(2) h3::before { background: var(--c-green); }
.sf-info .wp-block-column:nth-child(3) h3::before { background: var(--c-magenta); }
.sf-footer a { color: var(--c-blue); }
.sf-legal { margin-top: 40px !important; padding-top: 20px; border-top: 1px solid var(--c-line); display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .9rem; }
.sf-legal a { color: var(--c-ink); text-decoration: none; }
@media (max-width: 680px) { .sf-footer { padding-bottom: 100px; } }

/* ---------- Leiste auf dem Handy ---------- */
.sf-callbar { display: none; }
@media (max-width: 680px) {
  .sf-callbar { display: flex; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); background: #fff; box-shadow: 0 -1px 0 var(--c-line); }
  .sf-callbar::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--rainbow); }
  .sf-callbar a { flex: 1; text-align: center; padding: 13px; border-radius: 999px; font-weight: 700; text-decoration: none; background: var(--c-magenta); color: #fff; }
  .sf-callbar a.ghost { background: var(--c-blue); }
}

/* ---------- Spalten auf dem Handy ---------- */
@media (max-width: 781px) {
  .sf-section .wp-block-columns, .sf-hero .wp-block-columns { flex-direction: column; gap: 32px !important; }
  .sf-section .wp-block-column, .sf-hero .wp-block-column { flex-basis: auto !important; width: 100%; }

  .sf-section { padding-block: 64px; }
}
@media (max-width: 900px) {
  .sf-hero { min-height: 0; padding-top: 32px; display: flex; flex-direction: column; }
  .sf-hero-text { display: contents; }
  .sf-hero-text > * { order: 0; }
  .sf-hero .sf-hero-photo { position: relative !important; right: auto; width: calc(100% + 48px); max-width: none !important; margin: 6px -24px 10px !important; order: 1; align-self: stretch; }
  .sf-hero-text > .sf-claim, .sf-hero-text > .sf-lead, .sf-hero-text > .wp-block-buttons { order: 2; }
  .sf-hero-text > .wp-block-buttons { margin-bottom: 48px !important; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.sf-services + .sf-small { margin-top: 32px !important; text-align: center; }
.sf-hero .sf-slogan { align-self: flex-start; }
