/* Núcleo Médico Sagrado Corazón — estilos del sitio y del panel */
:root {
  --turquesa: #078F86;
  --verde: #075B59;
  --verde-osc: #054644;
  --verde-claro: #E8F7F5;
  --verde-claro-2: #D3EFEB;
  --blanco: #FFFFFF;
  --texto: #17323D;
  --texto-suave: #4A6470;
  --borde: #D5E9E6;
  --whatsapp: #1A8F4C;
  --peligro: #B42318;
  --peligro-claro: #FDECEA;
  --aviso: #8A5A00;
  --aviso-claro: #FFF4D6;
  --radio: 20px;
  --radio-sm: 12px;
  --sombra: 0 8px 28px rgba(7, 91, 89, .10);
  --sombra-sm: 0 3px 12px rgba(7, 91, 89, .08);
  --sombra-hover: 0 16px 40px rgba(7, 91, 89, .18);
  --fuente-titulos: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fuente: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --header-h: 78px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; font-family: var(--fuente); font-size: 1.0625rem; line-height: 1.6; color: var(--texto); background: var(--blanco); overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--verde); }
h1, h2, h3 { font-family: var(--fuente-titulos); line-height: 1.18; margin: 0 0 .5em; color: var(--texto); letter-spacing: -.01em; }
h2 { font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.4rem); }
h3, .h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--verde); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 100; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--turquesa); outline-offset: 3px; border-radius: 6px; }

