/* ==========================================================================
   INSTITUTO SAPIENS — COMPONENTES DE PÁGINAS INTERNAS
   Planos, trilha, fluxo, diretório, formulário, legado institucional,
   vitrine de cursos, cartão de contato.
   Usado em psicologos.html, sobre.html, fundadora.html, loja.html,
   empresas.html, cursos.html e contato.html. Depende de tokens.css + style.css.
   ========================================================================== */

/* ---------------------------------- Cartão de legado (hero Sobre o Instituto) ---------------------------------- */

.legacy-card {
  background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  padding: var(--space-6); transform: rotate(2deg); position: relative; z-index: 1;
}
.legacy-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: var(--space-5); padding-bottom: var(--space-4); border-bottom: 1px solid var(--neutral-100); }
.legacy-card-head .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sapiens-500); }
.legacy-card-head span { font-size: var(--fs-xs); font-weight: 700; color: var(--neutral-500); letter-spacing: 0.02em; }
.legacy-number { display: flex; align-items: baseline; gap: var(--space-3); margin-bottom: var(--space-5); }
.legacy-number b { font-size: 64px; font-weight: 800; color: var(--sapiens-600); letter-spacing: -0.03em; line-height: 1; }
.legacy-number span { font-size: var(--fs-base); color: var(--neutral-700); line-height: var(--lh-normal); max-width: 160px; }
.legacy-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); margin-bottom: var(--space-5); }
.legacy-stat { text-align: center; background: var(--sapiens-50); border-radius: var(--radius-sm); padding: 12px 6px; }
.legacy-stat b { display: block; font-size: var(--fs-md); font-weight: 800; color: var(--sapiens-700); line-height: 1; margin-bottom: 4px; }
.legacy-stat span { font-size: 10px; color: var(--sapiens-600); font-weight: 600; }
.legacy-card .doc-check { color: var(--sapiens-700); background: var(--sapiens-50); }
.legacy-card .doc-check .icon { color: var(--sapiens-600); }

/* ---------------------------------- Cartão de equipe/serviço genérico (grid-3) ---------------------------------- */

.card {
  background: var(--white); border: 1px solid var(--neutral-200); border-radius: var(--radius-md);
  padding: var(--space-6); box-shadow: var(--shadow-xs); transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-icon {
  width: 52px; height: 52px; border-radius: 15px; background: var(--sapiens-50); color: var(--sapiens-600);
  display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-4);
}
.card-icon .icon { width: 24px; height: 24px; }
.card-title { font-size: var(--fs-md); font-weight: 800; color: var(--neutral-900); margin-bottom: 6px; }
.card-body { font-size: var(--fs-base); color: var(--neutral-700); line-height: var(--lh-normal); }

/* ---------------------------------- Cartão de vídeo-aula (hero Cursos) ---------------------------------- */

.course-preview-card {
  background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  overflow: hidden; transform: rotate(-2deg); position: relative; z-index: 1; max-width: 380px;
}
.course-preview-video {
  background: var(--sapiens-gradient); height: 180px; display: flex; align-items: center; justify-content: center;
  position: relative;
}
.course-preview-play {
  width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,.92);
  display: flex; align-items: center; justify-content: center; color: var(--sapiens-700);
}
.course-preview-play .icon { width: 22px; height: 22px; }
.course-preview-bar { position: absolute; bottom: 0; left: 0; height: 4px; width: 100%; background: rgba(255,255,255,.28); }
.course-preview-bar span { display: block; height: 100%; width: 62%; background: var(--sapiens-300); }
.course-preview-body { padding: var(--space-5); }
.course-preview-title { font-size: var(--fs-base); font-weight: 800; color: var(--neutral-900); margin-bottom: var(--space-3); }
.course-preview-mod { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--neutral-700); padding: 5px 0; }
.course-preview-mod .icon { width: 16px; height: 16px; color: var(--sapiens-500); flex-shrink: 0; }
.course-preview-mod.done { color: var(--neutral-500); }
.course-preview-mod.done .icon { color: var(--agila-500); }

/* ---------------------------------- Vitrine de cursos ---------------------------------- */

