.experts-shell-header__row {
    display: grid;
    grid-template-columns: minmax(220px, auto) minmax(0, 1fr) minmax(220px, auto);
    grid-template-areas: "brand nav account";
    align-items: center;
    gap: 24px;
    direction: ltr;
}

.experts-shell-account {
    grid-area: account;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-self: end;
    gap: 8px;
    direction: rtl;
}

.experts-shell-nav {
    grid-area: nav;
    min-width: 0;
    direction: rtl;
}

.experts-shell-brand {
    grid-area: brand;
    justify-self: start;
    flex-direction: row-reverse;
    text-align: right;
    direction: rtl;
}

.experts-create-post-cta {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex: 0 0 auto;
    padding: 9px 14px;
    border: 1px solid #0b57c7;
    border-radius: 12px;
    background: #0b57c7;
    color: #fff;
    box-shadow: 0 6px 16px rgba(11, 87, 199, .18);
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.experts-create-post-cta:hover {
    background: #084ba9;
    color: #fff;
    box-shadow: 0 8px 20px rgba(11, 87, 199, .24);
    transform: translateY(-1px);
}

.experts-create-post-cta svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.experts-mobile-menu-trigger {
    width: 48px;
    height: 48px;
    display: none;
    place-items: center;
    flex: 0 0 48px;
    padding: 0;
    border: 1px solid #c9d8ee;
    border-radius: 13px;
    background: #fff;
    color: var(--primary);
    cursor: pointer;
}

.experts-mobile-menu-trigger:hover,
.experts-mobile-menu-trigger[aria-expanded="true"] {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.experts-mobile-menu-trigger svg {
    width: 24px;
    height: 24px;
}

.experts-account-mobile-main,
.experts-account-mobile-divider {
    display: none;
}

.experts-account-trigger {
    max-width: 280px;
    min-height: 56px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border: 1px solid #d7e1ef;
    border-radius: 15px;
    background: #fff;
    color: var(--text);
    font: inherit;
    text-align: right;
    cursor: pointer;
    transition: .2s ease;
}

.experts-account-trigger:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.experts-account-trigger__avatar,
.experts-account-summary__avatar {
    overflow: hidden;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 900;
}

.experts-account-trigger__avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
}

.experts-account-trigger__avatar img,
.experts-account-summary__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.experts-account-trigger__text {
    min-width: 0;
    display: flex;
    flex: 1;
    flex-direction: column;
    line-height: 1.5;
}

.experts-account-trigger__text strong,
.experts-account-trigger__text small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.experts-account-trigger__text strong {
    font-size: 13px;
}

.experts-account-trigger__text small {
    color: var(--muted);
    font-size: 11px;
}

.experts-account-trigger__arrow {
    color: var(--muted);
}

.experts-account-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    visibility: hidden;
    background: rgba(6, 26, 56, .42);
    opacity: 0;
    transition: .25s ease;
}

.experts-account-backdrop.is-open {
    visibility: visible;
    opacity: 1;
}

.experts-account-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 100;
    width: min(390px, calc(100% - 24px));
    height: 100vh;
    overflow-y: auto;
    padding: 22px;
    background: #fff;
    box-shadow: -20px 0 60px rgba(7, 45, 102, .18);
    transform: translateX(105%);
    transition: transform .28s ease;
}

.experts-account-drawer.is-open {
    transform: translateX(0);
}

.experts-drawer-open {
    overflow: hidden;
}

.experts-account-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    color: var(--primary-dark);
    font-size: 18px;
}

.experts-account-drawer__close {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    color: var(--primary);
    font: inherit;
    font-size: 24px;
    cursor: pointer;
}

.experts-account-summary {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 14px;
    padding: 18px;
    border: 1px solid #dbe5f2;
    border-radius: 18px;
    background: #fbfdff;
}

.experts-account-summary__avatar {
    width: 76px;
    height: 76px;
    font-size: 26px;
}

.experts-account-summary__info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.experts-account-summary__info strong {
    color: var(--primary-dark);
    font-size: 16px;
}

.experts-account-summary__info span,
.experts-account-summary__info small {
    color: var(--muted);
    font-size: 12px;
}

.experts-account-summary__progress {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 12px;
}

.experts-account-summary__progress strong {
    color: var(--primary);
}

.experts-account-summary__progressbar {
    grid-column: 1 / -1;
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5edf7;
}

