/* =========================================================
   Consejería, material y página 404 (clave: consejeria-material)
   Solo usa los tokens de bp.css. Prefijo de clases: cm-
   ========================================================= */

.cm-h3 { font-family: var(--font-body); font-size: var(--fs-lg); font-weight: 650; letter-spacing: -.01em; line-height: 1.25; }
.cm-kicker { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.cm-icon--sage { background: var(--sage); color: var(--green); }
.cm-icon--sky { background: var(--sky); color: var(--sky-ink); }
.cm-icon--sand { background: var(--sand); color: var(--sand-ink); }
.cm-icon--lavender { background: var(--lavender); color: var(--lavender-ink); }
/* bp.css deja .btn--sm en 42 px; en estas páginas todo objetivo táctil mide al menos 44 px. */
.btn--sm { min-height: 44px; }
/* Migas: bp.css deja sus enlaces en unos 21 px de alto. Se agranda el área que se puede tocar
   (44 px o más en ambos sentidos) y los márgenes negativos dejan el texto donde estaba. */
.cm-hero .breadcrumb a { display: inline-flex; align-items: center; min-height: 44px; margin-block: -12px; padding-inline: 7px; margin-inline: -7px; }
/* Encabezado común: el botón «Contacto» hereda el color de .nav a (texto oscuro sobre verde, 1,35:1).
   Se corrige aquí mientras se ajusta bp.css (ver propuestas, sección e). */
.nav a.btn, .nav a.btn:hover { color: var(--white); }
.nav a.btn:hover { background: var(--deep); }

/* ---------- Héroe común ---------- */
.cm-hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.cm-hero h1 em { font-style: italic; color: var(--green); }
.cm-hero h1, .cm-404 h1, .cm-care h2 { text-wrap: balance; }
.cm-hero .lead { margin-top: 14px; }
.cm-hero-note { display: flex; gap: 12px; align-items: flex-start; max-width: 56ch; margin: 22px 0 0; padding: 14px 18px; border-radius: var(--r-md); background: rgba(255, 255, 255, .72); border: 1px solid var(--line); color: var(--ink-2); font-size: var(--fs-sm); }
.cm-hero-note svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--green); margin-top: 2px; }
.cm-hero-note strong { color: var(--deep); }
.cm-note-title { display: block; margin-bottom: 2px; }
@media (max-width: 960px) { .cm-hero-grid { grid-template-columns: 1fr; } }

/* Constelación del equipo (decorativa) */
.cm-orbit { position: relative; width: min(100%, 410px); aspect-ratio: 1; margin-inline: auto; }
.cm-orbit-ring { position: absolute; inset: 13%; border-radius: 50%; border: 1.5px dashed var(--mint-2); animation: cm-spin 90s linear infinite; }
.cm-orbit-ring--outer { inset: 0; border: 1px solid var(--line-2); opacity: .7; animation-duration: 140s; animation-direction: reverse; }
.cm-orbit-core {
  position: absolute; inset: 33%; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, var(--white), var(--mint) 58%, var(--mint-2));
  box-shadow: 0 22px 60px rgba(50, 108, 92, .22);
}
.cm-orbit-core::after { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 2px solid var(--mint-2); opacity: 0; animation: cm-ripple 5.5s ease-out infinite; }
.cm-orbit-core svg { width: 38%; height: 38%; color: var(--green); }
.cm-bubble {
  position: absolute; display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: var(--shadow-2);
  font-weight: 650; font-size: var(--fs-sm); color: var(--deep); white-space: nowrap; animation: cm-bob 7s ease-in-out infinite;
}
.cm-bubble-icon { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--mint); color: var(--green); }
.cm-bubble-icon svg { width: 20px; height: 20px; }
.cm-bubble--a { top: 5%; left: 0; }
.cm-bubble--b { top: 17%; right: 0; animation-delay: -1.8s; }
.cm-bubble--b .cm-bubble-icon { background: var(--lavender); color: var(--lavender-ink); }
.cm-bubble--c { bottom: 17%; left: 0; animation-delay: -3.6s; }
.cm-bubble--c .cm-bubble-icon { background: var(--sky); color: var(--sky-ink); }
.cm-bubble--d { bottom: 4%; right: 4%; animation-delay: -5.2s; }
.cm-bubble--d .cm-bubble-icon { background: var(--sand); color: var(--sand-ink); }
@media (max-width: 960px) { .cm-orbit { width: min(100%, 340px); } }
@media (max-width: 520px) {
  .cm-orbit { width: min(100%, 300px); }
  .cm-bubble { font-size: var(--fs-xs); gap: 8px; padding: 6px 12px 6px 6px; }
  .cm-bubble-icon { width: 32px; height: 32px; }
}

