@font-face {
    font-family: 'Nunito Sans';
    src: url('fonts/NunitoSans-Var.woff2') format('woff2-variations'),
         url('fonts/NunitoSans-Var.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('fonts/Poppins-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('fonts/Poppins-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --color-orange: #f59e00;
    --color-blau: #005594;
    --color-dunkelgrau: #6d767a;
    --color-maigruen: #b3e040;
    --color-hellorange: #f8d292;
    --color-hellblau: #859dc8;
    --color-hellgrau: #bfc9d0;
    --color-beige: #fdf7ea;
    --color-lichtblau: #d8dded;
    --color-lichtgrau: #ebeef0;
    --font-heading: 'Nunito Sans', sans-serif;
    --font-body: 'Poppins', sans-serif;
    --sidebar-handle-width: 2.75rem;
    --sidebar-width-desktop: 16.625rem;
    --sidebar-width-mobile: 14rem;
    --transition-fast: 0.35s ease;
    --bg-color-referenzen: #f5a623; /* Aktueller Gelb/Orange-Ton */
    --text-color-referenzen: #0055a4; /* Blau für die Überschrift */
}

*, *::before, *::after { box-sizing: border-box; }
/* GEFIXT: Wieder zurück auf 16px für die korrekten Proportionen der Navigation */
html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }
body {
    margin: 0;
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.6;
    color: var(--color-dunkelgrau);
    background-color: #fff;
    overflow-x: hidden;
    cursor: url('/images/zeiger.png') 15 15, auto;
}
img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
ul[role="list"], ol[role="list"] { list-style: none; }
input, button, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4 {
    margin-top: 0;
    font-family: var(--font-heading);
    font-weight: 900;
    color: var(--color-blau);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

h1 { font-size: 3.9rem; line-height: 1.1; margin-bottom: 0.5rem; }
h2 { font-size: 2.4rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1.5rem; font-size: 1.1rem;
    font-weight: 300;}
a { color: var(--color-blau); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--color-maigruen); }
strong, b { font-weight: 700; display: inline; }

section.main, .section {
    position: relative;
    display: block;
    width: 100%;
    padding: 5rem 0;
}


.container, .page-container {
    position: relative;
    display: block;
    width: 100%;
    max-width: 75rem;
    margin: 0 auto;
    padding: 0 1.25rem;
}

section.text {
    max-width: 43.75rem;
    margin-left: 10vw; 
    color: #fff;
    font-size: 1.1rem;
    font-weight: 300;
}

section.text-full {
    width: 100%;
    max-width: none;
    margin-left: 0;
    padding: 0 10vw; 
}

/* --- HEADER & NAVIGATION DESKTOP --- */
.site-header {
    position: relative;
    z-index: 1000;
    display: flex;
    align-items: center;
    min-height: 6.6rem;
    background-color: var(--color-lichtblau);
    overflow: visible;
}

.site-header .header-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start; 
    width: 100%;
    max-width: 100vw !important;
    min-height: 6.6rem;
    max-height: 6.6rem; 
    padding-left: 0; 
    padding-right: 2%; 
}

.logo-overhang {
    position: absolute;
    top: 0;
    left: 10vw; 
    z-index: 1100;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 8.125rem;
    height: 9.375rem;
}

.logo-overhang a { display: block; width: 100%; }
.main-logo {
    display: block;
    width: 90%;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.header-brand {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    justify-content: center;
    margin-left: calc(10vw + 11.5rem); 
}

.subline {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    color: var(--color-blau);
    text-transform: uppercase;
}

.doctor-name {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--color-blau);
    text-transform: uppercase;
}

nav.main-nav {
    position: relative;
    display: flex;
    flex: 2 2 auto; 
    align-items: center;
    justify-content: flex-start;
    margin: 1rem 0 0 6rem; 
    padding-top: 0;
}

.menu-toggle {
    display: none;
    border: 0;
    background: none;
    color: var(--color-blau);
    line-height: 1;
    cursor: pointer;
}

.main-nav-grid {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap !important; 
    gap: 3rem; 
    width: auto;
    margin: 0;
    padding: 0;
    list-style: none;
}

