/* ============================================================
   ask_expert.css - Ask an Expert directory + Expert profile pages
   ============================================================ */

/* ── Hero (listing page) ────────────────────────────────────── */
.expert-hero {
    background: linear-gradient(135deg, var(--color-primary, #1d4ed8) 0%, #2d5a44 60%, #1a2332 100%);
    padding: 52px 0 0;
    overflow: hidden;
}

.expert-hero-inner {
    display: grid;
    grid-template-columns: 1fr 42%;
    gap: 0;
    align-items: stretch;
    padding-bottom: 0;
}

.expert-hero-text {
    padding: 52px 40px 52px 0;
}

.expert-hero-text h1 {
    color: var(--color-white);
    font-size: clamp(1.9rem, 3.5vw, 2.8rem);
    margin-bottom: var(--space-3);
}

.expert-hero-text p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 440px;
}

.expert-hero-img {
    min-height: 300px;
    border-radius: var(--radius-xl, 20px) var(--radius-xl, 20px) 0 0;
    overflow: hidden;
    align-self: flex-end;
}

.expert-hero-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    min-height: 300px;
}

/* ── Stats Bar ──────────────────────────────────────────────── */
.expert-stats-bar {
    background: rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
}

.expert-stats-inner {
    display: flex;
    gap: 0;
    justify-content: space-between;
}

.expert-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0 24px;
}

.expert-stat-item:last-child { border-right: none; }

.expert-stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-white);
    display: block;
}

.expert-stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 2px;
}

