/* ==========================
   ACG Header Styles (EN)
   Fonts: Inter
   Brand: #004e9e
   ========================== */

/* Font Face — Inter (Put file in /assets/fonts/Inter-Variable.woff2) */
@font-face {
    font-family: 'Inter';
    src: url('/wp-content/themes/artistun-en-child/assets/fonts/Inter-Variable.woff2') format('woff2-variations');
    font-weight: 100 900;
    font-display: swap;
}

/* General Reset */
html, body {
    font-family: 'Inter', sans-serif;
    direction: ltr;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
}

/* Ensure no margin/padding conflicts with theme */
body, html, .elementor, .jupiterx-site, .site-content, .container, .elementor-section {
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Sticky Header Inner */
.artistun-header-inner {
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
    background: #ffffff !important;
    width: 100% !important;
    border-bottom: 1px solid #e0e0e0 !important;
    transition: box-shadow 0.2s ease !important;
    margin: 0 !important;
    padding: 10px 15px !important;
    box-sizing: border-box !important;
    font-family: 'Inter', sans-serif !important;
}

.artistun-header-inner.sticky {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: 0 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06) !important;
}

.jupiterx-header.artistun-header.mega-menu-active {
    border-bottom: none !important;
}

/* Admin Bar Adjustments */
body.admin-bar .artistun-header-inner.sticky {
    top: 32px !important;
}

@media (max-width: 782px) {
    body.admin-bar .artistun-header-inner.sticky {
        top: 46px !important;
    }
}

@media (max-width: 600px) {
    body.admin-bar .artistun-header-inner.sticky {
        top: 0 !important;
    }
}

/* Topbar 1 Styles (ACG: آبی برند + متن طوسی) */
.topbar-main {
    width: 100%;
    background: #004e9e;
    color: #e5e7eb;
    font-size: 14px;
    line-height: 1.5;
    padding: 8px 0;
    position: relative !important;
    transition: transform 0.3s ease, opacity 0.3s ease !important;
}

.topbar-main.hidden {
    transform: translateY(-100%) !important;
    opacity: 0 !important;
}

.topbar-main-inner {
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
}

.topbar-main-right {
    font-weight: 500;
    text-align: left;
    margin-left: 15px;
    order: 1;
    color: #e5e7eb;
}

.topbar-main-left {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-right: 15px;
    order: 2;
}

.topbar-main-left a,
.topbar-main-left .lang-trigger {
    color: #e5e7eb;
    margin-left: 20px;
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    font-size: 13px;
}

.topbar-main-left a:last-child,
.topbar-main-left .lang-trigger:last-child {
    margin-left: 0;
}

.topbar-main-left a:hover {
    color: #ffffff;
}

.topbar-main-left a[href*="wa.me"]:hover {
    color: #25D366;
}

.topbar-main-left a span,
.lang-trigger span {
    margin-left: 10px;
    font-size: 13px;
}

.lang-trigger {
    position: relative;
    cursor: pointer;
    transition: color 0.2s ease;
}

.lang-trigger:hover {
    color: #ffffff;
}

.lang-trigger i {
    margin-left: 8px;
}

/* Topbar 2 Styles (Mobile bar) */
.topbar-secondary {
    width: 100%;
    background: #004e9e;
    color: #ffffff;
    font-size: 12px;
    padding: 6px 0;
    position: relative !important;
    transition: transform 0.3s ease, opacity 0.3s ease !important;
}

.topbar-secondary.hidden {
    transform: translateY(-100%) !important;
    opacity: 0 !important;
}

@media (min-width: 769px) {
    .topbar-secondary {
        display: none !important;
    }
}

.topbar-secondary-inner {
    width: 100%;
    margin: 0 auto;
    padding: 6px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar-secondary-left {
    display: flex;
    align-items: center;
    order: 1;
}

.topbar-secondary-right {
    display: flex;
    align-items: center;
    gap: 15px;
    order: 2;
}

.topbar-secondary a,
.topbar-secondary .lang-trigger {
    color: #ffffff;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.topbar-secondary a:hover {
    color: #e5e7eb;
}

.topbar-secondary a[href*="wa.me"]:hover {
    color: #25D366;
}

.topbar-secondary .lang-trigger {
    cursor: pointer;
}

.topbar-secondary i {
    margin-right: 8px;
    font-size: 14px;
}

/* Language Popup Styles */
.lang-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: none;
    z-index: 99999;
    animation: fadeIn 0.3s ease-in-out;
}

.lang-popup.open {
    display: flex;
    justify-content: center;
    align-items: center;
}

