/* Mobile Responsiveness Enhancements for J.S. Enterprises Solar */

/* Touch Target Optimization - Ensures minimum 44x44px tap targets */
@media (max-width: 768px) {
    /* Mobile Navigation Links */
    #mobile-menu a,
    #mobile-menu button {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 16px;
    }

    /* All Buttons */
    button,
    .btn,
    a.btn {
        min-height: 44px;
        padding: 12px 20px;
        font-size: 1rem;
    }

    /* Form Inputs */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    select,
    textarea {
        min-height: 48px;
        font-size: 16px; /* Prevents iOS zoom on focus */
        padding: 12px 16px;
    }

    /* Prevent Horizontal Scroll */
    body {
        overflow-x: hidden;
    }

    /* Ensure containers don't overflow */
    .container {
        max-width: 100%;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Optimize Hero Text Sizes */
    h1 {
        font-size: 2rem !important;
        line-height: 1.2;
    }

    h2 {
        font-size: 1.75rem !important;
        line-height: 1.3;
    }

    h3 {
        font-size: 1.5rem !important;
    }

    /* Mobile-Friendly Spacing */
    section {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    /* Card Stacking */
    .grid {
        gap: 1.5rem;
    }

    /* Image Responsiveness */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Prevent Text Overflow */
    p,
    span,
    div {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Mobile Table Handling - Horizontal Scroll */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    /* Sticky Navigation Optimization */
    header.sticky {
        position: sticky;
        top: 0;
    }

    /* Footer Optimization */
    footer .grid {
        grid-template-columns: 1fr;
    }

    /* Modal/Dropdown Click Areas */
    .dropdown-item,
    .menu-item {
        padding: 14px 18px;
    }

    /* Social Icons Touch Targets */
    .social-icon,
    a[class*="fa-"] {
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Prevent Double-Tap Zoom */
    * {
        touch-action: manipulation;
    }

    /* Smooth Scroll for Mobile */
    html {
        scroll-behavior: smooth;
    }

    /* Optimize Form Layouts */
    form .grid {
        grid-template-columns: 1fr !important;
    }

    /* Mobile Calendar Widget */
    input[type="date"],
    input[type="time"] {
        min-height: 48px;
    }

    /* WhatsApp/Chat Buttons */
    .whatsapp-btn,
    .chat-btn {
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
    }

    /* Ensure Videos are Responsive */
    video,
    iframe {
        max-width: 100%;
        height: auto;
    }

    /* Mobile-Specific utilities */
    .mobile-hidden {
        display: none !important;
    }

    .mobile-full-width {
        width: 100% !important;
    }

    .mobile-text-center {
        text-align: center;
    }

    /* Reduce Animation on Mobile for Performance */
    *,
    *::before,
    *::after {
        animation-duration: 0.3s !important;
        transition-duration: 0.2s !important;
    }
}

/* Tablet Optimization (768px to 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .container {
        max-width: 90%;
    }

    h1 {
        font-size: 2.5rem !important;
    }

    h2 {
        font-size: 2rem !important;
    }
}

/* Large Mobile (480px to 768px) */
@media (min-width: 480px) and (max-width: 768px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}
