@font-face {
    font-family: 'Vazirmatn';
    src: url('/assets/experts/fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('/assets/experts/fonts/Vazirmatn-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('/assets/experts/fonts/Vazirmatn-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('/assets/experts/fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary: #0b3a82;
    --primary-dark: #072d66;
    --primary-soft: #edf4ff;
    --accent: #f28c28;
    --accent-soft: #fff3e7;
    --text: #15345f;
    --muted: #6c7a91;
    --bg: #f4f7fb;
    --card: #ffffff;
    --border: #dfe6f1;
    --success: #1f9d79;
    --shadow: 0 16px 40px rgba(12, 42, 89, 0.08);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 14px;
    --container: 1280px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    direction: rtl;
    font-family: 'Vazirmatn', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input {
    font-family: inherit;
}

.container {
    width: min(calc(100% - 48px), var(--container));
    margin: 0 auto;
}

.site-header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(11, 58, 130, 0.08);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 20;
}

.header-row {
    min-height: 84px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.header-brand img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.brand-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

.header-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.header-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 28px;
    margin: 0;
    padding: 0;
}

.header-nav a {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    transition: color 0.2s ease;
}

.header-nav a:hover,
.header-nav a.is-active {
    color: var(--primary);
}

.header-actions {
    margin-inline-start: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 12px;
    border: 1px solid transparent;
    padding: 13px 20px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 10px 20px rgba(242, 140, 40, 0.22);
}

.btn-primary:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
}

.btn-outline {
    background: #fff;
    border-color: #c9d8ee;
    color: var(--primary);
}

.btn-outline:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.hero {
    padding: 28px 0 18px;
}

.hero-slider {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--primary-dark);
}

.hero-slide {
    display: none;
    min-height: 430px;
    position: relative;
}

.hero-slide.is-active {
    display: grid;
    grid-template-columns: 1fr;
}

.hero-media {
    position: absolute;
    inset: 0;
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(5, 24, 57, 0.25) 0%, rgba(5, 24, 57, 0.48) 38%, rgba(5, 24, 57, 0.75) 100%),
        linear-gradient(180deg, rgba(7, 34, 77, 0.16) 0%, rgba(7, 34, 77, 0.72) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(100%, 620px);
    margin-inline-start: auto;
    padding: 56px 56px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 430px;
    text-align: right;
    color: #fff;
}

.section-eyebrow {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 10px;
}

.hero-title {
    margin: 0 0 12px;
    font-size: clamp(34px, 4vw, 48px);
    line-height: 1.45;
    font-weight: 700;
}

.hero-text {
    margin: 0 0 24px;
    font-size: 17px;
    line-height: 2;
    color: rgba(255, 255, 255, 0.9);
}

.hero-search {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 18px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 16px 28px rgba(4, 19, 45, 0.18);
    margin-bottom: 16px;
}

.hero-search input {
    flex: 1;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 15px;
    outline: none;
}

.hero-search input::placeholder {
    color: #8a97ad;
}

.hero-search-button {
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 14px;
    background: var(--primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.hero-tag {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
}

.hero-note {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.88);
}

.hero-nav {
    position: absolute;
    inset-inline: 18px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.hero-arrow {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(4px);
    pointer-events: auto;
}

.hero-dots {
    position: absolute;
    z-index: 3;
    inset-inline-start: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    border: 0;
    padding: 0;
    cursor: pointer;
}

.hero-dot.is-active {
    width: 24px;
    background: #fff;
}

.section {
    padding: 34px 0;
}

.section-header {
    margin-bottom: 18px;
}

.section-header.compact {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
}

.section-header h2 {
    margin: 0 0 6px;
    font-size: clamp(30px, 3vw, 42px);
    line-height: 1.45;
    font-weight: 700;
    color: var(--primary-dark);
}

.section-header p {
    margin: 0;
    font-size: 15px;
    color: var(--muted);
}

.section-eyebrow--block {
    display: inline-block;
    font-size: 15px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 10px;
}

.notice-strip {
    background: linear-gradient(90deg, #174389 0%, #0a2d67 100%);
    border-radius: 24px;
    color: #fff;
    padding: 26px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    box-shadow: var(--shadow);
}

.notice-strip h3 {
    margin: 0 0 6px;
    font-size: 28px;
    line-height: 1.6;
}

.notice-strip p {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 15px;
}

.steps-board {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 26px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
}

.step-card {
    position: relative;
    padding: 26px 18px 24px;
    min-height: 190px;
    text-align: center;
    background: #fff;
}

.step-card:not(:last-child) {
    border-left: 1px solid var(--border);
}

.step-card:not(:last-child)::after {
    content: "←";
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #eef3fb;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    z-index: 2;
}

.step-number {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    margin: 0 auto 14px;
    background: #eef4ff;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
}

.step-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    margin: 0 auto 16px;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-icon svg {
    width: 26px;
    height: 26px;
}

.step-card h3 {
    margin: 0 0 8px;
    font-size: 20px;
    line-height: 1.6;
    color: var(--primary-dark);
}

.step-card p {
    margin: 0;
    font-size: 14px;
    color: var(--muted);
    line-height: 1.9;
}

.access-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.access-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 26px;
    box-shadow: var(--shadow);
    min-height: 232px;
    display: flex;
    flex-direction: column;
    align-items: start;
}

.access-card__icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: #eef4ff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.access-card__icon svg {
    width: 28px;
    height: 28px;
}

.access-card h3 {
    margin: 0 0 10px;
    font-size: 24px;
    line-height: 1.6;
    color: var(--primary-dark);
}

.access-card p {
    margin: 0 0 18px;
    font-size: 15px;
    color: var(--muted);
    line-height: 2;
}

.access-card .btn-link {
    margin-top: auto;
}

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
}