@keyframes cm-spin { to { transform: rotate(360deg); } }
@keyframes cm-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes cm-ripple { 0% { opacity: .7; transform: scale(.92); } 80%, 100% { opacity: 0; transform: scale(1.25); } }
@keyframes cm-breathe { 0%, 100% { transform: scale(.94); } 50% { transform: scale(1.06); } }

/* ---------- Navegación dentro de la página ---------- */
.cm-jumpbar { background: rgba(247, 248, 243, .9); border-block: 1px solid var(--line); }
.cm-jump { display: flex; gap: 8px; padding-block: 10px; overflow-x: auto; scrollbar-width: none; }
.cm-jump::-webkit-scrollbar { display: none; }
.cm-jump a {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: 999px;
  background: var(--white); border: 1px solid var(--line); text-decoration: none; color: var(--ink-2); font-weight: 650; font-size: var(--fs-sm);
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}
.cm-jump a svg { width: 18px; height: 18px; color: var(--green); }
.cm-jump a:hover { border-color: var(--green-3); color: var(--deep); box-shadow: var(--shadow-1); }
.cm-jump a.is-active { background: var(--deep); border-color: var(--deep); color: var(--white); }
.cm-jump a.is-active svg { color: var(--mint-2); }
.cm-jump a.cm-jump-sos { background: var(--rose); border-color: #f0cfc6; color: var(--rose-ink); }
.cm-jump a.cm-jump-sos svg { color: var(--rose-ink); }
.cm-jump a.cm-jump-sos.is-active { background: var(--rose-ink); border-color: var(--rose-ink); color: var(--white); }
.cm-jump a.cm-jump-sos.is-active svg { color: var(--white); }
@media (min-width: 900px) {
  .cm-jumpbar { position: sticky; top: var(--header-h); z-index: 30; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
  .cm-jump { flex-wrap: wrap; justify-content: center; overflow: visible; }
  .cm-anchor { scroll-margin-top: calc(var(--header-h) + 76px); }
}
@media (max-width: 899px) {
  .cm-jump { width: 100%; padding-inline: var(--gutter); }
}

/* ---------- Equipo ---------- */
.cm-team-grid { align-items: stretch; }
.cm-team { --accent: var(--green-3); display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.cm-team > * { margin: 0; }
.cm-team::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--accent); opacity: .85; }
.cm-team:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: var(--line-2); }
.cm-team-top { display: flex; align-items: center; gap: 16px; }
.cm-team-top .card-icon { margin: 0; transition: transform var(--t-med) var(--ease); }
.cm-team:hover .cm-team-top .card-icon { transform: rotate(-6deg) scale(1.06); }
.cm-team h3 { margin: 0; }
.cm-team p { color: var(--ink-2); }
.cm-team .link-arrow { margin-top: auto; padding-top: 4px; min-height: 44px; }
.cm-team--nutri { background: linear-gradient(165deg, var(--sage) 0%, var(--white) 62%); }
.cm-team--psico { --accent: var(--lavender-ink); background: linear-gradient(165deg, var(--lavender) 0%, var(--white) 62%); }
.cm-team--psico .card-icon { background: var(--white); color: var(--lavender-ink); }
.cm-team--fisio { --accent: var(--sky-ink); background: linear-gradient(165deg, var(--sky) 0%, var(--white) 62%); }
.cm-team--fisio .card-icon { background: var(--white); color: var(--sky-ink); }
.cm-team--medico { --accent: var(--sand-ink); background: linear-gradient(165deg, var(--sand) 0%, var(--white) 62%); }
.cm-team--medico .card-icon { background: var(--white); color: var(--sand-ink); }
.cm-team--nutri .card-icon { background: var(--white); color: var(--green); }
.cm-hours .tag svg { width: 16px; height: 16px; }
.cm-crisis { padding: 14px 16px; }
.cm-crisis > svg { width: 22px; height: 22px; }
.cm-crisis p { color: var(--rose-ink); font-weight: 600; }
.cm-names { list-style: none; padding: 0; display: grid; gap: 8px; }
.cm-names li { margin: 0; display: flex; align-items: center; gap: 10px; font-weight: 650; color: var(--deep); }
.cm-names svg { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: var(--white); color: var(--sand-ink); border: 1px solid #ece0cc; flex-shrink: 0; }
.cm-team-foot { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 26px 0 0; color: var(--muted); font-weight: 600; text-align: center; }
.cm-team-foot svg { width: 20px; height: 20px; color: var(--green); flex-shrink: 0; }

/* Desplegable pequeño */
.cm-mini { border-radius: var(--r-sm); background: var(--white); border: 1px solid var(--line); transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.cm-mini[open] { border-color: var(--line-2); box-shadow: var(--shadow-1); }
.cm-mini summary { list-style: none; cursor: pointer; min-height: 50px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; font-weight: 650; color: var(--deep); }
.cm-mini summary::-webkit-details-marker { display: none; }
.cm-mini summary > span { display: inline-flex; align-items: center; gap: 10px; }
.cm-mini summary svg { width: 20px; height: 20px; color: var(--green); flex-shrink: 0; }
.cm-mini summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--green); transition: transform var(--t-fast) var(--ease); }
.cm-mini[open] summary::after { transform: rotate(45deg); }
.cm-mini p { padding: 0 16px 16px; margin: 0; color: var(--ink-2); }
.cm-mini[open] p { animation: bp-fade-up var(--t-med) var(--ease); }