.main-nav-grid > li {
    position: relative;
    margin: 0;
    padding: 0;
}

.nav-item-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.8rem 1rem; 
    margin: 0;
}

.nav-link, .submenu-link {
    display: inline-flex;
    align-items: center;
    padding: 0;
    font-family: var(--font-heading);
    font-size: 0.95rem; 
    font-weight: 700;
    line-height: 1;
    color: var(--color-blau);
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap !important; 
}

.nav-link:hover, .nav-link:focus, .submenu-link:hover, .submenu-link:focus {
    color: var(--color-blau);
    text-decoration: none;
}

.nav-link.active,
.submenu-link.active,
.main-nav-grid > li.is-active > .nav-item-wrap > .nav-link {
    font-weight: 900;
    background: none;
}

.submenu-toggle {
    display: none;
    width: 1rem;
    height: 1rem;
    padding: 0;
    border: 0;
    background: none;
    color: var(--color-blau);
    cursor: pointer;
    flex-shrink: 0;
}

.submenu-toggle-icon {
    display: block;
    width: 0.45rem;
    height: 0.45rem;
    margin: 0 auto;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
}

.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1200;
    display: none;
    min-width: 19rem;
    margin: 0;
    padding: 0.875rem 1rem;
    list-style: none;
    background: var(--color-lichtblau);
    border-left: 1px solid var(--color-hellgrau);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
}

.submenu li { margin: 0 0 0.35rem; padding: 0; }
.submenu li:last-child { margin-bottom: 0; }
.submenu-link { white-space: nowrap; }
.has-submenu:hover > .submenu,
.has-submenu:focus-within > .submenu { display: block; }
.nav-legal { padding-left: 1.1rem; }
.nav-legal + .nav-legal { padding-left: 0; }

/* --- ZWISCHEN-WEICHE: Verhindert Überlappungen auf kleineren Laptops --- */
@media (max-width: 1550px) {
 
    .logo-overhang {
        left: 10vw; 
    }
    nav.main-nav {
        margin-left: 4.5rem; 
    }
    
    .main-nav-grid {
    flex-wrap: nowrap !important; 
    gap: 1rem; 
}
    .nav-link, .submenu-link {
        font-size: 0.85rem;
    }
    .nav-item-wrap {
        padding: 0.5rem 0.6rem;
    }
}

.full-width-image-container {
    position: relative;
    left: 50%;
    right: 50%;
    width: 100vw;
    margin-right: -50vw;
    margin-bottom: 0.625rem;
    margin-left: -50vw;
    overflow: hidden;
    line-height: 0;
}

.full-width-image-container img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 85vh;
    object-fit: cover;
}

.full-width-image-container:not([data-filter="none"])::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to right, rgba(4, 20, 50, 0.75) 0%, rgba(4, 20, 50, 0.7) 20%, rgba(4, 20, 50, 0) 85%);
    pointer-events: none;
}

.image-overlay-text {
    position: absolute;
    top: 54%;
    left: 10vw; 
    z-index: 2;
    width: 	58%;
    max-width: 46.25rem;
    font-family: var(--font-body);
    font-size: 1.5rem;
    font-weight: 200;
    line-height: 1.6;
    color: #fff;
}

hr.spacer-line {
    width: 100%;
    height: 0.625rem;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    clear: both;
}

.full-width-box {
    position: relative;
    left: 50%;
    width: 100vw;
    max-width: 100%;
    margin: 0;
    padding: 0;
    transform: translateX(-50%);
}

main::after, .full-width-box::after { content: ""; display: table; clear: both; }
.full-width-box ul {
    margin: .5rem 0;
    padding-left: 0;
    list-style: none;
}

.full-width-box ul li {
    position: relative;
    margin-bottom: 0.75rem;
    padding-left: 1.875rem;
    line-height: 1.5;
}

.full-width-box ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.375rem;
    display: inline-block;
    width: 0;
    height: 0;
    border-right: 0.4375rem solid transparent;
    border-left: 0.4375rem solid transparent;
    border-top: 0.625rem solid var(--color-orange);
}

