/* Responsive Design for Seifert Aviation Software Website */

/* Mobile First Approach */

/* Extra Small (Portrait Phones) - Default styles are already mobile-first */

/* Small (Landscape Phones) */
@media (min-width: 576px) and (max-width: 767px) {
    .hero {
        padding: 80px 0;
    }
    
    .app-icons {
        gap: 2rem;
    }
    
    /* Feste Icon-Größen entfernt - Icons verwenden jetzt relative Größen aus main.css */
    
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
}

/* Medium (Tablets) */
@media (min-width: 768px) and (max-width: 991px) {
    .hero {
        padding: 120px 0;
    }
    
    .app-icons {
        gap: 3rem;
    }
    
    /* Feste Icon-Größen entfernt - Icons verwenden jetzt relative Größen aus main.css */
    
    h1 {
        font-size: 2.8rem;
    }
    
    h2 {
        font-size: 2.2rem;
    }

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

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large (Laptops) */
@media (min-width: 992px) and (max-width: 1199px) {
    .hero {
        padding: 140px 0;
    }
    
    .app-icons {
        gap: 4rem;
    }
    
    /* Feste Icon-Größen entfernt - Icons verwenden jetzt relative Größen aus main.css */
    
    h1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2.4rem;
    }

    .feature-grid:has(.feature-item) {
        grid-template-columns: repeat(3, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Extra Large (Desktops) */
@media (min-width: 1200px) {
    .hero {
        padding: 160px 0;
    }
    
    .app-icons {
        gap: 2rem; /* Gleichmäßiger Abstand zwischen den Icons */
    }
    
    .app-icon {
        padding: 2rem; /* Gleichmäßiger Abstand zu den Rändern */
    }
    
    .app-icon img {
        border-radius: 40px; /* Noch stärker abgerundete Ecken auf Desktop */
    }
    
    h1 {
        font-size: 3.5rem;
    }
    
    h2 {
        font-size: 2.8rem;
    }

    .feature-grid:has(.feature-item) {
        grid-template-columns: repeat(3, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Mobile Navigation - Show hamburger menu */
@media (max-width: 991px) {
    .hamburger {
        display: flex;
    }
    
    .nav-links {
        display: none;
    }
}

/* Desktop Navigation - Show regular menu */
@media (min-width: 992px) {
    .hamburger {
        display: none;
    }
    
    .mobile-menu {
        display: none;
    }
    
    .overlay {
        display: none;
    }
}

/* Mobile Specific Adjustments */
@media (max-width: 575px) {
    .container {
        padding: 0 15px;
    }

    section {
        padding: 60px 0;
    }

    .hero.page-header {
        padding: 40px 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

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

    /* Icons bleiben nebeneinander angeordnet für bessere Raumnutzung */

    .app-icon:hover {
        transform: scale(1.05);
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    h3 {
        font-size: 1.3rem;
    }

    .feature-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    .feature-grid .card,
    .feature-grid .card:nth-child(2) {
        min-width: unset;
        width: 100%;
        max-width: 100%;
    }

    /* Card optimierung für Mobile */
    .card {
        overflow: visible;
        padding: 1.5rem;
    }

    .card h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .card h3 {
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
    }

    .card h4 {
        font-size: 1.1rem;
        margin-bottom: 0.6rem;
    }

    .card p,
    .card li {
        font-size: 0.9rem;
        line-height: 1.65;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }

    .cookie-banner {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .cookie-banner p {
        margin-right: 0;
        margin-bottom: 1rem;
    }

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

/* Mobile Hero Adjustments */
@media (max-width: 768px) {
    .hero.fullscreen {
        min-height: calc(100vh - 60px);
    }

    /* Icons bleiben nebeneinander angeordnet für bessere Raumnutzung */

    .app-icon:hover {
        transform: scale(1.05);
    }

    /* Card optimierung für Tablets */
    .card {
        overflow: visible;
    }
}

/* Medium screens and below: Single column layout for contact cards */
@media (max-width: 991px) {
    .feature-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Tablet Specific Adjustments */
@media (min-width: 576px) and (max-width: 991px) {
    .app-icons {
        flex-direction: row;
        justify-content: center;
    }

    .feature-grid {
        gap: 1.5rem;
    }

    .stats-grid {
        gap: 1.5rem;
    }
}

/* Print Styles */
@media print {
    header, footer, .cookie-banner, .hamburger, .mobile-menu {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .hero {
        background: none;
        color: #000;
        padding: 20px 0;
    }
    
    section {
        padding: 20px 0;
        page-break-inside: avoid;
    }
    
    .app-icon {
        break-inside: avoid;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .app-icon img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Very Large Displays */
@media (min-width: 2560px) {
    .app-icon img {
        max-width: 500px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Support (if needed in future) */
@media (prefers-color-scheme: dark) {
    /* This can be implemented in the future if dark mode is desired */
}
/* Sehr kleine Smartphones */
@media (max-width: 479px) {
    .app-icons {
        flex-direction: column;
        gap: 2rem;
        padding: 1rem;
        height: auto;
        /* Schatten über Containerrand hinaus rendern */
        overflow-y: visible;
        scroll-behavior: smooth;
    }

    .app-icon {
        width: 100%;
        max-width: 400px;
        height: auto;
        min-height: 300px;
        max-height: 40vh;
        padding: 2rem; /* Erhöht von 1rem für ausreichend Platz für Box-Shadow */
    }

    .app-icon img {
        width: 100%;
        height: auto;
        max-height: 35vh;
    }

    /* Popup-Anpassungen für Mobile */
    .app-icon-popup {
        /* Popup etwas größer und lesbarer auf Mobile */
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        max-width: 90vw;
        white-space: normal; /* Erlaubt Zeilenumbruch auf Mobile */
        text-align: center;
    }

    .app-icon-popup h3 {
        font-size: 1rem;
    }

    .app-icon-popup p {
        font-size: 0.8rem;
    }

    /* Card fixes für Mobile - konsolidiert und vereinfacht */
    .card {
        overflow: visible;
        height: auto;
        max-height: none;
        padding: 1.5rem;
    }

    /* Sicherstellen dass Sections und Container kein Overflow haben */
    section,
    .container {
        overflow: visible;
        height: auto;
    }

    /* Bessere Lesbarkeit für lange Texte */
    .card h2,
    .card h3,
    .card h4 {
        font-size: 1.4rem;
        line-height: 1.4;
        margin-bottom: 1rem;
    }

    .card p,
    .card li {
        font-size: 0.9rem;
        line-height: 1.6;
        margin-bottom: 1rem;
    }

    .card ul {
        margin-left: 1.2rem;
        margin-bottom: 1rem;
    }
}