.course-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
.course-card {
  background: var(--white); border: 1px solid var(--neutral-200); border-radius: var(--radius-md);
  overflow: hidden; box-shadow: var(--shadow-xs); display: flex; flex-direction: column;
  transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.course-card-top { padding: var(--space-5) var(--space-5) 0; display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.course-status { font-size: 10.5px; font-weight: 800; padding: 5px 11px; border-radius: var(--radius-pill); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.course-status.live { background: #FDE8E8; color: #B42318; }
.course-status.recorded { background: var(--sapiens-50); color: var(--sapiens-700); }
.course-status.soon { background: var(--neutral-100); color: var(--neutral-500); }
.course-card-body { padding: var(--space-4) var(--space-5); flex: 1; }
.course-card-name { font-size: var(--fs-lg); font-weight: 800; color: var(--neutral-900); margin-bottom: 6px; }
.course-card-desc { font-size: var(--fs-sm); color: var(--neutral-700); line-height: var(--lh-normal); margin-bottom: var(--space-4); }
.course-meta { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-bottom: var(--space-4); }
.course-meta-item { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--neutral-500); font-weight: 600; }
.course-meta-item .icon { width: 14px; height: 14px; color: var(--sapiens-500); }
.course-card-foot { padding: var(--space-4) var(--space-5); border-top: 1px solid var(--neutral-100); background: var(--neutral-50); display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.course-price { display: flex; flex-direction: column; }
.course-price b { font-size: var(--fs-lg); font-weight: 800; color: var(--sapiens-700); line-height: 1.3; }
.course-price s { font-size: 12px; color: var(--neutral-500); font-weight: 600; }
.course-price .member-price { font-size: 11px; color: var(--agila-600); font-weight: 700; }

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

/* ---------------------------------- Cartão de contato (hero Contato e localização) ---------------------------------- */

.contact-card {
  background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  padding: var(--space-6); transform: rotate(-2deg); position: relative; z-index: 1; max-width: 380px;
}
.contact-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: var(--space-5); padding-bottom: var(--space-4); border-bottom: 1px solid var(--neutral-100); }
.contact-card-head .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sapiens-500); }
.contact-card-head span { font-size: var(--fs-xs); font-weight: 700; color: var(--neutral-500); letter-spacing: 0.02em; }
.contact-pin { display: flex; gap: 12px; margin-bottom: var(--space-5); }
.contact-pin .icon-wrap { width: 44px; height: 44px; border-radius: 13px; background: var(--sapiens-50); color: var(--sapiens-600); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-pin b { display: block; font-size: var(--fs-base); font-weight: 800; color: var(--neutral-900); margin-bottom: 2px; }
.contact-pin span { font-size: var(--fs-sm); color: var(--neutral-700); line-height: 1.5; }
.contact-hours { display: grid; gap: 4px; }
.contact-hours-row { display: flex; justify-content: space-between; font-size: var(--fs-sm); color: var(--neutral-700); padding: 5px 8px; border-radius: 8px; }
.contact-hours-row b { color: var(--neutral-900); font-weight: 700; }
.contact-hours-row.today { background: var(--sapiens-50); }
.contact-hours-row.closed { color: var(--neutral-500); }

/* ---------------------------------- Modalidades de atendimento ---------------------------------- */

.modality-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
.modality-card { background: var(--white); border: 1px solid var(--neutral-200); border-radius: var(--radius-md); padding: var(--space-6); }
.modality-card .icon-wrap { width: 48px; height: 48px; border-radius: 14px; background: var(--sapiens-50); color: var(--sapiens-600); display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-4); }
.modality-card h3 { font-size: var(--fs-lg); font-weight: 800; color: var(--neutral-900); margin-bottom: 8px; }
.modality-card p { font-size: var(--fs-base); color: var(--neutral-700); line-height: var(--lh-normal); }

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

/* ---------------------------------- Cartão de credencial (hero Para Psicólogos) ---------------------------------- */

.member-card {
  background: var(--sapiens-gradient); border-radius: 22px; padding: 30px;
  box-shadow: var(--shadow-lg); transform: rotate(-3deg); position: relative; z-index: 1;
  aspect-ratio: 1.55 / 1; display: flex; flex-direction: column; justify-content: space-between;
  color: var(--white); overflow: hidden;
}
.member-card::after {
  content: ""; position: absolute; right: -30px; bottom: -30px; width: 160px; height: 160px;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.06) 0 2px, transparent 2px 10px);
  border-radius: 50%; pointer-events: none;
}
.member-card-top { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.member-card-brand { display: flex; align-items: center; gap: 9px; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: rgba(255,255,255,.9); }
.member-card-brand .dot-logo { width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); display: flex; align-items: center; justify-content: center; }
.member-card-brand .dot-logo .icon { width: 13px; height: 13px; }
.member-chip { width: 36px; height: 26px; border-radius: 6px; background: linear-gradient(135deg, rgba(255,255,255,.4), rgba(255,255,255,.12)); border: 1px solid rgba(255,255,255,.3); }

