/* General Reset & Typography */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary-color: #0d47a1;
    --primary-light: #1565c0;
    --accent-color: #d32f2f;
    --accent-hover: #b71c1c;
    --text-dark: #212121;
    --text-light: #757575;
    --bg-light: #f5f5f5;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-white);
    padding-bottom: 56px; /* space for mobile floating CTA */
}

@media (min-width: 900px) {
    body {
        padding-bottom: 0;
    }
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===========================
   HEADER & NAVIGATION (mobile-first)
   =========================== */

header {
    background-color: var(--bg-white);
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.logo {
    font-size: 1.15rem;
    font-weight: bold;
    color: var(--primary-color);
    flex: 1;
    min-width: 0;
}

.logo span {
    color: var(--text-dark);
    font-size: 0.75rem;
    display: block;
    font-weight: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Hamburger button – shown on mobile */
.nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.4rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.nav-toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Mobile nav: hidden by default */
nav {
    display: none;
    width: 100%;
    border-top: 1px solid var(--border-color);
}

nav.open {
    display: block;
}

nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
}

nav ul li {
    position: relative;
    border-bottom: 1px solid var(--bg-light);
}

nav ul li a {
    display: block;
    font-weight: 600;
    padding: 14px 16px;
    transition: background-color 0.2s, color 0.2s;
}

nav ul li a:hover,
nav ul li a:focus {
    color: var(--primary-color);
    background-color: var(--bg-light);
}

/* Mobile dropdown */
.dropdown-menu {
    display: none;
    position: static;
    background-color: #eef2ff;
    border-left: 3px solid var(--primary-color);
    min-width: auto;
    list-style: none;
}

.dropdown.open > .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    border-bottom: 1px solid var(--border-color);
    width: 100%;
}

.dropdown-menu li a {
    padding: 12px 28px;
    font-weight: normal;
}

.dropdown-menu li a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

/* Emergency button in mobile nav */
.btn-emergency {
    background-color: var(--accent-color);
    color: white !important;
    padding: 14px 16px;
    font-weight: bold;
    transition: background-color 0.3s;
    text-align: center;
}

.btn-emergency:hover {
    background-color: var(--accent-hover);
    color: white !important;
}

/* ===========================
   DESKTOP NAVIGATION (min-width: 900px)
   =========================== */

@media (min-width: 900px) {
    .header-container {
        padding: 15px 20px;
        flex-wrap: nowrap;
        gap: 0;
    }

    .logo {
        font-size: 1.4rem;
    }

    .logo span {
        font-size: 0.9rem;
    }

    .nav-toggle {
        display: none;
    }

    nav {
        display: block !important;
        width: auto;
        border-top: none;
    }

    nav ul {
        flex-direction: row;
        align-items: center;
        gap: 4px;
    }

    nav ul li {
        border-bottom: none;
    }

    nav ul li a {
        padding: 8px 12px;
        white-space: nowrap;
    }

    nav ul li a:hover {
        background-color: transparent;
    }

    /* Desktop dropdown – hover based */
    .dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
        background-color: var(--bg-white);
        border: 1px solid var(--border-color);
        border-left: none;
        border-top: 3px solid var(--primary-color);
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        min-width: 240px;
        z-index: 100;
    }

    .dropdown:hover > .dropdown-menu,
    .dropdown.open > .dropdown-menu {
        display: block;
    }

    .dropdown-menu li {
        width: 100%;
    }

    .dropdown-menu li a {
        padding: 12px 16px;
    }

    .btn-emergency {
        border-radius: 4px;
        padding: 10px 18px;
        text-align: left;
    }
}

/* ===========================
   BREADCRUMBS
   =========================== */

.breadcrumbs {
    background-color: var(--bg-light);
    padding: 10px 16px;
}

.breadcrumbs-container {
    max-width: 1200px;
    margin: 0 auto;
    font-size: 0.85rem;
    color: var(--text-light);
}

