/*
Theme Name: Hausarztpraxis Ludwigsfelde
Theme URI: https://www.hausarzt-ludwigsfelde.de/
Author: Hausarztpraxis Ludwigsfelde
Author URI: https://www.hausarzt-ludwigsfelde.de/
Description: Professionelles WordPress-Theme für die Hausarztpraxis Ludwigsfelde – Dr. med. Daniela Schmidt-Stuke. Alle Inhalte sind über das WordPress-Backend editierbar.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hausarztpraxis
Tags: one-column, custom-logo, custom-menu, featured-images, translation-ready
*/

/* ===== CSS VARIABLES ===== */
:root {
    --clr-primary: #8B1A1A;
    --clr-primary-light: #A52929;
    --clr-primary-dark: #6B1010;
    --clr-accent: #C0392B;
    --clr-bg: #FAFAF8;
    --clr-bg-warm: #F5F0EB;
    --clr-bg-card: #FFFFFF;
    --clr-text: #2D2926;
    --clr-text-light: #5A5652;
    --clr-text-muted: #8A8580;
    --clr-border: #E8E2DB;
    --clr-border-light: #F0ECE6;
    --clr-success: #27AE60;
    --clr-warning: #E67E22;
    --font-display: 'DM Serif Display', Georgia, serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 3px rgba(45,41,38,0.06), 0 1px 2px rgba(45,41,38,0.04);
    --shadow-md: 0 4px 16px rgba(45,41,38,0.08), 0 2px 4px rgba(45,41,38,0.04);
    --shadow-lg: 0 12px 40px rgba(45,41,38,0.1), 0 4px 12px rgba(45,41,38,0.04);
    --max-width: 1140px;
    --header-height: 80px;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); }
body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--clr-text);
    background-color: var(--clr-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--clr-primary); text-decoration: none; transition: color 0.25s ease; }
a:hover { color: var(--clr-primary-light); }
ul { list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.25; color: var(--clr-text); }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }
p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

/* ===== UTILITY ===== */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-md); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.section { padding: var(--space-2xl) 0; }
.section-label {
    display: inline-flex; align-items: center; gap: 0.5rem;
    font-family: var(--font-body); font-size: 0.8rem; font-weight: 600;
    letter-spacing: 0.12em; text-transform: uppercase; color: var(--clr-primary);
    margin-bottom: var(--space-sm);
}
.section-label::before {
    content: ''; display: block; width: 28px; height: 2px;
    background: var(--clr-primary); border-radius: 1px;
}
.section-title { margin-bottom: var(--space-lg); }

/* ===== COOKIE CONSENT (GDPR) ===== */
.cookie-banner {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
    background: var(--clr-bg-card); border-top: 1px solid var(--clr-border);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    padding: var(--space-md) var(--space-md);
    transform: translateY(100%); transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.cookie-banner.visible { transform: translateY(0); }
.cookie-inner {
    max-width: var(--max-width); margin: 0 auto;
    display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-md);
    justify-content: space-between;
}
.cookie-text { flex: 1; min-width: 280px; font-size: 0.9rem; color: var(--clr-text-light); }
.cookie-text a { text-decoration: underline; }
.cookie-actions { display: flex; gap: var(--space-xs); flex-shrink: 0; }
.btn-cookie {
    padding: 0.6rem 1.4rem; border-radius: var(--radius-sm); font-family: var(--font-body);
    font-size: 0.85rem; font-weight: 600; border: none; cursor: pointer; transition: all 0.2s ease;
}
.btn-cookie-accept { background: var(--clr-primary); color: #fff; }
.btn-cookie-accept:hover { background: var(--clr-primary-light); }
.btn-cookie-decline { background: var(--clr-bg-warm); color: var(--clr-text); }
.btn-cookie-decline:hover { background: var(--clr-border); }

/* ===== HEADER ===== */
.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(255,255,255,0.97); backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--clr-border-light);
    height: var(--header-height);
    transition: box-shadow 0.3s ease;
}
.header.scrolled { box-shadow: var(--shadow-md); }
.header-inner {
    max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-md);
    height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo img { height: 42px; width: auto; }