.experts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.expert-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 18px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.expert-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.favorite-button {
    width: 40px;
    height: 40px;
    border: 1px solid #d6e0ef;
    background: #fff;
    color: #8ea0bd;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.favorite-button svg {
    width: 18px;
    height: 18px;
}

.expert-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #f2f6fd;
    margin-inline-start: auto;
}

.expert-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.expert-card h3 {
    margin: 0 0 4px;
    font-size: 19px;
    line-height: 1.7;
    color: var(--primary-dark);
}

.expert-role {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 4px;
}

.expert-meta {
    font-size: 13px;
    color: #8898b1;
    margin-bottom: 14px;
}

.expert-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
}

.badge {
    padding: 6px 10px;
    border-radius: 999px;
    background: #f1f5fb;
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
}

.expert-locked {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fbff;
    border: 1px dashed #c8d8ee;
    color: #61738f;
    font-size: 13px;
}

.search-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 26px;
    box-shadow: var(--shadow);
    padding: 22px;
}

.search-panel__top {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-bottom: 18px;
}

.search-panel h3 {
    margin: 0 0 8px;
    font-size: 32px;
    line-height: 1.5;
    color: var(--primary-dark);
}

.search-panel p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
}

.search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.search-field {
    border: 1px solid #d5dfed;
    border-radius: 14px;
    height: 54px;
    padding: 0 16px;
    font-size: 15px;
    color: var(--text);
    background: #fff;
    outline: none;
}

.search-help {
    margin-top: 12px;
    font-size: 13px;
    color: #8393aa;
}

.footer-cta {
    margin-top: 8px;
    background: linear-gradient(90deg, #18428a 0%, #0a2f69 100%);
    border-radius: 26px;
    color: #fff;
    padding: 28px 30px;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    box-shadow: var(--shadow);
}

.footer-cta h3 {
    margin: 0 0 6px;
    font-size: 28px;
    line-height: 1.5;
}

.footer-cta p {
    margin: 0;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.88);
}

.site-footer {
    margin-top: 40px;
    padding: 0;
    background: #123a76;
    color: rgba(255, 255, 255, 0.9);
    overflow: hidden;
}

.footer-main {
    padding: 48px 0 42px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.8fr 0.8fr;
    gap: 56px;
    align-items: start;
}

.footer-about {
    max-width: 470px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-brand img {
    width: 60px;
    height: 60px;
    flex: 0 0 60px;
    object-fit: contain;
}

.footer-brand h4 {
    margin: 0 0 4px;
    font-size: 20px;
    line-height: 1.5;
    color: #fff;
}

.footer-brand p {
    margin: 0;
}

.footer-brand p,
.footer-links a,
.footer-meta {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.78);
}

.footer-meta {
    max-width: 430px;
    margin: 20px 0 0;
    line-height: 2.1;
}

.footer-column {
    padding-top: 4px;
}

.footer-column h5 {
    position: relative;
    margin: 0 0 20px;
    padding-bottom: 12px;
    font-size: 15px;
    line-height: 1.7;
    font-weight: 700;
    color: #fff;
}

.footer-column h5::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 30px;
    height: 3px;
    border-radius: 999px;
    background: var(--accent);
}

.footer-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 11px;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

.footer-links a:hover {
    color: #fff;
    transform: translateX(-4px);
}

.footer-bottom-bar {
    width: 100%;
    background: #061b3e;
}

.footer-bottom {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 0;
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
}

@media (max-width: 980px) {
    .footer-grid {
        gap: 32px;
    }

    .footer-about {
        max-width: none;
    }
}

@media (max-width: 720px) {
    .footer-main {
        padding: 38px 0 34px;
    }

    .footer-brand img {
        width: 52px;
        height: 52px;
        flex-basis: 52px;
    }

    .footer-bottom {
        min-height: 58px;
    }
}

@media (max-width: 1200px) {
    .experts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .step-card {
        min-height: auto;
    }

    .step-card:not(:last-child)::after {
        display: none;
    }

    .search-form {
        grid-template-columns: 1fr 1fr;
    }

    .search-form .btn {
        grid-column: 1 / -1;
    }
}

