/* =========================================================================
   VARIABLES & RESET
========================================================================= */
:root {
    --primary-green: #379f42; /* Matched to original design */
    --text-color: #555555;
    --text-dark: #222222;
    --text-black: #000000;
    --bg-color: #ffffff;
    --footer-bg: #eeeeee;
    --nav-bg: rgba(255, 255, 255, 0.7); /* Transparent over hero image */
    --primary-blue: #2f6db0; /* ergaenzt: war undefiniert (Service-Karten) */
    --bg-light: #f4f4f4;     /* ergaenzt: war undefiniert (Service-Karten) */
    --font-main: 'Montserrat', sans-serif;
    --transition: all 0.3s ease;
}

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

body {
    font-family: var(--font-main);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.8;
    overflow-x: hidden;
    font-size: 17px; /* Increased from 16px */
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

.container {
    width: 100%;
    max-width: 1800px; /* Significantly increased to push content further left on big screens */
    margin: 0 auto;
    padding: 0 60px; /* Slightly more padding for the very wide layout */
}

/* =========================================================================
   JOOMLA FULL-WIDTH OVERRIDES
   Joomla wraps content in its own container/table structure.
   These rules ensure our full-bleed elements always span the viewport.
========================================================================= */

/* Header + Footer sollen immer volle Breite erhalten,
   auch wenn Joomla sie in einen Container einbettet */
.main-header,
.main-footer,
.hero {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    box-sizing: border-box;
}

/* Header braucht zusätzlich absolute/fixed Positionierung – wird per JS gesetzt,
   daher hier nur den Fallback sichern: */
.main-header {
    left: 0;
    right: 0;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
}

/* Damit Joomla-Standard-Tabellenlayout nicht alles einschränkt */
body, #system-message-container {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
}


.bold-text { font-weight: 700; color: var(--text-black); }
.underline-text { text-decoration: underline; }

/* =========================================================================
   HEADER & NAVIGATION
========================================================================= */
.main-header {
    position: absolute; 
    top: 0; left: 0; width: 100%;
    background: var(--nav-bg);
    z-index: 1000;
    transition: all 0.4s ease;
}

/* Scroll (Sticky) Nav */
.main-header.scrolled {
    position: fixed;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    justify-content: center; /* Initially centered */
    align-items: stretch; /* So items fill height */
    position: relative;
    /* padding: 0 removed to use default container padding for alignment */
}

/* The scroll logo is hidden initially */
.logo-scroll-container {
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.5s ease;
    display: flex;
    align-items: center;
}

.nav-logo img {
    height: auto;
    width: auto;
    max-width: 100%;
    max-height: 60px; /* Seitenverhältnis halten – nie gestaucht */
}

.main-header.scrolled .logo-scroll-container {
    max-width: 500px; 
    opacity: 1;
    margin-right: 60px;
    display: flex;
    align-items: center;
}
.main-header.scrolled .header-container {
    justify-content: space-between; 
    align-items: center; /* Ensure both logo and nav are vertically centered */
}
.main-header.scrolled .desktop-nav {
    width: auto; 
    display: flex;
    align-items: center;
}

.desktop-nav {
    width: 100%;
    max-width: 900px;
    transition: all 0.4s ease;
}

.nav-links {
    display: flex;
    justify-content: center;
    width: 100%;
    border-right: 1px solid rgba(0, 0, 0, 0.1); 
    border-left: 1px solid rgba(0, 0, 0, 0.1);
}

.main-header.scrolled .nav-links {
    border-left: none; /* Hide left border when logo is present */
}

.nav-links li {
    flex: 1;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.nav-links li:last-child {
    border-right: none;
}

.nav-links a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Ensure vertical centering inside link */
    padding: 20px 5px; /* Increased padding and equal top/bottom */
    font-size: 15px; /* Increased from 14px */
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-dark);
    position: relative;
    outline: none;
    min-height: 80px; /* Ensure a consistent height for the bar */
}

