/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    /* Colors */
    --clr-primary: #cc0100;
    --clr-primary-dark: #991b1b;
    --clr-accent: #fbbf24;
    --clr-accent-light: #fffbeb;
    --clr-text: #1e293b;
    --clr-bg-light: #f8fafc;
    --clr-footer-bg: #0f172a;
    --clr-white: #ffffff;

    /* Fonts & Sizes */
    --font-base: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --container-width: 1280px;
    --header-height: 80px;
    --radius: 12px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-base);
    color: var(--clr-text);
    background-color: var(--clr-bg-light);
    font-size: 18px;
    line-height: 1.6;
    display: flex; flex-direction: column; min-height: 100vh;
}

/* Accessibility Focus */
*:focus-visible {
    outline: 3px solid var(--clr-accent);
    outline-offset: 2px;
}

.skip-link {
    position: absolute; top: -100px; left: 1rem;
    background: var(--clr-primary); color: white; padding: 1rem; z-index: 999;
    transition: top 0.3s;
}
.skip-link:focus { top: 1rem; }

section[id] {
    scroll-margin-top: 40px;
}

/* =========================================
   2. LAYOUT UTILITY
   ========================================= */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}
.section-padding { padding: 4rem 0; }
.bg-light { background-color: var(--clr-bg-light); }

/* =========================================
   3. HEADER & NAVIGATION
   ========================================= */
.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    position: sticky; top: 0; z-index: 100;
    border-bottom: 4px solid var(--clr-accent);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-inner {
    height: var(--header-height);
    display: flex; justify-content: space-between; align-items: center;
}

/* Logo */
.logo-link { 
    display: flex; align-items: center; gap: 0.75rem;
    text-decoration: none; color: inherit; 
}
.logo-img {
    height: 50px; width: auto; object-fit: contain; border-radius: 8px;
}
.logo-text-wrapper {
    display: flex; flex-direction: column; justify-content: center;
}
.logo-main { 
    font-size: 1.75rem; font-weight: 700; color: var(--clr-primary); line-height: 1; 
}
.logo-sub { 
    font-size: 0.875rem; font-weight: 600; text-transform: uppercase; 
    letter-spacing: 0.1em; color: var(--clr-text); 
}

/* Navigation Desktop */
.desktop-nav { display: none; gap: 2rem; align-items: center; }

.nav-link { 
    text-decoration: none; color: var(--clr-text); font-weight: 500; transition: color 0.2s; 
}
.nav-link:hover { 
    color: var(--clr-primary); text-decoration: underline; text-underline-offset: 4px; 
}

