/* =========================================================
   OLIMP EKSPERT — Experts hub + single profile
   ========================================================= */

/* Full-bleed: escape theme <main class="container"> */
main.container:has(> .oe-experts-hub),
main.container:has(> .oe-expert-single),
main.oe-experts-main {
  max-width: none !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/*
  Sticky filters need ancestors with overflow:visible.
  overflow-x:clip|hidden on .main-container (or body) makes the tall
  wrapper the sticky containing block — it never scrolls, so chips don't stick.
*/
.main-container:has(.oe-experts-hub) {
  max-width: none !important;
  overflow: visible !important;
  /* Contain main's margin-top so it cannot collapse through the container and
     paint a white strip under #wpadminbar above the fixed header. */
  display: flow-root;
}

.main-container:has(.oe-expert-single) {
  max-width: none !important;
  overflow-x: clip;
}

/*
  Do NOT set overflow-x on html here: it becomes a fixed containing block and,
  together with WP's html { margin-top } admin-bar bump, creates a white gap
  between #wpadminbar and <header>. Horizontal bleed is clipped on sections.
*/
body:has(.oe-experts-hub) {
  overflow-x: visible !important;
}

/* Contain horizontal bleed on non-sticky sections only */
.oe-experts-intro,
.oe-experts-grid-section {
  overflow-x: clip;
  max-width: 100%;
}

.oe-experts-hub,
.oe-expert-single {
  --oe-ink: #0f172a;
  --oe-slate: #1e293b;
  --oe-muted: #64748b;
  --oe-body: #334155;
  --oe-line: #e2e8f0;
  --oe-soft: #f8fafc;
  --oe-accent: #00a3c4;
  --oe-accent-2: #0cb4d8;
  --oe-radius: 14px;
  color: var(--oe-body);
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.oe-experts-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.oe-experts-bc {
  margin: 0 0 18px;
  padding: 0;
  background: transparent !important;
  font-size: 13px;
}

.oe-experts-bc .breadcrumb-item,
.oe-experts-bc .breadcrumb-item.active,
.oe-experts-bc .breadcrumb-item + .breadcrumb-item::before {
  background: transparent !important;
  color: var(--oe-muted);
}

.oe-experts-bc a {
  color: var(--oe-muted);
  text-decoration: none;
  background: transparent !important;
}

.oe-experts-bc a:hover {
  color: var(--oe-accent);
}

/* Placeholder photo */
.oe-expert-placeholder {
  position: relative;
  display: block;
  box-sizing: border-box;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: var(--oe-radius);
  overflow: hidden;
  background: linear-gradient(145deg, #0f172a 0%, #1e293b 55%, #334155 100%);
  color: #e2e8f0;
}

/* Seal + initials as one optically centered column (badge/exp stay absolute). */
.oe-expert-placeholder__stack {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: max-content;
  max-width: calc(100% - 32px);
  /* Nudge up slightly: bottom verified bar eats visual space more than top exp chip. */
  transform: translate(-50%, calc(-50% - 6px));
  pointer-events: none;
}

.oe-expert-placeholder__seal {
  position: static;
  flex-shrink: 0;
  line-height: 0;
  opacity: 0.9;
  pointer-events: none;
}

.oe-expert-placeholder__seal svg {
  display: block;
  width: 88px;
  height: auto;
  margin: 0 auto;
}

.oe-expert-placeholder__mono {
  position: static;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: max-content;
  max-width: 100%;
  margin: 0;
  /* Cancel trailing letter-spacing so two glyphs stay optically centered. */
  margin-right: -0.06em;
  box-sizing: border-box;
  font-size: clamp(1.85rem, 5.2vw, 2.6rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.06em;
  text-align: center;
  text-indent: 0;
  color: #f8fafc;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.oe-expert-placeholder__badge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
  background: rgba(15, 23, 42, 0.82);
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  color: #cbd5e1;
}

.oe-expert-placeholder__check {
  display: inline-block;
  margin-right: 4px;
  color: #38bdf8;
}

.oe-expert-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Hub intro — full-bleed, flush under header */
.oe-experts-intro {
  width: 100%;
  padding: 20px 0 28px;
  margin: 0;
  border-bottom: 1px solid var(--oe-line);
  background:
    radial-gradient(900px 280px at 10% -20%, rgba(14, 165, 233, 0.12), transparent 60%),
    linear-gradient(180deg, #f0f9fb 0%, #f8fafc 55%, #ffffff 100%);
}

.oe-experts-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--oe-accent);
}

.oe-experts-h1 {
  margin: 0 0 12px;
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
  line-height: 1.25;
  color: var(--oe-ink);
  font-weight: 750;
}

.oe-experts-lead {
  margin: 0;
  max-width: 46rem;
  font-size: 15px;
  line-height: 1.6;
  color: var(--oe-muted);
}

/* Sticky category chips: stick below fixed mobile header (≤550px).
   --oe-mobile-header-offset = sticky top (header.getBoundingClientRect().bottom)
   --oe-mobile-header-height = main clearance (header height only; never admin-bar)
   Stuck/fixed share the same top. Desktop: top:0. z-index 40. */
.oe-experts-filters {
  padding: 8px 0 6px;
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid rgba(0, 163, 196, 0.14);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 8px 24px -18px rgba(15, 23, 42, 0.28);
  transition:
    box-shadow 0.22s ease,
    background-color 0.22s ease,
    border-color 0.22s ease;
}

.oe-experts-filters.is-stuck,
.oe-experts-filters.is-fixed-sticky {
  background: rgba(255, 255, 255, 0.97);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 14px 32px -16px rgba(15, 23, 42, 0.34);
  border-bottom-color: rgba(0, 163, 196, 0.32);
}

/* JS fallback when CSS sticky is blocked by an ancestor */
.oe-experts-filters.is-fixed-sticky {
  position: fixed !important;
  left: 0;
  right: 0;
  width: 100%;
  margin: 0;
}

.oe-experts-filters-ph {
  display: none;
  width: 100%;
  pointer-events: none;
}

.oe-experts-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 0;
}

.oe-experts-tab {
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  color: var(--oe-slate);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.25;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease;
}

.oe-experts-tab:hover {
  border-color: rgba(0, 163, 196, 0.45);
  color: #007a94;
  background: rgba(0, 163, 196, 0.06);
  box-shadow: 0 4px 12px -8px rgba(0, 163, 196, 0.55);
}

.oe-experts-tab.is-active {
  background: linear-gradient(180deg, #00b3d6 0%, #00a3c4 100%);
  border-color: #0096b5;
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(0, 163, 196, 0.95);
}

.oe-experts-tab:active {
  transform: translateY(1px);
}

.oe-experts-grid-section {
  padding: 28px 0 64px;
  background: #fff;
}

.oe-experts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

.oe-expert-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--oe-line);
  border-radius: calc(var(--oe-radius) + 2px);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 28px -22px rgba(15, 23, 42, 0.32);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.oe-expert-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 163, 196, 0.28);
  box-shadow: 0 20px 40px -22px rgba(15, 23, 42, 0.38);
}