.lang-popup-inner {
    background: url('/wp-content/themes/artistun-en-child/assets/img/worldmap-bg.png') no-repeat center center;
    background-size: cover;
    background-color: rgba(255, 255, 255, 0.9);
    width: 95%;
    max-width: 400px;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    color: #1a1a1a;
    position: relative;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.15);
}

.lang-popup-inner h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #004e9e;
}

.lang-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 20px;
    cursor: pointer;
    color: #4b5563;
    transition: color 0.2s ease;
}

.lang-close:hover {
    color: #004e9e;
}

.lang-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
}

.lang-grid a {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    text-decoration: none;
    color: #111111;
    background: rgba(255, 255, 255, 0.9);
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.lang-grid a:hover {
    background: rgba(0, 78, 158, 0.08);
    border-color: #004e9e;
}

.lang-grid img {
    width: 28px;
    height: 20px;
    margin-right: 10px;
    object-fit: cover;
}

/* Header Styles */
.artistun-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-left: 0;
    order: 1;
}

.header-logo img {
    max-width: 120px;
    height: auto;
}

.header-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    order: 2;
}

.header-nav a {
    margin: 0 15px;
    text-decoration: none;
    color: #111111;
    font-size: 15px;
    font-weight: 400;
    position: relative;
    transition: font-weight 0.2s ease, color 0.2s ease;
}

/* خط زیر منو — ضخیم‌تر */
.header-nav a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 4px;
    background: #004e9e;
    transition: width 0.2s ease-in-out;
}

.header-nav a:hover {
    color: #004e9e;
}

.header-nav a:hover::after {
    width: 100%;
}

.header-nav a.active:not(.menu-item a)::after {
    width: 0;
}

.menu-item {
    position: relative;
    display: flex;
    align-items: center;
    margin: 0 15px;
    cursor: pointer;
}

.menu-item.active a {
    font-weight: 500;
    color: #004e9e;
}

.menu-item.active a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 4px;
    background: #004e9e;
}

.mega-menu-toggle {
    font-size: 12px;
    color: #4b5563;
    cursor: pointer;
    margin-left: 8px;
    transition: color 0.2s ease;
    position: relative;
}

.mega-menu-toggle::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 4px;
    background: #004e9e;
    transition: width 0.2s ease-in-out;
}

.mega-menu-toggle:hover::after {
    width: 100%;
}

.mega-menu-toggle:hover {
    color: #004e9e;
}

.menu-item.active .mega-menu-toggle {
    color: #004e9e;
}

.header-left {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-right: 0;
    order: 3;
}

.hamburger-section-toggle {
    color: #111111;
    font-size: 20px;
    cursor: pointer;
    margin-right: 0;
    margin-left: 15px;
    transition: color 0.2s ease;
}

.hamburger-section-toggle:hover {
    color: #004e9e;
}

.shop-icon {
    color: #111111;
    font-size: 18px;
    text-decoration: none;
    margin-right: 0;
    margin-left: 15px;
    transition: color 0.2s ease;
}

.shop-icon:hover {
    color: #004e9e;
}

.search-container {
    position: relative;
}

.search-icon {
    font-size: 20px;
    color: #111111;
    cursor: pointer;
    margin-right: 0;
    transition: color 0.2s ease, transform 0.3s ease;
}

.search-icon:hover {
    color: #004e9e;
}

.search-icon.active {
    transform: rotate(90deg);
}

/* Search Fullwidth Styles */
.search-fullwidth {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 2px 6px rgba(15,23,42,0.06);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transform: translateY(0);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.search-fullwidth.open {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-fullwidth-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-fullwidth form {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 900px;
    box-shadow: 0 2px 8px rgba(15,23,42,0.08);
}

.search-fullwidth input {
    flex: 1;
    padding: 16px 52px 16px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 18px;
    font-weight: normal;
    font-family: 'Inter', sans-serif;
    background: #ffffff url('/wp-content/themes/artistun-en-child/assets/img/search-icon.png') no-repeat calc(100% - 18px) center;
    background-size: 22px;
    color: #111111;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-fullwidth input:focus {
    border-color: #004e9e;
    box-shadow: 0 0 10px rgba(0, 78, 158, 0.25);
}

.search-fullwidth button {
    display: none;
}

/* Mega Menu Styles (General) */
.mega-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15,23,42,0.06);
    z-index: 10000;
    border-top: none !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    min-height: 360px;
    max-height: 80vh;
    overflow-y: auto;
}

.mega-menu.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

.mega-menu .mega-menu-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Mega Menu for Products */
.megamenu-products {
    display: flex;
    padding: 24px 32px;
    gap: 24px;
    min-height: 360px;
    max-height: 80vh;
    overflow-y: auto;
}

