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

/* Tablet (768px and up) */
@media (max-width: 1023px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-content {
        grid-template-columns: 1fr;
    }
}

/* Mobile (below 768px) */
@media (max-width: 767px) {
    /* Typography adjustments */
    :root {
        --text-base: 1rem;         /* 16px on mobile */
        --text-xl: 1.25rem;        /* 20px */
        --text-2xl: 1.75rem;       /* 28px */
        --text-3xl: 2rem;          /* 32px */
    }

    /* Container padding */
    .container {
        padding: 0 var(--spacing-sm);
    }

    /* Section padding */
    .section {
        padding: var(--spacing-lg) 0;
    }

    /* Navigation - Mobile Menu */
    .nav-links {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background-color: var(--color-white);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: var(--spacing-md);
        gap: var(--spacing-sm);
        transition: left 0.3s ease;
        box-shadow: var(--shadow-lg);
    }

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

    .nav-links a {
        width: 100%;
        text-align: center;
        padding: var(--spacing-sm);
        font-size: var(--text-lg);
    }

    .menu-toggle {
        display: flex;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    /* Hero section */
    .hero {
        padding: var(--spacing-lg) 0;
    }

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

    .hero p {
        font-size: var(--text-base);
    }

    /* Grid adjustments */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    /* Cards */
    .card {
        padding: var(--spacing-sm) var(--spacing-md);
    }

    /* About content */
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .about-image {
        max-width: 300px;
        margin: 0 auto;
    }

    /* Values grid */
    .values-grid {
        grid-template-columns: 1fr;
    }

    /* Contact info */
    .contact-info {
        align-items: flex-start;
    }

    .contact-method a,
    .contact-method p {
        font-size: var(--text-lg);
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    /* Buttons - Make more touch-friendly */
    .btn {
        display: block;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        min-height: 44px;
    }

    /* Service cards */
    .service-card {
        padding: var(--spacing-md) var(--spacing-sm);
    }

    .service-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }

    /* Page header */
    .page-header {
        padding: var(--spacing-md) 0;
    }

    .page-header h1 {
        font-size: 1.75rem;
    }

    /* Contact details */
    .contact-details {
        padding: var(--spacing-md);
    }
}

/* Small mobile (below 375px) */
@media (max-width: 374px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    .card-icon,
    .service-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .value-icon {
        width: 60px;
        height: 60px;
        font-size: 1.75rem;
    }
}

/* Large desktop (1440px and up) */
@media (min-width: 1440px) {
    .container {
        max-width: 1320px;
    }

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

/* Print styles */
@media print {
    .header,
    .menu-toggle,
    .btn,
    .cta-section,
    .footer {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
    }

    a {
        text-decoration: underline;
    }

    .page-header {
        background-color: transparent;
        color: #000;
        border-bottom: 2px solid #000;
    }
}

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

    html {
        scroll-behavior: auto;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --color-primary: #0a2540;
        --color-navy: #000000;
        --color-text: #000000;
    }

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