/* ============================================
   Responsive - Media Queries & Breakpoints
   ============================================ */

/* Breakpoints:
   - Mobile: < 640px
   - Tablet: 640px - 1023px
   - Desktop: >= 1024px
   - Large Desktop: >= 1280px
*/

/* ---- Tablet & Below (< 1024px) ---- */
@media (max-width: 1023px) {
    /* Typography */
    h1, .hero__title {
        font-size: var(--text-4xl);
    }

    h2, .section-header__title {
        font-size: var(--text-3xl);
    }

    h3 {
        font-size: var(--text-xl);
    }

    /* Navigation */
    .navbar__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: var(--space-20) var(--space-8);
        gap: var(--space-6);
        box-shadow: var(--shadow-2xl);
        transition: right var(--transition-base);
        z-index: var(--z-modal);
    }

    .navbar__menu.is-active {
        right: 0;
    }

    .navbar__toggle {
        display: flex;
        z-index: var(--z-modal);
    }

    .navbar__toggle.is-active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .navbar__toggle.is-active span:nth-child(2) {
        opacity: 0;
    }

    .navbar__toggle.is-active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .navbar__cta {
        width: 100%;
    }

    /* Mobile Menu Overlay */
    .navbar__overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
        z-index: var(--z-modal-backdrop);
    }

    .navbar__overlay.is-active {
        opacity: 1;
        visibility: visible;
    }

    /* Grid */
    .grid--4,
    .grid--5 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid--3 {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Two Column */
    .two-col {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .two-col--reverse {
        direction: ltr;
    }

    /* Stats */
    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Footer */
    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-8);
    }

    .footer__brand {
        grid-column: 1 / -1;
        max-width: 100%;
    }

    /* Sections */
    .section {
        padding: var(--space-16) 0;
    }

    .section--hero {
        padding-top: calc(var(--space-24) + 80px);
    }

    /* Hero */
    .hero {
        min-height: auto;
        padding: var(--space-16) 0;
    }

    .hero__title {
        font-size: var(--text-4xl);
    }

    .hero__subtitle {
        font-size: var(--text-lg);
    }
}

/* ---- Mobile (< 640px) ---- */
@media (max-width: 639px) {
    /* Container */
    .container {
        padding: 0 var(--space-4);
    }

    /* Typography */
    h1, .hero__title {
        font-size: var(--text-3xl);
    }

    h2, .section-header__title {
        font-size: var(--text-2xl);
    }

    h3 {
        font-size: var(--text-lg);
    }

    .hero__subtitle {
        font-size: var(--text-base);
    }

    .section-header__description {
        font-size: var(--text-base);
    }

    /* Grid */
    .grid--2,
    .grid--3,
    .grid--4,
    .grid--5 {
        grid-template-columns: 1fr;
    }

    /* Stats */
    .stats {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-6);
    }

    .stat__number {
        font-size: var(--text-4xl);
    }

    /* Buttons */
    .btn {
        width: 100%;
    }

    .hero__actions {
        flex-direction: column;
    }

    /* Cards */
    .card {
        padding: var(--space-5);
    }

    .card--service {
        padding: var(--space-6);
    }

    .card--feature {
        flex-direction: column;
        text-align: center;
    }

    .card--feature .card__icon {
        margin: 0 auto var(--space-4);
    }

    /* Footer */
    .footer__grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .footer__bottom {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }

    /* Section Header */
    .section-header {
        margin-bottom: var(--space-8);
    }

    /* Page Header */
    .page-header {
        padding-top: calc(var(--space-16) + 80px);
        padding-bottom: var(--space-12);
    }

    .page-header__title {
        font-size: var(--text-3xl);
    }

    /* CTA */
    .cta {
        padding: var(--space-12) 0;
    }

    .cta__title {
        font-size: var(--text-2xl);
    }

    .cta__description {
        font-size: var(--text-base);
    }

    /* Navbar */
    .navbar__logo img {
        height: 32px;
    }
}

/* ---- Large Desktop (>= 1280px) ---- */
@media (min-width: 1280px) {
    .hero__title {
        font-size: 4rem;
    }

    .section-header__title {
        font-size: var(--text-5xl);
    }

    .grid--5 {
        gap: var(--space-8);
    }
}

/* ---- Extra Large Desktop (>= 1536px) ---- */
@media (min-width: 1536px) {
    .container {
        max-width: 1400px;
    }
}

/* ---- Print Styles ---- */
@media print {
    .navbar,
    .footer,
    .cta,
    .btn {
        display: none;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    .section {
        padding: 20pt 0;
        page-break-inside: avoid;
    }

    h1, h2, h3 {
        page-break-after: avoid;
    }
}

/* ---- Landscape Phone ---- */
@media (max-width: 896px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: var(--space-12) 0;
    }

    .section--hero {
        padding-top: calc(var(--space-16) + 60px);
    }
}

/* ---- Hover Media Query (for touch devices) ---- */
@media (hover: none) {
    .card:hover,
    .hover-lift:hover,
    .hover-scale:hover {
        transform: none;
    }

    .btn--primary:hover {
        transform: none;
    }
}

/* ---- High Contrast Mode ---- */
@media (prefers-contrast: high) {
    :root {
        --text-dark: #000000;
        --text-body: #000000;
        --gray-200: #666666;
    }

    .btn--primary {
        border: 2px solid var(--white);
    }
}

