/* TarahSefid header — Rastchin / RTL-Theme style, fully responsive */

.rh-header {
    --rh-green: #8ed557;
    --rh-green-2: #7fc945;
    --rh-green-soft: #eef8e6;
    --rh-ink: #2b2f33;
    --rh-mute: #8a9198;
    --rh-line: #eceff2;
    --rh-soft: #f3f4f6;
    background: #fff;
    border-bottom: 1px solid var(--rh-line);
    position: sticky;
    top: 0;
    z-index: 220;
}

.rh-header .container {
    width: min(1180px, 94%);
    margin-inline: auto;
}

/* ===== Top tier ===== */
.rh-top {
    background: #fff;
    border-bottom: 1px solid #f0f2f4;
}

.rh-top-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 78px;
    padding: .75rem 0;
}

.rh-logo {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    flex: 0 0 auto;
    text-decoration: none;
    color: var(--rh-ink);
}

.rh-logo img,
.rh-logo .rh-mark {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    flex: 0 0 auto;
    object-fit: contain;
    background: transparent;
}

.rh-logo .rh-mark {
    display: grid;
    place-items: center;
    background: var(--rh-green);
    color: #fff;
    font-weight: 900;
    font-size: 1.15rem;
}

.rh-logo .rh-brand {
    display: flex;
    flex-direction: column;
    gap: .05rem;
    line-height: 1.25;
}

.rh-logo .rh-brand strong {
    font-size: 1.15rem;
    font-weight: 900;
    letter-spacing: -.02em;
}

.rh-logo .rh-brand small {
    font-size: .68rem;
    font-weight: 700;
    color: var(--rh-mute);
    letter-spacing: .06em;
    text-transform: uppercase;
}

.rh-search {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 520px;
    margin-inline: auto;
    display: flex;
    align-items: center;
    gap: .55rem;
    background: var(--rh-soft);
    border: 1px solid transparent;
    border-radius: 12px;
    padding: .15rem .9rem;
    min-height: 48px;
    transition: .15s ease;
}

.rh-search:focus-within {
    background: #fff;
    border-color: #d7ebc4;
    box-shadow: 0 0 0 3px rgba(142, 213, 87, .12);
}

.rh-search svg {
    flex: 0 0 auto;
    color: #9aa3ab;
}

.rh-search input {
    flex: 1;
    border: 0 !important;
    outline: 0;
    margin: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: .7rem 0 !important;
    font-size: .92rem;
    color: var(--rh-ink);
}

.rh-search input::placeholder { color: #a0a7af; }

.rh-actions {
    display: flex;
    align-items: center;
    gap: .7rem;
    flex: 0 0 auto;
    margin-inline-start: auto;
}

.rh-pro {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .7rem .5rem .85rem;
    border-radius: 10px;
    background: #eef8e6;
    color: #2f6512;
    font-weight: 800;
    font-size: .88rem;
    white-space: nowrap;
    border: 1px solid #dff0cd;
}

.rh-pro .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 22px;
    padding: 0 .45rem;
    border-radius: 6px;
    background: #3d7c1f;
    color: #fff;
    font-size: .72rem;
    font-weight: 900;
}

.rh-seller {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: var(--rh-green-2);
    font-weight: 800;
    font-size: .9rem;
    white-space: nowrap;
}

.rh-seller .dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--rh-green);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: .85rem;
    font-weight: 900;
}

.rh-seller .txt {
    border-bottom: 1px dashed rgba(127, 201, 69, .7);
    padding-bottom: 1px;
}

.rh-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: transparent;
    color: #6b7280;
    display: inline-grid;
    place-items: center;
    position: relative;
    text-decoration: none;
}

.rh-icon:hover {
    background: var(--rh-soft);
    color: var(--rh-ink);
}

.rh-login {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 44px;
    padding: .45rem .9rem;
    border-radius: 10px;
    border: 1px solid #e5e8ec;
    background: #fff;
    color: var(--rh-ink);
    font-weight: 800;
    font-size: .88rem;
    white-space: nowrap;
}

.rh-login:hover {
    border-color: #d7ebc4;
    color: #3f7a18;
}

.rh-login svg { color: #6b7280; }

.rh-burger {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--rh-line);
    background: #fff;
    color: var(--rh-ink);
    place-items: center;
    cursor: pointer;
}

.rh-burger span,
.rh-burger span::before,
.rh-burger span::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    position: relative;
}
.rh-burger span::before,
.rh-burger span::after {
    content: "";
    position: absolute;
    left: 0;
}
.rh-burger span::before { top: -6px; }
.rh-burger span::after { top: 6px; }

