/* ===================================
   X-TREME HVAC PAY - Responsive Styles
   ================================== */

/* ===================================
   Large Desktops (1440px and above)
   ================================== */
@media (min-width: 1440px) {
    :root {
        --text-5xl: 4rem;
        /* 64px */
        --text-6xl: 4.5rem;
        /* 72px */
    }

    .container {
        max-width: 1400px;
    }

    section {
        padding: var(--space-24) 0;
    }
}

/* ===================================
   Desktop (1200px - 1439px)
   ================================== */
@media (min-width: 1200px) and (max-width: 1439px) {
    .container {
        max-width: 1140px;
    }
}

/* ===================================
   Tablet Landscape (992px - 1199px)
   ================================== */
@media (max-width: 1199px) {
    .container {
        max-width: 960px;
    }

    h1 {
        font-size: var(--text-4xl);
    }

    h2 {
        font-size: var(--text-3xl);
    }

    h3 {
        font-size: var(--text-2xl);
    }

    section {
        padding: var(--space-16) 0;
    }
}

/* ===================================
   Tablet Portrait (768px - 991px)
   ================================== */
@media (max-width: 991px) {
    .container {
        max-width: 720px;
    }

    /* Grid adjustments */
    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    /* Button adjustments */
    .btn-large {
        padding: var(--space-4) var(--space-10);
        font-size: var(--text-base);
    }

    /* Spacing adjustments */
    section {
        padding: var(--space-12) 0;
    }
}

/* ===================================
   Mobile Landscape (576px - 767px)
   ================================== */
@media (max-width: 767px) {
    .container {
        max-width: 540px;
        padding: 0 var(--space-5);
    }

    /* Typography */
    h1 {
        font-size: var(--text-3xl);
    }

    h2 {
        font-size: var(--text-2xl);
    }

    h3 {
        font-size: var(--text-xl);
    }

    h4 {
        font-size: var(--text-lg);
    }

    /* Grid system */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
        gap: var(--space-5);
    }

    /* Buttons */
    .btn {
        width: 100%;
        padding: var(--space-4) var(--space-6);
    }

    .btn-large {
        padding: var(--space-4) var(--space-8);
    }

    /* Sections */
    section {
        padding: var(--space-10) 0;
    }

    /* Service cards */
    .service-card {
        padding: var(--space-6);
    }

    .service-card-icon {
        width: 60px;
        height: 60px;
        font-size: var(--text-2xl);
    }

    /* Neon cards */
    .neon-card {
        padding: var(--space-6);
    }

    /* Feature boxes */
    .feature-box {
        padding: var(--space-6);
    }
}

/* ===================================
   Mobile Portrait (below 576px)
   ================================== */
@media (max-width: 575px) {
    :root {
        --text-base: 0.9375rem;
        /* 15px */
    }

    .container,
    .container-fluid {
        padding: 0 var(--space-4);
    }

    /* Typography */
    h1 {
        font-size: var(--text-2xl);
        margin-bottom: var(--space-3);
    }

    h2 {
        font-size: var(--text-xl);
        margin-bottom: var(--space-3);
    }

    h3 {
        font-size: var(--text-lg);
        margin-bottom: var(--space-2);
    }

    h4,
    h5,
    h6 {
        font-size: var(--text-base);
        margin-bottom: var(--space-2);
    }

    p {
        margin-bottom: var(--space-3);
    }

    /* Buttons */
    .btn {
        padding: var(--space-3) var(--space-5);
        font-size: var(--text-sm);
    }

    .btn-large {
        padding: var(--space-4) var(--space-6);
        font-size: var(--text-base);
    }

    /* Grid */
    .grid {
        gap: var(--space-4);
    }

    /* Sections */
    section {
        padding: var(--space-8) 0;
    }

    /* Cards */
    .neon-card,
    .service-card,
    .feature-box {
        padding: var(--space-5);
        border-radius: var(--radius-lg);
    }

    .service-card-icon {
        width: 50px;
        height: 50px;
        font-size: var(--text-xl);
        margin-bottom: var(--space-4);
    }

    /* Neon icon */
    .neon-icon {
        width: 50px;
        height: 50px;
        font-size: var(--text-xl);
    }

    /* Spacing utilities */
    .py-20 {
        padding-top: var(--space-12);
        padding-bottom: var(--space-12);
    }

    .py-16 {
        padding-top: var(--space-10);
        padding-bottom: var(--space-10);
    }

    .py-12 {
        padding-top: var(--space-8);
        padding-bottom: var(--space-8);
    }

    .mt-12,
    .mb-12 {
        margin-top: var(--space-8);
        margin-bottom: var(--space-8);
    }
}

/* ===================================
   Extra Small Mobile (below 414px)
   ================================== */
@media (max-width: 413px) {
    :root {
        --text-base: 0.875rem;
        /* 14px */
    }

    .container {
        padding: 0 var(--space-3);
    }

    h1 {
        font-size: var(--text-xl);
    }

    h2 {
        font-size: var(--text-lg);
    }

    .btn {
        padding: var(--space-3) var(--space-4);
        font-size: var(--text-xs);
    }

    section {
        padding: var(--space-6) 0;
    }
}

/* ===================================
   Touch Device Optimizations
   ================================== */
@media (hover: none) and (pointer: coarse) {

    /* Larger tap targets */
    .btn,
    .nav-link,
    .footer-link {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    /* Remove hover effects on touch devices */
    .neon-card:hover,
    .service-card:hover,
    .feature-box:hover {
        transform: none;
    }

    /* Disable animations that rely on hover */
    .neon-card::before,
    .service-card::before {
        animation: none;
    }
}

/* ===================================
   Print Styles
   ================================== */
@media print {

    /* Remove backgrounds and shadows */
    *,
    *::before,
    *::after {
        background: transparent !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    /* Show links */
    a[href]::after {
        content: " (" attr(href) ")";
    }

    /* Page breaks */
    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        page-break-after: avoid;
    }

    /* Hide header and footer */
    .site-header,
    .site-footer,
    .mobile-menu-toggle,
    .btn-neon {
        display: none;
    }

    /* Adjust font sizes */
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
    }

    h1 {
        font-size: 24pt;
    }

    h2 {
        font-size: 20pt;
    }

    h3 {
        font-size: 18pt;
    }

    h4 {
        font-size: 16pt;
    }

    h5 {
        font-size: 14pt;
    }

    h6 {
        font-size: 12pt;
    }
}

/* ===================================
   Reduced Motion Preference
   ================================== */
@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;
    }
}

/* ===================================
   High Contrast Mode
   ================================== */
@media (prefers-contrast: high) {
    :root {
        --primary-blue: #0066ff;
        --primary-yellow: #ffdd00;
    }

    .btn,
    .nav-link {
        border-width: 3px;
    }

    .neon-card::before,
    .service-card::before {
        opacity: 1;
    }
}

/* ===================================
   Dark Mode Support
   ================================== */
@media (prefers-color-scheme: dark) {
    /* Note: The site already has a dark theme by default */
    /* This section can be used if a light mode is added in the future */
}

/* ===================================
   Landscape Orientation
   ================================== */
@media (max-width: 991px) and (orientation: landscape) {
    section {
        padding: var(--space-8) 0;
    }

    .site-header .header-inner {
        padding: var(--space-3) var(--space-6);
    }

    .main-nav {
        width: 350px;
    }
}

/* ===================================
   Very Wide Screens (Ultra-wide)
   ================================== */
@media (min-width: 1920px) {
    .container {
        max-width: 1600px;
    }

    h1 {
        font-size: 5rem;
    }

    h2 {
        font-size: 3.5rem;
    }
}