/* Mobile CSS Optimizations for We Buy Junk Cars */
/* Target mobile devices with max-width: 768px */

/* Base Mobile Styles */
@media screen and (max-width: 768px) {
    /* Ensure body background is visible on mobile */
    body {
        background: url('https://www.nycjunkcarbuyer.com/wp-content/uploads/junk-1.jpg') center/cover no-repeat !important;
        background-attachment: scroll !important; /* Better mobile performance */
        overflow-x: hidden;
    }

    /* Add dark overlay for better text readability */
    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.7) !important;
        z-index: -1;
        pointer-events: none;
    }

    /* Header & Navigation Mobile */
    .header {
        padding: 0.5rem 0;
        background: rgba(26, 26, 26, 0.98) !important;
        backdrop-filter: blur(20px);
        border-bottom: 3px solid #666666;
        min-height: 70px;
    }

    .nav-container {
        padding: 0 1rem;
        gap: 1rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .nav-logo img {
        width: 60px !important;
        height: 60px !important;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 100vh;
        background: rgba(26, 26, 26, 0.98) !important;
        backdrop-filter: blur(20px);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 999;
        padding: 4rem 1rem 2rem;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-links {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        margin-bottom: 2rem;
        width: 100%;
    }

    .nav-links a {
        width: 100%;
        max-width: 280px;
        text-align: center;
        padding: 12px 24px;
        font-size: 16px;
        margin: 0.25rem 0;
        background-color: #f01000 !important;
        color: #000000 !important;
        font-weight: bold !important;
        border-radius: 25px;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-cta {
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        align-items: center;
        width: 100%;
    }

    .nav-cta .cta-button {
        width: 100%;
        max-width: 300px;
        text-align: center;
        padding: 14px 20px;
        font-size: 16px;
        min-height: 50px;
    }

    /* Mobile Menu Toggle - Ensure it's visible and clickable */
    .mobile-menu-toggle {
        display: flex !important;
        flex-direction: column;
        width: 50px;
        height: 40px;
        cursor: pointer;
        background: rgba(241, 16, 0, 0.9) !important;
        border: 3px solid #929087 !important;
        border-radius: 8px;
        padding: 8px;
        transition: all 0.3s ease;
        z-index: 1001;
        position: relative;
        box-shadow: 1px 9px 17px 4px rgba(156, 156, 156, 0.3);
    }

    .mobile-menu-toggle:hover {
        background: rgba(61, 43, 31, 0.9);
        border-color: #b86f2d;
    }

    .mobile-menu-toggle span {
        width: 100%;
        height: 3px;
        background: #ffffff;
        border-radius: 2px;
        transition: 0.3s;
        transform-origin: center;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-6px, 6px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(45deg) translate(-6px, -6px);
    }

    /* Hero Section Mobile */
    .hero {
        padding: 100px 0 60px;
        min-height: auto;
        background: rgba(26, 26, 26, 0.85) !important;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2.5rem;
        line-height: 1.2;
        color: #ffffff !important;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
        color: #ffffff !important;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
        font-weight: 600 !important;
    }

    .hero-features {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .feature-item {
        flex: 0 1 calc(50% - 0.5rem);
        min-width: 140px;
        background: rgba(61, 43, 31, 0.8) !important;
        color: #ffffff !important;
    }

    .hero-cta {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-cta .cta-button {
        width: 100%;
        max-width: 350px;
        margin: 0 auto;
        padding: 16px 24px;
        font-size: 18px;
        min-height: 60px;
    }

    .hero-stats {
        margin-top: 2rem;
    }

    .hero-stats p {
        color: #ffffff !important;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
        font-weight: 600 !important;
    }

    /* Car Placeholder Mobile */
    .car-placeholder {
        padding: 2rem 1.5rem;
        max-width: 400px;
        margin: 0 auto;
        background: rgba(26, 26, 26, 0.9) !important;
        backdrop-filter: blur(15px) !important;
        border: none !important;
        box-shadow: 0 0 20px rgba(220, 20, 60, 0.6), 0 0 40px rgba(220, 20, 60, 0.3), 0 0 60px rgba(220, 20, 60, 0.1) !important;
        border-radius: 8px !important;
    }

    .car-text {
        font-size: 1.8rem;
        padding: 0.75rem;
        margin-bottom: 1rem;
        color: #dc143c !important;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
    }

    .car-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1rem;
        color: #ffffff !important;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
    }

    /* Google Bonus Box Mobile - Match screenshot proportions */
    .google-bonus {
        margin-top: 1.5rem;
        padding: 1.2rem 1rem;
        background: linear-gradient(135deg, rgba(255, 193, 7, 0.2), rgba(255, 152, 0, 0.25)) !important;
        border: 3px solid #ffc107 !important;
        border-radius: 12px !important;
        text-align: center;
        box-shadow: 0 0 20px rgba(255, 193, 7, 0.4), 0 0 40px rgba(255, 193, 7, 0.2) !important;
        position: relative;
        max-width: 350px;
        margin-left: auto;
        margin-right: auto;
    }

    .bonus-text {
        color: #ffffff !important;
        font-size: 1.1rem !important;
        font-weight: 900 !important;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
        margin: 0 !important;
        line-height: 1.4 !important;
    }

    .bonus-text strong {
        color: #ffc107 !important;
        font-size: 1.2rem !important;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
    }

    /* Services Section Mobile */
    .services {
        background: rgba(44, 24, 16, 0.95) !important;
    }

    .services h2 {
        color: #ffffff !important;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
    }

    .services h3 {
        color: #dc143c !important;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
    }

    .section-subtitle {
        color: #cccccc !important;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6) !important;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .service-card {
        padding: 1.5rem;
        background: rgba(26, 26, 26, 0.9) !important;
        backdrop-filter: blur(10px) !important;
    }

    .service-card h3 {
        font-size: 1.5rem;
        color: #ffffff !important;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
    }

    .service-card p {
        color: #cccccc !important;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6) !important;
    }

    .service-list li {
        color: #cccccc !important;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6) !important;
    }

    /* Calculator Modal Mobile */
    .modal-content {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
        max-height: calc(100vh - 2rem);
        background: rgba(26, 26, 26, 0.95) !important;
        backdrop-filter: blur(20px) !important;
    }

    .calculator-container {
        padding: 2rem 1.5rem;
    }

    .calculator-header h3 {
        font-size: 1.5rem;
        color: #ffffff !important;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
    }

    .form-row {
        flex-direction: column;
        gap: 1rem;
    }

    .form-group {
        width: 100%;
    }

    .calculator-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .calculator-btn {
        width: 100%;
        padding: 16px 20px;
        font-size: 16px;
        min-height: 55px;
    }

    /* Contact Section Mobile */
    .contact {
        background: rgba(61, 43, 31, 0.95) !important;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-info {
        order: 2;
    }

    .contact-form {
        order: 1;
        padding: 1.5rem;
    }

    .contact-card {
        padding: 1.5rem;
        background: rgba(26, 26, 26, 0.9) !important;
        backdrop-filter: blur(10px) !important;
    }

    .contact-card h3 {
        color: #dc143c !important;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
    }

    /* FAQ Mobile */
    .faq {
        background: rgba(26, 26, 26, 0.9) !important;
    }

    .faq h2 {
        color: #ffffff !important;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
    }

    .faq-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .faq-item {
        background: rgba(26, 26, 26, 0.9) !important;
        margin-bottom: 0.5rem;
    }

    .faq-question {
        padding: 1rem 1.5rem !important;
    }

    .faq-question h3 {
        color: #ffffff !important;
        font-size: 1rem !important;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
    }

    .faq-toggle {
        color: #ffc107 !important;
        font-size: 1.25rem !important;
    }

    .faq-answer {
        background: rgba(0, 0, 0, 0.3) !important;
    }

    .faq-item.active .faq-answer {
        padding: 1rem 1.5rem !important;
    }

    .faq-answer p {
        color: #cccccc !important;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6) !important;
        font-size: 16px !important;
        line-height: 1.6 !important;
    }

    .faq-image-container {
        margin: 0.75rem 0 1rem 0 !important;
        padding: 0.75rem !important;
        background: rgba(0, 0, 0, 0.2) !important;
    }

    .faq-image {
        max-width: 100% !important;
        height: auto !important;
        border-radius: 4px !important;
    }

    /* Enhanced Mobile Contact Section */
    .contact h2 {
        font-size: 1.8rem !important;
        line-height: 1.2 !important;
        text-align: center !important;
        padding: 0 1rem !important;
        margin-bottom: 0.5rem !important;
    }

    .contact h3 {
        font-size: 1rem !important;
        line-height: 1.3 !important;
        text-align: center !important;
        padding: 0 1rem !important;
        margin-bottom: 1rem !important;
        word-spacing: 2px !important;
    }

    .contact .section-subtitle {
        font-size: 16px !important;
        line-height: 1.5 !important;
        padding: 0 1rem !important;
        text-align: center !important;
    }

    /* Enhanced FAQ Mobile Touch Targets */
    .faq-question {
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        padding: 1.25rem 1.5rem !important;
        cursor: pointer !important;
    }

    .faq-toggle {
        min-width: 44px !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 1.5rem !important;
        flex-shrink: 0 !important;
    }

    .faq-question h3 {
        flex-grow: 1 !important;
        margin-right: 1rem !important;
        font-size: 1.05rem !important;
        line-height: 1.3 !important;
    }

    /* Mobile Performance Optimizations */
    .faq-item {
        will-change: auto !important;
        transform: translateZ(0) !important;
    }

    .faq-answer {
        will-change: max-height, padding !important;
    }

    /* Prevent zoom on inputs for iOS */
    input, select, textarea {
        font-size: 16px !important;
    }

    /* Enhanced readability for mobile */
    @media (max-width: 480px) {
        .faq h2 {
            font-size: 1.6rem !important;
        }
        
        .contact h2 {
            font-size: 1.6rem !important;
        }
        
        .faq-question h3 {
            font-size: 1rem !important;
        }
    }

    /* Footer Mobile */
    .footer {
        background: rgba(26, 26, 26, 0.95) !important;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-section {
        margin-bottom: 1.5rem;
    }

    .footer-contact {
        margin-top: 1rem;
    }

    /* General Mobile Typography */
    h1 { font-size: 2.25rem; color: #ffffff !important; }
    h2 { font-size: 1.875rem; color: #dc143c !important; }
    h3 { font-size: 1.5rem; color: #ffffff !important; }

    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
        color: #cccccc !important;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6) !important;
    }

    p, li {
        color: #cccccc !important;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6) !important;
        font-weight: 600 !important;
    }

    /* Touch-friendly buttons */
    button, .cta-button, .nav-links a {
        min-height: 44px;
        min-width: 44px;
    }

    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden;
    }

    /* Improve readability on small screens */
    p, li, .testimonial-card p {
        font-size: 16px;
        line-height: 1.6;
    }
}

/* Extra Small Mobile Devices */
@media screen and (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .car-text {
        font-size: 1.5rem;
        padding: 0.5rem;
    }

    .nav-links a {
        font-size: 16px;
        padding: 14px 20px;
    }

    .cta-button {
        font-size: 16px;
        padding: 14px 20px;
    }

    .service-card {
        padding: 1.25rem;
    }

    .contact-card {
        padding: 1.25rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .nav-links a:hover {
        transform: none;
    }

    .cta-button:hover {
        transform: none;
    }

    .service-card:hover {
        transform: none;
    }

    /* Ensure touch targets are adequate */
    .nav-links a,
    .cta-button,
    .service-card {
        min-height: 48px;
    }
}