/* ---------- Bienestar emocional ---------- */
.cm-feel { background: linear-gradient(180deg, var(--lavender) 0%, var(--paper) 100%); }
.cm-feel-grid { align-items: center; }
.cm-feel .lead { color: var(--ink); }
.cm-feel p { color: var(--ink-2); }
.cm-quote-card { position: relative; margin: 0; padding: clamp(24px, 4vw, 44px); border-radius: var(--r-xl); background: var(--white); border: 1px solid #e1dbef; box-shadow: var(--shadow-2); overflow: hidden; isolation: isolate; }
.cm-quote-orb { position: absolute; z-index: -1; width: 280px; height: 280px; right: -90px; top: -110px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--white), var(--lavender) 55%, #e1dbef); animation: cm-breathe 9s ease-in-out infinite; }
.cm-quote-card .cm-kicker { color: var(--lavender-ink); }
.cm-quote { margin: 6px 0 18px; padding: 0; }
.cm-quote p { margin: 0; font-family: var(--font-display); font-size: clamp(1.45rem, 1.05rem + 1.5vw, 2.1rem); line-height: 1.28; color: var(--deep); }
.cm-quote-card > p { color: var(--ink-2); }
.cm-quote-card .row { margin-top: 18px; }

.cm-copy span { transition: opacity var(--t-fast); }
.cm-copy.is-done { background: var(--green); color: var(--white); border-color: var(--green); }

/* ---------- Cuidar de ti ---------- */
.cm-care {
  position: relative; overflow: hidden; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center;
  padding: clamp(28px, 5vw, 64px); border-radius: var(--r-xl); background: var(--deep); color: #dce9e5;
}
.cm-care .eyebrow { color: var(--mint-2); }
.cm-care h2 { color: var(--white); margin-bottom: 22px; }
.cm-care h2 em { color: var(--mint-2); font-style: italic; }
.cm-motto { margin: 0; padding-left: clamp(18px, 2.4vw, 28px); border-left: 3px solid var(--mint-2); font-family: var(--font-display); font-size: clamp(1.4rem, 1rem + 1.6vw, 2.2rem); line-height: 1.3; color: var(--white); }
.cm-motto strong { display: block; font-weight: 500; font-style: italic; color: var(--mint-2); }
.cm-care-deco { position: absolute; z-index: -1; right: -60px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%; border: 1px solid rgba(180, 217, 199, .28); }
.cm-care-deco::before { content: ""; position: absolute; inset: 34px; border-radius: 50%; border: 1px dashed rgba(180, 217, 199, .25); animation: cm-spin 60s linear infinite; }
.cm-care-deco::after { content: "✳"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 110px; color: rgba(180, 217, 199, .22); animation: cm-spin 40s linear infinite; }
@media (max-width: 860px) {
  .cm-care { grid-template-columns: 1fr; }
  .cm-care-deco { right: -110px; top: -120px; bottom: auto; width: 220px; height: 220px; }
  .cm-care-deco::after { font-size: 80px; }
}

/* ---------- Prepara tus consultas ---------- */
.cm-prep-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(24px, 5vw, 56px); align-items: start; }
.cm-prep-steps .section-head { margin-bottom: 22px; }
.cm-prep-steps .steps > li { color: var(--ink); transition: transform var(--t-med) var(--ease), box-shadow var(--t-med); }
.cm-prep-steps .steps > li:hover { transform: translateX(4px); box-shadow: var(--shadow-1); }
.cm-ask { margin-top: 18px; padding: 18px 20px; border-radius: var(--r-md); background: var(--white); border: 1px dashed var(--green-3); }
.cm-ask p { margin: 0 0 12px; color: var(--ink-2); }
.cm-ask strong { color: var(--deep); font-family: var(--font-display); font-weight: 500; font-size: var(--fs-lg); }
.cm-topics { position: sticky; top: calc(var(--header-h) + 84px); }
.cm-topics h3 { margin-bottom: 8px; }
.cm-topics > p { color: var(--ink-2); }
.cm-topics fieldset { border: 0; padding: 0; margin: 18px 0 0; min-width: 0; }
.cm-topics legend { padding: 0; margin-bottom: 12px; font-weight: 700; color: var(--deep); }
.cm-meter { margin-top: 18px; height: 8px; border-radius: 99px; background: var(--mint); overflow: hidden; }
.cm-meter span { --p: 0; display: block; height: 100%; width: calc(var(--p) * 1%); border-radius: inherit; background: linear-gradient(90deg, var(--green-3), var(--green)); transition: width .6s var(--ease); }
.cm-count { margin: 10px 0 14px; font-weight: 650; color: var(--deep); }
.cm-topics .btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.cm-privacy { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 0; font-size: var(--fs-sm); color: var(--muted); }
.cm-privacy svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--green); margin-top: 1px; }
@media (max-width: 960px) {
  .cm-prep-grid { grid-template-columns: 1fr; }
  .cm-topics { position: static; }
}
@media (max-width: 520px) { .steps > li { padding: 16px 16px 16px 66px; } .steps > li::before { left: 14px; } }