/* Desktop Nav */
.nav-desktop { display: flex; align-items: center; gap: 0; }
.nav-desktop a {
    font-size: 0.9rem; font-weight: 500; color: var(--clr-text-light);
    padding: 0.5rem 1rem; border-radius: var(--radius-sm); transition: all 0.2s ease;
    white-space: nowrap;
}
.nav-desktop a:hover { color: var(--clr-primary); background: rgba(139,26,26,0.04); }
.header-phone {
    display: flex; align-items: center; gap: 0.5rem; margin-left: var(--space-md);
    font-weight: 600; color: var(--clr-primary); font-size: 0.9rem;
    padding: 0.5rem 1rem; border: 2px solid var(--clr-primary);
    border-radius: var(--radius-sm); transition: all 0.2s ease; white-space: nowrap;
}
.header-phone:hover { background: var(--clr-primary); color: #fff; }
.header-phone svg { width: 16px; height: 16px; fill: currentColor; }

/* Mobile Toggle */
.nav-toggle {
    display: none; background: none; border: none; cursor: pointer;
    width: 40px; height: 40px; position: relative; z-index: 1001;
}
.nav-toggle span {
    display: block; width: 24px; height: 2px; background: var(--clr-text);
    margin: 0 auto; transition: all 0.3s ease; border-radius: 2px;
}
.nav-toggle span + span { margin-top: 6px; }
.nav-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile Nav */
.nav-mobile {
    display: none; position: fixed; top: var(--header-height); left: 0; right: 0;
    bottom: 0; background: #fff; z-index: 999; overflow-y: auto;
    padding: var(--space-lg) var(--space-md);
    transform: translateX(100%); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-mobile.open { transform: translateX(0); }
.nav-mobile a {
    display: block; padding: 0.8rem 0; font-size: 1.15rem; font-weight: 500;
    color: var(--clr-text); border-bottom: 1px solid var(--clr-border-light);
}
.nav-mobile-phone {
    display: flex; align-items: center; gap: 0.5rem; margin-top: var(--space-lg);
    font-weight: 700; font-size: 1.2rem; color: var(--clr-primary);
}

/* ===== HERO ===== */
.hero {
    margin-top: var(--header-height);
    background: linear-gradient(135deg, var(--clr-primary-dark) 0%, var(--clr-primary) 50%, var(--clr-accent) 100%);
    position: relative; overflow: hidden;
    padding: var(--space-2xl) 0 var(--space-xl);
    min-height: 55vh; display: flex; align-items: center;
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero::after {
    content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 80px;
    background: var(--clr-bg);
    clip-path: ellipse(55% 100% at 50% 100%);
}
.hero-content { position: relative; z-index: 1; text-align: center; color: #fff; }
.hero-subtitle {
    font-family: var(--font-body); font-size: 1rem; font-weight: 400;
    letter-spacing: 0.15em; text-transform: uppercase; opacity: 0.85;
    margin-bottom: var(--space-sm);
}
.hero h1 { color: #fff; margin-bottom: var(--space-md); text-shadow: 0 2px 20px rgba(0,0,0,0.15); }
.hero-doctor { font-size: 1.15rem; opacity: 0.9; font-weight: 300; }
.hero-cta {
    display: inline-flex; align-items: center; gap: 0.6rem;
    margin-top: var(--space-lg); padding: 0.9rem 2rem;
    background: #fff; color: var(--clr-primary); font-weight: 600;
    border-radius: var(--radius-sm); font-size: 0.95rem;
    transition: all 0.3s ease; box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.hero-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,0.2); color: var(--clr-primary); }
.hero-cta svg { width: 18px; height: 18px; fill: currentColor; }

/* ===== ALERT BANNER ===== */
.alert-section { padding: var(--space-lg) 0 var(--space-xl); }
.alert-card {
    background: #FFF5F5; border: 1px solid #FED7D7; border-left: 4px solid var(--clr-accent);
    border-radius: var(--radius-md); padding: var(--space-md) var(--space-lg);
}
.alert-header {
    display: flex; align-items: center; gap: 0.6rem;
    font-weight: 700; color: var(--clr-accent); font-size: 1.05rem;
    margin-bottom: var(--space-xs);
}
.alert-header svg { width: 22px; height: 22px; flex-shrink: 0; }
.alert-card p { color: var(--clr-text); font-size: 0.95rem; margin-bottom: 0.5em; }
.alert-card p:last-child { margin-bottom: 0; }
.alert-card strong { color: var(--clr-primary-dark); }
.alert-content a { color: var(--clr-primary); text-decoration: underline; }
.alert-content a:hover { color: var(--clr-primary-light); }

/* ===== INFO CARDS GRID ===== */
.info-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-md); margin-top: var(--space-lg);
}
.info-card {
    background: var(--clr-bg-card); border: 1px solid var(--clr-border-light);
    border-radius: var(--radius-md); padding: var(--space-lg);
    box-shadow: var(--shadow-sm); transition: all 0.3s ease;
}
.info-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.info-card-icon {
    width: 48px; height: 48px; border-radius: var(--radius-sm);
    background: rgba(139,26,26,0.06); display: flex; align-items: center;
    justify-content: center; margin-bottom: var(--space-sm);
}
.info-card-icon svg { width: 24px; height: 24px; fill: var(--clr-primary); }
.info-card h3 { margin-bottom: var(--space-xs); }
.info-card p { color: var(--clr-text-light); font-size: 0.95rem; }

/* ===== PRAXIS ===== */
.praxis-content {
    display: grid; grid-template-columns: 1fr; gap: var(--space-xl);
    max-width: 800px;
}
.praxis-text p { color: var(--clr-text-light); }
.praxis-signature {
    margin-top: var(--space-md); padding-top: var(--space-md);
    border-top: 1px solid var(--clr-border);
}
.praxis-signature p { font-style: italic; color: var(--clr-text-muted); margin-bottom: 0.3em; }

/* ===== SPRECHZEITEN (HOURS) ===== */
.hours-section { background: var(--clr-bg-warm); }
.hours-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-lg); }
.hours-table { width: 100%; border-collapse: collapse; }
.hours-table caption {
    font-family: var(--font-display); font-size: 1.3rem;
    text-align: left; padding-bottom: var(--space-sm);
    caption-side: top;
}
.hours-table th, .hours-table td {
    text-align: left; padding: 0.75rem 0;
    border-bottom: 1px solid var(--clr-border);
    font-size: 0.95rem;
}
.hours-table th { font-weight: 600; color: var(--clr-text); width: 40%; }
.hours-table td { color: var(--clr-text-light); }
.hours-note {
    background: var(--clr-bg-card); border-radius: var(--radius-md);
    padding: var(--space-lg); border: 1px solid var(--clr-border-light);
}
.hours-note h3 { margin-bottom: var(--space-sm); color: var(--clr-primary); }
.hours-note p { font-size: 0.95rem; color: var(--clr-text-light); }

