/* =====================================================
   header.css  |  لوبریاد  |  v3.0
   ===================================================== */

.site-header {
    top: 0;
    z-index: 1000;
    background: var(--color-white);
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

/* ── نوار بالایی ─────────────────────────────────── */

.top-menubar {
    background-color: var(--color-primary, #1a3a8f) !important;
    color: #fff !important;
    font-size: 0.75rem;
    font-family: var(--ff-body);
    padding: 0.35rem 0;
}
.top-info { text-align: right; }
.top-info span { color: #fff !important; margin-right: 1rem; font-size: 0.75rem; }
.top-info i { margin-right: 0.25rem; font-size: 0.7rem; color: #fff !important; }
 
.header-socials { display: flex; gap: 0.5rem; justify-content: flex-start; align-items: center; }
.header-socials a {
    display: flex; align-items: center; justify-content: center;
    width: 1.75rem; height: 1.75rem; border-radius: 50%;
    background: rgba(255,255,255,0.12); transition: background 0.2s;
}
.header-socials a:hover { background: rgba(255,255,255,0.25); }
.header-socials img { width: 0.875rem; height: 0.875rem; filter: brightness(0) invert(1); display: block; }
 
/* ── ناوبری اصلی ─────────────────────────────────── */
.navbar-main { padding: 0.625rem 0; background: var(--color-white); }
.navbar-brand img { height: 3.125rem; display: block; }
 
/* ── لینک‌های دسکتاپ ────────────────────────────── */
.nav-links-desktop {
    list-style: none;
    display: flex;
    margin: 0 3.75rem 0 0;
    gap: 2rem;
    padding: 0;
    align-items: center;
}
.nav-links-desktop > li { position: relative; }
 
.nav-links-desktop > li > a {
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: var(--ff-body);
    transition: color 0.2s;
    position: relative;
    padding-bottom: 0.125rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}
.nav-links-desktop > li > a::after {
    content: "";
    position: absolute;
    bottom: -2px; right: 0;
    width: 0; height: 2px;
    background: var(--color-primary);
    transition: width 0.2s;
    border-radius: 2px;
}
.nav-links-desktop > li > a:hover,
.has-dropdown:hover > a { color: var(--color-primary); }
.nav-links-desktop > li > a:hover::after,
.has-dropdown:hover > a::after { width: 100%; }
 
.dropdown-arrow { font-size: 0.65rem; transition: transform 0.25s; margin-right: 0.15rem; }
.has-dropdown:hover .dropdown-arrow { transform: rotate(180deg); }
 
/* =====================================================
   مگا منو
   ===================================================== */
.mega-dropdown {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    min-width: 36rem;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 16px 48px rgba(0,0,0,0.13), 0 2px 8px rgba(0,0,0,0.06);
    opacity: 0;
    visibility: hidden;
    transform: translateY(0.6rem);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
    z-index: 2000;
    border-top: 3px solid var(--color-primary);
}
/* پل hover */
.has-dropdown::after {
    content: ""; position: absolute;
    top: 100%; left: 0; right: 0; height: 0.75rem;
}
.has-dropdown:hover .mega-dropdown {
    opacity: 1; visibility: visible; transform: translateY(0);
}
 
.mega-inner {
    grid-template-columns: 1fr 1fr auto !important;
    display: grid !important;
    gap: 1.5rem;
    padding: 1.5rem;
}
 
/* ── ستون‌های لیست ────────────────────────────────── */
.mega-col {
    padding: 1.5rem 1.5rem 1.5rem 1.5rem;
    border-left: none;
}
.mega-col:first-child { padding-right: 1.5rem; }
 
.mega-col-title {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--color-primary);
    margin-bottom: 0.875rem;
    padding-bottom: 0.625rem;
    border-bottom: 1px dashed #e0e5f0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-transform: uppercase;
}
 
.mega-list { list-style: none; padding: 0; margin: 0; }
.mega-list li + li { margin-top: 0.1rem; }
 
.mega-list li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.625rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--color-text);
    transition: background 0.18s, color 0.18s, padding-right 0.18s;
    white-space: nowrap;
}

.mega-list li a:hover {
    background: #f0f4ff;
    color: var(--color-primary);
    padding-right: 0.875rem;
}
 
.mega-icon {
    width: 2rem; height: 2rem;
    border-radius: 0.5rem;
    background: #eef1fb;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 0.8rem;
    color: var(--color-primary);
    transition: background 0.18s, color 0.18s;
}
.mega-list li a:hover .mega-icon { background: var(--color-primary); color: #fff; }
 
.mega-text { display: flex; flex-direction: column; gap: 0.08rem; min-width: 0; flex:1;}
.mega-text strong { font-size: 0.85rem; font-weight: 600; display: block; white-space: nowrap; }
.mega-text small {
    font-size: 0.72rem; color: #999; display: block;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
 
/* =====================================================
   ستون CTA — بازطراحی
   ===================================================== */
.mega-cta {
    background: linear-gradient(160deg, #0d2657 0%, var(--color-primary) 60%, #1e4da1 100%);
    padding: 1.625rem 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    border-radius: 0 1rem 1rem 0;
    position: relative;
    overflow: hidden;
}
/* دکوراسیون پس‌زمینه */
.mega-cta::before {
    content: "";
    position: absolute;
    top: -2rem; left: -2rem;
    width: 8rem; height: 8rem;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    pointer-events: none;
}
.mega-cta::after {
    content: "";
    position: absolute;
    bottom: -1.5rem; right: -1.5rem;
    width: 6rem; height: 6rem;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    pointer-events: none;
}
 
/* بج "مشاوره رایگان" */
.mega-cta-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.2rem 0.625rem;
    border-radius: 2rem;
    letter-spacing: 0.04em;
    backdrop-filter: blur(4px);
    margin-bottom: 0.25rem;
    position: relative;
    z-index: 1;
}
 
.mega-cta-icon {
    font-size: 2.25rem;
    color: rgba(255,255,255,0.9);
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.2));
}
 
.mega-cta h4 {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}
.mega-cta p {
    color: rgba(255,255,255,0.72);
    font-size: 0.73rem;
    line-height: 1.6;
    margin: 0;
    position: relative;
    z-index: 1;
}
 
/* آمار کوچک */
.mega-cta-stats {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 0.625rem;
    padding: 0.5rem 0.75rem;
    width: 100%;
    justify-content: center;
    position: relative;
    z-index: 1;
    margin: 0.25rem 0;
}
.cta-stat { display: flex; flex-direction: column; align-items: center; gap: 0.1rem; }
.cta-stat-num { color: #fff; font-size: 1rem; font-weight: 800; line-height: 1; }
.cta-stat-lbl { color: rgba(255,255,255,0.6); font-size: 0.65rem; }
.cta-stat-divider { width: 1px; height: 1.75rem; background: rgba(255,255,255,0.2); }
 
/* دکمه اصلی */
.mega-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #fff;
    color: var(--color-primary);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.55rem 1rem;
    border-radius: 2rem;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
    width: 100%;
    justify-content: center;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.mega-cta-btn:hover {
    background: var(--color-accent, #f59e0b);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}
 
/* لینک "همه خدمات" */
.mega-cta-link {
    color: rgba(255,255,255,0.6);
    font-size: 0.73rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: color 0.18s;
    position: relative;
    z-index: 1;
}
.mega-cta-link:hover { color: #fff; }
.mega-cta-link i { font-size: 0.6rem; }
 /* ====================================================
   MEGA MENU — ستون CTA
   این CSS رو به انتهای header.css اضافه کن
   ==================================================== */

/* ستون سوم CTA */
.mega-col--cta {
    background: linear-gradient(135deg, var(--clr-primary, #0C127A) 0%, #1A2AFF 100%);
    border-radius: var(--radius-md, 0.5rem);
    padding: 1.5rem !important;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 14rem;
}

.mega-cta {
    text-align: center;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.mega-cta__icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.25rem;
}
.mega-cta__icon i {
    font-size: 1.5rem;
    color: #fff;
}

.mega-cta h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.mega-cta p {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.85);
    line-height: 1.6;
    margin: 0;
    text-align: center;
}

.mega-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    color: #0C127A;
    padding: 0.5rem 1.25rem;
    border-radius: 0.375rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
}
.mega-cta__btn:hover {
    background: #ED1C24;
    color: #fff;
}

.mega-cta__link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: rgba(255,255,255,0.8);
    font-size: 0.75rem;
    text-decoration: none;
    transition: color 0.2s ease;
}
.mega-cta__link:hover {
    color: #fff;
}
.mega-cta__link i {
    font-size: 0.625rem;
}

/* تنظیم عرض mega-inner برای ۳ ستون */
.mega-inner {
    grid-template-columns: 1fr 1fr auto !important;
}
/* =====================================================
   همبرگر
   ===================================================== */
.mobile-toggler {
    background: none; border: none;
    font-size: 1.375rem; color: var(--color-primary);
    cursor: pointer; padding: 0.25rem 0.5rem;
    line-height: 1; transition: color 0.2s;
}
.mobile-toggler:hover { color: var(--color-accent); }
 
/* =====================================================
   پوشش + کشوی موبایل
   ===================================================== */
.mobile-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.45); z-index: 1100;
    backdrop-filter: blur(2px);
}
.mobile-overlay.active { display: block; }
 
.mobile-drawer {
    position: fixed; top: 0; right: -17.5rem;
    width: 17.5rem; height: 100%;
    background: #ffffff !important;
    z-index: 1200;
    transition: right 0.3s ease;
    padding: 1.25rem;
    box-shadow: -4px 0 20px rgba(0,0,0,0.18);
    overflow-y: auto;
}
.mobile-drawer.open { right: 0; }
 
.drawer-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid #e8e8e8;
    padding-bottom: 1rem;
}
.drawer-header img { height: 2.5rem; width: auto; }
.close-drawer {
    background: none; border: none;
    font-size: 1.75rem; cursor: pointer;
    color: #333; line-height: 1; padding: 0;
    transition: color 0.2s;
}
.close-drawer:hover { color: #e53e3e; }
 
/* لینک‌های کشو */

.drawer-nav { list-style: none; padding: 0; margin: 0; }
.drawer-nav > li { border-bottom: 1px solid #ebebeb; }
.drawer-nav > li:last-child { border-bottom: none; }
 
.drawer-nav > li > a,
.drawer-sub-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-start;   /* همه محتوا از راست */
    flex-direction: row; /* آیکون سمت راست، متن بعد از آن */
    gap: 0.5rem;
    padding: 0.875rem 0.5rem;
    color: #222; text-decoration: none;
    font-size: 0.9375rem; font-weight: 600;
    font-family: var(--ff-body);
    transition: color 0.2s, background 0.2s, padding 0.2s;
    border-radius: 0.25rem;
    width: 100%; background: none; border: none;
    cursor: pointer; text-align: right;
}
/* فلش accordion را به سمت چپ بفرست */
.drawer-sub-toggle { justify-content: space-between; flex-direction: row; }
.drawer-sub-toggle > span {
   display: flex;
    align-items: center;
    gap: 0.5rem;

}
.drawer-nav > li > a i,
.drawer-sub-toggle > span > i {
    color: var(--clr-primary, #1a3a8f); font-size: 1rem;
    width: 1.25rem; text-align: center;
    flex-shrink: 0;
}
.drawer-nav > li > a:hover,
.drawer-sub-toggle:hover {
    color: var(--clr-primary, #1a3a8f);
    background: #f0f4ff;
}
 
.drawer-chevron { font-size: 0.7rem; color: #aaa; transition: transform 0.25s; }
.drawer-has-sub.sub-open .drawer-chevron { transform: rotate(180deg); }
 
/* زیرمنوی accordion */
.drawer-sub {
    list-style: none; padding: 0;
    margin: 0 0.25rem 0.25rem;
    max-height: 0; overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f8f9ff; border-radius: 0.5rem;
}
.drawer-sub li a {
    display: flex; align-items: center; gap: 0.625rem;
    padding: 0.625rem 1rem;
    color: var(--color-text); text-decoration: none;
    font-size: 0.875rem; font-weight: 500;
    transition: color 0.18s, background 0.18s, padding 0.18s;
    border-radius: 0.375rem;
}
.drawer-sub li a i { color: var(--color-primary); font-size: 0.85rem; width: 1rem; text-align: center; }
.drawer-sub li a:hover { color: var(--color-primary); background: #e8edff; padding-right: 1.25rem; }
.drawer-sub-all a {
    color: var(--color-primary) !important;
    font-weight: 700 !important;
    border-top: 1px dashed #d0d8f0;
    margin-top: 0.25rem;
}
 
body.menu-open { overflow: hidden; }
 
/* =====================================================
   ریسپانسیو
   ===================================================== */
@media (max-width: 1280px) {
    .mega-dropdown { min-width: 52rem; right: -5rem; }
}
@media (max-width: 991px) {
    .navbar-brand img { height: 2.75rem; }
    .mega-dropdown { display: none !important; }
}
@media (max-width: 575px) {
    .top-info span { font-size: 0.6875rem; margin-right: 0.5rem; }
}