div[style*="background-color: var(--color-orange)"] .text ul li::before,
[style*="--tebi-bg: var(--color-orange)"] ul li::before { 
    border-top-color: var(--color-blau); 
}

div[style*="background-color: var(--color-blau)"] .text ul li::before,
[style*="--tebi-bg: var(--color-blau)"] ul li::before { 
    border-top-color: var(--color-orange); 
}

.imgbox-full:nth-of-type(even) { float: right; }
.imgbox-full:nth-of-type(odd) { float: left; }

.hero-sidebar {
    position: fixed;
    top: 12.5rem;
    right: 0;
    z-index: 1050;
    width: var(--sidebar-width-desktop);
    background-color: #f59300;
    overflow: visible;
    transition: transform var(--transition-fast);
    box-shadow: -4px 4px 20px rgba(0, 0, 0, 0.55);
}

 .hero-sidebar.is-collapsed { transform: translateX(calc(100% )); }

.hero-sidebar.is-collapsed:hover,
.hero-sidebar.is-collapsed:focus-within {
    transform: translateX(0);
}

.hero-sidebar-handle {
    position: absolute;
    top: 0;
    left: calc(var(--sidebar-handle-width) * -1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--sidebar-handle-width);
    height: 100%;
    padding: 0;
    border: 0;
    background-color: #f59300;
    color: #fff;
    cursor: pointer;
}

.hero-sidebar-handle span {
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 900 !important;
    letter-spacing: 0.08em;
    color: #fff;
    text-transform: uppercase;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.opening-hours {
    padding: 1.25rem;
    font-family: var(--font-heading);
    font-size: 1rem;
    line-height: 1.1;
    color: #fff;
    background-color: #f59300;
}

.opening-hours p { margin: 0 0 0.375rem; padding: 0; }
.opening-hours strong, .opening-hours b {
    display: inline-block;
    font-weight: 900;
    color: #fff;
    -webkit-font-smoothing: antialiased;
}
.opening-hours span { font-weight: inherit; }
.opening-hours span[style*="font-size: 14pt"] {
    display: block;
    margin-bottom: 0.3125rem;
    font-weight: 900;
    text-transform: uppercase;
}
.hero-sidebar .contact-info-top {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0 0 1rem;
    padding: 0 0 0.875rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.28);
}
.hero-sidebar .main-calen {
    width: 2rem;
    height: auto;
    margin: 0;
    flex-shrink: 0;
}
.hero-sidebar .contact-text {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    line-height: 1.2;
    color: #fff;
    white-space: normal;
    overflow-wrap: break-word;
    word-wrap: break-word;
}
.hero-sidebar .contact-text a {
    color: #fff;
    text-decoration: none;
    font-weight: 900;
    overflow-wrap: break-word;
    word-wrap: break-word;
}
.hero-sidebar .contact-text a:hover,
.hero-sidebar .contact-text a:focus { text-decoration: underline; }

.section-kform-full {
    display: block;
    clear: both;
    width: 100%;
    margin: 0;
    padding: 6.25rem 0;
    background-color: var(--color-orange);
    border-top: 1px solid transparent;
}

.kform-container {
    min-width: 18.75rem;
    max-width: 35%;
    margin-left: 10vw; 
    font-family: var(--font-body);
    color: #fff;
    text-align: left;
}

.kform-container h2 {
    margin: 0 0 0.9375rem;
    font-family: var(--font-heading);
    font-size: 1.9rem;
    font-weight: 900;
    line-height: 1.1;
    color: var(--color-blau);
    text-transform: uppercase;
}

.kform-container .intro-text {
    margin-bottom: 1.875rem;
    font-size: 0.95rem;
    line-height: 1.4;
}

.kform-input {
    width: 100%;
    margin-bottom: 0.625rem;
    padding: 0.75rem 0.9375rem;
    font-size: 1rem;
    color: var(--color-blau);
    background-color: #fcdbb4;
    border: none;
}

.kform-input::placeholder {
    color: var(--color-blau);
    opacity: 0.7;
}

.kform-textarea {
    height: 15.625rem;
    margin-bottom: 1.5625rem;
    resize: none;
}