.member-card-mid { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.member-avatar { width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.14); border: 1.5px solid rgba(255,255,255,.35); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.member-avatar .icon { width: 22px; height: 22px; color: rgba(255,255,255,.85); }
.member-lines { flex: 1; }
.member-line { height: 10px; border-radius: 5px; background: rgba(255,255,255,.32); margin-bottom: 9px; }
.member-line.sm { width: 55%; background: rgba(255,255,255,.2); margin-bottom: 0; }

.member-card-bottom { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.member-plan-pill { font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: rgba(255,255,255,.18); padding: 7px 13px; border-radius: 999px; }
.member-dots { display: flex; gap: 4px; }
.member-dots span { width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,.45); }

/* ---------------------------------- Planos de credenciamento ---------------------------------- */

.plans-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-8); width: 100%; }
.plan-card {
  background: var(--white); border: 1px solid var(--neutral-200); border-radius: var(--radius-md);
  padding: var(--space-8) 52px; box-shadow: var(--shadow-sm); position: relative;
}
.plan-card.featured { border: 2px solid var(--sapiens-500); box-shadow: var(--shadow-md); }
.plan-featured-badge {
  position: absolute; top: -14px; left: 52px;
  background: var(--sapiens-500); color: var(--white); font-size: 11px; font-weight: 800;
  padding: 5px 14px; border-radius: var(--radius-pill);
}
.plan-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: var(--space-4); margin-bottom: var(--space-2); }
.plan-badge { display: inline-block; font-size: 11px; font-weight: 700; color: var(--neutral-700); background: var(--neutral-100); padding: 5px 13px; border-radius: var(--radius-pill); margin-bottom: var(--space-4); }
.plan-card.featured .plan-badge { background: var(--sapiens-50); color: var(--sapiens-700); }
.plan-name { font-size: var(--fs-xl); font-weight: 800; color: var(--neutral-900); margin-bottom: 4px; }
.plan-price { font-size: 48px; font-weight: 800; color: var(--neutral-900); letter-spacing: -0.02em; line-height: 1; white-space: nowrap; }
.plan-price span { font-size: var(--fs-base); font-weight: 600; color: var(--neutral-500); }
.plan-note { font-size: var(--fs-base); color: var(--neutral-500); margin: 6px 0 var(--space-6); }
.plan-divider { height: 1px; background: var(--neutral-100); margin: var(--space-5) 0; }
.plan-features { display: grid; grid-template-columns: 1fr 1fr; gap: 4px var(--space-8); }
.plan-feature { font-size: var(--fs-base); color: var(--neutral-700); padding: 9px 0; display: flex; gap: 10px; align-items: flex-start; }
.plan-feature .icon { flex-shrink: 0; margin-top: 3px; width: 16px; height: 16px; }
.plan-feature .yes { color: var(--agila-500); }
.plan-feature .no { color: var(--neutral-300); }
.plan-feature.off { color: var(--neutral-300); }
.plan-founder-note { font-size: var(--fs-sm); font-weight: 700; color: var(--sapiens-600); background: var(--sapiens-50); padding: 12px 16px; border-radius: var(--radius-sm); margin-top: var(--space-6); text-align: center; }
.plan-cta-row { display: flex; align-items: center; gap: var(--space-5); margin-top: var(--space-6); flex-wrap: wrap; }
.plan-cta-row .btn { flex: 1; min-width: 220px; }

/* ---------------------------------- Trilha de crescimento (timeline) ---------------------------------- */

.timeline { display: grid; grid-template-columns: repeat(5, 1fr); position: relative; }
.timeline::before { content: ""; position: absolute; top: 22px; left: 0; right: 0; height: 1px; background: var(--on-dark-border); }
.timeline-step { position: relative; padding: 0 var(--space-3) 0 0; }
.timeline-dot {
  width: 44px; height: 44px; border-radius: 50%; background: var(--sapiens-950);
  border: 2px solid var(--sapiens-400); color: var(--sapiens-300);
  display: flex; align-items: center; justify-content: center; font-size: var(--fs-sm); font-weight: 800;
  margin-bottom: var(--space-4); position: relative; z-index: 1;
}
.timeline-step:last-child .timeline-dot { background: var(--sapiens-500); border-color: var(--sapiens-500); color: var(--white); }
.timeline-month { font-size: 11px; font-weight: 800; color: var(--sapiens-400); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.timeline-title { font-size: var(--fs-base); font-weight: 800; color: var(--white); margin-bottom: 6px; }
.timeline-desc { font-size: var(--fs-sm); color: var(--on-dark-60); line-height: var(--lh-normal); }

/* ---------------------------------- Diretório de parceiros ---------------------------------- */

.dir-filters { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-8); }
.dir-select, .form-input, .form-select, .form-textarea {
  font-family: inherit; font-size: var(--fs-sm); color: var(--neutral-900);
  background: var(--white); border: 1.5px solid var(--neutral-200); border-radius: var(--radius-sm);
  padding: 12px 16px; transition: border-color var(--dur-fast);
}
.dir-select:focus, .form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: var(--sapiens-500); }
.dir-search { flex: 1; min-width: 200px; display: flex; align-items: center; gap: 8px; background: var(--white); border: 1.5px solid var(--neutral-200); border-radius: var(--radius-sm); padding: 12px 16px; }
.dir-search input { border: none; outline: none; font-family: inherit; font-size: var(--fs-sm); flex: 1; background: transparent; }
.dir-search .icon { color: var(--neutral-500); width: 17px; height: 17px; }

