/* ===========================================================================
   p17-data · www.p17-data.de · p17 GmbH
   Geschäftsbereich „Daten" – Markt- & Potenzialdaten für Geomarketing/BI
   Corporate Design: Daten-Amber (#ffb703) + Komplementär-Blau (#0340ff)
   Schriften: Oswald (Texte/Überschriften) · Caveat (Buttons)
   Layout identisch zu den Schwesterseiten (PLZKarte, p17-maps, Stadtplan …).
   =========================================================================== */

:root {
    /* Leitfarbe „Daten" (Amber) – ersetzt das Gold der Schwesterseiten */
    --gold:        #ffb703;   /* Primär (hell, kräftig) – Akzente, Rahmen, Punkte */
    --gold-light:  #ffcc48;   /* Primär hell */
    --gold-dark:   #cc9200;   /* Primär dunkel */
    --gold-deep:   #946b00;   /* sehr dunkel – Überschriften/Text auf Weiß */
    --gold-soft:   #fff6e0;   /* sehr heller Amberton für Flächen */

    /* Akzent / Sekundär – Komplementär-Blau */
    --geo:         #0340ff;
    --geo-light:   #5b78ff;
    --geo-dark:    #0228b0;
    --geo-comp:    #cc9200;

    /* Basis / Neutraltöne */
    --ink:     #191919;
    --ink-2:   #323232;
    --gray:    #595959;
    --gray-2:  #737373;
    --line:    #ece4d2;
    --bg:      #ffffff;
    --surface: #ffffff;

    --radius: 12px;
    --radius-sm: 7px;
    --shadow: 0 2px 12px rgba(148,107,0,.10);
    --shadow-lg: 0 14px 36px rgba(25,25,25,.16);
    --maxw: 1280px;
    --topbar-h: 40px;
    --nav-h: 72px;

    --f-body: "Oswald", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    --f-hand: "Caveat", "Segoe UI", cursive;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
[hidden] { display: none !important; }

body {
    font-family: var(--f-body);
    font-weight: 300;
    color: var(--ink-2);
    background: var(--bg);
    line-height: 1.65;
    font-size: 16px;
    letter-spacing: .15px;
    -webkit-font-smoothing: antialiased;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

a { color: var(--geo); text-decoration: none; }
a:hover { color: var(--geo-dark); text-decoration: underline; }

h1, h2, h3, h4 { font-weight: 500; line-height: 1.2; color: var(--ink); letter-spacing: .3px; }

/* ----------------------------- Buttons (Caveat) ----------------------------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: var(--f-hand); font-weight: 700; font-size: 1.35rem; line-height: 1;
    cursor: pointer; padding: 10px 26px 8px; border-radius: var(--radius-sm);
    border: 2px solid transparent; transition: background .15s, border-color .15s, color .15s, transform .05s;
    text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* Primär = kräftiges Amber mit dunklem Text (energiegeladen, gut lesbar) */
.btn-primary { background: var(--gold); color: var(--ink); }
.btn-primary:hover:not(:disabled) { background: var(--gold-light); color: var(--ink); }
.btn-accent  { background: var(--geo); color: #fff; }
.btn-accent:hover:not(:disabled) { background: var(--geo-dark); color: #fff; }
.btn-ghost   { background: #fff; color: var(--gold-deep); border-color: var(--gold); }
.btn-ghost:hover:not(:disabled) { background: var(--gold-soft); color: var(--gold-deep); }
.btn-block { width: 100%; }

/* ----------------------------- Header / Nav ----------------------------- */

.site-header { position: sticky; top: 0; z-index: 50; box-shadow: var(--shadow); }

.topbar {
    background: var(--gold-deep); color: #fff;
    font-size: .82rem; letter-spacing: .4px;
}
.topbar .container { display: flex; align-items: center; justify-content: space-between;
    min-height: var(--topbar-h); gap: 16px; flex-wrap: wrap; }
.topbar a { color: #fff; }
.topbar a:hover { color: #fff; text-decoration: underline; }
.topbar-left  { display: flex; gap: 18px; flex-wrap: wrap; }
.topbar-right { display: flex; gap: 18px; flex-wrap: wrap; }

.navbar { background: #fff; }
.navbar .container { display: flex; align-items: center; justify-content: space-between;
    min-height: var(--nav-h); gap: 16px; }

.brand { display: flex; align-items: center; gap: 14px; }
.brand:hover { text-decoration: none; }
.brand-logo { display: block; border-radius: 8px; box-shadow: 0 2px 8px rgba(204,146,0,.28); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-title { font-weight: 600; font-size: 1.15rem; color: var(--ink); text-transform: uppercase;
    letter-spacing: .5px; }
.brand-sub   { font-size: .72rem; color: var(--gold-deep); text-transform: uppercase;
    letter-spacing: 1.6px; font-weight: 400; }

.site-nav { display: flex; gap: 6px; align-items: center; }
.nav-link {
    color: var(--ink-2); font-size: 1rem; font-weight: 400; text-transform: uppercase;
    letter-spacing: .6px; padding: 10px 16px; border-radius: var(--radius-sm);
    transition: background .15s, color .15s; white-space: nowrap;
}
.nav-link:hover { background: var(--gold-soft); color: var(--gold-deep); text-decoration: none; }
.nav-link.is-active { color: var(--ink); background: var(--gold); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0;
    cursor: pointer; padding: 10px; }
.nav-toggle span { width: 26px; height: 3px; background: var(--gold-dark); display: block; border-radius: 3px;
    transition: transform .2s, opacity .2s; }

/* ----------------------------- Footer ----------------------------- */

.site-footer { background: var(--gold-soft); color: var(--ink-2); margin-top: 56px;
    border-top: 4px solid var(--gold); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between;
    padding: 44px 24px; }
.footer-col { min-width: 240px; }
.footer-contact { display: flex; gap: 16px; }
.footer-logo { border-radius: 8px; flex: 0 0 auto; box-shadow: 0 2px 8px rgba(204,146,0,.28); }
.footer-address { display: flex; flex-direction: column; gap: 2px; font-size: .95rem; }
.footer-address strong { color: var(--ink); font-size: 1.1rem; font-weight: 600; margin-bottom: 4px;
    text-transform: uppercase; letter-spacing: .5px; }
.footer-address a { color: var(--geo-dark); }

.footer-heading { color: var(--gold-deep); font-size: .92rem; text-transform: uppercase;
    letter-spacing: 1.6px; font-weight: 600; margin: 0 0 14px; }
.footer-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.footer-links a { color: var(--ink-2); font-size: .95rem; }
.footer-links a:hover { color: var(--gold-deep); }

.footer-bottom { border-top: 1px solid var(--gold-light); font-size: .85rem; color: var(--gold-deep); }
.footer-bottom .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
    padding-top: 16px; padding-bottom: 16px; }

/* ----------------------------- Cookie-Banner ----------------------------- */

.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
    background: #fff; border-top: 4px solid var(--gold); box-shadow: 0 -8px 28px rgba(0,0,0,.18); }
.cookie-inner { display: flex; align-items: center; gap: 24px; padding: 18px 24px; flex-wrap: wrap; }
.cookie-text { margin: 0; font-size: .92rem; color: var(--ink-2); flex: 1 1 420px; }
.cookie-actions { display: flex; gap: 12px; flex: 0 0 auto; }

/* ----------------------------- Inhalts-Seiten ----------------------------- */

.content-page { padding: 52px 24px; max-width: 900px; }
.content-page h1 { font-size: 2.4rem; margin: 0 0 10px; color: var(--gold-deep); }
.content-page h1 + .lead { color: var(--gray); font-size: 1.2rem; font-weight: 300; margin-bottom: 30px; }
.content-page h2 { font-size: 1.55rem; margin: 40px 0 12px; padding-bottom: 8px; color: var(--gold-dark);
    border-bottom: 2px solid var(--gold-light); }
.content-page h3 { font-size: 1.2rem; margin: 26px 0 8px; color: var(--ink); }
.content-page p, .content-page li { color: var(--ink-2); }
.content-page ul { padding-left: 22px; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px;
    margin: 30px 0; }
.card { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--gold);
    border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h3 { margin-top: 0; color: var(--gold-dark); }

.cta-box { background: var(--gold); color: var(--ink); border-radius: var(--radius); padding: 30px;
    margin: 36px 0; display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center;
    justify-content: space-between; box-shadow: var(--shadow); }
.cta-box h2 { color: var(--ink); border: 0; margin: 0; }
.cta-box p { color: var(--ink-2); margin: 4px 0 0; }
.cta-box .btn-accent { background: var(--geo); color: #fff; }
.cta-box .btn-accent:hover { background: var(--geo-dark); }

/* ============================ ANWENDUNG ============================ */

.page-app .site-main { padding: 0; }

.app { display: grid; grid-template-columns: 420px 1fr; gap: 0; align-items: stretch;
    min-height: calc(100vh - var(--topbar-h) - var(--nav-h)); }

.app-panel { background: #fff; border-right: 1px solid var(--line); padding: 26px;
    overflow-y: auto; max-height: calc(100vh - var(--topbar-h) - var(--nav-h)); }
.app-title { font-size: 1.7rem; margin: 0 0 8px; color: var(--gold-deep); }
.app-intro { font-size: .96rem; color: var(--gray); margin: 0 0 24px; }

.ctl-label { display: block; font-size: .82rem; font-weight: 500; text-transform: uppercase;
    letter-spacing: 1px; color: var(--gold-deep); margin-bottom: 9px; }
.ctl-hint { font-size: .86rem; color: var(--gray); margin: 0 0 9px; font-weight: 300; }

.select, .textarea, .color-input, .text-input {
    width: 100%; font-family: var(--f-body); font-weight: 300; font-size: .95rem;
    border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 11px;
    background: #fff; color: var(--ink); }
.select:focus, .textarea:focus, .text-input:focus { outline: 2px solid var(--gold-light);
    border-color: var(--gold); }
.textarea { resize: vertical; margin-bottom: 10px; }

/* ----------------------------- Karte (Basis) ----------------------------- */

.app-map { display: flex; flex-direction: column; background: var(--gold-soft); }
.map-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 14px 22px; background: #fff; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.map-status { font-size: .85rem; color: var(--gold-deep); }
.map-stage { position: relative; flex: 1; padding: 18px; display: flex; min-height: 480px; }

/* ----------------------------- Responsiv (Basis) ----------------------------- */

@media (max-width: 980px) {
    .site-nav { position: absolute; top: calc(var(--topbar-h) + var(--nav-h)); left: 0; right: 0;
        background: #fff; flex-direction: column; padding: 8px 16px 18px; gap: 2px; display: none;
        box-shadow: var(--shadow-lg); border-top: 1px solid var(--line); }
    .site-nav.open { display: flex; }
    .nav-link { padding: 14px; width: 100%; }
    .nav-toggle { display: flex; }

    .app { grid-template-columns: 1fr; }
    .app-panel { max-height: none; border-right: 0; border-bottom: 1px solid var(--line); }
    .app-map { min-height: 72vh; }
    .map-stage { flex-direction: column; }
}

@media (max-width: 600px) {
    .topbar { font-size: .76rem; }
    .topbar .container { justify-content: center; gap: 10px 16px; }
    .brand-title { font-size: 1rem; }
    .content-page { padding: 36px 20px; }
    .content-page h1 { font-size: 1.9rem; }
    .footer-inner { flex-direction: column; gap: 30px; }
    .cookie-actions { width: 100%; }
    .cookie-actions .btn { flex: 1; }
    .cta-box { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 380px) {
    .container { padding: 0 16px; }
    .app-panel { padding: 18px; }
}

/* ============================ KONFIGURATOR / WIZARD ============================ */

.app-panel { display: flex; flex-direction: column; }
.wiz-body { flex: 1; }

/* Stepper */
.stepper { display: flex; gap: 6px; margin: 0 0 22px; padding: 0; list-style: none; }
.stepper li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px;
    font-size: .68rem; text-transform: uppercase; letter-spacing: .4px; color: var(--gray-2);
    text-align: center; line-height: 1.2; }
.stepper .dot { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; font-weight: 600; font-size: .9rem; background: var(--gold-soft);
    color: var(--gold-deep); border: 2px solid var(--gold-light); transition: background .15s, color .15s; }
.stepper li.is-active .dot { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.stepper li.is-done .dot { background: var(--geo); color: #fff; border-color: var(--geo); }
.stepper li.is-active { color: var(--gold-deep); font-weight: 500; }

/* Schritt-Container */
.wiz-step { animation: fadeStep .2s ease; }
.wiz-step[hidden] { display: none; }
@keyframes fadeStep { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.step-head { font-size: 1.35rem; margin: 0 0 4px; color: var(--gold-deep); }
.step-sub { font-size: .92rem; color: var(--gray); margin: 0 0 20px; font-weight: 300; }
.field-block { margin-bottom: 18px; }

/* Navigation unten */
.wiz-nav { display: flex; gap: 12px; margin-top: 22px; padding-top: 18px;
    border-top: 1px solid var(--line); }
.wiz-nav .btn { flex: 1; }
.wiz-nav .btn-back { flex: 0 0 auto; }

/* Auswahl-Karten (Choice: Checkbox/Radio mit Beschreibung) */
.choice-list { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.choice { display: flex; align-items: flex-start; gap: 12px; border: 1.5px solid var(--line);
    border-radius: var(--radius-sm); padding: 12px 14px; background: #fff; cursor: pointer; transition: .15s; }
.choice:hover { border-color: var(--gold-light); }
.choice.is-active { border-color: var(--gold); background: var(--gold-soft); }
.choice input { margin-top: 3px; accent-color: var(--gold-dark); flex: 0 0 auto; }
.choice-text { display: flex; flex-direction: column; gap: 2px; }
.choice-name { font-weight: 600; color: var(--ink); }
.choice-sub { font-size: .85em; color: var(--gray); line-height: 1.4; }
.choice-tag { margin-left: auto; font-size: .72rem; text-transform: uppercase; letter-spacing: .5px;
    color: var(--gold-deep); background: var(--gold-soft); border: 1px solid var(--gold-light);
    border-radius: 20px; padding: 2px 9px; white-space: nowrap; align-self: center; }

/* Ebenen-/Kategorie-Gruppen */
.grp { margin: 0 0 20px; }
.grp-title { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .8px;
    color: var(--gold-deep); margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.grp-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Eingeblendetes Freitextfeld */
.sub-field { margin: 8px 0 4px; display: none; }
.sub-field.is-shown { display: block; }
.sub-field label { display: block; font-weight: 600; margin-bottom: 4px; font-size: .9em; color: var(--gold-deep); }

/* Hinweis-/Info-Kästen */
.hint-box { background: var(--gold-soft); border: 1px solid var(--gold-light); border-left: 4px solid var(--gold);
    border-radius: var(--radius-sm); padding: 11px 14px; font-size: .88em; color: var(--gold-deep); margin-top: 12px; line-height: 1.5; }
.info-box { background: rgba(3,64,255,.06); border: 1px solid var(--geo-light); border-left: 4px solid var(--geo);
    border-radius: var(--radius-sm); padding: 11px 14px; font-size: .88em; color: var(--geo-dark); margin-top: 12px; line-height: 1.5; }

/* Zahl-Eingaben */
.num-input { max-width: 160px; }

/* Kontakt-Formular */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; }
.field.col-2 { grid-column: 1 / -1; }
.field label { font-size: .78rem; text-transform: uppercase; letter-spacing: .6px;
    color: var(--gold-deep); margin-bottom: 6px; font-weight: 500; }
.field label .req { color: var(--geo); }
.checkbox-row { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 0;
    font-size: .86rem; font-weight: 300; color: var(--gray); }
.checkbox-row input { margin-top: 4px; accent-color: var(--gold-dark); flex: 0 0 auto; }
.form-error { color: var(--geo-dark); font-size: .86rem; margin: 10px 0 0; min-height: 1em; font-weight: 400; }

/* Zusammenfassungs-Box (Schritt 5) */
.price-box { border: 1px solid var(--gold-light); border-top: 4px solid var(--gold);
    border-radius: var(--radius); background: var(--gold-soft); padding: 16px 18px; margin-top: 6px; }
.price-box h4 { margin: 0 0 10px; font-size: .82rem; text-transform: uppercase; letter-spacing: .8px;
    color: var(--gold-deep); }
.price-row { display: flex; justify-content: space-between; gap: 12px; font-size: .92rem;
    color: var(--ink-2); padding: 4px 0; border-bottom: 1px solid rgba(204,146,0,.15); }
.price-row:last-child { border-bottom: 0; }
.price-row > span:first-child { color: var(--gray); flex: 0 0 42%; }
.price-row > span:last-child { text-align: right; font-weight: 500; color: var(--ink); }
.price-note { font-size: .78rem; color: var(--gray); margin: 10px 0 0; font-weight: 300; line-height: 1.5; }

/* Erfolgsmeldung */
.wiz-success { text-align: center; padding: 30px 10px; }
.wiz-success .ok-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--geo);
    color: #fff; font-size: 2rem; display: flex; align-items: center; justify-content: center;
    margin: 0 auto 18px; }
.wiz-success h3 { color: var(--gold-deep); font-size: 1.4rem; margin: 0 0 8px; }
.wiz-success p { color: var(--gray); font-size: .96rem; }

/* ----------------------------- Länderauswahl (Schritt 1) ----------------------------- */

.search-row { position: relative; margin: 6px 0 12px; }
.search-row input { width: 100%; }
.search-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 8px;
    font-size: .85em; color: var(--gray); gap: 10px; flex-wrap: wrap; }
.search-meta a { cursor: pointer; }

.land-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px;
    max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: 10px; background: #fbfaf6; }
.land-item { display: flex; align-items: center; gap: 9px; border: 1.5px solid transparent;
    border-radius: 8px; padding: 7px 9px; cursor: pointer; transition: .12s; background: #fff; }
.land-item:hover { border-color: var(--gold-light); }
.land-item.is-active { border-color: var(--gold); background: var(--gold-soft); }
.land-item input { margin: 0; accent-color: var(--gold-dark); }
.land-name { font-weight: 600; color: var(--ink); font-size: .9em; line-height: 1.2; }
.land-hidden { display: none !important; }

/* Gewählte Länder als Chips */
.sel-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; padding: 0; list-style: none; }
.sel-chip { display: inline-flex; align-items: center; gap: 7px; background: #fff;
    border: 1px solid var(--gold-light); border-radius: 20px; padding: 4px 6px 4px 12px;
    font-size: .86rem; color: var(--ink-2); }
.sel-chip b { color: var(--gold-deep); font-weight: 600; }
.sel-chip .chip-x { width: 18px; height: 18px; border: 0; border-radius: 50%; background: var(--gold-soft);
    color: var(--gold-deep); cursor: pointer; font-size: .9rem; line-height: 1; display: inline-flex;
    align-items: center; justify-content: center; }
.sel-chip .chip-x:hover { background: var(--geo); color: #fff; }
.sel-empty { font-size: .9rem; color: var(--gray-2); font-style: italic; }

/* ----------------------------- Google Maps ----------------------------- */

.app-map { height: calc(100vh - var(--topbar-h) - var(--nav-h)); overflow: hidden; }
.app-map .map-stage { flex: 1; min-height: 0; }
.map-canvas-host { flex: 1; position: relative; min-height: 0; border-radius: var(--radius);
    overflow: hidden; background: #fbfaf6; }
#gmap { position: absolute; inset: 0; width: 100%; height: 100%; }

.map-search { display: flex; align-items: center; gap: 8px; position: relative; }
.map-search input { width: 220px; max-width: 46vw; }

/* Consent-Overlay vor dem Laden von Google Maps */
.map-consent { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: var(--gold-soft); padding: 24px; z-index: 5; }
.map-consent[hidden] { display: none; }
.map-consent__box { background: #fff; border: 1px solid var(--gold-light); border-radius: var(--radius);
    padding: 22px 24px; max-width: 400px; box-shadow: var(--shadow); text-align: center; }
.map-consent__box h3 { margin: 0 0 8px; color: var(--gold-deep); }
.map-consent__box p { margin: 0 0 16px; font-size: .9rem; color: var(--gray); line-height: 1.5; }

.map-hint { position: absolute; left: 14px; top: 14px; background: rgba(255,255,255,.92);
    border: 1px solid var(--gold-light); border-radius: 8px; padding: 7px 12px; font-size: .82rem;
    color: var(--gold-deep); pointer-events: none; max-width: 70%; line-height: 1.4; z-index: 4; }
.map-hint[hidden] { display: none; }

/* Auswahl-Overlay (gewählte Länder) unten auf der Karte */
.map-pick { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 4;
    background: rgba(255,255,255,.96); border: 1px solid var(--gold-light); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 12px 14px; max-height: 42%; overflow: auto; }
.map-pick[hidden] { display: none; }
.map-pick h4 { margin: 0 0 8px; font-size: .76rem; text-transform: uppercase; letter-spacing: .7px;
    color: var(--gold-deep); }

@media (max-width: 980px) {
    .app-map { height: auto; }
    .map-canvas-host { min-height: 60vh; }
}
@media (max-width: 600px) {
    .form-grid { grid-template-columns: 1fr; }
    .land-grid { grid-template-columns: 1fr 1fr; }
    .stepper li { font-size: 0; }
    .stepper li.is-active { font-size: .68rem; }
    .map-search input { width: 150px; }
}
