/* ===================================
   INNOVATIC AFRICA - Responsive CSS
   Mobile-First Media Queries
   =================================== */

/* ===================================
   LARGE DESKTOP (1440px and up)
   =================================== */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }

    .hero-text h1 {
        font-size: 4.5rem;
    }

    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===================================
   DESKTOP (1024px to 1439px)
   =================================== */
@media (max-width: 1439px) and (min-width: 1024px) {
    .navbar {
        padding: 1rem 1.5rem;
    }

    .hero-content {
        gap: 3rem;
    }
}

/* ===================================
   TABLET (768px to 1023px)
   =================================== */
@media (max-width: 1023px) {
    /* Header */
    .navbar {
        padding: 1rem;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        padding: 2rem;
        gap: 0;
        transition: left 0.3s ease;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        width: 100%;
        padding: 1rem 0;
        border-bottom: 1px solid var(--gray-light);
    }

    .nav-link {
        display: block;
        font-size: 1.1rem;
    }

    .nav-cta {
        flex-direction: column;
        width: 100%;
        margin-top: 1rem;
    }

    .nav-cta .btn-primary,
    .nav-cta .btn-outline {
        width: 100%;
        justify-content: center;
    }

    .menu-toggle {
        display: flex;
    }

    .language-toggle {
        margin-top: 1rem;
    }

    /* Hero */
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-image {
        order: -1;
    }

    .hero-text {
        text-align: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    /* Stats */
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    /* Services */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .service-card {
        padding: 2rem;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .footer-col:first-child {
        grid-column: 1 / -1;
    }
}

/* ===================================
   MOBILE LANDSCAPE (640px to 767px)
   =================================== */
@media (max-width: 767px) and (min-width: 640px) {
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   MOBILE PORTRAIT (up to 639px)
   =================================== */
@media (max-width: 639px) {
    /* Root Variables */
    :root {
        --section-padding: 3rem 0;
    }

    /* Typography */
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    p {
        font-size: 0.95rem;
    }

    /* Header */
    .logo {
        font-size: 1.25rem;
    }

    .logo img {
        height: 35px;
    }

    /* Hero */
    .hero {
        min-height: auto;
        padding: 100px 0 3rem;
    }

    .hero-content {
        padding: 1rem;
    }

    .hero-text h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .hero-text p {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn-primary,
    .hero-buttons .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    /* Stats */
    .stats-section {
        padding: 2rem 1rem;
    }

    .stats-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .stat-label {
        font-size: 1rem;
    }

    /* Services */
    .services-section {
        padding: 3rem 0;
    }

    .section-header {
        margin-bottom: 2rem;
        padding: 0 1rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .service-card {
        padding: 1.5rem;
    }

    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.75rem;
    }

    /* CTA Section */
    .cta-section {
        padding: 3rem 1rem;
    }

    .cta-content h2 {
        font-size: 1.75rem;
    }

    .cta-content p {
        font-size: 1rem;
    }

    /* Partners */
    .partners-section {
        padding: 3rem 1rem;
    }

    /* Footer */
    .footer {
        padding: 3rem 1rem 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    /* About Page */
    .about-hero {
        padding: 100px 1rem 2rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
    }

    .values-grid {
        grid-template-columns: 1fr;
    }

    /* Contact Page */
    .contact-container {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }

    .contact-info-cards {
        grid-template-columns: 1fr;
    }

    /* Services Page */
    .services-detailed {
        padding: 0 1rem;
    }

    /* Quote Page */
    .quote-form-container {
        padding: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    /* Modal */
    .modal-content {
        width: 95%;
        margin: 1rem;
        padding: 1.5rem;
    }

    /* Forms */
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px; /* Prevent zoom on iOS */
    }

    /* Buttons */
    .btn-primary,
    .btn-secondary,
    .btn-outline,
    .btn-light {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }
}

/* ===================================
   EXTRA SMALL MOBILE (up to 374px)
   =================================== */
@media (max-width: 374px) {
    .logo {
        font-size: 1.1rem;
    }

    .logo img {
        height: 30px;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .hero-text h1 {
        font-size: 1.75rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .service-card {
        padding: 1.25rem;
    }

    .service-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}

/* ===================================
   LANDSCAPE ORIENTATION (Mobile)
   =================================== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 100px 0 2rem;
    }

    .nav-menu {
        height: auto;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }

    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* ===================================
   PRINT STYLES
   =================================== */
@media print {
    .header,
    .footer,
    .nav-menu,
    .menu-toggle,
    .btn-primary,
    .btn-secondary,
    .cta-section,
    .language-toggle {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
    }

    .hero,
    .services-section,
    .about-section {
        page-break-inside: avoid;
    }

    a {
        text-decoration: underline;
    }

    img {
        max-width: 100%;
        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;
    }

    .hero-image img {
        animation: none;
    }

    .animate-float,
    .animate-bounce,
    .animate-pulse-glow {
        animation: none;
    }
}

/* ===================================
   HIGH CONTRAST MODE
   =================================== */
@media (prefers-contrast: high) {
    :root {
        --primary: #0052cc;
        --gray: #333333;
    }

    .service-card,
    .footer {
        border: 2px solid #000;
    }

    .btn-outline {
        border-width: 3px;
    }
}

/* ===================================
   DARK MODE PREFERENCE
   =================================== */
@media (prefers-color-scheme: dark) {
    /* Note: Implement if dark mode is requested */
    /* This is a placeholder for future dark mode support */
}