/* Account tools inside header — styles live in topbar-account.css */
.rh-actions .mc-trigger {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 0;
    background: transparent;
    color: #6b7280;
}

/* ===== Bottom nav ===== */
.rh-nav {
    position: relative;
    z-index: 70;
    background: #fafbfc;
    border-bottom: 1px solid #eef0f3;
}

.rh-nav-inner {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: .15rem;
    min-height: 54px;
    overflow: visible;
}

.rh-nav-scroll {
    display: flex;
    align-items: stretch;
    gap: .1rem;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
}
.rh-nav-scroll::-webkit-scrollbar { display: none; }

.rh-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .7rem .7rem;
    color: #4b5563;
    font-size: .86rem;
    font-weight: 700;
    white-space: nowrap;
    border-radius: 10px;
    text-decoration: none;
    transition: .15s ease;
}

.rh-link:hover {
    color: var(--rh-green-2);
    background: rgba(142, 213, 87, .08);
}

.rh-link .ico {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    color: #6b7280;
}

.rh-link:hover .ico { color: var(--rh-green-2); }

.rh-link .chev {
    width: 12px;
    height: 12px;
    opacity: .55;
}

.rh-link.is-accent,
.rh-link.is-accent .ico {
    color: var(--rh-green-2);
}

.rh-link.is-accent {
    position: relative;
}

.rh-link.is-accent::after {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--rh-green);
    box-shadow: 0 0 0 2px #fff;
    position: absolute;
    top: 10px;
    left: 8px;
}

.rh-link.is-accent:hover {
    background: rgba(142, 213, 87, .12);
}

.rh-link.rh-page {
    position: relative;
    color: #334155;
    padding-inline: .8rem;
}
.rh-link.rh-page .ico {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: #eef8ea;
    color: #4f9a22;
}
.rh-link.rh-page:hover,
.rh-link.rh-page.is-on {
    color: #2f6f14;
    background: rgba(127, 201, 69, .12);
}
.rh-link.rh-page:hover .ico,
.rh-link.rh-page.is-on .ico {
    background: #7fc945;
    color: #fff;
}
.rh-link.rh-page.is-on::after {
    content: "";
    position: absolute;
    right: 12px;
    left: 12px;
    bottom: 6px;
    height: 2px;
    border-radius: 99px;
    background: #7fc945;
}

/* Mega menu attached to nav */
.rh-nav .hm-root {
    position: static;
    display: flex;
    align-items: stretch;
}

.rh-nav .hm-trigger {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .7rem .7rem;
    border: 0;
    background: transparent;
    color: #4b5563;
    font-size: .86rem;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
}

.rh-nav .hm-trigger .hm-trigger-ico {
    width: 20px;
    height: 20px;
    border-radius: 0;
    background: transparent;
    color: #6b7280;
    display: grid;
    place-items: center;
}

.rh-nav .hm-trigger .hm-trigger-ico svg {
    width: 18px;
    height: 18px;
}

.rh-nav .hm-root.is-open .hm-trigger,
.rh-nav .hm-trigger:hover {
    color: var(--rh-green-2);
    background: rgba(142, 213, 87, .08);
    box-shadow: none;
    border: 0;
}

.rh-nav .hm-root.is-open .hm-trigger .hm-trigger-ico,
.rh-nav .hm-trigger:hover .hm-trigger-ico {
    color: var(--rh-green-2);
    background: transparent;
}

/* Panel is portaled to body; do not absolute-position under .rh-nav */
.rh-nav .hm-panel {
    /* legacy override neutralized — see header-mega.css fixed panel */
}

/* ===== Mobile drawer ===== */
.rh-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, .42);
    z-index: 240;
}
.rh-backdrop[hidden] { display: none !important; }

.rh-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(360px, 88vw);
    height: 100%;
    background: #fff;
    z-index: 250;
    transform: translateX(105%);
    transition: transform .25s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -12px 0 40px rgba(0,0,0,.12);
}

.rh-header.is-mobile-open .rh-backdrop { display: block; }
.rh-header.is-mobile-open .rh-drawer { transform: translateX(0); }
.rh-header.is-mobile-open .rh-burger span { background: transparent; }
.rh-header.is-mobile-open .rh-burger span::before { top: 0; transform: rotate(45deg); }
.rh-header.is-mobile-open .rh-burger span::after { top: 0; transform: rotate(-45deg); }

.rh-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--rh-line);
}

.rh-drawer-close {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--rh-line);
    background: #fff;
    cursor: pointer;
    font-size: 1.2rem;
}

.rh-drawer-body {
    padding: 1rem;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: .45rem;
}

