:root {
    --brand: #173A5E;        /* Navy (Logo) */
    --brand-dark: #0F2A45;   /* dunkleres Navy – Hover & Verlauf */
    --brand-light: #2A5A86;  /* helleres Stahlblau – Verlauf */
    --accent: #F4B81F;       /* Gold (Logo) */
    --accent-dark: #D99E0A;  /* dunkleres Gold – Hover */
    --ink: #14253A;          /* sehr dunkles Navy – Text & Footer */
    --muted: #6b7280;
    --line: #e5e7eb;
    --bg-soft: #f7f8fa;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { line-height: 1.2; }
/* FocusOnNavigate setzt programmatisch Fokus auf h1 – kein sichtbarer Rahmen auf nicht-interaktiven Überschriften */
h1:focus, h2:focus, h3:focus { outline: none; }

/* ---------- Header ----------
   Default = solide/weiss (Unterseiten, kein Flash, funktioniert auch ohne JS).
   Auf Hero-Seiten (body:has(.hero)) ist der Header transparent, bis gescrollt wird
   (JS setzt dann .scrolled). So gibt es keinen Zustand mit weisser Schrift auf Weiss. */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(255,255,255,.92);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 2px 18px rgba(15,23,42,.06);
    transition: background .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.header-inner {
    max-width: 1180px; margin: 0 auto; padding: 12px 24px;
    display: flex; align-items: center; gap: 28px;
    transition: padding .25s ease;
}

/* Marke / Logo */
.brand { display: flex; align-items: center; text-decoration: none; }
.brand-logo { height: 52px; width: auto; display: block; transition: filter .25s ease; }

/* Navigation */
.main-nav { display: flex; gap: 26px; margin-left: auto; align-items: center; }
.main-nav a {
    color: var(--ink); font-weight: 500; font-size: .98rem; letter-spacing: .01em;
    padding: 4px 0; border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s;
}
.main-nav a:hover, .main-nav a.active { color: var(--brand); border-bottom-color: var(--accent); }

/* Hamburger + Collapse-Wrapper – auf Desktop unsichtbar bzw. layout-neutral.
   .nav-collapse: display:contents → Nav + Aktionen bleiben direkte Flex-Kinder
   von .header-inner (Desktop-Layout unverändert). Auf Mobile wird daraus ein Panel. */
.nav-collapse { display: contents; }
.nav-burger { display: none; }

/* Rechte Aktionen: Sprache + CTA */
.header-actions { display: flex; align-items: center; gap: 18px; }
.lang { display: flex; gap: 10px; align-items: center; font-size: .82rem; font-weight: 600; }
.lang a { color: var(--muted); transition: color .15s; }
.lang a:hover { color: var(--brand); }
.lang a.active { color: var(--brand); position: relative; }
.lang a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 2px; background: var(--accent); border-radius: 2px; }

.btn-cta {
    background: var(--accent); color: var(--brand-dark); font-weight: 700; font-size: .92rem;
    padding: 9px 20px; border-radius: 999px; white-space: nowrap;
    transition: transform .15s, box-shadow .15s, background .15s;
}
.btn-cta:hover { color: var(--brand-dark); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.18); }

.acct-link { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); font-weight: 600; font-size: .92rem; padding: 6px 10px; border-radius: 8px; transition: color .15s, background .15s; }
.acct-link:hover { color: var(--brand); background: var(--bg-soft); }