/* ---------- Preguntas frecuentes ---------- */
.cm-faq .acc-body p { margin-bottom: 10px; }
.cm-faq .link-arrow { min-height: 44px; }

/* ---------- Apoyo y emergencia ---------- */
.cm-sos { align-items: stretch; }
.cm-sos-card { padding: 22px 24px; }
.cm-sos-card h3 { font-size: var(--fs-lg); margin-bottom: 6px; }
.cm-sos-card p { color: var(--ink-2); }
.cm-sos-card .link-arrow { margin-top: 6px; min-height: 44px; }
.cm-sos-card--alert { border-width: 1.5px; }
.cm-sos-card--alert h3 { color: var(--rose-ink); }
.cm-sos-card--alert > svg { animation: cm-soft-pulse 3.2s ease-in-out infinite; }
@keyframes cm-soft-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.cm-sos-title { margin: 0 0 4px; color: var(--rose-ink); }

/* =========================================================
   MATERIAL
   ========================================================= */
.cm-tiles { display: grid; gap: 14px; }
.cm-tile {
  position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 16px; align-items: center;
  padding: 18px 54px 18px 18px; border-radius: var(--r-lg); background: rgba(255, 255, 255, .86); border: 1px solid var(--line);
  box-shadow: var(--shadow-1); text-decoration: none; color: var(--ink); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease), border-color var(--t-med);
}
.cm-tile:nth-child(2) { margin-left: 8%; }
.cm-tile:nth-child(3) { margin-left: 3%; }
.cm-tile-icon { animation: cm-bob 7s ease-in-out infinite; }
.cm-tile:nth-child(2) .cm-tile-icon { animation-delay: -2.4s; }
.cm-tile:nth-child(3) .cm-tile-icon { animation-delay: -4.8s; }
.cm-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--line-2); color: var(--ink); }
.cm-tile::after { content: "→"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); color: var(--green); font-weight: 700; transition: transform var(--t-fast) var(--ease); }
.cm-tile:hover::after { transform: translate(4px, -50%); }
.cm-tile-icon { grid-row: span 2; width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; }
.cm-tile-icon svg { width: 26px; height: 26px; }
.cm-tile--pdf .cm-tile-icon { background: var(--rose); color: var(--rose-ink); }
.cm-tile--video .cm-tile-icon { background: var(--sky); color: var(--sky-ink); }
.cm-tile--guia .cm-tile-icon { background: var(--mint); color: var(--green); }
.cm-tile strong { font-family: var(--font-display); font-weight: 500; font-size: 2.1rem; line-height: 1; color: var(--deep); }
.cm-tile > span:last-child { color: var(--muted); font-weight: 650; font-size: var(--fs-sm); }
@media (max-width: 960px) {
  .cm-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .cm-tile, .cm-tile:nth-child(2), .cm-tile:nth-child(3) { margin-left: 0; grid-template-columns: 1fr; grid-template-rows: auto; justify-items: start; row-gap: 6px; padding: 14px 14px 16px; }
  .cm-tile-icon { grid-row: auto; width: 44px; height: 44px; border-radius: 14px; }
  .cm-tile-icon svg { width: 22px; height: 22px; }
  .cm-tile strong { font-size: 1.8rem; }
  .cm-tile > span:last-child { font-size: var(--fs-xs); line-height: 1.3; }
  .cm-tile::after { right: 12px; top: 22px; transform: none; }
  .cm-tile:hover::after { transform: translateX(3px); }
}

