/* ============================================
   MOBILE RESPONSIVE FIXES
   תיקונים לבעיות overflow ו-responsive במובייל
============================================ */

/* תיקון כללי למניעת horizontal scroll */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    * {
        max-width: 100%;
    }

    /* תיקון container padding במובייל */
    .container {
        padding-inline: 1rem;
        max-width: 100%;
    }

    /* תיקון sections - הקטנת padding */
    section {
        padding-block: 3rem;
    }

    /* תיקון hero section */
    .hero {
        min-block-size: auto;
        padding-block-start: 100px;
        padding-block-end: 3rem;
    }

    .hero-headline {
        font-size: 2rem !important;
        line-height: 1.2;
    }

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

    .hero-ctas {
        flex-direction: column;
        width: 100%;
    }

    .hero-ctas .btn {
        width: 100%;
        justify-content: center;
    }

    /* תיקון code window - הסתרה במובייל */
    .code-window {
        display: none !important;
    }

    /* תיקון info cards */
    .hero-info-cards {
        display: none !important;
    }

    /* תיקון grid layouts - כל הגרידים למובייל */
    .pain-points-grid-4,
    .stats-grid,
    .stakes-grid,
    .success-stats,
    .tf-choice-grid,
    .footer-links {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    /* תיקון project cards */
    .projects-bento {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .project-featured,
    .project-card-sm {
        width: 100%;
    }

    /* תיקון process section */
    .process-grid {
        grid-template-columns: 1fr !important;
    }

    /* תיקון pricing tables */
    .pricing-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .pricing-table {
        min-width: 600px;
    }

    .pricing-table th,
    .pricing-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }

    /* תיקון tech grid */
    .tech-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    /* תיקון כפתורים */
    .btn {
        font-size: 0.9rem;
        padding: 0.75rem 1.25rem;
    }

    .btn-lg {
        font-size: 1rem;
        padding: 0.875rem 1.5rem;
    }

    /* תיקון פונטים */
    h1 {
        font-size: 2rem !important;
    }

    h2 {
        font-size: 1.5rem !important;
    }

    h3 {
        font-size: 1.125rem !important;
    }

    /* תיקון spacing */
    .section-title {
        margin-block-end: 2rem;
    }

    /* תיקון solution stats */
    .solution-stats-row {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .solution-stat {
        width: 100%;
    }

    .solution-stat-number {
        font-size: 2rem;
    }

    .solution-stat-divider {
        display: none;
    }

    /* תיקון badges */
    .hero-badge,
    .section-badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }

    /* תיקון navigation */
    .header {
        inset-inline: 0.5rem;
        inset-block-start: 0.5rem;
    }

    .header-inner {
        padding-inline: 0.75rem;
    }

    .logo svg {
        width: 70px;
        height: 24px;
    }

    /* תיקון social proof strip */
    .social-proof-strip {
        padding: 1rem 0;
    }

    .proof-content {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .proof-logos {
        flex-direction: column;
        gap: 0.5rem;
    }

    .proof-divider {
        display: none;
    }

    .trust-indicators {
        flex-direction: column;
        gap: 0.5rem;
    }

    /* תיקון pain points cards */
    .pain-point-card-v2 {
        padding: 1.25rem;
    }

    .pain-icon-wrapper {
        width: 48px;
        height: 48px;
        margin-bottom: 0.75rem;
    }

    /* תיקון FAQ */
    .faq-item {
        margin-bottom: 0.75rem;
    }

    .faq-question {
        padding: 1rem;
        font-size: 0.95rem;
    }

    .faq-answer {
        padding: 0 1rem 1rem;
        font-size: 0.9rem;
    }

    /* תיקון forms */
    .form-group {
        margin-bottom: 1rem;
    }

    input,
    textarea,
    select {
        font-size: 16px !important; /* מונע zoom באייפון */
    }

    /* תיקון modal/popup */
    .contact-popup-overlay {
        padding: 1rem;
    }

    .contact-popup {
        padding: 1.5rem;
        max-width: 100%;
        margin: auto;
    }

    /* תיקון footer */
    .footer {
        padding: 2rem 0;
    }

    .footer-links {
        gap: 2rem 1rem;
    }

    .footer-column {
        gap: 0.75rem;
    }

    /* תיקון images & videos */
    img,
    video {
        max-width: 100%;
        height: auto;
    }

    /* תיקון project videos */
    .project-featured-video-el,
    .project-video {
        width: 100%;
        height: auto;
        max-height: 300px;
        object-fit: cover;
    }

    /* הסתרת אלמנטים דקורטיביים */
    .projects-decor-1,
    .projects-decor-2,
    .hero-grid-pattern,
    .hero-scan-line,
    .hero-float {
        display: none !important;
    }

    /* תיקון WhatsApp floating button */
    .whatsapp-float {
        width: 52px !important;
        height: 52px !important;
        bottom: 16px !important;
        left: 16px !important;
    }

    .whatsapp-float svg {
        width: 26px !important;
        height: 26px !important;
    }

    /* תיקון sticky elements */
    .sticky-price-bar {
        padding: 0.75rem;
        font-size: 0.85rem;
    }

    .sticky-prices {
        display: none;
    }

    /* תיקון breadcrumbs */
    .breadcrumbs {
        padding: 0.75rem 0;
        margin-bottom: 1rem;
    }

    .breadcrumb-list {
        font-size: 0.75rem;
        flex-wrap: wrap;
    }
}

/* תיקונים ספציפיים למסכים קטנים מאוד */
@media (max-width: 400px) {
    .container {
        padding-inline: 0.75rem;
    }

    .btn {
        font-size: 0.85rem;
        padding: 0.625rem 1rem;
    }

    h1 {
        font-size: 1.75rem !important;
    }

    h2 {
        font-size: 1.35rem !important;
    }

    /* תיקון solution stats */
    .solution-stat-number {
        font-size: 1.75rem;
    }

    .solution-stat-label {
        font-size: 0.8rem;
    }

    /* כפתורים */
    .hero-ctas .btn {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }
}

/* תיקון landscape במובייל */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-block-size: auto;
        padding-block: 2rem;
    }

    .hero-headline {
        font-size: 1.75rem !important;
    }

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

    section {
        padding-block: 2rem;
    }
}

