/* ===================================================================
   Perfil (portada). Concepto: ficha clínica abierta — columna de lectura
   a la izquierda y agenda viva fija a la derecha, como en los perfiles de
   Psicología y Mente y Doctoralia. Paleta de páramo: laguna (petróleo),
   frailejón (salvia) y su flor (ámbar), sobre neblina bogotana.
   =================================================================== */
:root { --sage-soft: #e8eee6; --ring-0: #eee8dc; --ring-1: #e8eee6; --ring-2: #dfe6dc; --header-h: 68px; --seg-shadow: 0 1px 3px rgba(18, 38, 44, .12); --bar-shadow: 0 -6px 20px rgba(18, 38, 44, .08); }

.eyebrow, .kicker { text-transform: none; letter-spacing: 0; font-size: .95rem; font-weight: 600; color: var(--accent-ink); margin-bottom: .4em; }
h1, h2, h3 { text-wrap: balance; }
.btn-link { color: var(--brand); font-weight: 600; margin-left: 12px; }
.tabnum { font-variant-numeric: tabular-nums; }

.profile { display: grid; grid-template-columns: minmax(0, 1fr) 380px; column-gap: 48px; padding-block: 40px 72px; }
.profile-head { grid-column: 1; grid-row: 1; display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 28px; align-items: center; padding-bottom: 28px; }
.profile-head h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.05; letter-spacing: -.02em; margin-bottom: .25em; }
.profile-head .role { font-size: 1.15rem; color: var(--ink-soft); margin-bottom: .9em; }
.head-facts { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 1.2em; }
.head-facts li { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: .9rem; color: var(--ink-soft); }
.head-facts a { text-decoration: none; font-weight: 600; }
.profile-head .lead { max-width: 62ch; margin: 0; }
.profile-side { grid-column: 2; grid-row: 1 / span 2; align-self: start; position: sticky; top: calc(var(--header-h) + 16px); display: grid; gap: 14px; }
.profile-body { grid-column: 1; grid-row: 2; min-width: 0; }

.rings { width: 100%; max-width: 240px; height: auto; display: block; margin-inline: auto; overflow: visible; }
.rings .ring { stroke: var(--line); stroke-width: 1; }
.rings .ring-0 { fill: var(--ring-0); }
.rings .ring-1 { fill: var(--ring-1); }
.rings .ring-2 { fill: var(--ring-2); }
.rings .ring-label { fill: var(--ink-soft); font: 600 10px var(--sans); letter-spacing: .01em; }
.rings .core { fill: var(--brand); }
.rings .core-text { fill: var(--brand-ink); font: 700 22px var(--display); }
@media (prefers-reduced-motion: no-preference) {
  .rings .ring, .rings .ring-label, .rings .core, .rings .core-text { transform-origin: 120px 120px; animation: ring-in .7s cubic-bezier(.2, .7, .2, 1) both; }
  .rings .ring-1 { animation-delay: .12s; }
  .rings .ring-0 { animation-delay: .24s; }
  .rings .ring-label { animation-delay: .4s; }
  @keyframes ring-in { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: scale(1); } }
}