.dir-card { background: var(--white); border: 1px solid var(--neutral-200); border-radius: var(--radius-md); padding: var(--space-5); box-shadow: var(--shadow-sm); }
.dir-avatar { width: 54px; height: 54px; border-radius: 50%; background: var(--sapiens-50); color: var(--sapiens-600); display: flex; align-items: center; justify-content: center; font-size: var(--fs-md); font-weight: 800; margin-bottom: var(--space-4); }
.dir-name { font-size: var(--fs-base); font-weight: 800; color: var(--neutral-900); margin-bottom: 2px; }
.dir-crp { font-size: var(--fs-xs); color: var(--neutral-500); margin-bottom: var(--space-3); }
.dir-city { font-size: var(--fs-sm); color: var(--neutral-700); display: flex; align-items: center; gap: 6px; margin-bottom: var(--space-3); }
.dir-city .icon { width: 14px; height: 14px; color: var(--sapiens-500); }
.dir-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: var(--space-4); }
.dir-tag { font-size: 10.5px; font-weight: 700; color: var(--sapiens-700); background: var(--sapiens-50); padding: 4px 10px; border-radius: var(--radius-pill); }
.dir-meta { display: flex; justify-content: space-between; align-items: center; padding-top: var(--space-4); border-top: 1px solid var(--neutral-100); }
.dir-plan { font-size: 11px; font-weight: 700; color: var(--agila-600); }
.dir-time { font-size: 11px; color: var(--neutral-500); }
.dir-cta { display: block; text-align: center; margin-top: var(--space-4); font-size: var(--fs-sm); font-weight: 700; color: var(--white); background: var(--sapiens-500); padding: 10px; border-radius: var(--radius-sm); }
.dir-note { font-size: var(--fs-xs); color: var(--neutral-500); text-align: center; margin-top: var(--space-6); }

/* ---------------------------------- Fluxo de encaminhamentos (passos) ---------------------------------- */

.flow-row { display: grid; grid-template-columns: 56px 1fr; gap: var(--space-5); padding: var(--space-6) 0; border-bottom: 1px solid var(--neutral-100); }
.flow-row:last-child { border-bottom: none; }
.flow-num { width: 40px; height: 40px; border-radius: 50%; background: var(--sapiens-50); color: var(--sapiens-600); display: flex; align-items: center; justify-content: center; font-size: var(--fs-sm); font-weight: 800; }
.flow-row h3 { font-size: var(--fs-md); font-weight: 800; color: var(--neutral-900); margin-bottom: 6px; }
.flow-row p { font-size: var(--fs-base); color: var(--neutral-700); line-height: var(--lh-normal); }

/* ---------------------------------- Formulário ---------------------------------- */

.form-card { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: var(--space-8); max-width: 640px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.form-group { margin-bottom: var(--space-4); }
.form-label { font-size: var(--fs-xs); font-weight: 700; color: var(--neutral-700); margin-bottom: 6px; display: block; }
.form-input, .form-select, .form-textarea { width: 100%; }
.form-textarea { resize: vertical; min-height: 90px; }
.form-note { font-size: var(--fs-xs); color: var(--neutral-500); margin-top: var(--space-4); text-align: center; }

/* ---------------------------------- Responsivo ---------------------------------- */

@media (max-width: 980px) {
  .plans-grid, .timeline { grid-template-columns: 1fr; }
  .timeline::before { display: none; }
  .timeline-step { border-left: 1px solid var(--on-dark-border); padding-left: var(--space-5); padding-bottom: var(--space-6); }
  .flow-row { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