/* תיקון hover states במובייל (touch devices) */
@media (hover: none) and (pointer: coarse) {
    .btn:hover,
    .project-card-sm:hover,
    .pain-point-card-v2:hover {
        transform: none;
    }
}

/* תיקון specific לדף pricing */
@media (max-width: 768px) {
    /* Pricing hero */
    .pricing-hero {
        padding: 100px 1rem 3rem;
    }

    .hero-price-preview {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .price-preview-card {
        padding: 1rem 1.25rem;
    }

    /* Pricing sections */
    .pricing-section {
        padding: 1.5rem 1rem;
        margin-bottom: 1.5rem;
    }

    .pricing-section h2 {
        font-size: 1.35rem;
    }

    /* Pricing tabs */
    .pricing-tabs {
        flex-direction: column;
        width: 100%;
    }

    .pricing-tab {
        width: 100%;
        justify-content: center;
    }

    /* Factor grid */
    .factor-grid {
        grid-template-columns: 1fr !important;
    }

    .factor-card {
        padding: 1.25rem;
    }

    /* Payment options */
    .payment-options {
        grid-template-columns: 1fr !important;
    }

    /* Calculator examples */
    .calculator-examples {
        grid-template-columns: 1fr !important;
    }

    /* Tips grid */
    .tips-grid {
        grid-template-columns: 1fr !important;
    }

    /* Discount cards */
    .discount-cards {
        grid-template-columns: 1fr !important;
    }

    /* Included grid */
    .included-grid {
        grid-template-columns: 1fr !important;
    }

    /* Related links */
    .links-grid {
        grid-template-columns: 1fr !important;
    }
}

/* תיקון specific לדף service */
@media (max-width: 768px) {
    .service-hero {
        padding: 100px 1rem 3rem;
    }

    .service-content {
        padding: 2rem 1rem;
    }

    .service-content .container {
        padding-inline: 0;
    }

    .project-examples {
        grid-template-columns: 1fr !important;
    }

    .use-cases-grid {
        grid-template-columns: 1fr !important;
    }

    .use-cases-section {
        padding: 2rem 1rem;
    }

    .use-case-card {
        padding: 1.5rem;
    }

    .process-steps {
        margin: 1.5rem 0;
    }

    .process-step {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding-bottom: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1.125rem;
    }

    .mid-cta-section {
        padding: 2rem 1.5rem;
        margin: 2rem 0;
    }

    .mid-cta-section h2 {
        font-size: 1.5rem;
    }

    .articles-grid {
        grid-template-columns: 1fr !important;
    }

    .service-faq {
        margin: 1.5rem 0;
    }

    .ai-features {
        padding: 1.5rem;
        margin: 1.5rem 0;
    }
}

/* תיקון אחרון - וידוא שאין שום דבר שגולש */
@media (max-width: 768px) {
    .container,
    .section-title,
    .hero-centered,
    .solution-hero-content,
    .service-content .container {
        max-width: 100%;
        overflow-x: hidden;
    }

    /* וידוא שכל הטקסט נשבר נכון */
    p, h1, h2, h3, h4, h5, h6, span, a, li {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    /* מניעת overflow מתמונות */
    img, video, iframe, canvas {
        max-width: 100% !important;
        height: auto !important;
    }

    /* תיקון flexbox שגולש */
    .flex-container,
    .hero-ctas,
    .proof-logos,
    .trust-indicators {
        flex-wrap: wrap;
    }

    /* תיקון tables שגולשים */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
}