.oe-expert-card.is-hidden {
  display: none;
}

.oe-expert-card__media {
  position: relative;
  display: block;
  flex-shrink: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(160deg, #e8f6f9 0%, #f1f5f9 55%, #e2e8f0 100%);
}

.oe-expert-card__media .oe-expert-placeholder {
  width: 100%;
  height: 100%;
}

.oe-expert-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.oe-expert-card__exp {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 6px 16px -10px rgba(15, 23, 42, 0.35);
}

.oe-expert-card__body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 10px;
  padding: 18px 18px 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdfe 100%);
}

.oe-expert-card__name {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.3;
  color: var(--oe-ink);
}

.oe-expert-card__name a {
  color: inherit;
  text-decoration: none;
}

.oe-expert-card__name a:hover {
  color: #00a3c4;
}

.oe-expert-card__badge {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--oe-muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.oe-expert-card__tags {
  list-style: none;
  margin: 2px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px;
}

.oe-expert-card__tags li,
.oe-expert-tag {
  display: inline-flex;
  align-items: center;
  width: auto;
  max-width: 100%;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.3;
  color: #0f4c5c;
  background: #f0f9fb;
  border: 1px solid #d7eef3;
  border-radius: 999px;
  padding: 5px 11px;
  white-space: normal;
  overflow: visible;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.oe-expert-card__footer {
  margin-top: auto;
  padding-top: 10px;
}

.oe-expert-card__link {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #00a3c4;
  text-decoration: none;
  transition: color 0.2s ease, gap 0.2s ease;
}

.oe-expert-card__link:hover {
  color: #0284c7;
}

.oe-experts-empty {
  text-align: center;
  color: var(--oe-muted);
  padding: 24px 0;
}

/* Single hero — full-bleed, flush under header */
.oe-expert-hero {
  width: 100%;
  padding: 20px 0 40px;
  margin: 0;
  border-bottom: 1px solid var(--oe-line);
  background:
    radial-gradient(700px 240px at 90% 0%, rgba(2, 132, 199, 0.1), transparent 55%),
    linear-gradient(180deg, #f0f9fb 0%, #f8fafc 55%, #ffffff 100%);
}

.oe-expert-hero__grid {
  display: grid;
  grid-template-columns: minmax(220px, 340px) 1fr;
  gap: 36px;
  align-items: start;
}

.oe-expert-hero__photo-wrap {
  position: relative;
}

.oe-expert-hero__photo-wrap .oe-expert-placeholder,
.oe-expert-hero__photo-wrap img {
  border-radius: var(--oe-radius);
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.oe-expert-verified {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  background: rgba(248, 250, 252, 0.94);
  border: 1px solid rgba(226, 232, 240, 0.95);
}

.oe-expert-hero__name {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  color: var(--oe-ink);
  line-height: 1.2;
}

.oe-expert-hero__badge {
  margin: 0 0 18px;
  font-size: 15px;
  color: var(--oe-accent);
  font-weight: 650;
}

.oe-expert-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.oe-expert-metric {
  border: 1px solid var(--oe-line);
  background: #fff;
  border-radius: 12px;
  padding: 12px;
}

.oe-expert-metric__val {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--oe-ink);
}

.oe-expert-metric__label {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--oe-muted);
  line-height: 1.35;
}

.oe-expert-lead {
  font-size: 15px;
  line-height: 1.65;
  color: var(--oe-body);
  margin-bottom: 20px;
}

.oe-expert-cta {
  appearance: none;
  border: 0;
  cursor: pointer;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 14px 20px;
  border-radius: 12px;
  box-shadow: 0 12px 24px -14px rgba(2, 132, 199, 0.8);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.oe-expert-cta:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.oe-expert-tabs-section {
  padding: 8px 0 48px;
  background: #fff;
}

.oe-expert-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--oe-line);
  padding-bottom: 12px;
}

.oe-expert-tab {
  border: 0;
  background: transparent;
  color: var(--oe-muted);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 12px;
  cursor: pointer;
  border-radius: 10px;
}

.oe-expert-tab.is-active {
  color: var(--oe-ink);
  background: var(--oe-soft);
}

.oe-expert-panels {
  width: 100%;
  min-width: 0;
}

.oe-expert-panel {
  display: none;
  animation: oeFade 0.28s ease;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.oe-expert-panel.is-active {
  display: block;
}

@keyframes oeFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.oe-expert-spec-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.oe-expert-spec-grid li {
  border: 1px solid var(--oe-line);
  background: var(--oe-soft);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--oe-slate);
}

.oe-expert-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  min-width: 0;
}

