/* === Globale Einstellungen & Font Definition === */
@font-face {
    font-family: 'BerlinTypeWeb';
    src: url('fonts/BerlinTypeWeb-Regular.eot'); /* IE9 Kompatibilität */
    src: url('fonts/BerlinTypeWeb-Regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
         url('fonts/BerlinTypeWeb-Regular.woff2') format('woff2'), /* Moderne Browser */
         url('fonts/BerlinTypeWeb-Regular.woff') format('woff'); /* Ältere Browser */
    font-weight: normal; /* oder 400 */
    font-style: normal;
}

@font-face {
    font-family: 'BerlinTypeWeb';
    src: url('fonts/BerlinTypeWeb-Bold.eot');
    src: url('fonts/BerlinTypeWeb-Bold.eot?#iefix') format('embedded-opentype'),
         url('fonts/BerlinTypeWeb-Bold.woff2') format('woff2'),
         url('fonts/BerlinTypeWeb-Bold.woff') format('woff');
    font-weight: bold; /* oder 700 */
    font-style: normal;
}

:root {
    --primary-color: #3a6bbc; /* Blauton - anpassbar */
    --primary-color-darker: #264a84;
    --secondary-color: #6c757d; /* Grauton - anpassbar */
    --background-color: #f8f9fa; /* Heller Hintergrund */
    --text-color: #333;
    --header-height: 80px; /* Höhe des Headers für Offset */
    --font-family: 'BerlinTypeWeb', sans-serif; /* Eigene Schriftart als Priorität */
}

/* Smooth Scrolling & Header Offset Fix */
html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    color: var(--text-color);
    line-height: 1.6;
    background-color: #fff; /* Weißer Body-Hintergrund */
    padding-top: var(--header-height); /* Platz für den fixierten Header schaffen */
}

h1, h2, h3, h4, h5, h6 {
    font-weight: bold; /* Nutzt BerlinTypeWeb-Bold */
    color: var(--primary-color);
    margin-top: 1.5em;
    margin-bottom: 0.8em;
}

h2 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 1.5em;
}

h3 {
    font-size: 1.6rem;
    color: var(--primary-color); /* Etwas dunkleres Blau */
}

p {
    margin-bottom: 1em;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: darken(var(--primary-color), 15%);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === Header === */
#main-header {
    background-color: #ffffff;
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: fixed; /* Fixiert den Header oben */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000; /* Stellt sicher, dass der Header über anderem Inhalt liegt */
    height: var(--header-height); /* Feste Höhe geben */
    display: flex; /* Flexbox für Ausrichtung */
    align-items: center; /* Vertikal zentrieren */
    white-space: nowrap;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%; /* Wichtig für Flexbox im Container */
}

.logo-link {
    display: inline-block; /* Verhindert Unterstreichung bei Hover */
}
.logo {
    display: block;
    height: 60px; /* Höhe des Logos anpassen */
    width: auto;
    max-width: 100%;
    flex-shrink: 0;
    object-fit: contain;
}

#main-header nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

#main-header nav ul li {
    margin-left: 25px;
}

#main-header nav ul li a {
    font-weight: normal; /* Nutzt BerlinTypeWeb-Regular */
    font-size: 1rem;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px 0;
    white-space: nowrap;
    border-bottom: 2px solid transparent; /* Für Hover-Effekt vorbereiten */
    transition: color 0.3s ease, border-color 0.3s ease;
}

/* Um den ersten Eintrag nicht einzurücken (bei margin-left) */
#main-header nav ul li:last-child a {
    margin-right: 15px;
}

#main-header nav ul li a:hover,
#main-header nav ul li a.active { /* Aktiven Link hervorheben (optional, JS nötig) */
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    text-decoration: none;
}

