:root {
    --kiwi: #76c016;
    --kiwi-dark: #58940e;
    --kiwi-soft: #ecf8dc;
    --beige: #f2ead9;
    --wood: #d8c3a5;
    --wood-dark: #b1946a;
    --ink: #33361f;
    --muted: #607368;
    --bg: #fbf9f3;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(51, 54, 31, 0.08);
    --shadow-lg: 0 18px 50px rgba(51, 54, 31, 0.14);
}

* {
    box-sizing: border-box;
    scroll-behavior: smooth;
}

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

body {
    font-family: "Nunito Sans", system-ui, sans-serif;
    color: var(--ink);
    background-color: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
.display-font {
    font-family: "Exo 2", system-ui, sans-serif;
    font-weight: 700;
    letter-spacing: -0.01em;
}

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

a:hover {
    color: var(--kiwi);
}

/* ---------- Utilities ---------- */

.text-kiwi {
    color: var(--kiwi) !important;
}

.text-kiwi-dark {
    color: var(--kiwi-dark) !important;
}

.text-muted-green {
    color: var(--muted) !important;
}

.text-balance {
    color: var(--ink) !important;
}

.bg-kiwi {
    background-color: var(--kiwi) !important;
}

.bg-kiwi-soft {
    background-color: var(--kiwi-soft) !important;
}

.bg-beige {
    background-color: var(--beige) !important;
}

.bg-wood {
    background-color: var(--wood) !important;
    background-image: url("../images/wood2.jpg") !important;
}

.section {
    padding: 5rem 0;
}

.section-sm {
    padding: 3rem 0;
}

/* ---------- Buttons ---------- */

.btn-kiwi {
    padding: 0.65rem 1.6rem;
    font-weight: 700;
    color: #fff;
    background-color: var(--kiwi);
    border: 2px solid var(--kiwi);
    border-radius: 999px;
    transition: all 0.2s ease;
}

.btn-kiwi:hover {
    color: #fff;
    background-color: var(--kiwi-dark);
    border-color: var(--kiwi-dark);
    transform: translateY(-2px);
}

.btn-outline-kiwi {
    padding: 0.65rem 1.6rem;
    font-weight: 700;
    color: var(--kiwi-dark);
    background-color: transparent;
    border: 2px solid var(--kiwi);
    border-radius: 999px;
    transition: all 0.2s ease;
}

.btn-outline-kiwi:hover {
    color: #fff;
    background-color: var(--kiwi);
}

.btn-danger {
    padding: 0.65rem 1.6rem;
    font-weight: 700;
    border-radius: 999px;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    transform: translateY(-2px);
}

/* ---------- Typography ---------- */

.eyebrow {
    display: inline-block;
    margin-bottom: 1rem;
    padding: 0.35rem 0.9rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--kiwi-dark);
    background: var(--kiwi-soft);
    border-radius: 999px;
}

.hero .eyebrow,
.bg-kiwi-soft .eyebrow {
    background: var(--white);
}

.section-title {
    font-size: clamp(1.9rem, 3.5vw, 2.8rem);
}

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

#site-header {
    position: relative;
    z-index: 1030;
    transform: none;
    filter: none;
    perspective: none;
    contain: none;
    will-change: auto;
}

/* ---------- Hours bar ---------- */

.hours-bar {
    color: #eef1e4;
    font-size: 0.9rem;
    background-color: var(--ink);
}

.hours-bar a,
.hours-bar a:visited,
.hours-bar a:hover,
.hours-bar a:active {
    color: #eef1e4;
}

.hours-bar .status-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 6px;
    background: #9aa088;
    border-radius: 50%;
}

.hours-bar .status-dot.open {
    background: #8fe04a;
    box-shadow: 0 0 0 3px rgba(143, 224, 74, 0.25);
}

.hours-bar .status-dot.closed {
    background: #e07a4a;
    box-shadow: 0 0 0 3px rgba(224, 122, 74, 0.25);
}

/* ---------- Navbar ---------- */

