/* ================================
   RESPONSIVE STYLES - SUNSET PARK SOLAR
   Mobile-First Responsive Design
   ================================ */

/* Base styles are mobile-first in main.css */

/* ================================
   MOBILE DEVICES (up to 575px)
   ================================ */
@media (max-width: 575px) {
    /* Prevent horizontal overflow */
    html, body {
        overflow-x: hidden;
        max-width: 100%;
    }
    
    * {
        max-width: 100%;
    }
    
    img {
        max-width: 100%;
        height: auto;
    }
    
    .header-container {
        padding: 0 1rem;
    }
    
    .logo-section {
        gap: 0.75rem;
    }
    
    .sps-logo {
        height: 35px;
    }
    
    .uprose-logo-img {
        height: 30px;
    }
    
    .wp-logo-img {
        height: 30px;
    }
    
    .x-text {
        font-size: 16px;
        margin: 0 0.25rem;
    }
    
    .language-container {
        padding: 0 1rem;
        gap: 0.75rem;
    }
    
    .lang-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .update-container {
        padding: 0 1rem;
    }
    
    .update-text {
        font-size: 13px;
    }
    
    .hero-container {
        padding: 2rem 1rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
        line-height: 1.2;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .benefits-container {
        padding: 0 1rem;
    }
    
    .benefits-text {
        font-size: 1.25rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .benefit-icon {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    .benefit-title {
        font-size: 0.9rem;
        max-width: 200px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .community-container {
        padding: 0 1rem;
    }
    
    .community-title {
        font-size: 1.5rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .value-prop-container {
        padding: 0 1rem;
    }
    
    .value-prop-title {
        font-size: 1.5rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .footer-container {
        padding: 0 1rem;
    }
    
    /* Hide decorative images on mobile */
    .sunflower-garland,
    .garland-decoration {
        display: none;
    }
}

/* ================================
   SMALL DEVICES (landscape phones, 576px to 767px)
   ================================ */
@media (min-width: 576px) and (max-width: 767px) {
    .header-container {
        padding: 0 1.25rem;
    }
    
    .language-container {
        padding: 0 1.25rem;
    }
    
    .update-container {
        padding: 0 1.25rem;
    }
    
    .hero-container {
        padding: 2.5rem 1.25rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .benefits-container {
        padding: 0 1.25rem;
    }
    
    .benefits-text {
        font-size: 1.5rem;
    }
    
    .community-container {
        padding: 0 1.25rem;
    }
    
    .community-title {
        font-size: 1.75rem;
    }
    
    .value-prop-container {
        padding: 0 1.25rem;
    }
    
    .value-prop-title {
        font-size: 1.75rem;
    }
    
    .footer-container {
        padding: 0 1.25rem;
    }
    
    /* Hide decorative images */
    .sunflower-garland,
    .garland-decoration {
        display: none;
    }
}

/* ================================
   TABLETS / IPADS (768px to 1023px)
   ================================ */
@media (min-width: 768px) and (max-width: 1023px) {
    /* Prevent horizontal overflow */
    html, body {
        overflow-x: hidden;
        max-width: 100%;
    }
    
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Header adjustments for iPad */
    .header {
        padding: 0.75rem 0;
    }
    
    .header-container {
        padding: 0 2rem;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .logo-section {
        gap: 1.25rem;
        flex: 1 1 auto;
        min-width: 0;
    }
    
    .sps-logo {
        height: 50px;
    }
    
    .uprose-logo-img {
        height: 42px;
    }
    
    .wp-logo-img {
        height: 44px;
    }
    
    .x-text {
        font-size: 20px;
        margin: 0 0.75rem;
    }
    
    .divider {
        height: 50px;
    }
    
    /* Mobile Navigation for iPad - Hide menu by default */
    .mobile-menu-toggle {
        display: flex;
        z-index: 1001;
        position: relative;
    }
    
    /* When menu is open, prevent body scroll */
    body.menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 0;
        margin: 0;
        box-shadow: none;
        transform: translateX(-100%);
        transition: transform var(--transition-base);
        z-index: 1000;
        overflow-y: auto;
        justify-content: center;
        align-items: center;
        -webkit-overflow-scrolling: touch;
    }
    
    .main-nav.active {
        transform: translateX(0);
    }
    
    .nav-link {
        width: 100%;
        text-align: center;
        padding: 1.5rem 1rem;
        font-size: 1.2rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        display: block;
        white-space: normal;
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    .nav-link.nav-enroll {
        margin: 1rem auto;
        border-radius: 8px;
        width: calc(100% - 2rem);
        max-width: 300px;
        display: block;
    }
    
    /* Ensure header stays above menu */
    .header {
        z-index: 1001;
    }
    
    /* Language bar for iPad */
    .language-container {
        padding: 0 2rem;
        gap: 1.25rem;
    }
    
    .lang-btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    /* Update banner for iPad */
    .update-container {
        padding: 0 2rem;
    }
    
    .update-text {
        font-size: 15px;
    }
    
    /* Hero section for iPad */
    .hero-section {
        min-height: 400px;
    }
    
    .hero-container {
        padding: 4rem 2rem;
    }
    
    .hero-title {
        font-size: 2.75rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        line-height: 1.15;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        line-height: 1.4;
    }
    
    .benefits-container {
        padding: 0 2rem;
    }
    
    .benefits-text {
        font-size: 1.9rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .benefits-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
    
    .benefit-icon {
        width: 130px;
        height: 130px;
        font-size: 3.2rem;
    }
    
    .benefit-title {
        font-size: 1.05rem;
        max-width: 200px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .community-container {
        padding: 0 2rem;
    }
    
    .community-title {
        font-size: 2.2rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .value-prop-container {
        padding: 0 2rem;
    }
    
    .value-prop-title {
        font-size: 2.2rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .footer-container {
        padding: 0 2rem;
    }
    
    /* Hide decorative images on tablets */
    .sunflower-garland,
    .garland-decoration {
        display: none;
    }
}

/* ================================
   LARGE TABLETS / SMALL DESKTOPS (1024px to 1199px)
   ================================ */
@media (min-width: 1024px) and (max-width: 1199px) {
    .header-container {
        padding: 0 2rem;
    }
    
    .language-container {
        padding: 0 2rem;
    }
    
    .update-container {
        padding: 0 2rem;
    }
    
    .hero-container {
        padding: 3.5rem 2rem;
    }
    
    .benefits-container {
        padding: 0 2rem;
    }
    
    .community-container {
        padding: 0 2rem;
    }
    
    .value-prop-container {
        padding: 0 2rem;
    }
    
    .footer-container {
        padding: 0 2rem;
    }
    
    .benefits-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
    
    /* Show sunflowers but smaller */
    .sunflower-decoration {
        display: none;
    }
}

/* ================================
   NEST HUB MAX / LANDSCAPE SMART DISPLAYS (1200px to 1440px, max-height 900px)
   Optimized for 1280x800 screens
   ================================ */
@media (min-width: 1200px) and (max-width: 1440px) and (max-height: 900px) {
    /* Header adjustments */
    .header-container {
        padding: 0 2.5rem;
    }
    
    .language-container {
        padding: 0 2.5rem;
    }
    
    .update-container {
        padding: 0 2.5rem;
    }
    
    /* Hero section - reduce height to save space */
    .hero-section {
        min-height: clamp(250px, 35vh, 350px);
    }
    
    .hero-container {
        padding: 2.5rem 2.5rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
    }
    
    /* Benefits section - optimize spacing for vertical space */
    .benefits-section {
        padding: clamp(2rem, 5vw, 3.5rem) 0;
    }
    
    .benefits-container {
        padding: 0 2.5rem;
    }
    
    .benefits-intro {
        margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
        padding: 10px 8px;
    }
    
    .benefits-text {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    /* Benefits grid - ensure all content fits */
    .benefits-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: clamp(1.5rem, 3vw, 2.5rem);
        align-items: start;
        margin-top: 1rem;
    }
    
    /* Benefit items - optimize spacing */
    .benefit-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 0.5rem 0.25rem;
        min-height: auto;
    }
    
    .benefit-icon {
        width: clamp(100px, 11vw, 130px);
        height: clamp(100px, 11vw, 130px);
        font-size: clamp(2.2rem, 3.5vw, 3rem);
        margin-bottom: 10px;
        flex-shrink: 0;
    }
    
    .benefit-title {
        font-size: clamp(0.9rem, 1.4vw, 1.05rem);
        line-height: 1.5;
        max-width: 240px;
        margin: 0 auto;
        padding: 0 5px;
        min-height: auto;
        display: block;
        overflow: visible;
    }
    
    /* Hide decorative sunflowers to save space */
    .sunflower-decoration {
        display: none;
    }
    
    /* Community section - reduce padding */
    .community-section {
        padding: clamp(2rem, 5vw, 3.5rem) 0;
    }
    
    .community-container {
        padding: 0 2.5rem;
    }
    
    .community-title {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    /* Value prop section - reduce padding */
    .value-prop-section {
        padding: clamp(2rem, 5vw, 3.5rem) 0;
    }
    
    .value-prop-container {
        padding: 0 2.5rem;
    }
    
    .value-prop-title {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    .footer-container {
        padding: 0 2.5rem;
    }
}

/* ================================
   DESKTOPS (1200px and up)
   ================================ */
@media (min-width: 1200px) {
    .container {
        max-width: 1320px;
    }
    
    .benefits-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ================================
   ULTRA-WIDE SCREENS (1441px and up)
   ================================ */
@media (min-width: 1441px) {
    .benefits-grid {
        grid-template-columns: auto 1fr 1fr 1fr auto;
    }
    
    .sunflower-decoration {
        display: flex;
    }
}

/* Touch device optimizations */
@media (pointer: coarse) {
    .btn {
        min-height: 48px;
        padding: 16px 32px;
    }
    
    .nav-link {
        padding: 12px 0;
        min-height: 44px;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .header {
        border-bottom: 2px solid;
    }
    
    .nav-link {
        border: 1px solid transparent;
    }
    
    .nav-link:focus {
        border-color: currentColor;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --color-bg: #1a1a1a;
        --color-text: #e0e0e0;
        --color-text-light: #999;
        --color-footer-bg: rgba(26, 26, 26, 0.95);
    }
    
    .header {
        background: rgba(26, 26, 26, 0.95);
        border-bottom: 1px solid #333;
    }
    
    .main-nav {
        background: rgba(26, 26, 26, 0.98);
    }
    
    .benefits-section {
        background: #2a2a2a;
    }
    
    .benefits-text {
        color: #e0e0e0;
    }
    
    .community-section {
        background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 50%, #333 100%);
    }
    
    .footer {
        background: rgba(26, 26, 26, 0.95);
        border-top: 1px solid #333;
    }
}