.cta-button {
    background-color: var(--primary-color);
    color: #fff;
    padding: 10px 20px;
    border-radius: 25px; /* Abgerundete Ecken */
    text-decoration: none;
    font-weight: bold; /* Nutzt BerlinTypeWeb-Bold */
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.cta-button:hover {
    background-color: var(--primary-color-darker);
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-2px); /* Leichter Hebe-Effekt */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.language-dropdown {
    position: relative; /* Needed for absolute positioning of the dropdown */
}

.language-toggle {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: inline-flex; /* Use flex to align the SVG inside */
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    color: var(--text-color); /* Inherit text color for SVG's 'currentColor' */
    transition: color 0.3s ease; /* Add transition for hover */    
}

.language-toggle:hover {
    color: var(--primary-color); /* Change button's color, SVG will inherit */
}

/* Style the SVG icon directly */
.language-toggle svg {
    width: 24px;  /* Or desired size (1.5rem is common for size-6) */
    height: 24px; /* Or desired size */
    stroke-width: 1.2; /* Match the SVG attribute if needed */
    stroke: currentColor;
    /* stroke: var(--text-color); */ /* Explicitly set stroke if currentColor fails */
    transition: stroke 0.3s ease;
}

.language-options {
    list-style: none;
    padding: 0.5em 0; /* Vertical padding, links will handle horizontal */
    margin: 0;
    position: absolute;
    top: 100%; /* Position below button with a small gap */
    /* Adjust left/right based on where you want it to align */
    /* left: 0; */ /* Aligns to the left edge of the button */
    right: 0; /* Aligns to the right edge - often better for icons on the right */
    background-color: #fff;
    border: 1px solid #eee; /* Softer border */
    border-radius: 4px; /* Subtle rounding */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); /* Nice shadow */
    z-index: 1001; /* Ensure it's above header content */
    display: none;
    min-width: 100px; /* Minimum width */
    white-space: nowrap; /* Prevent text wrapping */
}

/* Style the links within the dropdown */
.language-options li a {
    display: block; /* Make the whole area clickable */
    padding: 0.6em 1.2em; /* Comfortable padding */
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.9rem; /* Slightly smaller font */
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Hover effect for dropdown links */
.language-options li a:hover {
    background-color: #f5f5f5; /* Light background on hover */
    color: var(--primary-color); /* Use primary color for text */
    text-decoration: none; /* Ensure no underline appears */
}

/* The rule to show the dropdown on hover */
.language-dropdown:hover .language-options {
    display: block;
}


/* === Content Sections === */
.content-section {
    padding: 80px 0; /* Mehr Abstand zwischen Sektionen */
    /* WICHTIG: Scroll-Offset für Ankerlinks wegen fixiertem Header */
    scroll-margin-top: var(--header-height);
}

/* Zebra-Streifen für Sektionen (optional) */
.content-section:nth-of-type(even) {
     background-color: var(--background-color);
}

/* === Spezifische Sektionen === */

/* === Hero Section Styling === */
.hero-section {
    /* Hintergrundbild hinzufügen */
    background-image: linear-gradient(rgba(0, 123, 255, 0.6), rgba(0, 123, 255, 0.6)), url('resources/praxis.jpg'); /* Farbverlauf über dem Bild für Textlesbarkeit */
    background-size: cover; /* Bild füllt den Bereich */
    background-position: center center; /* Bild zentrieren */
    background-attachment: fixed; /* Parallax-Effekt (optional, kann weggelassen werden) */

    color: #ffffff; /* Helle Textfarbe für Kontrast */
    padding: 120px 0; /* Mehr vertikaler Abstand */
    text-align: center;
    position: relative; /* Für mögliche Overlays oder Elemente */
    min-height: 60vh; /* Mindesthöhe, damit man das Bild gut sieht */
    display: flex; /* Ermöglicht vertikale Zentrierung */
    align-items: center; /* Vertikal zentrieren */
    justify-content: center; /* Horizontal zentrieren (da text-align schon center ist, optional) */
}

.hero-section .container {
    max-width: 800px;
    position: relative; /* Stellt sicher, dass der Container über dem Hintergrund liegt */
    z-index: 2; /* Über dem Hintergrund */
}

.hero-title {
    font-size: 2.8rem;
    margin-bottom: 0.5em;
    color: #ffffff; /* Helle Farbe */
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5); /* Textschatten für bessere Lesbarkeit */
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #f0f0f0; /* Leicht abgedunkeltes Weiß */
    margin-bottom: 1.5em;
    line-height: 1.7;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.6); /* Textschatten */
}