.kform-submit {
    padding: 0.625rem 1.875rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-blau);
    background: #eee;
    border: 1px solid #ccc;
    cursor: pointer;
    transition: background 0.3s;
}

.kform-submit:hover { background: #fff; }
.hp-hidden { display: none; visibility: hidden; }
.kform-privacy-row {
    display: flex;
    gap: 0.9375rem;
    margin-top: 1.5625rem;
    font-size: 0.85rem;
    line-height: 1.4;
}
.kform-privacy-row input { width: 1.375rem; height: 1.375rem; flex-shrink: 0; }

/* --- OPTIMIERT: SCHACHBRETT (TEBI) BEREICH FÜR SAUBEREN ZOOM --- */
.tebi {
    display: flex;
    flex-direction: column;
    gap: var(--tebi-gap, 0);
    align-items: stretch;
    width: 100%;
    overflow: hidden;
}

.tebi__media, .tebi__text {
    width: 100%;
    overflow: hidden;
    background-color: var(--tebi-bg, transparent);
}

.tebi__media {
    display: flex;
    align-items: stretch; 
}

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

.tebi-s-text {
    width: 100%; 
    height: 100%; 
    font-family: 'Poppins', sans-serif;
    color: #ffffff;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.5vw, 1.1rem); 
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: none;
    margin: 0 !important;
}

/* GEFIXT: Prozentuale statt starre Viewport-Breite für optimalen Zoom */
.tebi-image-wrapper {
    width: 50%;
    line-height: 0;
}

.tebi-image-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tebi-s-inner {
    max-width: 800px;
}

.tebi-s-text--img-left {
    padding: 60px 10vw;
}

.tebi-s-text--img-right {
    padding: 60px 10vw;
}
.aus4   {
padding-top: 4rem;
}
@media (max-width: 980px) {
    .tebi-s-text--img-left,
    .tebi-s-text--img-right {
        padding: 40px 4rem 40px 1.25rem !important; 
    }
    .aus4   {
padding-top: .5rem;
}
    
}

/* --- BURGER-MENÜ AB 1250px --- */
@media (max-width: 1250px) {
    body {
        padding-top: 4.8rem;
    }

    .site-header { 
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100%;
        min-height: 4.8rem; 
        z-index: 2000;
    }
    
    .site-header .header-inner {
        min-height: 4.8rem;
        padding: 1rem 2% 1rem calc(10vw + 8rem) !important;
        align-items: center;
        max-width: none !important;
    }
    
    .logo-overhang {
        left: 10vw; 
        width: 5rem;
        height: 7rem;
    }
    
    .header-brand {
        margin-left: calc(-2vw); 
        flex: 1 1 auto;
    }
    
    .subline {
        font-size: 0.5rem;
        letter-spacing: 0.05em;
    }
    
    .doctor-name { font-size: .8rem; }
    
    nav.main-nav {
        flex: 0 0 auto;
        margin: 0 0 0 1rem;
        padding-top: 0;
    }
    
    .menu-toggle { display: inline-block;
     font-size: 2rem;
        transform: scale(1);
        transform-origin: center right; }
    
    .main-nav-grid {
        position: absolute;
        top: calc(100% + 0.5rem);
        right: 0;
        z-index: 1300;
        display: none;
        flex-direction: column;
        align-items: stretch;
        flex-wrap: nowrap !important;
        gap: 0;
        width: min(24rem, calc(100vw - 1.5rem));
        margin: 0;
        padding: 1rem;
        background: var(--color-hellblau);
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    }
    .main-nav-grid.is-open { display: flex; }
    .main-nav-grid > li {
        width: 100%;
        padding-left: 0;
        border-bottom: 1px solid rgba(0, 85, 148, 0.12);
    }
    .main-nav-grid > li:last-child { border-bottom: 0; }
    
    .nav-item-wrap {
        justify-content: flex-start;
        margin: 0;
        padding: 0.85rem 0;
    }
    .nav-link {
        padding: 0.2rem 0;
        font-size: 0.88rem; 
        white-space: normal !important; 
    }
    
    .submenu-toggle {
        display: none !important; 
    }
    
    .submenu {
        position: static !important;
        display: block !important; 
        min-width: 100%;
        margin: 0;
        padding: 0 0 0.85rem 1.5rem !important; 
        background: transparent;
        border-left: 0;
        box-shadow: none;
    }
    
    .submenu-link {
        display: block;
        padding: 0.35rem 0;
        font-size: 0.78rem !important;
        white-space: normal !important;
    }
    
    .has-submenu:hover > .submenu,
    .has-submenu:focus-within > .submenu { display: none; }
    .has-submenu.submenu-open > .submenu { display: block; }
    .has-submenu.submenu-open .submenu-toggle-icon { transform: rotate(225deg); }
    .nav-legal, .nav-legal + .nav-legal { padding-left: 0; }
    
   .opening-hours p, 
.opening-hours, 
.hero-sidebar .contact-text { 
    margin: 0 0 0.375rem; 
    padding: 0; 
    font-size: 0.82rem; /* Dein gewünschter Wert */
}
  .hero-sidebar {
    /* Deine bisherigen Eigenschaften bleiben bestehen (z.B. position: fixed, width, etc.) */
    background-color: #f59300; /* Dies ist dein festes Haupt-Orange */
    display: flex;
    flex-direction: column;
}

.opening-hours {
   padding: 1.25rem;
    font-family: var(--font-heading);
    line-height: 1.1;
    color: #fff;
    flex-grow: 1; 
    height: 100%;
    background-color: transparent;
      display: flex;
    flex-direction: column;
    justify-content: center;
}  
 
    
}

@media (max-width: 980px) {
    .site-header .header-inner {
        padding: 1rem 1rem 1rem calc(1.25rem + 7.5rem) !important;
    }
    .logo-overhang {
        left: 1.25rem; /* Exakt der gleiche Wert wie bei den Texten */
        width: 4.5rem; 
        height: 6.3rem;
        justify-content: flex-start; /* Verhindert mittige Ausrichtung */
    }
    
    .logo-overhang a {
        display: flex;
        justify-content: flex-start; /* Zwingt den Link nach links */
    }
    
    .main-logo {
        width: 100%; /* Nutzen wir den vollen Platz, damit es linksbündig abschließt */
        margin-left: 0;
        object-fit: contain;
        object-position: left top; /* Bild wird hart an die linke Kante genagelt */
    }
  
  .header-brand{
  
  }
  
    .hero-sidebar {
        top: 7rem;
        bottom: 1rem;
        width: var(--sidebar-width-mobile);
    }
    .hero-sidebar.is-collapsed { transform: translateX(calc(100% )); }
    
    .full-width-image-container {
        height: 45vh;
        min-height: 380px;
    }
    .full-width-image-container img {
        height: 100%;
        object-fit: cover;
        object-position: 73% center;
    }
    .image-overlay-text {
        top: 80%;
        left: 5%;
        width: 84%;
        font-size:.7rem;
        line-height: 1.2;
        transform: translateY(-50%);
    }
    
    .image-overlay-text p {font-size:.8rem;}
     .image-overlay-text h1 {font-size:1.2rem;}
    
    .full-width-image-container:not([data-filter="none"])::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 60%;
    z-index: 1;
    background: linear-gradient(to top, rgba(4, 20, 50, 0.75) 0%, rgba(4, 20, 50, 0.7) 20%, rgba(4, 20, 50, 0) 100%);
    pointer-events: none;
	}
    
    
    .kform-container { max-width: 75%; margin-left: 5%; }

    .full-width-box section.text {
        padding: 3rem 4rem 3rem 1.5rem !important;
    }
    .page-container section.text-full > div > div[style*="display: grid"] {
        padding: 40px 4rem 40px 20px !important;
    }
    .referenzen-grid {
        padding: 0 4rem 0 20px !important;
    }

    section.text,
    .full-width-box section.text,
    .tebi__text section.text {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        padding: 3rem 4rem 3rem 1.25rem !important; 
    }

    .page-container section.text-full > div > div[style*="display: grid"] {
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 40px 4rem 40px 1.25rem !important;
    }

    .referenzen-grid {
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 4rem 0 1.25rem !important;
        margin-left: 0 !important;
    }
    
    .tebi__media img {
    max-height: 400px;
        width: 100%;
        object-fit: cover;
        object-position: bottom;
    }
    
    
}

