/* ═══════════════════════════════════════════════════════════════════════
   Mabsut Header — نسخه بازنویسی‌شده
   ─────────────────────────────────────────────────────────────────────
   ساختار:
     1. Header base
     2. Logo
     3. Search box
     4. Icon buttons
     5. User menu
     6. Navigation (دسته‌بندی)
     7. Breaking bar
     8. Touri panel
     9. Responsive
   ═══════════════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════════
   1. HEADER BASE
   ═══════════════════════════════════════════════════════════════ */

.mbs-header {
    position: relative;
    z-index: 100;
    background: var(--mbs-bg-surface, #ffffff);
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
    width: 100%;
}

.mbs-header__main {
    padding: 10px 0;
    border-bottom: 1px solid var(--mbs-border, #e5e7eb);
}

.mbs-header__main-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 52px;
}

.mbs-header__right,
.mbs-header__left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.mbs-header__center {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: center;
}

@media (max-width: 768px) {
    .mbs-header__center { display: none; }
}


/* ═══════════════════════════════════════════════════════════════
   2. LOGO
   ═══════════════════════════════════════════════════════════════ */

.mbs-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
    transition: opacity .2s;
}
.mbs-logo:hover { opacity: .9; }

.mbs-logo__mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    transition: transform .25s cubic-bezier(.2,.8,.2,1);
}
.mbs-logo:hover .mbs-logo__mark {
    transform: scale(1.05) rotate(-2deg);
}

