/* --- DESIGN SYSTEM & RESETS --- */
:root {
    --primary-color: #007791;
    --primary-dark: #004d61;
    --accent-color: #00a8cc;
    --text-dark: #2d3748;
    --bg-light: #f0f7f9;
    --bg-white: #ffffff;
    --focus-outline: #e3a008;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    font-size: 1.1rem;
}

/* Barrierefreie Skip-Links */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--focus-outline);
    color: #000;
    padding: 8px;
    z-index: 100;
    transition: top 0.2s;
}
.skip-link:focus { top: 0; }

*:focus-visible {
    outline: 3px solid var(--focus-outline);
    outline-offset: 2px;
}

/* --- LAYOUT STRUCTURE --- */
header {
    background-color: var(--bg-white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 10;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    flex-wrap: wrap;
}

/* Logo Styling */
.logo-img {
    max-height: 50px;
    width: auto;
    display: block;
}

/* Burger Menü Basics */
.menu-toggle-checkbox {
    display: none;
}
.menu-toggle-label {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--primary-dark);
    user-select: none;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

/* Animierte Link-Unterstreichung */
nav a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 0.2rem;
    position: relative;
    transition: color 0.3s;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

nav a:hover, nav a:focus {
    color: var(--primary-color);
}

nav a:hover::after, nav a:focus::after {
    width: 100%;
}

.back-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}
.back-link:hover { text-decoration: underline; }

/* --- SECTIONS --- */
section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.legal-main {
    max-width: 900px;
    margin: 2rem auto;
    background: var(--bg-white);
    padding: 3rem 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* --- HERO SECTION --- */
.hero {
    background-image: linear-gradient(rgba(10, 48, 62, 0.7), rgba(10, 48, 62, 0.3)), url('../img/hero-lungs.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--bg-white);
    text-align: center;
    max-width: 100%;
    min-height: 20vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 6rem 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 2rem;
}

.hero p {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto 2rem auto;
}

/* --- BUTTONS --- */
.btn {
    display: inline-block;
    background-color: var(--bg-white);
    color: var(--primary-dark);
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, background-color 0.2s;
}
.btn:hover, .btn:focus {
    background-color: var(--bg-light);
    transform: translateY(-2px);
}

h2 {
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 0.5rem;
}
h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 4px;
    background-color: var(--accent-color);
}

/* Zentrierte Überschriften */
#title-schwerpunkt, #title-leistungen, #title-info, #title-patienteninfos {
    text-align: center;
}
#title-schwerpunkt::after, #title-leistungen::after, #title-info::after, #title-patienteninfos::after {
    left: 50%;
    transform: translateX(-50%);
}

h3 { color: var(--primary-dark); margin-bottom: 1rem; margin-top: 1.5rem; }

/* ====================================================
   NEU: Ausgelagerte Klassen für ehem. Inline-Styles
   ==================================================== */

/* Zentrierter Fließtext im Schwerpunkt-Bereich */
.section-text-center {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    text-align: center;
}

/* Hinweistext unter der Sprechzeiten-Tabelle */
.table-hint {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: #555;
}

/* Kontakt-Links (Telefon, E-Mail, Website) */
.contact-link {
    color: var(--primary-color);
    text-decoration: none;
}
.contact-link:hover {
    text-decoration: underline;
}
.contact-link--bold {
    font-weight: bold;
}

/* address-Tag: Kursiv-Stil entfernen */
address {
    font-style: normal;
    margin-top: 1rem;
}

/* Grid für Rate-Limitingistungen */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

/* Schwebende Rate-Limitingistungskarten (Hover-Effekt) */
.service-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border-top: 4px solid var(--primary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.15);
}

.service-card h3 { margin-bottom: 1rem; color: var(--primary-dark); }

/* Grid für Praxis-Infos */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
}

.info-block {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Patienten-Info-Karten */
.patient-info-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.patient-info-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border-left: 5px solid var(--primary-color);
}

/* Hervorgehobene Info-Karte (z. B. Parfum-Hinweis) */
.patient-info-card--highlight {
    border-left-color: var(--focus-outline);
}

.patient-info-card h3 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.patient-info-card p {
    margin-bottom: 0.5rem;
}

.patient-info-card p:last-child {
    margin-bottom: 0;
}

.patient-info-card a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.patient-info-card a:hover {
    text-decoration: underline;
}

/* Team Bild Styling */
.team-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

th { font-weight: 600; color: var(--primary-dark); }

/* --- FOOTER --- */
footer {
    background-color: var(--primary-dark);
    color: var(--bg-white);
    padding: 3rem 2rem;
    text-align: center;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.footer-nav a {
    color: var(--bg-light);
    text-decoration: none;
    margin: 0 1rem;
    font-size: 0.95rem;
}
.footer-nav a:hover { text-decoration: underline; }

/* --- RESPONSIVE DESIGN & BURGER MENÜ --- */
@media (max-width: 768px) {
    .nav-container {
        padding: 1rem;
    }

    .menu-toggle-label {
        display: block;
    }

    .main-nav {
        display: none;
        width: 100%;
        margin-top: 1rem;
    }

    .menu-toggle-checkbox:checked ~ .main-nav {
        display: block;
    }

    nav ul {
        flex-direction: column;
        gap: 0;
        text-align: center;
    }

    nav a {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid #e0e0e0;
    }

    nav a::after {
        display: none;
    }

    section {
        padding: 3rem 1.5rem;
    }
    .info-grid, .services-grid {
        grid-template-columns: 1fr;
    }
    .patient-info-card {
        padding: 1.5rem;
    }
}

/* ====================================================
   NEU: Barrierefreiheit – Animationen reduzieren
   ==================================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
/* ====================================================
   NEU: Atmendes Logo (Brustkorb-Effekt)
   ==================================================== */
.logo-img {
    /* Setzt den Dreh- und Skalierungspunkt genau in die Mitte des Logos */
    transform-origin: center center; 
    
    /* Bindet die Animation ein:
       - 6s: Ein Atemzug dauert beruhigende 6 Sekunden
       - ease-in-out: Sanfter Übergang beim Wechsel der Atemrichtung
       - infinite: Die Animation läuft dauerhaft
    */
    animation: humanBreathe 6s ease-in-out infinite;
}

/* Definition der Atembewegung (Keyframes) */
@keyframes humanBreathe {
    0% {
        transform: scale(1);
        filter: brightness(1);
    }
    /* Einatmen: Der Brustkorb weitet sich langsam bis ca. zur Hälfte des Zyklus */
    45% {
        transform: scale(1.05);   /* Subtile Vergrößerung um 5% – absolut unaufdringlich */
        filter: brightness(1.02); /* Minimale Aufhellung, bringt "Leben" in das Logo */
    }
    /* Kurzes, natürliches Innehalten auf dem Höhepunkt des Einatmens */
    50% {
        transform: scale(1.05);
    }
    /* Ausatmen: Etwas zügiger und fließend wieder zurück in die Ausgangsform */
    100% {
        transform: scale(1);
        filter: brightness(1);
    }
}
/* ================= POPUP STYLES ================= */
#dynamic-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#dynamic-popup-box {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    text-align: center;
    font-family: Arial, sans-serif;
    border-top: 6px solid #e53e3e;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

#dynamic-popup-title {
    margin-top: 0;
    color: #2d3748;
    font-size: 24px;
    margin-bottom: 15px;
}

#dynamic-popup-message {
    color: #4a5568;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
    white-space: pre-line;
    text-align: left;
}

#dynamic-popup-close {
    background: #2b6cb0;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.2s;
    min-width: 150px;
}

#dynamic-popup-close:hover {
    background: #2c5282;
}