@media (max-width: 1200px) {
    h1 { font-size: 1.8rem; line-height: 1.1; }
    h2, h3, .kform-container h2 { font-size: 1.2rem; }
    section.text, .text p, .text ul, .text li, .tebi__text,.tebi-s-text,.tebi-s-text p, p, .kform-container .intro-text { font-size: 0.9rem; }
    .page-container section.text-full > div > div[style*="display: grid"],
    .page-container section.text-full div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .imgbox-full {
        float: none !important;
        width: 100% !important;
        margin: 0 0 0.625rem 0 !important;
    }
    
    .imgbox-full img {
        width: 100% !important;
        height: 350px !important; 
        object-fit: cover !important;
    }
}

@media (min-width: 1200px) {
    /* GEFIXT: Von fester min-height gelöst, damit die Box beim Zoom mitskalieren kann */
    .tebi {
        flex-direction: row;
        width: 100vw;
    }
    
    /* GEFIXT: Flex-Basis auf 50% für beide Spalten, um starr-machende Weiten zu überschreiben */
    .tebi__media, .tebi__text {
        width: 50% !important; 
        flex: 0 0 50%;
    }
    
    .tebi.tebi--reverse { flex-direction: row-reverse; }
    .tebi.tebi--overlap .tebi__media,
    .tebi.tebi--overlap .tebi__text {
        position: relative;
        z-index: 1;
    }
    .tebi.tebi--overlap:not(.tebi--reverse) .tebi__media {
        z-index: 2;
    }
    .tebi.tebi--overlap.tebi--reverse .tebi__text {
        z-index: 2;
    }
}