/* Hero-Seiten: Header transparent über dem Hero, solange nicht gescrollt */
body:has(.hero) .site-header:not(.scrolled) {
    background: transparent;
    border-bottom-color: transparent;
    box-shadow: none;
}
body:has(.hero) .site-header:not(.scrolled) .header-inner { padding-top: 20px; padding-bottom: 20px; }
body:has(.hero) .site-header:not(.scrolled) .brand-logo { filter: brightness(0) invert(1); }
body:has(.hero) .site-header:not(.scrolled) .main-nav a { color: #fff; }
body:has(.hero) .site-header:not(.scrolled) .acct-link { color: #fff; }
body:has(.hero) .site-header:not(.scrolled) .acct-link:hover { color: #fff; background: rgba(255,255,255,.14); }
body:has(.hero) .site-header:not(.scrolled) .lang a { color: rgba(255,255,255,.78); }
body:has(.hero) .site-header:not(.scrolled) .lang a:hover,
body:has(.hero) .site-header:not(.scrolled) .lang a.active { color: #fff; }

/* ---------- Main / Footer ---------- */
main { min-height: 60vh; }
/* Seiten ohne Hero: Inhalt unter den fixierten Header schieben */
main:not(:has(.hero)) { padding-top: 76px; }

/* Service-Dropdown (reines CSS, Hover/Focus) */
.nav-dd { position: relative; display: inline-block; }
.nav-dd-toggle { cursor: pointer; }
.nav-dd-menu { position: absolute; top: 100%; left: 0; min-width: 240px; background: #fff;
    border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 34px rgba(15,23,42,.16);
    padding: 8px; margin-top: 12px; display: none; z-index: 60; }
/* Unsichtbare Brücke über die Lücke, damit der Hover-Pfad nicht abreisst */
.nav-dd-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.nav-dd:hover .nav-dd-menu, .nav-dd:focus-within .nav-dd-menu { display: block; }
.nav-dd-menu a { display: block; padding: 9px 12px; border-radius: 7px; color: #1f2937 !important;
    font-size: .92rem; font-weight: 500; text-decoration: none; }
.nav-dd-menu a:hover { background: var(--bg-soft); color: var(--brand) !important; }
.nav-dd-head { display: block; padding: 12px 12px 4px; font-size: .7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-top: 1px solid var(--line); margin-top: 6px; }

.site-footer { background: var(--ink); color: #cbd5e1; margin-top: 64px; }
.footer-inner {
    max-width: 1180px; margin: 0 auto; padding: 40px 16px;
    display: flex; gap: 32px; flex-wrap: wrap; align-items: flex-start;
}
.site-footer strong { color: #fff; }
.footer-nav { display: flex; gap: 18px; flex-wrap: wrap; margin-left: auto; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: var(--accent); }
.footer-copy { width: 100%; border-top: 1px solid #374151; padding-top: 16px; margin-top: 8px; font-size: .85rem; color: #9ca3af; }

/* ---------- Buttons ---------- */
.btn-brand {
    display: inline-block; background: var(--brand); color: #fff; font-weight: 600;
    padding: 12px 22px; border-radius: 8px; border: none; cursor: pointer; transition: background .15s;
}
.btn-brand:hover { background: var(--brand-dark); color: #fff; }

.btn-outline {
    display: inline-block; background: #fff; color: var(--ink); border: 1px solid var(--line); font-weight: 600;
    padding: 11px 20px; border-radius: 8px; cursor: pointer; transition: border-color .15s;
}
.btn-outline:hover { border-color: var(--brand); }

/* Auth-Formulare (gemeinsam) */
.auth-page { max-width: 460px; margin: 0 auto; padding: 36px 16px 64px; }
.auth-page h1 { font-size: 1.7rem; font-weight: 800; margin: 0 0 8px; }
.auth-page > p { color: var(--muted); margin: 0 0 22px; }
.auth-back { margin-top: 18px; font-size: .9rem; }
.auth-forgot { display: inline-block; margin-top: 10px; font-size: .85rem; }
.auth-field { display: block; margin-bottom: 14px; }
.auth-field > span { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
.auth-field input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; color: var(--ink); background: #fff; box-sizing: border-box; }
.auth-field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(23,58,94,.12); }
.auth-error { background: #fdecec; border: 1px solid #f5c2c2; color: #b42318; border-radius: 10px; padding: 12px 16px; margin-bottom: 18px; font-size: .92rem; }
.auth-info { background: #ecfdf3; border: 1px solid #a6f4c5; color: #067647; border-radius: 10px; padding: 12px 16px; margin-bottom: 18px; font-size: .92rem; }

@media (max-width: 860px) {
    .header-inner { gap: 16px; padding: 16px 18px; }
    .main-nav { gap: 18px; font-size: .92rem; }
    .wm-main { font-size: 1.3rem; }
    .wm-sub { font-size: .62rem; }
}
@media (max-width: 680px) {
    .brand img, .brand-logo { height: 40px; }

    /* --- Hamburger-Button --- */
    .nav-burger {
        display: inline-flex; align-items: center; justify-content: center;
        margin-left: auto; width: 44px; height: 44px; padding: 0;
        background: transparent; border: none; cursor: pointer;
        color: var(--ink); border-radius: 10px; transition: background .15s;
    }
    .nav-burger:hover { background: var(--bg-soft); }
    .nav-burger-bars { position: relative; display: block; width: 22px; height: 16px; }
    .nav-burger-bars span {
        position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px;
        background: currentColor; transition: transform .25s ease, opacity .15s ease, top .25s ease;
    }
    .nav-burger-bars span:nth-child(1) { top: 0; }
    .nav-burger-bars span:nth-child(2) { top: 7px; }
    .nav-burger-bars span:nth-child(3) { top: 14px; }
    .site-header.nav-open .nav-burger-bars span:nth-child(1) { top: 7px; transform: rotate(45deg); }
    .site-header.nav-open .nav-burger-bars span:nth-child(2) { opacity: 0; }
    .site-header.nav-open .nav-burger-bars span:nth-child(3) { top: 7px; transform: rotate(-45deg); }

    /* --- Collapse wird zum Dropdown-Panel --- */
    .nav-collapse {
        display: none;
        position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 4px;
        background: #fff; border-top: 1px solid var(--line);
        box-shadow: 0 18px 40px rgba(15,23,42,.16);
        padding: 8px 20px 18px; z-index: 90;
        max-height: calc(100vh - 64px); overflow-y: auto;
    }
    .site-header.nav-open .nav-collapse { display: flex; }

    /* Nav vertikal, volle Breite */
    .main-nav { flex-direction: column; align-items: stretch; gap: 0; margin: 0; width: 100%; }
    .main-nav > a, .nav-dd-toggle {
        display: block; padding: 13px 4px; font-size: 1.02rem; font-weight: 600;
        border-bottom: 1px solid var(--line); border-radius: 0;
        color: var(--ink) !important;
    }
    .main-nav > a:hover { border-bottom-color: var(--line); color: var(--brand) !important; }
    .nav-dd-caret { display: none; }            /* ▾ irrelevant, Untermenü ist offen */

    /* Service-Untermenü: immer aufgeklappt, eingerückt (kein Hover auf Touch) */
    .nav-dd { display: block; width: 100%; position: static; }
    .nav-dd-toggle { pointer-events: none; cursor: default; }
    .nav-dd-menu {
        display: block !important; position: static;
        box-shadow: none; border: none; border-radius: 0;
        padding: 2px 0 6px 12px; margin: 0; min-width: 0;
    }
    .nav-dd-menu::before { display: none; }      /* Hover-Brücke nicht nötig */
    .nav-dd-menu a {
        padding: 11px 6px; font-size: .97rem;
        border-bottom: 1px solid var(--line); border-radius: 0;
    }
    .nav-dd-menu a:last-child { border-bottom: none; }
    .nav-dd-head { padding: 12px 6px 4px; border-top: none; margin: 0; }

    /* Sprache + Konto im Panel */
    .header-actions { flex-direction: column; align-items: stretch; gap: 14px; margin: 14px 0 0; width: 100%; }
    .lang { display: flex; gap: 20px; justify-content: flex-start; padding: 2px 6px; font-size: .95rem; }
    .acct-link, .btn-cta { align-self: flex-start; }

    /* Über dem Hero: Burger weiss, solange geschlossen … */
    body:has(.hero) .site-header:not(.scrolled) .nav-burger { color: #fff; }
    /* … aber sobald offen: Header solide weiss + dunkler Inhalt (Panel ist weiss) */
    body:has(.hero) .site-header.nav-open:not(.scrolled) {
        background: rgba(255,255,255,.97); border-bottom-color: var(--line);
        box-shadow: 0 8px 24px rgba(15,23,42,.10);
    }
    body:has(.hero) .site-header.nav-open:not(.scrolled) .brand-logo { filter: none; }
    body:has(.hero) .site-header.nav-open:not(.scrolled) .nav-burger { color: var(--ink); }
    body:has(.hero) .site-header.nav-open:not(.scrolled) .lang a { color: var(--muted); }
    body:has(.hero) .site-header.nav-open:not(.scrolled) .acct-link { color: var(--ink); }
}

/* ---------- Geteilt: Hero + Suchleiste + Karten (Landing & Liste) ---------- */
.hero { position:relative; color:#fff; padding:150px 16px 88px; text-align:center; overflow:hidden;
        background:linear-gradient(135deg, rgba(16,34,56,.82) 0%, rgba(23,58,94,.6) 52%, rgba(31,74,115,.5) 100%), url('/img/hero.jpg');
        background-size:cover; background-position:center; }
.hero::before { content:""; position:absolute; inset:0; pointer-events:none;
        background:radial-gradient(120% 80% at 80% -10%, rgba(255,255,255,.22), transparent 60%),
                  radial-gradient(90% 70% at 0% 110%, rgba(0,0,0,.18), transparent 55%); }
.hero-inner { position:relative; max-width:760px; margin:0 auto; }
.hero-kicker { display:inline-block; text-transform:uppercase; letter-spacing:.14em; font-size:.8rem; font-weight:700; color:var(--accent); margin-bottom:14px; }
.hero h1 { margin:0 0 12px; font-size:2.6rem; font-weight:800; }
.hero p { margin:0 auto; max-width:560px; font-size:1.12rem; opacity:.92; }

.searchbar { display:flex; gap:0; margin:34px auto 0; max-width:680px; background:#fff; border-radius:14px;
             padding:8px; box-shadow:0 16px 44px rgba(0,0,0,.24); align-items:flex-end; flex-wrap:wrap; }
.sb-field { flex:1 1 130px; text-align:left; padding:6px 14px; min-width:120px; }
.sb-field + .sb-field { border-left:1px solid var(--line); }
.sb-field label { display:block; font-size:.68rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); margin-bottom:3px; }
.sb-field input, .sb-field select { width:100%; border:none; font:inherit; font-size:.95rem; color:var(--ink); background:transparent; padding:4px 0; }
.sb-field input:focus, .sb-field select:focus { outline:none; }
.sb-btn { flex:0 0 auto; background:var(--accent); color:var(--brand-dark); font-weight:700; border:none;
          border-radius:10px; padding:14px 28px; cursor:pointer; font-size:.95rem; transition:transform .15s, box-shadow .15s; }
.sb-btn:hover { transform:translateY(-1px); box-shadow:0 8px 18px rgba(0,0,0,.22); }

.container { max-width:1180px; margin:0 auto; padding:48px 16px; }

.card { display:block; border:1px solid var(--line); border-radius:12px; overflow:hidden;
        text-decoration:none; color:inherit; background:#fff; transition:box-shadow .15s, transform .15s; }
.card:hover { box-shadow:0 8px 24px rgba(0,0,0,.12); transform:translateY(-2px); }
.card-img { height:200px; background-size:cover; background-position:center; background-color:#eef2f5; }
.card-body { padding:16px; }
.card-body h3 { margin:0 0 4px; font-size:1.15rem; }
.card-loc { color:var(--muted); font-size:.9rem; margin-bottom:12px; text-transform:capitalize; }
.card-facts { display:flex; flex-wrap:wrap; gap:6px; }
.card-facts span { background:var(--bg-soft); border-radius:999px; padding:3px 10px; font-size:.8rem; color:#374151; }
.card-price { margin-top:14px; font-size:.95rem; color:var(--ink); }
.card-price strong { color:var(--brand); font-weight:800; }
.card-price span { color:var(--muted); font-size:.85rem; }

@media (max-width:560px) {
    .searchbar { gap:4px; }
    .sb-field { flex:1 1 100%; }
    .sb-field + .sb-field { border-left:none; border-top:1px solid var(--line); }
    .sb-btn { flex:1 1 100%; margin-top:6px; }
    .hero h1 { font-size:2rem; }
}

/* ---------- Inhaltsseiten (Für Gäste / Für Eigentümer) ---------- */
.cpage-hero { background:linear-gradient(135deg, rgba(16,34,56,.86) 0%, rgba(31,74,115,.72) 100%), url('/img/hero.jpg');
              background-size:cover; background-position:center; color:#fff; padding:54px 16px 48px; text-align:center; }
.cpage-hero h1 { font-size:2.2rem; font-weight:800; margin:0; }
.cpage-hero p { margin:10px auto 0; max-width:620px; opacity:.92; font-size:1.05rem; }
.cpage { max-width:860px; margin:0 auto; padding:44px 16px 64px; }
.cpage h2 { font-size:1.45rem; font-weight:800; color:var(--brand); margin:8px 0 16px; }
.cpage-lead { color:#374151; font-size:1.05rem; line-height:1.65; }
.cpage-lead p { margin:0 0 12px; }
.checklist { list-style:none; margin:0; padding:0; }
.checklist li { display:flex; gap:14px; align-items:flex-start; padding:15px 0; border-bottom:1px solid var(--line); color:#374151; line-height:1.55; }
.checklist li:last-child { border-bottom:none; }
.checklist li::before { content:""; flex:0 0 auto; width:22px; height:22px; margin-top:1px;
    background:no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a7f3c' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E"); }
.cpage-cta { background:var(--bg-soft); border:1px solid var(--line); border-radius:14px; padding:26px; text-align:center; margin-top:30px; }
.cpage-cta h3 { margin:0 0 8px; font-size:1.2rem; }
.cpage-cta p { color:var(--muted); margin:0 0 16px; }

.pf-row2 { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
@media (max-width:620px) { .pf-row2 { grid-template-columns:1fr; } }
.cpage-contact { display:grid; grid-template-columns:1fr 1.25fr; gap:30px; align-items:start; }
.cpage-info { border:1px solid var(--line); border-radius:14px; padding:22px; }
.cpage-info h3 { margin:0 0 12px; font-size:1.05rem; }
.cpage-info p { margin:0 0 6px; color:#374151; }
.cpage-info a { color:var(--brand); text-decoration:none; }
.cpage-info a:hover { text-decoration:underline; }
.legal-sec { margin:0 0 20px; }
.legal-sec h3 { font-size:1.05rem; color:var(--brand); margin:0 0 6px; }
.legal-sec p { color:#374151; line-height:1.62; margin:0; white-space:pre-line; }
.legal-foot { color:var(--muted); font-style:italic; margin:18px 0 36px; }
@media (max-width:680px) { .cpage-contact { grid-template-columns:1fr; } }

/* ---------- Blazor (beibehalten) ---------- */
.blazor-error-boundary {
    background: #b32121; padding: 1rem; color: white; border-radius: 6px;
}
.blazor-error-boundary::after { content: "Ein Fehler ist aufgetreten."; }

/* ---------- Cookie-Hinweis ---------- */
/* Standardmässig versteckt; JS zeigt das Banner nur, wenn noch kein Consent-Cookie da ist. */
.cookie-banner { display: none; position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1500; }
.cookie-banner.is-visible { display: block; }
.cookie-inner {
    max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
    background: #fff; border: 1px solid var(--line); border-radius: 12px;
    box-shadow: 0 14px 40px rgba(15,23,42,.18); padding: 16px 20px;
}
.cookie-text { margin: 0; flex: 1 1 320px; color: #374151; font-size: .9rem; line-height: 1.5; }
.cookie-text a { color: var(--brand); font-weight: 600; text-decoration: none; white-space: nowrap; }
.cookie-text a:hover { text-decoration: underline; }
.cookie-actions { flex: 0 0 auto; display: flex; gap: 10px; align-items: center; }
.cookie-btn { border: none; cursor: pointer; font: inherit; font-weight: 700; font-size: .9rem;
    padding: 11px 24px; border-radius: 999px; transition: background .15s, border-color .15s, transform .15s; }
.cookie-accept { background: var(--brand); color: #fff; }
.cookie-accept:hover { background: var(--brand-dark); transform: translateY(-1px); }
.cookie-decline { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.cookie-decline:hover { border-color: var(--brand); }
@media (max-width: 560px) {
    .cookie-inner { padding: 14px 16px; }
    .cookie-actions { width: 100%; }
    .cookie-btn { flex: 1 1 0; padding: 11px 14px; }
}