/* Agenda viva */
.agenda { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 20px; scroll-margin-top: calc(var(--header-h) + 12px); }
.agenda-top h2 { font-size: 1.35rem; margin: 0; }
.agenda-top p { margin: 2px 0 14px; color: var(--muted); font-size: .9rem; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--bg-alt); border-radius: 12px; padding: 4px; margin-bottom: 14px; }
.seg button { border: 0; background: transparent; border-radius: 9px; padding: 8px 6px; cursor: pointer; font: inherit; color: var(--ink-soft); display: flex; flex-direction: column; align-items: center; line-height: 1.25; min-height: 52px; }
.seg button strong { font-size: .95rem; color: var(--ink); }
.seg button span { font-size: .82rem; font-variant-numeric: tabular-nums; }
.seg button[aria-checked="true"] { background: var(--surface); box-shadow: var(--seg-shadow); }
.seg button[aria-checked="true"] span { color: var(--brand); font-weight: 600; }
html:not(.js) .seg { display: none; }
html:not(.js) .agenda-panel[hidden] { display: block !important; }
.day-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-bottom: 12px; }
html:not(.js) .day-strip { display: none; }
.day-tab { border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px; padding: 6px 2px; cursor: pointer; display: flex; flex-direction: column; align-items: center; font: inherit; color: var(--ink-soft); line-height: 1.15; min-height: 64px; justify-content: center; }
.day-tab .wd, .day-tab .mo { font-size: .75rem; }
.day-tab .dn { font: 700 1.3rem var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.day-tab:hover { border-color: var(--brand); }
.day-tab[aria-selected="true"] { border-color: var(--brand); background: var(--brand); color: var(--brand-ink); }
.day-tab[aria-selected="true"] .dn { color: var(--brand-ink); }
.times { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 12px; }
html.js .times[data-collapsed] { display: none; }
.time { display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 10px; border: 1.5px solid var(--brand); color: var(--brand); text-decoration: none; font-weight: 600; font-size: .9rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.time:hover { background: var(--brand-soft); color: var(--brand); }
.agenda-empty { background: var(--bg-alt); border-radius: 12px; padding: 12px; font-size: .92rem; }
.agenda-foot p { margin: 8px 0 0; color: var(--muted); text-align: center; }
.side-contact { background: var(--bg-alt); border-radius: 14px; padding: 14px 18px; font-size: .95rem; }
.side-title { font-weight: 600; margin-bottom: 6px; }

/* Navegación por secciones */
.section-nav { position: sticky; top: var(--header-h); z-index: 10; display: flex; gap: 4px; overflow-x: auto; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 0; margin-bottom: 8px; scrollbar-width: none; }
.section-nav::-webkit-scrollbar { display: none; }
.section-nav a { flex: none; padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--ink-soft); font-size: .93rem; font-weight: 500; }
.section-nav a:hover { background: var(--bg-alt); color: var(--ink); }
.section-nav a[aria-current] { background: var(--ink); color: var(--bg); }
.psec { padding-block: 36px 8px; scroll-margin-top: calc(var(--header-h) + 64px); }
.psec > h2 { margin-top: 0; font-size: clamp(1.5rem, 3vw, 1.9rem); }
.psec h3 { margin-top: 1.6em; }
.psec p { max-width: 68ch; }

/* Temas: lista con regla lateral, no tarjetas idénticas */
.topic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.topic { display: flex; flex-direction: column; gap: 2px; padding: 12px 0 12px 16px; border-left: 3px solid var(--sage); text-decoration: none; color: var(--ink); margin-bottom: 10px; }
.topic strong { font-family: var(--display); font-size: 1.08rem; }
.topic span { color: var(--ink-soft); font-size: .93rem; }
.topic:hover { border-left-color: var(--brand); }
.topic:hover strong { color: var(--brand); }

/* Pestañas de consultas */
.tab-list { display: flex; border-bottom: 1.5px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tab-list [role="tab"] { border: 0; background: none; font: 600 1rem var(--sans); color: var(--muted); padding: 12px 16px; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1.5px; white-space: nowrap; }
.tab-list [role="tab"][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
html:not(.js) .tab-list { display: none; }
html:not(.js) .tab-panel[hidden] { display: block !important; }
.kv { margin: 0 0 8px; display: grid; }
.kv > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.kv dt { color: var(--muted); font-size: .93rem; }
.kv dd { margin: 0; }
.svc-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 0; border-bottom: 1px dashed var(--line); margin: 0; }
.svc-list a { text-decoration: none; font-weight: 500; }
.svc-price { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }

/* Formación */
.edu li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); margin: 0; }
.edu-kind { font-size: .85rem; color: var(--muted); padding-top: 2px; }
.edu strong { display: block; }
.edu li div span { color: var(--ink-soft); font-size: .93rem; }
.edu li.ongoing .edu-kind { color: var(--accent-ink); font-weight: 600; }