.mega-column {
    flex: 1;
    padding: 0;
    text-align: left;
    position: relative;
}

.mega-categories {
    width: 300px;
    margin-right: auto;
}

.category-box {
    padding: 12px 14px;
    margin-bottom: 10px;
    cursor: pointer;
    background: #ffffff;
    color: #111111;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    text-align: left;
    transition: all 0.15s ease;
    font-size: 15px;
    line-height: 1.5;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(15,23,42,0.04);
}

.category-box.active,
.category-box:hover {
    background: #004e9e;
    color: #ffffff;
    border-color: #004e9e;
}

.category-box::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 4px;
    background: #ffffff;
    transition: width 0.2s ease-in-out;
}

.category-box.active::after,
.category-box:hover::after {
    width: 100%;
}

.category-box.active::before,
.category-box:hover::before {
    content: '\f054';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.9);
    font-size: 12px;
    z-index: 1;
}

.mega-subcategories {
    background: #ffffff;
    padding: 14px;
    border-radius: 8px;
    position: relative;
    z-index: 2;
    margin-left: 0;
    box-shadow: 0 2px 6px rgba(15,23,42,0.06);
    min-height: 100%;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
}

.mega-subcategories a {
    display: block;
    padding: 8px 0;
    color: #111111;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 6px;
    position: relative;
    border-bottom: 1px solid #e5e7eb;
}

.mega-subcategories a:last-child {
    border-bottom: none;
}

.mega-subcategories a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 3px;
    background: #004e9e;
    transition: width 0.2s ease-in-out;
}

.mega-subcategories a:hover::after {
    width: 100%;
}

.mega-subcategories a:hover {
    background: #f4f5f7;
    color: #004e9e;
}

.subcategory-group {
    display: none;
}

.subcategory-group.active {
    display: block;
}

.category-subcategory-bridge {
    position: absolute;
    top: 0;
    right: 0;
    width: 30px;
    height: 100%;
    background: transparent;
    z-index: 1;
}

.mega-contact {
    background: #ffffff;
    border-radius: 8px;
    padding: 16px;
    text-align: left;
    border: 1px solid #e5e7eb;
    margin-left: 24px;
    box-shadow: 0 2px 6px rgba(15,23,42,0.06);
    flex: 0 0 260px;
    font-size: 14px;
}

.mega-contact .title {
    font-weight: 600;
    margin-bottom: 6px;
    color: #004e9e;
    font-size: 15px;
}

.mega-contact .desc {
    font-size: 13px;
    color: #4b5563;
    margin-bottom: 10px;
}

.mega-contact .cta {
    display: inline-block;
    margin-top: 8px;
    padding: 8px 16px;
    background: #004e9e;
    color: #ffffff;
    border-radius: 999px;
    text-decoration: none;
    font-size: 13px;
    position: relative;
}

.mega-contact .cta::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #ffffff;
    transition: width 0.2s ease-in-out;
}

.mega-contact .cta:hover::after {
    width: 100%;
}

.mega-contact i {
    margin-right: 8px;
}

/* Mega Menu for About Us and Services */
.mega-menu-about-us, .mega-menu-services {
    padding: 20px 15px;
    background: #ffffff;
    min-height: 320px;
    max-height: 80vh;
    overflow-y: auto;
}

.mega-menu-about-us .mega-menu-inner, .mega-menu-services .mega-menu-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}

.mega-menu-content {
    display: flex;
    justify-content: space-between;
    padding: 24px 32px;
    gap: 20px;
    font-family: 'Inter', sans-serif;
    direction: ltr;
    position: relative;
    min-height: 100%;
}

.mega-menu-subitems {
    flex: 1;
    padding: 14px;
    text-align: left;
    background: #ffffff;
    border-radius: 8px;
    position: relative;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(15,23,42,0.06);
    overflow-y: auto;
    border: 1px solid #e5e7eb;
}

.mega-menu-subitems h4 {
    font-size: 16px;
    font-weight: 600;
    color: #004e9e;
    margin-bottom: 12px;
    background: #f9fafb;
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    text-align: left;
    transition: all 0.15s ease;
}

.mega-menu-subitems h4:hover {
    background: #004e9e;
    color: #ffffff;
    border-color: #004e9e;
}

.mega-menu-subitems ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu-subitems li {
    margin-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.mega-menu-subitems li:last-child {
    border-bottom: none;
}

.mega-menu-subitems a {
    display: block;
    padding: 8px 0;
    color: #111111;
    text-decoration: none;
    font-size: 14px;
    position: relative;
}

.mega-menu-subitems a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 3px;
    background: #004e9e;
    transition: width 0.2s ease-in-out;
}

