/* =============================================
   RESPONSIVE STYLES - IT DIENST HAMBURG
   SEO & Accessibility Optimiert
   Mobile-First Approach
============================================= */

/* =============================================
   MOBILE (< 768px)
============================================= */
@media (max-width: 768px) {
    /* Typography Mobile */
    h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    p {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    /* Container */
    .container {
        padding: 2rem 1rem;
    }
    
    /* Hero Sections */
    .hero,
    .hero-home {
        padding: 3rem 1rem;
    }
    
    .hero h1,
    .hero-home h1 {
        font-size: 2rem;
    }
    
    .hero p,
    .hero-home__lead {
        font-size: 1.1rem;
    }
    
    /* Navigation */
    .desktop-nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: inline-flex;
    }
    
    .header-container {
        min-height: 70px;
        padding: 0 1rem;
    }
    
    .logo {
        width: 150px;
    }
    
    /* Grids - Stack on Mobile */
    .services-grid,
    .trust-grid,
    .problem-list,
    .branch-grid,
    .approach-grid,
    .hub-grid,
    .testimonial-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .tech-item {
        padding: 1rem;
        min-height: 120px;
    }
    
    .tech-item img {
        width: 60px;
        height: 60px;
    }
    
    /* Buttons */
    .btn,
    a.btn,
    button {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    .hero-home__actions,
    .cta-panel__actions {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-home__actions .btn,
    .cta-panel__actions .btn {
        width: 100%;
    }
    
    /* Touch Targets (Accessibility) */
    .nav-list li a,
    .mobile-nav a {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 12px 0;
    }
    
    /* Mega Menu Mobile */
    .mega-menu-full {
        position: static;
        transform: none;
        width: 100%;
    }
    
    .mega-inner {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem;
    }
    
    /* CTA Panel */
    .cta-panel {
        padding: 2rem 1rem;
        border-radius: 0;
    }
    
    .cta-panel__phone {
        font-size: 1.3rem;
    }
    
    /* Sticky CTA */
    .sticky-cta {
        display: block;
    }
    
    /* Testimonial Cards */
    .testimonialSwiper .testimonial-card {
        padding: 2rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Footer */
    .footer-links {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    /* Spacing Adjustments */
    .section-panel {
        padding: 3rem 0;
    }
}

/* =============================================
   TABLET (769px - 1024px)
============================================= */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Typography */
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    /* Container */
    .container {
        padding: 3.5rem 2rem;
    }
    
    /* Grids - 2 Columns */
    .services-grid,
    .trust-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tech-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .approach-grid,
    .hub-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Hero */
    .hero h1,
    .hero-home h1 {
        font-size: 2.4rem;
    }
    
    /* Mega Menu */
    .mega-inner {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
    
    /* Navigation */
    .desktop-nav .nav-list {
        gap: 1.5rem;
    }
}

/* =============================================
   LARGE DESKTOP (> 1400px)
============================================= */
@media (min-width: 1400px) {
    .container,
    .header-container {
        max-width: 1400px;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .mega-inner {
        max-width: 1400px;
    }
}

/* =============================================
   LANDSCAPE MOBILE
============================================= */
@media (max-height: 600px) and (orientation: landscape) {
    .hero,
    .hero-home {
        padding: 2rem 1rem;
    }
    
    .sticky-cta {
        display: none;
    }
}

/* =============================================
   PRINT STYLES
============================================= */
@media print {
    /* Hide UI Elements */
    .site-header,
    .sticky-cta,
    .mobile-menu-btn,
    .btn,
    .cta-panel__actions,
    .mega-menu-full {
        display: none !important;
    }
    
    /* Reset Colors */
    body {
        background: white !important;
        color: black !important;
    }
    
    /* Remove Shadows */
    * {
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    /* Links */
    a {
        text-decoration: underline;
        color: black !important;
    }
    
    /* Page Breaks */
    h1, h2, h3 {
        page-break-after: avoid;
    }
    
    .service,
    .trust-card,
    .testimonial-card {
        page-break-inside: avoid;
    }
}

/* =============================================
   ACCESSIBILITY - REDUCED MOTION
============================================= */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* =============================================
   ACCESSIBILITY - HIGH CONTRAST
============================================= */
@media (prefers-contrast: high) {
    /* Stronger Borders */
    .service,
    .trust-card,
    .problem-item,
    .branch-card,
    .approach-card,
    .hub-card,
    .testimonial-card,
    .tech-item {
        border-width: 2px;
        border-color: currentColor;
    }
    
    /* Underline Links */
    a {
        text-decoration: underline;
    }
    
    /* Stronger Buttons */
    .btn {
        border-width: 3px;
    }
    
    /* Remove Shadows */
    * {
        box-shadow: none !important;
    }
}

/* =============================================
   PERFORMANCE - GPU ACCELERATION
============================================= */
.service:hover,
.tech-item:hover,
.branch-card:hover,
.btn:hover {
    will-change: transform;
}

/* Reset will-change after animation */
.service,
.tech-item,
.branch-card,
.btn {
    will-change: auto;
}

/* =============================================
   TOUCH DEVICE OPTIMIZATIONS
============================================= */
@media (hover: none) and (pointer: coarse) {
    /* Larger Touch Targets */
    .btn,
    a.btn {
        min-height: 48px;
        padding: 14px 24px;
    }
    
    .nav-list li a,
    .mobile-nav a {
        min-height: 48px;
        padding: 14px 0;
    }
    
    /* Remove Hover Effects on Touch */
    .service:hover,
    .tech-item:hover,
    .branch-card:hover {
        transform: none;
    }
    
    /* Sticky Hover Fix */
    .mega-parent:hover .mega-menu-full {
        display: none;
    }
    
    /* Better Mobile Tap Highlighting */
    * {
        -webkit-tap-highlight-color: rgba(31, 122, 224, 0.2);
    }
}

/* =============================================
   FIREFOX SPECIFIC FIXES
============================================= */
@-moz-document url-prefix() {
    .service,
    .tech-item {
        /* Firefox rendering optimization */
        transform: translateZ(0);
    }
}

/* =============================================
   SAFARI SPECIFIC FIXES
============================================= */
@supports (-webkit-appearance: none) {
    /* Safari smooth scrolling */
    body {
        -webkit-font-smoothing: antialiased;
    }
    
    /* Fix Safari sticky positioning */
    .site-header {
        position: -webkit-sticky;
        position: sticky;
    }
}

/* =============================================
   EDGE/IE FALLBACKS (falls noch relevant)
============================================= */
@supports not (display: grid) {
    .services-grid,
    .trust-grid,
    .tech-grid {
        display: flex;
        flex-wrap: wrap;
    }
    
    .service,
    .trust-card,
    .tech-item {
        flex: 0 0 calc(33.333% - 2rem);
        margin: 1rem;
    }
}

