.hero_widget {
    position: relative;
    min-height: clamp(520px, 72vh, 760px);
    display: flex;
    align-items: center;
    overflow: hidden;
    background-position: center;
    background-size: cover;
    color: #4f3f43;
}

.hero_widget::before {
    content: "";
    position: absolute;
    inset: 0;
    background: none;
    pointer-events: none;
}

/* Gefilterte Kopie des Hintergrundbildes: macht das Foto strahlender,
   ohne den Inhalt (Panel/Text) mitzufiltern. */
.hero_widget_overlay {
    position: absolute;
    inset: 0;
    background-image: inherit;
    background-position: center;
    background-size: cover;
    filter: saturate(1.22) brightness(1.07) contrast(1.04);
    pointer-events: none;
}

.hero_widget_inner {
    position: relative;
    z-index: 1;
    width: min(1500px, calc(100% - 48px));
    margin: 0 auto;
    padding: 96px 0 72px;
}

.hero_widget_panel {
    position: relative;
    width: min(600px, 100%);
    padding: clamp(24px, 3vw, 38px);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(6px);
    border-radius: 4px;
    box-shadow: 0 26px 64px rgba(48, 38, 42, 0.17);
}

/* Rundes Termin-Badge (verlinkt auf Doctolib) */
.hero_termin_badge {
    --badge-pulse-color: 118, 89, 93;
    --badge-pulse-spread: 16px;
    position: absolute;
    top: -46px;
    right: -58px;
    z-index: 3;
    width: 148px;
    height: 148px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 14px;
    border-radius: 50%;
    background: #e7e3cd;
    color: #3f4d5a;
    box-shadow: 0 14px 30px rgba(48, 38, 42, 0.22);
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    isolation: isolate;
}

.hero_termin_badge::before {
    content: "\f25a";
    position: absolute;
    right: -7px;
    bottom: 5px;
    z-index: 2;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    color: #76595d;
    box-shadow: 0 7px 18px rgba(48, 38, 42, 0.24);
    font-family: "Font Awesome 5 Pro";
    font-size: 1.08rem;
    font-weight: 400;
    line-height: 1;
    pointer-events: none;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.hero_termin_badge::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    box-shadow: 0 0 0 0 rgba(var(--badge-pulse-color), 0.58);
    pointer-events: none;
    animation: hero-termin-badge-pulse 2s ease-out infinite;
}

@keyframes hero-termin-badge-pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(var(--badge-pulse-color), 0.58);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 var(--badge-pulse-spread) rgba(var(--badge-pulse-color), 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(var(--badge-pulse-color), 0);
    }
}

.hero_termin_badge span {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.02rem;
    line-height: 1.28;
    font-weight: 500;
}

a.hero_termin_badge:hover,
a.hero_termin_badge:focus-visible {
    transform: scale(1.05);
    box-shadow: 0 18px 38px rgba(48, 38, 42, 0.3);
}

a.hero_termin_badge:hover::after,
a.hero_termin_badge:focus-visible::after {
    animation-play-state: paused;
}

a.hero_termin_badge:hover::before,
a.hero_termin_badge:focus-visible::before {
    transform: scale(1.1);
    background: #76595d;
    color: #fff;
}

a.hero_termin_badge:focus-visible {
    outline: 3px solid #76595d;
    outline-offset: 5px;
}

@media (prefers-reduced-motion: reduce) {
    .hero_termin_badge::after {
        animation: none;
        box-shadow: 0 0 0 4px rgba(118, 89, 93, 0.24);
    }
}

@media screen and (max-width: 700px) {
    .hero_termin_badge {
        --badge-pulse-spread: 12px;
        top: -34px;
        right: -14px;
        width: 116px;
        height: 116px;
        padding: 10px;
    }
    .hero_termin_badge::before {
        right: -5px;
        bottom: 2px;
        width: 31px;
        height: 31px;
        font-size: 0.94rem;
    }
    .hero_termin_badge span {
        font-size: 0.86rem;
        line-height: 1.22;
    }
}

.hero_widget_logo {
    display: block;
    max-width: 280px;
    height: auto;
    margin-bottom: 24px;
}