/* Barra de filtros */
.cm-filterbar { position: sticky; top: var(--header-h); z-index: 30; background: rgba(247, 248, 243, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-block: 1px solid var(--line); }
.cm-filterbar-inner { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; padding-block: 12px; }
.cm-filterbar .chip { display: inline-flex; align-items: center; gap: 8px; }
.cm-chip-n { display: inline-grid; place-items: center; min-width: 26px; height: 24px; padding: 0 7px; border-radius: 99px; background: var(--sage); color: var(--deep); font-size: var(--fs-xs); font-weight: 700; }
.chip[aria-pressed="true"] .cm-chip-n { background: rgba(255, 255, 255, .2); color: var(--white); }
.cm-search { flex: 1 1 260px; max-width: 380px; min-height: 48px; }
.cm-search input { min-height: 44px; }
.cm-search input::placeholder { color: var(--muted); opacity: 1; }
.page-material .cm-anchor { scroll-margin-top: calc(var(--header-h) + 84px); }
@media (max-width: 760px) {
  .cm-filterbar { position: static; background: var(--paper); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .cm-search { max-width: none; flex-basis: 100%; }
  .page-material .cm-anchor { scroll-margin-top: calc(var(--header-h) + 12px); }
}
.cm-empty { display: flex; align-items: center; gap: 14px; margin: 32px 0 0; padding: 20px 22px; border-radius: var(--r-md); background: var(--white); border: 1px dashed var(--line-2); color: var(--ink-2); }
.cm-empty svg { width: 26px; height: 26px; flex-shrink: 0; color: var(--muted); }
.cm-empty p { margin: 0; }

/* Guía en PDF */
.cm-pdf { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.cm-sheet { position: relative; margin: 0; isolation: isolate; padding: 10px; }
.cm-sheet::before { content: ""; position: absolute; z-index: -1; inset: 18px 4px 2px 18px; border-radius: var(--r-md); background: var(--mint); transform: rotate(2.4deg); transition: transform var(--t-med) var(--ease); }
.cm-sheet a { position: relative; display: block; border-radius: var(--r-md); overflow: hidden; background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-3); transform: rotate(-1.4deg); transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease); }
.cm-sheet a:hover, .cm-sheet a:focus-visible { transform: rotate(0) translateY(-4px); }
.cm-sheet:hover::before { transform: rotate(4deg) translateY(4px); }
.cm-sheet img { width: 100%; height: auto; }
.cm-sheet-zoom { position: absolute; right: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: rgba(19, 43, 53, .88); color: var(--white); font-weight: 650; font-size: var(--fs-sm); transition: transform var(--t-fast) var(--ease); }
.cm-sheet-zoom svg { width: 18px; height: 18px; }
.cm-sheet a:hover .cm-sheet-zoom { transform: translateY(-2px); }
.cm-pdf-copy h2 { margin-bottom: 10px; }
.cm-pdf-copy .lead { margin-bottom: 20px; }
.cm-tag-icon { width: 15px; height: 15px; }
.cm-pdf-actions { margin-bottom: 14px; }
.cm-file-meta { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: var(--fs-sm); color: var(--muted); font-weight: 600; }
.cm-file-meta svg { width: 18px; height: 18px; color: var(--sky-ink); }
.cm-source-line { font-size: var(--fs-sm); color: var(--muted); margin-bottom: 10px; }
.cm-pdf-copy .link-arrow { min-height: 44px; }
.cm-pdf-alert { margin-top: 16px; }
.cm-pdf-alert p { margin-bottom: 4px; }
@media (max-width: 860px) { .cm-pdf { grid-template-columns: 1fr; } .cm-sheet { max-width: 640px; } }

/* Videos: dos rejillas (horizontales y verticales); en cada una, todas las miniaturas tienen la misma proporción */
.cm-videos { align-items: stretch; }
.cm-videos + .cm-videos { margin-top: clamp(14px, 2.2vw, 24px); }
.cm-vcard { display: flex; flex-direction: column; overflow: hidden; }
.cm-vcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: var(--line-2); }
/* min-height: 0 impide que la imagen estire el cuadro: con overflow: clip la proporción no se impone sola. */
.cm-vthumb { position: relative; display: block; aspect-ratio: 16 / 10; min-height: 0; }
.cm-vthumb img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease); }
.cm-vcard:hover .cm-vthumb img { transform: scale(1.05); }
.cm-videos--tall .cm-vthumb { aspect-ratio: 3 / 4; }
.cm-videos--tall .cm-vthumb img { object-position: 50% 0; }
/* 22-nov: la tarjeta de YouTube comparte la grilla vertical con los videos 3D; su cuadro sigue la misma proporción. */
.cm-videos--tall .cm-yt { aspect-ratio: 3 / 4; }
/* El póster del preoperatorio se ve completo y su franja inferior lleva texto: el botón va a la derecha, sobre la ilustración. */
.cm-vcard[data-ratio="3 / 4"] .cm-play { left: auto; right: 14px; bottom: 16%; }
.cm-vnotes { display: grid; gap: 8px; margin-bottom: 10px; }
.cm-vnotes p { margin: 0; }
.cm-vbody .cm-vhint, .cm-player-notes .cm-vhint { font-size: var(--fs-sm); font-weight: 650; color: var(--deep); }
.cm-vthumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(19, 43, 53, 0) 45%, rgba(19, 43, 53, .38)); pointer-events: none; }
.cm-play { position: absolute; z-index: 1; left: 16px; bottom: 16px; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .94); color: var(--deep); box-shadow: var(--shadow-2); transition: transform var(--t-fast) var(--ease); }
.cm-play svg { width: 22px; height: 22px; margin-left: 3px; }
.cm-play::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .7); opacity: 0; transform: scale(.9); transition: opacity var(--t-med), transform var(--t-med) var(--ease); }
.cm-vcard:hover .cm-play { transform: scale(1.08); }
.cm-vcard:hover .cm-play::before { opacity: 1; transform: scale(1); }
.cm-vbody { display: flex; flex-direction: column; flex: 1; }
.cm-vbody .tags { margin-bottom: 8px; }
.cm-vbody h3 { margin: 0 0 6px; }
.cm-vbody p { color: var(--ink-2); margin-bottom: 10px; }
.cm-vbody .cm-kicker { margin-bottom: 2px; }
.cm-vcap { font-size: var(--fs-sm); color: var(--muted) !important; font-style: italic; }
.cm-vnote { font-size: var(--fs-sm); font-weight: 600; color: var(--sand-ink) !important; background: var(--sand); padding: 8px 12px; border-radius: var(--r-sm); }
.cm-vnote--rose { color: var(--rose-ink) !important; background: var(--rose); }
.cm-vactions { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.cm-vactions .link-arrow { min-height: 44px; }
.cm-yt { position: relative; display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, var(--deep-2), var(--deep)); text-decoration: none; }
.cm-yt img { width: 46% !important; height: auto !important; aspect-ratio: 1; object-fit: cover; object-position: 50% 12%; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .85); box-shadow: var(--shadow-3); }
.cm-yt-badge { position: absolute; left: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .94); color: var(--deep); font-weight: 700; font-size: var(--fs-xs); }
.cm-yt-badge svg { width: 14px; height: 14px; }
.cm-vcard--yt:hover .cm-yt img { transform: scale(1.04); }
.cm-videos-note { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 26px 0 0; color: var(--muted); font-weight: 600; font-size: var(--fs-sm); text-align: center; }
.cm-videos-note svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--sky-ink); }