.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.container.narrow { width: min(860px, 100% - 32px); }
.icon { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.icon-xl { width: 2.4rem; height: 2.4rem; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55em; min-height: 48px; padding: .7em 1.4em; border-radius: 14px; border: 2px solid transparent; font: 700 1rem/1.2 var(--fuente); text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .15s, background-color .15s, color .15s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--sombra); }
.btn-primary { background: var(--verde); color: #fff; }
.btn-primary:hover { background: var(--verde-osc); }
.btn-whatsapp { background: var(--whatsapp); color: #fff; }
.btn-whatsapp:hover { background: #157a40; }
.btn-outline { background: #fff; color: var(--verde); border-color: var(--verde); }
.btn-outline:hover { background: var(--verde-claro); }
.btn-ghost { background: transparent; color: var(--verde); border-color: var(--borde); }
.btn-light { background: #fff; color: var(--verde); }
.btn-light .icon-wa { color: var(--whatsapp); }
.btn-ghost-light { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.7); }
.btn-ghost-light:hover { background: rgba(255,255,255,.18); }
.btn-danger { background: #fff; color: var(--peligro); border-color: #f1b8b2; }
.btn-sm { min-height: 40px; padding: .45em 1em; font-size: .92rem; border-radius: 12px; }
.btn-lg { min-height: 54px; font-size: 1.05rem; padding: .8em 1.6em; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; min-height: 40px; padding: 0; border-radius: 12px; }
.btn-wa-soft { background: #E3F6EC; color: var(--whatsapp); }
.btn-wa-soft:hover { background: var(--whatsapp); color: #fff; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

.eyebrow { font: 800 .76rem/1.3 var(--fuente-titulos); letter-spacing: .14em; text-transform: uppercase; color: var(--turquesa); margin-bottom: .7em; }
.eyebrow-light { color: #9DE6DD; }
.card { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); box-shadow: var(--sombra); }
.head-rule { display: block; width: 56px; height: 4px; border-radius: 4px; background: var(--turquesa); margin: 14px auto 0; }

/* ---------- Encabezado ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.97); border-bottom: 1px solid transparent; transition: box-shadow .2s, border-color .2s; }
.site-header.is-scrolled { border-color: var(--borde); box-shadow: 0 4px 18px rgba(7,91,89,.08); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--header-h); }
.brand img { height: 58px; width: auto; }
.main-nav { display: flex; align-items: center; gap: 18px; }
.main-nav ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
.main-nav ul a { position: relative; display: block; padding: 8px 11px; color: var(--texto); text-decoration: none; font-weight: 700; font-size: .95rem; border-radius: 10px; }
.main-nav ul a::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: 2px; height: 3px; border-radius: 3px; background: var(--turquesa); transform: scaleX(0); transition: transform .2s; }
.main-nav ul a:hover, .main-nav ul a.is-active { color: var(--verde); }
.main-nav ul a:hover::after, .main-nav ul a.is-active::after { transform: scaleX(1); }
.nav-toggle { display: none; width: 48px; height: 48px; border: 1px solid var(--borde); border-radius: 12px; background: #fff; color: var(--verde); cursor: pointer; }
.nav-toggle .icon { width: 26px; height: 26px; }
@media (max-width: 1100px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .main-nav { position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 12px; padding: 16px; background: #fff; border-bottom: 1px solid var(--borde); box-shadow: var(--sombra); max-height: calc(100dvh - var(--header-h)); overflow-y: auto; transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s; }
  .main-nav.is-open { opacity: 1; transform: none; visibility: visible; }
  .main-nav ul { flex-direction: column; }
  .main-nav ul a { padding: 12px 14px; font-size: 1.05rem; }
  .main-nav ul a::after { display: none; }
  .main-nav ul a.is-active { background: var(--verde-claro); }
}
@media (max-width: 480px) { :root { --header-h: 68px; } .brand img { height: 46px; } }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: clamp(560px, 46vw, 760px); display: flex; align-items: center; overflow: hidden; color: #fff; padding: 56px 0 120px;
  background: linear-gradient(90deg, #06706B 0%, #075B59 26%); }
/* Fotografía de fachada como fondo principal (versión optimizada 1600 px; 900 px en móvil).
   En pantallas anchas arranca detrás del texto para que el edificio quede centrado en la zona visible. */
.hero-photo { position: absolute; top: 0; right: 0; bottom: 0; left: 26%;
  background: url("../assets/img/portada-fachada-1600.webp") 46% 22% / cover no-repeat; }
/* Degradado verde turquesa semitransparente a la izquierda para la legibilidad del texto */
.hero-photo::before { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, #075B59 0%, rgba(7,91,89,.82) 14%, rgba(7,143,134,.42) 32%, rgba(7,143,134,.10) 48%, rgba(7,143,134,0) 60%),
              linear-gradient(0deg, rgba(5,70,68,.35) 0%, rgba(5,70,68,0) 24%); }
.hero-content { position: relative; z-index: 1; }
.hero h1 { color: #fff; font-size: clamp(2.3rem, 1.4rem + 3.4vw, 3.9rem); font-weight: 800; max-width: 16ch; text-shadow: 0 2px 18px rgba(0,0,0,.18); }
.hero h1 span { display: block; }
.hero-slogan { font-size: 1.3rem; color: #E8F7F5; max-width: 30ch; }
.hero-rule { display: block; width: 64px; height: 4px; border-radius: 4px; background: #9DE6DD; margin: 4px 0 18px; }
.hero-lead { font-size: 1.2rem; color: #E8F7F5; max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
@media (max-width: 1000px) and (min-width: 761px) {
  .hero-photo { left: 20%; background-position: 50% 30%; }
  .hero-photo::before { background: linear-gradient(90deg, #075B59 0%, rgba(7,91,89,.86) 26%, rgba(7,143,134,.45) 50%, rgba(7,143,134,0) 75%); }
  .hero-content { max-width: 62%; margin-left: 16px; }
}
@media (max-width: 760px) {
  /* Móvil: texto arriba sobre verde y la fachada completa en la parte inferior */
  .hero { min-height: 0; padding: 36px 0 290px; align-items: flex-start; }
  .hero-photo { top: auto; left: 0; height: 330px; background-image: url("../assets/img/portada-fachada-900.webp"); background-position: 52% 40%; }
  .hero-photo::before { background: linear-gradient(180deg, var(--verde) 0%, rgba(7,91,89,.55) 16%, rgba(7,143,134,0) 42%); }
  .hero-actions .btn { flex: 1 1 100%; }
}

/* Barra de datos bajo el hero */
.infobar-wrap { position: relative; z-index: 5; margin-top: -64px; }
.infobar { list-style: none; margin: 0; padding: 10px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; background: #fff; border-radius: 22px; box-shadow: var(--sombra-hover); border: 1px solid var(--borde); }
.infobar li > a, .infobar li > div { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; text-decoration: none; color: var(--texto); height: 100%; }
.infobar li > a:hover { background: var(--verde-claro); }
.infobar li + li { border-left: 1px solid var(--borde); }
.infobar strong { display: block; font-size: .92rem; color: var(--verde); }
.infobar span span, .infobar li span:last-child { font-size: .9rem; line-height: 1.35; }
.infobar-icon { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--verde-claro); color: var(--turquesa); }
.infobar-icon .icon { width: 22px; height: 22px; }
@media (max-width: 960px) { .infobar { grid-template-columns: 1fr 1fr; } .infobar li:nth-child(3) { border-left: 0; } .infobar li:nth-child(n+3) { border-top: 1px solid var(--borde); } }
@media (max-width: 520px) { .infobar { grid-template-columns: 1fr; } .infobar li + li { border-left: 0; border-top: 1px solid var(--borde); } }

/* ---------- Secciones ---------- */
.section { padding: clamp(60px, 8vw, 100px) 0; }
.section-tint { background: linear-gradient(180deg, var(--verde-claro) 0%, #F3FBFA 100%); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.section-head h2 { margin-bottom: .3em; }
.section-sub { color: var(--texto-suave); }

/* Contenido pendiente */
.pending { color: var(--texto-suave); font-style: italic; }
.pending-badge { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--aviso-claro); color: var(--aviso); border: 1px dashed var(--aviso); font: 800 .68rem/1.5 var(--fuente); letter-spacing: .06em; text-transform: uppercase; font-style: normal; vertical-align: middle; }
.preview-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--aviso-claro); color: var(--aviso); border-top: 2px dashed var(--aviso); padding: 6px 16px; text-align: center; font-weight: 700; font-size: .85rem; }
body.has-preview-banner { padding-bottom: 36px; }
@media (max-width: 600px) { .preview-banner { font-size: .72rem; } body.has-preview-banner { padding-bottom: 48px; } }

/* Quiénes somos */
.about-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.about-media { margin: 0; border-radius: 28px; overflow: hidden; box-shadow: var(--sombra-hover); aspect-ratio: 16 / 10; }
.about-media img { width: 100%; height: 100%; object-fit: cover; }
.about-text { position: relative; }
.about-story { color: var(--texto-suave); font-size: 1.08rem; max-width: 46ch; }
.about-deco { position: absolute; right: 0; bottom: -60px; width: 130px; height: 130px; fill: none; stroke: #B9E4DE; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; z-index: -1; }
.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
.value-card { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); padding: 26px 24px; text-align: center; box-shadow: var(--sombra-sm); }
.value-card h3 { margin: 12px 0 6px; }
.value-card p { margin: 0; font-size: .97rem; color: var(--texto-suave); }
.value-icon { display: inline-grid; place-items: center; width: 58px; height: 58px; border-radius: 16px; background: var(--verde-claro); color: var(--turquesa); }
.value-icon .icon { width: 30px; height: 30px; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } .values-grid { grid-template-columns: 1fr; } .about-deco { display: none; } }

/* Directorio */
.dir-tools { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; max-width: 820px; margin: 0 auto 10px; }
.field-search { position: relative; display: block; }
.field-search .icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--texto-suave); pointer-events: none; }
.field-search input, .field-select select { width: 100%; min-height: 54px; border: 1.5px solid var(--borde); border-radius: 16px; background: #fff; font: 600 1rem var(--fuente); color: var(--texto); box-shadow: var(--sombra-sm); }
.field-search input { padding: 0 18px 0 50px; }
.field-select select { padding: 0 44px 0 18px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--verde) 50%), linear-gradient(135deg, var(--verde) 50%, transparent 50%); background-position: calc(100% - 24px) 50%, calc(100% - 18px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.field-search input:focus, .field-select select:focus { border-color: var(--turquesa); outline: 3px solid rgba(7,143,134,.22); outline-offset: 0; }
.dir-count { text-align: center; color: var(--texto-suave); font-size: .95rem; min-height: 1.6em; margin-bottom: 18px; }
.dir-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 280px)); justify-content: center; gap: 24px; }
@media (max-width: 600px) { .dir-grid { grid-template-columns: 1fr 1fr; gap: 14px; } }
@media (max-width: 380px) { .dir-grid { grid-template-columns: minmax(0, 300px); } }
.doc-card { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra-sm); display: flex; flex-direction: column; transition: transform .18s, box-shadow .18s; }
.doc-card:hover { transform: translateY(-3px); box-shadow: var(--sombra-hover); }
.doc-media { display: block; aspect-ratio: 1 / 1; background: linear-gradient(160deg, var(--verde-claro) 0%, #fff 100%); overflow: hidden; }
.doc-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.doc-initials { width: 100%; height: 100%; display: grid; place-items: center; color: var(--verde); font: 800 clamp(2.2rem, 6vw, 3.4rem) var(--fuente-titulos); }
.doc-body { padding: 16px 16px 18px; text-align: center; display: flex; flex-direction: column; flex: 1; }
.doc-body h3 { font-size: 1.05rem; margin: 0 0 4px; }
.doc-body h3 a { color: var(--texto); text-decoration: none; }
.doc-body h3 a:hover { color: var(--verde); }
.doc-spec { font-size: .9rem; color: var(--texto-suave); margin: 0 0 14px; }
.doc-actions { margin-top: auto; display: flex; gap: 8px; justify-content: center; }
.doc-actions .btn-primary { flex: 1; max-width: 170px; }
@media (max-width: 600px) { .doc-body { padding: 12px 10px 14px; } .doc-actions .btn-primary { font-size: .85rem; padding: .4em .6em; } }
.pager { display: flex; justify-content: center; gap: 8px; margin-top: 32px; flex-wrap: wrap; }
.pager-btn { min-width: 42px; height: 42px; padding: 0 8px; border-radius: 50%; border: 1px solid var(--borde); background: #fff; color: var(--texto); font: 700 .95rem var(--fuente); cursor: pointer; display: grid; place-items: center; }
.pager-btn.is-current { background: var(--verde); border-color: var(--verde); color: #fff; }
.pager-btn[disabled] { opacity: .4; cursor: default; }
.empty-state { text-align: center; max-width: 560px; margin: 8px auto 0; padding: 34px 26px; background: #fff; border-radius: var(--radio); border: 1.5px dashed var(--turquesa); }
.empty-state img { width: 110px; margin: 0 auto 12px; }
.empty-small { padding: 24px; }
.skeleton { height: 360px; border-radius: var(--radio); background: linear-gradient(90deg, #f1f8f7 25%, #e3f2f0 50%, #f1f8f7 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Servicios */
.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.services-grid.is-empty { display: block; }
.service-card { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); padding: 26px 18px; text-align: center; box-shadow: var(--sombra-sm); transition: transform .18s, box-shadow .18s; }
.service-card:hover { transform: translateY(-3px); box-shadow: var(--sombra); }
.service-card h3 { font-size: 1.02rem; margin: 12px 0 4px; }
.service-card p { font-size: .9rem; color: var(--texto-suave); margin: 0; }
.service-icon { display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; background: var(--verde-claro); color: var(--turquesa); }
.service-icon .icon { width: 32px; height: 32px; stroke-width: 1.8; }
.service-icon-lg { margin-bottom: 8px; }

/* Galería */
.gallery { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.gallery-item { margin: 0; position: relative; border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra); background: #fff; }
.gallery-item button { all: unset; display: block; width: 100%; height: 100%; cursor: zoom-in; }
.gallery-item button:focus-visible { outline: 3px solid var(--turquesa); outline-offset: -3px; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; transition: transform .35s; }
.gallery-item.is-portrait img { aspect-ratio: auto; max-height: 520px; }
.gallery-item button:hover img { transform: scale(1.03); }
.gallery-item figcaption { position: absolute; left: 12px; bottom: 12px; right: 12px; background: rgba(255,255,255,.95); padding: 9px 14px; border-radius: 12px; font-weight: 700; font-size: .95rem; }
@media (max-width: 760px) { .gallery { grid-template-columns: 1fr; } .gallery-item.is-portrait img { max-height: 460px; } }
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1100px, 94vw); max-height: 92vh; }
.lightbox::backdrop { background: rgba(7, 40, 40, .86); }
.lightbox img { max-height: 82vh; width: auto; margin: 0 auto; border-radius: 14px; }
.lightbox-caption { color: #fff; text-align: center; margin: 10px 0 0; font-weight: 700; }
.lightbox-close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; color: var(--texto); cursor: pointer; display: grid; place-items: center; }

/* Contacto: franja de cita */
.cta-band { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px; padding: 28px 36px; border-radius: 28px; color: #fff; background: radial-gradient(120% 140% at 0% 0%, #0A9D92 0%, var(--verde) 55%, var(--verde-osc) 100%); box-shadow: var(--sombra-hover); margin-bottom: 40px; }
.cta-mascot { width: 128px; height: 128px; object-fit: contain; object-position: 50% 30%; background: #fff; border-radius: 50%; padding: 10px; box-shadow: 0 0 0 6px rgba(255,255,255,.18), 0 10px 24px rgba(0,0,0,.18); }
.cta-text h2 { color: #fff; margin-bottom: .25em; }
.cta-text p { margin: 0; color: #E3F5F2; max-width: 46ch; }
.cta-actions { display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 960px) {
  .cta-band { grid-template-columns: auto 1fr; }
  .cta-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .cta-actions .btn { flex: 1 1 220px; }
  .cta-mascot { width: 100px; height: 100px; }
}
@media (max-width: 600px) {
  .cta-band { grid-template-columns: 1fr; padding: 26px 20px; text-align: center; justify-items: center; }
  .cta-mascot { width: 92px; height: 92px; }
  .cta-actions { width: 100%; }
  .cta-actions .btn { flex: 1 1 100%; }
}
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: stretch; }
.contact-info { padding: 28px; }
.contact-list { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 18px; }
.contact-list li { display: flex; gap: 14px; }
.contact-list strong { display: block; }
.contact-list span, .contact-list a { display: block; }
.contact-list a { font-weight: 700; text-decoration: none; }
.contact-list small { display: block; color: var(--texto-suave); font-size: .88rem; margin-top: 2px; }
.ci-icon { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--verde-claro); color: var(--turquesa); }
.ci-icon .icon { width: 22px; height: 22px; }
.social-row { display: flex; flex-wrap: wrap; gap: 10px; }
.social-row a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 12px; background: var(--verde-claro); font-weight: 700; text-decoration: none; }
.social-row a:hover { background: var(--verde-claro-2); }
.contact-map { padding: 14px; display: grid; gap: 14px; grid-template-rows: 1fr auto; }
.map-frame { border-radius: 14px; overflow: hidden; min-height: 280px; background: var(--verde-claro); }
.map-frame iframe { width: 100%; height: 100%; min-height: 280px; border: 0; display: block; }
.map-placeholder { height: 100%; min-height: 280px; display: grid; place-content: center; justify-items: center; text-align: center; gap: 8px; padding: 20px; color: var(--texto-suave); }
.map-placeholder .icon { color: var(--turquesa); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq details { background: #fff; border: 1px solid var(--borde); border-radius: 16px; box-shadow: var(--sombra-sm); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 22px; font-weight: 700; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { color: var(--turquesa); transition: transform .2s; }
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq .faq-a { padding: 0 22px 18px; color: var(--texto-suave); }
.faq-note { margin-top: 20px; text-align: center; font-size: .9rem; color: var(--texto-suave); }

/* Nuestras redes */
.social-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 980px; margin: 0 auto; }
.social-card { display: flex; align-items: center; gap: 18px; padding: 22px 24px; background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); box-shadow: var(--sombra-sm); text-decoration: none; color: var(--texto); transition: transform .18s, box-shadow .18s, border-color .18s; }
.social-card:hover { transform: translateY(-3px); box-shadow: var(--sombra-hover); border-color: var(--turquesa); }
.social-icon { flex: none; width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; color: #fff; background: radial-gradient(120% 120% at 0% 0%, #0A9D92 0%, var(--verde) 70%); }
.social-icon .icon { width: 30px; height: 30px; }
.social-body { flex: 1; min-width: 0; }
.social-body strong { display: block; font: 800 1.1rem var(--fuente-titulos); }
.social-body span { display: block; color: var(--texto-suave); font-size: .95rem; overflow-wrap: break-word; }
.social-cta { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 12px; background: var(--verde-claro); color: var(--verde); font-weight: 700; font-size: .92rem; }
.social-card:hover .social-cta { background: var(--verde); color: #fff; }
.social-cta .icon { width: 16px; height: 16px; }
.social-card { min-width: 0; }
@media (max-width: 860px) { .social-grid { grid-template-columns: minmax(0, 1fr); max-width: 520px; } }
@media (max-width: 480px) {
  .social-card { padding: 16px; gap: 14px; }
  .social-icon { width: 50px; height: 50px; border-radius: 15px; }
  .social-body span { font-size: .86rem; }
  .social-cta { font-size: 0; gap: 0; padding: 10px; }  /* solo el icono; el texto del enlace sigue disponible para lectores */
  .social-cta .icon { width: 18px; height: 18px; }
}

/* Pie */
.site-footer { background: linear-gradient(180deg, var(--verde) 0%, var(--verde-osc) 100%); color: #DDF1EE; padding: 60px 0 0; }
.site-footer h3 { color: #fff; font-size: 1.02rem; margin-bottom: .8em; }
.site-footer a { color: #DDF1EE; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.5fr .8fr; gap: 32px; }
.footer-logo { display: inline-block; background: #fff; border-radius: 16px; padding: 10px 14px; }
.footer-logo img { height: 70px; width: auto; }
.footer-brand p { margin-top: 14px; font-size: .95rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .96rem; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact a { display: inline-flex; gap: 10px; align-items: center; }
.footer-social { display: flex; gap: 10px; }
.footer-social a { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.12); }
.footer-social a:hover { background: rgba(255,255,255,.22); text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.16); margin-top: 44px; padding: 18px 0; font-size: .86rem; text-align: center; }
.footer-bottom p { margin: 0; }
.site-footer-slim { padding-top: 0; }
.site-footer-slim .footer-bottom { margin-top: 0; border-top: 0; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* WhatsApp flotante */
.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 58px; height: 58px; border-radius: 50%; background: var(--whatsapp); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.22); transition: transform .15s; }
.wa-float:hover { transform: scale(1.06); }
.wa-float .icon { width: 30px; height: 30px; }
body.has-preview-banner .wa-float { bottom: 52px; }
@media (max-width: 600px) { body.has-preview-banner .wa-float { bottom: 64px; } }

/* ---------- Perfil del especialista ---------- */
.perfil-main { min-height: calc(100vh - var(--header-h) - 60px); padding-top: 32px; }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: .92rem; margin-bottom: 18px; color: var(--texto-suave); }
.breadcrumb a { font-weight: 700; text-decoration: none; }
.breadcrumb .icon { width: 16px; height: 16px; }
.perfil-card { display: grid; grid-template-columns: minmax(240px, 380px) 1fr; gap: clamp(24px, 4vw, 48px); padding: clamp(18px, 3vw, 32px); align-items: start; }
.perfil-media { border-radius: 22px; overflow: hidden; aspect-ratio: 1 / 1; background: linear-gradient(160deg, var(--verde-claro), #fff); box-shadow: var(--sombra-sm); }
.perfil-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.perfil-info h1 { font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.4rem); margin-bottom: 10px; }
.perfil-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.tag { display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--verde-claro); color: var(--verde); font-size: .85rem; font-weight: 700; }
.tag-strong { background: var(--turquesa); color: #fff; font-size: .95rem; padding: 6px 16px; }
.perfil-datos { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 16px; }
.perfil-datos li { display: flex; gap: 14px; }
.perfil-datos strong { display: block; }
.perfil-datos p { margin: 2px 0 0; color: var(--texto-suave); }
.perfil-actions { display: grid; gap: 12px; max-width: 420px; }
.perfil-note { margin-top: 14px; font-size: .88rem; color: var(--texto-suave); }
.skeleton-perfil { height: 380px; grid-column: 1 / -1; }
@media (max-width: 760px) { .perfil-card { grid-template-columns: 1fr; } .perfil-media { max-width: 340px; width: 100%; margin: 0 auto; } .perfil-info { text-align: center; } .perfil-tags { justify-content: center; } .perfil-datos { text-align: left; } .perfil-actions { margin: 0 auto; } }

/* ================= PANEL ADMINISTRATIVO ================= */
.admin-body { background: #F1F8F7; min-height: 100vh; }
.admin-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.admin-shell > div { min-width: 0; }
.admin-side { background: linear-gradient(180deg, var(--verde) 0%, var(--verde-osc) 100%); color: #DDF1EE; padding: 20px 14px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; }
.admin-side .side-logo { background: #fff; border-radius: 14px; padding: 8px 10px; margin-bottom: 18px; }
.admin-side .side-logo img { height: 52px; width: auto; margin: 0 auto; }
.side-link { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; color: #DDF1EE; text-decoration: none; font-weight: 700; background: none; border: 0; font-family: var(--fuente); font-size: 1rem; cursor: pointer; text-align: left; width: 100%; }
.side-link:hover { background: rgba(255,255,255,.10); color: #fff; }
.side-link.is-active { background: var(--turquesa); color: #fff; }
.side-spacer { flex: 1; }
.side-user { font-size: .82rem; padding: 8px 14px; color: #A9D9D3; word-break: break-all; }
.admin-main { padding: 28px clamp(16px, 3vw, 40px) 64px; min-width: 0; }
.admin-topbar { display: none; }
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: minmax(0, 1fr); }
  .admin-side { display: none; }
  .admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--borde); position: sticky; top: 0; z-index: 30; }
  .admin-topbar img { height: 44px; width: auto; }
}
.admin-auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(120% 100% at 0% 0%, #0A9D92 0%, var(--verde) 50%, var(--verde-osc) 100%); }
.auth-card { width: min(440px, 100%); padding: 32px; }
.auth-card .auth-logo { height: 64px; width: auto; margin: 0 auto 18px; }
.auth-card h1 { font-size: 1.5rem; text-align: center; }
.auth-back { text-align: center; margin-top: 14px; }
.admin-table th.th-right { text-align: right; }
#auth-msg { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); width: min(440px, calc(100% - 32px)); z-index: 5; }
.auth-card .section-sub { text-align: center; }
.form-grid { display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.field label, .field .label { display: block; font-weight: 700; margin-bottom: 6px; }
.field .opt { font-weight: 600; color: var(--texto-suave); font-size: .85rem; }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=search], .field textarea, .field select { width: 100%; min-height: 46px; border: 1.5px solid var(--borde); border-radius: 12px; padding: 10px 14px; font: 600 1rem var(--fuente); color: var(--texto); background: #fff; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--turquesa); outline: 3px solid rgba(7,143,134,.22); outline-offset: 0; }
.field .hint, .hint { font-size: .85rem; color: var(--texto-suave); margin: 4px 0 0; }
.field .error { font-size: .88rem; color: var(--peligro); font-weight: 700; margin: 6px 0 0; }
.field.has-error input, .field.has-error textarea, .field.has-error .chips-input { border-color: var(--peligro); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; margin-bottom: 8px; }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--verde); flex: none; }
.alert { padding: 12px 16px; border-radius: 12px; font-weight: 600; margin-bottom: 16px; }
.alert-error { background: var(--peligro-claro); color: var(--peligro); }
.alert-ok { background: #E3F6EC; color: #11613A; }
.alert-info { background: #fff; border: 1px solid var(--borde); color: var(--texto); }
.alert-warn { background: var(--aviso-claro); color: var(--aviso); }
.page-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.page-head h1 { margin: 0; font-size: 1.7rem; }
.page-head p { margin: 2px 0 0; color: var(--texto-suave); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat { background: #fff; border: 1px solid var(--borde); border-radius: 16px; padding: 16px 18px; box-shadow: var(--sombra-sm); display: flex; align-items: center; gap: 14px; }
.stat .ci-icon { width: 46px; height: 46px; }
.stat b { display: block; font: 800 1.5rem/1.1 var(--fuente-titulos); color: var(--texto); }
.stat span { font-size: .86rem; color: var(--texto-suave); }
@media (max-width: 1100px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .stat { padding: 12px; gap: 10px; } .stat .ci-icon { width: 38px; height: 38px; } .stat span { font-size: .8rem; } }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.segmented { display: inline-flex; background: #fff; border: 1px solid var(--borde); border-radius: 14px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.segmented button { border: 0; background: transparent; padding: 8px 14px; border-radius: 10px; font: 700 .9rem var(--fuente); color: var(--texto-suave); cursor: pointer; min-height: 38px; }
.segmented button[aria-pressed=true] { background: var(--verde); color: #fff; }
.admin-search { min-width: 220px; flex: 1; max-width: 340px; }
.table-card { background: #fff; border: 1px solid var(--borde); border-radius: var(--radio); box-shadow: var(--sombra-sm); overflow: hidden; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--texto-suave); background: #F7FCFB; padding: 12px 14px; border-bottom: 1px solid var(--borde); }
.admin-table td { padding: 12px 14px; border-bottom: 1px solid #EDF5F4; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tr.is-inactive td { background: #FAFAFA; }
.admin-table tr.is-inactive .t-name, .admin-table tr.is-inactive .mini-photo, .admin-table tr.is-inactive .mini-initials { opacity: .6; }
.t-name { font-weight: 800; }
.t-spec { font-size: .9rem; color: var(--texto-suave); }
.mini-photo, .mini-initials { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.mini-initials { display: grid; place-items: center; background: var(--verde-claro); color: var(--verde); font: 800 1rem var(--fuente-titulos); }
.order-btns { display: inline-flex; flex-direction: column; gap: 3px; }
.order-btns button { width: 30px; height: 24px; border: 1px solid var(--borde); background: #fff; border-radius: 7px; cursor: pointer; color: var(--verde); display: grid; place-items: center; }
.order-btns button .icon { width: 16px; height: 16px; }
.order-btns button[disabled] { opacity: .3; cursor: default; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 800; white-space: nowrap; }
.badge-on { background: #E3F6EC; color: #11613A; }
.badge-off { background: #EEF0F1; color: #4A5560; }
.badge-pub { background: var(--verde-claro); color: var(--verde); }
.badge-warn { background: var(--aviso-claro); color: var(--aviso); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.act-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--borde); background: #fff; color: var(--verde); cursor: pointer; display: grid; place-items: center; transition: background .15s; }
.act-btn:hover { background: var(--verde-claro); }
.act-btn.is-danger { color: var(--peligro); border-color: #f4cdc8; }
.act-btn.is-danger:hover { background: var(--peligro-claro); }
.act-btn.is-on { color: #11613A; border-color: #bfe6cf; }
.act-btn .icon { width: 19px; height: 19px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .84rem; color: var(--texto-suave); margin: 10px 2px 0; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .icon { width: 16px; height: 16px; color: var(--verde); }
@media (max-width: 760px) {
  .admin-table thead { display: none; }
  .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; width: 100%; }
  .admin-table tr { display: grid; grid-template-columns: auto 46px 1fr; gap: 6px 12px; padding: 14px; border-bottom: 1px solid var(--borde); align-items: center; }
  .admin-table td { padding: 0; border: 0; }
  .admin-table td.t-col-order { grid-row: span 2; }
  .admin-table td.t-col-photo { grid-row: span 2; }
  .admin-table td.t-col-status, .admin-table td.t-col-actions { grid-column: 1 / -1; }
  .row-actions { justify-content: flex-start; }
}
.editor { position: fixed; inset: 0; z-index: 80; display: none; }
.editor.is-open { display: block; }
.editor-backdrop { position: absolute; inset: 0; background: rgba(7, 40, 40, .55); }
.editor-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(620px, 100%); background: #fff; overflow-y: auto; padding: 24px; box-shadow: -10px 0 40px rgba(0,0,0,.2); }
.editor-panel header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.editor-panel h2 { font-size: 1.35rem; margin: 0; }
.editor-actions { position: sticky; bottom: -24px; background: #fff; padding: 16px 0; margin-bottom: -24px; display: flex; gap: 12px; justify-content: flex-end; border-top: 1px solid var(--borde); flex-wrap: wrap; }
.chips-input { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border: 1.5px solid var(--borde); border-radius: 12px; background: #fff; min-height: 46px; align-items: center; }
.chips-input input { border: 0 !important; outline: none !important; flex: 1 1 160px; min-height: 30px !important; padding: 4px 6px !important; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 12px; border-radius: 999px; background: var(--verde-claro); color: var(--verde); font-weight: 700; font-size: .9rem; }
.chip button { border: 0; background: transparent; color: var(--verde); cursor: pointer; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; }
.chip button:hover { background: var(--verde-claro-2); }
.photo-field { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.photo-field img, .photo-field .mini-initials { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; font-size: 1.5rem; }
.counter { float: right; font-size: .8rem; color: var(--texto-suave); font-weight: 600; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--texto); color: #fff; padding: 12px 20px; border-radius: 12px; z-index: 90; font-weight: 700; box-shadow: var(--sombra-hover); max-width: calc(100% - 32px); }
