/* =========================================
   MOBILE RESPONSIVENESS FIXES - 2026
   Comprehensive mobile optimization for landing page
   ========================================= */

/* =========================================
   CRITICAL MOBILE FIXES (768px and below)
   ========================================= */
@media (max-width: 768px) {

    /* === HEADER & NAVIGATION === */
    .header {
        padding: 0.75rem 1rem !important;
        background: rgba(26, 26, 46, 0.98) !important;
    }

    .logo-text {
        font-size: 1rem !important;
    }

    .logo-icon-wrapper {
        width: 32px !important;
        height: 32px !important;
    }

    /* Language toggle - compact on mobile */
    .lang-toggle {
        padding: 2px !important;
    }

    /* === HERO SECTION === */
    .hero-phone-demo {
        padding: calc(70px + 2rem) 0.75rem 2rem !important;
        /* Account for fixed header */
        min-height: auto !important;
        align-items: flex-start !important;
    }

    .hero-content-top {
        margin-bottom: 1.5rem !important;
        padding: 0 0.5rem !important;
    }

    .hero-badge {
        font-size: 0.75rem !important;
        padding: 0.4rem 0.75rem !important;
        margin-bottom: 1rem !important;
    }

    .hero-title {
        font-size: 1.75rem !important;
        line-height: 1.2 !important;
        margin-bottom: 1rem !important;
    }

    .hero-subtitle {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
        padding: 0 0.25rem !important;
    }

    /* === PHONE DEMO WRAPPER === */
    .phone-demo-wrapper {
        flex-direction: column !important;
        padding: 1.25rem !important;
        gap: 1.5rem !important;
        margin-bottom: 1.5rem !important;
    }

    .phone-demo-content {
        min-width: unset !important;
        width: 100% !important;
        order: 1 !important;
        /* Content first */
    }

    .phone-demo-visual {
        min-width: unset !important;
        width: 100% !important;
        order: 2 !important;
        /* Visual second */
        display: none !important;
        /* Hide phone mockup on mobile for cleaner layout */
    }

    .phone-demo-badge {
        font-size: 0.8rem !important;
        padding: 0.4rem 0.75rem !important;
    }

    .phone-demo-title {
        font-size: 1.35rem !important;
        margin-bottom: 0.75rem !important;
        line-height: 1.3 !important;
    }

    .phone-demo-subtitle {
        font-size: 0.9rem !important;
        margin-bottom: 1.25rem !important;
        line-height: 1.5 !important;
    }

    /* === CALL CTA BUTTON === */
    .phone-cta-primary {
        margin-bottom: 1rem !important;
    }

    .btn-call-hero {
        flex-direction: column !important;
        padding: 1rem !important;
        gap: 0.5rem !important;
        text-align: center !important;
        border-radius: 16px !important;
    }

    .btn-call-hero .call-icon-pulse {
        margin-bottom: 0.25rem !important;
    }

    .btn-call-hero .call-text {
        text-align: center !important;
    }

    .btn-call-hero .call-action {
        font-size: 1.1rem !important;
    }

    .btn-call-hero .call-number {
        font-size: 0.95rem !important;
    }

    .btn-call-hero .call-status {
        margin-top: 0.25rem !important;
    }

    /* === DEMO ALTERNATIVE === */
    .demo-alternative {
        flex-direction: column !important;
        gap: 0.75rem !important;
        margin: 1rem 0 !important;
    }

    .demo-divider {
        font-size: 0.85rem !important;
    }

    .btn-web-demo {
        width: 100% !important;
        justify-content: center !important;
        padding: 0.875rem 1rem !important;
    }

    /* === DEMO CAPABILITIES === */
    .demo-capabilities {
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
        justify-content: center !important;
        margin: 1rem 0 !important;
    }

    .capability-chip {
        font-size: 0.7rem !important;
        padding: 0.35rem 0.6rem !important;
        flex: 0 1 auto !important;
    }

    /* === DEMO SUGGESTIONS === */
    .demo-suggestions {
        margin-top: 1rem !important;
    }

    .suggestions-title {
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem !important;
    }

    .suggestion-chips {
        gap: 0.4rem !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
    }

    .suggestion {
        font-size: 0.75rem !important;
        padding: 0.4rem 0.7rem !important;
    }

    /* === PHONE MOCKUP === */
    .phone-mockup {
        width: 220px !important;
        height: 440px !important;
        border-radius: 35px !important;
        border: 8px solid #2a2a2a !important;
    }

    .caller-avatar {
        width: 80px !important;
        height: 80px !important;
        font-size: 2rem !important;
        margin-bottom: 1.5rem !important;
    }

    .call-interface h3 {
        font-size: 1.1rem !important;
    }

    .call-interface .call-status {
        margin-bottom: 2rem !important;
    }

    /* === HERO BOTTOM SECTION === */
    .hero-bottom-section {
        gap: 1.5rem !important;
        padding: 0 0.5rem !important;
    }

    .hero-actions {
        width: 100% !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    .hero-actions .btn {
        width: 100% !important;
        min-width: unset !important;
        justify-content: center !important;
        padding: 1rem !important;
    }

    .hero-stats {
        gap: 1.5rem !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
    }

    .stat-number {
        font-size: 1.5rem !important;
    }

    .stat-label {
        font-size: 0.75rem !important;
    }

    /* === WEB MODAL DEMO SECTION === */
    .web-modal-demo-section {
        margin-top: 1.5rem !important;
        padding: 1.25rem !important;
    }

    .web-modal-demo-section h3 {
        font-size: 1.2rem !important;
    }

    .web-modal-demo-section p {
        font-size: 0.9rem !important;
    }

    /* === ROBOT DECORATIONS - HIDE ON MOBILE === */
    .hero-robot-left,
    .hero-robot-right,
    .robot-decoration {
        display: none !important;
    }

    /* === SECTION HEADERS === */
    .section-header {
        padding: 0 0.5rem !important;
        margin-bottom: 2rem !important;
    }

    .section-badge {
        font-size: 0.75rem !important;
        padding: 0.2rem 0.75rem !important;
    }

    .section-title {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
    }

    .section-subtitle {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }

    /* === AGENT TYPES SECTION === */
    .agent-types {
        padding: 3rem 0 !important;
    }

    .agent-types-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
        padding: 0 0.5rem !important;
    }

    .agent-type-card {
        padding: 1.5rem !important;
    }

    .agent-type-card h3 {
        font-size: 1.1rem !important;
    }

    .agent-type-card p {
        font-size: 0.9rem !important;
    }

    .agent-features li {
        font-size: 0.85rem !important;
    }

    /* === VOICE PERSONAS SECTION === */
    .voices-section {
        padding: 3rem 0 !important;
    }

    .voice-personas-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        padding: 0 0.5rem !important;
    }

    .voice-persona-card {
        padding: 1.5rem !important;
    }

    .persona-avatar {
        width: 60px !important;
        height: 60px !important;
        font-size: 1.5rem !important;
        margin-bottom: 1rem !important;
    }

    .persona-info h3 {
        font-size: 1.1rem !important;
    }

    .persona-role {
        font-size: 0.85rem !important;
    }

    .persona-desc {
        font-size: 0.85rem !important;
    }

    .persona-traits {
        gap: 0.35rem !important;
    }

    .persona-traits span {
        font-size: 0.7rem !important;
        padding: 0.2rem 0.5rem !important;
    }

    /* === PRICING SECTION === */
    .pricing {
        padding: 3rem 0 !important;
    }

    .pricing-cards {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
        padding: 0 0.5rem !important;
    }

    .pricing-toggle {
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
        justify-content: center !important;
        margin-bottom: 1.5rem !important;
    }

    .pricing-card {
        padding: 1.5rem 1.25rem !important;
    }

    .pricing-card.featured {
        transform: none !important;
        margin: 0 !important;
    }

    .pricing-header h3 {
        font-size: 1.2rem !important;
    }

    .pricing-price {
        font-size: 2.25rem !important;
    }

    .pricing-features li {
        font-size: 0.85rem !important;
        padding: 0.6rem 0 !important;
    }

    /* === FEATURES SECTION === */
    .features {
        padding: 3rem 0 !important;
    }

    .features-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
        padding: 0 0.5rem !important;
    }

    .feature-card {
        padding: 1.5rem !important;
    }

    .feature-icon {
        width: 48px !important;
        height: 48px !important;
        font-size: 1.25rem !important;
    }

    .feature-card h3 {
        font-size: 1.1rem !important;
    }

    .feature-card p {
        font-size: 0.85rem !important;
    }

    /* === FOOTER === */
    .footer {
        padding: 2.5rem 0 1rem !important;
    }

    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        text-align: center !important;
    }

    .footer-col h4 {
        font-size: 1rem !important;
        margin-bottom: 0.75rem !important;
    }

    .footer-links {
        gap: 0.5rem !important;
    }

    .footer-links a {
        font-size: 0.9rem !important;
    }

    .footer-bottom {
        flex-direction: column !important;
        gap: 0.75rem !important;
        text-align: center !important;
    }

    /* === MODALS === */
    .modal-content {
        width: 95% !important;
        max-width: 100% !important;
        max-height: 90vh !important;
        margin: 5vh auto !important;
        padding: 1.25rem !important;
        border-radius: 16px !important;
    }

    .modal-header {
        padding-bottom: 1rem !important;
        margin-bottom: 1rem !important;
    }

    .modal-header h2,
    .modal-header h3 {
        font-size: 1.25rem !important;
    }

    .modal-body {
        padding: 0.5rem 0 !important;
    }

    .modal-footer {
        flex-direction: column !important;
        gap: 0.75rem !important;
        padding-top: 1rem !important;
    }

    .modal-footer .btn {
        width: 100% !important;
    }

    /* === CTA SECTION === */
    .cta-section {
        padding: 3rem 1rem !important;
    }

    .cta-section h2 {
        font-size: 1.5rem !important;
        margin-bottom: 0.75rem !important;
    }

    .cta-section p {
        font-size: 0.95rem !important;
        margin-bottom: 1.5rem !important;
    }

    .cta-buttons {
        flex-direction: column !important;
        gap: 0.75rem !important;
        width: 100% !important;
    }

    .cta-buttons .btn {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* =========================================
   SMALL PHONE FIXES (480px and below)
   ========================================= */
@media (max-width: 480px) {

    /* Even smaller fonts for tiny screens */
    .hero-title {
        font-size: 1.5rem !important;
    }

    .hero-subtitle {
        font-size: 0.875rem !important;
    }

    .phone-demo-title {
        font-size: 1.2rem !important;
    }

    .phone-demo-subtitle {
        font-size: 0.85rem !important;
    }

    .section-title {
        font-size: 1.35rem !important;
    }

    .section-subtitle {
        font-size: 0.85rem !important;
    }

    /* Hide stats on very small screens to reduce clutter */
    .hero-stats {
        display: none !important;
    }

    /* Smaller padding */
    .hero-phone-demo {
        padding: calc(65px + 1.5rem) 0.5rem 1.5rem !important;
    }

    .phone-demo-wrapper {
        padding: 1rem !important;
    }

    .container {
        padding: 0 0.75rem !important;
    }

    section {
        padding: 2rem 0 !important;
    }

    /* Buttons stack better */
    .btn {
        padding: 0.875rem 1rem !important;
        font-size: 0.9rem !important;
    }

    /* Smaller pills/chips */
    .capability-chip {
        font-size: 0.65rem !important;
        padding: 0.3rem 0.5rem !important;
    }

    .suggestion {
        font-size: 0.7rem !important;
        padding: 0.35rem 0.6rem !important;
    }

    /* Pricing card adjustments */
    .pricing-price {
        font-size: 2rem !important;
    }

    .pricing-features li {
        font-size: 0.8rem !important;
    }

    /* Agent type background - hide on tiny screens */
    .agent-types-bg-image {
        display: none !important;
    }
}

/* =========================================
   LANDSCAPE MODE FIXES
   ========================================= */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-phone-demo {
        padding: calc(60px + 1rem) 1rem 1.5rem !important;
        min-height: auto !important;
    }

    .phone-demo-visual {
        display: none !important;
    }

    .hero-stats {
        display: none !important;
    }

    .demo-capabilities {
        display: none !important;
    }
}

