/* BAUER IT SERVICE - Mobile Optimierung */
/* Ergänzung zu styles.css für bessere Mobile-Ansicht */

/* ===== Mobile First Approach ===== */

/* Smartphones (Portrait) */
@media (max-width: 576px) {
    /* Container mit mehr Padding für kleine Screens */
    .container {
        padding: 0 15px;
        overflow-x: hidden; /* Verhindert horizontales Scrolling */
    }

    /* Prevent horizontal overflow globally */
    body {
        overflow-x: hidden;
    }

    /* ===== ABOUT PAGE MOBILE FIX ===== */
    .about-intro-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
    }

    .about-intro-image {
        order: 1 !important;
        margin-bottom: 1rem;
        width: 100% !important;
    }

    .about-intro-content {
        order: 2 !important;
        text-align: left;
        padding: 0;
        width: 100% !important;
    }

    .about-intro-content h3 {
        text-align: center;
        margin-bottom: 1rem;
    }

    /* Fix certification section padding on mobile */
    #certifications {
        padding: 1.5rem !important;
    }

    /* Fix width issues preventing overflow */
    .about-intro-grid > div {
        width: 100%;
        max-width: 100%;
    }

    /* Section Padding reduzieren */
    .section {
        padding: 40px 0;
    }

    /* Typography anpassen */
    h1 {
        font-size: 1.75rem !important;
        line-height: 1.3;
        margin-bottom: 1rem;
    }

    h2 {
        font-size: 1.5rem !important;
        line-height: 1.3;
    }

    h3 {
        font-size: 1.25rem !important;
    }

    p {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    /* Hero Section Mobile */
    .hero {
        padding: 60px 0 !important;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero h1 {
        font-size: 1.75rem !important;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1rem !important;
        margin-bottom: 1.5rem;
    }

    /* Buttons Mobile optimiert */
    .btn {
        padding: 12px 24px;
        font-size: 0.95rem;
        width: 100%;
        margin-bottom: 10px;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    /* Service Cards Mobile */
    .services-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
        padding: 0;
    }

    .service-card {
        padding: 25px 20px;
        margin: 0;
    }

    .service-card h3 {
        font-size: 1.2rem;
    }

    .service-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
        margin-bottom: 15px;
    }

    /* Navigation Mobile */
    header {
        padding: 10px 0 !important;
    }

    .nav-container {
        padding: 10px 15px;
    }

    .logo {
        height: 40px !important;
        width: auto;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 60px;
        width: 100%;
        height: calc(100vh - 60px);
        background-color: var(--dark);
        flex-direction: column;
        padding: 30px 20px;
        transition: 0.3s;
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 15px 0;
        width: 100%;
    }

    .nav-link {
        display: block;
        padding: 12px 20px;
        font-size: 1.1rem;
        text-align: left;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        background: none;
        border: none;
        cursor: pointer;
        padding: 5px;
        z-index: 1001;
    }

    .hamburger {
        display: block;
        width: 25px;
        height: 3px;
        margin: 3px 0;
        background-color: var(--white);
        transition: 0.3s;
    }

    /* About Section Mobile */
    .about-grid {
        grid-template-columns: 1fr !important;
        gap: 30px;
    }

    .about-image {
        text-align: center;
        margin-bottom: 20px;
    }

    .about-image img {
        max-width: 200px;
        height: auto;
    }

    /* Contact Form Mobile */
    .contact-grid {
        grid-template-columns: 1fr !important;
        gap: 30px;
    }

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

    .form-control {
        padding: 12px 15px;
        font-size: 16px; /* Verhindert Zoom auf iOS */
    }

    /* Footer Mobile */
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 30px;
        text-align: center;
    }

    .footer-column h4 {
        margin-top: 20px;
        margin-bottom: 15px;
    }

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

    .footer-contact {
        text-align: left;
        max-width: 280px;
        margin: 0 auto;
    }

    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .footer-legal {
        flex-direction: column;
        gap: 10px;
    }

    .footer-legal .separator {
        display: none;
    }

    /* CTA Section Mobile */
    .cta-section {
        padding: 40px 0;
        text-align: center;
    }

    .cta-content h2 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }

    /* Testimonial Cards Mobile */
    .testimonials-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    .testimonial-card {
        padding: 20px;
    }

    /* Features Grid Mobile */
    .features-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    .feature-card {
        padding: 20px;
        text-align: center;
    }

    /* Tables Mobile (wenn vorhanden) */
    table {
        font-size: 0.875rem;
    }

    th, td {
        padding: 8px 5px;
    }

    /* Bilder Mobile */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Modals Mobile */
    .modal-content {
        margin: 10px;
        max-height: 90vh;
        overflow-y: auto;
    }

    /* Skip Links für Accessibility */
    .skip-link:focus {
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 9999;
    }

    /* Touch-Targets mindestens 44x44px */
    button,
    a.btn,
    .nav-link,
    input[type="submit"],
    input[type="button"] {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Tablets (Portrait) */
@media (min-width: 577px) and (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    /* About Page Tablet Fix */
    .about-intro-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 2rem !important;
    }

    .about-intro-image {
        margin-bottom: 1.5rem;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .hero {
        padding: 80px 0;
    }
}

/* Landscape Phones */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 40px 0;
    }

    .nav-menu {
        top: 50px;
        height: calc(100vh - 50px);
        padding: 20px;
    }

    header {
        padding: 5px 0;
    }

    .logo {
        height: 35px;
    }
}

/* Sehr kleine Geräte (< 360px) */
@media (max-width: 360px) {
    body {
        font-size: 14px;
    }

    h1 {
        font-size: 1.5rem !important;
    }

    h2 {
        font-size: 1.3rem !important;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .container {
        padding: 0 10px;
    }
}

/* Touch Device Optimierungen */
@media (hover: none) and (pointer: coarse) {
    /* Hover-Effekte deaktivieren auf Touch-Geräten */
    .btn:hover {
        transform: none;
        box-shadow: var(--shadow-md);
    }

    /* Größere Touch-Targets */
    .nav-link {
        padding: 12px 16px;
    }

    /* Keine Hover-States für Cards */
    .service-card:hover,
    .feature-card:hover {
        transform: none;
    }
}

/* iOS-spezifische Fixes */
@supports (-webkit-touch-callout: none) {
    /* iOS Safari Fixes */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea {
        font-size: 16px; /* Verhindert Zoom beim Focus */
        -webkit-appearance: none;
        border-radius: 0;
    }

    /* Safe Area für iPhone X+ */
    .footer {
        padding-bottom: env(safe-area-inset-bottom);
    }

    header {
        padding-top: env(safe-area-inset-top);
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .btn-primary {
        border: 2px solid var(--primary-red);
    }

    .service-card,
    .feature-card {
        border: 2px solid var(--border-gray);
    }
}

/* Dark Mode Support (optional) */
@media (prefers-color-scheme: dark) {
    /* Kann später implementiert werden */
}

/* Print Styles */
@media print {
    header,
    footer,
    .nav-menu,
    .mobile-menu-toggle,
    .hero-buttons {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    .section {
        page-break-inside: avoid;
    }
}