.navbar-laube {
    position: sticky !important;
    top: 0 !important;
    z-index: 1040;
    width: 100%;
    margin: 0;
    background-color: rgba(251, 249, 243, 0.98);
    box-shadow: 0 2px 20px rgba(51, 54, 31, 0.06);
    transition: box-shadow 0.25s ease, background-color 0.25s ease;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* ---------- Navbar brand ---------- */

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.navbar-brand img {
    width: auto;
    height: 100px;
    transition: height 0.25s ease;
}
.navbar-laube.is-sticky .navbar-brand img {
    height: 45px;
}

.brand-text {
    line-height: 1.05;
}

.brand-text .name {
    font-family: "Exo 2", system-ui, sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ink);
    transition: font-size 0.25s ease;
}

.brand-text .sub {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--kiwi-dark);
    transition: font-size 0.25s ease;
}

/* ---------- Navbar links ---------- */

.navbar-laube .nav-link {
    padding: 0.4rem 0.95rem !important;
    margin: 0 0.15rem;
    font-weight: 600;
    color: var(--ink);
    border-radius: 999px;
    transition: all 0.15s ease;
}

.navbar-laube .nav-link:hover {
    color: var(--kiwi-dark);
    background: var(--kiwi-soft);
}

.navbar-laube .nav-link.active {
    color: #fff;
    background: var(--kiwi);
}

/* ---------- Progressbar ---------- */

.navbar-laube #progressContainer {
    position: absolute !important;
    right: 0;
    bottom: 0;
    left: 0;
    display: block !important;
    width: 100%;
    height: 4px;
    z-index: 1041;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.85);
}

.navbar-laube #progressBar {
    display: block !important;
    width: 0;
    height: 4px;
    min-height: 4px;
    background: linear-gradient(90deg, var(--kiwi-dark), var(--kiwi), #a6d94a);
    box-shadow: 0 0 12px rgba(122, 181, 29, 0.75);
    transition: width 0.08s linear;
}

/* ---------- Ticker ---------- */

.ticker-container {
    display: block;
    width: 100%;
    min-height: 36px;
    overflow: hidden;
    white-space: nowrap;
    cursor: pointer;
    background-color: #fff;
    line-height: 1.4;
}

.ticker-text {
    display: inline-block;
    min-height: 36px;
    padding-left: 100%;
    line-height: 36px;
    animation: ticker-loop 20s linear infinite;
}

.ticker-item {
    display: inline-block;
    padding: 0 20px;
    margin-right: 5px;
    font-weight: 700;
    line-height: 36px;
}

.ticker-paused {
    animation-play-state: paused !important;
}

@keyframes ticker-loop {
    from {
        transform: translate3d(0, 0, 0);
    }

    to {
        transform: translate3d(-100%, 0, 0);
    }
}

/* ---------- today-teaser ---------- */

#today-teaser {
    position: relative;
}

#today-teaser.today-teaser-fixed {
    position: fixed;
    top: var(--fixed-navbar-height, 0px);
    right: 0;
    left: 0;
    z-index: 1020;
    background: var(--bg);
    box-shadow: 0 3px 15px rgba(51, 54, 31, 0.08);
}

.today-teaser-placeholder {
    display: block;
    width: 100%;
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, var(--kiwi-soft) 0%, var(--bg) 100%);
}

.hero-img-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: var(--shadow-lg);
}

.hero-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-badge {
    position: absolute;
    bottom: 1.2rem;
    left: 1.2rem;
    display: flex;
    align-items: end;
    gap: 0.8rem;
    padding: 0.9rem 1.2rem;
    background: linear-gradient(
        to top,
        rgba(255, 255, 255, 1) 0%,
        rgba(255, 255, 255, 0.25) 30%,
        transparent 100%
    );
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.hero-badge .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    font-size: 1.2rem;
    color: var(--kiwi-dark);
    background: var(--kiwi-soft);
    border-radius: 12px;
}

.blob {
    position: absolute;
    z-index: 0;
    border-radius: 42% 58% 63% 37% / 42% 45% 55% 58%;
    background: var(--wood);
    opacity: 0.35;
}

/* ---------- Cards ---------- */

