:root {
    --blau: #1a56db;
    --blau-dunkel: #1542a8;
    --text: #1a1d23;
    --text-grau: #5b6470;
    --rahmen: #e7e9ee;
    --bg: #ffffff;
    --bg-grau: #f6f7f9;
    --radius: 14px;
    --schatten: 0 1px 2px rgba(16, 24, 40, .05);
    --schatten-hover: 0 12px 28px rgba(16, 24, 40, .12);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.55;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main { flex: 1; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

a { color: var(--blau); text-decoration: none; }

/* ---------- Header ---------- */
.site-header {
    border-bottom: 1px solid var(--rahmen);
    background: rgba(255, 255, 255, .9);
    backdrop-filter: saturate(180%) blur(8px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.logo {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -.02em;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.main-nav a { color: var(--text-grau); font-weight: 500; }
.main-nav a:hover { color: var(--text); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 9px 18px;
    border-radius: 10px;
    font-weight: 600;
    font-size: .92rem;
    transition: all .15s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary { background: var(--blau); color: #fff; }
.btn-primary:hover { background: var(--blau-dunkel); }

.btn-outline {
    border-color: var(--rahmen);
    color: var(--text) !important;
}
.btn-outline:hover { border-color: var(--blau); color: var(--blau) !important; }

/* ---------- Account-Menü (Header) ---------- */
.nav-login { color: var(--text) !important; font-weight: 600; }
.nav-login:hover { color: var(--blau) !important; }
.account { position: relative; }
.account-trigger {
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font: inherit;
    color: var(--text); background: var(--bg); border: 1px solid var(--rahmen);
    border-radius: 999px; padding: 4px 12px 4px 4px; transition: border-color .15s, box-shadow .15s;
}
.account-trigger:hover { border-color: var(--blau); box-shadow: var(--schatten); }
.avatar {
    width: 32px; height: 32px; border-radius: 50%; background: var(--blau); color: #fff; flex: none;
    display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .82rem;
}
.account-name {
    font-weight: 600; font-size: .9rem; max-width: 150px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.account-trigger .chev { color: var(--text-grau); font-size: .8rem; }
.account-menu {
    position: absolute; right: 0; top: calc(100% + 10px); width: 248px; background: #fff;
    border: 1px solid var(--rahmen); border-radius: 14px; box-shadow: var(--schatten-hover);
    padding: 6px; z-index: 50;
}
.account-menu[hidden] { display: none; }
.account-head { display: flex; gap: 10px; align-items: center; padding: 8px 8px 4px; }
.avatar-lg { width: 42px; height: 42px; font-size: 1rem; }
.account-head-txt { min-width: 0; }
.account-head-name { font-weight: 700; font-size: .92rem; line-height: 1.25; }
.account-head-mail { color: var(--text-grau); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu > a {
    display: block; padding: 9px 10px; border-radius: 9px; color: var(--text) !important;
    font-weight: 500; font-size: .9rem;
}
.account-menu > a:hover { background: var(--bg-grau); }
.account-sep { height: 1px; background: var(--rahmen); margin: 6px 4px; }
.account-logout { color: #c0392b !important; font-weight: 600; }
.account-logout:hover { background: #fdecea !important; }
/* Dev-Login (nur DEBUG sichtbar) – bewusst als Werkzeug erkennbar */
.dev-login {
    color: #b45309 !important; font-weight: 600; font-size: .82rem;
    border: 1px dashed #f59e0b; border-radius: 8px; padding: 5px 10px;
}
.dev-login:hover { background: #fffbeb; }

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(180deg, var(--bg-grau), var(--bg));
    padding: 64px 0 40px;
    text-align: center;
}

.hero h1 {
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: -.03em;
    margin: 0 0 12px;
}

.hero-sub {
    font-size: 1.15rem;
    color: var(--text-grau);
    max-width: 560px;
    margin: 0 auto;
}

/* ---------- Filter ---------- */
.filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 8px 0 36px;
}

.filter-chip {
    padding: 7px 16px;
    border-radius: 999px;
    border: 1px solid var(--rahmen);
    color: var(--text-grau);
    font-weight: 500;
    font-size: .9rem;
    transition: all .15s ease;
}

.filter-chip:hover { border-color: var(--blau); color: var(--blau); }
.filter-chip.is-active {
    background: var(--blau);
    border-color: var(--blau);
    color: #fff;
}

/* ---------- Kachel-Grid ---------- */
.kachel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 26px;
    padding-bottom: 72px;
}

.kachel {
    background: var(--bg);
    border: 1px solid var(--rahmen);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--schatten);
    transition: transform .18s ease, box-shadow .18s ease;
    display: flex;
    flex-direction: column;
}

.kachel:hover {
    transform: translateY(-4px);
    box-shadow: var(--schatten-hover);
}

.kachel-bild {
    position: relative;
    aspect-ratio: 16 / 10;
    background: var(--bg-grau);
    overflow: hidden;
}

.kachel-bild img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.kachel-bild-platzhalter {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--blau), #6d28d9);
    text-transform: uppercase;
}

.kachel-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, .92);
    color: var(--text);
    font-size: .74rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    box-shadow: var(--schatten);
}

.kachel-body {
    padding: 18px 20px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.kachel-name {
    font-size: 1.18rem;
    font-weight: 700;
    margin: 0 0 2px;
    letter-spacing: -.01em;
}

.kachel-untertitel {
    color: var(--blau);
    font-weight: 600;
    font-size: .86rem;
    margin: 0 0 10px;
}

.kachel-text {
    color: var(--text-grau);
    font-size: .94rem;
    margin: 0 0 16px;
}

.kachel-link {
    margin-top: auto;
    font-weight: 600;
    font-size: .92rem;
}
.kachel-link:hover { color: var(--blau-dunkel); }

/* ---------- Leerzustand ---------- */
.leer {
    text-align: center;
    padding: 80px 0 120px;
    color: var(--text-grau);
}
.leer p { font-size: 1.1rem; margin-bottom: 18px; }

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--rahmen);
    padding: 28px 0;
    color: var(--text-grau);
    font-size: .9rem;
    text-align: center;
}

/* ---------- Suche & Filter ---------- */
.suche {
    background: var(--bg-grau);
    border: 1px solid var(--rahmen);
    border-radius: var(--radius);
    padding: 18px 20px;
    margin: 10px 0 22px;
}

.suche-zeile {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.suchfeld {
    flex: 1 1 320px;
    padding: 11px 16px;
    border: 1px solid var(--rahmen);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
}
.suchfeld:focus { outline: none; border-color: var(--blau); box-shadow: 0 0 0 3px rgba(26,86,219,.12); }

.umkreis-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 500;
    color: var(--text-grau);
    cursor: pointer;
    white-space: nowrap;
}

.umkreis-steuerung {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: .92rem;
    color: var(--text-grau);
}
.umkreis-steuerung input[type=range] { accent-color: var(--blau); }

.mini-btn {
    border: 1px solid var(--rahmen);
    background: #fff;
    border-radius: 8px;
    padding: 5px 10px;
    font-size: .82rem;
    cursor: pointer;
    color: var(--text-grau);
}
.mini-btn:hover { border-color: var(--blau); color: var(--blau); }

.umkreis-hinweis { margin: 0; font-size: .85rem; color: var(--blau); }

button.filter-chip { cursor: pointer; font-family: inherit; background: #fff; }

/* ---------- Karte ---------- */
.karte {
    height: 440px;
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid var(--rahmen);
    margin-bottom: 16px;
    z-index: 1;
    resize: vertical;
    overflow: hidden;
    min-height: 300px;
}

/* Vollbild-Schaltfläche */
.vollbild-btn {
    width: 30px; height: 30px; line-height: 30px; text-align: center;
    font-size: 18px; background: #fff; color: #333; display: block;
}
.vollbild-btn:hover { background: #f4f4f4; }

/* Karte im Vollbild */
.karte:fullscreen, .karte.ist-vollbild {
    height: 100% !important; width: 100% !important;
    border-radius: 0; border: 0; resize: none;
}
.karte:-webkit-full-screen { height: 100% !important; width: 100% !important; border-radius: 0; }

.treffer { color: var(--text-grau); font-size: .9rem; font-weight: 500; margin: 0 0 22px; }

/* ---------- Gruppen ---------- */
.gruppe { margin-bottom: 14px; }
.gruppe-titel {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -.02em;
    margin: 26px 0 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.gruppe-anzahl {
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-grau);
    background: var(--bg-grau);
    border: 1px solid var(--rahmen);
    border-radius: 999px;
    padding: 2px 10px;
}

/* ---------- Kachel: Adresse, Galerie, Kontakt ---------- */
.kachel-adresse { color: var(--text-grau); font-size: .85rem; margin: 0 0 8px; }

.kachel-galerie {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin: 4px 0 12px;
}
.kachel-galerie img {
    width: 100%;
    height: 52px;
    object-fit: cover;
    border-radius: 6px;
}

.kachel-kontakt {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: .85rem;
    color: var(--text-grau);
    margin-bottom: 12px;
    word-break: break-word;
}
.kachel-kontakt a { color: var(--text-grau); }
.kachel-kontakt a:hover { color: var(--blau); }

.kachel-name { font-size: 1.12rem; font-weight: 700; margin: 0 0 4px; letter-spacing: -.01em; }

/* Gruppen-Titel über die volle Grid-Breite */
.kachel-grid > .gruppe-titel {
    grid-column: 1 / -1;
    margin: 18px 0 4px;
}

.chip-anzahl {
    font-size: .72rem;
    color: var(--text-grau);
    background: rgba(0,0,0,.05);
    border-radius: 999px;
    padding: 1px 7px;
    margin-left: 2px;
}
.filter-chip.is-active .chip-anzahl { color: #fff; background: rgba(255,255,255,.25); }

.mehr-wrap { text-align: center; padding: 10px 0 60px; }

/* ---------- Touren / Ausflüge ---------- */
.tour-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: .85rem; color: var(--text-grau); margin: 4px 0 10px; }
.tour-fuss { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.tour-preis { font-weight: 700; color: var(--text); }
.tour-datum { font-size: .82rem; color: var(--blau); font-weight: 600; }

.tour-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.badge { background: var(--bg-grau); border: 1px solid var(--rahmen); border-radius: 999px;
    padding: 5px 12px; font-size: .85rem; font-weight: 500; color: var(--text); }
.badge-preis { background: var(--blau); border-color: var(--blau); color: #fff; }

.termine { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.termin { display: flex; justify-content: space-between; align-items: center; gap: 14px;
    border: 1px solid var(--rahmen); border-radius: 12px; padding: 14px 18px; background: #fff; }
.termin-voll { opacity: .6; }
.termin-rechts { display: flex; align-items: center; gap: 14px; }
.termin-frei { color: var(--gruen, #15803d); font-weight: 600; font-size: .9rem; }
.termin-voll-tag { color: var(--text-grau); font-weight: 600; font-size: .9rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.hinweis-box { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af;
    border-radius: 10px; padding: 10px 14px; font-size: .9rem; }

/* ---------- Concierge ---------- */
.concierge-kopf { display: flex; flex-wrap: wrap; gap: 22px; align-items: center;
    margin: 18px 0; padding: 16px 20px; background: var(--bg-grau);
    border: 1px solid var(--rahmen); border-radius: var(--radius); }
.concierge-stat { font-size: 1rem; color: var(--text-grau); }
.concierge-stat strong { font-size: 1.5rem; color: var(--text); display: block; }
.concierge-qr { margin-left: auto; text-align: center; color: var(--text-grau); font-size: .78rem; }
.concierge-qr img, .concierge-qr canvas { border-radius: 8px; }

/* ---------- Nachrichten ---------- */
.nachricht { padding: 11px 16px; border-radius: 10px; margin-bottom: 10px; font-weight: 500; font-size: .92rem; }
.nachricht-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.nachricht-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.nachricht-info, .nachricht-warning { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

/* ---------- Formulare ---------- */
.formular-wrap { max-width: 560px; padding-top: 30px; padding-bottom: 60px; }
.formular p { margin: 0 0 14px; }
.formular label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 4px; color: var(--text); }
.formular input[type=text], .formular input[type=email], .formular input[type=password],
.formular input[type=url], .formular input[type=number], .formular input[type=file],
.formular textarea, .formular select {
    width: 100%; padding: 10px 13px; border: 1px solid var(--rahmen); border-radius: 10px;
    font-size: 1rem; font-family: inherit; background: #fff; box-sizing: border-box;
}
.formular textarea:focus, .formular input:focus, .formular select:focus {
    outline: none; border-color: var(--blau); box-shadow: 0 0 0 3px rgba(26,86,219,.12); }
.formular .helptext { display: block; font-size: .8rem; color: var(--text-grau); font-weight: 400; margin-top: 3px; }
.formular ul { margin: 4px 0 0; padding-left: 18px; font-size: .82rem; color: var(--text-grau); }

/* ---------- Anbieter-Dashboard ---------- */
.dash-tour { border: 1px solid var(--rahmen); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; background: #fff; }
.dash-tour-kopf { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.dash-termine { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.dash-termin { background: var(--bg-grau); border: 1px solid var(--rahmen); border-radius: 8px;
    padding: 4px 10px; font-size: .85rem; display: flex; gap: 8px; align-items: center; }
.dash-termin-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dash-termin-form input { padding: 6px 9px; border: 1px solid var(--rahmen); border-radius: 8px; font-size: .85rem; }
.editor-werkzeuge { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }

.status-bestaetigt { color: #15803d; font-weight: 600; }
.status-offen { color: #b45309; font-weight: 600; }
.status-storniert { color: var(--text-grau); font-weight: 600; }

/* ---------- Karten-Marker, Cluster, Legende ---------- */
.pt-wrap { background: transparent; border: 0; }
.pt-dot {
    display: block; width: 14px; height: 14px; border-radius: 50%;
    border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}
.cl-wrap { background: transparent; }
.cl-bubble {
    border-radius: 50%; color: #fff; text-align: center; font-weight: 700;
    font-size: .8rem; box-shadow: 0 0 0 4px rgba(255, 255, 255, .55);
    border: 1px solid rgba(0, 0, 0, .15);
}
.karte-legende {
    background: rgba(255, 255, 255, .94); padding: 8px 11px; border-radius: 10px;
    box-shadow: var(--schatten); font-size: .78rem; line-height: 1.5; color: var(--text);
    max-width: 200px;
}
.karte-legende strong { display: block; margin-bottom: 4px; font-size: .8rem; }
.karte-legende div { display: flex; align-items: center; gap: 6px; }
.karte-legende span {
    width: 11px; height: 11px; border-radius: 50%; flex: 0 0 auto;
    border: 1px solid rgba(0, 0, 0, .15);
}

/* Namens-Labels an Markern (ab Zoom 16) */
.pt-label.leaflet-tooltip {
    background: rgba(255, 255, 255, .92);
    border: 0; box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
    font-size: .72rem; font-weight: 600; color: #1a1d23;
    padding: 1px 6px; border-radius: 5px; white-space: nowrap;
}
.pt-label.leaflet-tooltip::before { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
    .hero h1 { font-size: 2rem; }
    .kachel-grid { gap: 18px; }
    .karte { height: 320px; }
}
