/* ============================================================
   MOBILE-FIX.CSS — V5 (Final & Complete)
   ============================================================ */

/* ---------- 1. GLOBAL RESET ---------- */
/* فقط html و body اسکرول افقی رو کنترل میکنن */
html, body {
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
}

.container, .container-fluid {
    padding-left: 14px;
    padding-right: 14px;
    max-width: 100%;
}

/* سکشن‌ها هیچ overflow ای ندارن */
section, .section, header, footer, main {
    /* هیچ overflow-x/overflow-y نذار */
    max-width: 100%;
}

/* ============================================================
   MOBILE MENU — V6 (منوی کشویی راست، دکمه بستن داخل پنل)
   ============================================================ */
@media (max-width: 1023.98px) {

    /* هدر */
    .header {
        padding: 6px 0 !important;
        background: rgba(248, 250, 252, 0.97) !important;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(28, 169, 201, 0.06);
        z-index: 1050 !important;
    }
    .header.scrolled { padding: 4px 0 !important; }

    .header .navbar { padding: 0 !important; display: block !important; }

    /* کانتینر هدر: منو راست، لوگو چپ */
    .header .container {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
        padding: 0 18px !important;
        max-width: 100% !important;
        gap: 10px;
    }

    /* دکمه منو */
    .header .navbar-toggler {
        order: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
        border: none !important;
        padding: 8px 14px !important;
        border-radius: 10px !important;
        background: linear-gradient(135deg, #1CA9C9, #0E7A94) !important;
        color: white !important;
        font-weight: 700 !important;
        font-size: 0.78rem !important;
        box-shadow: 0 3px 10px rgba(28, 169, 201, 0.28) !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
        transition: all 0.3s ease;
    }
    .header .navbar-toggler:focus {
        box-shadow: 0 0 0 3px rgba(28, 169, 201, 0.25) !important;
        outline: none !important;
    }
    .header .navbar-toggler-icon {
        width: 15px !important;
        height: 15px !important;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='white' stroke-linecap='round' stroke-miterlimit='10' stroke-width='3' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
        background-size: 100% !important;
    }
    .header .navbar-toggler .menu-label {
        font-size: 0.78rem !important;
        font-weight: 700 !important;
        color: white !important;
    }

    /* لوگو */
    .header .navbar-brand {
        order: 1 !important;
        margin: 0 !important;
        padding: 0 !important;
        flex-shrink: 0 !important;
    }
    .brand-logo-img {
        height: 34px !important;
        max-width: 110px !important;
    }
    .header.scrolled .brand-logo-img { height: 30px !important; }

    /* ============================================================
   MOBILE MENU — V7 (پنل مستقل، خارج از هدر)
   ============================================================ */

/* ★★★ پنل منو — همیشه توی DOM هست ولی فقط موبایل نشون داده میشه ★★★ */
.mobile-menu-panel {
    position: fixed;
    top: 0;
    right: -100%;
    left: auto;
    width: 82%;
    max-width: 320px;
    height: 100vh;
    height: 100dvh;
    background: #FFFFFF;
    padding: 0;
    margin: 0;
    box-shadow: -20px 0 60px rgba(10, 37, 64, 0.25);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.4s,
                opacity 0.3s;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(28, 169, 201, 0.1);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu-panel.show {
    right: 0;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

/* ============================================================
   ★★★ پنل موبایل — در دسکتاپ کاملاً مخفی ★★★
   ============================================================ */
@media (min-width: 1024px) {
    .mobile-menu-panel {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        right: -100% !important;
    }

    .mobile-menu-overlay {
        display: none !important;
    }
}

/* هدر داخل پنل */
.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    background: linear-gradient(135deg, #1CA9C9, #0E7A94);
    color: white;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 2;
}

.mobile-menu-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
}

.mobile-menu-title i { font-size: 1.1rem; }

/* دکمه بستن (❌) */
.mobile-menu-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 0;
    transition: all 0.25s ease;
    flex-shrink: 0;
}
.mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: rotate(90deg);
}

/* لیست منو */
.mobile-menu-list {
    list-style: none;
    padding: 14px 14px 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.mobile-menu-list li {
    opacity: 0;
    transform: translateX(15px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.mobile-menu-panel.show .mobile-menu-list li {
    opacity: 1;
    transform: translateX(0);
}
.mobile-menu-panel.show .mobile-menu-list li:nth-child(1) { transition-delay: 0.10s; }
.mobile-menu-panel.show .mobile-menu-list li:nth-child(2) { transition-delay: 0.14s; }
.mobile-menu-panel.show .mobile-menu-list li:nth-child(3) { transition-delay: 0.18s; }
.mobile-menu-panel.show .mobile-menu-list li:nth-child(4) { transition-delay: 0.22s; }
.mobile-menu-panel.show .mobile-menu-list li:nth-child(5) { transition-delay: 0.26s; }
.mobile-menu-panel.show .mobile-menu-list li:nth-child(6) { transition-delay: 0.30s; }
.mobile-menu-panel.show .mobile-menu-list li:nth-child(7) { transition-delay: 0.34s; }
.mobile-menu-panel.show .mobile-menu-list li:nth-child(8) { transition-delay: 0.38s; }
.mobile-menu-panel.show .mobile-menu-list li:nth-child(9) { transition-delay: 0.42s; }

/* ============================================================
   MOBILE MENU LIST — فقط hover
   ============================================================ */
.mobile-menu-list .nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1A1A2E;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.25s ease;
    background: transparent;
}

.mobile-menu-list .nav-link::before {
    content: '←';
    color: #CBD5E0;
    font-size: 0.9rem;
    order: 2;
    transition: all 0.25s ease;
}

/* فقط hover — آبی روشن */
.mobile-menu-list .nav-link:hover {
    background: linear-gradient(90deg, #E0F6FB, #F0F9FF);
    color: #0E7A94;
    padding-right: 18px;
}

.mobile-menu-list .nav-link:hover::before {
    color: #0E7A94;
}


/* CTA داخل پنل */
.mobile-menu-cta {
    display: block;
    margin: 14px;
    padding: 12px 20px;
    text-align: center;
    font-size: 0.85rem;
    border-radius: 10px;
    background: var(--accent);
    color: white !important;
    font-weight: 700;
}

/* Overlay */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(10, 37, 64, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    z-index: 999998;
}
.mobile-menu-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ============================================================
   ★★★ ABOUT VISUAL — لیست افقی فشرده (موبایل/تبلت) ★★★
   ============================================================ */
@media (max-width: 991.98px) {

    .about-visual {
        position: relative !important;
        height: auto !important;
        min-height: auto !important;
        margin-top: 8px !important;       /* ★ از 20 به 8 */
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;              /* ★ از 6 به 8 (فاصله بین کارت‌ها یکم بیشتر) */
        padding: 0 !important;
    }

    .about-main-img {
        display: none !important;
    }

    /* ★ هر کارت → ردیف افقی با ارتفاع بیشتر ★ */
    .about-card {
        position: static !important;
        transform: none !important;
        animation: none !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;

        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 12px !important;

        width: 100% !important;
        min-width: 0 !important;
        padding: 14px 16px !important;
        border-radius: 12px !important;
        box-shadow: none !important;

        /* ★★ استفاده از متغیرها برای دارک مود ★★ */
        background: var(--about-card-bg, #F8FCFD) !important;
        border: 1px solid var(--about-card-border, rgba(28, 169, 201, 0.12)) !important;
        color: var(--text-dark) !important;

        text-align: right !important;
        transition: background-color 0.3s ease, border-color 0.3s ease !important;
    }

    /* ★ آیکون بزرگ‌تر ★ */
    .about-card i {
        font-size: 1.1rem !important;     /* ★ از 1 به 1.1 */
        margin: 0 !important;
        width: 36px !important;           /* ★ از 30 به 36 */
        height: 36px !important;          /* ★ از 30 به 36 */
        min-width: 36px !important;
        border-radius: 10px !important;   /* ★ از 8 به 10 */
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: rgba(28, 169, 201, 0.1);
        flex-shrink: 0;
    }

    /* ★ عنوان بزرگ‌تر ★ */
     /* ★ عنوان بزرگ‌تر ★ */
    .about-card h5 {
        font-size: 0.85rem !important;
        font-weight: 700 !important;
        margin: 0 !important;
        line-height: 1.2 !important;
        color: var(--text-dark) !important;      /* ★ متغیر */
        white-space: nowrap !important;
        flex-shrink: 0;
    }

    /* ★ توضیح بزرگ‌تر ★ */
    .about-card p {
        font-size: 0.72rem !important;
        line-height: 1.3 !important;
        color: var(--text-mid) !important;       /* ★ متغیر */
        margin: 0 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        flex: 1 !important;
    }

    /* جداکننده بین عنوان و توضیح */
    .about-card h5::after {
        content: '·';
        margin: 0 6px;
        color: #CBD5E0;
        font-weight: 400;
    }
}

/* ★ رنگ آیکون‌ها — با پرانتز دقیق‌تر برای غلبه بر style.css ★ */
@media (max-width: 991.98px) {
    .about-visual .about-card.floating   i { color: #1CA9C9 !important; background: rgba(28, 169, 201, 0.12) !important; }
    .about-visual .about-card.floating-2 i { color: #28A745 !important; background: rgba(40, 167, 69, 0.12) !important; }
    .about-visual .about-card.floating-3 i { color: #FF7A00 !important; background: rgba(255, 122, 0, 0.12) !important; }
    .about-visual .about-card.floating-4 i { color: #6F42C1 !important; background: rgba(111, 66, 193, 0.12) !important; }
    .about-visual .about-card.floating-5 i { color: #E83E8C !important; background: rgba(232, 62, 140, 0.12) !important; }
    .about-visual .about-card.floating-6 i { color: #FFB800 !important; background: rgba(255, 184, 0, 0.15) !important; }
}
    /* ============================================================
       3. پنل کشویی منو — روی صفحه اصلی (z-index فوق‌العاده بالا)
       ============================================================ */


    /* ★★ لایه تاریک پشت منو — عنصر مستقل ★★ */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(10, 37, 64, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    z-index: 999998;   /* یک لایه زیر پنل منو */
}
.mobile-menu-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    /* ★★ دکمه بستن داخل منو ★★ */
    
    .header .navbar-collapse .menu-close-btn:hover {
        background: #DC3545 !important;
        color: white !important;
        transform: rotate(90deg);
    }


    
    .header .navbar-collapse.show .nav-item {
        opacity: 1;
        transform: translateX(0);
    }
    .header .navbar-collapse.show .nav-item:nth-child(1) { transition-delay: 0.10s; }
    .header .navbar-collapse.show .nav-item:nth-child(2) { transition-delay: 0.14s; }
    .header .navbar-collapse.show .nav-item:nth-child(3) { transition-delay: 0.18s; }
    .header .navbar-collapse.show .nav-item:nth-child(4) { transition-delay: 0.22s; }
    .header .navbar-collapse.show .nav-item:nth-child(5) { transition-delay: 0.26s; }
    .header .navbar-collapse.show .nav-item:nth-child(6) { transition-delay: 0.30s; }
    .header .navbar-collapse.show .nav-item:nth-child(7) { transition-delay: 0.34s; }
    .header .navbar-collapse.show .nav-item:nth-child(8) { transition-delay: 0.38s; }
    .header .navbar-collapse.show .nav-item:nth-child(9) { transition-delay: 0.42s; }

    
    .header .navbar-nav .nav-link::before {
        content: '←';
        color: #CBD5E0;
        font-size: 0.9rem;
        transition: all 0.25s;
        order: 2;
    }
    .header .navbar-nav .nav-link:hover,
    .header .navbar-nav .nav-link.active {
        background: linear-gradient(90deg, #E0F6FB, #F0F9FF) !important;
        color: #0E7A94 !important;
        padding-right: 18px !important;
    }
    .header .navbar-nav .nav-link.active {
        background: linear-gradient(90deg, #1CA9C9, #0E7A94) !important;
        color: white !important;
    }
    .header .navbar-nav .nav-link.active::before {
        color: white;
    }

    
}

/* ============================================================
   4. HERO — فاصله از هدر
   ============================================================ */
@media (max-width: 1023.98px) {
    .hero { padding-top: 95px !important; }
}
@media (max-width: 767.98px) {
    .hero { padding-top: 90px !important; }
    .hero-content { padding-top: 6px; }
    .hero-content .row { min-height: auto !important; }
    .hero-badge {
        font-size: 0.68rem; padding: 5px 11px;
        margin-bottom: 12px; margin-top: 6px;
    }
    .hero-title { font-size: 1.3rem !important; line-height: 1.55; margin-bottom: 12px; }
    .hero-subtitle { font-size: 0.78rem; line-height: 1.75; margin-bottom: 16px; }
    .hero-btns { gap: 8px; flex-direction: column; }
    .hero-btns .btn {
        width: auto; justify-content: center;
        padding: 10px 16px; font-size: 0.7rem; border-radius: 10px;
        margin: 0 auto;
    }
    .hero-image-wrapper { min-height: 170px; margin-top: 12px; padding: 4px; }
    .hero-image { max-height: 170px; }

    .trust-bar { padding: 12px 0; }
    .trust-bar .row { --bs-gutter-x: 6px; --bs-gutter-y: 6px; }
    .trust-item {
        flex-direction: row !important; gap: 6px; justify-content: flex-start;
        padding: 5px 8px; background: rgba(255, 255, 255, 0.08); border-radius: 8px;
    }
    .trust-item i { font-size: 1rem; }
    .trust-item h4 { font-size: 0.88rem; line-height: 1; }
    .trust-item p { font-size: 0.6rem; line-height: 1.2; }
}

/* ============================================================
   5. ★★★ کارت‌ها دو ستونی در موبایل ★★★
   ============================================================ */
@media (max-width: 767.98px) {

    /* ★★★ همه سکشن‌های کارتی → دو ستونی ★★★ */
    .industries-section .row > [class*="col-"],
    .services-section .row > [class*="col-"],
    .projects-section .row > [class*="col-"],
    .why-section .row > [class*="col-"] {
        flex: 0 0 50% !important;
        width: 50% !important;
        max-width: 50% !important;
        padding-left: 5px !important;
        padding-right: 5px !important;
    }

    /* ===== INDUSTRIES ===== */
    .industry-card {
        padding: 12px 8px !important;
        height: 100% !important;
        border-radius: 12px !important;
    }
    .industry-icon {
        width: 36px !important; height: 36px !important;
        font-size: 0.9rem !important; margin-bottom: 6px !important;
    }
    .industry-card h4 { font-size: 0.7rem !important; margin-bottom: 3px !important; line-height: 1.3 !important; }
    .industry-card p { font-size: 0.58rem !important; line-height: 1.45 !important; }

    /* ===== SERVICES ===== */
    .service-card {
        padding: 12px 10px !important;
        border-radius: 12px !important;
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
    }
    .service-icon {
        width: 32px !important; height: 32px !important;
        font-size: 0.9rem !important; margin-bottom: 6px !important; border-radius: 9px !important;
    }
    .service-card h4 { font-size: 0.7rem !important; margin-bottom: 4px !important; line-height: 1.3 !important; }
    .service-card p {
        font-size: 0.58rem !important; line-height: 1.5 !important;
        margin-bottom: 8px !important; flex: 1 !important;
    }
    .service-link { font-size: 0.58rem !important; gap: 3px !important; }

    /* ===== PROJECTS ===== */
    .project-img { height: 95px !important; }
    .project-body { padding: 10px 10px 12px !important; }
    .project-body h5 {
        font-size: 0.66rem !important; margin-bottom: 4px !important; line-height: 1.35 !important;
        display: -webkit-box !important; -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important; overflow: hidden !important;
    }
    .project-body p { font-size: 0.56rem !important; line-height: 1.4 !important; }
    .project-tag-floating {
        top: 6px !important; right: 6px !important;
        font-size: 0.52rem !important; padding: 3px 7px !important;
    }

    /* ===== WHY US ===== */
    .why-card {
        padding: 12px 8px !important;
        height: 100% !important;
        border-radius: 12px !important;
    }
    .why-card i { font-size: 1.15rem !important; margin-bottom: 5px !important; }
    .why-card h5 { font-size: 0.68rem !important; margin-bottom: 3px !important; line-height: 1.3 !important; }
    .why-card p { font-size: 0.58rem !important; line-height: 1.45 !important; }

    /* ===== BRANDS — 3 ستون ===== */
    .brands-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px !important;
    }
    .brand-card { padding: 8px 4px 7px !important; border-radius: 10px !important; }
    .brand-logo { height: 26px !important; margin-bottom: 4px !important; }
    .brand-logo img { max-height: 22px !important; }
    .brand-name { font-size: 0.54rem !important; }

    /* ===== ABOUT ===== */
    .about-features { gap: 5px; margin-top: 10px; margin-bottom: 4px; }   /* ★ margin-bottom اضافه شد */
    .feature-item { font-size: 0.72rem; gap: 5px; }
    .feature-item i { font-size: 0.85rem; }


    /* ===== CLIENTS ===== */
    .client-item { min-width: 105px !important; padding: 10px 12px; gap: 5px; }
    .client-logo { height: 32px; }
    .client-logo img { max-height: 28px; }
    .client-name { font-size: 0.58rem; }
    .marquee-track { gap: 8px; animation-duration: 40s; }

    /* ===== FAQ ===== */
    .accordion-item { margin-bottom: 6px; border-radius: 10px !important; }
    .accordion-button { padding: 11px 13px; font-size: 0.76rem; }
    .accordion-body { padding: 11px 13px; font-size: 0.7rem; line-height: 1.7; }

    /* ===== CONTACT ===== */
    .contact-info { gap: 8px; }
    .contact-item { padding: 10px 12px; gap: 8px; border-radius: 10px; }
    .contact-icon { width: 32px; height: 32px; font-size: 0.82rem; border-radius: 8px; }
    .contact-item h6 { font-size: 0.64rem; margin-bottom: 2px; }
    .contact-item a, .contact-item p { font-size: 0.74rem; }
    .contact-form { padding: 14px 12px; border-radius: 14px; }
    .contact-form .row { --bs-gutter-x: 8px; --bs-gutter-y: 8px; }
    .form-control, .form-select { padding: 9px 12px; font-size: 0.76rem; border-radius: 9px; }
    .contact-form textarea.form-control { min-height: 75px; }
    .contact-form .btn { padding: 10px 18px; font-size: 0.78rem; }

    /* ===== FOOTER ===== */
    .footer { padding: 24px 0 12px !important; margin-top: 24px !important; }
    .footer .row { --bs-gutter-x: 10px; --bs-gutter-y: 12px; }
    .footer-brand { font-size: 1rem; margin-bottom: 5px; }
    .footer p { font-size: 0.66rem; line-height: 1.65; }
    .footer h6 {
        font-size: 0.74rem; margin-bottom: 8px; padding-bottom: 6px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    .footer ul li { margin-bottom: 4px; }
    .footer ul a { font-size: 0.66rem; }
    .social-links { margin-top: 8px; gap: 6px; }
    .social-links a { width: 28px; height: 28px; font-size: 0.78rem; }
    .footer hr { margin: 14px 0 10px !important; }
    .footer-bottom { font-size: 0.6rem; flex-direction: column; gap: 6px; }

    /* ===== TOAST ===== */
    .custom-toast {
        top: 60px; padding: 8px 12px; font-size: 0.68rem;
        max-width: calc(100% - 20px); border-radius: 9px; gap: 6px;
    }
    .custom-toast i { font-size: 0.9rem; }

    /* ===== FLOATING BUTTONS ===== */
    .floating-whatsapp { width: 38px; height: 38px; font-size: 1rem; bottom: 12px; left: 12px; }
    .back-to-top { width: 34px; height: 34px; font-size: 0.8rem; bottom: 12px; right: 12px; }

    /* ============================================================
       ★★★ دکمه‌های «مشاهده همه» — خیلی کوچیک‌تر ★★★
       ============================================================ */
    .btn-view-all-projects,
    .btn-view-all-articles {
        padding: 8px 18px !important;
        font-size: 0.7rem !important;
        gap: 5px !important;
        border-radius: 50px !important;
        box-shadow: 0 5px 15px rgba(28,169,201,0.25) !important;
    }
    .btn-view-all-projects i,
    .btn-view-all-articles i {
        font-size: 0.72rem !important;
    }
    .btn-view-all-articles {
        box-shadow: 0 5px 15px rgba(10,37,64,0.2) !important;
    }
}

/* ============================================================
   6. SECTIONS — فشرده
   ============================================================ */
@media (max-width: 767.98px) {
    .section { padding: 30px 0 !important; }
    .section-tag { font-size: 0.64rem; padding: 4px 10px; margin-bottom: 6px; }
    .section-title { font-size: 1.08rem !important; line-height: 1.45; margin-bottom: 6px; }
    .section-subtitle { font-size: 0.72rem; line-height: 1.7; }
    .section-text { font-size: 0.74rem; line-height: 1.8; margin-bottom: 8px; }
    .text-center.mb-5 { margin-bottom: 16px !important; }
}

/* ============================================================
   7. 320px — تک ستونی برای صفحه‌های خیلی کوچک
   ============================================================ */
@media (max-width: 359.98px) {
    .container { padding-left: 10px; padding-right: 10px; }
    .brand-logo-img { height: 28px !important; max-width: 90px !important; }
    .header .navbar-toggler { padding: 7px 11px !important; font-size: 0.72rem !important; gap: 4px !important; }
    .header .navbar-toggler .menu-label { font-size: 0.72rem !important; }
    .hero { padding-top: 82px !important; }
    .hero-title { font-size: 1rem !important; }
    .section-title { font-size: 0.92rem !important; }
    .section { padding: 22px 0 !important; }
    .brands-grid { grid-template-columns: repeat(2, 1fr) !important; }


    /* تک ستونی کارت‌ها */
    .industries-section .row > [class*="col-"],
    .services-section .row > [class*="col-"],
    .projects-section .row > [class*="col-"],
    .why-section .row > [class*="col-"] {
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* ============================================================
   8. BODY LOCK
   ============================================================ */
body.menu-open {
     overflow: hidden !important;

}

.header .navbar-collapse.collapse {
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

/* ============================================================
   ★★★ FIX نهایی: مخفی کردن پنل موبایل در دسکتاپ ★★★
   ============================================================ */
@media screen and (min-width: 1024px) {
    body > .mobile-menu-panel,
    body > #mainNav,
    .mobile-menu-panel,
    #mainNav {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        pointer-events: none !important;
        right: -100% !important;

    }

    body > .mobile-menu-overlay,
    .mobile-menu-overlay {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
}

/* ============================================================
   THEME TOGGLE — Mobile Position
   ============================================================ */
@media (max-width: 1023.98px) {
    .theme-toggle-mobile {
        order: 1 !important;
        margin-right: auto !important;
        margin-left: 8px !important;
        
        /* ★★ کوچیک‌تر در موبایل ★★ */
        width: 25px !important;
        height: 25px !important;
        font-size: 0.85rem !important;
        border-width: 1px !important;
    }
    
    .theme-toggle-mobile .icon-sun,
    .theme-toggle-mobile .icon-moon {
        font-size: 0.80rem !important;
    }
    
    .theme-toggle-mobile .icon-sun i,
    .theme-toggle-mobile .icon-moon i {
        font-size: 0.85rem !important;
    }
}

/* ============================================================
   ★★★ THEME TOGGLE — مخفی کردن دکمه موبایل در دسکتاپ ★★★
   ============================================================ */

/* دسکتاپ (≥ 1024px) — فقط دکمه‌ی دسکتاپ نمایش */
@media (min-width: 1024px) {
    .theme-toggle-mobile,
    #themeToggleMobile {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        pointer-events: none !important;
        position: absolute !important;
        left: -9999px !important;
    }
}

/* موبایل (< 1024px) — فقط دکمه‌ی موبایل نمایش */
@media (max-width: 1023.98px) {
    .desktop-nav .theme-toggle,
    #themeToggle {
        display: none !important;
    }
}

/* ==================== CROSS-BROWSER FIXES FOR MOBILE ==================== */

/* رفع مشکل backdrop-filter در منوی موبایل */
.mobile-menu-panel {
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}
.mobile-menu-overlay {
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

/* رفع مشکل flex-direction در سافاری */
.about-card {
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
}

/* رفع مشکل gap در سافاری قدیمی */
@supports not (gap: 1px) {
    .mobile-menu-list li + li {
        margin-top: 4px;
    }
    .about-card + .about-card {
        margin-top: 8px;
    }
}

/* رفع مشکل overflow در فایرفاکس */
.mobile-menu-panel {
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}