.info-card {
    height: 100%;
    padding: 2rem;
    background: var(--white);
    border: 1px solid rgba(216, 195, 165, 0.35);
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.info-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.info-card .icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 1.1rem;
    font-size: 1.5rem;
    color: var(--kiwi-dark);
    background: var(--kiwi-soft);
    border-radius: 16px;
}

.card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    margin-top: -16px;
    font-size: 1.5rem;
    background-color: var(--kiwi-soft);
    border-radius: 16px;
}

/* ---------- Image overlays ---------- */

.ki-image-overlay {
    z-index: 5;
    font-family: var(--bs-font-sans-serif), sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    opacity: 0.85;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.ratio .ki-image-overlay {
    top: auto !important;
    z-index: 2;
    width: fit-content;
    height: fit-content;
}

@media (min-width: 992px) {
    .ki-image-overlay .ki-image-text {
        display: inline-block;
        max-width: 0;
        margin-left: 0;
        overflow: hidden;
        white-space: nowrap;
        transition: max-width 0.35s ease-in-out, margin-left 0.35s ease-in-out;
    }

    .service-card-img:hover .ki-image-text,
    .ki-modal-ratio-container:hover .ki-image-text {
        max-width: 90px;
        margin-left: 0.35rem;
    }

    .service-card-img:hover .ki-image-overlay,
    .ki-modal-ratio-container:hover .ki-image-overlay {
        opacity: 1;
    }
}

@media (max-width: 991.98px) {
    .ki-image-overlay .ki-image-text {
        display: inline;
        max-width: none;
        margin-left: 0.35rem;
    }
}

/* ---------- Chips ---------- */

.chip {
    padding: 0.45rem 1.15rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--muted);
    background: var(--white);
    border: 1.5px solid var(--wood);
    border-radius: 999px;
    transition: all 0.15s ease;
}

.chip:hover {
    color: var(--kiwi-dark);
    border-color: var(--kiwi);
}

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

/* ---------- Service cards ---------- */

.service-card {
    height: 100%;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    background: var(--white);
    border: 2px solid transparent;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.service-card:hover {
    border-color: rgba(122, 181, 29, 0.4);
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.service-card-img {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.service-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .service-card-img img {
    transform: scale(1.07);
}

.service-card-icon {
    position: absolute;
    right: 1.1rem;
    bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
    color: #fff;
    background: var(--kiwi);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.service-card-body {
    padding: 1.6rem 1.3rem 1.4rem;
}

.service-card-body h3 {
    color: var(--ink);
}

.service-card-link {
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--kiwi-dark);
}

.service-card:hover .service-card-link {
    color: var(--kiwi);
}

/* ---------- Modal ---------- */

.service-modal {
    overflow: hidden;
    border: none;
    border-top: 6px solid var(--kiwi);
    border-radius: 24px;
}

.service-modal .modal-title,
.text-brand {
    font-family: "Exo 2", system-ui, sans-serif;
    color: var(--ink);
}

.service-modal img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-modal .modal-footer {
    background: var(--kiwi-soft);
}

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

.site-footer {
    color: #d9ddca;
    background-color: var(--ink);
}

.site-footer h5 {
    margin-bottom: 1.1rem;
    font-size: 1.05rem;
    color: #fff;
}

.site-footer a {
    color: #d9ddca;
}

.site-footer a:hover {
    color: var(--kiwi);
}

.site-footer .list-unstyled li {
    margin-bottom: 0.5rem;
}

.footer-closure {
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
    background: rgba(224, 122, 74, 0.16);
    border-left: 3px solid #e07a4a;
    border-radius: 8px;
}

.footer-bottom {
    font-size: 0.85rem;
    color: #a7ac96;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.hours-table {
    width: 100%;
    font-size: 0.92rem;
}

.hours-table td {
    padding: 0.2rem 0;
    vertical-align: top;
}

.hours-table td:first-child {
    padding-right: 1rem;
    color: #333;
}

.site-footer .hours-table td:first-child {
    color: #eee;
}

.hours-table tr.today td {
    font-weight: 700;
    color: #333;
}

.site-footer .hours-table tr.today td {
    color: #ddd;
}

.hours-table tr.today td:first-child {
    color: var(--kiwi);
}

/* ---------- Page header / map / forms ---------- */

.page-hero {
    position: relative;
    padding: 3.5rem 0;
    background: linear-gradient(120deg, var(--kiwi-soft), var(--beige));
}

#map {
    z-index: 1;
    width: 100%;
    height: 460px;
    border-radius: 20px;
    box-shadow: var(--shadow);
}
#map-consent {
    z-index: 1000;
    background: var(--kiwi-soft) url('../images/karte-vorschau.jpg') center / cover no-repeat;
    border-radius: 20px;
}

.leaflet-popup-content {
    font-family: "Nunito Sans", sans-serif;
}

.marker-pin {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: var(--kiwi);
    border: 3px solid #fff;
    border-radius: 50% 50% 50% 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transform: rotate(-45deg);
}

.marker-pin i {
    color: #fff;
    font-size: 12px;
    transform: rotate(45deg);
}

.form-control,
.form-select {
    padding: 0.7rem 0.9rem;
    border: 1.5px solid var(--wood);
    border-radius: 12px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--kiwi);
    box-shadow: 0 0 0 0.2rem rgba(122, 181, 29, 0.18);
}