/* Anpassungen für kleinere Bildschirme */
@media (max-width: 768px) {
    .hero-section {
        padding: 100px 0;
        min-height: 50vh;
         background-attachment: scroll; /* Parallax auf Mobile oft problematisch */
    }
    .hero-title {
        font-size: 2.2rem;
    }
    .hero-subtitle {
        font-size: 1.1rem;
    }
}

/* Leistungen */
.leistungen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive Grid */
    gap: 30px; /* Abstand zwischen den Items */
    margin-top: 40px;
}

.leistung-item {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.leistung-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}
.leistung-item h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

/* --- Styling for Leistung Items (Base / Desktop) --- */
.leistung-item p {
    display: block; /* Ensure text is visible by default on desktop */
    transition: opacity 0.3s ease-in-out, max-height 0.4s ease-in-out; /* Add transitions for potential future effects */
    max-height: 500px; /* Set a large max-height for transition purposes */
    opacity: 1;
}

/* --- Mobile Specific Styles for Leistung Items --- */
@media (max-width: 768px) {
    .leistung-item {
        cursor: pointer; /* Indicate clickability on mobile */
        /* Optional: Add a subtle visual cue */
        position: relative; /* Needed for pseudo-elements if you add them */
        display: flex;
        flex-direction: column; /* Stack h3 and p vertically */
        justify-content: center; /* Center content vertically */
        min-height: 20px; /* Ensure a minimum height for centering, adjust as needed */
    }

    /* Ensure h3 itself has no extra margins interfering */
    .leistung-item h3 {
        margin: 0; /* Remove default H3 margins */
        font-size: 1.3rem; /* Keep font size */
        /* Optional: Add line-height if text wrapping affects centering */
        /* line-height: 1.3; */
        /* Ensure h3 doesn't prevent centering if it grows */
        flex-shrink: 0;
    }

    .leistung-item p {
        display: block; /* Keep display: block for transitions */
        overflow: hidden; /* Hide overflowing content */
        opacity: 0;       /* Make text invisible */
        max-height: 0;    /* Collapse the element */
        margin-top: 0;    /* Remove top margin when hidden */
        margin-bottom: 0; /* Remove bottom margin when hidden */
        padding-top: 0;   /* Remove padding when hidden */
        padding-bottom: 0;/* Remove padding when hidden */
        transition: opacity 0.3s ease-in-out, max-height 0.4s ease-in-out, margin 0.4s ease-in-out, padding 0.4s ease-in-out; /* Smooth transitions */
        flex-shrink: 0;
    }

    .leistung-item.text-visible {
        /* Override vertical centering when text is shown, align to top */
        justify-content: flex-start;
    }

    /* Style for when the text should be visible on mobile (after click) */
    .leistung-item.text-visible p {
        opacity: 1;     /* Make text visible */
        max-height: 500px; /* Allow element to expand (adjust if needed) */
        /* Re-apply original margins/padding if desired, or add new ones */
        margin-top: 15px;
        margin-bottom: 0; /* Default p margin */
    }

    /* Optional: Add an indicator like a '+' or arrow */
    .leistung-item::after {
        content: '+'; /* Simple indicator */
        position: absolute;
        top: 22px; /* Align with heading */
        right: 20px;
        font-size: 1.5rem;
        color: var(--primary-color);
        transition: transform 0.3s ease;
    }

    .leistung-item.text-visible::after {
        content: '−'; /* Change indicator when open */
        transform: rotate(180deg); /* Optional rotation effect */
    }
}

/* --- Ensure default cursor on desktop --- */
@media (min-width: 769px) {
    .leistung-item {
        cursor: default; /* Standard cursor on desktop */
    }
     .leistung-item::after {
        content: ''; /* Remove indicator on desktop */
        display: none;
    }
}

/* Über Uns */
/* Styling for the floated image */
.about-us-image {
    float: left; /* Makes the image float to the left, text wraps on the right */
    max-width: 30%; /* Limit image width, e.g., 40% of the container */
    height: auto;   /* Maintain aspect ratio */
    margin-right: 25px; /* Space between image and text */
    margin-bottom: 15px; /* Space below the image before next elements */
    border-radius: 8px; /* Rounded corners for modern look */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}