/* ── Category Tabs Strip (Wrapping Pill Style) ── */
.expert-cats-strip {
    background: var(--color-surface, #f8fafc);
    border-bottom: 1px solid var(--color-border, #e2e8f0);
    padding: 12px 0; /* Reduced padding on container */
    position: relative;
}

.expert-cats-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

/* On mobile, wrapping 50 tabs is too messy, so we use a smooth swipeable row */
@media (max-width: 767px) {
    .expert-cats-inner {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
    }
    .expert-cats-inner::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Edge */
    }
}

/* Trailing fade hints at more tabs to scroll/expand to - shown via JS only
   when the strip actually overflows (never on a false hardcoded count). */
.expert-cats-fade {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 48px;
    background: linear-gradient(to right, rgba(248, 250, 252, 0), var(--color-surface, #f8fafc) 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.expert-cats-fade.is-visible {
    opacity: 1;
}

.expert-cat-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 16px; /* Reduced padding inside the buttons */
    border-radius: 9999px;
    border: 1px solid var(--color-border, #e2e8f0);
    cursor: pointer;
    background: var(--color-white, #ffffff);
    color: var(--color-text, #475569);
    white-space: nowrap;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.25s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.expert-cat-tab:hover {
    color: var(--color-primary, #2d5a44);
    border-color: var(--color-primary, #2d5a44);
    background: var(--color-surface, #f8fafc);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.expert-cat-tab.active {
    background: var(--color-primary, #2d5a44);
    border-color: var(--color-primary, #2d5a44);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(45, 90, 68, 0.25);
}

/* ── Collapse/Expand Filter Toggle ── */
.expert-cat-tab-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    border-radius: 9999px;
    border: 1px dashed var(--color-primary, #2d5a44);
    cursor: pointer;
    background: transparent;
    color: var(--color-primary, #2d5a44);
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.25s ease;
}

.expert-cat-tab-toggle:hover {
    background: rgba(45, 90, 68, 0.05);
    border-style: solid;
}

/* On Desktop: Hide items beyond limit unless expanded */
@media (min-width: 768px) {
    .expert-cat-tab--collapsed {
        display: none !important;
    }
    .expert-cats-inner.is-expanded .expert-cat-tab--collapsed {
        display: inline-flex !important;
    }
}

/* On Mobile: Always show all tabs and hide the expand toggle (mobile is swiped instead) */
@media (max-width: 767px) {
    .expert-cat-tab--collapsed {
        display: inline-flex !important;
    }
    .expert-cat-tab-toggle {
        display: none !important;
    }
}

/* ── Search Row (search-input-wrap CSS lives in calculators.css which is
      NOT loaded here - replicate the needed styles locally) ────────────── */
.expert-search-row {
    padding: 2px 0 12px;
}

.expert-search-row .search-input-wrap {
    position: relative;
}

.expert-search-row .search-input-wrap input {
    width: 100%;
    padding: 12px 44px 12px 42px;
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: var(--radius-sm, 8px);
    background: var(--color-white, #fff);
    font-size: 0.92rem;
    font-family: inherit;
    color: var(--color-text, #374151);
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.expert-search-row .search-input-wrap input:focus {
    border-color: var(--color-primary, #1d5c8e);
    box-shadow: 0 0 0 3px rgba(29, 92, 142, 0.1);
}

.expert-search-row .search-input-wrap input::placeholder {
    color: var(--color-black, #9ca3af);
}

.expert-search-row .search-input-wrap input[type="search"]::-webkit-search-cancel-button,
.expert-search-row .search-input-wrap input[type="search"]::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
}

.expert-search-row .search-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-black, #9ca3af);
    font-size: 0.9rem;
    pointer-events: none;
}

.expert-search-row .search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-black, #9ca3af);
    font-size: 1.2rem;
    line-height: 1;
    padding: 2px 4px;
    transition: color 0.12s;
}

.expert-search-row .search-btn:hover { color: var(--color-text, #374151); }

/* Spinner state on the × button while debounce runs */
.expert-search-clear.is-searching { color: transparent; }
.expert-search-clear.is-searching::after {
    content: '';
    position: absolute;
    width: 13px;
    height: 13px;
    border: 2px solid var(--color-border, #e5e7eb);
    border-top-color: var(--color-primary, #1d5c8e);
    border-radius: 50%;
    animation: expert-spin 0.7s linear infinite;
}

/* ── Grid Loader ─────────────────────────────────────────────── */
/* Do NOT set display:flex here - it overrides [hidden] attribute.
   Use :not([hidden]) so the hidden attr actually works.          */
.expert-grid-loader:not([hidden]) {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 72px 20px;
    gap: 14px;
    color: var(--color-black, #6b7280);
    font-size: 0.9rem;
}

.expert-grid-loader p { margin: 0; }

.egl-spinner {
    width: 38px;
    height: 38px;
    border: 3px solid var(--color-border, #e5e7eb);
    border-top-color: var(--color-primary, #1d5c8e);
    border-radius: 50%;
    animation: expert-spin 0.75s linear infinite;
}

@keyframes expert-spin { to { transform: rotate(360deg); } }

.expert-cards-grid.is-loading { display: none; }

/* ── Empty State ─────────────────────────────────────────────── */
.expert-no-results {
    text-align: center;
    padding: 52px 24px;
    background: var(--color-white, #fff);
    border: 1.5px dashed var(--color-border, #e5e7eb);
    border-radius: var(--radius-md, 12px);
    margin-top: 8px;
}

.enr-icon {
    font-size: 2rem;
    color: var(--color-black, #9ca3af);
    display: block;
    margin-bottom: 16px;
}

.enr-heading {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text, #1a2332);
    margin: 0 0 8px;
}

.enr-sub {
    font-size: 0.86rem;
    color: var(--color-black, #6b7280);
    margin: 0 0 24px;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.enr-reset {
    display: inline-block;
    padding: 9px 22px;
    background: var(--color-surface, #f3f4f6);
    color: var(--color-text, #374151);
    border: 1.5px solid var(--color-border, #e5e7eb);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s, background 0.15s;
}

.enr-reset:hover { background: #e9ebee; border-color: #d1d5db; }

/* ── Main Layout (listing page) ─────────────────────────────── */
.expert-main-layout {
    margin: 0 auto;
    padding: 40px 24px 30px;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: var(--space-10);
    align-items: start;
}

/* ── Expert Cards Grid ──────────────────────────────────────── */
.expert-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--space-4);
}

/* Toggled by ask_expert.js when search/category filtering leaves exactly one
   visible card - otherwise it sits stranded in the grid's first column. */
.expert-cards-grid--single {
    grid-template-columns: 1fr;
    justify-items: center;
}

.expert-cards-grid--single .expert-card {
    width: 100%;
    max-width: 360px;
}

/* ── Card shell ─────────────────────────────────────────────── */
.expert-card {
    background: var(--color-white, #fff);
    border: 1.5px solid var(--color-border, #e5e7eb);
    border-radius: var(--radius-md, 12px);
    padding: 20px;
    transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
    display: grid;
    grid-template-columns: 76px 1fr;
    grid-template-areas:
        "photo identity"
        "bio   bio"
        "loc   loc"
        "foot  foot";
    column-gap: 16px;
    row-gap: 12px;
    width: 100%;
    position: relative;
    overflow: hidden;
}
.expert-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(to right, var(--color-primary, #2d5a44), var(--color-accent, #c9a84c));
    opacity: 0;
    transition: opacity 0.18s;
}
.expert-card[data-profile-url] { cursor: pointer; }

.expert-card:hover {
    border-color: var(--color-primary, #2d5a44);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}
.expert-card:hover::before { opacity: 1; }

.expert-card[hidden] { display: none; }

/* ── Grid area assignments ────────────────────────────────────── */
.expert-card-top      { grid-area: photo;    align-self: start; }
.expert-bio-wrap      { grid-area: bio; }
.expert-contact-box   { grid-area: loc; }
.expert-card-footer   { grid-area: foot; }

/* ── Avatar - circular ────────────────────────────────────────── */
.expert-avatar {
    width: 76px;
    height: 76px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #e8f0ec, #d4e6d8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    overflow: hidden;
    border: 2px solid var(--color-border, #e5e7eb);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.expert-avatar-img {
    width: 76px;
    height: 76px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.expert-initials {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary, #2d5a44);
    letter-spacing: 0.02em;
    line-height: 1;
}

/* ── Identity: name + title + rating in the right column ─────── */
.expert-card-identity {
    grid-area: identity;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: left;
    align-items: flex-start;
    align-self: center;
}

/* ── Credential badge - pinned top-right of the card ─────────── */
.expert-card-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--color-white, #fff);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: var(--radius-xl);
    padding: 3px 9px 3px 6px;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--color-text, #374151);
    white-space: nowrap;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.expert-card-badge .ah-ico {
    font-size: 0.68rem;
    color: var(--color-primary, #2d5a44);
}

.expert-name {
    font-size: 0.97rem;
    font-weight: 700;
    color: var(--color-heading, #111827);
    margin: 0;
    line-height: 1.25;
    padding-right: 80px; /* avoid badge overlap */
}

.expert-title {
    font-size: 0.78rem;
    color: var(--color-black, #6b7280);
    margin: 0;
}

.expert-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
}

.rating-stars { font-size: 0.82rem; }
.star-filled  { color: var(--color-warning, #f59e0b); }
.star-empty   { color: var(--color-border, #d1d5db); }

.rating-value {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-heading, #111827);
}

.rating-count {
    font-size: 0.75rem;
    color: var(--color-black, #9ca3af);
}

/* ── Bio + Read more ────────────────────────────────────────── */
.expert-bio-wrap { display: flex; flex-direction: column; gap: 3px; }

.expert-desc {
    font-size: 0.82rem;
    color: var(--color-text, #374151);
    line-height: 1.55;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.expert-read-more { display: none; }

/* ── Contact box → plain icon + text rows ────────────────────── */
.expert-contact-box {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ecb-row {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    color: var(--color-black, #6b7280);
    background: none;
    border: none;
    padding: 0;
    line-height: 1.4;
}

.ecb-row .ah-ico {
    font-size: 0.72rem;
    color: var(--color-black, #9ca3af);
    flex-shrink: 0;
}

/* ── Card footer: pills + actions ───────────────────────────── */
.expert-card-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ── Bullet pills - horizontal inline ───────────────────────── */
.expert-tags {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    align-items: flex-start;
    overflow: hidden;
    min-width: 0;
}

.expert-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    color: var(--color-text, #374151);
    padding: 4px 10px;
    background: var(--color-surface, #f3f4f6);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 20px;
    line-height: 1.3;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.expert-tag i {
    font-size: 0.7rem;
    color: var(--color-primary, #2d5a44);
    flex-shrink: 0;
}

/* ── Card action buttons ─────────────────────────────────────── */
.expert-card-actions {
    display: flex;
    gap: 8px;
}

.expert-profile-btn {
    flex: 1;
    justify-content: center;
    font-size: 0.83rem;
    padding: 9px 18px;
    min-width: 0;
    gap: 6px;
    background: var(--color-white, #fff) !important;
    color: var(--color-heading, #111827) !important;
    border: 1.5px solid var(--color-border, #d1d5db) !important;
    border-radius: var(--radius-sm, 8px);
    font-weight: 500;
    transition: border-color 0.15s, color 0.15s;
}
.expert-profile-btn:hover {
    border-color: var(--color-primary, #2d5a44) !important;
    color: var(--color-white, #fff) !important;
    background: var(--color-primary, #2d5a44) !important;
    filter: none;
    transform: none;
    box-shadow: none;
}

.expert-contact-btn,
.expert-call-btn {
    flex: 1;
    justify-content: center;
    font-size: 0.83rem;
    min-width: 0;
    background: var(--color-white, #fff);
    border: 1.5px solid var(--color-border, #d1d5db);
    color: var(--color-text, #374151);
    border-radius: var(--radius-sm, 6px);
    padding: 8px 14px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    transition: border-color 0.12s, color 0.12s;
}

.expert-contact-btn:hover,
.expert-call-btn:hover {
    border-color: var(--color-primary, #2d5a44);
    color: var(--color-primary, #2d5a44);
}

/* ── Sidebar (listing page) ─────────────────────────────────── */
.expert-sidebar {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.expert-sb-box {
    background: var(--color-white, #fff);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: var(--radius-md, 12px);
    padding: var(--space-5);
}

.expert-sb-box h3 {
    font-size: 0.92rem;
    color: var(--color-heading, #111827);
    margin-bottom: var(--space-3);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
}

/* Need help box */
.expert-need-help {
    background: linear-gradient(135deg, var(--color-success-bg) 0%, var(--color-tag-bg) 100%);
    border-color: var(--color-success-border);
}

.expert-need-help h3 { border-bottom-color: var(--color-success-border); }

.expert-need-help p {
    font-size: 0.82rem;
    color: var(--color-black, #6b7280);
    line-height: 1.55;
    margin-bottom: 14px;
}

.expert-nh-btn {
    width: 100%;
    justify-content: center;
    font-size: 0.85rem;
}

/* Category list */
.expert-cat-list {
    list-style: none;
    padding: 0;
    margin: 0 0 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.expert-cat-link {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 8px;
    border-radius: var(--radius-tag);
    text-decoration: none;
    transition: background 0.12s;
}

.expert-cat-link:hover { background: var(--color-surface, #f3f4f6); }

.ecl-icon {
    font-size: 1rem;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
    margin-top: 1px;
}

.ecl-text { display: flex; flex-direction: column; gap: 1px; }

.ecl-text strong {
    font-size: 0.83rem;
    color: var(--color-text, #374151);
    display: block;
}

.ecl-text span {
    font-size: 0.75rem;
    color: var(--color-black, #9ca3af);
    display: block;
}

/* How it works */
.expert-hiw-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.expert-hiw-step {
    display: flex;
    gap: var(--space-3);
    align-items: flex-start;
}

.hiw-num {
    width: 24px;
    height: 24px;
    background: var(--color-primary, #1d4ed8);
    color: var(--color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}

.expert-hiw-step strong {
    font-size: 0.85rem;
    color: var(--color-heading, #111827);
    display: block;
    margin-bottom: 2px;
}

.expert-hiw-step p {
    font-size: 0.78rem;
    color: var(--color-black, #6b7280);
    line-height: 1.5;
    margin: 0;
}

/* Latest news list */
.expert-news-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.expert-news-item { border-bottom: 1px solid var(--color-border, #e5e7eb); }
.expert-news-item:last-child { border-bottom: none; }

.expert-news-link {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 9px 4px;
    text-decoration: none;
    transition: background 0.12s;
    border-radius: var(--radius-xs);
}

.expert-news-link:hover { background: var(--color-surface, #f9fafb); }

.enl-date {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-black, #9ca3af);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.enl-title {
    font-size: 0.82rem;
    color: var(--color-text, #374151);
    line-height: 1.45;
}

.expert-news-link:hover .enl-title { color: var(--color-primary, #1d4ed8); }

/* Calculator quick-links */
.expert-calc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.expert-calc-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: var(--space-2);
    border-radius: var(--radius-tag);
    text-decoration: none;
    font-size: 0.83rem;
    color: var(--color-text, #374151);
    transition: background 0.12s;
}

.expert-calc-link:hover {
    background: var(--color-surface, #f3f4f6);
    color: var(--color-primary, #1d4ed8);
}

/* Newsletter CTA box */
.expert-nl-cta {
    background: linear-gradient(135deg, #eef3fb 0%, #e8eef8 100%);
    border-color: var(--color-border, #d1d5db);
}

.expert-nl-btn {
    display: inline-block;
    margin-top: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 7px 16px;
    border-radius: var(--radius-tag);
    color: var(--color-primary, #1d4ed8);
    border: 1.5px solid var(--color-primary, #1d4ed8);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.expert-nl-btn:hover {
    background: var(--color-primary, #1d4ed8);
    color: var(--color-white);
}

/* ── Can't Find CTA ─────────────────────────────────────────── */
.expert-cant-find-cta {
    background: var(--color-surface, #f3f4f6);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: var(--radius-md, 12px);
    padding: 20px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-5);
}

.ecf-left {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.ecf-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.ecf-left h3 {
    font-size: 0.97rem;
    color: var(--color-heading, #111827);
    margin-bottom: var(--space-1);
}

.ecf-left p {
    font-size: 0.82rem;
    color: var(--color-black, #6b7280);
    margin: 0;
}

.ecf-btn { white-space: nowrap; flex-shrink: 0; }

/* ── Contact Modal ──────────────────────────────────────────── */
.expert-contact-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}

.expert-contact-modal[hidden] { display: none; }

.ecm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
}

.ecm-panel {
    position: relative;
    background: var(--color-white, #fff);
    border-radius: var(--radius-lg, 16px);
    padding: var(--space-8);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.ecm-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--color-black, #6b7280);
    padding: 4px 8px;
    border-radius: var(--radius-xs);
    line-height: 1;
    transition: color 0.12s, background 0.12s;
}

.ecm-close:hover {
    color: var(--color-heading, #111827);
    background: var(--color-surface, #f3f4f6);
}

.ecm-title {
    font-size: 1.1rem;
    margin-bottom: var(--space-5);
    padding-right: var(--space-8);
}

/* ── Contact Form (modal + single page) ─────────────────────── */
.expert-contact-form .ecf-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 14px;
}

.ecf-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .ecf-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

.expert-contact-form label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-heading, #111827);
}

.ecf-req { color: var(--color-danger-dark); }

.expert-contact-form input,
.expert-contact-form textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: var(--radius-sm, 6px);
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--color-text, #374151);
    background: var(--color-white, #fff);
    transition: border-color 0.12s;
    box-sizing: border-box;
}

.expert-contact-form input:focus,
.expert-contact-form textarea:focus {
    outline: none;
    border-color: var(--color-accent, #B08D57);
    box-shadow: 0 0 0 3px rgba(176, 141, 87, 0.15);
}

.expert-contact-form textarea { resize: vertical; }

.ecf-actions { margin-top: var(--space-1); }

.ecf-submit {
    width: 100%;
    justify-content: center;
    font-size: 0.9rem;
}

.ecf-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ecf-feedback {
    margin-top: 10px;
    font-size: 0.85rem;
    border-radius: var(--radius-tag);
    padding: 0;
    min-height: 0;
    transition: padding 0.12s;
}

.ecf-feedback.ecf-success {
    background: var(--color-success-bg);
    border: 1px solid var(--color-success-border);
    color: var(--color-success-text);
    padding: 10px 14px;
}

.ecf-feedback.ecf-error {
    background: var(--color-error-bg);
    border: 1px solid var(--color-error-border);
    color: var(--color-danger-dark);
    padding: 10px 14px;
}

/* ── Expert Profile Hero ─────────────────────────────────────────── */
.expert-profile-hero {
    background: linear-gradient(135deg,
        var(--client-color, #1e3a2f) 0%,
        #2a4a3a 40%,
        #1a3328 70%,
        #203c30 100%);
    padding: 0;
    position: relative;
    overflow: hidden;
}

/* Marquee band at the bottom of the hero — dark frosted strip */
.expert-hero-marquee-band {
    margin-top: 28px;
    background: rgba(0,0,0,0.28);
    border-top: 1px solid rgba(176,141,87,0.3);
    overflow: hidden;
}

/* Standalone marquee strip below the hero */
.expert-stats-marquee {
    background: var(--color-surface, #f8f7f4);
    border-bottom: 1px solid var(--color-border, #e5e7eb);
    overflow: hidden;
}

/* Tint marquee text/icons white to show on dark bg */
.expert-hero-marquee-band .marquee-track,
.expert-hero-marquee-band .trust-point,
.expert-hero-marquee-band .trust-icon,
.expert-hero-marquee-band .trust-label {
    color: rgba(255,255,255,0.88) !important;
}


/* Decorative background shape */
.expert-profile-hero::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    pointer-events: none;
}
.expert-profile-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -40px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(176,141,87,0.08);
    pointer-events: none;
}

/* Card that wraps the photo + info */
.expert-profile-hero-inner {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: var(--space-8);
    align-items: center;
    padding: 120px 0 50px;
    position: relative;
    z-index: 1;
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
}

/* Bottom wave / separator */
.expert-profile-hero .container {
    border-bottom: 3px solid rgba(176,141,87,0.45);
}

.expert-profile-photo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
}

.expert-profile-photo {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border: 2px solid rgba(176,141,87,0.7);
    border-radius: 8px;
    display: block;
    box-shadow: 0 0 0 6px rgba(176,141,87,0.18), 0 8px 28px rgba(0,0,0,0.32);
}

.expert-profile-initials {
    width: 140px;
    height: 140px;
    background: linear-gradient(135deg, rgba(176,141,87,0.3), rgba(30,58,47,0.6));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-accent, #B08D57);
    border: 4px solid rgba(176,141,87,0.6);
    box-shadow: 0 0 0 6px rgba(176,141,87,0.15), 0 8px 28px rgba(0,0,0,0.32);
    letter-spacing: -2px;
}

.expert-profile-hero-info { color: var(--color-white, #fff); }

/* Quick-action CTA column on the right */
.expert-profile-hero-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 200px;
}
.expert-hero-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: transform 0.18s, box-shadow 0.18s;
    cursor: pointer;
    border: none;
    width: 100%;
    text-align: center;
}
.expert-hero-cta-btn:hover { transform: translateY(-2px); }
.expert-hero-cta-btn--primary {
    background: var(--color-accent, #B08D57);
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(176,141,87,0.35);
}
.expert-hero-cta-btn--primary:hover { box-shadow: 0 6px 20px rgba(176,141,87,0.5); }
.expert-hero-cta-btn--outline {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.9) !important;
    border: 1.5px solid rgba(255,255,255,0.25);
}
.expert-hero-cta-btn--outline:hover { background: rgba(255,255,255,0.15); }

.expert-profile-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.epbc-link {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    transition: color 0.12s;
}

.epbc-link:hover { color: rgba(255,255,255,0.95); }

.epbc-sep {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.4);
}

.epbc-current {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.5);
    font-weight: 500;
}

.expert-profile-name {
    font-size: clamp(1.4rem, 2.8vw, 2rem);
    color: var(--color-white, #fff);
    margin-bottom: var(--space-1);
    font-weight: 700;
    text-shadow: 0 2px 12px rgba(0,0,0,0.18);
}

.expert-profile-specialisation {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.75);
    margin-bottom: var(--space-3);
}

.expert-profile-rating {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: 10px;
}

.expert-profile-rating .rating-stars { font-size: 1rem; }
.expert-profile-rating .rating-value { color: var(--color-white, #fff); font-size: 0.95rem; font-weight: 600; }
.expert-profile-rating .rating-count { color: rgba(255,255,255,0.65); font-size: 0.82rem; }

.expert-profile-location {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.65);
    margin-bottom: var(--space-3);
}

.expert-profile-cat-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.expert-profile-cat-pill {
    display: inline-block;
    background: var(--color-info-bg);
    border: 1px solid var(--color-info-border);
    color: var(--color-primary, #1d4ed8);
    font-size: 0.78rem;
    font-weight: 500;
    padding: 4px 14px;
    border-radius: var(--radius-xl);
}

/* ── Cover image on the outer full-bleed section ────────────── */
.expert-profile-hero.has-cover-bg {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* Dark gradient overlay so text stays readable against any image */
.expert-profile-hero.has-cover-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        rgba(0,0,0,0.72) 0%,
        rgba(0,0,0,0.48) 60%,
        rgba(0,0,0,0.20) 100%
    );
    z-index: 0;
}

/* Keep inner hero above the overlay */
.expert-profile-hero.has-cover-bg .container {
    position: relative;
    z-index: 1;
}
/* All children sit above the overlay */
.expert-profile-hero-inner.has-cover-bg > * {
    position: relative;
    z-index: 1;
}

/* Text goes white when image is in card background */
.expert-profile-hero-inner.has-cover-bg .expert-profile-hero-info { color: var(--color-white); }
.expert-profile-hero-inner.has-cover-bg .expert-profile-name         { color: var(--color-white); }
.expert-profile-hero-inner.has-cover-bg .expert-profile-specialisation { color: rgba(255,255,255,0.85); }
.expert-profile-hero-inner.has-cover-bg .expert-profile-location     { color: rgba(255,255,255,0.8); }
.expert-profile-hero-inner.has-cover-bg .rating-value                { color: var(--color-white); }
.expert-profile-hero-inner.has-cover-bg .rating-count                { color: rgba(255,255,255,0.7); }
.expert-profile-hero-inner.has-cover-bg .epbc-link                   { color: rgba(255,255,255,0.65); }
.expert-profile-hero-inner.has-cover-bg .epbc-link:hover             { color: var(--color-white); }
.expert-profile-hero-inner.has-cover-bg .epbc-sep,
.expert-profile-hero-inner.has-cover-bg .epbc-current                { color: rgba(255,255,255,0.7); }
.expert-profile-hero-inner.has-cover-bg .expert-profile-cat-pill {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.3);
    color: var(--color-white);
}

/* Photo: white border + shadow to pop against the image */
.expert-profile-hero-inner.has-cover-bg .expert-profile-photo,
.expert-profile-hero-inner.has-cover-bg .expert-profile-initials {
    border: 4px solid rgba(255,255,255,0.85);
    box-shadow: 0 2px 16px rgba(0,0,0,0.3);
}

@media (max-width: 768px) {
    .expert-profile-hero-inner {
        grid-template-columns: 110px 1fr;
        gap: var(--space-5);
        padding: var(--space-5);
    }
    .expert-profile-photo,
    .expert-profile-initials { width: 100px; height: 100px; }
}

@media (max-width: 480px) {
    .expert-profile-hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .expert-profile-breadcrumb { justify-content: center; }
}

/* ── Expert stats marquee - column tile layout ───────────────── */
.expert-stats-marquee {
    background: var(--color-white);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    overflow: hidden;
    margin: 0 0 32px;
}

/* Each item: tall column tile with icon → value → desc stacked */
.expert-stats-marquee .phb-trust-icon-item {
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 3px;
    min-width: 150px;
    padding: 2px 8px;
    border-right: 1px solid var(--color-border);
}

.expert-stats-marquee .phb-trust-icon {
    font-size: 1.5rem;
    margin-bottom: 6px;
    color: var(--color-primary, #1d4ed8);
    display: block;
}

.expert-stats-marquee .phb-trust-icon-item strong {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-heading);
    line-height: 1.25;
    white-space: nowrap;
}

.expert-stats-marquee .phb-trust-icon-item span {
    display: block;
    font-size: 0.73rem;
    color: var(--color-black);
    line-height: 1.3;
    white-space: nowrap;
}


.expert-profile-layout-container {
    margin: 0 auto;
    padding: 12px 14px 20px;
    width: 100%;
    box-sizing: border-box !important;
}

@media (max-width: 768px) {
    .expert-profile-layout-container {
        padding: 0 2px;
    }
}

/* ── Profile Page Layout ────────────────────────────────────── */
.expert-profile-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--space-8);
    align-items: start;
    width: 100% !important;
    box-sizing: border-box !important;
}

.expert-profile-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100% !important;
    box-sizing: border-box !important;
}

.expert-profile-section {
    background: var(--color-white, #fff);
    border: 1px solid var(--color-border, #e2e8f0);
    padding: 12px 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    width: 100% !important;
    box-sizing: border-box !important;
}

.expert-profile-section:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.expert-profile-section h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-heading, #111827);
    margin-top: 0;
    margin-bottom: var(--space-5);
    border-left: 4px solid var(--color-accent, #B08D57);
    padding-left: 12px;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 8px;
}

.expert-profile-section h2 i {
    color: var(--color-accent, #B08D57);
    font-size: 1.1rem;
}

.expert-bio-section p {
    font-size: 0.95rem;
    color: var(--color-text, #374151);
    line-height: 1.75;
    margin: 0;
}

/* ── Bullets list ───────────────────────────────────────────── */
.expert-bullets-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100% !important;
    box-sizing: border-box !important;
}

@media (max-width: 640px) {
    .expert-bullets-list {
        grid-template-columns: 1fr !important;
    }
}

.expert-bullets-list li {
    font-size: 0.9rem;
    color: var(--color-text, #374151);
    background: var(--color-surface, #f8fafc);
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: border-color 0.15s, background 0.15s;
    box-sizing: border-box !important;
    width: 100% !important;
}

.expert-bullets-list li:hover {
    border-color: var(--color-accent, #B08D57);
    background: var(--color-white);
}

.expert-bullets-list li::before {
    content: '✓';
    color: var(--color-accent, #B08D57);
    background: rgba(176,141,87,0.12);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ── Client work grid ───────────────────────────────────────── */
.expert-clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-4);
    width: 100% !important;
    box-sizing: border-box !important;
}

.client-img-wrap {
    position: relative;
    border-radius: var(--radius-md, 12px);
    border: 1px solid var(--color-border, #e2e8f0);
    overflow: hidden;
    aspect-ratio: 16 / 10;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.client-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}

.client-img-wrap:hover img { transform: scale(1.04); }

.client-img-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
    color: var(--color-white);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 24px 12px 10px;
    display: block;
}

/* ── Profile sidebar ────────────────────────────────────────── */
.expert-profile-sidebar {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

/* Contact Info list styles */
.expert-quick-info .expert-sb-contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.expert-quick-info .expert-sb-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    font-size: 0.88rem;
}

.expert-quick-info .expert-sb-contact-list li > i {
    font-size: 1.1rem;
    color: var(--color-accent, #B08D57);
    margin-top: 3px;
    flex-shrink: 0;
    width: 18px;
    text-align: center;
}

.esb-contact-detail {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.esb-contact-detail strong {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-black, #6b7280);
    font-weight: 600;
}

.esb-contact-detail span,
.esb-contact-detail a {
    font-size: 0.88rem;
    color: var(--color-heading, #111827);
    font-weight: 500;
}


.expert-sb-contact-list a {
    color: var(--color-primary, #1d4ed8);
    text-decoration: none;
}

.expert-sb-contact-list a:hover { text-decoration: underline; }

.esb-email-link {
    word-break: break-all;
    overflow-wrap: break-word;
}

/* Profile page: cat pill is shown on white bg */
.expert-profile-sidebar .expert-profile-cat-pill {
    background: var(--color-surface, #f3f4f6);
    border-color: var(--color-border, #e5e7eb);
    color: var(--color-text, #374151);
}

/* ── Contact form on single page ────────────────────────────── */
.expert-contact-form-section .expert-contact-intro {
    font-size: 0.88rem;
    color: var(--color-black, #6b7280);
    margin-bottom: var(--space-5);
    line-height: 1.6;
}

/* ── Form Builder (ch-form-*) on Expert pages ───────────────── */
.expert-mega-section .ch-form-wrap {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 28px 28px 24px;
    box-shadow: 0 2px 12px rgba(26,60,94,0.06);
}

.expert-mega-section .ch-form-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-navy-mid);
    margin: 0 0 6px;
}

.expert-mega-section .ch-form-desc {
    font-size: 0.58rem;
    color: var(--color-black);
    margin: 0 0 20px;
    line-height: 1.6;
}

.expert-mega-section .ch-form-group {
    margin-bottom: 18px;
}

.expert-mega-section .ch-form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-heading);
    margin-bottom: 6px;
}

.expert-mega-section .ch-form-req {
    color: var(--color-danger-dark);
    margin-left: 2px;
}

.expert-mega-section .ch-form-input,
.expert-mega-section .ch-form-textarea,
.expert-mega-section .ch-form-select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--color-text);
    background: var(--color-white);
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.expert-mega-section .ch-form-input:focus,
.expert-mega-section .ch-form-textarea:focus,
.expert-mega-section .ch-form-select:focus {
    outline: none;
    border-color: var(--color-navy-mid);
    box-shadow: 0 0 0 3px rgba(26,60,94,0.12);
}

.expert-mega-section .ch-form-textarea {
    resize: vertical;
    min-height: 100px;
}

.expert-mega-section .ch-form-submit {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--color-navy-mid);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius-sm);
    padding: 12px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.18s, transform 0.1s;
    width: 100%;
    justify-content: center;
}

.expert-mega-section .ch-form-submit:hover {
    background: var(--color-navy-mid-hover);
}

.expert-mega-section .ch-form-submit:active {
    transform: scale(0.98);
}

.expert-mega-section .ch-form-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.expert-mega-section .ch-form-feedback {
    margin-top: var(--space-3);
    font-size: 0.87rem;
    border-radius: var(--radius-sm);
    padding: 0;
    min-height: 0;
    transition: padding 0.12s;
}

.expert-mega-section .ch-form-feedback.success {
    background: var(--color-success-bg);
    border: 1px solid var(--color-success-border);
    color: var(--color-success-text);
    padding: 10px 14px;
}

.expert-mega-section .ch-form-feedback.error {
    background: var(--color-error-bg);
    border: 1px solid var(--color-error-border);
    color: var(--color-error-text);
    padding: 10px 14px;
}

/* Agreement / Terms section */
.expert-mega-section .ch-agr-intro {
    font-size: 0.87rem;
    line-height: 1.7;
    color: var(--color-black);
    margin-bottom: 14px;
    padding: 12px 16px;
    background: var(--slate-50);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
}

.expert-mega-section .ch-agr-iframe-wrap {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 14px;
}

.expert-mega-section .ch-agr-iframe {
    width: 100%;
    height: 220px;
    border: none;
    display: block;
}

.expert-mega-section .ch-form-agreement .ch-agreement-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 0.88rem;
    color: var(--color-text);
    line-height: 1.5;
}

.expert-mega-section .ch-form-agreement input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    accent-color: var(--color-navy-mid);
    cursor: pointer;
}

.expert-mega-section .ch-terms-link {
    color: var(--color-navy-mid);
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.15s;
}

.expert-mega-section .ch-terms-link:hover {
    color: var(--color-navy-mid-hover);
}

/* ── Responsive: 1200px ─────────────────────────────────────── */
@media (max-width: 1200px) {
    .expert-profile-layout { grid-template-columns: 1fr 280px; gap: var(--space-7); }
}

/* ── Responsive: 1024px ─────────────────────────────────────── */
@media (max-width: 1024px) {
    .expert-main-layout { grid-template-columns: 1fr 260px; gap: var(--space-7); }
}

/* ── Responsive: 900px ──────────────────────────────────────── */
@media (max-width: 900px) {
    .expert-main-layout     { grid-template-columns: 1fr; }
    .expert-sidebar         { position: static; }
    .expert-cards-grid      { grid-template-columns: 1fr 1fr; }
    .expert-cant-find-cta   { flex-direction: column; align-items: flex-start; }
    .expert-profile-layout  { grid-template-columns: 1fr; }
    .expert-profile-sidebar { position: static; }
    .expert-profile-hero-inner { grid-template-columns: 140px 1fr; gap: var(--space-6); }
    .expert-profile-hero-actions { grid-column: 1 / -1; flex-direction: row; }
    .expert-hero-cta-btn { flex: 1; }
    .expert-profile-photo,
    .expert-profile-initials { width: 120px; height: 120px; }
    .expert-profile-initials { font-size: 2.2rem; }
}

/* ── Responsive: 768px ──────────────────────────────────────── */
@media (max-width: 768px) {
    .expert-hero-inner          { grid-template-columns: 1fr; }
    .expert-hero-img            { min-height: 200px; border-radius: var(--radius-lg, 16px); }
    .expert-hero-img img        { min-height: 200px; }
    .expert-stats-inner         { flex-wrap: wrap; }
    .expert-stat-item           { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); padding: 12px 16px; flex: none; width: 50%; }
    .expert-profile-hero-inner  { grid-template-columns: 1fr; text-align: center; gap: var(--space-5); }
    .expert-profile-hero-actions { justify-content: center; }
    .expert-profile-photo-wrap  { justify-content: center; }
    .expert-profile-breadcrumb  { justify-content: center; }
    .expert-profile-rating      { justify-content: center; }
    .ecm-panel                  { padding: 24px 20px; }
}

/* ── Responsive: 560px ──────────────────────────────────────── */
@media (max-width: 560px) {
    .expert-cards-grid  { grid-template-columns: 1fr; }
    .expert-stat-item   { width: 100%; }
    .expert-card-actions { flex-direction: column; }
    .expert-profile-btn,
    .expert-contact-btn,
    .expert-call-btn { flex: none; width: 100%; }
    .expert-clients-grid { grid-template-columns: 1fr; }
}

/* ── Responsive: mobile (≤480px) ────────────────────────────── */
@media (max-width: 480px) {
    .expert-main-layout { padding: 20px 12px 60px; }
    .expert-card { padding: var(--space-4); padding-top: 42px; }
    .expert-card-badge { top: 10px; right: 10px; }
    .expert-name { font-size: 1rem; }
    .expert-contact-box { font-size: 0.78rem; }
    .expert-tag { font-size: 0.76rem; padding: 6px 10px; }
    .expert-profile-btn,
    .expert-call-btn,
    .expert-contact-btn { font-size: 0.83rem; padding: 9px 14px; }
    .expert-hero-text { padding: 32px 20px 32px 0; }
    .expert-stat-item { padding: 10px 12px; }
}

/* ============================================================
   Expert Lock / Unlock
   ============================================================ */

/* ── Locked card ─────────────────────────────────────────────── */
.expert-card--locked {
    position: relative;
    cursor: default;
    opacity: 0.82;
}

/* Single "profiles are locked" placeholder replacing all locked cards */
.expert-card--locked-placeholder {
    cursor: default;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 260px;
    border: 2px dashed rgba(30,58,47,0.18);
    background: rgba(30,58,47,0.03);
}
.elp-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 32px 24px;
    text-align: center;
}
.elp-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(30,58,47,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}
.elp-icon {
    font-size: 1.5rem;
    color: var(--color-primary, #1e3a2f);
    opacity: 0.5;
}
.elp-heading {
    font-family: var(--font-display, 'Playfair Display', serif);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-dark, #1a2332);
    margin: 0;
}
.elp-sub {
    font-size: 0.82rem;
    color: var(--color-primary, #1e3a2f);
    opacity: 0.6;
    margin: 0;
    max-width: 200px;
    line-height: 1.45;
}

/* Locked card minimal body */
.expert-lock-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 28px 20px 32px;
    text-align: center;
    flex: 1;
}
.expert-lock-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(30,58,47,0.07);
    display: flex;
    align-items: center;
    justify-content: center;
}
.expert-lock-icon {
    font-size: 1.4rem;
    color: var(--color-primary, #1e3a2f);
    opacity: 0.55;
}
.expert-lock-role {
    font-family: var(--font-display, 'Playfair Display', serif);
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-dark, #1a2332);
    letter-spacing: 0.01em;
}
.expert-lock-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-primary, #1e3a2f);
    opacity: 0.5;
}


/* ── Unlock bar (above expert grid) ─────────────────────────── */
.expert-unlock-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    background: linear-gradient(90deg, #f5f2ec 0%, #fff 100%);
    border: 1px solid rgba(201,168,76,0.35);
    border-left: 4px solid var(--color-accent, #c9a84c);
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 20px;
}
.eub-icon {
    color: var(--color-primary, #1e3a2f);
    font-size: 1rem;
    flex-shrink: 0;
}
.eub-text {
    flex: 1;
    min-width: 180px;
    font-size: 0.875rem;
    color: var(--color-dark, #1a2332);
    font-weight: 500;
}
.eub-form-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}
.eub-input {
    height: 38px;
    padding: 0 12px;
    border: 1px solid rgba(30,58,47,0.25);
    border-radius: 7px;
    font-size: 0.875rem;
    width: 190px;
    background: #fff;
    color: var(--color-dark, #1a2332);
    outline: none;
    transition: border-color 0.2s;
    /* This is a plain type="text" input (see markup) so Chrome/Edge/Safari never
       treat it as a real login field - autocomplete="off" alone doesn't stop
       the browser's own password-manager UI on an actual type="password" field.
       Mask the characters visually instead; unsupported only in Firefox, which
       falls back to plain text - acceptable since this gates a shared unlock
       code, not real account credentials. */
    -webkit-text-security: disc;
    text-security: disc;
}
.eub-input:focus {
    border-color: var(--color-accent, #c9a84c);
    box-shadow: 0 0 0 3px rgba(201,168,76,0.12);
}
/* Spinner inside the Unlock button while the AJAX call is in flight */
.eub-spinner {
    display: inline-block;
    width: 13px;
    height: 13px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: eub-spin 0.55s linear infinite;
    vertical-align: -2px;
    flex-shrink: 0;
}
@keyframes eub-spin {
    to { transform: rotate(360deg); }
}

.eub-btn {
    height: 38px;
    padding: 0 18px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.eub-error {
    width: 100%;
    font-size: 0.82rem;
    color: #b91c1c;
    margin: 0;
    padding: 0;
}
.expert-unlock-bar.is-unlocked {
    display: none;
}

@media (max-width: 560px) {
    .expert-unlock-bar { flex-direction: column; align-items: flex-start; gap: 10px; }
    .eub-input { width: 100%; }
    .eub-form-row { width: 100%; }
    .eub-btn { width: 100%; justify-content: center; }
}

/* ── Expert profile lock screen ──────────────────────────────── */
.expert-profile-locked-screen {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 56px 24px 64px;
    gap: 16px;
}
.epls-icon {
    font-size: 3rem;
    color: var(--color-primary, #1e3a2f);
    opacity: 0.55;
    line-height: 1;
}
.epls-heading {
    font-family: var(--font-display, 'Playfair Display', serif);
    font-size: 1.5rem;
    color: var(--color-dark, #1a2332);
    margin: 0;
}
.epls-desc {
    font-size: 0.95rem;
    color: #6b7280;
    max-width: 400px;
    margin: 0;
}
.epls-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 4px;
}
.epls-input {
    width: 220px;
    height: 44px;
    font-size: 0.95rem;
    padding: 0 14px;
}
.epls-form .eub-btn {
    height: 44px;
    padding: 0 24px;
    font-size: 0.95rem;
}
.epls-back {
    font-size: 0.85rem;
    color: var(--color-primary, #1e3a2f);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.7;
    margin-top: 4px;
    transition: opacity 0.18s;
}
.epls-back:hover { opacity: 1; }

@media (max-width: 480px) {
    .epls-input { width: 100%; }
    .epls-form { width: 100%; flex-direction: column; }
    .epls-form .eub-btn { width: 100%; justify-content: center; }
}