@media (max-width: 980px) {
    .header-row {
        flex-wrap: wrap;
        justify-content: space-between;
        padding: 14px 0;
    }

    .header-nav {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .header-nav ul {
        width: max-content;
    }

    .hero-content {
        width: 100%;
        padding: 40px 24px 48px;
    }

    .access-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .notice-strip,
    .footer-cta,
    .search-panel__top {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 720px) {
    .container {
        width: min(calc(100% - 28px), var(--container));
    }

    .header-actions {
        width: 100%;
        justify-content: flex-start;
        margin-inline-start: 0;
    }

    .hero-slide {
        min-height: 500px;
    }

    .hero-title {
        font-size: 30px;
    }

    .hero-text {
        font-size: 15px;
    }

    .hero-search {
        flex-wrap: wrap;
    }

    .hero-search-button {
        width: 48px;
        height: 48px;
    }

    .section-header h2,
    .search-panel h3 {
        font-size: 28px;
    }

    .steps-grid,
    .experts-grid,
    .search-form {
        grid-template-columns: 1fr;
    }

    .step-card:not(:last-child) {
        border-left: 0;
        border-bottom: 1px solid var(--border);
    }
}

/* === EXPERTS FULL WIDTH ALIGNMENT FIX === */

/*
|--------------------------------------------------------------------------
| Full-width page structure
|--------------------------------------------------------------------------
*/

.container {
    width: calc(100% - 48px);
    max-width: none;
    margin-inline: auto;
}

.section {
    width: 100%;
}

.hero {
    width: 100%;
    padding-top: 28px;
}

/*
|--------------------------------------------------------------------------
| Header alignment
|--------------------------------------------------------------------------
*/

.header-row {
    min-height: 84px;
    display: grid;
    grid-template-columns:
        minmax(220px, 1fr)
        auto
        minmax(220px, 1fr);
    align-items: center;
    gap: 28px;
}

.header-brand {
    justify-self: start;
    align-self: center;
}

.header-nav {
    width: auto;
    justify-self: center;
    align-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-nav ul {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

.header-nav li,
.header-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-actions {
    justify-self: end;
    align-self: center;
    margin-inline-start: 0;
}

/*
|--------------------------------------------------------------------------
| Full-width centered hero
|--------------------------------------------------------------------------
*/

.hero-slider {
    width: 100%;
    min-height: 500px;
}

.hero-slide {
    width: 100%;
    min-height: 500px;
}

.hero-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-content {
    width: min(100%, 900px);
    min-height: 500px;
    margin-inline: auto;
    padding: 55px 70px 65px;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-title {
    max-width: 820px;
    margin-inline: auto;
    text-align: center;
}

.hero-text {
    max-width: 760px;
    margin-inline: auto;
    text-align: center;
}

.hero-search {
    width: min(100%, 780px);
    margin-inline: auto;
}

.hero-tags {
    justify-content: center;
}

.hero-note {
    width: 100%;
    text-align: center;
}

/*
|--------------------------------------------------------------------------
| Orange section labels
|--------------------------------------------------------------------------
*/

.section-eyebrow,
.section-eyebrow--block {
    font-size: 17px;
    line-height: 1.7;
    font-weight: 700;
}

.section-header h2 {
    margin-top: 4px;
}

/*
|--------------------------------------------------------------------------
| Expert journey
|--------------------------------------------------------------------------
*/

.steps-grid {
    direction: rtl;
}

.step-card {
    min-height: 245px;
    padding: 28px 20px 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
}

.step-number {
    order: 1;
    width: 42px;
    height: 42px;
    margin: 0 auto 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    color: #ffffff;
    background: var(--primary);
    border: 4px solid #e8f0ff;
    border-radius: 50%;
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 7px 18px rgba(11, 58, 130, 0.18);
}

.step-card h3 {
    order: 2;
    margin: 0 0 9px;
    font-size: 20px;
    line-height: 1.7;
}

.step-card p {
    order: 3;
    min-height: 58px;
    margin: 0;
    font-size: 14px;
    line-height: 2;
}

.step-icon {
    order: 4;
    width: 62px;
    height: 62px;
    margin: 18px auto 0;
    flex: 0 0 62px;
    background: #eaf2ff;
    border: 1px solid #d9e7fb;
    border-radius: 19px;
}

.step-icon svg {
    width: 29px;
    height: 29px;
}

.step-card:not(:last-child)::after {
    top: 50%;
    width: 28px;
    height: 28px;
    color: #ffffff;
    background: var(--primary);
    border: 4px solid #edf3fc;
    font-size: 14px;
}

/*
|--------------------------------------------------------------------------
| Desktop section widths
|--------------------------------------------------------------------------
*/

.notice-strip,
.steps-board,
.access-grid,
.experts-grid,
.search-panel,
.footer-cta {
    width: 100%;
}

/*
|--------------------------------------------------------------------------
| Responsive
|--------------------------------------------------------------------------
*/

@media (max-width: 980px) {
    .header-row {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        padding-block: 14px;
    }

    .header-brand,
    .header-actions {
        justify-self: auto;
    }

    .header-nav {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
    }

    .header-nav ul {
        width: max-content;
        justify-content: flex-start;
    }

    .hero-content {
        width: min(100%, 820px);
        padding-inline: 45px;
    }
}

@media (max-width: 720px) {
    .container {
        width: calc(100% - 28px);
    }

    .hero-slider,
    .hero-slide,
    .hero-content {
        min-height: 530px;
    }

    .hero-content {
        padding: 45px 25px 75px;
    }

    .hero-title {
        font-size: 30px;
    }

    .section-eyebrow,
    .section-eyebrow--block {
        font-size: 15px;
    }

    .step-card {
        min-height: auto;
    }

    .step-card p {
        min-height: auto;
    }

    .step-card:not(:last-child)::after {
        display: none;
    }
}

/* === HERO STATIC CONTENT AND TITLE SCALE FIX === */

/*
|--------------------------------------------------------------------------
| Hero slider: only background image changes
|--------------------------------------------------------------------------
*/

.hero-slider {
    position: relative;
    overflow: hidden;
}

.hero-slide,
.hero-slide.is-active {
    position: absolute;
    inset: 0;
    width: 100%;
    min-height: 500px;
    display: block;
}

.hero-slide .hero-media {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.65s ease;
}

.hero-slide .hero-overlay {
    z-index: 1;
    opacity: 0;
    transition: opacity 0.65s ease;
}

.hero-slide.is-active .hero-media,
.hero-slide.is-active .hero-overlay {
    opacity: 1;
}

.hero-slide:first-of-type .hero-content {
    position: relative;
    z-index: 5;
    display: flex;
    visibility: visible;
    opacity: 1;
}

.hero-slide:not(:first-of-type) {
    pointer-events: none;
}

.hero-slide:not(:first-of-type) .hero-content {
    display: none !important;
}

/*
|--------------------------------------------------------------------------
| Section title scale
|--------------------------------------------------------------------------
*/

.section-header h2 {
    font-size: 32px;
    line-height: 1.55;
}

.search-panel h3 {
    font-size: 32px;
    line-height: 1.55;
}

@media (max-width: 720px) {
    .section-header h2,
    .search-panel h3 {
        font-size: 28px;
    }
}

/* === EXPERT CARD SEARCH SPACING HERO FIX === */

/*
|--------------------------------------------------------------------------
| Show more of the Hero background image
|--------------------------------------------------------------------------
*/

.hero-overlay {
    background:
        linear-gradient(
            90deg,
            rgba(5, 24, 57, 0.10) 0%,
            rgba(5, 24, 57, 0.25) 48%,
            rgba(5, 24, 57, 0.48) 100%
        ),
        linear-gradient(
            180deg,
            rgba(7, 34, 77, 0.05) 0%,
            rgba(7, 34, 77, 0.38) 100%
        );
}

/*
|--------------------------------------------------------------------------
| Expert card avatar position
|--------------------------------------------------------------------------
*/

.expert-avatar {
    margin-top: 14px;
}

.expert-card__head {
    min-height: 116px;
}

/*
|--------------------------------------------------------------------------
| Search section spacing
|--------------------------------------------------------------------------
*/

.footer-cta {
    margin-top: 34px;
}

.search-panel__top {
    display: block;
}

.search-panel__top > div {
    width: 100%;
}

@media (max-width: 720px) {
    .expert-avatar {
        margin-top: 10px;
    }

    .footer-cta {
        margin-top: 26px;
    }
}

/* ---------------------------------------------------------
   Expert profile completion
--------------------------------------------------------- */

textarea,
select {
    font-family: inherit;
}

.profile-page {
    min-height: 100vh;
}

.profile-header-title {
    flex: 1;
    text-align: center;
    font-size: 17px;
    font-weight: 700;
    color: var(--primary);
}

.profile-main {
    padding: 42px 0 70px;
}

.profile-page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 26px;
}

.profile-page-heading h1 {
    margin: 4px 0 8px;
    font-size: clamp(28px, 4vw, 38px);
    line-height: 1.5;
    color: var(--text);
}

.profile-page-heading p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    font-size: 15px;
}

.profile-member-summary {
    min-width: 250px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(12, 42, 89, 0.05);
}

.profile-member-summary strong,
.profile-member-summary span {
    display: block;
}

.profile-member-summary strong {
    color: var(--text);
    font-size: 15px;
}

.profile-member-summary span {
    margin-top: 2px;
    direction: ltr;
    text-align: right;
    color: var(--muted);
    font-size: 13px;
}

.profile-member-avatar {
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 21px;
    font-weight: 700;
}

.profile-form {
    display: grid;
    gap: 16px;
}

.profile-form-card {
    padding: 22px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(12, 42, 89, 0.05);
}

.profile-form-card__header {
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.profile-form-card__header > div {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.profile-form-card__header h2 {
    margin: 0 0 4px;
    font-size: 20px;
    color: var(--text);
}

.profile-form-card__header p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.profile-form-step {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 700;
}

.profile-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group--full {
    grid-column: 1 / -1;
}

.form-group label {
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

.form-group label span {
    color: #c53b3b;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    border: 1px solid #cfd9e8;
    border-radius: 13px;
    background: #fff;
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.form-group input,
.form-group select {
    min-height: 44px;
    padding: 0 14px;
}

.form-group textarea {
    min-height: 120px;
    padding: 13px 14px;
    resize: vertical;
    line-height: 1.9;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(11, 58, 130, 0.08);
}

.form-group small,
.form-field-footer {
    color: var(--muted);
    font-size: 12px;
}

.form-field-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.profile-image-field {
    display: flex;
    align-items: center;
    gap: 26px;
}

.profile-image-preview {
    width: 150px;
    height: 150px;
    flex: 0 0 150px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #c9d8ee;
    border-radius: 28px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 42px;
    font-weight: 700;
}

.profile-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-image-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 13px;
}

.profile-image-rules {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.profile-image-rules span {
    padding: 5px 10px;
    border-radius: 999px;
    background: #f5f7fb;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
}

.profile-image-message {
    min-height: 24px;
    font-size: 13px;
    font-weight: 600;
}

.profile-image-message.is-error {
    color: #b42318;
}

.profile-image-message.is-success {
    color: var(--success);
}

.form-alert {
    margin-bottom: 22px;
    padding: 16px 18px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.form-alert ul {
    margin: 8px 0 0;
    padding-right: 22px;
}

.form-alert--success {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #176b52;
}

.form-alert--error {
    background: #fff1f1;
    border-color: #fecaca;
    color: #9f2d2d;
}

.profile-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 4px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    clip-path: inset(50%) !important;
}

@media (max-width: 900px) {
    .profile-header-title {
        display: none;
    }

    .profile-page-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .profile-member-summary {
        min-width: 0;
    }
}

@media (max-width: 680px) {
    .profile-main {
        padding-top: 28px;
    }

    .profile-form-card {
        padding: 20px;
        border-radius: 20px;
    }

    .profile-form-grid {
        grid-template-columns: 1fr;
    }

    .form-group--full {
        grid-column: auto;
    }

    .profile-image-field {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-image-preview {
        width: 130px;
        height: 130px;
        flex-basis: 130px;
    }

    .profile-form-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .profile-form-actions .btn {
        width: 100%;
    }
}

/* ---------------------------------------------------------
   Profile progress and autosave
--------------------------------------------------------- */

.profile-progress-card {
    margin-bottom: 16px;
    padding: 24px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(12, 42, 89, 0.05);
}

.profile-progress-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 16px;
}

.profile-progress-summary > div:first-child {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.profile-progress-summary strong {
    color: var(--text);
    font-size: 17px;
}

.profile-progress-summary span {
    color: var(--muted);
    font-size: 13px;
}

.profile-completion {
    min-width: 240px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-completion__value {
    min-width: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-completion__value span {
    color: var(--primary);
    font-size: 20px;
    font-weight: 800;
}

.profile-completion__value small {
    color: var(--muted);
    font-size: 11px;
}

.profile-completion__track {
    height: 9px;
    flex: 1;
    overflow: hidden;
    border-radius: 999px;
    background: #e8eef7;
}

.profile-completion__track span {
    display: block;
    height: 100%;
    min-width: 0;
    border-radius: inherit;
    background: var(--primary);
    transition: width 0.35s ease;
}

.profile-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.profile-step {
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: #f8fafc;
    opacity: 0.72;
}

.profile-step.is-active {
    border-color: rgba(11, 58, 130, 0.24);
    background: var(--primary-soft);
    opacity: 1;
}

.profile-step__number {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: #e4eaf3;
    color: var(--muted);
    font-weight: 800;
}

.profile-step.is-active .profile-step__number {
    background: var(--primary);
    color: #fff;
}

.profile-step__text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.profile-step__text strong {
    color: var(--text);
    font-size: 13px;
}

.profile-step__text small {
    color: var(--muted);
    font-size: 11px;
}

.profile-autosave-status {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 18px;
    padding: 9px 13px;
    border-radius: 12px;
    background: #f7f9fc;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.profile-autosave-status__dot {
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    border-radius: 50%;
    background: #a8b3c3;
}

.profile-autosave-status[data-state="changed"] {
    background: #fff8e6;
    color: #8a6415;
}

.profile-autosave-status[data-state="changed"]
.profile-autosave-status__dot {
    background: #d89b19;
}

.profile-autosave-status[data-state="saving"] {
    background: #eef4ff;
    color: var(--primary);
}

.profile-autosave-status[data-state="saving"]
.profile-autosave-status__dot {
    background: var(--primary);
    animation: profile-autosave-pulse 1s infinite;
}

.profile-autosave-status[data-state="saved"] {
    background: #ecfdf5;
    color: #176b52;
}

.profile-autosave-status[data-state="saved"]
.profile-autosave-status__dot {
    background: var(--success);
}

.profile-autosave-status[data-state="error"] {
    background: #fff1f1;
    color: #9f2d2d;
}

.profile-autosave-status[data-state="error"]
.profile-autosave-status__dot {
    background: #c53b3b;
}

@keyframes profile-autosave-pulse {
    0%,
    100% {
        opacity: 0.4;
        transform: scale(0.85);
    }

    50% {
        opacity: 1;
        transform: scale(1.15);
    }
}

@media (max-width: 900px) {
    .profile-progress-summary {
        align-items: stretch;
        flex-direction: column;
        gap: 16px;
    }

    .profile-completion {
        min-width: 0;
    }

    .profile-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .profile-progress-card {
        padding: 18px;
    }

    .profile-steps {
        grid-template-columns: 1fr;
    }

    .profile-step {
        min-height: 64px;
    }
}

/* ---------------------------------------------------------
   Professional profile step
--------------------------------------------------------- */

.profile-step.is-completed {
    border-color: #a7f3d0;
    background: #ecfdf5;
    opacity: 1;
}

.profile-step.is-completed .profile-step__number {
    background: var(--success);
    color: #fff;
}

.profile-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.profile-checkbox input {
    width: 19px;
    height: 19px;
    min-height: 0;
}

.profile-inline-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}

.competency-list {
    display: grid;
    gap: 12px;
    margin-top: 26px;
}

.competency-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 17px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: #f9fbfe;
}

.competency-item__content {
    min-width: 0;
}

.competency-item__title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
}

.competency-item__title strong {
    color: var(--text);
    font-size: 15px;
}

.competency-item__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 8px;
}

.competency-item__meta span,
.profile-badge {
    padding: 4px 9px;
    border-radius: 999px;
    background: #edf2f8;
    color: var(--muted);
    font-size: 11px;
}

.profile-badge {
    background: var(--primary-soft);
    color: var(--primary);
}

.competency-item p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.8;
}

.btn-small {
    min-height: 36px;
    padding: 7px 13px;
    font-size: 12px;
}

.keyword-editor {
    display: grid;
    gap: 15px;
}

.keyword-editor__input-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.keyword-editor__input-wrap {
    position: relative;
    flex: 1;
}

.keyword-editor__input-wrap > input {
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid #cfd9e8;
    border-radius: 13px;
    font: inherit;
    outline: none;
}

.keyword-editor__input-wrap > input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(11, 58, 130, 0.08);
}

.keyword-suggestions {
    position: absolute;
    z-index: 20;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    overflow: hidden;
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 16px 35px rgba(12, 42, 89, 0.13);
}

.keyword-suggestions button {
    width: 100%;
    padding: 11px 13px;
    border: 0;
    border-bottom: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    text-align: right;
    font: inherit;
    cursor: pointer;
}

.keyword-suggestions button:hover {
    background: var(--primary-soft);
}

.keyword-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    min-height: 44px;
}

.keyword-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 11px;
    border: 1px solid rgba(11, 58, 130, 0.16);
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

@media (max-width: 680px) {
    .competency-item {
        align-items: stretch;
        flex-direction: column;
    }

    .competency-item form,
    .competency-item .btn {
        width: 100%;
    }

    .keyword-editor__input-row {
        flex-direction: column;
    }

    .keyword-editor__input-wrap,
    .keyword-editor__input-row .btn {
        width: 100%;
    }
}

/* ---------------------------------------------------------
   Persian birth-date picker
--------------------------------------------------------- */

jdp-container {
    --jdp-primary: var(--primary);
    z-index: 3000 !important;
    font-family: inherit;
}

jdp-container select,
jdp-container input,
jdp-container button {
    font-family: inherit;
}

.form-group input[readonly] {
    background: #f5f7fb;
    color: var(--muted);
    cursor: default;
}

/* ---------------------------------------------------------
   History profile step
--------------------------------------------------------- */

.history-record-list {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.history-record {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: #f9fbfe;
}

.history-record > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.history-record strong {
    color: var(--text);
    font-size: 14px;
}

.history-record span {
    color: var(--primary);
    font-size: 13px;
}

.history-record small {
    color: var(--muted);
    font-size: 12px;
}

@media (max-width: 680px) {
    .history-record {
        align-items: stretch;
        flex-direction: column;
    }

    .history-record form,
    .history-record .btn {
        width: 100%;
    }
}

/* ---------------------------------------------------------
   Expert review step
--------------------------------------------------------- */

.review-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.review-card {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: 0 10px 30px rgba(12, 42, 89, 0.05);
}

.review-card h2 {
    margin: 0 0 18px;
    color: var(--text);
    font-size: 17px;
}

.review-card dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
}

.review-card dl > div {
    min-width: 0;
}

.review-card__full {
    grid-column: 1 / -1;
}

.review-card dt {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 11px;
}

.review-card dd {
    margin: 0;
    color: var(--text);
    font-size: 13px;
    line-height: 1.9;
}

.review-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.review-tags span {
    padding: 7px 10px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 11px;
}

.review-tags--secondary {
    margin-top: 13px;
}

.review-tags--secondary span {
    background: #f0f3f8;
    color: var(--muted);
}

.review-confirmations {
    display: grid;
    gap: 12px;
}

.review-confirmation {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #f9fbfe;
    cursor: pointer;
}

.review-confirmation input {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    margin-top: 2px;
}

.review-confirmation span {
    color: var(--text);
    font-size: 13px;
    line-height: 1.8;
}

.profile-form fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.profile-form fieldset:disabled {
    opacity: 0.75;
}

@media (max-width: 800px) {
    .review-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .review-card dl {
        grid-template-columns: 1fr;
    }

    .review-card__full {
        grid-column: auto;
    }
}

/* ---------------------------------------------------------
   Primary competency actions
--------------------------------------------------------- */

.competency-item__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.review-primary-form {
    margin: 0;
}

.review-primary-form button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid rgba(11, 58, 130, 0.18);
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font: inherit;
    font-size: 11px;
    cursor: pointer;
}

.review-primary-form button:hover {
    border-color: var(--primary);
}

.review-primary-form small {
    color: var(--muted);
    font-size: 10px;
}

.review-tags span.is-primary {
    background: #ecfdf5;
    color: #176b52;
    font-weight: 700;
}

@media (max-width: 680px) {
    .competency-item__actions,
    .competency-item__actions form,
    .competency-item__actions .btn {
        width: 100%;
    }
}

/* ---------------------------------------------------------
   Clickable expert wizard steps
--------------------------------------------------------- */

.profile-step {
    display: block;
    padding: 0;
}

.profile-step__link {
    width: 100%;
    min-height: inherit;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px;
    border-radius: inherit;
    color: inherit;
    text-decoration: none;
    transition:
        background-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.profile-step__link:hover {
    background: rgba(11, 58, 130, 0.045);
    transform: translateY(-1px);
}

.profile-step__link:focus-visible {
    outline: 3px solid rgba(11, 58, 130, 0.18);
    outline-offset: 2px;
}

.profile-step.is-active .profile-step__link {
    cursor: default;
}

.profile-step.is-completed .profile-step__link:hover {
    background: rgba(22, 163, 116, 0.06);
}


/* Account hamburger menu */
.account-menu {
    position: relative;
}

.account-menu__toggle {
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid #c9d8ee;
    border-radius: 14px;
    background: #fff;
    color: var(--primary);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(12, 42, 89, 0.08);
    transition: all 0.2s ease;
}

.account-menu__toggle:hover,
.account-menu__toggle[aria-expanded="true"] {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.account-menu__toggle span {
    width: 21px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 0.2s ease;
}

.account-menu__panel {
    position: absolute;
    z-index: 100;
    top: calc(100% + 12px);
    inset-inline-end: 0;
    width: min(330px, calc(100vw - 32px));
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(12, 42, 89, 0.18);
}

.account-menu__panel[hidden] {
    display: none;
}

.account-menu__head {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--primary-soft);
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.account-menu__name {
    color: var(--primary-dark);
    font-size: 15px;
    font-weight: 800;
}

.account-menu__caption {
    color: var(--muted);
    font-size: 12px;
}

.account-menu__items {
    padding: 9px;
    display: flex;
    flex-direction: column;
}

.account-menu__item {
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 11px;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: all 0.18s ease;
}

.account-menu__item:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

.account-menu__item--admin {
    color: #9a4b00;
}

.account-menu__item--admin:hover {
    background: var(--accent-soft);
    color: #9a4b00;
}

.account-menu__badge {
    min-width: 24px;
    height: 24px;
    padding-inline: 6px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.account-menu__separator {
    height: 1px;
    margin: 8px 4px;
    background: var(--border);
}

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

@media (max-width: 720px) {
    .account-menu__panel {
        position: fixed;
        top: 76px;
        inset-inline: 16px;
        width: auto;
    }
}
/* Account menu right-side alignment */
.header-actions {
    order: -1;
    margin-inline-start: 0;
    margin-inline-end: 0;
}

.account-menu__panel {
    inset-inline-start: 0;
    inset-inline-end: auto;
}

@media (max-width: 720px) {
    .account-menu__panel {
        inset-inline: 16px;
    }
}


/* Account drawer menu */
body.account-drawer-open {
    overflow: hidden;
}

.account-menu__panel {
    position: fixed;
    z-index: 1002;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    inset-inline: auto;
    width: min(380px, 90vw);
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    border: 0;
    border-left: 1px solid var(--border);
    border-radius: 0;
    background: #fff;
    box-shadow: -24px 0 60px rgba(12, 42, 89, 0.22);
    transform: translateX(105%);
    transition: transform 0.25s ease;
}

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

.account-menu__head {
    position: relative;
    min-height: 100px;
    padding: 24px 66px 20px 22px;
}

.account-menu__close {
    position: absolute;
    top: 20px;
    right: 18px;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid #c9d8ee;
    border-radius: 11px;
    background: #fff;
    color: var(--primary);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

.account-menu__overlay {
    position: fixed;
    z-index: 1001;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(4, 18, 42, 0.52);
    opacity: 0;
    cursor: default;
    transition: opacity 0.25s ease;
}

.account-menu__overlay.is-open {
    opacity: 1;
}

.account-menu__overlay[hidden],
.account-menu__panel[hidden] {
    display: none;
}

@media (max-width: 720px) {
    .account-menu__panel {
        top: 0;
        right: 0;
        bottom: 0;
        left: auto;
        inset-inline: auto;
        width: min(340px, 92vw);
    }
}

/* Final account drawer alignment */
.header-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "nav brand account";
    align-items: center;
    gap: 16px;
    direction: ltr;
}

.header-nav {
    grid-area: nav;
    direction: rtl;
}

.header-brand {
    grid-area: brand;
    direction: rtl;
}

.header-actions {
    grid-area: account;
    direction: rtl;
    order: 0;
    margin: 0;
}

.account-menu {
    position: static;
}

.account-menu__panel {
    position: fixed;
    z-index: 10002;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    inset-inline: auto;
    width: min(380px, 92vw);
    height: 100vh;
    height: 100dvh;
    opacity: 1;
    pointer-events: auto;
    background: #fff;
}

.account-menu__overlay {
    z-index: 10001;
}

@media (max-width: 980px) {
    .header-row {
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 12px;
    }
}

/* ---------------------------------------------------------
   Profile section guide
--------------------------------------------------------- */

.profile-section-guide {
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid #d9e5f3;
    border-radius: 12px;
    background: #f7faff;
}

.profile-section-guide strong {
    display: block;
    margin-bottom: 4px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
}

.profile-section-guide p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.9;
}

.profile-location-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

@media (max-width: 680px) {
    .profile-location-grid {
        grid-template-columns: 1fr;
    }
}

/* Basic profile page spacing */
#expert-basic-form + .profile-form-card {
    margin-top: 16px;
}

#expert-basic-form + .profile-form-card + .profile-form-actions {
    margin-top: 16px;
}

/* Professional profile page spacing */
#professional-autosave-form + .profile-form-card,
#professional-autosave-form + .profile-form-card + .profile-form-card,
#professional-autosave-form + .profile-form-card + .profile-form-card + .profile-form-actions {
    margin-top: 16px;
}

/* Expert experience inline edit */
.history-record--editable {
    display: block;
}

.history-record--editable > .history-record__summary {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.history-record__content {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    text-align: right;
}

.history-record__content strong,
.history-record__content span,
.history-record__content small,
.history-record__content p {
    width: 100%;
    text-align: right;
}

.history-record__content strong {
    font-size: 16px;
}

.history-record__content-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
    width: 100%;
}

.history-record__content-meta span {
    width: auto;
    color: var(--muted);
    font-size: 12px;
}

.history-record__description {
    margin: 4px 0 0;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
    color: var(--muted);
    font-size: 13px;
    line-height: 1.9;
}

.history-record__actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-record__edit {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.history-record__edit[hidden] {
    display: none !important;
}

@media (max-width: 680px) {
    .history-record__summary {
        align-items: stretch;
        flex-direction: column;
    }

    .history-record__actions {
        width: 100%;
    }

    .history-record__actions form,
    .history-record__actions .btn {
        flex: 1;
    }
}

/* Competency inline edit */
.competency-item--editable {
    display: block;
}

.competency-item__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.competency-edit {
    position: relative;
}

.competency-edit > summary {
    list-style: none;
    cursor: pointer;
}

.competency-edit > summary::-webkit-details-marker {
    display: none;
}

.competency-edit__panel {
    position: absolute;
    z-index: 20;
    top: calc(100% + 10px);
    left: 0;
    width: min(760px, 80vw);
    padding: 18px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(12, 42, 89, 0.14);
}

.competency-edit__panel .profile-form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 800px) {
    .competency-item__summary {
        align-items: stretch;
        flex-direction: column;
    }

    .competency-item__actions {
        flex-wrap: wrap;
    }

    .competency-edit__panel {
        position: static;
        width: 100%;
        margin-top: 10px;
    }

    .competency-edit__panel .profile-form-grid {
        grid-template-columns: 1fr;
    }
}

/* Home featured expert cards — aligned with expert search */
.home-expert-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    border: 1px solid #dfe5ec;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 3px 13px rgba(20, 43, 72, .06);
}

