/* =========================================================
   Sepid24 Header — سبک OTA مدرن (Booking × Flytoday) v1.0
   RTL-first · Vazirmatn · sticky · mega-menu
   ========================================================= */
:root {
        --sp-primary: #1f4bd8;
        --sp-primary-dark: #16369c;
        --sp-navy: #10205b;
        --sp-gold: #ffb703;
        --sp-gold-dark: #e09600;
        --sp-green: #0d8a3f;
        --sp-text: #1b2559;
        --sp-muted: #667085;
        --sp-line: #e6eaf3;
        --sp-radius: 18px;
        --sp-shadow: 0 10px 30px rgba(16, 32, 91, .10);
}

/* ضد اسکرول افقی — مگامنوهای مخفی نباید صفحه را جابه‌جا کنند */
html, body { overflow-x: clip; }
@supports not (overflow: clip) {
        html, body { overflow-x: hidden; }
}

/* خنثی‌سازی حاشیه‌های صورتی کیت المنتور روی دکمه‌ها */
.sphd button, .sphd-drawer button, .sph-page button, .sph-lb button { border: 0 !important; }
.sph-page button.sph-share { border: 1px solid var(--sp-line) !important; }
.sphd-drawer .sphd-drawer-x, .sphd-drawer .sphd-dl[aria-controls] { border: 0 !important; }

