/* ========================================
   SOLAR RESPONSIVE - MOBILE-FIRST STYLES
   ======================================== */

/* ===== TABLET (768px and below) ===== */

@media (max-width: 768px) {

    /* Header */
    .header-top {
        display: none;
        /* Hide top bar on mobile */
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem;
        gap: 0;
        transform: translateX(-100%);
        transition: transform var(--transition-base);
        overflow-y: auto;
        box-shadow: var(--shadow-lg);
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid var(--gray-200);
    }

    .nav-link {
        width: 100%;
        padding: 1rem 0;
        font-size: var(--fs-lg);
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--transition-base);
    }

    .dropdown.active .dropdown-menu {
        max-height: 500px;
    }

    .dropdown-item {
        padding: 0.75rem 1rem;
    }

    .header-cta {
        display: none;
        /* Hide in nav, show in mobile menu */
    }

    .nav-menu .header-cta {
        display: block;
        width: 100%;
        margin-top: 1rem;
    }

    /* Hero */
    .hero-title {
        font-size: var(--fs-4xl);
    }

    .hero-subtitle {
        font-size: var(--fs-lg);
    }

    .hero-stats {
        flex-direction: column;
        gap: var(--spacing-lg);
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
    }

    .hero-cta .btn {
        width: 100%;
    }

    /* Benefits */
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }

    /* Process */
    .process-timeline {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }

    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-xl);
    }

    /* Testimonials */
    .testimonials-slider {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }

    /* CTA */
    .cta-title {
        font-size: var(--fs-3xl);
    }

    .cta-subtitle {
        font-size: var(--fs-base);
    }

    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .cta-buttons .btn {
        width: 100%;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
    }

    .newsletter-wrapper {
        flex-direction: column;
        gap: var(--spacing-lg);
    }

    .newsletter-form {
        width: 100%;
        max-width: none;
    }

    .footer-bottom-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-legal {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ===== MOBILE (480px and below) ===== */

@media (max-width: 480px) {

    /* Hero */
    .hero-title {
        font-size: var(--fs-3xl);
    }

    .stat-number {
        font-size: var(--fs-3xl);
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-box .stat-value {
        font-size: var(--fs-4xl);
    }

    /* Newsletter */
    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form input,
    .newsletter-form button {
        width: 100%;
    }

    /* Back to top */
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}

/* ===== LARGE DESKTOP (1400px and above) ===== */

@media (min-width: 1400px) {
    :root {
        --container-max-width: 1320px;
    }
}

/* ===== PRINT STYLES ===== */

@media print {

    .solar-header,
    .solar-footer,
    .back-to-top,
    .hero-scroll,
    .cta-section {
        display: none;
    }

    body {
        font-size: 12pt;
        color: #000;
    }

    a {
        text-decoration: underline;
    }

    .section-padding {
        padding: 1rem 0;
    }
}

/* ===== ACCESSIBILITY ===== */

/* Reduced motion for users who prefer it */
@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 {
        --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
        --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
    }

    .btn {
        border-width: 3px;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    /* Uncomment to enable dark mode */
    /*
  :root {
    --white: #1a1a1a;
    --black: #ffffff;
    --gray-50: #2d2d2d;
    --gray-100: #3a3a3a;
    --gray-800: #e5e5e5;
    --gray-900: #f5f5f5;
  }
  
  body {
    background-color: var(--gray-900);
    color: var(--gray-100);
  }
  */
}