.nav-links a i {
    font-size: 18px; /* Increased from 16px */
    margin-bottom: 5px;
    color: #999;
    transition: var(--transition);
}

.nav-links a:hover i,
.nav-links a.active i {
    color: var(--primary-green);
}

/* Green bottom border for active item */
.nav-links a.active {
    background: transparent;
}
.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-green);
}

.main-header.scrolled .nav-links a {
    padding: 15px 5px; /* Adjust padding for scroll state */
    flex-direction: row;
    justify-content: center;
    gap: 8px;
    min-height: 80px; /* Stay consistent */
}
.main-header.scrolled .nav-links a i {
    margin-bottom: 0;
    font-size: 15px;
}

.burger-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--primary-green);
    cursor: pointer;
    padding: 10px;
    margin-left: auto;
    align-self: center;
}

/* =========================================================================
   OFFCANVAS MENU
========================================================================= */
.offcanvas {
    position: fixed;
    top: 0; left: -300px; width: 300px; height: 100vh;
    background-color: #fff;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 1001;
    transition: transform 0.4s ease;
    display: flex;
    flex-direction: column;
}
.offcanvas.open { transform: translateX(300px); }

.offcanvas-header {
    padding: 20px;
    display: flex;
    justify-content: flex-end;
    border-bottom: 1px solid #eee;
}
.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
}
.close-btn:hover { color: var(--primary-green); }

.offcanvas-nav { padding: 20px 0; }
.offcanvas-nav a {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-dark);
    border-bottom: 1px solid #f5f5f5;
}
.offcanvas-nav a i {
    width: 25px;
    color: var(--primary-green);
}
.offcanvas-nav a:hover,
.offcanvas-nav a.active {
    background-color: rgba(55, 159, 66, 0.05);
    color: var(--primary-green);
}

.overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0; visibility: hidden; z-index: 999;
    transition: all 0.3s;
}
.overlay.active { opacity: 1; visibility: visible; }

/* =========================================================================
   HERO SECTION
========================================================================= */
.hero {
    position: relative;
    height: 550px; /* Reduced from 700px to better fit the visual layout */
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

/* Gradient block on left */
.hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; 
    width: 1000px; /* Reduced to stop further left */
    height: 100%;
    /* Increased intensity (95% opacity), holding the white area longer */
    background: linear-gradient(to right, 
        rgba(255,255,255,0.95) 0%, 
        rgba(255,255,255,0.95) 45%, 
        rgba(255,255,255,0.8) 75%, 
        rgba(255,255,255,0) 100%);
    z-index: 2;
}

.hero-container {
    height: 100%;
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Ensure alignment with container left */
}

.hero-content {
    max-width: 600px;
    width: 100%;
    min-width: 0; /* erlaubt Schrumpfen im Flex-Container (Mobil) */
    margin-top: 50px; /* offset for nav */
    padding-left: 0; /* Ensure strictly aligned with container edge */
}

.hero-main-logo {
    width: 100%;
    max-width: 450px; /* Increased to fill the larger white area */
    height: auto; /* Seitenverhältnis halten – kein Stauchen/Abschneiden */
    margin-bottom: 30px;
}

.hero p {
    font-size: 15px; /* Increased from 12px */
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: 35px;
}

.btn-green {
    display: inline-block;
    background-color: var(--primary-green);
    color: #fff;
    padding: 10px 25px;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-green:hover {
    background-color: #2b7d34;
    color: #fff;
}

/* =========================================================================
   MAIN CONTENT GRID
========================================================================= */
.main-grid {
    display: grid;
    grid-template-columns: auto 320px; /* Text on left, sidebar rigid width on right */
    gap: 80px;
    padding: 80px 20px;
}

/* TEXT AREA */
.section-title {
    font-size: 20px; /* Increased from 17px */
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-dark);
    margin-bottom: 5px;
    font-weight: 600;
}