/* Clear the float before the "Die Zahnschwestern" heading */
#ueber-uns  > .container > h3 {
    clear: left; /* Ensures this heading starts below the floated image */
    margin-top: 5em;
}
  
/* --- Responsive adjustments for the floated image --- */
@media (max-width: 768px) {
    .about-us-image {
        float: none; /* Disable float on smaller screens */
        display: block; /* Make it a block element */
        max-width: 80%; /* Allow it to be wider when centered */
        margin: 0 auto 25px auto; /* Center the image and add bottom margin */
    }

    /* Reset the clear and margin for the heading on mobile */
    #ueber-uns h3 {
        clear: none;
        margin-top: 1.5em; /* Reset to default h3 margin or adjust as needed */
    }
}
  
/* Adjust if needed for very small screens */
@media (max-width: 480px) {
    .about-us-image {
        max-width: 95%; /* Nearly full width on very small screens */
    }
}

/* Existing Team Container styles (ensure they still work) */
.team-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap; /* Umbruch bei kleineren Bildschirmen */
    gap: 40px;
}

.team-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap; /* Umbruch bei kleineren Bildschirmen */
    gap: 40px;
    margin-top: 40px;
}

.team-mitglied {
    flex-basis: calc(50% - 40px); /* Zwei Spalten mit Abstand */
    text-align: center;
    max-width: 400px; /* Maximale Breite pro Mitglied */
}

