/* =========================================================
   V Resurse Ok — specialist profile page
   Dedicated CSS so the profile does not break when style.css changes.
   No glow version.
========================================================= */

.specialist-profile-page .hero-section {
  padding-top: 48px;
}

.specialist-profile-page .profile-hero-card {
  min-height: unset !important;
  padding: 44px !important;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(248, 238, 244, 0.62)),
    var(--surface-white);
  box-shadow: none !important;
  overflow: hidden;
}

.profile-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 42px;
  align-items: stretch;
}

.profile-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 424px;
}

.profile-hero-copy > .badge {
  width: fit-content;
}

.profile-hero-copy h1 {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--text-primary);
  font-size: clamp(40px, 4.2vw, 58px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.045em;
}

.profile-role {
  margin: 14px 0 0;
  color: var(--brand-primary);
  font-size: 17px;
  line-height: 24px;
  font-weight: 600;
}

.profile-hero-copy .hero-lead {
  max-width: 660px;
  min-height: unset;
  margin: 18px 0 0;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 28px;
}

.profile-actions {
  gap: 12px;
  margin-top: 34px !important;
}

.profile-actions .button {
  height: 48px;
  white-space: nowrap;
}

.profile-chips {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.profile-summary-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 424px;
  padding: 30px 26px 26px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.88);
  overflow: hidden;
}

.profile-summary-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 118px;
  background: linear-gradient(180deg, rgba(248, 239, 251, 0.9), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.profile-summary-card > * {
  position: relative;
  z-index: 1;
}

.profile-avatar {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-default);
  border-radius: 50%;
  background: linear-gradient(180deg, var(--surface-white) 0%, var(--section-color-soft) 100%);
  color: var(--text-primary);
  font-size: 30px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.profile-summary-card h2 {
  margin: 20px 0 0;
  color: var(--text-primary);
  text-align: center;
  font-size: 28px;
  line-height: 34px;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.profile-summary-card > p {
  margin: 8px 0 0;
  color: var(--text-secondary);
  text-align: center;
  font-size: 14px;
  line-height: 22px;
}

.profile-tags {
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.profile-metrics {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: auto 0 0;
  padding: 22px 0 0;
}

.profile-metrics div {
  min-height: 78px;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 12px 8px;
  border: 1px solid var(--border-default);
  border-radius: 18px;
  background: var(--bg-primary);
  text-align: center;
}

.profile-metrics dt,
.profile-metrics dd {
  margin: 0;
}

.profile-metrics dt {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 16px;
}

.profile-metrics dd {
  margin-top: 8px;
  color: var(--text-primary);
  font-size: 18px;
  line-height: 22px;
  font-weight: 700;
}

.specialist-profile-page .section {
  padding-top: 64px;
}

.specialist-profile-page .section-head {
  margin-bottom: 24px;
}

.specialist-profile-page .topic-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.specialist-profile-page .topic-card {
  min-height: 254px;
  padding: 24px;
}

.specialist-profile-page .topic-card .accent-bar {
  width: 48px;
  height: 5px;
}

.specialist-profile-page .topic-card .badge {
  margin-top: 18px;
}

.specialist-profile-page .profile-format-card {
  grid-template-columns: 360px 1fr;
  align-items: stretch;
  background: rgba(255, 255, 255, 0.9);
}

.specialist-profile-page .direction-format-option {
  display: flex;
  flex-direction: column;
  min-height: 276px;
}

.specialist-profile-page .direction-specialist-banner {
  min-height: 224px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 239, 251, 0.82)),
    var(--surface-white);
}

.specialist-profile-page .direction-banner-actions {
  align-items: flex-start;
}

.specialist-profile-page [data-profile-reviews] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.specialist-profile-page .review-card {
  min-height: 268px;
}

.specialist-profile-page .faq-list {
  max-width: 980px;
}

.specialist-profile-page .cta-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(248, 239, 251, 0.98) 100%);
}

.specialist-profile-page .button,
.specialist-profile-page .text-link {
  white-space: nowrap;
}

@media (max-width: 1260px) {
  .profile-hero-grid,
  .specialist-profile-page .profile-format-card,
  .specialist-profile-page .direction-specialist-banner {
    grid-template-columns: 1fr;
  }

  .profile-hero-copy {
    min-height: unset;
  }

  .profile-summary-card {
    min-height: unset;
  }

  .specialist-profile-page .topic-grid,
  .specialist-profile-page [data-profile-reviews] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .specialist-profile-page .profile-hero-card {
    padding: 24px !important;
  }

  .profile-hero-copy h1 {
    font-size: 34px;
    line-height: 40px;
  }

  .profile-actions,
  .profile-chips,
  .profile-tags {
    align-items: stretch;
  }

  .profile-actions .button {
    width: 100%;
  }

  .profile-metrics,
  .specialist-profile-page .topic-grid,
  .specialist-profile-page [data-profile-reviews] {
    grid-template-columns: 1fr;
  }

  .profile-summary-card h2 {
    font-size: 24px;
    line-height: 30px;
  }
}

/* ===== SPECIALIST PROFILE FAQ WIDTH FIX ===== */
.specialist-profile-page .faq-list {
  width: 100%;
  max-width: none;
}

.specialist-profile-page .faq-item {
  width: 100%;
}

.specialist-profile-page .faq-item p {
  max-width: 920px;
}

/* ===== PROFILE REVIEWS FINAL LINK ===== */
.specialist-profile-page .profile-reviews-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
}

.specialist-profile-page .profile-reviews-head > div {
  min-width: 0;
  max-width: 780px;
}

.specialist-profile-page .profile-reviews-link {
  flex: 0 0 auto;
  white-space: normal;
  text-align: center;
}

@media (max-width: 980px) {
  .specialist-profile-page .profile-reviews-head {
    align-items: stretch;
    flex-direction: column;
  }

  .specialist-profile-page .profile-reviews-link {
    width: 100%;
  }
}

/* ===== Specialist profile avatar image support ===== */
.profile-avatar {
  overflow: hidden;
}

.profile-avatar.has-image {
  padding: 0;
  color: transparent;
  background: #fff;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