/* Opiniones */
.review-summary { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 32px; align-items: center; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; margin-bottom: 8px; }
.score { display: flex; flex-direction: column; align-items: flex-start; }
.score-n { font: 700 3rem/1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.aspects li { display: grid; grid-template-columns: minmax(0, 1fr) 120px 36px; gap: 12px; align-items: center; margin: 0 0 8px; font-size: .93rem; }
.meter { height: 8px; border-radius: 4px; background: var(--bg-alt); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); }
.review-list .review { background: none; border: 0; border-radius: 0; padding: 18px 0; border-bottom: 1px solid var(--line); margin: 0; }
.review-list blockquote { font-size: 1.06rem; margin: 0 0 8px; }
.empty-reviews { background: var(--bg-alt); border-radius: 14px; padding: 18px 20px; }
.empty-reviews p:last-child { margin-bottom: 0; }

/* Preguntas */
.qa-list { display: grid; margin-bottom: 12px; }
.qa { padding: 18px 0; border-bottom: 1px solid var(--line); }
.qa h2, .qa h3 { margin: 0 0 6px; font-size: 1.12rem; }
.qa h2 a, .qa h3 a { text-decoration: none; color: var(--ink); }
.qa h2 a:hover, .qa h3 a:hover { color: var(--brand); }
.qa p { color: var(--ink-soft); margin: 0; }
.qa .qa-topic { font-size: .85rem; color: var(--accent-ink); font-weight: 600; margin-bottom: 4px; }
.qa-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; align-items: start; }
.qa-main { min-width: 0; }
.qa-ask { position: sticky; top: calc(var(--header-h) + 16px); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: var(--shadow); scroll-margin-top: calc(var(--header-h) + 12px); }
.topic-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.topic-filter a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink-soft); font-size: .9rem; }
.topic-filter a[aria-current] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.qa-q { font-size: clamp(1.6rem, 4vw, 2.3rem); }
.qa-answer { border-left: 3px solid var(--brand); padding-left: 20px; margin: 20px 0; }
.qa-by { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.crisis-note { margin-top: 14px; color: var(--muted); }
.aspects-input { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.aspects-input legend { margin-bottom: 6px; }
.aspects-input label { display: flex; flex-direction: column; gap: 4px; font-weight: 500; font-size: .92rem; }

.article-teaser { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); padding: 18px 20px; border-radius: 14px; background: var(--brand-soft); }
.article-teaser strong { font-family: var(--display); font-size: 1.2rem; }
.article-teaser span { color: var(--ink-soft); }

/* Barra fija de reserva en móvil (patrón de ambas plataformas) */
.mobile-book { display: none; }
@media (max-width: 960px) {
  .profile { grid-template-columns: minmax(0, 1fr); padding-top: 24px; }
  .profile-head, .profile-side, .profile-body { grid-column: 1; grid-row: auto; }
  .profile-side { position: static; margin-bottom: 8px; }
  .profile-head { grid-template-columns: minmax(0, 1fr) 140px; gap: 16px; }
  .qa-layout { grid-template-columns: minmax(0, 1fr); }
  .qa-ask { position: static; }
  .mobile-book { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; align-items: center; justify-content: space-between; gap: 12px;
    background: var(--surface); border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); box-shadow: var(--bar-shadow); transition: transform .2s ease; }
  .mobile-book span { display: flex; flex-direction: column; line-height: 1.2; }
  .mobile-book small { color: var(--muted); }
  .mobile-book.is-hidden { transform: translateY(110%); }
  body.has-mobile-book { padding-bottom: 76px; }
  body.has-mobile-book .wa-float { bottom: 88px; }
}
@media (max-width: 560px) {
  .profile-head { grid-template-columns: minmax(0, 1fr); }
  .head-art { order: -1; }
  .rings { max-width: 150px; margin-inline: 0; }
  .topic-grid { grid-template-columns: minmax(0, 1fr); }
  .kv > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .edu li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .review-summary { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .aspects li { grid-template-columns: minmax(0, 1fr) 80px 32px; }
}
@media (prefers-reduced-motion: reduce) { .mobile-book { transition: none; } }