.team-foto {
    width: 180px;
    height: 180px;
    border-radius: 50%; /* Runde Fotos */
    object-fit: cover; /* Stellt sicher, dass das Bild den Kreis füllt */
    margin-bottom: 0px;
    border: 4px solid var(--primary-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.team-mitglied h3 {
    margin-bottom: 10px;
    font-size: 1.4rem;
}

/* --- Praxis Galerie Styling --- */
.praxis-galerie-container {
    margin-top: 40px; /* Abstand nach oben zum Team-Bereich */
}

.praxis-galerie {
    display: flex; /* Aktiviert Flexbox für die Anordnung */
    flex-wrap: wrap; /* Erlaubt Umbruch in die nächste Zeile */
    gap: 15px; /* Abstand zwischen den Bildern */
    justify-content: center; /* Zentriert die Bilder horizontal, wenn Platz übrig ist */
}

.galerie-bild {
    flex: 1 1 250px; /* Flexible Breite: wächst/schrumpft, Basisbreite ca. 250px */
    max-width: 300px; /* Maximale Breite pro Bild-Container */
    border-radius: 8px; /* Abgerundete Ecken */
    overflow: hidden; /* Stellt sicher, dass das Bild innerhalb der Rundung bleibt */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Dezenter Schatten für Tiefe */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Übergang für Hover-Effekt */
}

.galerie-bild img {
    display: block; /* Verhindert unerwünschten Leerraum unter dem Bild */
    width: 100%; /* Bild füllt den Container aus */
    height: auto; /* Behält das Seitenverhältnis bei */
    aspect-ratio: 4 / 3; /* Optional: Erzwingt ein Seitenverhältnis (z.B. 4:3) */
    object-fit: cover; /* Stellt sicher, dass das Bild den Bereich füllt, ohne verzerrt zu werden */
}

/* Optional: Hover-Effekt für etwas Interaktivität */
.galerie-bild:hover {
    transform: scale(1.03); /* Leichtes Vergrößern beim Überfahren */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); /* Etwas stärkerer Schatten */
}

/* --- Anpassungen für kleinere Bildschirme (Beispiel) --- */
@media (max-width: 600px) {
    .galerie-bild {
        flex-basis: calc(50% - 10px); /* Zwei Bilder pro Zeile auf kleineren Schirmen */
        max-width: none; /* Max-Breite aufheben, damit flex-basis wirkt */
        gap: 10px; /* Kleinerer Abstand */
    }
}

/* Bewertungen */
.cta-button-secondary {
    background-color: transparent;
    color: var(--primary-color);
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: inline-block;
    border: 2px solid var(--primary-color);
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 15px;
}
.cta-button-secondary:hover {
    background-color: var(--primary-color);
    color: #fff;
    text-decoration: none;
}


/* Kontakt */
.kontakt-flex {
    display: flex;
    flex-wrap: wrap; /* Umbruch auf kleinen Bildschirmen */
    gap: 40px; /* Abstand zwischen Info und Karte */
    align-items: flex-start; /* Oben ausrichten */
    margin-top: 40px;
}

.kontakt-info {
    flex: 1; /* Nimmt verfügbaren Platz ein */
    min-width: 300px; /* Mindestbreite für Info */
}
.kontakt-info h3 {
    margin-top: 1.5em;
}
.kontakt-info h3:first-of-type {
    margin-top: 0;
}


.kontakt-map {
    flex: 1; /* Nimmt verfügbaren Platz ein */
    min-width: 300px; /* Mindestbreite für Karte */
}

.kontakt-map iframe {
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.kontakt-button {
    margin-top: 20px;
}

/* === Footer === */
footer {
    background-color: #343a40; /* Dunkler Footer */
    color: #f8f9fa;
    padding: 30px 0;
    text-align: center;
    margin-top: 60px; /* Abstand zum letzten Inhalt */
}

footer p {
    margin-bottom: 5px;
    font-size: 0.9rem;
}

footer a {
    color: #adb5bd; /* Helleres Grau für Links */
}

footer a:hover {
    color: #fff;
}

/* === Animationen === */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px); /* Startet etwas weiter unten */
    transition: opacity 0.6s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* === Responsivität === */
@media (max-width: 992px) {
    .container {
        max-width: 960px;
    }
    .team-mitglied {
        flex-basis: calc(50% - 20px); /* Weniger Gap */
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 70px; /* Header etwas kleiner */
    }
    body {
        padding-top: 100px; /* Anpassung für kleineren Header */
    }
    #main-header {
        height: auto; /* Höhe automatisch anpassen */
        padding: 5px 0;
    }
    .header-container {
        flex-direction: column; /* Untereinander anordnen */
        align-items: center;
    }
    .logo {
        height: 45px;
        margin-bottom: 5px;
    }
    #main-header nav {
        margin: 5px 0;
    }
    #main-header nav ul li {
        margin-left: 10px;
    }
    /* Schriftgröße der Navigationslinks verkleinern */
    #main-header nav ul li a {
        font-size: 0.8rem; /* Kleinere Schriftgröße, vorher 0.8rem */
        letter-spacing: 0.5px; /* Optional: Buchstabenabstand leicht reduzieren */
    }
    /* Abstand nach dem letzten Element ggf. anpassen */
    #main-header nav ul li:last-child a {
    margin-right: 10px; /* Kleinerer Abstand, vorher 15px */
    }
    .language-toggle svg {
        width: 22px;  /* Or desired size (1.5rem is common for size-6) */
        height: 22px; /* Or desired size */
        stroke-width: 1; /* Match the SVG attribute if needed */
        /* stroke: var(--text-color); */ /* Explicitly set stroke if currentColor fails */
    }
    .cta-button {
        padding: 8px 15px;
        font-size: 0.8rem;
        margin-top: 5px;
    }

    h2 {
        font-size: 1.8rem;
    }
    h3 {
        font-size: 1.4rem;
    }
    .content-section {
        padding: 60px 0;
         scroll-margin-top: 100px; /* Mehr Offset auf Mobile wegen potentiellem Zeilenumbruch im Header */
    }

    .leistungen-grid {
        grid-template-columns: 1fr; /* Eine Spalte auf Mobile */
        gap: 20px;
    }

     .team-container {
        flex-direction: column; /* Untereinander */
        align-items: center;
     }
    .team-mitglied {
        flex-basis: 100%; /* Volle Breite */
        max-width: 90%;
    }

    .kontakt-flex {
        flex-direction: column; /* Untereinander */
        gap: 30px;
    }
}

@media (max-width: 480px) {
     #main-header nav ul li a {
        font-size: 0.8rem;
     }
     #main-header nav ul li {
        margin: 0 6px;
    }
    .logo {
        height: 40px;
    }
}