/* Guías para imprimir */
.cm-guides { align-items: stretch; }
.cm-guide { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start; }
.cm-guide:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--line-2); }
.cm-guide .card-icon { margin: 0; transition: transform var(--t-med) var(--ease); }
.cm-guide:hover .card-icon { transform: rotate(-6deg) scale(1.06); }
.cm-guide-body { display: flex; flex-direction: column; height: 100%; }
.cm-guide h3 { margin: 0 0 6px; }
.cm-guide-body > p:not(.cm-kicker) { color: var(--ink-2); }
.cm-guide-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 12px; }
.cm-print.is-busy { opacity: .7; pointer-events: none; }
.no-js [data-print] { display: none; }
.cm-print-frame { position: fixed; left: -10000px; top: 0; width: 1000px; height: 800px; border: 0; opacity: 0; pointer-events: none; }
@media (max-width: 520px) { .cm-guide { grid-template-columns: 1fr; gap: 12px; } }

/* Sobre este material */
.cm-about { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start; padding: clamp(20px, 3vw, 30px); border-radius: var(--r-lg); background: var(--sage); border: 1px solid #e2eadc; }
.cm-about .card-icon { margin: 0; background: var(--white); color: var(--green); }
.cm-about h2 { margin: 0 0 8px; }
.cm-about p:last-child { margin: 0; color: var(--ink-2); }
@media (max-width: 520px) { .cm-about { grid-template-columns: 1fr; } }

/* Reproductor */
dialog.cm-player { width: min(920px, calc(100% - 24px)); overscroll-behavior: contain; }
.cm-player .modal-head h2 { font-size: var(--fs-lg); }
.cm-player .modal-body { display: grid; gap: 14px; }
.cm-player-frame { display: grid; place-items: center; background: var(--deep); }
.cm-player-frame video { display: block; width: 100%; max-height: min(66vh, 640px); aspect-ratio: 16 / 9; object-fit: contain; background: var(--deep); }
.cm-player-frame.is-vertical video { width: auto; max-width: 100%; height: min(66vh, 640px); }
.cm-player .media-caption { margin: 0; font-style: italic; }
.cm-player-notes { display: grid; gap: 8px; }
.cm-player-notes p { margin: 0; color: var(--ink-2); }
.cm-player-actions { justify-content: flex-end; }
dialog.cm-player[open] { animation: bp-fade-up var(--t-med) var(--ease); }
@media (max-width: 520px) {
  .cm-player .modal-body { padding: 14px; }
  .cm-player-frame.is-vertical video { height: min(58vh, 560px); }
}

/* =========================================================
   404
   ========================================================= */
.cm-404 { padding-block: clamp(40px, 7vw, 96px) clamp(32px, 5vw, 64px); }
.cm-404-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.cm-404 h1 { max-width: 13ch; }
.cm-404 h1 em { font-style: italic; color: var(--green); }
.cm-404 .lead { margin-top: 16px; }
.cm-suggest { display: inline-flex; align-items: center; gap: 10px; margin: 18px 0 0; padding: 12px 18px; border-radius: 999px; background: var(--white); border: 1px solid var(--line-2); box-shadow: var(--shadow-1); font-weight: 600; color: var(--ink-2); animation: bp-fade-up var(--t-med) var(--ease); }
.cm-suggest svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--green); }
.cm-suggest a { font-weight: 700; }
.cm-404-art svg { width: 100%; height: auto; filter: drop-shadow(0 24px 48px rgba(19, 43, 53, .12)); }
.nf-stop-a { stop-color: var(--sky); }
.nf-stop-b { stop-color: var(--cream); }
.nf-sun { fill: var(--sand); animation: cm-breathe 8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.nf-cloud { fill: var(--white); opacity: .95; animation: cm-drift 18s ease-in-out infinite; }
.nf-cloud--b { animation-duration: 24s; animation-delay: -8s; opacity: .8; }
.nf-hill--back { fill: var(--mint); }
.nf-hill--front { fill: var(--mint-2); opacity: .75; }
.nf-path { fill: none; stroke: var(--green); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 2 12; animation: cm-dash 2.8s linear infinite; }
.nf-pin { animation: cm-bob 4.5s ease-in-out infinite; }
.nf-pin-body { fill: var(--green); }
.nf-pin-dot { fill: var(--white); }
.nf-leaf path:first-child { fill: var(--green-3); }
.nf-leaf-vein { fill: none; stroke: var(--white); stroke-width: 2; stroke-linecap: round; opacity: .7; }
.nf-leaf { animation: cm-sway 6s ease-in-out infinite; transform-box: fill-box; transform-origin: 0% 100%; }
@keyframes cm-dash { to { stroke-dashoffset: -28; } }
@keyframes cm-drift { 0%, 100% { translate: 0 0; } 50% { translate: 14px 0; } }
@keyframes cm-sway { 0%, 100% { rotate: 0deg; } 50% { rotate: -6deg; } }
.cm-404-card p { color: var(--ink-2); }
.cm-404-card .card-icon { transition: transform var(--t-med) var(--ease); }
.cm-404-card:hover .card-icon { transform: rotate(-6deg) scale(1.06); }
.cm-404-sos { padding-top: 0; }
@media (max-width: 860px) {
  .cm-404-grid { grid-template-columns: 1fr; }
  .cm-404-art { max-width: 440px; width: 100%; margin-inline: auto; }
}

/* Recorta los adornos sin permitir que el foco o un clic desplacen el contenido de la tarjeta
   (overflow: hidden sí permite ese desplazamiento). Va al final para ganar a las reglas anteriores;
   los navegadores sin "clip" se quedan con hidden. */
.cm-quote-card, .cm-care, .cm-team, .cm-vcard, .cm-vthumb, .cm-sheet a { overflow: clip; }

/* ---------- Impresión ---------- */
@media print {
  .cm-orbit, .cm-jumpbar, .cm-filterbar, .cm-tiles, .cm-player, .cm-print-frame, .cm-404-art, .cm-copy, .cm-vthumb, .cm-yt, .cm-care-deco, .cm-quote-orb { display: none !important; }
  .cm-hero-grid, .cm-prep-grid, .cm-pdf, .cm-care { grid-template-columns: 1fr; }
  .cm-care { background: none; color: var(--ink); border: 1px solid var(--line); }
  .cm-care h2, .cm-motto { color: var(--ink); }
  .cm-motto strong, .cm-care h2 em, .cm-care .eyebrow { color: var(--green); }
  .cm-topics { position: static; }
  .cm-sheet a { transform: none; box-shadow: none; }
  .cm-team, .cm-vcard, .cm-guide { break-inside: avoid; }
}