.nav-cta {
    display: flex; align-items: center; gap: 0.5rem;
    background: var(--clr-accent); color: var(--clr-text);
    padding: 0.75rem 1.5rem; border-radius: var(--radius);
    text-decoration: none; font-weight: 700; transition: background 0.2s;
}
.nav-cta:hover { background: #f59e0b; }

/* Navigation Mobile Toggle */
.mobile-toggle { 
    background: none; border: none; cursor: pointer; color: var(--clr-text); 
    padding: 0.5rem; display: block; 
}
.mobile-toggle .icon-close { display: none; }
.mobile-toggle[aria-expanded="true"] .icon-menu { display: none; }
.mobile-toggle[aria-expanded="true"] .icon-close { display: block; }

/* Navigation Mobile Menu */
.mobile-menu {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: white; border-top: 1px solid #eee;
    padding: 1.5rem; box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.mobile-menu.active { display: block; }

.mobile-link,
.mobile-link:visited { 
    display: block; padding: 1rem; text-decoration: none; color: var(--clr-text); 
    font-weight: 500; border-radius: var(--radius); 
}
.mobile-link:hover { background: var(--clr-accent-light); color: var(--clr-primary); }

.sub-headline {
    color: var(--clr-text);
    font-size: 1.1rem;
    font-weight: 500;
}

.mobile-cta {
    display: block; text-align: center; background: var(--clr-accent); color: var(--clr-text);
    font-weight: 700; padding: 1rem; border-radius: var(--radius); margin-top: 1rem; text-decoration: none;
}

/* =========================================
   4. HERO SECTION
   ========================================= */
.hero-section { position: relative; overflow: hidden; padding-bottom: 4rem; padding-left: 1.5rem;}

.hero-grid { 
    display: grid; grid-template-columns: 1fr; gap: 2rem; padding-top: 3rem;
    position: relative; z-index: 10; 
}

.hero-content {padding-right: 3rem; }
.hero-content h1 { font-size: 2.5rem; line-height: 1.1; font-weight: 800; margin-bottom: 1.5rem; }
.highlight-text { color: var(--clr-primary); display: block; }
.hero-lead { font-size: 1.25rem; color: var(--clr-text); margin-bottom: 2rem; max-width: 600px; }

.hero-buttons { display: flex; flex-direction: row; gap: 1rem; }

.btn { 
    display: inline-block; padding: 1rem 2rem; border-radius: var(--radius); 
    font-weight: 700; text-decoration: none; text-align: center; transition: all 0.2s; 
}
.btn-primary { 
    background: var(--clr-primary); color: white; 
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.3); 
}
.btn-primary:hover { background: var(--clr-primary-dark); }
.btn-secondary { 
    background: var(--clr-accent); color: var(--clr-text); 
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.3);
}
.btn-secondary:hover { background: #f59e0b; }

.hero-image-wrapper { 
    position: relative; margin-top: 2rem; border-radius: 1rem; overflow: hidden; 
    height: 300px; display: none;
}
.hero-image-wrapper img { width: 100%; height: 100%; object-fit: cover; border-radius: 1rem 0 0 1rem;}


/* =========================================
   5. ABOUT SECTION
   ========================================= */
.about-grid { display: flex; flex-direction: column; gap: 3rem; }
.about-image { position: relative; }
.about-image img { 
    width: 100%; border-radius: 1.5rem; position: relative; z-index: 1; 
    box-shadow: 0 10px 20px rgba(0,0,0,0.1); 
}

.about-text h2 { font-size: 2rem; margin-bottom: 1rem; color: var(--clr-text); }

/* =========================================
   6. SERVICES & FAQ (ACCORDIONS)
   ========================================= */
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: 2.5rem; }
.divider { 
    width: 100px; height: 6px; background: var(--clr-accent); 
    border-radius: 3px; margin: 1rem auto; 
}

.services-grid, .faq-grid { max-width: 800px; margin: 0 auto; }
.services-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; align-items: start; }

/* Card Styling */
.service-card { 
    background: white; border-radius: var(--radius); 
    box-shadow: 0 4px 6px rgba(0,0,0,0.25); overflow: hidden; 
    border: 3px solid transparent; transition: border-color 0.2s; 
}
.service-card:hover { border-color: var(--clr-accent); }

/* Triggers & Headers */
.accordion-trigger, .faq-trigger {
    width: 100%; text-align: left; background: none; border: none;
    padding: 1.5rem; display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; color: inherit; font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
}

.trigger-content { display: flex; align-items: center; flex: 1; }
.icon-box { 
    background: var(--clr-accent-light); color: var(--clr-primary); 
    padding: 0.75rem; border-radius: 50%; 
}
.trigger-text h3 { font-size: 1.25rem; margin-bottom: 0.25rem; }
.trigger-text p { font-size: 0.9rem; }

/* Content Wrapper (Hidden/Visible logic) */
.accordion-content, .faq-content {
    display: grid; 
    grid-template-rows: 0fr; 
    transition: grid-template-rows 0.3s ease-out;
    background: transparent; 
    visibility: hidden;
    overflow: hidden;
}
.accordion-content.open, .faq-content.open {
    grid-template-rows: 1fr; visibility: visible;
}
.faq-content { background-color: white; } 

