/* ========================================
   DeviceHeed - Responsive Stylesheet
   ======================================== */

/* === Tablet (max-width: 992px) === */
@media screen and (max-width: 992px) {
    /* Typography adjustments */
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.75rem; }

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

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

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

    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Spacing */
    section {
        padding: 3rem 0;
    }
}

/* === Mobile (max-width: 768px) === */
@media screen and (max-width: 768px) {
    /* Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }

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

    .section-title { font-size: 2rem; }
    .section-subtitle { font-size: 1.125rem; }

    /* Navigation */
    .navbar .container {
        flex-wrap: wrap;
    }

    .navbar-toggle {
        display: block;
        order: 3;
    }

    .navbar-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        margin-top: var(--spacing-sm);
        order: 4;
    }

    .navbar-menu.active {
        display: flex;
    }

    .navbar-menu a {
        width: 100%;
        padding: var(--spacing-sm);
        border-bottom: 1px solid var(--border-color);
    }

    /* Hero */
    .hero {
        padding: 3rem 0;
    }

    .hero-cta {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .hero-cta .btn {
        width: 100%;
    }

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

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

    /* Timeline */
    .timeline-item {
        flex-direction: column;
    }

    .timeline-number {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

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

    /* Buttons */
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9375rem;
    }

    .btn-large {
        padding: 1rem 2rem;
        font-size: 1rem;
    }

    /* Spacing */
    section {
        padding: 2.5rem 0;
    }

    :root {
        --spacing-xl: 3rem;
        --spacing-lg: 2rem;
    }

    /* Pricing Calculator */
    .pricing-calculator {
        padding: var(--spacing-md);
    }

    .pricing-item {
        flex-direction: column;
        gap: var(--spacing-xs);
        align-items: flex-start;
    }

    .pricing-total {
        flex-direction: column;
        gap: var(--spacing-xs);
        align-items: flex-start;
    }

    /* Form adjustments */
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* === Small Mobile (max-width: 480px) === */
@media screen and (max-width: 480px) {
    /* Typography */
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }

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

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

    /* Cards */
    .card-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .card-title {
        font-size: 1.25rem;
    }

    .card-price {
        font-size: 1.75rem;
    }

    /* Buttons */
    .btn {
        padding: 0.75rem 1.25rem;
    }

    /* Navbar brand */
    .navbar-brand {
        font-size: 1.25rem;
    }

    /* Spacing adjustments */
    :root {
        --spacing-lg: 1.5rem;
        --spacing-md: 1.25rem;
    }
}

/* === Print Styles === */
@media print {
    .navbar,
    .navbar-toggle,
    .cta-section,
    .footer {
        display: none;
    }

    body {
        color: #000;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    .hero {
        background: none;
        color: #000;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
}

/* === Accessibility - Reduced Motion === */
@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 {
        --primary-color: #0052A3;
        --text-medium: #000;
        --border-color: #000;
    }

    .card {
        border: 2px solid #000;
    }
}

/* === Landscape Mobile === */
@media screen and (max-height: 600px) and (orientation: landscape) {
    .hero {
        padding: 2rem 0;
    }

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

    .hero-subheadline {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
}