.rh-drawer-body .rh-search {
    max-width: none;
    margin: 0 0 .6rem;
}

.rh-drawer-body a,
.rh-drawer-body button.rh-dlink {
    display: flex;
    align-items: center;
    gap: .65rem;
    width: 100%;
    text-align: right;
    padding: .8rem .85rem;
    border-radius: 12px;
    border: 1px solid var(--rh-line);
    background: #fff;
    color: var(--rh-ink);
    font-weight: 800;
    font-size: .92rem;
    cursor: pointer;
    text-decoration: none;
}

.rh-drawer-body a:hover,
.rh-drawer-body button.rh-dlink:hover {
    border-color: #d7ebc4;
    background: var(--rh-green-soft);
    color: #3f7a18;
}

.rh-drawer-group {
    margin: .55rem 0 .15rem;
    padding: .15rem .35rem;
    font-size: .72rem;
    font-weight: 800;
    color: #94a3b8;
}

.rh-drawer-body a .ico {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: #eef8ea;
    color: #4f9a22;
    flex: 0 0 auto;
}
.rh-drawer-body a.is-on .ico {
    background: #7fc945;
    color: #163328;
}

.rh-drawer-body a.is-on {
    color: #2f6f14;
    background: #eef8ea;
    font-weight: 800;
}

.rh-drawer-body a.rh-drawer-sub {
    padding-right: 1.35rem;
    font-size: .84rem;
    font-weight: 700;
    color: #64748b;
    background: #f8fafc;
}

.rh-drawer-acc {
    border: 1px solid #eef0f3;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}

.rh-drawer-acc summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .75rem .9rem;
    cursor: pointer;
    font-weight: 800;
    color: #334155;
}

.rh-drawer-acc summary::-webkit-details-marker { display: none; }

.rh-drawer-acc-title { flex: 1; min-width: 0; }

.rh-drawer-acc-link {
    flex: 0 0 auto;
    font-size: .72rem !important;
    font-weight: 800 !important;
    color: #62a832 !important;
    background: #f3faeb !important;
    border: 0 !important;
    border-radius: 999px !important;
    padding: .25rem .55rem !important;
    width: auto !important;
}

.rh-drawer-acc[open] summary {
    border-bottom: 1px solid #eef0f3;
    background: #f8fafc;
}

.rh-drawer-acc .rh-drawer-sub {
    display: block;
    margin: 0;
    border: 0 !important;
    border-radius: 0 !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

.rh-drawer-acc .rh-drawer-sub:last-child {
    border-bottom: 0 !important;
}

.rh-drawer-foot {
    margin-top: auto;
    padding: 1rem;
    border-top: 1px solid var(--rh-line);
    display: grid;
    gap: .55rem;
}

/* ===== Services dropdown ===== */
.svc-root {
    position: relative;
    flex: 0 0 auto;
}

.svc-trigger {
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
}

.svc-root.is-open .svc-trigger,
.svc-trigger[aria-expanded="true"] {
    background: #eef8e6;
    color: #3f7a18;
}

.svc-root.is-open .svc-trigger .chev {
    transform: rotate(180deg);
}

.svc-panel {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: min(720px, calc(100vw - 2rem));
    z-index: 260;
    padding-top: .2rem;
}

.svc-root.is-open .svc-panel { display: block; }

.svc-panel-inner {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 0;
    background: #fff;
    border: 1px solid #e8edf2;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 22px 50px rgba(35, 45, 55, .14);
    animation: svcIn .18s ease;
}

@keyframes svcIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.svc-intro {
    padding: 1.25rem 1.15rem;
    background:
        radial-gradient(220px 120px at 100% 0%, rgba(142, 213, 87, .28), transparent 60%),
        linear-gradient(165deg, #14241a 0%, #1d3224 55%, #243b2c 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: .45rem;
}

.svc-eyebrow {
    display: inline-flex;
    width: fit-content;
    padding: .22rem .55rem;
    border-radius: 999px;
    background: rgba(142, 213, 87, .18);
    border: 1px solid rgba(142, 213, 87, .35);
    color: #d7f5b8;
    font-size: .72rem;
    font-weight: 800;
}

.svc-intro strong {
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1.55;
}

.svc-intro p {
    margin: 0;
    color: rgba(255, 255, 255, .72);
    font-size: .82rem;
    line-height: 1.8;
    font-weight: 600;
}

.svc-intro-link {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 .9rem;
    border-radius: 10px;
    background: var(--rh-green);
    color: #fff !important;
    font-weight: 800;
    font-size: .84rem;
    text-decoration: none;
}

.svc-intro-link:hover { filter: brightness(.97); }

.svc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .7rem;
    padding: .9rem;
    background: #f7f9fb;
}

.svc-card {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 16px;
    align-items: center;
    gap: .75rem;
    padding: .85rem .8rem;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #e8edf2;
    text-decoration: none;
    color: inherit;
    transition: .18s ease;
    min-height: 92px;
}

.svc-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(60, 67, 84, .08);
    border-color: #d7ebc4;
}