.oe-expert-timeline li {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 20px;
  width: 100%;
  padding: 12px 0;
  border-bottom: 1px solid var(--oe-line);
  box-sizing: border-box;
}

.oe-expert-timeline__year {
  font-weight: 800;
  color: var(--oe-accent);
}

.oe-expert-timeline li > div,
.oe-expert-timeline__content {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  line-height: 1.6;
  word-break: normal;
  overflow-wrap: break-word;
}

.oe-expert-timeline p,
.oe-expert-doc {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.5;
  word-break: normal;
}

.oe-expert-doc {
  color: var(--oe-muted);
}

/* Education cards — full width of tab */
.oe-expert-edu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: 100%;
}

.oe-expert-edu-card {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid var(--oe-line);
  border-radius: 12px;
  background: #fff;
  padding: 14px 16px;
}

.oe-expert-edu-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 14px;
  margin-bottom: 6px;
}

.oe-expert-edu-card__degree,
.oe-expert-edu-card__year {
  font-weight: 800;
  color: var(--oe-accent);
  font-size: 15px;
  line-height: 1.35;
}

.oe-expert-edu-card__inst,
.oe-expert-edu-card__doc {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  word-break: normal;
  overflow-wrap: break-word;
}

.oe-expert-edu-card__inst {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--oe-ink);
}

