/* =========================================================
   مصنع بديا - تنسيقات الشاشات المختلفة
========================================================= */

@media (max-width: 1399px) {
    :root { --header-height: 110px; }

    .header-container { padding-inline: 38px; gap: 24px; }
    .site-logo img { width: 205px; height: 68px; }
    .main-navigation { gap: 14px; }
    .nav-link { padding-inline: 5px; font-size: 15px; }
    .nav-link.active::after { bottom: 27px; }
    .language-button { min-width: 112px; height: 52px; }

    .hero { height: clamp(500px, 40.5vw, 566px); }
    .hero-content { padding: 42px 55px 86px; }
    .hero-content-inner { max-width: 520px; }
    .hero-eyebrow { margin-bottom: 13px; font-size: 12px; }
    .hero-title { font-size: clamp(40px, 3.6vw, 51px); line-height: 1.23; }
    .hero-title-line { margin-top: 13px; margin-bottom: 15px; }
    .hero-description { font-size: 14px; line-height: 1.8; }
    .hero-actions { margin-top: 20px; }

    .button { min-height: 58px; padding-inline: 22px; font-size: 15px; }
    .button-primary { min-width: 205px; }
    .button-outline { min-width: 195px; }

    .hero-features-wrapper { padding-inline: 48px; }
    .hero-features { min-height: 150px; margin-top: -75px; border-radius: 25px; }
    .feature-item { padding: 28px 20px; gap: 15px; }
    .feature-icon { width: 54px; min-width: 54px; }
    .feature-content h2 { font-size: 16px; }
    .feature-content p { font-size: 11px; }
}

@media (max-width: 1100px) {
    :root { --header-height: 88px; }

    .header-container { padding-inline: 28px; gap: 14px; }
    .site-logo img { width: 180px; height: 58px; }
    .main-navigation { display: none; }
    .language-selector { margin-inline-start: auto; }
    .mobile-menu-button { display: block; flex-shrink: 0; }

    .mobile-navigation {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        padding: 10px 28px 20px;
        background: rgba(6,23,36,.985);
        border-top: 1px solid rgba(255,255,255,.08);
        box-shadow: 0 20px 40px rgba(0,0,0,.22);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        pointer-events: none;
        transition: opacity 180ms ease, visibility 180ms ease, transform 220ms ease;
    }

    .mobile-navigation.is-open {
        display: grid;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    .mobile-navigation a {
        padding: 14px 5px;
        color: rgba(255,255,255,.88);
        border-bottom: 1px solid rgba(255,255,255,.06);
        font-weight: 800;
    }

    /* عند Zoom In أو الشاشة الضيقة تصبح الصورة فوق النص */
    .hero {
        height: auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    .hero-image {
        order: 1;
        width: 100%;
        height: auto;
        aspect-ratio: 1601 / 850;
    }

    .hero-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .hero-content {
        order: 2;
        width: 100%;
        height: auto;
        padding: 48px 38px 120px;
        overflow: visible;
    }

    .hero-content-inner { max-width: 650px; }
    .hero-title { font-size: clamp(42px, 7vw, 60px); }
    .hero-description { max-width: 600px; font-size: 16px; }

    .hero-features-wrapper { padding-inline: 35px; }
    .hero-features { grid-template-columns: repeat(2,1fr); margin-top: -70px; }
    .feature-item { min-height: 145px; }
    .feature-item:nth-child(2)::after { display: none; }
    .feature-item:nth-child(-n + 2) { border-bottom: 1px solid rgba(7,26,42,.10); }
}

@media (max-width: 767px) {
    :root { --header-height: 76px; }

    .header-container { padding-inline: 18px; gap: 10px; }
    .site-logo img { width: 145px; height: 50px; }
    .language-button { min-width: 82px; height: 46px; padding-inline: 10px; gap: 7px; }
    .language-flag { font-size: 18px; }
    .language-code { font-size: 13px; }
    .mobile-menu-button { width: 46px; height: 46px; }

    .hero-content { padding: 45px 24px 112px; }
    .hero-content-inner { max-width: none; }
    .hero-eyebrow { margin-bottom: 14px; font-size: 11px; }
    .hero-title { font-size: clamp(36px, 10vw, 50px); line-height: 1.3; }
    .hero-description { font-size: 15px; line-height: 1.9; }

    .hero-actions {
        margin-top: 28px;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .button { width: 100%; min-width: 0; min-height: 56px; padding-inline: 16px; font-size: 14px; }

    .hero-features-wrapper { padding-inline: 18px; }
    .hero-features { margin-top: -65px; grid-template-columns: 1fr 1fr; border-radius: 24px; }
    .feature-item { min-height: 150px; padding: 24px 18px; gap: 13px; }
    .feature-icon { width: 48px; min-width: 48px; }
    .feature-content h2 { font-size: 15px; }
    .feature-content p { font-size: 10.5px; line-height: 1.7; }

    .next-section-placeholder { padding-top: 90px; }
    .next-section-placeholder h2 { font-size: 34px; }
}

@media (max-width: 520px) {
    .site-logo img { width: 125px; }
    .language-button { min-width: 72px; }
    .language-flag { display: none; }

    .hero-content { padding: 38px 20px 105px; }
    .hero-title { font-size: clamp(34px, 10.5vw, 44px); }
    .hero-description { font-size: 15px; }
    .hero-actions { grid-template-columns: 1fr; }

    .hero-features-wrapper { padding-inline: 15px; }
    .hero-features { margin-top: -55px; grid-template-columns: 1fr; border-radius: 22px; }

    .feature-item { min-height: 118px; padding: 22px 24px; justify-content: flex-start; }
    .feature-item:not(:last-child)::after {
        top: auto; right: 24px; bottom: 0; left: 24px;
        width: auto; height: 1px;
    }
    .feature-item:nth-child(2)::after { display: block; }
    .feature-item:nth-child(-n + 2) { border-bottom: 0; }
    .feature-icon { width: 50px; min-width: 50px; }
    .feature-content h2 { font-size: 16px; }
    .feature-content p { font-size: 11px; }
}

@media (max-width: 380px) {
    .header-container { padding-inline: 12px; }
    .site-logo img { width: 108px; }
    .language-button { min-width: 58px; padding-inline: 7px; }
    .hero-content { padding-inline: 17px; }
    .hero-title { font-size: 34px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