/* --- TEAM BEREICH LAYOUT FIX --- */
.team-desktop-grid {
    grid-template-columns: 1.5fr 1fr !important;
    grid-template-areas: 
        "intro doctor"
        "members doctor";
}
.team-intro-area { grid-area: intro;padding-top: 15%; }
.team-doctor-area { grid-area: doctor; }
.team-members-area { grid-area: members; align-self: start; }

@media (max-width: 980px) {
    .team-desktop-grid {
        grid-template-columns: 1fr !important;
        grid-template-areas: 
            "intro"
            "doctor"
            "members" !important;
        padding: 40px 4rem 40px 1.25rem !important; 
        gap: 50px !important;
    }
    .team-doctor-area { padding-left: 0 !important; }
    .team-members-area { grid-template-columns: 1fr !important; } 
    .team-intro-area {    padding-top: -10%;}
}

a:hover {
    cursor: url('/images/active.png') 15 25, pointer;
}
.referenzen-section {
    background-color: var(--bg-color-referenzen);
    width: 100vw;
    position: relative;
    margin-left: -10vw;
    padding: 80px 2% 160px 1%;
    font-family: var(--font-body);
    box-sizing: border-box;
    overflow: visible;
    z-index: 50;
}

.referenzen-title {
    color: var(--text-color-referenzen);
    text-transform: uppercase;
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 50px;
    margin-left: 9vw;
    text-align: left;
    width: 100%;
    font-family: var(--font-heading);
}

.referenzen-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 0 2%;
    box-sizing: border-box;
}

.referenzen-item {
    width: 18%;
    min-width: 150px;
    max-width: 250px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    border: 4px solid #ffffff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    position: relative;
    cursor: pointer;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), z-index 0.5s, box-shadow 0.5s;
    z-index: 1;
}