.section-subtitle {
    font-size: 20px; /* Increased from 17px */
    color: var(--primary-green);
    font-weight: 600;
    margin-bottom: 30px;
}

.text-content p {
    margin-bottom: 20px;
    font-size: 16px; /* Increased from 13px */
}

.holiday-notice {
    margin: 40px 0;
}
.holiday-notice p {
    margin-bottom: 15px;
}

.clinics-info {
    margin-top: 60px;
}

.clinic-list {
    margin-top: 25px;
}

.clinic-group {
    margin-bottom: 35px;
}
.clinic-group p {
    margin-bottom: 10px;
}

/* =========================================================================
   SIDEBAR
========================================================================= */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.sidebar-item h3 {
    text-transform: uppercase;
    font-size: 16px; /* Increased from 14px */
    font-weight: 400; /* Regular weight based on original */
    letter-spacing: 1.5px;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.sidebar-item-content {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.sidebar-text {
    flex: 1;
}

.sidebar-text p {
    font-size: 13px; /* Increased from 11px */
    line-height: 1.6;
    margin: 0;
}

.sidebar-image {
    flex: 1;
}

.sidebar-image img {
    width: 100%;
}

/* =========================================================================
   FOOTER
========================================================================= */
.main-footer {
    background-color: var(--footer-bg);
    padding: 60px 0 40px;
    text-align: center;
}

.footer-title {
    font-size: 14px;
    color: var(--primary-green);
    font-weight: 600;
    margin-bottom: 10px;
}

.footer-content p {
    font-size: 13px; /* Increased from 11px */
    line-height: 1.8;
    color: var(--text-dark);
}

.footer-mail {
    color: var(--primary-green) !important;
    font-weight: 600;
}

.footer-bottom {
    margin-top: 40px;
    font-size: 10px;
    color: var(--text-color);
}
.footer-bottom p {
    margin-bottom: 5px;
    font-size: 11px; /* Increased from 10px */
}

.footer-bottom a {
    color: var(--primary-green);
    font-weight: 600;
    text-decoration: underline;
}

/* =========================================================================
   SCROLL REVEAL (Intersection Observer defined in js)
========================================================================= */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.7s ease-out;
}
.reveal-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* =========================================================================
   RESPONSIVES DESIGN
========================================================================= */
@media (max-width: 900px) {
    .main-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .desktop-nav { display: none; }
    
    .burger-btn { display: block; }
    
    .logo-scroll-container {
        max-width: 200px;
        opacity: 1;
    }

    .main-header {
        position: fixed;
        background: #fff;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    }

    .hero {
        margin-top: 60px; /* Offset for fixed header */
        height: auto;
        padding-bottom: 60px;
    }
    .hero::after {
        width: 100%;
        background: rgba(255,255,255,0.85); /* Full overlay for responsive readability */
    }
    .hero-content {
        margin: 0 auto;
        text-align: center;
    }
    
    .sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .container {
        padding: 0 20px; /* Reduced for smaller screens */
    }

    /* Fix: mobile Navigation bleibt auch im gescrollten Zustand erhalten
       (Burger statt überlaufender Desktop-Nav) */
    .main-header.scrolled .desktop-nav { display: none; }
    .main-header.scrolled .burger-btn { display: block; }
    .main-header.scrolled .logo-scroll-container { max-width: 200px; margin-right: 0; }
}

@media (max-width: 600px) {
    .sidebar {
        grid-template-columns: 1fr;
    }
}

/* =========================================================================
   LEGAL PAGES (Impressum / Datenschutz)
========================================================================= */
.legal-content h3 {
    font-size: 18px; /* Increased from 15px */
    font-weight: 700;
    color: var(--text-dark);
    margin: 30px 0 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid var(--primary-green);
    display: inline-block;
}

.legal-content h4 {
    font-size: 16px; /* Increased from 13px */
    font-weight: 700;
    color: var(--text-dark);
    margin: 20px 0 8px;
}

.legal-content ul {
    list-style: disc;
    padding-left: 20px;
    margin: 10px 0 20px;
}

.legal-content ul li {
    font-size: 15px; /* Increased from 13px */
    color: var(--text-color);
    margin-bottom: 5px;
    line-height: 1.7;
}

.legal-content a {
    color: var(--primary-green);
    text-decoration: underline;
}

/* =========================================================================
   SERVICE PAGE
========================================================================= */
.schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.schedule-card {
    background: #fff;
    padding: 35px 25px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    border-bottom: 5px solid var(--primary-blue);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.schedule-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: var(--primary-blue);
    z-index: 0;
    transition: all 0.3s ease;
    opacity: 0.05;
}

.schedule-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

.schedule-card:hover::after {
    height: 100%;
}

.schedule-card.highlight {
    border-bottom-color: var(--primary-green);
}

.schedule-card.highlight::after {
    background: var(--primary-green);
}

.schedule-icon {
    width: 70px;
    height: 70px;
    background: var(--bg-light);
    color: var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.schedule-card:hover .schedule-icon {
    background: var(--primary-blue);
    color: #fff;
    transform: rotateY(360deg);
}

.schedule-card.highlight .schedule-icon {
    color: var(--primary-green);
}

.schedule-card.highlight:hover .schedule-icon {
    background: var(--primary-green);
}

.schedule-card h3 {
    font-size: 22px; /* Increased from 19px */
    margin-bottom: 15px;
    color: var(--text-dark);
    position: relative;
    z-index: 1;
}

.schedule-time {
    font-size: 25px; /* Increased from 22px */
    font-weight: 700;
    color: var(--primary-blue);
    position: relative;
    z-index: 1;
}

.schedule-card.highlight .schedule-time {
    color: var(--primary-green);
}

.service-notice {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    border-left: 5px solid var(--primary-green);
    margin: 40px 0;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 20px;
}

.service-notice i {
    font-size: 30px;
    color: var(--primary-green);
}

.service-notice p {
    margin: 0;
    font-size: 16px;
    color: var(--text-dark);
    font-weight: 600;
}

.service-actions {
    display: flex;
    gap: 20px;
    margin-top: 50px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .service-actions {
        flex-direction: column;
    }
}

/* =========================================================================
   ICONS EDITORFEST (Burger + Schließen-X per CSS)
   Joomla-Editor entfernt leere <i>-Tags -> Icons hier unabhängig von
   Font Awesome und vom <i>-Element gezeichnet.
========================================================================= */
.burger-btn { position: relative; min-width: 44px; min-height: 44px; }
.burger-btn i { display: none; }
.burger-btn::before {
    content: "";
    position: absolute; top: 50%; left: 50%;
    width: 26px; height: 3px; margin: -1.5px 0 0 -13px;
    background: var(--primary-green); border-radius: 2px;
    box-shadow: 0 -8px 0 var(--primary-green), 0 8px 0 var(--primary-green);
}

.close-btn { position: relative; min-width: 40px; min-height: 40px; }
.close-btn i { display: none; }
.close-btn::before, .close-btn::after {
    content: "";
    position: absolute; top: 50%; left: 50%;
    width: 22px; height: 3px; margin: -1.5px 0 0 -11px;
    background: #999; border-radius: 2px;
}
.close-btn::before { transform: rotate(45deg); }
.close-btn::after  { transform: rotate(-45deg); }
.close-btn:hover::before, .close-btn:hover::after { background: var(--primary-green); }

/* =========================================================================
   AUFZÄHLUNGSPUNKTE IN INHALTSLISTEN
   Globales ul{list-style:none} ist für Navi/Offcanvas gedacht; Listen im
   Beitragstext (.text-content) brauchen wieder sichtbare Bullets.
========================================================================= */
.text-content ul {
    list-style: disc;
    padding-left: 20px;
    margin: 10px 0 20px;
}
.text-content ul li {
    margin-bottom: 5px;
    line-height: 1.7;
}