.mbs-logo__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.mbs-logo__text {
    display: none;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

@media (min-width: 768px) {
    .mbs-logo__text { display: flex; }
}

.mbs-logo__name {
    font-size: 14px;
    font-weight: 800;
    color: var(--mbs-text-primary, #0f172a);
    line-height: 1.2;
    white-space: nowrap;
}

.mbs-logo__tagline {
    font-size: 11px;
    color: var(--mbs-text-muted, #94a3b8);
    line-height: 1.2;
    white-space: nowrap;
}


/* ═══════════════════════════════════════════════════════════════
   3. SEARCH BOX
   ═══════════════════════════════════════════════════════════════ */

.mbs-search {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 520px;
    height: 42px;
    background: var(--mbs-bg-muted, #f1f3f6);
    border: 1.5px solid transparent;
    border-radius: 12px;
    padding: 0 6px 0 12px;
    transition: all .25s cubic-bezier(.2,.8,.2,1);
}
.mbs-search:focus-within {
    background: var(--mbs-bg-surface, #ffffff);
    border-color: var(--mbs-brand, #1a5fb4);
    box-shadow: 0 4px 12px -2px rgba(26, 95, 180, .15);
}

.mbs-search__submit {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--mbs-text-secondary, #475569);
    cursor: pointer;
    border-radius: 8px;
    transition: color .2s;
    flex-shrink: 0;
}
.mbs-search__submit:hover {
    color: var(--mbs-brand, #1a5fb4);
}

.mbs-search__input {
    flex: 1;
    height: 100%;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    color: var(--mbs-text-primary, #0f172a);
    padding: 0 8px;
    min-width: 0;
}
.mbs-search__input::placeholder {
    color: var(--mbs-text-muted, #94a3b8);
}
.mbs-search__input:focus { outline: none; }

.mbs-search__kbd {
    display: none;
    padding: 2px 6px;
    background: rgba(15, 23, 42, .06);
    border-radius: 5px;
    font-size: 11px;
    font-family: monospace;
    color: var(--mbs-text-muted, #94a3b8);
    flex-shrink: 0;
}
@media (min-width: 1024px) {
    .mbs-search__kbd { display: inline-block; }
}


/* ═══════════════════════════════════════════════════════════════
   4. ICON BUTTONS
   ═══════════════════════════════════════════════════════════════ */

.mbs-icon-btn {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--mbs-text-secondary, #475569);
    border-radius: 10px;
    cursor: pointer;
    transition: all .2s cubic-bezier(.2,.8,.2,1);
    flex-shrink: 0;
    position: relative;
}

.mbs-icon-btn:hover {
    background: var(--mbs-bg-muted, #f1f3f6);
    color: var(--mbs-brand, #1a5fb4);
}

.mbs-icon-btn svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* Touri (منوی برنامه‌ها) */
.mbs-icon-btn--touri {
    color: var(--mbs-brand, #1a5fb4);
}
.mbs-icon-btn--touri:hover {
    background: rgba(26, 95, 180, .08);
}

/* Notification dot */
.mbs-notif-dot {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 8px;
    height: 8px;
    background: var(--mbs-danger, #ef4444);
    border-radius: 50%;
    border: 2px solid var(--mbs-bg-surface, #ffffff);
    animation: mbs-notif-pulse 2s ease-in-out infinite;
}
@keyframes mbs-notif-pulse {
    0%, 100% { transform: scale(1);   opacity: 1; }
    50%      { transform: scale(1.3); opacity: .7; }
}


/* ═══════════════════════════════════════════════════════════════
   5. USER MENU
   ═══════════════════════════════════════════════════════════════ */

.mbs-user {
    position: relative;
}

.mbs-user__trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    background: transparent;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all .2s;
}
.mbs-user__trigger:hover {
    background: var(--mbs-bg-muted, #f1f3f6);
}

.mbs-avatar {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    font-size: 14px;
    font-weight: 800;
    color: var(--mbs-text-inverse, #fff);
    background: linear-gradient(135deg, #1e40af, #6c5ce7);
    flex-shrink: 0;
    box-shadow: 0 0 0 2px var(--mbs-bg-surface, #fff),
                0 0 0 3.5px rgba(108, 92, 231, .35);
    transition: box-shadow .25s;
}
.mbs-user__trigger:hover .mbs-avatar {
    box-shadow: 0 0 0 2px var(--mbs-bg-surface, #fff),
                0 0 0 3.5px rgba(108, 92, 231, .7);
}

.mbs-user__dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    background: var(--mbs-bg-surface, #fff);
    border: 1px solid var(--mbs-border, #e5e7eb);
    border-radius: 14px;
    box-shadow: 0 12px 32px -8px rgba(15, 23, 42, .18);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all .25s cubic-bezier(.2,.8,.2,1);
    z-index: 200;
}
.mbs-user.is-open .mbs-user__dropdown,
.mbs-user__dropdown.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mbs-user__header {
    padding: 12px 14px;
    background: linear-gradient(135deg, rgba(30,64,175,.06), rgba(108,92,231,.06));
    border-radius: 10px;
    margin-bottom: 4px;
}

.mbs-user__name {
    font-size: 14px;
    font-weight: 800;
    color: var(--mbs-text-primary, #0f172a);
    margin-bottom: 2px;
}

.mbs-user__email {
    font-size: 11.5px;
    color: var(--mbs-text-muted, #94a3b8);
    direction: ltr;
    text-align: right;
}

.mbs-user__dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--mbs-text-secondary, #475569);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s;
}
.mbs-user__dropdown a:hover {
    background: var(--mbs-bg-muted, #f1f3f6);
    color: var(--mbs-brand, #1a5fb4);
}
.mbs-user__dropdown a svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.mbs-user__logout:hover {
    background: rgba(239, 68, 68, .08) !important;
    color: var(--mbs-danger, #ef4444) !important;
}


/* ═══════════════════════════════════════════════════════════════
   6. NAVIGATION (دسته‌بندی)
   ═══════════════════════════════════════════════════════════════ */

.mbs-nav {
    background: var(--mbs-bg-surface, #fff);
    border-bottom: 1px solid var(--mbs-border, #e5e7eb);
    position: sticky;
    top: 0;
    z-index: 99;
}

.mbs-nav__inner {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.mbs-nav__inner::-webkit-scrollbar { display: none; }

.mbs-nav__link {
    display: inline-flex;
    align-items: center;
    padding: 14px 14px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--mbs-text-secondary, #475569);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    transition: color .2s;
}
.mbs-nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 14px;
    left: 14px;
    height: 3px;
    background: linear-gradient(90deg, #1e40af, #6c5ce7);
    border-radius: 3px 3px 0 0;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .25s cubic-bezier(.2,.8,.2,1);
}
.mbs-nav__link:hover {
    color: var(--mbs-text-primary, #0f172a);
}
.mbs-nav__link.is-active {
    color: var(--mbs-brand, #1a5fb4);
    font-weight: 800;
}
.mbs-nav__link.is-active::after,
.mbs-nav__link:hover::after {
    transform: scaleX(1);
}


/* ═══════════════════════════════════════════════════════════════
   7. BREAKING BAR
   ═══════════════════════════════════════════════════════════════ */

.mbs-breaking {
    position: relative;
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 50%, #ea580c 100%);
    color: var(--mbs-text-inverse, #fff);
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    min-height: 42px;
    box-shadow: 0 2px 8px rgba(185, 28, 28, .18);
    z-index: 50;
    direction: ltr;
}
.mbs-breaking::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        rgba(255,255,255,.06) 0%,
        rgba(255,255,255,0) 20%,
        rgba(255,255,255,0) 80%,
        rgba(255,255,255,.06) 100%);
    pointer-events: none;
    z-index: 1;
}
.mbs-breaking__inner {
    display: flex;
    align-items: stretch;
    min-height: 42px;
    direction: ltr;
    flex-direction: row-reverse;
}
.mbs-breaking__label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    background: rgba(0, 0, 0, .28);
    font-weight: 800;
    font-size: 13px;
    flex-shrink: 0;
    position: relative;
    z-index: 3;
    direction: rtl;
}
.mbs-breaking__label::after {
    content: '';
    position: absolute;
    top: 0;
    left: -8px;
    bottom: 0;
    width: 16px;
    background: inherit;
    transform: skewX(-15deg);
    z-index: -1;
}
.mbs-breaking__label-text { color: var(--mbs-text-inverse, #fff); }
.mbs-breaking__fire {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .15);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15);
    animation: mbs-fire-flicker 1.8s ease-in-out infinite;
}
.mbs-breaking__fire svg {
    width: 14px;
    height: 14px;
    filter: brightness(0) invert(1) drop-shadow(0 1px 1px rgba(0, 0, 0, .35));
}
@keyframes mbs-fire-flicker {
    0%, 100% { transform: scale(1);   opacity: 1; }
    50%      { transform: scale(1.1); opacity: .85; }
}
.mbs-breaking__pulse {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--mbs-text-inverse, #fff);
    border-radius: 50%;
    animation: mbs-pulse-dot 1.4s ease-in-out infinite;
}
@keyframes mbs-pulse-dot {
    0%, 100% { transform: scale(1);   opacity: 1; }
    50%      { transform: scale(1.4); opacity: .4; }
}
.mbs-breaking__ticker {
    flex: 1;
    overflow: hidden;
    position: relative;
    min-width: 0;
    z-index: 2;
}
.mbs-breaking__track {
    display: inline-flex;
    align-items: center;
    gap: 40px;
    padding: 0 20px;
    white-space: nowrap;
    animation: mbs-breaking-marquee 40s linear infinite;
    min-height: 42px;
    will-change: transform;
}
.mbs-breaking__ticker:hover .mbs-breaking__track {
    animation-play-state: paused;
}
@keyframes mbs-breaking-marquee {
    0%   { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}
.mbs-breaking__item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--mbs-text-inverse, #fff);
    font-weight: 600;
    font-size: 13px;
    padding: 4px 0;
    transition: opacity .2s ease;
    text-decoration: none;
    direction: rtl;
    flex-shrink: 0;
}
.mbs-breaking__item:hover {
    opacity: .9;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}
.mbs-breaking__clock {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    flex-shrink: 0;
}
.mbs-breaking__clock svg {
    width: 11px;
    height: 11px;
    filter: brightness(0) invert(1);
}
.mbs-breaking__time {
    font-weight: 800;
    font-size: 12px;
    color: rgba(255, 255, 255, .9);
    font-feature-settings: 'tnum';
    letter-spacing: .5px;
    direction: ltr;
}
.mbs-breaking__title {
    font-weight: 700;
    color: var(--mbs-text-inverse, #fff);
    direction: rtl;
}


/* ═══════════════════════════════════════════════════════════════
   8. TOURI PANEL (منوی کشویی برنامه‌ها)
   ═══════════════════════════════════════════════════════════════ */

.mbs-touri {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
}
.mbs-touri:not([hidden]) { display: block; }

.mbs-touri__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: mbs-touri-fade .25s ease;
}
@keyframes mbs-touri-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.mbs-touri__panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 420px;
    background: var(--mbs-bg-surface, #fff);
    box-shadow: -8px 0 32px rgba(15, 23, 42, .2);
    display: flex;
    flex-direction: column;
    animation: mbs-touri-slide .3s cubic-bezier(.2,.8,.2,1);
    overflow: hidden;
}
@keyframes mbs-touri-slide {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}

.mbs-touri__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--mbs-border, #e5e7eb);
    flex-shrink: 0;
}

.mbs-touri__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.mbs-touri__logo {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}
.mbs-touri__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.mbs-touri__title {
    font-size: 15px;
    font-weight: 800;
    color: var(--mbs-text-primary, #0f172a);
    line-height: 1.3;
}
.mbs-touri__subtitle {
    font-size: 11.5px;
    color: var(--mbs-text-muted, #94a3b8);
    line-height: 1.3;
}

.mbs-touri__search {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 16px;
    padding: 10px 14px;
    background: var(--mbs-bg-muted, #f1f3f6);
    border-radius: 12px;
    flex-shrink: 0;
}
.mbs-touri__search svg {
    width: 18px;
    height: 18px;
    color: var(--mbs-text-muted, #94a3b8);
    flex-shrink: 0;
}
.mbs-touri__search input {
    flex: 1;
    background: transparent;
    border: none;
    font-family: inherit;
    font-size: 14px;
    color: var(--mbs-text-primary, #0f172a);
    min-width: 0;
}
.mbs-touri__search input:focus { outline: none; }
.mbs-touri__search input::placeholder {
    color: var(--mbs-text-muted, #94a3b8);
}

.mbs-touri__grid {
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 12px 16px 24px;
    align-content: start;
}

.mbs-touri__divider {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0 8px;
    padding: 0 6px;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--mbs-brand, #1a5fb4);
    text-align: right;
}
.mbs-touri__divider::before,
.mbs-touri__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        var(--mbs-border, #e5e7eb) 20%,
        var(--mbs-border, #e5e7eb) 80%,
        transparent);
}
.mbs-touri__divider > span {
    padding: 0 10px;
    white-space: nowrap;
}

.mbs-touri__app {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 6px;
    text-decoration: none;
    color: var(--mbs-text-primary, #0f172a);
    border-radius: 12px;
    transition: all .2s cubic-bezier(.2,.8,.2,1);
    position: relative;
}
.mbs-touri__app:hover {
    background: var(--mbs-bg-muted, #f1f3f6);
    transform: translateY(-2px);
}

.mbs-touri__app-icon {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border-radius: 14px;
    color: #fff;
    box-shadow: 0 4px 12px -2px rgba(15, 23, 42, .18);
    transition: transform .25s cubic-bezier(.2,.8,.2,1),
                box-shadow .25s cubic-bezier(.2,.8,.2,1);
    flex-shrink: 0;
}
.mbs-touri__app:hover .mbs-touri__app-icon {
    transform: scale(1.06) rotate(-3deg);
    box-shadow: 0 8px 20px -4px rgba(15, 23, 42, .28);
}
.mbs-touri__app-icon svg {
    width: 26px !important;
    height: 26px !important;
    max-width: 26px !important;
    max-height: 26px !important;
    filter: brightness(0) invert(1) drop-shadow(0 1px 2px rgba(0, 0, 0, .25));
    display: block;
}

.mbs-touri__app-name {
    font-size: 11.5px;
    font-weight: 700;
    text-align: center;
    line-height: 1.35;
    color: var(--mbs-text-primary, #0f172a);
}

/* گرادیان‌های app-icon */
.mbs-touri__app-icon--blue    { background: linear-gradient(135deg, #1e40af, #1a5fb4); }
.mbs-touri__app-icon--green   { background: linear-gradient(135deg, #047857, #059669); }
.mbs-touri__app-icon--red     { background: linear-gradient(135deg, #b91c1c, #dc2626); }
.mbs-touri__app-icon--amber   { background: linear-gradient(135deg, #b45309, #d97706); }
.mbs-touri__app-icon--indigo  { background: linear-gradient(135deg, #4338ca, #6366f1); }
.mbs-touri__app-icon--cyan    { background: linear-gradient(135deg, #0e7490, #0891b2); }
.mbs-touri__app-icon--purple  { background: linear-gradient(135deg, #6d28d9, #8b5cf6); }
.mbs-touri__app-icon--teal    { background: linear-gradient(135deg, #0f766e, #14b8a6); }
.mbs-touri__app-icon--pink    { background: linear-gradient(135deg, #9d174d, #db2777); }
.mbs-touri__app-icon--fuchsia { background: linear-gradient(135deg, #7e22ce, #c026d3); }
.mbs-touri__app-icon--sky     { background: linear-gradient(135deg, #0369a1, #0284c7); }
.mbs-touri__app-icon--slate   { background: linear-gradient(135deg, #1e293b, #334155); }
.mbs-touri__app-icon--accent  { background: linear-gradient(135deg, #9d174d, #be185d); }
.mbs-touri__app-icon--money   { background: linear-gradient(135deg, #047857, #b45309); }

.mbs-touri__app.is-disabled {
    opacity: .55;
    cursor: not-allowed;
    filter: grayscale(.3);
}
.mbs-touri__app.is-disabled:hover {
    background: transparent;
    transform: none;
}
.mbs-touri__app.is-disabled::after {
    content: 'به‌زودی';
    position: absolute;
    top: 6px;
    left: 6px;
    font-size: 9px;
    padding: 1px 6px;
    background: var(--mbs-warning, #f59e0b);
    color: var(--mbs-text-inverse, #fff);
    border-radius: 4px;
    font-weight: 700;
    line-height: 1.4;
    z-index: 2;
}

.mbs-touri__footer {
    padding: 14px 20px;
    border-top: 1px solid var(--mbs-border, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--mbs-bg-muted, #f1f3f6);
    flex-shrink: 0;
}
.mbs-touri__footer a {
    font-size: 13px;
    font-weight: 700;
    color: var(--mbs-brand, #1a5fb4);
    text-decoration: none;
    transition: color .2s;
}
.mbs-touri__footer a:hover {
    color: var(--mbs-accent, #c2185b);
}


/* ═══════════════════════════════════════════════════════════════
   9. RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .mbs-header__main-inner { gap: 10px; }
    .mbs-nav__link { padding: 12px 12px; font-size: 13px; }
}

@media (max-width: 768px) {
    .mbs-header__main { padding: 8px 0; }
    .mbs-header__main-inner {
        gap: 6px;
        min-height: 46px;
    }
    .mbs-logo__mark { width: 34px; height: 34px; border-radius: 9px; }
    .mbs-icon-btn { width: 36px; height: 36px; border-radius: 8px; }
    .mbs-icon-btn svg { width: 18px; height: 18px; }
    .mbs-avatar { width: 32px; height: 32px; font-size: 12px; }
    .mbs-nav__link { padding: 11px 10px; font-size: 12.5px; }
    .mbs-touri__panel { max-width: 100%; }
    .mbs-touri__grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 640px) {
    .mbs-breaking { font-size: 12px; min-height: 38px; }
    .mbs-breaking__inner { min-height: 38px; }
    .mbs-breaking__label { padding: 0 10px; gap: 6px; }
    .mbs-breaking__label-text { font-size: 11px; }
    .mbs-breaking__fire { width: 18px; height: 18px; border-radius: 5px; }
    .mbs-breaking__fire svg { width: 12px; height: 12px; }
    .mbs-breaking__track { min-height: 38px; gap: 24px; padding: 0 14px; animation-duration: 30s; }
    .mbs-breaking__item { font-size: 12px; }
    .mbs-breaking__time { font-size: 11px; }
    .mbs-breaking__clock { width: 16px; height: 16px; }
    .mbs-breaking__clock svg { width: 10px; height: 10px; }
}

@media (max-width: 480px) {
    .mbs-header__main-inner { gap: 4px; }
    .mbs-logo__mark { width: 30px; height: 30px; }
    .mbs-icon-btn { width: 34px; height: 34px; }
    .mbs-icon-btn svg { width: 17px; height: 17px; }
    .mbs-avatar { width: 30px; height: 30px; }
    .mbs-touri__grid { grid-template-columns: repeat(3, 1fr); }
    .mbs-touri__app-icon { width: 44px; height: 44px; border-radius: 12px; }
    .mbs-touri__app-icon svg { width: 22px !important; height: 22px !important; }
    .mbs-touri__app-name { font-size: 11px; }
}


/* ═══════════════════════════════════════════════════════════════
   HEADER v2 — گرادیان آیکن‌ها + جستجوی موبایل + فاصله‌گذاری
   ═══════════════════════════════════════════════════════════════ */

/* ─── بهبود فاصله‌گذاری پایه ─── */
.mbs-header__main-inner {
    gap: 12px;
}
.mbs-header__right,
.mbs-header__left {
    gap: 6px;
}

@media (min-width: 1024px) {
    .mbs-header__main-inner { gap: 20px; }
    .mbs-header__right,
    .mbs-header__left { gap: 8px; }
}

/* ─── آیکن Touri با گرادیان ─── */
.mbs-icon-btn--touri {
    color: #fff !important;
    background: linear-gradient(135deg, #1e40af, #6c5ce7) !important;
    box-shadow: 0 2px 8px -2px rgba(30, 64, 175, .4);
    transition: all .25s cubic-bezier(.2,.8,.2,1);
}
.mbs-icon-btn--touri:hover {
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 6px 14px -4px rgba(30, 64, 175, .55);
    background: linear-gradient(135deg, #1e40af, #8b5cf6) !important;
}
.mbs-icon-btn--touri svg {
    filter: brightness(0) invert(1);
}

/* ─── آیکن زبان با گرادیان ─── */
.mbs-icon-btn.mbs-lang-btn {
    color: #fff !important;
    background: linear-gradient(135deg, #0ea5e9, #06b6d4) !important;
    box-shadow: 0 2px 8px -2px rgba(14, 165, 233, .4);
    transition: all .25s cubic-bezier(.2,.8,.2,1);
}
.mbs-icon-btn.mbs-lang-btn:hover {
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 6px 14px -4px rgba(14, 165, 233, .55);
    background: linear-gradient(135deg, #0284c7, #0891b2) !important;
}
.mbs-icon-btn.mbs-lang-btn svg {
    filter: brightness(0) invert(1);
}

/* ─── آیکن اعلان با گرادیان ─── */
.mbs-icon-btn.mbs-notif-btn {
    color: #fff !important;
    background: linear-gradient(135deg, #f59e0b, #ef4444) !important;
    box-shadow: 0 2px 8px -2px rgba(245, 158, 11, .4);
    transition: all .25s cubic-bezier(.2,.8,.2,1);
}
.mbs-icon-btn.mbs-notif-btn:hover {
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 6px 14px -4px rgba(245, 158, 11, .55);
    background: linear-gradient(135deg, #ea580c, #dc2626) !important;
}
.mbs-icon-btn.mbs-notif-btn svg {
    filter: brightness(0) invert(1);
}
.mbs-notif-btn .mbs-notif-dot {
    border-color: #fff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .5);
}

/* ─── Search icon (موبایل) — فقط زیر 768px ─── */
.mbs-icon-btn--search-mobile {
    display: grid;
}
@media (min-width: 769px) {
    .mbs-icon-btn--search-mobile {
        display: none !important;
    }
}

/* ─── Search Modal (موبایل) ─── */
.mbs-search-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
}
.mbs-search-modal:not([hidden]) {
    display: block;
}
.mbs-search-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: mbs-search-fade .2s ease;
}
@keyframes mbs-search-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.mbs-search-modal__panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 16px;
    animation: mbs-search-slide-down .3s cubic-bezier(.2,.8,.2,1);
}
@keyframes mbs-search-slide-down {
    from { transform: translateY(-20px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}
.mbs-search-modal__form {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border-radius: 14px;
    padding: 10px 14px;
    box-shadow: 0 12px 32px -8px rgba(15, 23, 42, .25);
    height: 52px;
}
.mbs-search-modal__icon {
    width: 20px;
    height: 20px;
    color: var(--mbs-text-secondary, #475569);
    flex-shrink: 0;
}
.mbs-search-modal__input {
    flex: 1;
    height: 100%;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 15px;
    color: var(--mbs-text-primary, #0f172a);
    padding: 0;
    min-width: 0;
}
.mbs-search-modal__input:focus { outline: none; }
.mbs-search-modal__input::placeholder {
    color: var(--mbs-text-muted, #94a3b8);
}
.mbs-search-modal__close {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    background: var(--mbs-bg-muted, #f1f3f6);
    border: none;
    border-radius: 8px;
    color: var(--mbs-text-secondary, #475569);
    cursor: pointer;
    flex-shrink: 0;
    transition: all .2s;
}
.mbs-search-modal__close:hover {
    background: var(--mbs-border, #e5e7eb);
    color: var(--mbs-text-primary, #0f172a);
}
.mbs-search-modal__close svg {
    width: 18px;
    height: 18px;
}

/* ─── مخفی کردن Search modal در دسکتاپ ─── */
@media (min-width: 769px) {
    .mbs-search-modal { display: none !important; }
}

/* ─── بهبود فاصله‌گذاری موبایل ─── */
@media (max-width: 768px) {
    .mbs-header__main { padding: 8px 0; }
    .mbs-header__main-inner {
        gap: 6px;
        min-height: 46px;
    }
    .mbs-header__left,
    .mbs-header__right {
        gap: 4px;
    }
    .mbs-icon-btn {
        width: 36px;
        height: 36px;
        border-radius: 9px;
    }
    .mbs-icon-btn svg {
        width: 18px;
        height: 18px;
    }
    .mbs-logo__mark {
        width: 34px;
        height: 34px;
        border-radius: 9px;
    }
    .mbs-avatar {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .mbs-header__main-inner { gap: 4px; }
    .mbs-header__left,
    .mbs-header__right { gap: 3px; }
    .mbs-icon-btn {
        width: 34px;
        height: 34px;
        border-radius: 8px;
    }
    .mbs-icon-btn svg {
        width: 17px;
        height: 17px;
    }
    .mbs-logo__mark {
        width: 32px;
        height: 32px;
    }
    .mbs-avatar {
        width: 30px;
        height: 30px;
    }
}

/* ─── فاصله بهتری برای دسکتاپ ─── */
@media (min-width: 1024px) {
    .mbs-header__main-inner { gap: 24px; }
    .mbs-header__left,
    .mbs-header__right { gap: 8px; }
}

/* ─── Nav بهبود فاصله ─── */
.mbs-nav__inner {
    gap: 2px;
}
@media (min-width: 768px) {
    .mbs-nav__inner { gap: 6px; }
}


/* ═══════════════════════════════════════════════════════════════
   Search icon (موبایل) — گرادیان سبز-فیروزه‌ای
   ═══════════════════════════════════════════════════════════════ */
.mbs-icon-btn--search-mobile {
    color: #fff !important;
    background: linear-gradient(135deg, #10b981, #06b6d4) !important;
    box-shadow: 0 2px 8px -2px rgba(16, 185, 129, .4);
    transition: all .25s cubic-bezier(.2,.8,.2,1);
}
.mbs-icon-btn--search-mobile:hover {
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 6px 14px -4px rgba(16, 185, 129, .55);
    background: linear-gradient(135deg, #059669, #0891b2) !important;
}
.mbs-icon-btn--search-mobile svg {
    filter: brightness(0) invert(1);
}
@media (min-width: 769px) {
    .mbs-icon-btn--search-mobile {
        display: none !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   Language Modal
   ═══════════════════════════════════════════════════════════════ */
.mbs-lang-modal {
    position: fixed;
    inset: 0;
    z-index: 1001;
    display: none;
}
.mbs-lang-modal:not([hidden]) {
    display: block;
}
.mbs-lang-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: mbs-lang-fade .2s ease;
}
@keyframes mbs-lang-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.mbs-lang-modal__panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 32px);
    max-width: 400px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px -20px rgba(15, 23, 42, .35);
    padding: 20px;
    animation: mbs-lang-pop .3s cubic-bezier(.2,.8,.2,1);
}
@keyframes mbs-lang-pop {
    from { opacity: 0; transform: translate(-50%, -45%) scale(.95); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.mbs-lang-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--mbs-border, #e5e7eb);
}
.mbs-lang-modal__header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--mbs-text-primary, #0f172a);
}
.mbs-lang-modal__close {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    background: var(--mbs-bg-muted, #f1f3f6);
    border: none;
    border-radius: 10px;
    color: var(--mbs-text-secondary, #475569);
    cursor: pointer;
    transition: all .2s;
}
.mbs-lang-modal__close:hover {
    background: var(--mbs-border, #e5e7eb);
    color: var(--mbs-text-primary, #0f172a);
}
.mbs-lang-modal__close svg {
    width: 18px;
    height: 18px;
}

.mbs-lang-modal__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.mbs-lang-modal__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--mbs-bg-muted, #f1f3f6);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all .2s cubic-bezier(.2,.8,.2,1);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    color: var(--mbs-text-primary, #0f172a);
    text-align: right;
    width: 100%;
}
.mbs-lang-modal__item:hover {
    background: #fff;
    border-color: #6c5ce7;
    transform: translateX(-2px);
    box-shadow: 0 4px 12px -4px rgba(108, 92, 231, .3);
}
.mbs-lang-modal__item.is-active {
    background: linear-gradient(135deg, #eff6ff, #f5f3ff);
    border-color: #1e40af;
    color: #1e40af;
}

.mbs-lang-modal__flag {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
}
.mbs-lang-modal__name {
    flex: 1;
    text-align: right;
}
.mbs-lang-modal__code {
    font-family: monospace;
    font-size: 11px;
    padding: 3px 8px;
    background: rgba(15, 23, 42, .06);
    border-radius: 6px;
    direction: ltr;
    color: var(--mbs-text-muted, #94a3b8);
}
.mbs-lang-modal__item.is-active .mbs-lang-modal__code {
    background: rgba(30, 64, 175, .12);
    color: #1e40af;
}
.mbs-lang-modal__check {
    display: none;
    width: 20px;
    height: 20px;
    place-items: center;
    background: #1e40af;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 800;
    flex-shrink: 0;
}
.mbs-lang-modal__item.is-active .mbs-lang-modal__check {
    display: grid;
}


/* ═══════════════════════════════════════════════════════════════
   Touri Button — فقط در موبایل و تبلت (≤ 768px)
   ═══════════════════════════════════════════════════════════════ */

.mbs-icon-btn--touri {
    display: grid;
}

@media (min-width: 769px) {
    .mbs-icon-btn--touri {
        display: none !important;
    }
}

/* ─── touri panel در دسکتاپ هم قابل استفاده ولی button مخفیه ─── */
@media (min-width: 769px) {
    .mbs-touri__panel {
        /* مخفی نیست چون با JS باز نمیشه */
    }
}


/* ═══════════════════════════════════════════════════════════════
   دکمه ورود — آیکن با گرادیان سبز
   ═══════════════════════════════════════════════════════════════ */

.mbs-icon-btn--login {
    color: #fff !important;
    background: linear-gradient(135deg, #10b981, #059669) !important;
    box-shadow: 0 2px 8px -2px rgba(16, 185, 129, .4);
    transition: all .25s cubic-bezier(.2,.8,.2,1);
    text-decoration: none;
    display: grid;
    place-items: center;
}
.mbs-icon-btn--login:hover {
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 6px 14px -4px rgba(16, 185, 129, .55);
    background: linear-gradient(135deg, #059669, #047857) !important;
}
.mbs-icon-btn--login svg {
    width: 20px !important;
    height: 20px !important;
    filter: brightness(0) invert(1);
}

/* حذف استایل قدیمی login-btn */
.mbs-login-btn {
    display: none !important;
}
