/* Roboto selbst gehostet (keine Verbindung zu Google-Servern) */
@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("fonts/roboto-latin.woff2") format("woff2");
}

/* Farben aus dem Elementor-Kit von schalter-gmbh.de */
:root {
    --akzent: #9e0926;
    --akzent-hover: #ab0a29;
    --akzent-dunkel: #5e0517;
    --akzent-hell: #f7ecee;
    --text: #303030;
    --text-leise: #54595f;
    --flaeche: #ffffff;
    --flaeche-grau: #f9f9f9;
    --rahmen: #dddddd;
    --radius: 3px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--flaeche);
    color: var(--text);
    font: 16px/1.55 "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.wizard {
    max-width: 760px;
    margin: 0 auto;
    padding: 20px 16px 28px;
}

h1, h2, h3 { font-weight: 500; line-height: 1.2; }
h1 { font-size: 1.6rem; margin: 0 0 4px; }
h2 { font-size: 1.2rem; margin: 0 0 6px; }
h3 { font-size: 1.1rem; margin: 0 0 6px; }

.einleitung { color: var(--text-leise); margin: 0 0 4px; }

/* ---------- Abschnitte: erscheinen nacheinander untereinander ---------- */

.abschnitt {
    padding: 20px 0 4px;
    border-top: 1px solid var(--rahmen);
    margin-top: 16px;
    scroll-margin-top: 100px; /* Platz für den Seitenkopf beim Hinscrollen */
}
.abschnitt h2 { display: flex; align-items: center; gap: 10px; }
.nummer {
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--akzent);
    color: #fff;
    font-size: .9rem;
}

/* ---------- Seitenkopf (nur ohne ?embedded=1), angelehnt an schalter-gmbh.de ---------- */

.seitenkopf {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--flaeche);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
.seitenkopf-innen {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1140px;
    margin: 0 auto;
    padding: 10px 16px;
}
.logo { display: block; line-height: 0; }
.logo img { width: 72px; height: 72px; }
.seitenkopf-kontakt { min-height: 42px; padding: 8px 20px; }

/* ---------- Allgemein ---------- */

.hinweis { color: var(--text-leise); margin: 0 0 12px; }
.fuss a { color: inherit; }
.meldung {
    margin: 12px 0 0;
    padding: 10px 14px;
    border-left: 4px solid var(--akzent);
    background: var(--akzent-hell);
    color: var(--akzent-dunkel);
}