.hero_widget_content h1,
.hero_widget_content h2 {
    margin: 0 0 22px;
    color: #76595d;
    font-size: clamp(2.15rem, 4.2vw, 4.5rem);
    line-height: 1.12;
    font-weight: 700;
    letter-spacing: 0;
}

.hero_widget_content p {
    margin: 0 0 26px;
    font-size: clamp(1.05rem, 1.45vw, 1.45rem);
    line-height: 1.55;
}

.hero_widget_badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.hero_widget_badges span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 12px;
    background: rgba(236, 197, 190, 0.85);
    color: #4f3f43;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
}

.hero_widget_buttons {
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    margin-top: 10px;
}

.hero_widget_buttons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 15px 25px;
    background-color: var(--white);
    color: var(--primaryTextColor);
    border: 1px solid var(--primaryTextColor);
    text-decoration: none;
    text-transform: uppercase;
    font-family: 'Montserrat', 'Open Sans', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.2;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.4s ease, color 0.4s ease, transform 180ms ease;
}

.hero_widget_buttons a::after {
    content: "\f178";
    font-family: 'Font Awesome 5 Pro';
    font-weight: 300;
    margin-left: 10px;
}

.hero_widget_buttons a:hover,
.hero_widget_buttons a:focus {
    background-color: var(--primaryColor);
    color: var(--white);
    transform: translateY(-1px);
}

.hero_widget_buttons a.secondary {
    background-color: rgba(255, 255, 255, 0.85);
}

.hero_widget.align_center .hero_widget_inner {
    display: flex;
    justify-content: center;
}

.hero_widget.align_right .hero_widget_inner {
    display: flex;
    justify-content: flex-end;
}

.hero_widget.align_bottom_center {
    align-items: flex-end;
}

.hero_widget.align_bottom_center .hero_widget_inner {
    display: flex;
    justify-content: center;
    padding-top: clamp(48px, 7vh, 90px);
    padding-bottom: clamp(52px, 8vh, 100px);
}

.hero_widget.panel_dark {
    color: #fff;
}

.hero_widget.panel_dark .hero_widget_panel {
    background: rgba(61, 48, 52, 0.76);
}

.hero_widget.panel_dark .hero_widget_content h1,
.hero_widget.panel_dark .hero_widget_content h2 {
    color: #fff;
}

.hero_widget.panel_dark .hero_widget_buttons a {
    background-color: transparent;
    color: #fff;
    border-color: #fff;
}

.hero_widget.full_bleed .hero_widget_panel {
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    padding-left: 0;
    padding-right: 0;
}

.hero_widget.full_bleed .hero_widget_content {
    max-width: 780px;
    padding: clamp(26px, 3.5vw, 42px);
    background: rgba(255, 255, 255, 0.76);
}

.hero_widget.tall {
    min-height: clamp(650px, 86vh, 900px);
}

.hero_widget.compact {
    min-height: clamp(420px, 58vh, 560px);
}

.hero_widget_edit {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 6;
    width: 152px;
    height: 42px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 28px rgba(48, 38, 42, 0.14);
    color: #4f3f43;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 42px;
    text-align: center;
    text-transform: uppercase;
}

.hero_widget_edit span {
    pointer-events: none;
}

.hero_widget_edit .posrelative,
.hero_widget_edit .image_placeholder,
.hero_widget_edit img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero_widget_edit .miniinfo {
    display: none;
}

.hero_widget_edit .image_placeholder,
.hero_widget_edit img {
    cursor: pointer;
    opacity: 0;
    object-fit: cover;
}

@media (max-width: 760px) {
    .hero_widget {
        min-height: 620px;
        align-items: flex-end;
    }

    .hero_widget_inner {
        width: calc(100% - 28px);
        padding: 90px 0 28px;
    }

    .hero_widget_panel {
        padding: 24px;
    }

    .hero_widget_content h1,
    .hero_widget_content h2 {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .hero_widget_buttons {
        gap: 10px;
        flex-wrap: wrap;
    }

    .hero_widget_buttons a {
        width: 100%;
    }

    .hero_widget_edit {
        top: 12px;
        right: 12px;
    }
}