.oe-expert-edu-card__doc {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--oe-muted);
}

/* Legacy timeline class — compact if still present */
.oe-expert-adv-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  min-width: 0;
}

.oe-expert-adv-timeline li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  width: 100%;
  padding: 10px 0;
  border-bottom: 1px solid var(--oe-line);
  box-sizing: border-box;
}

.oe-expert-adv-timeline__year {
  font-weight: 800;
  color: var(--oe-accent);
  line-height: 1.5;
  white-space: nowrap;
}

.oe-expert-adv-timeline__body {
  min-width: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--oe-slate);
  word-break: normal;
  overflow-wrap: break-word;
}

.oe-expert-degrees {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.oe-expert-degrees li {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--oe-line);
  border-radius: 12px;
  background: var(--oe-soft);
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--oe-slate);
  word-break: normal;
  overflow-wrap: break-word;
}

/* Compact dash lists: PK, retraining */
.oe-expert-list {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  min-width: 0;
}

.oe-expert-list li {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  column-gap: 10px;
  align-items: start;
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--oe-line);
  font-size: 14px;
  line-height: 1.55;
  color: var(--oe-slate);
  word-break: normal;
  overflow-wrap: break-word;
}

.oe-expert-list li::before {
  content: "–";
  color: var(--oe-accent);
  font-weight: 700;
  line-height: 1.55;
  text-align: center;
}

.oe-expert-accordion {
  display: none;
}

.oe-expert-acc {
  --oe-acc-cyan: #00a3c4;
  --oe-acc-soft: #f0f9fb;
  margin-bottom: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 20px rgba(15, 23, 42, 0.04);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.oe-expert-acc.is-open {
  border-color: rgba(0, 163, 196, 0.35);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 24px rgba(0, 163, 196, 0.08);
}

.oe-expert-acc__btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 14px 16px;
  border: 0;
  border-left: 3px solid transparent;
  background: #fff;
  color: var(--oe-ink);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.oe-expert-acc.is-open .oe-expert-acc__btn {
  border-left-color: var(--oe-acc-cyan);
  background: linear-gradient(180deg, var(--oe-acc-soft) 0%, #fff 100%);
  color: #0f172a;
}

.oe-expert-acc__btn:focus-visible {
  outline: 2px solid var(--oe-acc-cyan);
  outline-offset: -2px;
}

.oe-expert-acc__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--oe-acc-soft);
  color: var(--oe-acc-cyan);
}

.oe-expert-acc__chevron {
  display: block;
  transition: transform 0.28s ease;
}

.oe-expert-acc.is-open .oe-expert-acc__chevron {
  transform: rotate(180deg);
}

.oe-expert-acc__label {
  flex: 1 1 auto;
  min-width: 0;
}

.oe-expert-acc__panel {
  padding: 0 16px 16px;
  color: var(--oe-slate);
}

.oe-expert-acc__panel:not([hidden]) {
  animation: oe-acc-panel-in 0.28s ease;
}

.oe-expert-acc__panel[hidden] {
  display: none !important;
}

.oe-expert-acc__panel .oe-expert-edu-list,
.oe-expert-acc__panel .oe-expert-degrees,
.oe-expert-acc__panel .oe-expert-list,
.oe-expert-acc__panel .oe-expert-spec-grid {
  margin-top: 4px;
}

@keyframes oe-acc-panel-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.oe-expert-docs,
.oe-expert-related {
  padding: 16px 0 56px;
  background: #fff;
}