.breadcrumbs a {
    color: var(--primary-color);
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

/* ===========================
   SECTIONS (mobile-first)
   =========================== */

section {
    padding: 40px 16px;
}

@media (min-width: 768px) {
    section {
        padding: 60px 20px;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.text-center {
    text-align: center;
}

.section-title {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 28px;
    position: relative;
    color: var(--primary-color);
    line-height: 1.3;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
    margin: 12px auto 0;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 2rem;
        margin-bottom: 40px;
    }

    .section-title::after {
        margin-top: 15px;
    }
}

/* ===========================
   HERO SECTIONS (mobile-first)
   =========================== */

.hero {
    background: linear-gradient(rgba(13, 71, 161, 0.85), rgba(21, 101, 192, 0.85));
    color: white;
    padding: 48px 16px;
    text-align: center;
}

.hero h1 {
    font-size: 1.6rem;
    margin-bottom: 14px;
    line-height: 1.3;
}

.hero p {
    font-size: 1rem;
    max-width: 800px;
    margin: 0 auto 24px;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

@media (min-width: 600px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }
}

@media (min-width: 768px) {
    .hero {
        padding: 80px 20px;
    }

    .hero h1 {
        font-size: 2.5rem;
        margin-bottom: 20px;
    }

    .hero p {
        font-size: 1.2rem;
        margin-bottom: 30px;
    }

    .hero-buttons {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }
}

/* ===========================
   BUTTONS
   =========================== */

.btn-main, .btn-secondary {
    padding: 14px 22px;
    border-radius: 4px;
    font-weight: bold;
    display: inline-block;
    text-align: center;
    width: 100%;
    max-width: 380px;
    font-size: 1rem;
}

@media (min-width: 600px) {
    .btn-main, .btn-secondary {
        width: auto;
        max-width: none;
        padding: 12px 25px;
    }
}

.btn-main {
    background-color: var(--accent-color);
    color: white;
}

.btn-main:hover {
    background-color: var(--accent-hover);
}

.btn-secondary {
    background-color: white;
    color: var(--primary-color);
    border: 1px solid white;
}

.btn-secondary:hover {
    background-color: var(--bg-light);
}

/* ===========================
   GRID LAYOUTS (mobile-first)
   =========================== */

.grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 600px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (min-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
}

@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

/* ===========================
   CARDS
   =========================== */

.card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

@media (min-width: 768px) {
    .card {
        padding: 30px;
    }

    .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    }
}

.card h3, .card h4 {
    margin-bottom: 12px;
    color: var(--primary-color);
}

.card p {
    color: var(--text-light);
    margin-bottom: 15px;
}

.card .link {
    color: var(--primary-light);
    font-weight: bold;
}

.card .link:hover {
    text-decoration: underline;
}

/* ===========================
   PROCESS LIST
   =========================== */

.process-list {
    list-style: none;
    counter-reset: process-counter;
}

.process-list li {
    position: relative;
    padding-left: 50px;
    margin-bottom: 25px;
}

.process-list li::before {
    content: counter(process-counter);
    counter-increment: process-counter;
    position: absolute;
    left: 0;
    top: 0;
    background-color: var(--primary-color);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

/* ===========================
   FAQ
   =========================== */

.faq-item {
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
}

.faq-question {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 1rem;
    line-height: 1.4;
}

.faq-answer {
    color: var(--text-light);
}

/* ===========================
   INFO BOXES & EMERGENCY
   =========================== */

.info-box {
    background-color: var(--bg-light);
    padding: 20px;
    border-radius: 4px;
    border-left: 4px solid var(--primary-color);
    margin-bottom: 20px;
}

.info-box p + p {
    margin-top: 8px;
}

@media (min-width: 768px) {
    .info-box {
        padding: 25px;
    }
}

.emergency-box {
    background-color: #ffebee;
    border-left: 4px solid var(--accent-color);
    padding: 20px;
    border-radius: 4px;
    text-align: center;
}

.emergency-box h3 {
    color: var(--accent-color);
    margin-bottom: 10px;
}

@media (min-width: 768px) {
    .emergency-box {
        padding: 25px;
    }
}

.emergency-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--accent-color);
    margin: 10px 0;
    display: block;
}

@media (min-width: 768px) {
    .emergency-number {
        font-size: 2rem;
    }
}

/* ===========================
   MOBILE FLOATING CTA
   =========================== */

.mobile-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--accent-color);
    color: white;
    text-align: center;
    padding: 15px 16px;
    font-weight: bold;
    font-size: 1.05rem;
    z-index: 900;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.25);
    display: block;
}

.mobile-cta:hover,
.mobile-cta:focus {
    background-color: var(--accent-hover);
    color: white;
}

@media (min-width: 900px) {
    .mobile-cta {
        display: none;
    }
}

/* ===========================
   FOOTER
   =========================== */

footer {
    background-color: #1a1a1a;
    color: #e0e0e0;
    padding: 32px 16px 20px;
    font-size: 0.9rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    border-bottom: 1px solid #333;
    padding-bottom: 24px;
}

@media (min-width: 600px) {
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    footer {
        padding: 40px 20px 20px;
    }

    .footer-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
        padding-bottom: 30px;
    }
}

.footer-col h4 {
    color: white;
    margin-bottom: 12px;
    font-size: 1.05rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a:hover {
    color: white;
    text-decoration: underline;
}

.footer-bottom {
    max-width: 1200px;
    margin: 18px auto 0;
    text-align: center;
    color: #777;
    font-size: 0.82rem;
}

/* ===========================
   FORMS
   =========================== */

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-main);
    font-size: 1rem; /* prevents iOS zoom-in on focus */
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(13, 71, 161, 0.15);
}