.legal-content {
    line-height: 1.8;
}

.legal-content h2 {
    margin-top: 2rem;
    font-size: 1.35rem;
}

.patient-warning {
    background-color: #fff5f5;
    border-left: 4px solid var(--danger-alert);
    color: #a8202d;
    font-size: 0.9rem;
}

/* ---------- Reveal / scroll top ---------- */

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

.scroll-top {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1050;
    width: 36px;
    height: 36px;
    color: #fff;
    font-size: 1.1rem;
    background: var(--kiwi);
    border: none;
    border-radius: 50%;
    box-shadow: 0 6px 18px rgba(7, 59, 65, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    color: var(--ink);
    background: var(--kiwi-soft);
}

/* ---------- Mobile ---------- */

@media (max-width: 991.98px) {
    .navbar-laube .navbar-collapse {
        margin-top: 1rem;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
}

/* ---------- XS ---------- */

@media (max-width: 575.98px) {
    /*
   * Die Navbar ist auch auf XS native CSS-Sticky.
   *
   * main.js verschiebt Navbar und Ticker direkt hinter
   * #site-header. Die Navbar ist dadurch kein Nachfahre
   * des Header-Containers mehr.
   *
   * Insbesondere Firefox muss damit keine Kombination aus
   * position: sticky/fixed und display: contents verarbeiten.
   */
    .navbar-laube {
        position: sticky !important;
        top: 0 !important;
        width: 100% !important;
        min-height: 58px;
        z-index: 9999 !important;
        transform: none !important;
    }

    /*
   * Kompakte XS-Darstellung.
   */
    .navbar-laube .navbar-brand {
        min-width: 0;
        max-width: calc(100% - 52px);
    }

    .navbar-laube .navbar-brand img {
        flex: 0 0 auto;
        height: 70px;
    }

    .navbar-laube .brand-text {
        min-width: 0;
    }

    .navbar-laube .brand-text .name {
        font-size: 0.98rem;
        white-space: normal;
        overflow-wrap: normal;
    }

    .navbar-laube .brand-text .sub {
        font-size: 0.6rem;
    }

    /*
   * Burger bleibt immer sichtbar und schrumpft nicht.
   */
    .navbar-laube .navbar-toggler {
        flex: 0 0 auto;
        width: 40px;
        height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /*
   * Fortschrittsbalken auf XS.
   */
    .navbar-laube #progressContainer {
        height: 4px;
    }

    .navbar-laube #progressBar {
        height: 4px;
        min-height: 4px;
    }

    /*
   * Ticker.
   */
    #noticeTicker,
    #noticeTicker .ticker-text,
    #noticeTicker .ticker-item {
        min-height: 36px;
        line-height: 36px;
    }

    /*
   * XS: today-teaser bleibt immer normal im Dokumentfluss.
   */
    #today-teaser,
    #today-teaser.today-teaser-fixed {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;
        width: auto !important;
        max-height: none !important;
        overflow: visible !important;
        box-shadow: none !important;
    }
}