.experts-account-summary__progressbar span {
    height: 100%;
    display: block;
    border-radius: inherit;
    background: var(--success);
}

.experts-account-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 20px;
}

.experts-account-menu a {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 11px;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.experts-account-menu a:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

.experts-account-menu__badge {
    min-width: 24px;
    min-height: 24px;
    display: grid;
    place-items: center;
    padding-inline: 6px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
}

.experts-account-menu__divider {
    height: 1px;
    margin: 10px 0 6px;
    background: var(--border);
}

.experts-account-menu__label {
    padding: 4px 12px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

@media (max-width: 1100px) {
    .experts-create-post-cta {
        display: none;
    }

    .experts-shell-header__row {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .experts-account-trigger__text {
        display: none;
    }

    .experts-account-trigger {
        width: 58px;
        padding: 7px;
    }

    .experts-account-trigger__arrow {
        display: none;
    }

    .experts-shell-brand .brand-subtitle {
        display: none;
    }
}

@media (max-width: 820px) {
    .experts-shell-header__row {
        min-height: 72px;
        grid-template-columns: auto 1fr auto;
        gap: 12px;
    }

    .experts-shell-nav {
        display: none;
    }

    .experts-mobile-menu-trigger {
        display: grid;
    }

    .experts-account-mobile-main {
        display: grid;
        gap: 4px;
        margin-bottom: 12px;
    }

    .experts-account-mobile-main a {
        display: flex;
        align-items: center;
        min-height: 46px;
        padding: 8px 12px;
        border-radius: 10px;
        color: var(--text);
        font-size: 14px;
        font-weight: 700;
    }

    .experts-account-mobile-main a:hover,
    .experts-account-mobile-main a.is-active {
        background: var(--primary-soft);
        color: var(--primary);
    }

    .experts-account-mobile-divider {
        display: block;
        height: 1px;
        margin: 8px 0 16px;
        background: var(--border);
    }

    .experts-account-menu__search-link {
        display: none !important;
    }


    .experts-shell-brand {
        grid-area: brand;
        justify-self: start;
    }

    .experts-shell-account {
        grid-area: account;
        justify-self: end;
    }

    .experts-shell-guest-actions .btn {
        padding: 10px 12px;
    }

    .experts-shell-brand .brand-title {
        font-size: 19px;
    }
}

/* Expert search typography */
.expert-search-heading .section-eyebrow--block{font-size:14px!important;line-height:1.8!important;margin-bottom:6px!important;font-weight:800!important}.expert-search-heading h1{font-size:clamp(30px,3vw,36px)!important;line-height:1.4!important;margin:0 0 8px!important;font-weight:900!important}.expert-search-heading p{font-size:17px!important;line-height:1.95!important;font-weight:500!important;color:#65758b!important}

/* Expert card steel background */
.expert-result-cover{background:linear-gradient(rgba(15,76,129,.50),rgba(23,43,61,.65)),url("/assets/experts/card-steel-pattern.jpg") center/cover no-repeat!important;border-bottom:3px solid rgba(255,140,66,.85)!important}.expert-result-cover::before,.expert-result-cover::after{display:none!important}

/* Expert profile heading typography */
.profile-page-heading {
    align-items: flex-start;
}

.profile-page-heading > div:first-child {
    width: 100%;
    max-width: 1100px;
}

.profile-page-heading .section-eyebrow--block {
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 1.8;
    font-weight: 800;
}

.profile-page-heading h1 {
    margin: 0 0 8px;
    font-size: clamp(30px, 3vw, 36px);
    line-height: 1.4;
    font-weight: 900;
}

.profile-page-heading p {
    margin: 0;
    max-width: 1050px;
    color: #65758b;
    font-size: 17px;
    line-height: 1.95;
    font-weight: 500;
}

@media (max-width: 768px) {
    .profile-page-heading h1 {
        font-size: 28px;
    }

    .profile-page-heading p {
        font-size: 16px;
    }
}

/* Header gray gradient test */
.experts-shell-header {
    background: linear-gradient(180deg, #ffffff 0%, #f1f3f6 100%);
    border-bottom-color: #d9e0e8;
    box-shadow: 0 6px 22px rgba(18, 43, 73, .045);
}

/* Header gray gradient test */
.experts-shell-header {
    background: linear-gradient(180deg, #f5f6f8 0%, #dce1e7 100%);
    border-bottom-color: #cbd3dc;
    box-shadow: 0 6px 22px rgba(18, 43, 73, .08);
}


/* Unread contact message badge */
.experts-account-trigger__avatar {
    position: relative;
    overflow: visible;
}

.experts-account-trigger__avatar img {
    border-radius: 50%;
}

.experts-account-trigger__badge {
    position: absolute;
    top: -7px;
    right: -7px;
    z-index: 2;
    min-width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    padding: 0 5px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    box-shadow: 0 3px 9px rgba(34, 49, 63, .24);
    font-size: 10px;
    line-height: 1;
    font-weight: 900;
}

.experts-account-menu__logout-link {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 700;
    text-align: right;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease;
}

.experts-account-menu__logout-link:hover {
    background: #eef5ff;
    color: var(--primary);
}


/* Account menu icons */
.experts-account-menu__item {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.experts-account-menu__icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.experts-account-menu__logout-link {
    min-height: 48px;
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    text-align: right;
    cursor: pointer;
    transition: .2s ease;
}

.experts-account-menu__logout-link:hover {
    background: var(--primary-soft);
    color: var(--primary);
}


/* Experts directory sticky page toolbars v1 */
:root {
    --experts-sticky-header-offset: 96px;
    --experts-sticky-toolbar-offset: 188px;
}

.experts-page-toolbar {
    position: sticky;
    top: var(--experts-sticky-header-offset);
    z-index: 18;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 78px;
    margin-bottom: 16px !important;
    padding: 13px 18px;
    border: 1px solid #dce4ed;
    border-radius: 13px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 4px 16px rgba(20, 43, 72, .055);
    backdrop-filter: blur(10px);
}

.experts-page-toolbar h1,
.expert-search-heading.experts-page-toolbar h1,
.favorite-experts-heading.experts-page-toolbar h1,
.saved-searches-heading.experts-page-toolbar h1 {
    margin: 0 0 3px !important;
    font-size: clamp(24px, 2vw, 29px) !important;
    line-height: 1.45 !important;
}

.experts-page-toolbar p,
.expert-search-heading.experts-page-toolbar p,
.favorite-experts-heading.experts-page-toolbar p,
.saved-searches-heading.experts-page-toolbar p {
    margin: 0 !important;
    color: #65758b !important;
    font-size: 13px !important;
    line-height: 1.8 !important;
}

.expert-search-heading.experts-page-toolbar .section-eyebrow--block {
    margin-bottom: 2px !important;
    font-size: 11px !important;
    line-height: 1.5 !important;
}

/* Digikala-like compact result toolbar above the expert cards */
.expert-search-summary {
    position: sticky;
    top: var(--experts-sticky-toolbar-offset);
    z-index: 14;
    min-height: 44px;
    margin: 0 0 12px !important;
    padding: 8px 12px;
    border: 1px solid #dfe5ec;
    border-radius: 11px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 2px 10px rgba(20, 43, 72, .045);
    backdrop-filter: blur(8px);
}

.expert-search-summary .expert-search-clear {
    margin-inline-start: auto;
}

/* Keep the filter rail aligned under the sticky page toolbar */
.expert-search-panel {
    top: var(--experts-sticky-toolbar-offset) !important;
}

/* Active state inside the account drawer */
.experts-account-menu a.is-active {
    background: var(--primary-soft);
    color: var(--primary);
}

@media (max-width: 980px) {
    :root {
        --experts-sticky-header-offset: 84px;
    }

    .experts-page-toolbar {
        top: var(--experts-sticky-header-offset);
        min-height: 70px;
        padding: 11px 14px;
    }

    .expert-search-summary {
        position: static;
    }

    .expert-search-panel {
        top: auto !important;
    }
}

@media (max-width: 700px) {
    .experts-page-toolbar {
        position: static;
        align-items: flex-start;
        flex-direction: column;
        gap: 9px;
    }

    .experts-page-toolbar h1,
    .expert-search-heading.experts-page-toolbar h1,
    .favorite-experts-heading.experts-page-toolbar h1,
    .saved-searches-heading.experts-page-toolbar h1 {
        font-size: 24px !important;
    }
}

/* Experts directory toolbar behavior refinement */
.experts-page-toolbar {
    position: static;
    top: auto;
    z-index: auto;
    backdrop-filter: none;
}

.expert-search-summary {
    position: static;
    top: auto;
    z-index: auto;
    backdrop-filter: none;
}

/* Keep only the filter sidebar sticky */
.expert-search-panel {
    top: 92px !important;
}