.home-expert-cover {
    position: relative;
    height: 74px;
    overflow: hidden;
    flex: 0 0 74px;
    border-bottom: 3px solid rgba(255, 140, 66, .82);
    background:
        linear-gradient(
            118deg,
            #172b3d 0%,
            #647584 31%,
            #263f56 62%,
            #0f4c81 100%
        );
}

.home-expert-cover::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            112deg,
            rgba(255, 255, 255, .16) 0,
            rgba(255, 255, 255, .16) 1px,
            transparent 1px,
            transparent 13px
        ),
        linear-gradient(
            90deg,
            transparent 0 12%,
            rgba(255, 255, 255, .10) 12% 13%,
            transparent 13% 35%,
            rgba(255, 255, 255, .12) 35% 36%,
            transparent 36% 100%
        );
    opacity: .75;
}

.home-expert-cover::after {
    content: '';
    position: absolute;
    inset: 14px -18px auto 38%;
    height: 42px;
    border-top: 1px solid rgba(255, 255, 255, .34);
    border-bottom: 1px solid rgba(255, 255, 255, .18);
    transform: skewX(-22deg);
    box-shadow:
        0 7px 0 rgba(255, 255, 255, .07),
        0 14px 0 rgba(255, 255, 255, .05);
}

.home-expert-body {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 51px 17px 17px;
}

