/*
Theme Name: HomeLab
Theme URI: https://www.homelab.mx/
Author: Tremplin Numérique
Description: Tema a medida de HomeLab, laboratorio clínico y rayos X a domicilio en Guadalajara. Ligero, optimizado para SEO y Google Discover.
Version: 1.2.0
Requires PHP: 8.3
Text Domain: homelab
License: GPL-2.0-or-later
*/

@font-face { font-family: "Fira Sans"; src: url("assets/fonts/fira-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Fira Sans"; src: url("assets/fonts/fira-sans-600.woff2") format("woff2"); font-weight: 500 600; font-display: swap; }
@font-face { font-family: "Fira Sans"; src: url("assets/fonts/fira-sans-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  /* Charte HomeLab 2026 : bleu roi du logo + corail */
  --brand: #2446c7;
  --brand-600: #1f3db0;
  --brand-700: #1a3399;     /* texto y botones: contraste AA sobre blanco */
  --brand-50: #f2f5ff;
  --brand-100: #dfe6ff;
  --accent: #ff6f4f;        /* corail du logo (« Lab ») */
  --accent-700: #c2412b;    /* corail lisible sur blanc */
  --accent-50: #fff1ec;
  --ink: #0f1a3a;
  --ink-2: #2f3a5c;
  --muted: #5b6585;
  --line: #e3e8f5;
  --bg: #ffffff;
  --bg-soft: #f7f9ff;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 26, 58, .06), 0 10px 28px rgba(15, 26, 58, .08);
  --wrap: 1200px;
  --read: 740px;
  --head: "Fira Sans", "Segoe UI", system-ui, sans-serif;
  --body: "Fira Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; font-family: var(--body); font-size: 17px; line-height: 1.65; color: var(--ink-2); background: var(--bg); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
img, svg, video, iframe { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--brand-700); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
h1, h2, h3, h4, h5 { font-family: var(--head); color: var(--ink); line-height: 1.2; margin: 0 0 .55em; font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.1rem); font-weight: 600; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2.05rem); }
h3 { font-size: 1.28rem; }
h4 { font-size: 1.1rem; }
p { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.3em; margin: 0 0 1.2em; }
li { margin-bottom: .35em; }
strong { color: var(--ink); }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 200; width: auto; height: auto; clip: auto; background: #fff; padding: .6rem 1rem; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap-read { max-width: var(--read); margin: 0 auto; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--head); font-size: .82rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-700); margin-bottom: .6rem; }
.eyebrow::before { content: ""; width: 22px; height: 3px; border-radius: 2px; background: var(--accent); }
.lead { font-size: 1.15rem; color: var(--ink-2); }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 46px; padding: .7em 1.35em; border-radius: 10px; border: 2px solid transparent; font-family: var(--head); font-weight: 600; font-size: 1rem; line-height: 1.1; text-decoration: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .15s; white-space: nowrap; }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn-primary { background: var(--brand-700); color: #fff; }
.btn-primary:hover { background: var(--ink); color: #fff; }
.btn-wa { background: var(--accent-700); color: #fff; }
.btn-wa:hover { background: #0b6b39; color: #fff; }
.btn-ghost { border-color: var(--brand-700); color: var(--brand-700); background: transparent; }
.btn-ghost:hover { background: var(--brand-700); color: #fff; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--brand-50); color: var(--ink); }
.btn-sm { min-height: 38px; padding: .5em 1em; font-size: .93rem; }

/* ---------- Encabezado : logo en haut, menu dessous (doux, aéré) ---------- */
.site-header { background: #fff; }
.header-top .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 84px; }
.brand { flex: none; display: block; }
.brand img { height: 42px; width: auto; }
.header-tagline { margin: 0; padding-left: 1.5rem; border-left: 1px solid var(--line); font-size: .92rem; line-height: 1.35; color: var(--ink-2); }
.header-tagline span { display: block; font-size: .84rem; color: var(--muted); }
.header-cta { flex: none; margin-left: auto; display: flex; align-items: center; gap: 1.1rem; }
.header-mail { font-size: .88rem; color: var(--muted); }
.btn-soft { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-100); }
.btn-soft:hover { background: var(--brand-700); color: #fff; border-color: var(--brand-700); }
.header-nav { position: sticky; top: 0; z-index: 50; background: rgba(247, 249, 255, .96); backdrop-filter: saturate(1.3) blur(8px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.header-nav .wrap { display: flex; justify-content: center; }
.main-nav > ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: .1rem 1.6rem; margin: 0; padding: 0; align-items: center; }
.main-nav li { position: relative; margin: 0; }
.main-nav a { display: block; padding: .8rem .1rem; color: var(--ink-2); text-decoration: none; font-family: var(--head); font-weight: 400; font-size: .97rem; letter-spacing: .01em; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; }
.main-nav > ul > li > a:hover, .main-nav > ul > .current-menu-item > a, .main-nav > ul > .current-menu-ancestor > a { color: var(--brand-700); border-bottom-color: var(--accent); }
.main-nav .menu-item-has-children > a::after { content: ""; display: inline-block; width: .38em; height: .38em; margin-left: .45em; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-.25em) rotate(45deg); opacity: .6; }
.main-nav .sub-menu { list-style: none; position: absolute; left: 50%; top: 100%; min-width: 260px; padding: .6rem; margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 18px 40px rgba(15, 26, 58, .08); opacity: 0; visibility: hidden; transform: translate(-50%, 6px); transition: .18s; columns: 1; }
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.main-nav .sub-menu a { font-weight: 400; font-size: .94rem; padding: .45rem .7rem; border-radius: 8px; border-bottom: 0; break-inside: avoid; color: var(--ink-2); }
.main-nav .sub-menu a:hover { background: var(--brand-50); color: var(--brand-700); }
.nav-toggle { display: none; margin-left: auto; width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; transition: .2s; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
body.drawer-open .nav-toggle span { background: transparent; }
body.drawer-open .nav-toggle span::before { top: 0; transform: rotate(45deg); }
body.drawer-open .nav-toggle span::after { top: 0; transform: rotate(-45deg); }

/* ---------- Fil de Ariadna ---------- */
.breadcrumbs { font-size: .88rem; color: var(--muted); margin-bottom: 1rem; }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .3rem; }
.breadcrumbs li { margin: 0; }
.breadcrumbs li + li::before { content: "›"; margin-right: .3rem; color: #9aa5c4; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--brand-700); }

/* ---------- Encabezados de página ---------- */
.page-hero { background: linear-gradient(180deg, var(--brand-50), #fff); padding: 2.6rem 0 2rem; border-bottom: 1px solid var(--line); }
.page-hero h1 { margin-bottom: .35em; }
.page-hero .lead { max-width: 760px; margin: 0; }
.page-hero.has-image .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.5rem; align-items: center; }
.page-hero-media img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }

.section { padding: 4rem 0; }
.section-soft { background: var(--bg-soft); }
.section-dark { background: var(--ink); color: #c9d2ee; }
.section-dark h2, .section-dark h3, .section-dark strong { color: #fff; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.8rem; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-title { font-family: var(--head); font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2.05rem); font-weight: 600; color: var(--ink); line-height: 1.2; margin: 0 0 .5rem; }
.section-dark .section-title { color: #fff; }

/* ---------- Portada ---------- */
.hero { position: relative; background: radial-gradient(900px 420px at 92% 0%, var(--accent-50), transparent 60%), linear-gradient(180deg, var(--brand-50), #fff 85%); padding: 3.5rem 0 3rem; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 1.3rem + 3vw, 3.5rem); margin-bottom: .4em; }
.hero h1 em { font-style: normal; color: var(--brand); background: linear-gradient(transparent 70%, var(--accent-50) 70%); }
.hero .lead { font-size: 1.18rem; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.6rem 0 1.4rem; }
.hero-badges { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; font-size: .95rem; color: var(--ink-2); }
.hero-badges li { display: flex; align-items: center; gap: .45rem; margin: 0; }
.hero-badges svg { width: 20px; height: 20px; color: var(--brand-600); flex: none; }
.hero-media { position: relative; }
.hero-media img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 28px; box-shadow: 0 30px 60px -20px rgba(15, 26, 58, .35); }
.hero-card { position: absolute; left: -24px; bottom: 24px; background: #fff; border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: .9rem 1.1rem; display: flex; gap: .8rem; align-items: center; max-width: 290px; font-size: .93rem; line-height: 1.35; }
.hero-card b { display: block; font-family: var(--head); font-size: 1.05rem; color: var(--ink); }
.hero-card .dot { width: 42px; height: 42px; border-radius: 50%; background: var(--brand-50); color: var(--brand-700); display: grid; place-items: center; flex: none; }
.hero-card .dot svg { width: 22px; height: 22px; }

.quick { margin-top: -1.5rem; position: relative; z-index: 2; }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.quick a { display: flex; align-items: center; gap: .85rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; text-decoration: none; color: var(--ink); font-family: var(--head); font-weight: 600; font-size: 1.05rem; line-height: 1.25; box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.quick a:hover { transform: translateY(-2px); border-color: var(--brand); }
.quick .ico { width: 46px; height: 46px; border-radius: 14px; background: var(--brand-50); display: grid; place-items: center; flex: none; color: var(--brand-700); }
.quick .ico svg { width: 24px; height: 24px; }
.quick small { display: block; font-family: var(--body); font-weight: 400; font-size: .86rem; color: var(--muted); }

/* Tarjetas de servicios */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.tile { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); font-family: var(--head); font-weight: 500; font-size: 1.04rem; line-height: 1.25; transition: border-color .15s, box-shadow .15s; }
.tile:hover { border-color: var(--brand); box-shadow: var(--shadow); color: var(--ink); }
.tile img { width: 40px; height: 40px; object-fit: contain; flex: none; }
.tile .ico { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--brand-50); color: var(--brand-700); flex: none; }
.tile .ico svg { width: 22px; height: 22px; }
.tile small { display: block; font-family: var(--body); font-size: .84rem; color: var(--muted); font-weight: 400; }

/* Paquete destacado */
.checkup { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; background: linear-gradient(135deg, var(--brand-700), var(--ink)); color: #dfe6ff; border-radius: 28px; padding: 2.6rem; }
.checkup .section-title { color: #fff; }
.checkup ul { columns: 2; gap: 1.5rem; padding: 0; list-style: none; margin: 0 0 1.4rem; }
.checkup li { position: relative; padding-left: 1.5rem; break-inside: avoid; }
.checkup li::before { content: ""; position: absolute; left: 0; top: .5em; width: .7rem; height: .7rem; border-radius: 3px; background: var(--accent); }
.checkup-media img { border-radius: var(--radius); width: 100%; aspect-ratio: 4/3; object-fit: cover; }

/* Ventajas */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.feature .ico { width: 52px; height: 52px; border-radius: 16px; background: var(--brand-50); display: grid; place-items: center; margin-bottom: .9rem; }
.feature .ico img { width: 34px; height: 34px; object-fit: contain; }
.feature .ico svg { width: 26px; height: 26px; color: var(--brand-700); }
.feature-title { font-family: var(--head); font-weight: 600; font-size: 1.12rem; color: var(--ink); margin: 0 0 .3rem; line-height: 1.3; }
.feature p { margin: 0; font-size: .97rem; }

/* Banda de llamada a la acción */
.cta-band { background: linear-gradient(120deg, var(--brand-700), var(--brand)); color: #e8edff; border-left: 6px solid var(--accent); border-radius: 28px; padding: 2.2rem 2.4rem; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.cta-band .section-title { color: #fff; margin: 0 0 .3rem; }
.cta-band p { margin: 0; }
.cta-band .actions { display: flex; gap: .7rem; flex-wrap: wrap; }

/* ---------- Tarjetas de entradas ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .15s, transform .15s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-media { display: block; aspect-ratio: 16/9; background: var(--brand-50); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 1.1rem 1.25rem 1.3rem; display: flex; flex-direction: column; flex: 1; }
.card-meta { font-size: .84rem; color: var(--muted); margin-bottom: .35rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.card-meta a { color: var(--brand-700); text-decoration: none; font-weight: 600; }
.card-title { font-family: var(--head); font-size: 1.2rem; font-weight: 600; line-height: 1.28; margin: 0 0 .5rem; color: var(--ink); }
.card-title a { color: inherit; text-decoration: none; }
.card-title a:hover { color: var(--brand-700); }
.card-excerpt { font-size: .96rem; margin: 0; color: var(--ink-2); }
.card-featured { grid-column: span 2; grid-row: span 2; }
.card-featured .card-title { font-size: 1.55rem; }

/* ---------- Estudios ---------- */
.study-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.study { display: flex; flex-direction: column; gap: .4rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1.05rem 1.15rem; text-decoration: none; color: var(--ink-2); transition: border-color .15s, box-shadow .15s; }
.study:hover { border-color: var(--brand); box-shadow: var(--shadow); color: var(--ink-2); }
.study-name { font-family: var(--head); font-weight: 600; font-size: 1.08rem; color: var(--ink); line-height: 1.3; }
.study-cat { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--brand-700); font-weight: 600; }
.study-desc { font-size: .92rem; color: var(--muted); line-height: 1.5; }
.study-more { margin-top: auto; font-size: .9rem; font-weight: 600; color: var(--brand-700); }
.study-filter { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.4rem; }
.study-filter input { flex: 1 1 280px; min-height: 50px; border: 1px solid #cfd7ee; border-radius: 999px; padding: .6rem 1.2rem; font: inherit; background: #fff; }
.study-filter input:focus { outline: none; border-color: var(--brand-700); box-shadow: 0 0 0 4px var(--brand-100); }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 1.6rem; padding: 0; list-style: none; }
.chips li { margin: 0; }
.chips a, .chips button { display: inline-block; padding: .4rem .9rem; border-radius: 999px; background: var(--brand-50); color: var(--brand-700); text-decoration: none; font-size: .92rem; font-weight: 600; border: 1px solid transparent; cursor: pointer; font-family: var(--body); }
.chips a:hover, .chips button:hover, .chips .is-active { background: var(--brand-700); color: #fff; }
.study-group { margin-bottom: 2.6rem; }
.study-group-title { font-family: var(--head); font-size: 1.45rem; font-weight: 600; color: var(--ink); margin: 0 0 1rem; display: flex; align-items: baseline; gap: .6rem; }
.study-group-title a { color: inherit; text-decoration: none; }
.study-group-title small { font-family: var(--body); font-size: .9rem; color: var(--muted); font-weight: 400; }
.no-results { display: none; padding: 1rem 1.2rem; background: var(--bg-soft); border-radius: var(--radius-sm); }

.study-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 2.8rem; align-items: start; }
.study-aside { position: sticky; top: 100px; display: grid; gap: 1rem; }
.box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.box-teal { background: var(--brand-50); border-color: var(--brand-100); }
.box-title { font-family: var(--head); font-weight: 600; font-size: 1.15rem; color: var(--ink); margin: 0 0 .6rem; }
.box .btn { width: 100%; margin-top: .55rem; }
.box ul { list-style: none; padding: 0; margin: 0; }
.box li { display: flex; gap: .6rem; align-items: flex-start; font-size: .95rem; margin-bottom: .55rem; }
.box li svg { width: 20px; height: 20px; flex: none; color: var(--brand-600); margin-top: .15em; }
.study-figure { margin: 0 0 1.6rem; border-radius: var(--radius); overflow: hidden; background: var(--brand-50); }
.study-figure img { width: 100%; max-height: 460px; object-fit: contain; background: #fff; }

/* ---------- Contenido (entradas y páginas) ---------- */
.entry-header { padding: 2.2rem 0 1rem; }
.entry-header h1 { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.8rem); }
.entry-lead { font-size: 1.17rem; color: var(--ink-2); margin: 0 0 1.1rem; }
.entry-meta { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; font-size: .92rem; color: var(--muted); }
.entry-meta .cat { display: inline-block; padding: .22rem .7rem; background: var(--brand-50); color: var(--brand-700); font-weight: 600; text-decoration: none; border-radius: 999px; font-size: .85rem; }
.entry-meta .byline { display: flex; align-items: center; gap: .5rem; }
.entry-meta .byline img { width: 30px; height: 30px; border-radius: 50%; }
.entry-figure { margin: 1.2rem 0 1.8rem; }
.entry-figure img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius); }
.entry-figure figcaption { font-size: .85rem; color: var(--muted); margin-top: .5rem; }
.entry-content { font-size: 1.08rem; line-height: 1.75; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 { margin-top: 2.1rem; }
.entry-content h3 { margin-top: 1.7rem; }
.entry-content a { font-weight: 500; }
.entry-content img { border-radius: var(--radius-sm); margin: 1.4rem auto; height: auto; }
.entry-content figure { margin: 1.6rem 0; }
.entry-content figcaption { font-size: .86rem; color: var(--muted); text-align: center; margin-top: .4rem; }
.entry-content blockquote { margin: 1.6rem 0; padding: 1rem 1.4rem; border-left: 4px solid var(--brand); background: var(--brand-50); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.entry-content ul li::marker { color: var(--brand-600); }
.entry-content .wp-block-embed, .entry-content .video { position: relative; aspect-ratio: 16/9; margin: 1.6rem 0; }
.entry-content .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--radius-sm); }
.entry-content .btn { margin: .3rem .4rem .3rem 0; text-decoration: none; }
.entry-content .faq { border-top: 1px solid var(--line); }
.entry-content details { border-bottom: 1px solid var(--line); padding: .9rem 0; }
.entry-content summary { cursor: pointer; font-family: var(--head); font-weight: 600; color: var(--ink); font-size: 1.1rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.entry-content summary::after { content: "+"; color: var(--brand-700); font-size: 1.4rem; line-height: 1; }
.entry-content details[open] summary::after { content: "–"; }
.entry-content details > *:not(summary) { margin-top: .7rem; }
.entry-content .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; margin: 1.4rem 0; }
.entry-content .note { padding: 1rem 1.2rem; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: .97rem; }
.dropcap > p:first-of-type::first-letter { float: left; font-family: var(--head); font-size: 3.6em; line-height: .82; padding: .08em .1em 0 0; color: var(--brand-700); font-weight: 600; }

.article-layout { display: grid; grid-template-columns: minmax(0, var(--read)) 320px; gap: 3rem; justify-content: center; align-items: start; padding-bottom: 3rem; }
.article-aside { position: sticky; top: 100px; display: grid; gap: 1rem; }
.mini-list { list-style: none; padding: 0; margin: 0; }
.mini-list li { margin: 0; border-top: 1px solid var(--line); }
.mini-list li:first-child { border-top: 0; }
.mini-list a { display: block; padding: .6rem 0; color: var(--ink); text-decoration: none; font-weight: 500; font-size: .96rem; line-height: 1.35; }
.mini-list a:hover { color: var(--brand-700); }

.tags-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: 2rem 0 0; }
.author-box { display: flex; gap: 1rem; align-items: flex-start; padding: 1.3rem; border: 1px solid var(--line); border-radius: var(--radius); margin: 2.4rem 0 0; background: var(--bg-soft); }
.author-box img { width: 64px; height: 64px; border-radius: 50%; flex: none; background: #fff; }
.author-name { font-family: var(--head); font-weight: 600; color: var(--ink); font-size: 1.08rem; margin: 0 0 .2rem; }
.author-box p { margin: 0; font-size: .95rem; }
.related { padding: 3rem 0 4rem; background: var(--bg-soft); }

/* Médicos */
.doctors { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.4rem; }
.doctor { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink-2); display: flex; flex-direction: column; }
.doctor img { width: 100%; aspect-ratio: 1/1; object-fit: cover; object-position: top; background: var(--brand-50); }
.doctor div { padding: 1rem 1.2rem 1.2rem; }
.doctor b { display: block; font-family: var(--head); font-size: 1.12rem; color: var(--ink); line-height: 1.3; }
.doctor span { font-size: .93rem; color: var(--brand-700); font-weight: 600; }

/* ---------- Tablas del contenido ---------- */
.table-wrap { margin: 1.6rem 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .97rem; line-height: 1.5; }
.entry-content th, .entry-content td { padding: .65rem .8rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; hyphens: auto; overflow-wrap: anywhere; }
.entry-content th { background: var(--brand-50); color: var(--ink); font-family: var(--head); font-weight: 600; }

/* ---------- Paginación ---------- */
.pagination { display: flex; justify-content: center; gap: .4rem; margin: 2.5rem 0 0; flex-wrap: wrap; }
.pagination .page-numbers { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 .8rem; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; }
.pagination .page-numbers.current, .pagination a.page-numbers:hover { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }

/* ---------- Formularios ---------- */
.wpcf7 form { display: grid; gap: 1rem; }
.wpcf7 label { display: block; font-weight: 600; color: var(--ink); font-size: .95rem; }
.wpcf7 input[type=text], .wpcf7 input[type=email], .wpcf7 input[type=tel], .wpcf7 textarea, .wpcf7 select, .search-form input[type=search] { width: 100%; margin-top: .35rem; padding: .75rem 1rem; border: 1px solid #cfd7ee; border-radius: var(--radius-sm); font: inherit; font-weight: 400; background: #fff; color: var(--ink); }
.wpcf7 textarea { min-height: 150px; }
.wpcf7 input:focus, .wpcf7 textarea:focus, .search-form input:focus { outline: none; border-color: var(--brand-700); box-shadow: 0 0 0 4px var(--brand-100); }
.wpcf7 input[type=submit] { justify-self: start; background: var(--brand-700); color: #fff; border: 0; border-radius: 999px; padding: .85rem 1.8rem; font-family: var(--head); font-weight: 600; font-size: 1.05rem; cursor: pointer; }
.wpcf7 input[type=submit]:hover { background: var(--ink); }
.wpcf7-list-item { margin: 0; }
.wpcf7-acceptance label { font-weight: 400; display: flex; gap: .5rem; align-items: flex-start; }
.wpcf7-not-valid-tip { color: #b42318; font-size: .88rem; }
.wpcf7-response-output { margin: 0 !important; border-radius: var(--radius-sm); }
.search-form { display: flex; gap: .5rem; }
.search-form input[type=search] { margin: 0; border-radius: 999px; }
.search-form button { flex: none; }

.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 2.5rem; align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 0 0 1.4rem; display: grid; gap: .9rem; }
.contact-list li { display: flex; gap: .8rem; align-items: flex-start; margin: 0; }
.contact-list .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-50); display: grid; place-items: center; flex: none; color: var(--brand-700); }
.contact-list .ico svg { width: 22px; height: 22px; }
.contact-list b { display: block; color: var(--ink); font-family: var(--head); font-weight: 600; }
.contact-list a { color: var(--ink-2); text-decoration: none; }
.contact-list a:hover { color: var(--brand-700); }
.map-link { display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }

/* ---------- Pie de página ---------- */
.site-footer { background: var(--ink); color: #b9c2dd; border-top: 4px solid var(--accent); font-size: .95rem; padding: 3.5rem 0 0; margin-top: 0; }
.site-footer a { color: #eef1ff; text-decoration: none; }
.site-footer a:hover { color: var(--brand); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2.2rem; }
.footer-title { font-family: var(--head); color: #fff; font-weight: 600; font-size: 1.08rem; margin: 0 0 .9rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: .45rem; }
.footer-brand img { height: 42px; width: auto; margin-bottom: 1rem; }
.footer-brand address { font-style: normal; margin: .8rem 0; }
.social { display: flex; gap: .5rem; margin-top: 1rem; }
.social a { width: 40px; height: 40px; border-radius: 50%; border: 1px solid #2c3a66; display: grid; place-items: center; }
.social a:hover { border-color: var(--brand); }
.social svg { width: 18px; height: 18px; }
.cert { display: flex; align-items: center; gap: .8rem; margin-top: 1rem; }
.cert img { height: 46px; width: auto; background: #fff; border-radius: 8px; padding: 4px 8px; }
.footer-bottom { margin-top: 2.6rem; padding: 1.2rem 0; border-top: 1px solid #24305a; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .87rem; }
.footer-bottom ul { display: flex; gap: 1.2rem; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }

/* Barra de acciones fija (móvil) */
.action-bar { display: none; }

/* ---------- 404 / búsqueda ---------- */
.empty-state { text-align: center; padding: 4rem 0; }
.empty-state .search-form { max-width: 520px; margin: 1.5rem auto; }

/* ---------- Adaptación ---------- */
@media (max-width: 1180px) {
  .main-nav > ul { gap: .1rem 1.1rem; }
  .header-mail { display: none; }
}
@media (max-width: 1024px) {
  .nav-toggle { display: inline-flex; }
  .header-cta, .header-tagline { display: none; }
  .site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line); }
  .header-top .wrap { min-height: 68px; }
  .header-nav { position: static; z-index: auto; background: none; border: 0; backdrop-filter: none; }
  .header-nav .wrap { display: block; padding: 0; }
  .main-nav > ul { display: flex; justify-content: flex-start; }
  .main-nav a { border-bottom: 0; padding: .8rem .4rem; }
  .main-nav { position: fixed; z-index: 95; top: 0; right: 0; bottom: 0; width: min(88vw, 380px); background: #fff; padding: 84px 1.2rem 2rem; overflow-y: auto; transform: translateX(100%); transition: transform .25s ease; box-shadow: -20px 0 40px rgba(15, 26, 58, .15); margin: 0; }
  body.drawer-open .main-nav { transform: none; }
  body.drawer-open { overflow: hidden; }
  body.drawer-open::after { content: ""; position: fixed; inset: 0; background: rgba(15, 26, 58, .45); z-index: 80; }
  body.drawer-open .site-header { z-index: 90; }
  .nav-toggle { position: relative; z-index: 100; }
  .main-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav > ul > li { border-bottom: 1px solid var(--line); }
  .main-nav a { padding: .8rem .4rem; font-size: 1.08rem; }
  .main-nav .sub-menu, .main-nav .sub-menu.cols-2 { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 .6rem .6rem; min-width: 0; columns: 1; display: none; }
  .main-nav li.is-open > .sub-menu { display: block; }
  .main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { transform: none; }
  .main-nav .menu-item-has-children > a::after { float: right; margin-top: .55em; }
  .hero .wrap, .page-hero.has-image .wrap, .checkup, .study-layout, .contact-grid, .article-layout { grid-template-columns: 1fr; }
  .study-aside, .article-aside { position: static; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .card-featured { grid-column: span 2; grid-row: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-card { left: 12px; }
}

/* Tablas en fichas hasta ~760 px: cada fila se convierte en una ficha «encabezado: valor» */
@media (max-width: 760px) {
  .table-cards table, .table-cards thead, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
  .table-cards tr { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: .8rem; overflow: hidden; }
  .table-cards tr:has(> th) { display: none; }
  .table-cards td { border: 0; border-bottom: 1px solid var(--line); padding: .55rem .8rem; }
  .table-cards td:last-child { border-bottom: 0; }
  .table-cards td[data-label]::before { content: attr(data-label); display: block; font-family: var(--head); font-weight: 600; color: var(--ink); font-size: .86rem; }
  .table-cards table.no-head td:first-child { background: var(--brand-50); font-weight: 600; color: var(--ink); }
}

/* ---------- Móvil: contenido útil por encima de la línea de flotación ---------- */
@media (max-width: 760px) {
  body { font-size: 16.5px; padding-bottom: 64px; }
  .wrap { padding: 0 16px; }
  .header-top .wrap { min-height: 60px; gap: .8rem; }
  .brand img { height: 32px; }
  .nav-toggle { width: 44px; height: 44px; }
  .breadcrumbs { display: none; }
  h1 { font-size: 1.85rem; }
  .hero { padding: 1.4rem 0 1.6rem; }
  .hero .wrap { gap: 1.3rem; }
  .hero h1 { font-size: 1.95rem; }
  .hero .lead { font-size: 1.04rem; }
  .hero-actions { margin: 1rem 0 .8rem; }
  .hero-actions .btn { flex: 1 1 auto; }
  .hero-media img { aspect-ratio: 16/9; border-radius: 18px; }
  .hero-card { display: none; }
  .quick { margin-top: 0; padding-top: .5rem; }
  .quick-grid { gap: .6rem; }
  .quick a { padding: .8rem; gap: .6rem; font-size: .96rem; }
  .quick .ico { width: 38px; height: 38px; }
  .quick small { display: none; }
  .section { padding: 2.4rem 0; }
  .page-hero { padding: 1.2rem 0 1.1rem; }
  .page-hero .lead { font-size: 1rem; }
  .page-hero.has-image .wrap { gap: 1rem; }
  .page-hero-media img { aspect-ratio: 16/7; }
  .entry-header { padding: 1.1rem 0 .4rem; }
  .entry-header h1 { font-size: 1.75rem; }
  .entry-lead { font-size: 1.03rem; margin-bottom: .7rem; }
  .entry-figure { margin: .8rem 0 1.2rem; }
  .entry-content { font-size: 1.04rem; }
  .features, .cards, .footer-grid { grid-template-columns: 1fr; }
  .card-featured { grid-column: auto; }
  .card-featured .card-title { font-size: 1.25rem; }
  .tiles { grid-template-columns: 1fr 1fr; gap: .55rem; }
  .tile { padding: .7rem; font-size: .93rem; gap: .55rem; }
  .tile img, .tile .ico { width: 32px; height: 32px; }
  .tile small { display: none; }
  .checkup { padding: 1.5rem; border-radius: 20px; gap: 1.2rem; }
  .checkup ul { columns: 1; }
  .cta-band { padding: 1.5rem; border-radius: 20px; }
  .cta-band .actions, .cta-band .actions .btn { width: 100%; }
  .study-grid { grid-template-columns: 1fr; }
  .study-figure img { max-height: 260px; }
  .action-bar { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; padding: .5rem .7rem calc(.5rem + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(15, 26, 58, .08); }
  .action-bar .btn { min-height: 46px; width: 100%; }
  .footer-bottom { padding-bottom: 1.4rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
.cta-band .btn-ghost, .checkup .btn-ghost { border-color: rgba(255, 255, 255, .7); color: #fff; }
.cta-band .btn-ghost:hover, .checkup .btn-ghost:hover { background: #fff; color: var(--ink); }
.box-teal .btn-ghost { background: #fff; }
.doctor-initials { display: grid; place-items: center; aspect-ratio: 4/3; background: linear-gradient(135deg, var(--brand-50), var(--brand-100)); color: var(--brand-700); font-family: var(--head); font-size: 3.2rem; font-weight: 600; letter-spacing: .04em; }
.main-nav > ul > li:first-child > .sub-menu { columns: 2; min-width: 480px; }
@media (max-width: 1024px) { .main-nav > ul > li:first-child > .sub-menu { columns: 1; min-width: 0; } }
.results-frame { margin: 1.4rem 0; }
.checkup-solo { grid-template-columns: 1fr; }
.checkup-solo ul { columns: 4; }
@media (max-width: 1024px) { .checkup-solo ul { columns: 2; } }
@media (max-width: 760px) { .checkup-solo ul { columns: 1; } }
.entry-content .table-simple th[scope=row] { width: 38%; background: var(--brand-50); }

.email-text { white-space: nowrap; }
.box-note { font-size: .9rem; margin: .8rem 0 0; color: var(--muted); }
.card-meta a, .study-cat { color: var(--accent-700); }
.entry-meta .cat { background: var(--accent-50); color: var(--accent-700); }
.entry-content blockquote { border-left-color: var(--accent); }
.dropcap > p:first-of-type::first-letter { color: var(--accent-700); }