.oe-expert-section-title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  color: var(--oe-ink);
}

.oe-expert-section-sub {
  margin: 0 0 18px;
  color: var(--oe-muted);
  font-size: 14px;
}

.oe-expert-docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.oe-expert-doc-thumb {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--oe-line);
  background: linear-gradient(180deg, #f8fafc, #eef2f7);
  aspect-ratio: 3 / 4;
  min-height: 280px;
}

.oe-expert-doc-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #f8fafc;
  image-rendering: -webkit-optimize-contrast;
  transition: transform 0.25s ease;
}

.oe-expert-doc-thumb:hover img {
  transform: scale(1.02);
}

.oe-expert-related-list {
  margin: 0;
  padding-left: 1.1rem;
}

.oe-expert-related-list a {
  color: var(--oe-accent);
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 992px) {
  .oe-experts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .oe-expert-hero__grid {
    grid-template-columns: 1fr;
  }
  .oe-expert-docs-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

@media (max-width: 720px) {
  .oe-experts-grid {
    grid-template-columns: 1fr;
  }
  .oe-expert-metrics {
    grid-template-columns: 1fr;
  }
  .oe-expert-spec-grid {
    grid-template-columns: 1fr;
  }
  .oe-expert-tabs {
    display: none;
  }
  .oe-expert-panels {
    display: none;
  }
  .oe-expert-accordion {
    display: block;
    /* Clear sticky header context + leave room above chat FAB */
    padding-bottom: 96px;
  }
  .oe-expert-docs-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }
  .oe-expert-doc-thumb {
    min-height: 220px;
  }
}

/* Mobile: one premium chip row with horizontal swipe (overflow on inner track only — sticky stays on outer bar) */
@media (max-width: 768px) {
  .oe-experts-filters .oe-experts-container {
    padding-left: 0;
    padding-right: 0;
  }

  .oe-experts-tabs {
    flex-wrap: nowrap;
    gap: 7px;
    padding: 4px 16px 6px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
    mask-image: linear-gradient(
      90deg,
      #000 0,
      #000 calc(100% - 28px),
      transparent 100%
    );
    -webkit-mask-image: linear-gradient(
      90deg,
      #000 0,
      #000 calc(100% - 28px),
      transparent 100%
    );
  }

  .oe-experts-tabs::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .oe-experts-tab {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 8px 14px;
    font-size: 12.5px;
  }
}

/* Fixed site header only at ≤550px (style.css).
   main clearance = header HEIGHT (110px) — never the admin-bar bump.
   sticky top = header BOTTOM from viewport (JS may raise when search opens).
   Theme may omit body.admin-bar; detect #wpadminbar instead. */
@media (max-width: 550px) {
  /* Sit flush under WP admin bar — no extra white strip */
  body:has(#wpadminbar):has(.oe-experts-hub) .main-container > header,
  body:has(#wpadminbar):has(.oe-expert-single) .main-container > header {
    top: 46px;
  }

  body:has(.oe-experts-hub) #header-block-search {
    margin-top: 0.35rem !important;
    margin-bottom: 0 !important;
    padding: 0 0 0.35rem;
  }

  body:has(.oe-experts-hub) #header-block-search .form-control {
    min-height: 42px;
    border-radius: 10px;
    border-color: rgba(0, 163, 196, 0.28);
    box-shadow: none;
  }

  body:has(.oe-experts-hub) #header-block-search .form-control:focus {
    border-color: #00a3c4;
    box-shadow: 0 0 0 3px rgba(0, 163, 196, 0.15);
  }

  main.oe-experts-main {
    margin-top: var(--oe-mobile-header-height, 110px) !important;
  }

  .oe-experts-filters {
    top: var(--oe-mobile-header-offset, 110px);
    padding: 5px 0 3px;
  }

  /* Fallbacks when JS has not measured yet (admin bar present) */
  body:has(#wpadminbar) .oe-experts-filters {
    top: var(--oe-mobile-header-offset, 156px);
  }
}

/* строка досье под карточкой эксперта (18.09.2026) */
.oe-expert-card__meta{margin:8px 0 4px;font-size:13px;line-height:1.45;color:#4b5b6b}