.referenzen-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.referenzen-item:hover {
    transform: scale(2.0);
    z-index: 100;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

@media (max-width: 980px) {
    .referenzen-section {
        margin: -6rem 0rem -10rem -1.25rem;
    }
}

@media (max-width: 900px) {
    .referenzen-gallery {
        gap: 40px;
    }
    .referenzen-item {
        width: 35%;
    }
    .referenzen-item:hover {
        transform: scale(1.6);
    }
}

@media (max-width: 500px) {
    .referenzen-item {
        width: 75%;
        margin-bottom: 20px;
    }
    .referenzen-item:hover {
        transform: scale(1.05);
    }
}






.cms-slider-container {
  width: 100vw !important;
  position: relative !important;
  margin-left: calc(-10vw - 1.25rem) !important;
  margin-right: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  display: block !important;
}


.slider-arrow {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background-color: rgba(0, 85, 148, 0.85) !important;
  color: #ffffff !important;
  padding: 1.25rem 1.5rem !important;
  font-size: 2rem !important;
  text-decoration: none !important;
  z-index: 100 !important;
  user-select: none !important;
  border-radius: 4px; /* Hier war vorher kein !important */
}


.prev-arrow {
  left: 3rem !important;
}

.next-arrow {
  right: 3rem !important;
}


.slider-wrapper {
  display: flex !important;
  overflow-x: auto !important;
  scroll-snap-type: x mandatory !important;
  scroll-behavior: smooth !important;
  width: 100% !important;
  -ms-overflow-style: none !important;  /* IE and Edge */
  scrollbar-width: none !important;     /* Firefox */
}

.slider-wrapper::-webkit-scrollbar {
  display: none;
}

.slider-slide {
  flex: 0 0 50% !important;
  width: 50% !important;
  min-width: 50% !important;
  height: 60vh !important;
  scroll-snap-align: start !important;
  position: relative !important;
  box-sizing: border-box !important;
}


.slider-slide img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

@media (max-width: 1200px) {
  /* 1. Full-Width-Breakout (Gleiche Logik wie bei deinen anderen Vollbild-Elementen) */
  .cms-slider-container {
    width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    right: 50% !important;
    margin-left: -40vw !important;
    margin-right: -50vw !important;
  }

  /* 2. Slides auf 100% Breite setzen und die Höhe beibehalten */
  .slider-slide {
    flex: 0 0 100% !important;
    width: 100% !important;
    min-width: 100% !important;
    height: 60vh !important; /* Stellt sicher, dass das Bild nicht zu klein wirkt */
  }

  /* 3. Z-Index extrem erhöhen, damit Sidebar und andere Overlays die Klicks nicht blockieren */
  .slider-arrow {
    z-index: 1500 !important; /* Ist nun höher als deine .hero-sidebar (1050) */
  }

  /* 4. Pfeile sicher positionieren */
  .prev-arrow {
    left: 2.5rem !important;
  }
  
  .next-arrow {
    right: 3.5rem !important;
  }
}
@media (max-width: 768px) {
  .slider-slide {
    height: auto !important; /* Hebt die starre Höhe von 60vh auf */
  }

  .slider-slide img {
    width: 100% !important;
    height: auto !important; /* Das Bild bestimmt nun seine Höhe selbst anhand des Formats */
    object-fit: contain !important; /* Garantiert, dass absolut nichts an den Seiten abgeschnitten wird */
  }

  /* --- NEU: Pfeile auf dem Handy um die Hälfte verkleinern --- */
  .slider-arrow {
    font-size: 1rem !important;          /* Vorher 2rem (Halbierte Textgröße) */
    padding: 0.625rem 0.95rem !important; /* Vorher 1.25rem 1.5rem (Halbierter Innenabstand) */
  }
}
@media (max-width: 980px) {
  .cms-slider-container {
    /* Gleicht das ungleiche Sektions-Padding deines CMS ab 980px aus */
    margin-top: -3.5rem !important;  /* Schiebt den Slider ein Stück näher an das obere Element */
    margin-bottom: -9rem !important; /* Zieht das untere Element kräftig nach oben, um das große Loch zu schließen */
    margin-left: -50vw !important;
  }
}
footer {
    margin: 0;
    font-family: var(--font-heading);
    font-weight: 300;
    line-height: 1.6;
    color: var(--color-blau);            
    background-color: var(--color-lichtblau);
    display: flex;
    justify-content: center;        
    align-items: center;            
    text-align: center;            
    padding: 20px 0;  
    overflow-x: hidden;
    flex-direction: column;           
    gap: 15px;

}

.footer p {
    margin: 20px 20px 2px 30px;
}