/* =========================================
   TOUCH DEVICE OPTIMIZATIONS
   ========================================= */
@media (hover: none) and (pointer: coarse) {

    /* Better touch targets */
    .btn,
    .nav-link,
    button:not(.lang-btn) {
        min-height: 48px !important;
        min-width: 48px !important;
    }

    /* Remove hover effects that don't work on touch */
    .pricing-card:hover,
    .agent-type-card:hover,
    .voice-persona-card:hover,
    .feature-card:hover {
        transform: none !important;
    }

    /* Add active states instead */
    .pricing-card:active,
    .agent-type-card:active,
    .voice-persona-card:active,
    .feature-card:active {
        transform: scale(0.98) !important;
    }

    /* Suggestion chips need better touch targets */
    .suggestion {
        min-height: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

/* =========================================
   SAFE AREA FIXES (Notch devices)
   ========================================= */
@supports (padding-top: env(safe-area-inset-top)) {
    @media (max-width: 768px) {
        .header {
            padding-top: max(0.75rem, env(safe-area-inset-top)) !important;
        }

        .hero-phone-demo {
            padding-left: max(0.75rem, env(safe-area-inset-left)) !important;
            padding-right: max(0.75rem, env(safe-area-inset-right)) !important;
        }

        .footer {
            padding-bottom: max(1rem, env(safe-area-inset-bottom)) !important;
        }

        .modal {
            padding-left: env(safe-area-inset-left) !important;
            padding-right: env(safe-area-inset-right) !important;
            padding-bottom: env(safe-area-inset-bottom) !important;
        }
    }
}

/* =========================================
   iOS-SPECIFIC FIXES
   ========================================= */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 768px) {

        /* Fix bounce scroll */
        html,
        body {
            overscroll-behavior: none !important;
        }

        /* Better momentum scrolling */
        .nav-menu,
        .modal-content {
            -webkit-overflow-scrolling: touch !important;
        }

        /* Fix fixed positioning issues */
        .header {
            -webkit-transform: translateZ(0) !important;
            transform: translateZ(0) !important;
        }
    }
}