/* ===========================
   SMOOTH SCROLL
   =========================== */

html {
    scroll-behavior: smooth;
}

/* ===========================
   ACTIVE NAVIGATION STATE
   =========================== */

nav ul li a.active {
    color: var(--primary-color) !important;
    font-weight: 700;
}

@media (min-width: 900px) {
    nav ul li > a.active {
        border-bottom: 2px solid var(--primary-color);
        padding-bottom: 6px;
    }
}

/* ===========================
   SERVICE IMAGES (Stock-Fotos)
   =========================== */

.service-img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 20px;
    display: block;
}

@media (min-width: 768px) {
    .service-img {
        height: 320px;
    }
}

/* ===========================
   ABOUT / TEAM PHOTO (index.html)
   =========================== */

.about-photo {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

@media (min-width: 768px) {
    .about-photo {
        height: 420px;
    }
}

/* ===========================
   STAR RATINGS
   =========================== */

.stars {
    color: #f9a825;
    font-size: 1.2rem;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 10px;
}

.review-source {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 4px;
}

/* ===========================
   DSGVO CONSENT CHECKBOX
   =========================== */

.dsgvo-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-weight: normal;
    line-height: 1.6;
    color: var(--text-dark);
}

.dsgvo-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 3px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.dsgvo-label a {
    color: var(--primary-color);
    text-decoration: underline;
}

/* ===========================
   MAP EMBED (OpenStreetMap)
   =========================== */

.map-embed {
    margin-top: 30px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color);
}

.map-embed iframe {
    display: block;
    width: 100%;
    height: 320px;
    border: 0;
}

@media (min-width: 768px) {
    .map-embed iframe {
        height: 380px;
    }
}

.map-link {
    display: block;
    text-align: center;
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--primary-color);
}

.map-link:hover {
    text-decoration: underline;
}

/* ===========================
   LEGAL CONTENT (Impressum, Datenschutz)
   =========================== */

.legal-content h2 {
    font-size: 1.15rem;
    color: var(--primary-color);
    margin: 32px 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
}

.legal-content h2:first-child {
    margin-top: 0;
}

.legal-content p {
    color: var(--text-dark);
    margin-bottom: 10px;
    line-height: 1.75;
}

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

.legal-content a:hover {
    color: var(--primary-light);
}

.legal-content ul {
    margin: 10px 0 16px 24px;
    color: var(--text-dark);
}

.legal-content ul li {
    margin-bottom: 6px;
    line-height: 1.65;
}

/* ===========================
   FOOTER LEGAL LINKS
   =========================== */

.footer-bottom a {
    color: #999;
    text-decoration: none;
}

.footer-bottom a:hover {
    color: #ccc;
    text-decoration: underline;
}

/* ===========================
   WHATSAPP FLOATING BUTTON
   =========================== */

.whatsapp-btn {
    position: fixed;
    bottom: 124px;
    right: 16px;
    width: 52px;
    height: 52px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
    z-index: 800;
    transition: background-color 0.2s, transform 0.2s;
}

.whatsapp-btn:hover {
    background-color: #128C7E;
    transform: scale(1.1);
    color: white;
}

@media (min-width: 900px) {
    .whatsapp-btn {
        bottom: 84px;
        right: 28px;
    }
}

/* ===========================
   SCROLL ANIMATIONS
   =========================== */

/* Hero entrance – CSS only, fires on every page load */
.hero h1 {
    animation: heroFadeUp 0.75s ease both;
}
.hero p {
    animation: heroFadeUp 0.75s 0.12s ease both;
}
.hero-buttons {
    animation: heroFadeUp 0.75s 0.24s ease both;
}

@keyframes heroFadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .hero h1,
    .hero p,
    .hero-buttons {
        animation: none;
    }
}

/* IntersectionObserver states */
.anim-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.anim-reveal.anim-child {
    transform: translateY(20px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.anim-reveal.anim-visible {
    opacity: 1;
    transform: none;
}

/* ===========================
   SCROLL TO TOP BUTTON
   =========================== */

.scroll-top {
    position: fixed;
    bottom: 72px;
    right: 16px;
    width: 44px;
    height: 44px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 800;
    transition: background-color 0.2s, opacity 0.2s;
    line-height: 1;
}

.scroll-top.visible {
    display: flex;
}

.scroll-top:hover {
    background-color: var(--primary-light);
}

@media (min-width: 900px) {
    .scroll-top {
        bottom: 28px;
        right: 28px;
    }
}