/* ===== LEISTUNGEN (SERVICES) ===== */
.services-list {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-sm);
}
.service-item {
    display: flex; align-items: center; gap: 0.7rem;
    padding: 0.8rem 1rem; background: var(--clr-bg-card);
    border: 1px solid var(--clr-border-light); border-radius: var(--radius-sm);
    font-size: 0.95rem; color: var(--clr-text-light); transition: all 0.2s ease;
}
.service-item:hover { border-color: var(--clr-primary); color: var(--clr-primary); }
.service-check {
    width: 22px; height: 22px; flex-shrink: 0;
    border-radius: 50%; background: rgba(139,26,26,0.06);
    display: flex; align-items: center; justify-content: center;
}
.service-check svg { width: 12px; height: 12px; fill: var(--clr-primary); }

/* ===== ARZT (DOCTOR) ===== */
.doctor-section { background: var(--clr-bg-warm); }
.doctor-card {
    display: grid; grid-template-columns: auto 1fr; gap: var(--space-xl);
    align-items: center; max-width: 700px;
}
.doctor-photo {
    width: 220px; height: 220px; border-radius: var(--radius-lg);
    overflow: hidden; box-shadow: var(--shadow-lg);
    border: 4px solid #fff;
}
.doctor-photo img { width: 100%; height: 100%; object-fit: cover; }
.doctor-info h3 { font-size: 1.5rem; margin-bottom: 0.3rem; }
.doctor-info .specialty {
    color: var(--clr-primary); font-size: 0.95rem;
    font-weight: 500; margin-bottom: var(--space-sm);
}
.doctor-info p { color: var(--clr-text-light); font-size: 0.95rem; }