.svc-ico {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.svc-card.tone-orders .svc-ico { background: #fff4e5; color: #d97706; }
.svc-card.tone-host .svc-ico { background: #e8f1ff; color: #2563eb; }
.svc-card.tone-web .svc-ico { background: #eef8ea; color: #3f7a18; }
.svc-card.tone-domain .svc-ico { background: #f3e8ff; color: #7c3aed; }

.svc-body {
    min-width: 0;
    display: grid;
    gap: .2rem;
}

.svc-body strong {
    font-size: .95rem;
    font-weight: 900;
    color: #243038;
}

.svc-body span {
    font-size: .78rem;
    color: #7a848e;
    line-height: 1.55;
    font-weight: 600;
}

.svc-body em {
    font-style: normal;
    font-size: .75rem;
    font-weight: 800;
    color: #3f7a18;
    margin-top: .15rem;
}

.svc-arrow {
    color: #b0b8c0;
    transition: .15s ease;
}

.svc-card:hover .svc-arrow {
    color: #3f7a18;
    transform: translateX(-3px);
}

/* Mobile drawer services block */
.svc-drawer-block {
    margin: .35rem 0 .55rem;
    padding: .55rem;
    border-radius: 14px;
    background: #f5f7f9;
    border: 1px solid #e8edf2;
    display: grid;
    gap: .35rem;
}

.svc-drawer-title {
    font-size: .72rem;
    font-weight: 800;
    color: #8a9198;
    padding: .2rem .35rem .35rem;
}

.svc-drawer-link {
    display: flex !important;
    align-items: center;
    gap: .7rem;
    padding: .7rem .65rem !important;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #eef1f4;
    text-decoration: none;
    color: inherit !important;
}

.svc-drawer-link strong {
    display: block;
    font-size: .9rem;
}

.svc-drawer-link small {
    display: block;
    margin-top: .15rem;
    color: #8a9198;
    font-size: .72rem;
    font-weight: 600;
    line-height: 1.45;
}

.svc-drawer-ico {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.svc-drawer-ico.tone-orders { background: #fff4e5; color: #d97706; }
.svc-drawer-ico.tone-host { background: #e8f1ff; color: #2563eb; }
.svc-drawer-ico.tone-web { background: #eef8ea; color: #3f7a18; }
.svc-drawer-ico.tone-domain { background: #f3e8ff; color: #7c3aed; }

/* Hide old conflicting header layout leftovers when new header is present */
.site-header:not(.rh-header) { /* keep */ }

@media (max-width: 1100px) {
    .rh-pro .label-long { display: none; }
    .rh-seller .txt { display: none; }
    .rh-search { max-width: 380px; }
    .svc-panel { min-width: min(640px, calc(100vw - 1.5rem)); }
    .svc-panel-inner { grid-template-columns: 180px minmax(0, 1fr); }
}

@media (max-width: 900px) {
    .rh-burger { display: grid; }
    .rh-nav { display: none !important; }
    .rh-header .hm-panel,
    .rh-header .hm-panel.is-open,
    .rh-header .hm-root.is-open .hm-panel,
    .rh-header .hm-backdrop,
    .rh-header .svc-panel,
    .rh-header .svc-root.is-open .svc-panel { display: none !important; }
    .rh-top .rh-pro,
    .rh-top .rh-seller,
    .rh-top .rh-search { display: none; }
    .rh-drawer .rh-search { display: flex; max-width: none; }
    .rh-top-inner { min-height: 64px; gap: .55rem; }
    .rh-actions { gap: .35rem; }
    .rh-logo .rh-brand small { display: none; }
    .rh-logo img,
    .rh-logo .rh-mark { width: 38px; height: 38px; }
}

@media (max-width: 480px) {
    .rh-login .rh-login-txt { font-size: .8rem; }
    .rh-top-inner { min-height: 58px; gap: .4rem; padding: .55rem 0; }
    .rh-logo .rh-brand strong { font-size: 1rem; }
    .rh-logo img,
    .rh-logo .rh-mark { width: 34px; height: 34px; }
    .rh-header .container { width: 100%; padding-inline: 12px; }
}