/* Inner Content (Design & Padding) */
.content-inner, .faq-inner {
    min-height: 0;
    padding: 0;
    border: none; 
    background-color: var(--clr-accent-light);
    overflow: hidden;
}
.content-inner { border-top: 1px solid #eee; }
.content-inner p { padding: 1.5rem; margin: 0; }

.service-list {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem 2rem;
    list-style: none; padding: 1.5rem; margin: 0; 
}
.service-list li {
    position: relative; padding-left: 1.5rem; line-height: 1.4; color: var(--clr-text);
}
.service-list li::before {
    content: ""; position: absolute; left: 0; top: 9px;
    width: 8px; height: 8px; background-color: var(--clr-primary); border-radius: 50%;
}

/* FAQ Specifics */
.faq-list { border-radius: 1rem; overflow: hidden; }
.faq-item { border-bottom: 1px solid #eee; }
.faq-item:last-child { border-bottom: none; }
.faq-trigger:hover { background-color: #fafafa; }

.faq-question {
    font-size: 1.25rem; font-weight: 700; color: var(--clr-text); margin-right: 1rem;
}
.faq-text-pad {
    padding-left: 2rem; border-left: 4px solid var(--clr-accent); 
    margin: 1.5rem 0 1.5rem 1.5rem; color: var(--clr-text); 
}

/* Buttons (Details & FAQ Icon) */
.btn-details, .faq-icon {
    background-color: var(--clr-accent-light); color: var(--clr-primary);
    padding: 0.5rem 1rem; border-radius: 50px;
    font-size: 0.9rem; font-weight: 600; white-space: nowrap;
    margin-left: 1rem; transition: all 0.2s;
    min-width: 140px; text-align: center;
}

.btn-details::after { content: "Details anzeigen ▼"; }
.faq-icon::after { content: "Antwort anzeigen ▼"; }

.accordion-trigger[aria-expanded="true"] .btn-details, 
.faq-trigger[aria-expanded="true"] .faq-icon { 
    color: var(--clr-text); 
}
.accordion-trigger[aria-expanded="true"] .btn-details::after { content: "Details ausblenden \25B2"; }
.faq-trigger[aria-expanded="true"] .faq-icon::after { content: "Antwort ausblenden \25B2"; }

/* =========================================
   7. AREA CHECK & MAP
   ========================================= */
.area-check-wrapper {
    background: #1e293b; color: white; border-radius: 1.5rem; overflow: hidden;
    display: flex; flex-direction: column; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}
.area-content { padding: 3rem; flex: 1; }
.area-content h2 { color: var(--clr-accent); margin-bottom: 1rem; }
.area-desc { color: #cbd5e1; margin-bottom: 2rem; }

/* Input */
.zip-input-box { 
    background: rgba(255,255,255,0.1); padding: 1.5rem; 
    border-radius: 1rem; backdrop-filter: blur(4px); 
}
.zip-input-box label { 
    display: block; color: var(--clr-accent); text-transform: uppercase; 
    font-size: 0.875rem; font-weight: 700; margin-bottom: 0.5rem; 
}
#zip-result { margin-top: 1rem; min-height: 1.6em; }

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.input-group { display: flex; gap: 1rem; flex-wrap: wrap; }
.input-group input { 
    flex: 1; padding: 1rem; border-radius: 0.75rem; border: none; 
    font-size: 1.25rem; font-weight: bold; 
}
.input-group button { 
    background: var(--clr-accent); border: none; padding: 1rem 2rem; 
    border-radius: 0.75rem; font-weight: bold; font-size: 18px; cursor: pointer; 
}

/* Map */
.area-map { background: #0f172a; color: white; position: relative; min-height: 300px; flex: 1; }
.area-map img { display: block; width: 100%; height: 100%; object-fit: cover; } 

.map-attribution {
    position: absolute; bottom: 0px; right: 3px;
    font-size: 8px; color: #475569;
    background: rgba(255, 255, 255, 0.95);
    padding: 2px 5px; z-index: 20; pointer-events: auto;
}
.map-attribution a { color: inherit; text-decoration: none; }

/* =========================================
   8. PARTNER SECTION
   ========================================= */
.partner-section {
    background-color: white; padding: 3rem 0;
    border-top: 1px solid #eee; text-align: center;
}
.partner-headline {
    color: var(--clr-text-light); text-transform: uppercase;
    font-size: 0.85rem; letter-spacing: 1.5px; font-weight: 700; margin-bottom: 2rem;
}

.partner-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 2rem; align-items: start; text-align: center;
}

.partner-item {
    display: flex; flex-direction: column; align-items: center;
    gap: 1rem; text-decoration: none; transition: transform 0.2s;
}
.partner-item:hover { transform: translateY(-5px); }

.partner-logo-box {
    width: 100%; height: 140px; background: white; border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex; align-items: center; justify-content: center;
    padding: 1rem; border: 1px solid #eee; transition: border-color 0.2s, box-shadow 0.2s;
}
.partner-item:hover .partner-logo-box {
    border-color: var(--clr-accent); box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.partner-img {
    max-width: 100%; max-height: 100%; object-fit: contain; 
    filter: grayscale(100%); opacity: 1; transition: all 0.3s ease;
}
.partner-item:hover .partner-img { filter: grayscale(0%); opacity: 1; }

.partner-name {
    color: var(--clr-text); font-weight: 600; font-size: 0.95rem;
}
.partner-item:hover .partner-name { color: var(--clr-primary); }

/* =========================================
   9. FOOTER
   ========================================= */
.site-footer { background: var(--clr-footer-bg); color: white; padding: 4rem 0 2rem; }
.footer-grid { display: grid; gap: 3rem; grid-template-columns: 1fr; margin-bottom: 3rem; }
.footer-logo { color: var(--clr-accent); margin-bottom: 1rem; }

.footer-contact h3, .footer-hours h3 { 
    margin-bottom: 1.5rem; border-bottom: 1px solid #334155; 
    padding-bottom: 0.5rem; display: inline-block; 
}
.footer-icon { width: 24px; display: inline-block; text-align: center; }

address { font-style: normal; line-height: 2; }
address a { color: #cbd5e1; text-decoration: none; display: block; margin-bottom: 0.5rem; }
address a:hover { color: white; }

.footer-hours ul { list-style: none; }
.footer-hours li { 
    display: flex; justify-content: space-between; border-bottom: 1px solid #1e293b; 
    padding: 0.5rem 0; color: #cbd5e1; 
}
.emergency-note { 
    color: var(--clr-accent) !important; font-weight: bold; 
    border: none !important; margin-top: 1rem; 
}

.footer-bottom { 
    border-top: 1px solid #1e293b; padding-top: 2rem; 
    display: flex; flex-direction: column; gap: 1rem; 
    color: #cbd5e1; font-size: 0.875rem; 
}
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: inherit; text-decoration: none; }

.dev-credits { font-size: 0.75rem; color: #cbd5e1; }


/* =========================================
   10. MEDIA QUERIES (DESKTOP)
   ========================================= */
/* Nav Breakpoint ~950px */
@media (min-width: 950px) {
    .desktop-nav { display: flex; }
    .mobile-toggle { display: none; }
    
    .hero-bg-shape { display: block; }
    .hero-grid { 
        grid-template-columns: 1fr 1fr; align-items: center; 
        padding-top: 6rem; padding-bottom: 6rem; 
    }
    .hero-content h1 { font-size: 3.5rem; }
    .hero-buttons { flex-direction: row; }
    .hero-image-wrapper { 
        position: absolute; right: 0; top: 0; width: 50%; height: 100%; 
        margin: 0; border-radius: 0; display:block;
    }
    
    .about-grid { flex-direction: row; align-items: center; }
    .about-image, .about-text { width: 50%; }
    .benefits-grid { grid-template-columns: repeat(3, 1fr); }
    
    .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
    .footer-bottom { flex-direction: row; justify-content: space-between; }
}

/* Map Breakpoint 1024px */
@media (min-width: 1024px) {
    .area-check-wrapper { flex-direction: row; }
}

/* =========================================
   11. MEDIA QUERIES (MOBILE)
   ========================================= */
@media (max-width: 600px) {
    .hero-buttons { flex-direction: column; }

    /* Service List */
    .service-list { grid-template-columns: 1fr; }

    /* Partners */
    .partner-grid { gap: 2rem; }
    .partner-img { filter: grayscale(0%); }

    /* PLZ-Bereich */
    .input-group { flex-direction: column; gap: 0.5rem; }
    .input-group input { width: 100%; min-width: 0; text-align: center; }
    .input-group button { width: 100%; margin-top: 0.5rem; }

    /* "Details anzeigen" Button wird zum Icon */
    .btn-details {
        min-width: auto; width: 44px; height: 44px; padding: 0; border-radius: 50%;
        display: flex; align-items: center; justify-content: center; margin-left: 0.5rem;
    }
    .btn-details::after { content: "▼"; font-size: 1.2rem; }
    .accordion-trigger[aria-expanded="true"] .btn-details::after { content: "\25B2"; }

    .accordion-trigger {
    -webkit-appearance: none; /* Deaktiviert das Apple-Standard-Styling */
    appearance: none;
    color:  var(--clr-text);
    }

    .accordion-trigger h3, 
    .accordion-trigger p {
    color: inherit;
    }

    /* FAQ Icon */
    .faq-icon {
        min-width: auto; width: 40px; height: 40px; padding: 0;
        display: flex; align-items: center; justify-content: center; border-radius: 50%;
    }
    .faq-icon::after { content: "▼"; }
    .faq-trigger[aria-expanded="true"] .faq-icon::after { content: "\25B2"; }
}