/* ================= TOPBAR ================= */
.sphd-top {
        background: var(--sp-navy);
        color: #cfd9f5;
        font-size: 12.5px;
        line-height: 1;
}
.sphd-top-in {
        max-width: 1200px; margin-inline: auto; padding: 8px 20px;
        display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.sphd-top a { color: #cfd9f5; text-decoration: none; transition: color .2s; }
.sphd-top a:hover { color: #fff; }
.sphd-top-l, .sphd-top-r { display: flex; align-items: center; gap: 18px; }
.sphd-top svg { width: 13px; height: 13px; vertical-align: -2px; margin-inline-end: 4px; fill: currentColor; }
@media (max-width: 991px) { .sphd-top { display: none; } }

/* ================= MAINBAR ================= */
.sphd {
        position: sticky; top: 0; z-index: 9990;
        background: rgba(255,255,255,.96);
        backdrop-filter: saturate(1.4) blur(10px);
        -webkit-backdrop-filter: saturate(1.4) blur(10px);
        border-bottom: 1px solid var(--sp-line);
        transition: box-shadow .28s ease;
}
.sphd.is-scrolled { box-shadow: 0 6px 26px rgba(16,32,91,.10); }
.sphd-in {
        max-width: 1200px; margin-inline: auto; padding: 10px 20px;
        display: flex; align-items: center; gap: 22px;
}
@media (max-width: 991px) { .sphd-in { padding: 10px 16px; gap: 12px; } }

/* ---- لوگو ---- */
.sphd-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.sphd-logo-ico {
        width: 42px; height: 42px; border-radius: 13px;
        background: linear-gradient(140deg, #1f4bd8, #2e63ff 60%, #00c2ff);
        display: grid; place-items: center;
        box-shadow: 0 8px 20px rgba(31,75,216,.35);
        transition: transform .3s ease;
}
.sphd-logo:hover .sphd-logo-ico { transform: rotate(-8deg) scale(1.05); }
.sphd-logo-ico svg { width: 24px; height: 24px; fill: #fff; }
.sphd-logo-tx { display: flex; flex-direction: column; line-height: 1.25; }
.sphd-logo-name {
        font-size: 21px; font-weight: 900; letter-spacing: -.5px;
        background: linear-gradient(90deg, #1f4bd8, #2e63ff 55%, #00c2ff);
        -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sphd-logo-tag { font-size: 10.5px; color: var(--sp-muted); font-weight: 500; }
@media (max-width: 420px) { .sphd-logo-tag { display: none; } .sphd-logo-name { font-size: 18px; } }

/* ---- منو ---- */
.sphd-nav { display: flex; align-items: center; gap: 2px; flex: 1; justify-content: center; }
.sphd-nav > ul { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.sphd-nav li { position: relative; list-style: none; }
.sphd-link {
        display: flex; align-items: center; gap: 6px;
        padding: 10px 14px; border-radius: 12px;
        color: var(--sp-text); text-decoration: none;
        font-size: 14.5px; font-weight: 700;
        transition: background .2s, color .2s;
        white-space: nowrap; cursor: pointer;
        background: none; border: 0; font-family: inherit;
}
.sphd-link:hover { background: #eef3ff; color: var(--sp-primary); }
.sphd-link svg.sphd-ico { width: 17px; height: 17px; fill: currentColor; opacity: .8; }
.sphd-link .sphd-car { width: 10px; height: 10px; transition: transform .25s; opacity: .55; }
.sphd-li:hover > .sphd-link .sphd-car,
.sphd-li.is-open > .sphd-link .sphd-car { transform: rotate(180deg); }
.sphd-link.is-active { background: #eef3ff; color: var(--sp-primary); }
.sphd-ext { font-size: 10px; background: var(--sp-gold); color: #1b2559; border-radius: 6px; padding: 1px 5px; font-weight: 800; margin-inline-start: 2px; }
@media (max-width: 1080px) { .sphd-link { padding: 10px 10px; font-size: 13.5px; } }
@media (max-width: 991px) { .sphd-nav { display: none; } }

/* ---- اکشن‌ها ---- */
.sphd-acts { display: flex; align-items: center; gap: 10px; flex-shrink: 0; margin-inline-start: auto; }
.sphd-phone {
        display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
        text-decoration: none; line-height: 1.3;
        padding: 5px 12px; border-radius: 12px; border: 1.5px dashed #c7d4f5;
        transition: border-color .2s, background .2s;
}
.sphd-phone:hover { border-color: var(--sp-primary); background: #f4f7ff; }
.sphd-phone b { color: var(--sp-text); font-size: 14px; }
.sphd-phone span { color: var(--sp-muted); font-size: 10.5px; }
@media (max-width: 1199px) { .sphd-phone { display: none; } }

.sphd-cta {
        display: inline-flex; align-items: center; gap: 7px;
        background: linear-gradient(135deg, var(--sp-gold), #ffca2c);
        color: #1b2559; font-weight: 800; font-size: 13.5px;
        padding: 11px 20px; border-radius: 999px; text-decoration: none;
        box-shadow: 0 8px 22px rgba(255,183,3,.4);
        transition: transform .2s, box-shadow .2s; white-space: nowrap;
}
.sphd-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(255,183,3,.5); color: #1b2559; }
@media (max-width: 560px) { .sphd-cta { display: none; } }

/* ---- همبرگر ---- */
.sphd-burger {
        display: none !important; width: 44px; height: 44px; border: 0; background: #eef3ff;
        border-radius: 12px; cursor: pointer; place-items: center; padding: 0;
}
.sphd-burger span { position: relative; display: block; width: 20px; height: 2px; background: var(--sp-text); border-radius: 2px; transition: all .25s; }
.sphd-burger span::before, .sphd-burger span::after { content: ''; position: absolute; inset-inline: 0; height: 2px; background: var(--sp-text); border-radius: 2px; transition: all .25s; }
.sphd-burger span::before { top: -6px; }
.sphd-burger span::after { top: 6px; }
.sphd-burger[aria-expanded="true"] span { background: transparent; }
.sphd-burger[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.sphd-burger[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }
@media (max-width: 991px) { .sphd-burger { display: grid !important; } }

/* ================= MEGA MENU ================= */
.sphd-dd {
        position: absolute; top: calc(100% + 10px); inset-inline-start: 50%;
        transform: translateX(50%) translateY(8px);
        background: #fff; border-radius: 18px; border: 1px solid var(--sp-line);
        box-shadow: 0 24px 60px rgba(16,32,91,.16);
        opacity: 0; visibility: hidden; pointer-events: none;
        transition: opacity .22s ease, transform .22s ease, visibility .22s;
        min-width: 230px; padding: 10px; z-index: 50;
}
.sphd-li:hover > .sphd-dd,
.sphd-li.is-open > .sphd-dd,
.sphd-li:focus-within > .sphd-dd {
        opacity: 1; visibility: visible; pointer-events: auto;
        transform: translateX(50%) translateY(0);
}
.sphd-dd::before {
        content: ''; position: absolute; top: -6px; inset-inline-start: 50%;
        transform: translateX(50%) rotate(45deg);
        width: 12px; height: 12px; background: #fff;
        border-inline-start: 1px solid var(--sp-line); border-top: 1px solid var(--sp-line);
}
/* مگا: لبه راستِ آیتم، به سمت داخل صفحه — بدون سرریز (RTL: right:0) */
.sphd-dd-mega { width: 640px; padding: 18px; inset-inline-start: 0; inset-inline-end: auto; transform: translateY(8px); }
.sphd-li:hover > .sphd-dd-mega,
.sphd-li.is-open > .sphd-dd-mega,
.sphd-li:focus-within > .sphd-dd-mega {
        transform: translateY(0);
}
.sphd-dd-mega::before { inset-inline-start: 26px; inset-inline-end: auto; transform: rotate(45deg); }
.sphd-mega-head {
        display: flex; align-items: center; justify-content: space-between;
        margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--sp-line);
}
.sphd-mega-head b { font-size: 15px; color: var(--sp-text); }
.sphd-mega-head a { font-size: 12px; color: var(--sp-primary); text-decoration: none; font-weight: 700; }
.sphd-mega-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.sphd-mega-a {
        display: flex; flex-direction: column; gap: 2px;
        padding: 11px 12px; border-radius: 13px; text-decoration: none;
        transition: background .18s;
}
.sphd-mega-a:hover { background: #f0f4ff; }
.sphd-mega-a b { color: var(--sp-text); font-size: 13.5px; }
.sphd-mega-a i { color: var(--sp-muted); font-size: 11px; font-style: normal; }
.sphd-mega-a:hover b { color: var(--sp-primary); }
.sphd-mega-foot {
        margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--sp-line);
        display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.sphd-mega-foot p { margin: 0; font-size: 12px; color: var(--sp-muted); line-height: 1.9; }
.sphd-mega-foot a {
        background: var(--sp-primary); color: #fff; text-decoration: none;
        font-size: 12.5px; font-weight: 700; padding: 9px 16px; border-radius: 999px;
        transition: background .2s; white-space: nowrap;
}
.sphd-mega-foot a:hover { background: var(--sp-primary-dark); color: #fff; }
/* دراپ‌داون ساده */
.sphd-dd-list { min-width: 250px; padding: 8px; }
.sphd-dd-list a {
        display: flex; align-items: center; gap: 9px;
        padding: 11px 12px; border-radius: 11px; text-decoration: none;
        color: var(--sp-text); font-size: 13.5px; font-weight: 600; transition: background .18s;
}
.sphd-dd-list a:hover { background: #f0f4ff; color: var(--sp-primary); }
.sphd-dd-list .sphd-dd-emoji { font-size: 17px; }
.sphd-dd-list small { display: block; color: var(--sp-muted); font-weight: 500; font-size: 11px; margin-top: 1px; }
@media (max-width: 991px) { .sphd-dd { display: none; } }

/* ================= DRAWER موبایل ================= */
.sphd-drawer { position: fixed; inset: 0; z-index: 9999; visibility: hidden; pointer-events: none; }
.sphd-drawer.is-open { visibility: visible; pointer-events: auto; }
.sphd-drawer-bg {
        position: absolute; inset: 0; background: rgba(16,32,91,.5);
        opacity: 0; transition: opacity .25s; backdrop-filter: blur(3px);
}
.sphd-drawer.is-open .sphd-drawer-bg { opacity: 1; }
.sphd-drawer-panel {
        position: absolute; top: 0; bottom: 0; inset-inline-start: 0;
        width: min(340px, 88vw); background: #fff;
        transform: translateX(100%);
        transition: transform .3s cubic-bezier(.4,0,.2,1);
        display: flex; flex-direction: column;
        box-shadow: 20px 0 60px rgba(16,32,91,.2);
}
.sphd-drawer.is-open .sphd-drawer-panel { transform: translateX(0); }
.sphd-drawer-head {
        display: flex; align-items: center; justify-content: space-between;
        padding: 16px 18px; border-bottom: 1px solid var(--sp-line);
}
.sphd-drawer-head b { font-size: 16px; color: var(--sp-text); }
.sphd-drawer-x { width: 38px; height: 38px; border: 0; background: #f2f5fb; border-radius: 11px; font-size: 18px; cursor: pointer; color: var(--sp-text); }
.sphd-drawer-body { flex: 1; overflow-y: auto; padding: 12px; }
.sphd-drawer-body a.sphd-dl, .sphd-drawer-body button.sphd-dl {
        display: flex; width: 100%; align-items: center; gap: 10px;
        padding: 13px 14px; border-radius: 13px; text-decoration: none;
        color: var(--sp-text); font-size: 15px; font-weight: 700;
        background: none; border: 0; font-family: inherit; text-align: start; cursor: pointer;
}
.sphd-drawer-body a.sphd-dl:hover, .sphd-drawer-body button.sphd-dl:hover { background: #f0f4ff; }
.sphd-dl-ico { width: 34px; height: 34px; border-radius: 10px; background: #eef3ff; display: grid; place-items: center; font-size: 16px; flex-shrink: 0; }
.sphd-dl .sphd-car { margin-inline-start: auto; width: 11px; height: 11px; transition: transform .25s; opacity: .5; }
.sphd-dl[aria-expanded="true"] .sphd-car { transform: rotate(180deg); }
.sphd-dsub { display: none; padding: 4px 12px 8px 12px; }
.sphd-dsub.is-open { display: block; }
.sphd-dsub a {
        display: flex; flex-direction: column; gap: 1px;
        padding: 10px 12px; margin-inline-start: 16px;
        border-inline-start: 2px solid var(--sp-line);
        text-decoration: none; color: var(--sp-muted); font-size: 13.5px; font-weight: 600;
}
.sphd-dsub a b { color: var(--sp-text); font-weight: 700; font-size: 13.5px; }
.sphd-dsub a:hover { border-inline-start-color: var(--sp-primary); color: var(--sp-primary); }
.sphd-dsub a:hover b { color: var(--sp-primary); }
.sphd-drawer-foot { padding: 14px 16px 18px; border-top: 1px solid var(--sp-line); display: grid; gap: 9px; }
.sphd-drawer-foot .sphd-cta { justify-content: center; }
.sphd-drawer-foot .sphd-dcall {
        display: flex; align-items: center; justify-content: center; gap: 8px;
        background: #eef3ff; color: var(--sp-primary); text-decoration: none;
        font-weight: 800; font-size: 14px; padding: 11px; border-radius: 999px;
}

@media (prefers-reduced-motion: reduce) {
        .sphd, .sphd-dd, .sphd-drawer-panel, .sphd-drawer-bg { transition: none !important; }
}