.knopf {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 10px 22px;
    border: 1px solid var(--rahmen);
    border-radius: var(--radius);
    background: var(--flaeche);
    color: var(--text);
    font: inherit;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s, border-color .15s;
}
.knopf:hover { border-color: var(--akzent); color: var(--akzent); }
.knopf-primaer { background: var(--akzent); border-color: var(--akzent); color: #fff; }
.knopf-primaer:hover { background: var(--akzent-hover); border-color: var(--akzent-hover); color: #fff; }
.knopf-gross { min-height: 54px; padding: 12px 28px; font-size: 1.05rem; }
.knopf:disabled { opacity: .45; cursor: not-allowed; }

/* Dateifeld bleibt fokussierbar, ist aber nur über das Label sichtbar */
.unsichtbar {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
:focus-visible, .knopf:focus-within { outline: 3px solid var(--akzent); outline-offset: 2px; }

.foto-auswahl, .aktionen { display: flex; flex-wrap: wrap; gap: 12px; }
.aktionen { margin-top: 20px; }

/* ---------- Foto-Vorschau ---------- */

.vorschau { margin: 16px 0 0; }
/* Immer im Original-Seitenverhältnis, nur verkleinert, nie beschnitten */
.vorschau img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 360px;
    border-radius: var(--radius);
}

/* ---------- Stil ---------- */

.optionen {
    margin: 4px 0 8px;
    background: var(--flaeche-grau);
    border-radius: var(--radius);
}
.option + .option { border-top: 1px solid var(--rahmen); }
.option {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0 16px;
    padding: 2px 16px;
}
.option-titel { font-weight: 500; }
.option .umschalter { margin: 6px 0; }

.ergebnis-optionen { color: var(--text-leise); font-weight: 400; }

.stile {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}
.stil {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 0 12px;
    border: 2px solid var(--rahmen);
    border-radius: var(--radius);
    background: var(--flaeche);
    font: inherit;
    text-align: left;
    color: var(--text);
    cursor: pointer;
    overflow: hidden;
    transition: border-color .15s;
}
.stil:hover { border-color: var(--akzent); }
.stil strong { font-weight: 500; }
.stil strong, .stil > span { padding: 0 12px; }
.stil > span { font-size: .85rem; color: var(--text-leise); }
.stil[aria-checked="true"] { border-color: var(--akzent); background: var(--akzent-hell); }
.stil-bild {
    display: flex;
    aspect-ratio: 4 / 3;
    margin-bottom: 8px;
    background-size: cover;
    background-position: center;
}
.stil-bild span { flex: 1; }

/* ---------- Warten ---------- */

#panel-warten { text-align: center; padding: 24px 0 16px; }
.warten-titel { margin: 0 0 4px; font-size: 1.1rem; font-weight: 500; }
.panel-titel { margin: 0 0 6px; font-size: 1.1rem; font-weight: 500; }
.stil:disabled { cursor: wait; opacity: .6; }
#erstellen { min-width: 220px; }
.lader {
    width: 48px;
    height: 48px;
    margin: 0 auto 20px;
    border: 4px solid var(--akzent-hell);
    border-top-color: var(--akzent);
    border-radius: 50%;
    animation: drehen 1s linear infinite;
}
@keyframes drehen { to { transform: rotate(360deg); } }

/* ---------- Umschalter (Ansicht, Optionen) ---------- */

.umschalter {
    display: inline-flex;
    flex-shrink: 0;
    margin: 12px 0;
    border: 1px solid var(--rahmen);
    border-radius: var(--radius);
    overflow: hidden;
}
.umschalter button {
    min-height: 40px;
    padding: 6px 18px;
    border: 0;
    border-left: 1px solid var(--rahmen);
    background: var(--flaeche);
    color: var(--text);
    font: inherit;
    font-size: .95rem;
    font-weight: 500;
    cursor: pointer;
}
.umschalter button:first-child { border-left: 0; }
.umschalter button:hover { color: var(--akzent); }
.umschalter button[aria-pressed="true"] { background: var(--akzent); color: #fff; }

.bilder { display: grid; gap: 12px; }
.bilder[data-ansicht="nachher"] .bild-vorher,
.bilder[data-ansicht="vorher"] .bild-nachher { display: none; }
/* Einzelansicht: Tippen aufs Bild schaltet um */
.bilder:not([data-ansicht="beide"]) .bild { cursor: pointer; }
@media (min-width: 600px) {
    .bilder[data-ansicht="beide"] { grid-template-columns: 1fr 1fr; }
}

.bild {
    position: relative;
    margin: 0;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--flaeche-grau);
}
.bild img { display: block; width: 100%; height: auto; }
.bild figcaption {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 2px 8px;
    border-radius: var(--radius);
    background: rgba(0, 0, 0, .6);
    color: #fff;
    font-size: .8rem;
    pointer-events: none;
}
.bild-nachher figcaption { background: var(--akzent); }

.planungshinweis {
    margin: 12px 0 20px;
    padding: 14px 16px;
    border: 1px solid var(--akzent);
    border-radius: var(--radius);
    background: var(--akzent-hell);
}
.planungshinweis strong { display: block; color: var(--akzent-dunkel); font-size: 1.05rem; margin-bottom: 4px; }
.planungshinweis p { margin: 0 0 6px; }
.planungshinweis .klein { margin: 0; font-size: .85rem; color: var(--text-leise); }

.cta {
    padding: 18px 18px;
    border-left: 4px solid var(--akzent);
    background: var(--flaeche-grau);
}
.cta p { margin: 0 0 16px; }
.cta .cta-telefon { margin: 12px 0 0; font-size: .9rem; color: var(--text-leise); }
.cta .cta-telefon a { color: var(--akzent); }

.aktionen-sekundaer { margin-top: 16px; }
.aktionen-sekundaer .knopf { min-height: 42px; padding: 8px 16px; font-size: .9rem; }

/* Footer: bei wenig Inhalt am unteren Bildschirmrand, bei viel Inhalt nach dem Inhalt (nicht sticky).
   Nur ohne ?embedded=1 – im iframe würde eine Mindesthöhe die automatische Höhenanpassung blockieren. */
body.vollseite {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}
body.vollseite .wizard { flex: 1 0 auto; width: 100%; }

.fuss {
    border-top: 1px solid var(--rahmen);
    background: var(--flaeche-grau);
    font-size: .85rem;
    color: var(--text-leise);
}
.fuss-innen {
    display: flex;
    gap: 20px;
    max-width: 760px;
    margin: 0 auto;
    padding: 16px;
}

@media (max-width: 480px) {
    h1 { font-size: 1.4rem; }
    .logo img { width: 56px; height: 56px; }
    .vorschau img { max-height: 260px; }
    .knopf-gross { width: 100%; }
    .foto-auswahl .knopf { flex: 1; }
}
