/* ============================================
   CLEAN MOBILE RESPONSIVE STYLES
   TNCCL Construction Company Theme
   ============================================ */

/* Prevent horizontal scroll on all devices */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Base mobile styles for tablets and mobile devices */
@media (max-width: 768px) {
    
    /* Container adjustments */
    .container {
        padding: 0 1.25rem !important;
        max-width: 100% !important;
    }
    
    /* Header Mobile Fixes */
    .site-header {
        padding: 0.75rem 0 !important;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(10px) !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 9999 !important;
    }
    
    .header-content {
        padding: 0 1.25rem !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    .logo-img {
        height: 36px !important;
        width: auto !important;
        filter: none !important; /* Show original logo colors */
    }
    
    .nav-list {
        display: none !important;
    }
    
    .mobile-menu-toggle {
        display: flex !important;
        gap: 3px !important;
        flex-direction: column !important;
        padding: 8px !important;
        background: transparent !important;
        border: none !important;
        cursor: pointer !important;
    }
    
    .mobile-menu-toggle span {
        width: 22px !important;
        height: 2px !important;
        background: #1f2937 !important;
        border-radius: 2px !important;
        transition: all 0.3s ease !important;
    }
    
    /* Hide header Request Quote button on mobile */
    .header-content .btn-primary {
        display: none !important;
    }
    
    /* Hero Section Mobile - Clean Design */
    .hero {
        min-height: 100vh !important;
        padding: 5rem 0 2rem !important;
        margin: 0 !important;
        border-radius: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        position: relative !important;
    }
    
    .hero-background {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        z-index: -1 !important;
    }
    
    .hero-content {
        padding: 2rem 1.25rem !important;
        max-width: 100% !important;
        text-align: center !important;
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    /* Trust Badge - Cleaner Design */
    .trust-badge {
        font-size: 0.75rem !important;
        padding: 0.5rem 1rem !important;
        margin-bottom: 1.5rem !important;
        background: rgba(255, 255, 255, 0.95) !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        border-radius: 20px !important;
        display: inline-block !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    }
    
    /* Hero Text - Better Scaling */
    .hero-title {
        font-size: 2.25rem !important;
        line-height: 1.15 !important;
        margin-bottom: 1rem !important;
        font-weight: 800 !important;
        letter-spacing: -0.02em !important;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3) !important;
        padding: 0 0.5rem !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
        line-height: 1.5 !important;
        margin-bottom: 2rem !important;
        padding: 0 0.5rem !important;
        color: rgba(255, 255, 255, 0.95) !important;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3) !important;
        max-width: 100% !important;
    }
    
    /* Hero Actions - Clean Button */
    .hero-actions {
        width: 100% !important;
        padding: 0 1.25rem !important;
        margin-bottom: 0 !important;
    }
    
    .hero-actions .btn {
        width: 100% !important;
        padding: 1rem 1.5rem !important;
        font-size: 1rem !important;
        font-weight: 600 !important;
        border-radius: 12px !important;
        text-align: center !important;
        box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3) !important;
        background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
        color: white !important;
        border: none !important;
        min-height: 52px !important;
    }
    
    /* Partners Section - Clean Card Design */
    .partners-section {
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
        background: rgba(17, 24, 39, 0.95) !important;
        backdrop-filter: blur(20px) !important;
        padding: 1.5rem 1.25rem !important;
        margin: 0 !important;
        width: 100% !important;
        min-width: unset !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 0 !important;
    }
    
    .partners-text {
        font-size: 0.75rem !important;
        margin-bottom: 1rem !important;
        color: rgba(255, 255, 255, 0.7) !important;
        text-align: center !important;
        font-weight: 500 !important;
        letter-spacing: 0.05em !important;
        text-transform: uppercase !important;
    }
    
    .partners-logos {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 1rem !important;
        flex-wrap: wrap !important;
        padding: 0 !important;
    }
    
    .partner-logo-item {
        flex: 1 1 auto !important;
        min-width: 60px !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 0.5rem !important;
    }
    
    .partner-logo {
        height: 28px !important;
        width: auto !important;
        max-width: 60px !important;
        object-fit: contain !important;
        filter: brightness(0) invert(1) opacity(0.8) !important;
        transition: all 0.3s ease !important;
    }
    
    .partner-logo:hover {
        opacity: 1 !important;
        transform: scale(1.1) !important;
    }
    
    /* Section Spacing */
    .section {
        padding: 3rem 0 !important;
    }
    
    .section-header {
        margin-bottom: 2rem !important;
    }
    
    .section-title {
        font-size: 1.875rem !important;
        font-weight: 700 !important;
        margin-bottom: 0.75rem !important;
        line-height: 1.2 !important;
    }
    
    .section-subtitle {
        font-size: 1rem !important;
        line-height: 1.5 !important;
        color: #6b7280 !important;
    }
    
    /* Services Section Mobile */
    .services {
        padding: 3rem 0 !important;
        background: #ffffff !important;
    }
    
    .services-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }
    
    .service-card {
        padding: 2rem 1.5rem !important;
        border-radius: 12px !important;
        background: white !important;
        border: 1px solid #e5e7eb !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    }
    
    .service-icon {
        font-size: 2.5rem !important;
        margin-bottom: 1rem !important;
    }
    
    .service-card h3 {
        font-size: 1.25rem !important;
        font-weight: 600 !important;
        margin-bottom: 0.75rem !important;
        color: #111827 !important;
    }
    
    .service-card p {
        font-size: 0.9375rem !important;
        line-height: 1.5 !important;
        color: #6b7280 !important;
    }
    
    /* About Section Mobile */
    .about {
        background: #f9fafb !important;
        padding: 3rem 0 !important;
    }
    
    .about-text-full {
        columns: 1 !important;
        text-align: left !important;
        padding: 0 !important;
    }
    
    .about-text-full p {
        font-size: 0.9375rem !important;
        line-height: 1.6 !important;
        margin-bottom: 1.25rem !important;
        color: #4b5563 !important;
    }
    
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        margin: 2rem 0 !important;
    }
    
    .stat-item {
        padding: 1.5rem !important;
        background: white !important;
        border-radius: 12px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    }
    
    .stat-number {
        font-size: 2rem !important;
        font-weight: 700 !important;
        color: #2563eb !important;
        margin-bottom: 0.25rem !important;
    }
    
    .stat-label {
        font-size: 0.875rem !important;
        color: #6b7280 !important;
        font-weight: 500 !important;
    }
    
    /* Contact Section Mobile */
    .contact {
        padding: 3rem 0 !important;
    }
    
    .contact-content {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .contact-form {
        padding: 2rem 1.5rem !important;
        border-radius: 12px !important;
        background: white !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    }
    
    .form-row {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.875rem !important;
        font-size: 0.9375rem !important;
        border-radius: 8px !important;
        border: 1px solid #e5e7eb !important;
    }
    
    .contact-item {
        padding: 1.5rem !important;
        border-radius: 12px !important;
        background: white !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    }
    
    .contact-item h4 {
        font-size: 1.125rem !important;
        margin-bottom: 0.5rem !important;
        color: #111827 !important;
    }
    
    .contact-item p {
        font-size: 0.9375rem !important;
        color: #6b7280 !important;
    }
    
    /* Footer Mobile */
    .footer {
        padding: 2.5rem 0 1.5rem !important;
    }
    
    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        text-align: center !important;
    }
    
    .footer-section h3,
    .footer-section h4 {
        font-size: 1.125rem !important;
        margin-bottom: 1rem !important;
    }
    
    .footer-section ul li {
        font-size: 0.9375rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .footer-bottom {
        padding-top: 1.5rem !important;
        font-size: 0.875rem !important;
    }
}

