/* =========================================
   Responsive Styles - Mobile First Approach
   ========================================= */

/* Tablet Styles (768px - 1199px) */
@media (max-width: 1199px) {
    :root {
        --spacing-xl: 3rem;
    }
    
    .container {
        max-width: 960px;
    }
    
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.875rem; }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
}

/* Tablet & Mobile (max-width: 991px) */
@media (max-width: 991px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Styles (max-width: 767px) */
@media (max-width: 767px) {
    :root {
        --spacing-md: 1.5rem;
        --spacing-lg: 2rem;
        --spacing-xl: 2.5rem;
    }
    
    html {
        font-size: 15px;
    }
    
    /* Typography */
    h1 { font-size: 1.875rem; }
    h2 { font-size: 1.625rem; }
    h3 { font-size: 1.375rem; }
    h4 { font-size: 1.125rem; }
    
    .section-title h2 {
        font-size: 1.75rem;
    }
    
    /* Container */
    .container,
    .container-fluid {
        padding: 0 var(--spacing-sm);
    }
    
    /* Header & Navigation */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: left var(--transition-base);
        box-shadow: var(--shadow-lg);
        padding: var(--spacing-md) 0;
        gap: 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-link {
        display: block;
        padding: var(--spacing-sm) var(--spacing-md);
        border-radius: 0;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    /* Hero */
    .hero {
        padding: var(--spacing-lg) 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    /* Buttons */
    .btn {
        width: 100%;
        margin-bottom: var(--spacing-sm);
    }
    
    .btn-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Grid System */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    /* Cards */
    .card {
        margin-bottom: var(--spacing-sm);
    }
    
    .card-body {
        padding: var(--spacing-sm);
    }
    
    /* Features */
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .footer-section {
        text-align: center;
    }
    
    .contact-info li {
        justify-content: center;
    }
    
    /* Forms */
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Modal adjustments will be in components.css */
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    h1 { font-size: 1.625rem; }
    h2 { font-size: 1.5rem; }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .section {
        padding: var(--spacing-md) 0;
    }
    
    .logo {
        font-size: 1.25rem;
    }
    
    .logo img {
        height: 40px;
    }
}

/* Large Desktop (min-width: 1400px) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero h1 {
        font-size: 3.5rem;
    }
    
    .section-title h2 {
        font-size: 3rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px; /* iOS touch target recommendation */
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .form-control {
        min-height: 44px;
    }
}

/* Landscape Mobile */
@media (max-width: 767px) and (orientation: landscape) {
    .hero {
        padding: var(--spacing-md) 0;
    }
    
    .section {
        padding: var(--spacing-md) 0;
    }
}

/* Print Enhancements */
@media print {
    .container {
        max-width: 100%;
    }
    
    .section {
        page-break-inside: avoid;
    }
    
    .card {
        page-break-inside: avoid;
    }
}

/* 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 (Optional) */
@media (prefers-color-scheme: dark) {
    /* Can implement dark mode styles here if needed */
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor;
    }
    
    .card {
        border: 1px solid var(--gray-700);
    }
}