.home-expert-avatar {
    position: absolute;
    top: -43px;
    right: 17px;
    width: 84px;
    height: 84px;
    overflow: hidden;
    display: grid;
    place-items: center;
    border: 4px solid #fff;
    border-radius: 50%;
    background: #edf5fd;
    color: #0b4f93;
    box-shadow: 0 8px 20px rgba(20, 43, 72, .15);
    font-size: 27px;
    font-weight: 900;
}

.home-expert-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-expert-avatar span {
    line-height: 1;
}

.home-expert-verified {
    position: absolute;
    top: 12px;
    left: 15px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #08795a;
    font-size: 11px;
    font-weight: 900;
}

.home-expert-verified::before {
    content: '✓';
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e4f8f1;
}

.home-expert-name {
    margin: 0 0 6px;
    color: #073b70;
    font-size: 18px;
    line-height: 1.5;
}

.home-expert-title {
    min-height: 43px;
    margin: 0 0 6px;
    color: #172b4d;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.8;
}

.home-expert-meta {
    margin-bottom: 11px;
    color: #65758b;
    font-size: 12px;
    line-height: 1.8;
}

.home-expert-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 13px;
}

.home-expert-chip {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 4px 8px;
    border: 1px solid #d8e4f7;
    border-radius: 999px;
    background: #f5f8fc;
    color: #073b70;
    font-size: 11px;
}

.home-expert-chip.is-primary {
    border-color: #a8e8d3;
    background: #eafbf5;
    color: #08795a;
    font-weight: 800;
}

.home-expert-locked {
    margin: 0 0 12px;
    padding: 9px 11px;
    border: 1px dashed #cadbf1;
    border-radius: 9px;
    background: #f8fbff;
    color: #65758b;
    font-size: 11px;
    line-height: 1.8;
}

.home-expert-link {
    min-height: 39px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    border: 1px solid #0b4f93;
    border-radius: 9px;
    color: #0b4f93;
    font-size: 13px;
    font-weight: 900;
    transition: .2s ease;
}

.home-expert-link:hover {
    background: #0b4f93;
    color: #fff;
}

@media (max-width: 560px) {
    .home-expert-cover {
        height: 68px;
        flex-basis: 68px;
    }

    .home-expert-body {
        padding: 49px 15px 15px;
    }

    .home-expert-avatar {
        top: -40px;
        right: 15px;
        width: 78px;
        height: 78px;
    }
}