/* Extra small devices (phones < 480px) */
@media (max-width: 480px) {
    
    .container {
        padding: 0 1rem !important;
    }
    
    /* Smaller hero text */
    .hero-title {
        font-size: 1.875rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .hero-subtitle {
        font-size: 0.9375rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .trust-badge {
        font-size: 0.7rem !important;
        padding: 0.4rem 0.8rem !important;
    }
    
    /* Smaller partner logos on very small screens */
    .partners-logos {
        justify-content: center !important;
    }
    
    .partner-logo-item {
        min-width: 50px !important;
        padding: 0.25rem !important;
    }
    
    .partner-logo {
        height: 24px !important;
        max-width: 50px !important;
    }
    
    /* Smaller section titles */
    .section-title {
        font-size: 1.625rem !important;
    }
    
    .section-subtitle {
        font-size: 0.9375rem !important;
    }
    
    /* Smaller stats */
    .stat-number {
        font-size: 1.75rem !important;
    }
    
    .stat-label {
        font-size: 0.8125rem !important;
    }
}

/* iPhone SE and very small devices */
@media (max-width: 375px) {
    
    .hero-title {
        font-size: 1.75rem !important;
    }
    
    .hero-subtitle {
        font-size: 0.875rem !important;
    }
    
    .hero-actions .btn {
        font-size: 0.9375rem !important;
        padding: 0.875rem 1.25rem !important;
    }
    
    .partners-text {
        font-size: 0.7rem !important;
    }
    
    .partner-logo {
        height: 22px !important;
        max-width: 45px !important;
    }
}

/* Landscape orientation adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    
    .hero {
        min-height: 100vh !important;
        padding: 4rem 0 2rem !important;
    }
    
    .hero-title {
        font-size: 1.75rem !important;
    }
    
    .hero-subtitle {
        font-size: 0.9375rem !important;
    }
    
    .partners-section {
        position: relative !important;
        margin-top: 2rem !important;
    }
}

/* High DPI screens optimization */
@media (max-width: 768px) and (-webkit-min-device-pixel-ratio: 2),
       (max-width: 768px) and (min-resolution: 192dpi) {
    
    .hero-title,
    .section-title {
        -webkit-font-smoothing: antialiased !important;
        -moz-osx-font-smoothing: grayscale !important;
    }
    
    .partner-logo,
    .logo-img {
        image-rendering: -webkit-optimize-contrast !important;
        image-rendering: crisp-edges !important;
    }
}

/* Accessibility improvements */
@media (max-width: 768px) {
    
    /* Ensure touch targets are at least 44x44px */
    .btn,
    .nav-link,
    a,
    input,
    select,
    textarea,
    button {
        min-height: 44px !important;
    }
    
    /* Better focus indicators */
    *:focus {
        outline: 2px solid #2563eb !important;
        outline-offset: 2px !important;
    }
    
    /* Ensure text remains readable */
    * {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
}