/* ================================================================
   SEC-EXPERT-PROFILE — Expert Profile (Theme Standard)

   @package FocofyFactory
   @since 2.4
   @version 3.1
   * Design Tokens Contract v3.6: hardcodes → --fw-*, --lh-*, --font-size-*; clamp() → --font-size-5xl/3xl

   v3.0 → v3.1:
     - max-width: 920px (inválido, grid estrutural) → mobile-first min-width: 1024px
     - max-width: 560px (inválido, padding override) → max-width: 767px
     - padding: 8px 12px no __specialty → var(--space-2) var(--space-3)
   ================================================================ */

/* ── BASE ────────────────────────────────────────────────────── */

.sec-expert-profile {
  color: var(--color-text);
}

/* Background variants (aplicados no wrapper interno para manter padrão de “card” do tema) */
.sec-expert-profile__wrapper {
  display: grid;
  grid-template-columns: 1fr;          /* mobile: coluna única */
  gap: var(--space-8);
  align-items: center;

  background: var(--color-surface-2);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-md);
}

.sec-expert-profile--bg-none .sec-expert-profile__wrapper {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.sec-expert-profile--bg-light .sec-expert-profile__wrapper {
  background: color-mix(in srgb, var(--color-surface-2) 50%, transparent);
  border-color: var(--color-border-subtle);
}

.sec-expert-profile--bg-dark .sec-expert-profile__wrapper {
  background: var(--color-surface-dark);
  border-color: var(--color-border-subtle);
}

.sec-expert-profile--bg-gradient .sec-expert-profile__wrapper {
  background:
    radial-gradient(1100px 520px at 20% 20%, color-mix(in srgb, var(--color-accent) 24%, transparent), transparent 60%),
    radial-gradient(900px 520px at 80% 30%, color-mix(in srgb, var(--color-accent-2) 16%, transparent), transparent 55%),
    var(--color-surface-dark);
  border-color: var(--color-border-subtle);
}

/* bg-image: usa background-image inline via style (se você já injeta no PHP) */
.sec-expert-profile--bg-image .sec-expert-profile__wrapper {
  background-color: var(--color-surface-dark);
  background-size: cover;
  background-position: center;
  border-color: var(--color-border-subtle);
}

/* ── FOTO ────────────────────────────────────────────────────── */

.sec-expert-profile__photo {
  width: 100%;
}

.sec-expert-profile__photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-lg);
}

/* Inversão da foto — ativa apenas no desktop via min-width: 1024px abaixo */

/* ── CONTEÚDO ────────────────────────────────────────────────── */

.sec-expert-profile__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.sec-expert-profile--align-center .sec-expert-profile__content {
  text-align: center;
}

/* Nome / Título / Tagline */
.sec-expert-profile__name {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: var(--fw-extrabold);
  font-size: var(--font-size-5xl);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
}

.sec-expert-profile__title {
  margin: 0;
  font-size: var(--font-size-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-2);
  opacity: 0.9;
}

.sec-expert-profile__tagline {
  margin: 0;
  font-size: var(--font-size-lg);
  line-height: var(--lh-normal);
  color: var(--color-text-muted);
}

/* Bio */
.sec-expert-profile__bio {
  color: var(--color-text);
  opacity: 0.9;
  line-height: var(--lh-relaxed);
}

.sec-expert-profile__bio p { margin: 0 0 var(--space-2); }
.sec-expert-profile__bio p:last-child { margin-bottom: 0; }

/* ── MÉTRICAS ────────────────────────────────────────────────── */

.sec-expert-profile__metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-4);
  padding: var(--space-6);

  background: color-mix(in srgb, var(--color-surface-2) 100%, transparent);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
}

.sec-expert-profile__metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-1);
}

.sec-expert-profile__metric-icon { font-size: var(--font-size-xl); line-height: 1; }

.sec-expert-profile__metric-number {
  font-family: var(--font-heading);
  font-weight: var(--fw-extrabold);
  font-size: var(--font-size-3xl);
  line-height: 1;
  color: var(--color-accent);
}

.sec-expert-profile__metric-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: var(--lh-snug);
}

/* ── ESPECIALIDADES (chips) ──────────────────────────────────── */

.sec-expert-profile__specialties-title,
.sec-expert-profile__certifications-title {
  margin: 0 0 var(--space-2);
  font-family: var(--font-heading);
  font-weight: var(--fw-extrabold);
  font-size: var(--font-size-lg);
  line-height: var(--lh-tight);
}

.sec-expert-profile__specialties-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.sec-expert-profile__specialty {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-3);  /* 8px 12px */
  border-radius: var(--radius-full);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-subtle);
  font-size: var(--font-size-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  transition: all var(--transition-base);
}

.sec-expert-profile__specialty:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.sec-expert-profile__specialty[data-level="expert"] {
  background: color-mix(in srgb, var(--color-accent) 18%, var(--color-surface-2));
  border-color: color-mix(in srgb, var(--color-accent) 55%, var(--color-border-subtle));
}

.sec-expert-profile__specialty[data-level="advanced"] {
  background: color-mix(in srgb, var(--color-accent-2) 16%, var(--color-surface-2));
  border-color: color-mix(in srgb, var(--color-accent-2) 50%, var(--color-border-subtle));
}

/* ── CERTIFICAÇÕES ───────────────────────────────────────────── */

.sec-expert-profile__certifications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-4);
}

.sec-expert-profile__certification {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}

.sec-expert-profile__certification:hover {
  border-color: color-mix(in srgb, var(--color-accent) 40%, var(--color-border-subtle));
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.sec-expert-profile__cert-logo {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--color-surface-1) 92%, transparent);
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--color-border-subtle) 50%, transparent);
  overflow: hidden;
}

.sec-expert-profile__cert-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sec-expert-profile__cert-info strong {
  display: block;
  font-weight: var(--fw-extrabold);
}

.sec-expert-profile__cert-info span {
  display: block;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* ── SOCIAL ─────────────────────────────────────────────────── */

.sec-expert-profile__social {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.sec-expert-profile--align-center .sec-expert-profile__social {
  justify-content: center;
}

.sec-expert-profile__social-link {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-subtle);
  color: var(--color-text);
  transition: all var(--transition-base);
}

.sec-expert-profile__social-link:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* ── CTAs ───────────────────────────────────────────────────── */

.sec-expert-profile__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.sec-expert-profile--align-center .sec-expert-profile__ctas {
  justify-content: center;
}

/* ── RESPONSIVO ─────────────────────────────────────────────── */

/* Wrapper: mobile-first — 1 coluna na base, 2 colunas a partir do desktop */
.sec-expert-profile__wrapper {
  grid-template-columns: 1fr;          /* mobile: coluna única */
}

@media (min-width: 1024px) {           /* --bp-desktop */
  .sec-expert-profile__wrapper {
    grid-template-columns: minmax(260px, 420px) 1fr;
    gap: var(--space-12);
  }

  .sec-expert-profile--photo-right .sec-expert-profile__photo { order: 2; }
  .sec-expert-profile--photo-right .sec-expert-profile__content { order: 1; }
}

@media (max-width: 767px) {            /* abaixo de --bp-tablet */
  .sec-expert-profile__wrapper {
    padding: var(--space-6);
  }

  .sec-expert-profile--bg-none .sec-expert-profile__wrapper {
    padding: 0;
  }
}
