/* Responsive Styles */

/* Mobile-First Ansatz - Default Styles für Mobilgeräte (bis 767px) */

/* Verhindere horizontales Scrollen auf mobilen Geräten */
html, body {
    overflow-x: hidden;
    width: 100%;
}

/* Alle Container und Sektionen auf maximale Breite beschränken */
.container, section, .header-container, .footer-container {
    max-width: 100%;
    box-sizing: border-box;
}

/* Bilder nicht breiter als ihr Container */
img {
    max-width: 100%;
    height: auto;
}

/* Tablet-Stile (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    /* Typografie */
    h1 {
        font-size: 2.8rem;
    }

    h2 {
        font-size: 2.2rem;
    }

    /* Header */
    .header-container {
        padding: 0 40px;
    }

    /* Container */
    .container {
        padding: 0 40px;
    }

    /* Service-Karten */
    .service-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    /* Vorteile */
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Arbeitsablauf */
    .step {
        flex: 0 0 calc(20% - 20px);
    }

    /* Über uns */
    .about-content {
        gap: 30px;
    }

    /* Formular */
    .audit-form {
        padding: 30px;
    }

    /* Footer */
    .footer-column {
        min-width: 200px;
    }
}

/* Desktop-Stile (ab 1024px) */
@media (min-width: 1024px) {
    /* Typografie */
    h1 {
        font-size: 3.5rem;
    }

    h2 {
        font-size: 2.5rem;
    }

    /* Header */
    .header-container {
        padding: 0 60px;
    }

    /* Container */
    .container {
        padding: 0 60px;
    }

    /* Service-Karten */
    .service-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }

    /* Vorteile */
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Arbeitsablauf */
    .step {
        flex: 0 0 calc(20% - 20px);
    }

    /* Über uns */
    .about-content {
        gap: 50px;
    }

    /* Formular */
    .audit-form {
        padding: 40px;
    }

    /* Footer */
    .footer-column {
        min-width: 250px;
    }
}

/* Mobile-Navigation für Bildschirme unter 768px */
@media (max-width: 767px) {
    /* Header und Navigation */
    .mobile-menu-toggle {
        display: flex;
        z-index: 1010;
    }

    .mobile-menu-toggle.open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-toggle.open span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.open span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: var(--primary-color);
        z-index: 1000;
        padding-top: 80px;
        transition: right 0.3s ease;
    }

    nav.active {
        right: 0;
    }

    nav ul {
        flex-direction: column;
    }

    nav ul li {
        margin: 0;
        padding: 15px 30px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    nav ul li a {
        display: block;
        font-size: 1.2rem;
    }

    /* Typografie */
    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    /* Container */
    .container {
        padding: 0 20px;
    }

    /* Sektionen */
    section {
        padding: 50px 0;
    }

    /* Hero */
    .hero {
        padding: 100px 0 50px;
    }

    .hero p {
        font-size: 1.2rem;
    }

    /* Über uns */
    .about-content {
        flex-direction: column-reverse;
        gap: 30px;
    }

    .about-stats {
        flex-direction: column;
        gap: 20px;
    }

    .stat-item {
        margin-bottom: 20px;
    }

    /* Service-Karten */
    .service-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Vorteile */
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Arbeitsablauf */
    .steps {
        flex-direction: column;
        gap: 30px;
    }

    .step {
        flex: 0 0 100%;
        margin-bottom: 30px;
    }

    .steps::before {
        display: none;
    }

    /* Kontakt */
    .contact-content {
        flex-direction: column;
        gap: 30px;
    }

    /* Footer */
    .footer-container {
        flex-direction: column;
        text-align: center;
    }

    .footer-column {
        margin-bottom: 40px;
    }

    .footer-column h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    /* Cookie Popup */
    .cookie-popup {
        width: 95%;
        bottom: 10px;
    }
}

/* Extra kleine Bildschirme (unter 480px) */
@media (max-width: 480px) {
    /* Typografie */
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    /* Button */
    .btn, .btn-gradient {
        padding: 10px 20px;
        font-size: 0.95rem;
    }

    /* Formulare */
    .audit-form {
        padding: 20px;
    }

    .form-group input,
    .form-group select {
        padding: 10px;
    }

    /* Policy Page */
    .policy-container {
        padding: 20px;
    }
}

/* Mittlere Tablets (600px - 767px) */
@media (min-width: 600px) and (max-width: 767px) {
    /* Service-Karten */
    .service-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Vorteile */
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Große Bildschirme (über 1400px) */
@media (min-width: 1400px) {
    /* Container */
    .container {
        max-width: 1320px;
    }

    /* Typografie */
    html {
        font-size: 18px;
    }
}

/* Landschaftsorientierung auf Mobilgeräten */
@media (max-height: 500px) and (orientation: landscape) {
    nav {
        padding-top: 60px;
    }

    nav ul li {
        padding: 10px 30px;
    }

    .hero {
        padding: 80px 0 40px;
    }
}

/* Drucklayout */
@media print {
    header, footer, .cookie-popup, .btn, .btn-gradient {
        display: none;
    }

    body {
        font-size: 12pt;
        color: #000;
        background-color: #fff;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    .container {
        width: 100%;
        padding: 0;
        margin: 0;
    }

    h1, h2, h3 {
        page-break-after: avoid;
    }

    p {
        orphans: 3;
        widows: 3;
    }

    img {
        max-width: 100% !important;
    }
}