/* ===== KONTAKT ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xl); }
.contact-details h3 { margin-bottom: var(--space-md); }
.contact-item {
    display: flex; align-items: flex-start; gap: 1rem;
    padding: 1rem 0; border-bottom: 1px solid var(--clr-border-light);
}
.contact-item:last-child { border-bottom: none; }
.contact-icon {
    width: 40px; height: 40px; border-radius: var(--radius-sm);
    background: rgba(139,26,26,0.06); display: flex; align-items: center;
    justify-content: center; flex-shrink: 0;
}
.contact-icon svg { width: 18px; height: 18px; fill: var(--clr-primary); }
.contact-label { font-size: 0.8rem; color: var(--clr-text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.contact-value { font-weight: 500; color: var(--clr-text); font-size: 0.95rem; }
.contact-map {
    border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-md); min-height: 380px; border: 1px solid var(--clr-border-light);
    background: var(--clr-bg-warm);
    position: relative;
}
.contact-map #map {
    width: 100%; height: 100%; min-height: 380px;
    position: absolute; inset: 0; z-index: 1;
}
.map-consent {
    position: absolute; inset: 0; z-index: 2;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: var(--space-lg);
    background: linear-gradient(135deg, #F0ECE6 0%, #E8E2DB 100%);
}
.map-consent.hidden { display: none; }
.map-consent svg { width: 48px; height: 48px; fill: var(--clr-text-muted); margin-bottom: var(--space-sm); }
.map-consent p { color: var(--clr-text-light); font-size: 0.9rem; margin-bottom: var(--space-sm); max-width: 340px; }
.map-consent strong { color: var(--clr-text); }
.btn-load-map {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.7rem 1.6rem; border-radius: var(--radius-sm);
    background: var(--clr-primary); color: #fff; border: none;
    font-family: var(--font-body); font-size: 0.9rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s ease; margin-bottom: var(--space-xs);
}
.btn-load-map:hover { background: var(--clr-primary-light); transform: translateY(-1px); }
.btn-load-map svg { width: 16px; height: 16px; fill: currentColor; }
.map-external-link {
    display: inline-flex; align-items: center; gap: 0.3rem;
    font-size: 0.8rem; color: var(--clr-text-muted); margin-top: var(--space-xs);
}
.map-external-link:hover { color: var(--clr-primary); }

/* ===== FOOTER ===== */
.footer {
    background: var(--clr-text); color: rgba(255,255,255,0.7); padding: var(--space-xl) 0 var(--space-lg);
}
.footer-inner {
    display: flex; flex-wrap: wrap; justify-content: space-between;
    align-items: flex-start; gap: var(--space-lg);
}
.footer-brand { max-width: 340px; }
.footer-brand img { height: 36px; filter: brightness(0) invert(1); margin-bottom: var(--space-sm); }
.footer-brand p { font-size: 0.85rem; line-height: 1.6; }
.footer-links { display: flex; gap: var(--space-xl); }
.footer-col h4 { color: #fff; font-size: 0.9rem; font-family: var(--font-body); font-weight: 600; margin-bottom: var(--space-sm); }
.footer-col a { display: block; color: rgba(255,255,255,0.6); font-size: 0.85rem; padding: 0.25rem 0; transition: color 0.2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
    margin-top: var(--space-lg); padding-top: var(--space-md);
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex; flex-wrap: wrap; justify-content: space-between;
    gap: var(--space-sm); font-size: 0.8rem;
}
.footer-legal a { color: rgba(255,255,255,0.5); }
.footer-legal a:hover { color: #fff; }
.footer-legal a + a::before { content: '·'; margin: 0 0.5rem; }

/* ===== SCROLL-TO-TOP ===== */
.scroll-top {
    position: fixed; bottom: 2rem; right: 2rem; z-index: 900;
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--clr-primary); color: #fff;
    border: none; cursor: pointer; display: flex;
    align-items: center; justify-content: center;
    box-shadow: var(--shadow-md); opacity: 0; transform: translateY(12px);
    transition: all 0.3s ease; pointer-events: none;
}
.scroll-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.scroll-top:hover { background: var(--clr-primary-light); transform: translateY(-2px); }
.scroll-top svg { width: 20px; height: 20px; fill: currentColor; }

/* ===== WP Admin Bar Fix ===== */
body.admin-bar .header { top: 32px; }
@media screen and (max-width: 782px) {
    body.admin-bar .header { top: 46px; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .nav-desktop { display: none; }
    .header-phone { display: none; }
    .nav-toggle { display: flex; flex-direction: column; justify-content: center; align-items: center; }
    .nav-mobile { display: block; }
    .hours-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .doctor-card { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}

@media (max-width: 768px) {
    :root { --space-2xl: 3.5rem; --space-xl: 2.5rem; }
    .hero { min-height: 45vh; padding: var(--space-xl) 0 var(--space-lg); }
    .hero::after { height: 40px; }
    .info-grid { grid-template-columns: 1fr; }
    .services-list { grid-template-columns: 1fr; }
    .footer-inner { flex-direction: column; }
    .footer-links { flex-direction: column; gap: var(--space-md); }
    .footer-bottom { flex-direction: column; text-align: center; }
    .doctor-photo { width: 180px; height: 180px; }
    .alert-card { padding: var(--space-md); }
}

@media (max-width: 480px) {
    .cookie-actions { flex-direction: column; width: 100%; }
    .btn-cookie { width: 100%; text-align: center; }
}

/* ===== ANIMATIONS ===== */
@media (prefers-reduced-motion: no-preference) {
    .fade-up {
        opacity: 0; transform: translateY(24px);
        transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .fade-up.visible { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .fade-up { opacity: 1; transform: none; }
    html { scroll-behavior: auto; }
}

/* ===== PRINT ===== */
@media print {
    .header, .cookie-banner, .scroll-top, .nav-toggle, .nav-mobile,
    .contact-map, .hero::before, .hero::after { display: none !important; }
    .hero { min-height: auto; padding: var(--space-md) 0; }
    body { font-size: 12pt; color: #000; background: #fff; }
    .section { padding: 1rem 0; }
}