.mega-menu-subitems a:hover::after {
    width: 100%;
}

.mega-menu-subitems a:hover {
    background: #f4f5f7;
    color: #004e9e;
}

.mega-menu-info {
    flex: 1;
    padding: 18px;
    text-align: left;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 6px rgba(15,23,42,0.06);
    margin-left: auto;
    font-size: 14px;
}

.mega-menu-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #004e9e;
    margin-bottom: 10px;
    background: #f9fafb;
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

.mega-menu-info img {
    max-width: 120px;
    height: auto;
    margin-bottom: 12px;
    display: block;
    margin-right: auto;
    margin-left: auto;
}

.mega-menu-info p {
    font-size: 14px;
    color: #4b5563;
    margin-bottom: 10px;
}

.mega-menu-info p i {
    margin-right: 8px;
    font-size: 14px;
}

.mega-menu-info .cta {
    display: inline-block;
    margin-top: 8px;
    margin-right: 8px;
    padding: 8px 16px;
    background: #004e9e;
    color: #ffffff;
    border-radius: 999px;
    text-decoration: none;
    font-size: 13px;
    position: relative;
}

.mega-menu-info .cta::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #ffffff;
    transition: width 0.2s ease-in-out;
}

.mega-menu-info .cta:hover::after {
    width: 100%;
}

.mega-menu-info .cta.whatsapp {
    background: #25D366;
}

.mega-menu-info i {
    margin-right: 8px;
}

/* Secondary Hamburger Menu */
.artistun-hamburger-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: #f4f5f7;
    box-shadow: 0 8px 24px rgba(15,23,42,0.06);
    z-index: 9998;
    direction: ltr;
    font-family: 'Inter', sans-serif;
    border-top: 1px solid #e5e7eb;
}

.artistun-hamburger-menu.active {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.hamburger-menu-inner {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 30px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.hamburger-section {
    flex: 1 1 30%;
    min-width: 260px;
    padding: 14px;
    border: 1px solid #e5e7eb;
    text-align: left;
    background: #ffffff;
    border-radius: 8px;
}

.hamburger-section-title {
    background: #004e9e;
    width: 100%;
    padding: 8px 10px;
    margin-bottom: 12px;
    border-radius: 6px;
}

.hamburger-section h3 {
    color: #ffffff;
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    text-align: left;
}

.hamburger-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hamburger-section li {
    margin-bottom: 10px;
}

.hamburger-section a {
    color: #111111;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    display: block;
    text-align: left;
    line-height: 1.8;
    position: relative;
}

/* خط زیر لینک‌های منوی همبرگری */
.hamburger-section a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 3px;
    background: #004e9e;
    transition: width 0.2s ease-in-out;
}

.hamburger-section a:hover::after {
    width: 100%;
}

.hamburger-section a:hover {
    font-weight: 500;
}

/* Mobile-Specific Styles */
@media (max-width: 768px) {
    .artistun-header-inner {
        position: sticky !important;
        top: 0 !important;
        z-index: 9999 !important;
    }

    .artistun-header-inner.sticky {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        left: 0 !important;
        z-index: 10000 !important;
    }

    .topbar-main {
        position: relative !important;
    }

    .topbar-main-inner {
        justify-content: center;
    }

    .topbar-main-right {
        text-align: center;
        margin-left: 0;
        width: 100%;
    }

    .topbar-main-left {
        display: none;
    }

    .topbar-secondary {
        display: block;
        position: relative !important;
    }

    .topbar-secondary-inner {
        justify-content: space-between;
    }

    .header-nav {
        display: none !important;
    }

    .artistun-hamburger-menu {
        display: none !important;
    }

    .artistun-header-inner {
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center;
    }

    .header-right {
        order: 1;
        margin-left: 0;
    }

    .header-logo img {
        max-width: 100px;
        height: auto;
    }

    .header-left {
        order: 2;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 10px;
        margin-right: 0;
    }

    .hamburger-section-toggle {
        font-size: 24px;
        margin-right: 0;
        margin-left: 10px;
    }

    .shop-icon {
        font-size: 20px;
        margin-right: 0;
        margin-left: 10px;
    }

    .search-icon {
        font-size: 20px;
        margin-right: 0;
    }

    .search-fullwidth {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
    }

    .search-fullwidth-container {
        padding: 10px;
    }

    .search-fullwidth form {
        max-width: none;
        width: calc(100% - 20px);
        margin: 0 10px;
        box-shadow: 0 2px 8px rgba(15,23,42,0.12);
    }

    .search-fullwidth input {
        padding: 14px 50px 14px 14px;
        font-size: 16px;
        background: #ffffff url('/wp-content/themes/artistun-en-child/assets/img/search-icon.png') no-repeat calc(100% - 15px) center;
        background-size: 20px;
        color: #111111;
        border-radius: 10px;
    }

    .search-fullwidth button {
        display: none;
    }

    .lang-popup-inner {
        width: 98%;
        max-width: 300px;
        padding: 20px;
    }

    .lang-popup-inner h2 {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .lang-grid {
        gap: 8px;
    }

    .lang-grid a {
        padding: 10px;
        font-size: 14px;
    }

    .lang-grid img {
        width: 24px;
        height: 18px;
        margin-right: 8px;
    }
}

@media (min-width:769px) {
    #mobileFlyout, #mobileOverlay {
        display: none !important;
    }
}

/* === Mobile Flyout (from left) === */
.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, visibility .25s;
    z-index: 9998;
}

.mobile-overlay.open {
    opacity: 1;
    visibility: visible;
}

.mobile-flyout {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 90vw;
    max-width: 420px;
    background: #ffffff;
    color: #111111;
    z-index: 10000;
    transform: translateX(-100%);
    transition: transform .3s ease;
    display: flex;
    flex-direction: column;
    outline: none;
    touch-action: pan-y;
    overflow-y: auto;
    box-shadow: 8px 0 24px rgba(15,23,42,0.18);
}

.mobile-flyout.open {
    transform: translateX(0);
}

/* head (light bar) */
.flyout-head {
    background: #f4f5f7;
    color: #004e9e;
    border-bottom: 1px solid #e5e7eb;
    padding: 18px 16px 12px;
    position: relative;
}

.flyout-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: 0;
    color: #4b5563;
    font-size: 22px;
    cursor: pointer;
}

.flyout-head-inner {
    text-align: center;
}

.flyout-logo {
    max-width: 120px;
    height: auto;
    display: inline-block;
}

.flyout-subtitle {
    font-size: 13px;
    margin-top: 6px;
    color: #4b5563;
}

/* menu list */
.flyout-nav {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.flyout-menu {
    list-style: none;
    margin: 0;
    padding: 10px 0;
}

.flyout-item {
    border-bottom: 1px solid #e5e7eb;
}

.flyout-item > a,
.toggle-sub {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    font-size: 15px;
    color: #111111;
    text-decoration: none;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.toggle-sub i {
    font-size: 16px;
    transition: transform .2s ease;
    color: #6b7280;
}

.toggle-sub[aria-expanded="true"] i {
    transform: rotate(90deg);
    color: #004e9e;
}

/* level-1 submenu */
.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
}

.submenu.open {
    max-height: 1200px;
    overflow-y: auto;
}

.submenu > li > a {
    display: block;
    color: #374151;
    text-decoration: none;
    padding: 10px 24px;
    border-top: 1px solid #e5e7eb;
    font-size: 14px;
}

/* level-2 (sub-submenu) */
.sub-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
}

.sub-submenu.open {
    max-height: 1000px;
    overflow-y: auto;
}

.sub-submenu > li > a {
    display: block;
    color: #4b5563;
    text-decoration: none;
    padding: 9px 32px;
    border-top: 1px solid #e5e7eb;
    font-size: 13.5px;
}

.flyout-item > a:hover,
.submenu a:hover,
.sub-submenu a:hover {
    background: #f4f5f7;
}

/* footer */
.flyout-footer {
    padding: 12px 16px;
    border-top: 1px solid #e5e7eb;
    background: #ffffff;
}

.flyout-social {
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: center;
}

.flyout-social a {
    color: #4b5563;
    font-size: 18px;
    text-decoration: none;
    opacity: .9;
}

.flyout-social a:hover {
    opacity: 1;
    color: #004e9e;
}

/* body lock when open */
.body-lock {
    overflow: hidden;
}

/* اسکرول عمودی برای منوی موبایل */
@media (max-width: 768px) {
    .mobile-flyout {
        overflow-y: auto;
        max-height: 100vh;
    }

    .flyout-nav {
        max-height: calc(100vh - 220px);
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .submenu.open, .sub-submenu.open {
        max-height: none !important;
        overflow-y: visible;
    }

    .flyout-nav::-webkit-scrollbar,
    .submenu::-webkit-scrollbar,
    .sub-submenu::-webkit-scrollbar {
        width: 6px;
    }

    .flyout-nav::-webkit-scrollbar-thumb,
    .submenu::-webkit-scrollbar-thumb,
    .sub-submenu::-webkit-scrollbar-thumb {
        background: rgba(148,163,184,.6);
        border-radius: 4px;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
