/* ===========================================================
   CLÍNICA GÓMEZ PATIÑO — Sistema visual compartido
   Paleta: azul profundo, azul medio, celeste pálido, blanco
   Tipografía: Plus Jakarta Sans (display) + Inter (texto)
   Firma visual: línea de pulso (ECG) como motivo recurrente
   =========================================================== */

:root{
  --blue-deep:   #0E3A66;
  --blue-primary:#1B5FA8;
  --blue-mid:    #3B82C4;
  --blue-soft:   #7FB1DE;
  --blue-pale:   #EAF3FB;
  --blue-pale-2: #F5FAFE;
  --white:       #FFFFFF;
  --ink:         #0F2A43;
  --ink-soft:    #50677E;
  --line:        #DCE9F5;

  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Inter', sans-serif;

  --radius-lg: 24px;
  --radius-md: 14px;
  --radius-sm: 8px;

  --shadow-soft: 0 18px 40px -20px rgba(14,58,102,0.25);
  --shadow-card: 0 10px 30px -16px rgba(14,58,102,0.22);
}

*{ box-sizing:border-box; margin:0; padding:0; }

html{ scroll-behavior:smooth; }

body{
  font-family:var(--font-body);
  color:var(--ink);
  background:var(--white);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}

img{ max-width:100%; display:block; }
a{ text-decoration:none; color:inherit; }
ul{ list-style:none; }

h1,h2,h3,h4{
  font-family:var(--font-display);
  color:var(--blue-deep);
  line-height:1.15;
  letter-spacing:-0.01em;
}

.logo {
    display: flex;
    align-items: center;
    gap: 18px;
    text-decoration: none;
}

.logo-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 4px 14px -4px rgba(14,58,102,0.30);
    flex-shrink: 0;
}
@media (max-width:760px){
  .logo-img { width: 48px; height: 48px; }
}
.eyebrow{
  font-family:var(--font-display);
  font-weight:700;
  font-size:0.78rem;
  letter-spacing:0.14em;
  text-transform:uppercase;
  color:var(--blue-mid);
  display:flex;
  align-items:center;
  gap:10px;
}
.eyebrow::before{
  content:"";
  width:22px; height:2px;
  background:var(--blue-mid);
  display:inline-block;
}

.container{
  width:100%;
  max-width:1180px;
  margin:0 auto;
  padding:0 28px;
}

/* ---------- Pulso (firma visual) ---------- */
.pulse-divider{
  width:100%;
  height:46px;
  display:block;
}
.pulse-divider svg{ width:100%; height:100%; }
.pulse-divider path{
  fill:none;
  stroke:var(--blue-soft);
  stroke-width:2.5;
  stroke-linecap:round;
  stroke-linejoin:round;
}

/* ---------- Header / Nav ---------- */
header.site-header{
  position:sticky; top:0; z-index:100;
  background:rgba(255,255,255,0.92);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
.nav-wrap{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:16px 28px;
  max-width:1180px;
  margin:0 auto;
}
.logo{
  display:flex;
  align-items:center;
  gap:10px;
  font-family:var(--font-display);
  font-weight:800;
  font-size:1.18rem;
  color:var(--blue-deep);
}
.logo .mark{
  width:80px;height:80px;
  border-radius:11px;
  background:linear-gradient(145deg,var(--blue-primary),var(--blue-deep));
  display:flex;align-items:center;justify-content:center;
  flex-shrink:0;
}
.logo .mark svg{ width:20px; height:20px; }
.logo span small{
  display:block;
  font-family:var(--font-body);
  font-weight:500;
  font-size:0.66rem;
  letter-spacing:0.08em;
  text-transform:uppercase;
  color:var(--ink-soft);
}

nav.main-menu ul{
  display:flex;
  gap:6px;
  background:var(--blue-pale);
  padding:6px;
  border-radius:999px;
}
nav.main-menu a{
  font-family:var(--font-display);
  font-weight:600;
  font-size:0.88rem;
  color:var(--blue-deep);
  padding:10px 18px;
  border-radius:999px;
  transition:all .2s ease;
  display:inline-block;
}
nav.main-menu a:hover{ background:var(--white); box-shadow:var(--shadow-card); }
nav.main-menu a.active{ background:var(--blue-primary); color:var(--white); }

.btn-cta{
  font-family:var(--font-display);
  font-weight:700;
  font-size:0.86rem;
  color:var(--white);
  background:var(--blue-deep);
  padding:11px 22px;
  border-radius:999px;
  white-space:nowrap;
  transition:transform .2s ease, background .2s ease;
}
.btn-cta:hover{ background:var(--blue-primary); transform:translateY(-1px); }

.menu-toggle{ display:none; }

/* ---------- Hero ---------- */
.hero{
  position:relative;
  overflow:hidden;
  background:var(--white);
}
.hero-grid{
  display:grid;
  grid-template-columns:1.05fr 0.95fr;
  align-items:center;
  gap:50px;
  padding:72px 0 64px;
}
.hero h1{
  font-size:clamp(2.3rem,4vw,3.4rem);
  margin:18px 0 20px;
}
.hero h1 .accent{ color:var(--blue-mid); }
.hero p.lead{
  font-size:1.08rem;
  color:var(--ink-soft);
  max-width:480px;
  margin-bottom:30px;
}
.hero-actions{ display:flex; gap:14px; flex-wrap:wrap; }
.btn-primary{
  font-family:var(--font-display);
  font-weight:700;
  font-size:0.92rem;
  color:var(--white);
  background:var(--blue-primary);
  padding:15px 28px;
  border-radius:999px;
  box-shadow:var(--shadow-soft);
  transition:transform .2s ease, background .2s ease;
}
.btn-primary:hover{ background:var(--blue-deep); transform:translateY(-2px); }
.btn-outline{
  font-family:var(--font-display);
  font-weight:700;
  font-size:0.92rem;
  color:var(--blue-deep);
  background:var(--white);
  border:1.5px solid var(--blue-soft);
  padding:14px 26px;
  border-radius:999px;
  transition:all .2s ease;
}
.btn-outline:hover{ background:var(--blue-pale); }

.hero-visual{
  position:relative;
  border-radius:var(--radius-lg);
  overflow:hidden;
  box-shadow:var(--shadow-soft);
  aspect-ratio:4/4.6;
}
.hero-visual img{ width:100%; height:100%; object-fit:cover; }
.hero-visual::after{
  content:"";
  position:absolute; inset:0;
  background:linear-gradient(180deg,rgba(14,58,102,0) 55%,rgba(14,58,102,0.55) 100%);
}
.float-card{
  position:absolute;
  left:-24px; bottom:28px;
  background:var(--white);
  border-radius:var(--radius-md);
  padding:16px 20px;
  box-shadow:var(--shadow-card);
  z-index:5;
  display:flex; align-items:center; gap:12px;
  max-width:230px;
}
.float-card .dot{
  width:42px;height:42px;border-radius:50%;
  background:var(--blue-pale);
  display:flex;align-items:center;justify-content:center;
  flex-shrink:0;
}
.float-card .dot svg{ width:20px;height:20px; }
.float-card strong{ display:block; font-family:var(--font-display); font-size:1.05rem; color:var(--blue-deep);}
.float-card span{ font-size:0.78rem; color:var(--ink-soft); }

.stat-strip{
  display:flex;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  padding:30px 0;
}
.stat-strip .stat{
  flex:1;
  text-align:center;
  border-right:1px solid var(--line);
}
.stat-strip .stat:last-child{ border-right:none; }
.stat-strip .num{
  font-family:var(--font-display);
  font-weight:800;
  font-size:2rem;
  color:var(--blue-primary);
}
.ultimo-doctor{
    grid-column: 2 / 3;
}
.stat-strip .label{
  font-size:0.82rem;
  color:var(--ink-soft);
  margin-top:4px;
}

/* ---------- Sections ---------- */
section{ padding:84px 0; }
section.alt{ background:var(--blue-pale-2); }
.section-head{
  max-width:640px;
  margin-bottom:50px;
}
.section-head h2{
  font-size:clamp(1.8rem,3vw,2.4rem);
  margin-top:14px;
}
.section-head p{ color:var(--ink-soft); margin-top:14px; font-size:1.02rem; }
.section-head.center{ margin-left:auto; margin-right:auto; text-align:center; }
.section-head.center .eyebrow{ justify-content:center; }
.section-head.center .eyebrow::before{ display:none; }

/* cards grid */
.grid-3{ display:grid; grid-template-columns:repeat(3,1fr); gap:26px; }
.grid-2{ display:grid; grid-template-columns:repeat(2,1fr); gap:26px; }
.grid-4{ display:grid; grid-template-columns:repeat(4,1fr); gap:24px; }

.card{
  background:var(--white);
  border:1px solid var(--line);
  border-radius:var(--radius-md);
  padding:30px;
  transition:transform .25s ease, box-shadow .25s ease;
}
.card:hover{ transform:translateY(-5px); box-shadow:var(--shadow-card); }
.card .icon{
  width:50px;height:50px;border-radius:14px;
  background:var(--blue-pale);
  display:flex;align-items:center;justify-content:center;
  margin-bottom:18px;
}
.card .icon svg{ width:24px;height:24px; }
.card h3{ font-size:1.12rem; margin-bottom:10px; }
.card p{ color:var(--ink-soft); font-size:0.95rem; }

.img-card{
  border-radius:var(--radius-md);
  overflow:hidden;
  position:relative;
  box-shadow:var(--shadow-card);
}
.img-card img{ width:100%; height:280px; object-fit:cover; transition:transform .5s ease; }
.img-card:hover img{ transform:scale(1.05); }
.img-card .tag{
  position:absolute; top:16px; left:16px;
  background:rgba(255,255,255,0.92);
  font-family:var(--font-display); font-weight:700; font-size:0.76rem;
  color:var(--blue-deep);
  padding:7px 14px; border-radius:999px;
}

/* doctor / person cards */
.doc-card{
  background:var(--white);
  border-radius:var(--radius-md);
  overflow:hidden;
  border:1px solid var(--line);
  transition:transform .25s ease, box-shadow .25s ease;
}
.doc-card:hover{ transform:translateY(-5px); box-shadow:var(--shadow-card); }
.doc-card img{ width:100%; height:240px; object-fit:cover; }
.doc-body{ padding:22px; }
.doc-body h3{ font-size:1.08rem; margin-bottom:4px; }
.doc-body .spec{
  color:var(--blue-mid); font-weight:600; font-size:0.86rem; margin-bottom:10px;
  display:block;
}
.doc-body p{ font-size:0.88rem; color:var(--ink-soft); margin-bottom:14px; }
.doc-body .meta{ display:flex; gap:14px; font-size:0.78rem; color:var(--ink-soft); border-top:1px solid var(--line); padding-top:12px; }

/* Portada: tarjetas de médicos en estilo moderno y compacto
   (foto como avatar circular, menos protagonismo visual) */
.grid-4 .doc-card{
  text-align:center;
  padding:30px 22px 26px;
  border-radius:var(--radius-lg);
}
.grid-4 .doc-card img{
  width:150px; height:150px;
  border-radius:50%;
  object-fit:cover; object-position:top center;
  margin:0 auto 18px;
  border:3px solid var(--white);
  box-shadow:0 0 0 3px var(--blue-pale), 0 10px 22px -12px rgba(14,58,102,0.45);
  transition:transform .25s ease;
}
.grid-4 .doc-card:hover img{ transform:scale(1.05); }
.grid-4 .doc-body{ padding:0; }
.grid-4 .doc-body h3{ font-size:1.02rem; margin-bottom:10px; line-height:1.32; }
.grid-4 .doc-body .spec{
  display:inline-block; margin:0;
  color:var(--blue-primary); font-weight:600; font-size:0.78rem;
  background:var(--blue-pale);
  padding:5px 13px; border-radius:999px;
}

/* CTA band */
.cta-band{
  background:linear-gradient(135deg,var(--blue-deep),var(--blue-primary));
  border-radius:var(--radius-lg);
  padding:60px;
  color:var(--white);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:40px;
  position:relative;
  overflow:hidden;
}
.cta-band h2{ color:var(--white); font-size:clamp(1.6rem,3vw,2.1rem); max-width:480px; }
.cta-band p{ color:rgba(255,255,255,0.82); margin-top:10px; max-width:440px; }
.cta-band .btn-primary{ background:var(--white); color:var(--blue-deep); box-shadow:none; }
.cta-band .btn-primary:hover{ background:var(--blue-pale); }

/* logoARS */
.ars-badge{
    display: flex;
    align-items: center;
    justify-content: center;

}
.ars-logo{
    height: 50px;      /* Ajusta el tamaño */
    width: auto;
    object-fit: contain;
}

/* Forms */
.form-card{
  background:var(--white);
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  padding:40px;
  box-shadow:var(--shadow-card);
}
.form-row{ display:grid; grid-template-columns:1fr 1fr; gap:18px; margin-bottom:18px; }
.form-field{ display:flex; flex-direction:column; gap:8px; }
.form-field.full{ grid-column:1 / -1; }
.form-field label{
  font-family:var(--font-display); font-weight:600; font-size:0.84rem; color:var(--blue-deep);
}
.form-field input, .form-field select, .form-field textarea{
  border:1.5px solid var(--line);
  border-radius:var(--radius-sm);
  padding:13px 14px;
  font-family:var(--font-body);
  font-size:0.94rem;
  color:var(--ink);
  background:var(--blue-pale-2);
  outline:none;
  transition:border .2s ease, background .2s ease;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus{
  border-color:var(--blue-mid); background:var(--white);
}
.form-field textarea{ resize:vertical; min-height:120px; }

/* Contact info cards */
.info-card{
  display:flex; gap:16px; align-items:flex-start;
  padding:20px 0;
  border-bottom:1px solid var(--line);
}
.info-card:last-child{ border-bottom:none; }
.info-card .dot{
  width:44px;height:44px;border-radius:12px;
  background:var(--blue-pale);
  display:flex;align-items:center;justify-content:center;
  flex-shrink:0;
}
.info-card .dot svg{ width:20px;height:20px; }
.info-card h4{ font-size:0.98rem; margin-bottom:4px; }
.info-card p{ font-size:0.9rem; color:var(--ink-soft); }

/* Map */
.map-frame{
  border-radius:var(--radius-lg);
  overflow:hidden;
  border:1px solid var(--line);
  height:380px;
}
.map-frame iframe{ width:100%; height:100%; border:0; }

/* ---------- Novedades / Blog ---------- */
.filter-pills{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.filter-pill{
  font-family:var(--font-display);
  font-weight:700;
  font-size:0.86rem;
  color:var(--blue-deep);
  background:var(--blue-pale);
  border:none;
  padding:11px 20px;
  border-radius:999px;
  cursor:pointer;
  transition:all .2s ease;
}
.filter-pill:hover{ background:var(--blue-soft); color:var(--white); }
.filter-pill.active{ background:var(--blue-primary); color:var(--white); }

.article-tag{
  display:inline-block;
  font-family:var(--font-display);
  font-weight:700;
  font-size:0.72rem;
  letter-spacing:0.04em;
  text-transform:uppercase;
  color:var(--blue-primary);
  background:var(--blue-pale);
  padding:6px 12px;
  border-radius:999px;
}
.article-date{
  font-size:0.8rem;
  color:var(--ink-soft);
}

.featured-article{
  display:grid;
  grid-template-columns:1.1fr 1fr;
  gap:40px;
  align-items:center;
  background:var(--white);
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  padding:16px;
  box-shadow:var(--shadow-card);
  cursor:pointer;
  transition:transform .25s ease, box-shadow .25s ease;
}
.featured-article:hover{ transform:translateY(-4px); box-shadow:var(--shadow-soft); }
.featured-article .img-card img{ height:320px; }
.featured-article-body{ padding:14px 24px 14px 0; }
.featured-article-body h3{ font-size:1.5rem; margin:14px 0 12px; }
.featured-article-body p{ color:var(--ink-soft); font-size:0.98rem; margin-bottom:16px; }
.featured-article-body .meta-row{ display:flex; align-items:center; gap:14px; margin-bottom:14px; }

.article-card{
  background:var(--white);
  border:1px solid var(--line);
  border-radius:var(--radius-md);
  overflow:hidden;
  cursor:pointer;
  transition:transform .25s ease, box-shadow .25s ease;
  display:flex;
  flex-direction:column;
}
.article-card:hover{ transform:translateY(-5px); box-shadow:var(--shadow-card); }
.article-card:focus-visible{ outline:3px solid var(--blue-mid); outline-offset:3px; }
.article-card .article-img{ height:190px; overflow:hidden; }
.article-card .article-img img{ width:100%; height:100%; object-fit:cover; transition:transform .5s ease; }
.article-card:hover .article-img img{ transform:scale(1.06); }
.article-card-body{ padding:22px; display:flex; flex-direction:column; gap:10px; flex:1; }
.article-card-body h3{ font-size:1.08rem; line-height:1.3; }
.article-card-body p{ color:var(--ink-soft); font-size:0.9rem; }
.article-card-body .meta-row{ display:flex; align-items:center; justify-content:space-between; margin-top:auto; padding-top:8px; }

.modal-article-body{ padding:34px; color:var(--ink-soft); font-size:0.98rem; line-height:1.75; }
.modal-article-body p{ margin-bottom:16px; }
.modal-article-body .disclaimer{
  background:var(--blue-pale-2);
  border-left:3px solid var(--blue-mid);
  padding:14px 18px;
  border-radius:8px;
  font-size:0.88rem;
  color:var(--ink);
}

@media (max-width:900px){
  .featured-article{ grid-template-columns:1fr; }
  .featured-article-body{ padding:8px 8px 20px; }
}

/* ---------- Buscador del directorio médico ---------- */
.search-panel{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  align-items:center;
  background:var(--white);
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  padding:18px;
  box-shadow:var(--shadow-card);
}
.search-field{
  flex:1 1 240px;
  display:flex;
  align-items:center;
  gap:10px;
  background:var(--blue-pale-2);
  border:1.5px solid var(--line);
  border-radius:var(--radius-sm);
  padding:12px 16px;
  transition:border-color .2s ease, background .2s ease;
}
.search-field:focus-within{ border-color:var(--blue-mid); background:var(--white); }
.search-field svg{ width:18px; height:18px; flex-shrink:0; }
.search-field input, .search-field select{
  border:none;
  background:transparent;
  outline:none;
  font-family:var(--font-body);
  font-size:0.94rem;
  color:var(--ink);
  width:100%;
}
.search-field.select-field{ flex:0 1 300px; }
.search-field select{
  cursor:pointer;
  appearance:none;
  -webkit-appearance:none;
  padding-right:22px;
  background-image:url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2350677E' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right center;
  background-size:14px 14px;
  text-overflow:ellipsis;
}
.search-field select option{ color:var(--ink); background:var(--white); }

.results-count{
  margin-top:16px;
  font-size:0.88rem;
  color:var(--ink-soft);
  font-weight:500;
}

.no-results,
.select-prompt{
  text-align:center;
  max-width:420px;
  margin:20px auto 0;
  padding:50px 20px;
}
.no-results .icon,
.select-prompt .icon{ width:56px; height:56px; }
.no-results h3,
.select-prompt h3{ font-size:1.15rem; margin-bottom:8px; }
.no-results p,
.select-prompt p{ color:var(--ink-soft); font-size:0.94rem; }

@media (max-width:700px){
  .search-panel{ flex-direction:column; align-items:stretch; }
  .search-field, .search-field.select-field{ flex:1 1 auto; }
}

/* ---------- Directorio ---------- */
.directory-layout{
  display:block;
}
.directory-main{ width:100%; }

/* ---------- Doctor cards: clickable state ---------- */
.doc-card{ cursor:pointer; position:relative; }
.view-hint{
  display:flex; align-items:center; gap:6px;
  font-family:var(--font-display); font-weight:700; font-size:0.78rem;
  color:var(--blue-primary);
  margin-top:12px;
}
.view-hint svg{ width:13px; height:13px; flex-shrink:0; transition:transform .2s ease; }
.doc-card:hover .view-hint svg{ transform:translateX(3px); }
.dept-card:hover .view-hint svg{ transform:translateX(3px); }
.doc-card:focus-visible{ outline:3px solid var(--blue-mid); outline-offset:3px; }

/* Tarjetas de departamento (Servicios) clicables */
.dept-card{ cursor:pointer; }
.dept-card:focus-visible{ outline:3px solid var(--blue-mid); outline-offset:3px; }

/* ---------- Doctor modal ---------- */
.modal-overlay{
  position:fixed; inset:0;
  background:rgba(14,58,102,0.55);
  backdrop-filter:blur(3px);
  display:none;
  align-items:center; justify-content:center;
  padding:24px;
  z-index:1000;
}
.modal-overlay.open{ display:flex; }
.modal-card{
  background:var(--white);
  border-radius:var(--radius-lg);
  max-width:720px;
  width:100%;
  max-height:88vh;
  overflow-y:auto;
  box-shadow:var(--shadow-soft);
  position:relative;
  animation:modalIn .25s ease;
}
@keyframes modalIn{
  from{ opacity:0; transform:translateY(14px) scale(.98); }
  to{ opacity:1; transform:translateY(0) scale(1); }
}
.modal-close{
  position:absolute; top:18px; right:18px;
  width:38px; height:38px; border-radius:50%;
  background:rgba(255,255,255,0.9);
  border:none; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  z-index:5;
  transition:background .2s ease;
}
.modal-close:hover{ background:var(--white); }
.modal-close svg{ width:18px; height:18px; }
.modal-photo{ width:100%; height:230px; object-fit:cover; }
.modal-body{ padding:32px 34px 34px; }
.modal-body .spec{
  color:var(--blue-mid); font-weight:700; font-size:0.9rem; display:block; margin-bottom:6px;
}
.modal-body h2{ font-size:1.5rem; margin-bottom:4px; }
.modal-body .bio{ color:var(--ink-soft); font-size:0.96rem; margin:16px 0 24px; }
.modal-grid{
  display:grid; grid-template-columns:1fr 1fr; gap:16px;
  margin-bottom:24px;
}
.modal-info{
  background:var(--blue-pale-2);
  border:1px solid var(--line);
  border-radius:var(--radius-md);
  padding:18px;
  display:flex; gap:12px; align-items:flex-start;
}
.modal-info .dot{
  width:38px;height:38px;border-radius:10px;
  background:var(--blue-pale);
  display:flex;align-items:center;justify-content:center;
  flex-shrink:0;
}
.modal-info .dot svg{ width:18px;height:18px; }
.modal-info h4{ font-family:var(--font-display); font-size:0.86rem; color:var(--blue-deep); margin-bottom:3px; }
.modal-info p{ font-size:0.86rem; color:var(--ink-soft); line-height:1.5; }
.modal-actions{ display:flex; gap:12px; flex-wrap:wrap; }

@media (max-width:600px){
  .modal-grid{ grid-template-columns:1fr; }
  .modal-body{ padding:26px 22px 28px; }
}

/* ===========================================================
   SERVICIOS · Modal de departamento — presentación moderna
   Scoped a #deptModal para no afectar otros modales del sitio.
   =========================================================== */
#deptModal .modal-card{ max-width:760px; }

/* Cabecera tipo hero: foto con título superpuesto */
#deptModal .modal-hero{
  position:relative;
  height:230px;
  background:linear-gradient(135deg, var(--blue-primary), var(--blue-deep));
  overflow:hidden;
}
#deptModal .modal-photo{
  position:absolute; inset:0;
  width:100%; height:100%;
  object-fit:cover; object-position:center;
}
#deptModal .modal-hero::after{
  content:""; position:absolute; inset:0;
  background:linear-gradient(180deg, rgba(14,58,102,0) 34%, rgba(14,58,102,0.55) 68%, rgba(14,58,102,0.9) 100%);
}
#deptModal .modal-hero-overlay{
  position:absolute; left:0; right:0; bottom:0; z-index:2;
  padding:24px 34px;
  display:flex; flex-direction:column; align-items:flex-start; gap:11px;
}
#deptModal .modal-tag{
  display:inline-block;
  background:rgba(255,255,255,0.94);
  color:var(--blue-deep);
  font-family:var(--font-display); font-weight:700;
  font-size:0.68rem; letter-spacing:0.05em; text-transform:uppercase;
  padding:5px 13px; border-radius:999px;
}
#deptModal .modal-hero-overlay h2{
  color:#fff; font-size:clamp(1.4rem,3.2vw,1.75rem);
  line-height:1.2; margin:0; letter-spacing:-0.01em;
  text-shadow:0 2px 14px rgba(0,0,0,0.28);
}

/* Cuerpo con mejor legibilidad */
#deptModal .modal-body{ padding:28px 34px 32px; }
#deptModal .modal-body .bio{
  color:var(--ink); font-size:1.02rem; line-height:1.72;
  margin:0 0 26px;
}

/* Tarjetas de datos clave */
#deptModal .modal-grid{ gap:14px; margin-bottom:28px; }
#deptModal .modal-info{
  background:var(--blue-pale-2);
  border:1px solid var(--line);
  border-radius:var(--radius-md);
  padding:16px 18px; gap:14px;
  transition:border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
#deptModal .modal-info:hover{
  border-color:var(--blue-soft);
  background:var(--white);
  box-shadow:0 10px 24px -18px rgba(14,58,102,0.5);
}
#deptModal .modal-info .dot{
  width:40px; height:40px; border-radius:11px;
  background:var(--white);
  box-shadow:0 5px 14px -8px rgba(14,58,102,0.5);
}
#deptModal .modal-info h4{
  font-family:var(--font-body);
  font-size:0.68rem; font-weight:700; letter-spacing:0.06em;
  text-transform:uppercase; color:var(--blue-mid);
  margin-bottom:5px;
}
#deptModal .modal-info p{
  font-size:0.92rem; color:var(--ink); font-weight:500; line-height:1.45;
}

/* Servicios incluidos: lista en dos columnas con check */
#deptModal .modal-services{ margin-bottom:28px; }
#deptModal .modal-services h4{
  font-family:var(--font-body); font-size:0.68rem; font-weight:700;
  letter-spacing:0.06em; text-transform:uppercase; color:var(--blue-mid);
  margin-bottom:14px;
}
#deptModal .modal-services ul{
  display:grid; grid-template-columns:1fr 1fr; gap:11px 24px;
  margin:0; padding:0;
}
#deptModal .modal-services li{
  display:flex; align-items:flex-start; gap:11px;
  font-size:0.93rem; color:var(--ink); line-height:1.4;
}
#deptModal .modal-services li::before{
  content:""; flex-shrink:0; width:20px; height:20px; margin-top:1px;
  border-radius:50%;
  background:var(--blue-pale) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B5FA8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/12px no-repeat;
}

/* Acciones */
#deptModal .modal-actions{ gap:12px; padding-top:4px; }

@media (max-width:600px){
  #deptModal .modal-hero-overlay{ padding:20px 22px; }
  #deptModal .modal-body{ padding:24px 22px 26px; }
  #deptModal .modal-services ul{ grid-template-columns:1fr; }
}

/* ---------- Animaciones / vida en la página ---------- */
@keyframes fadeUp{
  from{ opacity:0; transform:translateY(26px); }
  to{ opacity:1; transform:translateY(0); }
}
@keyframes floatY{
  0%,100%{ transform:translateY(0); }
  50%{ transform:translateY(-10px); }
}
@keyframes kenburns{
  0%{ transform:scale(1.02) translate(0,0); }
  100%{ transform:scale(1.13) translate(-1.5%,-1.5%); }
}
@keyframes blobMove{
  0%,100%{ transform:translate(0,0) scale(1); }
  33%{ transform:translate(24px,-28px) scale(1.12); }
  66%{ transform:translate(-18px,18px) scale(0.94); }
}
@keyframes livePulse{
  0%{ box-shadow:0 0 0 0 rgba(59,130,196,0.55); }
  70%{ box-shadow:0 0 0 10px rgba(59,130,196,0); }
  100%{ box-shadow:0 0 0 0 rgba(59,130,196,0); }
}
@keyframes dashFlow{
  to{ stroke-dashoffset:-1000; }
}

.hero{ position:relative; }
.hero-blob{
  position:absolute;
  border-radius:50%;
  filter:blur(64px);
  opacity:0.4;
  z-index:0;
  pointer-events:none;
  animation:blobMove 13s ease-in-out infinite;
}
.hero-blob.b1{ width:300px; height:300px; background:var(--blue-mid); top:-70px; right:0px; }
.hero-blob.b2{ width:220px; height:220px; background:var(--blue-soft); bottom:-50px; left:20px; animation-delay:-5s; }
.hero-grid{ position:relative; z-index:1; }

.hero .eyebrow{ animation:fadeUp .7s ease both; }
.hero h1{ animation:fadeUp .7s ease .12s both; }
.hero p.lead{ animation:fadeUp .7s ease .22s both; }
.hero-actions{ animation:fadeUp .7s ease .32s both; }
.hero-visual{ animation:fadeUp .9s ease .18s both; overflow:hidden; }
.hero-visual img{ animation:kenburns 16s ease-in-out infinite alternate; }

/* Movimiento sutil y continuo en imágenes fuera del hero */
.img-live{ overflow:hidden; }
.img-live img{ animation:kenburns 22s ease-in-out infinite alternate; }

.live-badge{
  position:absolute; top:18px; left:18px; z-index:6;
  display:flex; align-items:center; gap:8px;
  background:rgba(14,58,102,0.55);
  backdrop-filter:blur(6px);
  color:var(--white);
  font-family:var(--font-display); font-weight:700; font-size:0.76rem;
  padding:8px 14px; border-radius:999px;
}
.live-badge .live-dot{
  width:8px; height:8px; border-radius:50%;
  background:#7FE0C9;
  animation:livePulse 1.8s ease-out infinite;
}

.float-card{ animation:floatY 4.5s ease-in-out infinite; }

/* Reveal-on-scroll */
.reveal{
  opacity:0;
  transform:translateY(30px);
  transition:opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1);
}
.reveal.in{ opacity:1; transform:translateY(0); }
.reveal-d1{ transition-delay:.06s; }
.reveal-d2{ transition-delay:.14s; }
.reveal-d3{ transition-delay:.22s; }
.reveal-d4{ transition-delay:.30s; }

@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration:0.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:0.01ms !important;
    scroll-behavior:auto !important;
  }
  .reveal{ opacity:1; transform:none; }
}

/* ---------- ARS / Seguros afiliados ---------- */
.ars-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:16px;
}
.ars-badge{
  background:var(--white);
  border:1px solid var(--line);
  border-radius:var(--radius-md);
  padding:22px 16px;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap:12px;
  transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.ars-badge:hover{
  transform:translateY(-4px);
  box-shadow:var(--shadow-card);
  border-color:var(--blue-soft);
}
.ars-badge .logo-mark{
  width:56px; height:56px;
  border-radius:16px;
  display:flex; align-items:center; justify-content:center;
  font-family:var(--font-display);
  font-weight:800;
  font-size:1rem;
  letter-spacing:0.02em;
  color:var(--white);
  flex-shrink:0;
}
.ars-badge span.name{
  font-family:var(--font-display);
  font-weight:700;
  font-size:0.86rem;
  color:var(--blue-deep);
  line-height:1.25;
}
.ars-note{
  margin-top:36px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  flex-wrap:wrap;
  background:var(--blue-pale);
  border-radius:var(--radius-md);
  padding:22px 28px;
}
.ars-note p{ color:var(--ink); font-size:0.94rem; max-width:560px; }
.ars-note p strong{ color:var(--blue-deep); }

@media (max-width:980px){
  .ars-grid{ grid-template-columns:repeat(3,1fr); }
}
@media (max-width:600px){
  .ars-grid{ grid-template-columns:repeat(2,1fr); }
  .ars-note{ flex-direction:column; align-items:flex-start; text-align:left; }
}

/* Breadcrumb / page header (subpages) */
.page-header{
  background:var(--blue-pale-2);
  padding:54px 0 50px;
  border-bottom:1px solid var(--line);
}
.page-header .crumb{ font-size:0.85rem; color:var(--ink-soft); margin-bottom:14px; }
.page-header .crumb a{ color:var(--blue-mid); font-weight:600; }
.page-header h1{ font-size:clamp(2rem,3.4vw,2.7rem); }
.page-header p{ color:var(--ink-soft); margin-top:14px; max-width:560px; font-size:1.02rem; }

/* Variante del page-header con imagen de fondo (usada en Contacto) */
.page-header--media{
  position:relative;
  overflow:hidden;
  border-bottom:none;
  background:var(--blue-deep);
  padding:92px 0 82px;
}
.page-header--media .container{ position:relative; z-index:2; }
.page-header-bg{
  position:absolute; inset:0; z-index:0;
  width:100%; height:100%;
  object-fit:cover; object-position:center;
  animation:kenburns 22s ease-in-out infinite alternate;
}
.page-header-overlay{
  position:absolute; inset:0; z-index:1;
  background:
    linear-gradient(100deg,
      rgba(14,58,102,0.94) 0%,
      rgba(14,58,102,0.80) 34%,
      rgba(14,58,102,0.46) 62%,
      rgba(14,58,102,0.20) 100%),
    linear-gradient(180deg,
      rgba(14,58,102,0.55) 0%,
      rgba(14,58,102,0) 26%,
      rgba(14,58,102,0) 52%,
      rgba(14,58,102,0.66) 100%);
}
.page-header--media .hero-pulse{ z-index:1; }
.page-header--media .crumb,
.page-header--media .crumb a{ color:#cfe4f7; }
.page-header--media .eyebrow{ color:#fff; }
.page-header--media .eyebrow::before{ display:none; }
.page-header--media h1{ color:#fff; }
.page-header--media p{ color:rgba(255,255,255,0.92); }

/* Footer */
footer{
  background:var(--blue-deep);
  color:rgba(255,255,255,0.8);
  padding:64px 0 28px;
}
.footer-grid{
  display:grid;
  grid-template-columns:1.4fr 1fr 1fr 1.1fr;
  gap:40px;
  margin-bottom:44px;
}
.footer-logo{
  display:flex; align-items:center; gap:10px;
  font-family:var(--font-display); font-weight:800; font-size:1.1rem; color:var(--white);
  margin-bottom:14px;
}
.footer-logo .mark{
  width:36px;height:36px;border-radius:10px;
  background:rgba(255,255,255,0.12);
  display:flex;align-items:center;justify-content:center;
}
.footer-logo .mark svg{ width:18px;height:18px; }
footer p.about{ font-size:0.9rem; line-height:1.5; max-width:300px; }
footer h5{
  font-family:var(--font-display); color:var(--white); font-size:0.86rem;
  letter-spacing:0.02em; text-transform:uppercase; margin-bottom:18px;
}
footer ul li{ margin-bottom:11px; font-size:0.9rem; line-height:1.0; }
footer ul li a:hover{ color:var(--white); }
.footer-bottom{
  border-top:1px solid rgba(255,255,255,0.14);
  padding-top:24px;
  display:flex; justify-content:space-between; align-items:center;
  font-size:0.82rem;
  flex-wrap:wrap; gap:10px;
}
.social-row{ display:flex; gap:10px; }
.social-row a{
  width:36px;height:36px;border-radius:50%;
  background:rgba(255,255,255,0.1);
  display:flex;align-items:center;justify-content:center;
  transition:background .2s ease;
}
.social-row a:hover{ background:rgba(255,255,255,0.22); }
.social-row svg{ width:16px;height:16px; }

/* ---------- Responsive ---------- */
@media (max-width:980px){
  .hero-grid{ grid-template-columns:1fr; }
  .hero-visual{ order:-1; aspect-ratio:16/10; }
  .grid-3, .grid-4{ grid-template-columns:repeat(2,1fr); }
  .footer-grid{ grid-template-columns:1fr 1fr; }
  .cta-band{ flex-direction:column; text-align:center; }
  .cta-band .btn-primary{ margin:0 auto; }
}
@media (max-width:760px){
  nav.main-menu{ display:none; }
  .menu-toggle{ display:flex; align-items:center; gap:8px; font-family:var(--font-display); font-weight:700; font-size:0.85rem; color:var(--blue-deep); }
  .grid-3, .grid-4, .grid-2{ grid-template-columns:1fr; }
  .form-row{ grid-template-columns:1fr; }
  .stat-strip{ flex-wrap:wrap; }
  .stat-strip .stat{ flex:1 1 50%; border-right:none; border-bottom:1px solid var(--line); padding-bottom:16px; margin-bottom:16px; }
  .cta-band{ padding:40px 26px; }
  .footer-bottom{ flex-direction:column; align-items:flex-start; }
}


/* ===========================================================
   HERO A PANTALLA COMPLETA + NAV SUPERPUESTO
   La transparencia del header se limita a páginas CON hero
   (body:has(.hero)) para no afectar las subpáginas, que
   conservan su header sólido original.
   =========================================================== */

/* --- Header transparente SOLO en la home (con hero) --- */
body:has(.hero) header.site-header{
  position:fixed; top:0; left:0; right:0;
  background:transparent;
  backdrop-filter:none;
  border-bottom:1px solid transparent;
  transition:background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
}
body:has(.hero) header.site-header.scrolled{
  background:rgba(255,255,255,0.92);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}

/* Estado transparente (arriba del todo, sobre la imagen) */
body:has(.hero) .site-header:not(.scrolled):not(.menu-open) .logo{ color:#fff; }
body:has(.hero) .site-header:not(.scrolled):not(.menu-open) .logo span small{ color:rgba(255,255,255,0.78); }
body:has(.hero) .site-header:not(.scrolled):not(.menu-open) nav.main-menu ul{
  background:rgba(255,255,255,0.14);
  border:1px solid rgba(255,255,255,0.18);
}
body:has(.hero) .site-header:not(.scrolled):not(.menu-open) nav.main-menu a{ color:#fff; }
body:has(.hero) .site-header:not(.scrolled):not(.menu-open) nav.main-menu a:hover{
  background:rgba(255,255,255,0.22); box-shadow:none;
}
body:has(.hero) .site-header:not(.scrolled):not(.menu-open) .btn-cta{ background:#fff; color:var(--blue-deep); }
body:has(.hero) .site-header:not(.scrolled):not(.menu-open) .btn-cta:hover{ background:var(--blue-pale); }
body:has(.hero) .site-header:not(.scrolled):not(.menu-open) .menu-toggle{ color:#fff; }

/* Botón de menú (móvil) */
.menu-toggle{
  background:none; border:none; cursor:pointer;
  color:var(--blue-deep);
  align-items:center; gap:8px;
  font-family:var(--font-display); font-weight:700; font-size:0.85rem;
}
.menu-toggle svg{ width:22px; height:22px; }

/* --- Hero (altura reducida, ya no ocupa toda la pantalla) --- */
.hero{
  position:relative;
  min-height:clamp(430px, 60vh, 620px);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  padding:120px 0 78px;
  background:var(--blue-deep);
}
.hero-media{ position:absolute; inset:0; z-index:0; }
.hero-bg{
  width:100%; height:100%;
  object-fit:cover; object-position:center;
  animation:kenburns 22s ease-in-out infinite alternate;
}
.hero-overlay{
  position:absolute; inset:0;
  background:
    linear-gradient(100deg,
      rgba(14,58,102,0.94) 0%,
      rgba(14,58,102,0.80) 34%,
      rgba(14,58,102,0.46) 62%,
      rgba(14,58,102,0.18) 100%),
    linear-gradient(180deg,
      rgba(14,58,102,0.55) 0%,
      rgba(14,58,102,0) 24%,
      rgba(14,58,102,0) 50%,
      rgba(14,58,102,0.62) 100%);
}
/* Línea de pulso (firma visual) al pie del hero */
.hero-pulse{
  position:absolute; left:0; right:0; bottom:0;
  height:70px; z-index:1; opacity:0.45; pointer-events:none;
}
.hero-pulse svg{ width:100%; height:100%; display:block; }
.hero-pulse path{
  fill:none; stroke:var(--blue-soft); stroke-width:2.5;
  stroke-linecap:round; stroke-linejoin:round;
  filter:drop-shadow(0 0 8px rgba(127,177,222,0.55));
}

/* Contenido del hero */
.hero-inner{
  position:relative; z-index:2;
  flex:1; display:flex; align-items:center;
}
.hero-copy{ max-width:600px; }

.hero .eyebrow{ color:#fff; }
.hero .eyebrow::before{ display:none; }
.hero .eyebrow .live-dot{
  width:9px; height:9px; border-radius:50%;
  background:#7FE0C9; display:inline-block; flex-shrink:0;
  animation:livePulse 1.8s ease-out infinite;
}
.hero h1{ color:#fff; }
.hero h1 .accent{ color:#9FD1F6; }
.hero p.lead{ color:rgba(255,255,255,0.9); max-width:560px; }

.hero .btn-outline{
  background:rgba(255,255,255,0.10);
  border-color:rgba(255,255,255,0.55);
  color:#fff;
  backdrop-filter:blur(4px);
}
.hero .btn-outline:hover{ background:rgba(255,255,255,0.20); }
.hero .btn-primary{ box-shadow:0 18px 40px -18px rgba(0,0,0,0.55); }

/* Tarjeta flotante de confianza, sobre la imagen */
.hero .float-card{
  position:absolute;
  left:auto; bottom:auto;
  right:clamp(24px, 7vw, 170px);
  top:33%;
  z-index:3;
}

/* Franja de estadísticas: tarjeta blanca que se superpone al hero */
.stat-wrap{
  position:relative; z-index:6;
  margin-top:-52px; margin-bottom:6px;
}
.stat-wrap .stat-strip{
  border:1px solid var(--line);
  border-radius:var(--radius-md);
  background:var(--white);
  box-shadow:var(--shadow-soft);
  padding:26px 10px;
}

/* Anclas internas: no quedar bajo el header fijo */
body:has(.hero) section{ scroll-margin-top:84px; }

/* --- Responsive del hero --- */
@media (max-width:1100px){
  .hero .float-card{ display:none; }
}
@media (max-width:760px){
  .hero{ padding:100px 0 66px; }
  .hero-copy{ max-width:100%; }
  .hero h1{ font-size:clamp(2rem,7vw,2.6rem); }
  .stat-wrap{ margin-top:-40px; }

  /* Menú móvil desplegable (solo en la home con hero) */
  body:has(.hero) nav.main-menu{
    display:block;
    position:absolute; top:100%; left:0; right:0;
    background:rgba(255,255,255,0.98);
    backdrop-filter:blur(12px);
    border-bottom:1px solid var(--line);
    padding:14px 20px 18px;
    transform:translateY(-8px);
    opacity:0; visibility:hidden;
    transition:opacity .2s ease, transform .2s ease, visibility .2s;
    box-shadow:var(--shadow-soft);
  }
  body:has(.hero) .site-header.menu-open nav.main-menu{ opacity:1; visibility:visible; transform:translateY(0); }
  body:has(.hero) nav.main-menu ul{ flex-direction:column; background:transparent; padding:0; gap:6px; border:none; }
  body:has(.hero) nav.main-menu a{ color:var(--blue-deep); display:block; }

  /* Al abrir el menú, el header se vuelve sólido para legibilidad */
  body:has(.hero) .site-header.menu-open{
    background:rgba(255,255,255,0.98);
    backdrop-filter:blur(12px);
    border-bottom-color:var(--line);
  }
  body:has(.hero) .site-header.menu-open .logo{ color:var(--blue-deep); }
  body:has(.hero) .site-header.menu-open .logo span small{ color:var(--ink-soft); }
  body:has(.hero) .site-header.menu-open .menu-toggle{ color:var(--blue-deep); }
  body:has(.hero) .site-header.menu-open .btn-cta{ background:var(--blue-deep); color:#fff; }
}


/* ===========================================================
   NAV AZUL REFLEJANTE + IMAGEN DE EQUIPO MÉDICO
   Solo afecta headers con la clase .site-header--team.
   =========================================================== */
header.site-header.site-header--team{
  position:sticky; top:0; z-index:100;
  background:linear-gradient(135deg,#0E3A66 0%, #1B5FA8 48%, #3B82C4 100%);
  border-bottom:1px solid rgba(255,255,255,0.14);
  box-shadow:0 12px 34px -18px rgba(14,58,102,0.65);
  overflow:hidden;
}
.site-header--team::before{
  content:"";
  position:absolute; left:0; right:0; top:0; height:60%;
  background:linear-gradient(180deg,rgba(255,255,255,0.20) 0%, rgba(255,255,255,0) 100%);
  pointer-events:none;
}
.site-header--team .nav-wrap{ position:relative; z-index:1; }
.site-header--team .logo{ color:#fff; }
.site-header--team .logo span small{ color:rgba(255,255,255,0.82); }
.site-header--team nav.main-menu ul{
  background:rgba(255,255,255,0.14);
  border:1px solid rgba(255,255,255,0.22);
}
.site-header--team nav.main-menu a{ color:#fff; }
.site-header--team nav.main-menu a:hover{ background:rgba(255,255,255,0.22); box-shadow:none; }
.site-header--team nav.main-menu a.active{ background:#fff; color:var(--blue-deep); }
.site-header--team .btn-cta{ background:#fff; color:var(--blue-deep); }
.site-header--team .btn-cta:hover{ background:var(--blue-pale); transform:translateY(-1px); }

.nav-team{ display:flex; align-items:center; gap:16px; }
.nav-team-media{
  display:block;
  width:132px; height:52px;
  border-radius:999px;
  overflow:hidden;
  border:2px solid rgba(255,255,255,0.55);
  box-shadow:0 8px 20px -10px rgba(0,0,0,0.55), inset 0 0 0 1px rgba(255,255,255,0.15);
  flex-shrink:0;
  background:#0E3A66;
}
.nav-team-media img{ width:100%; height:100%; object-fit:cover; display:block; }
@media (max-width:1024px){ .nav-team-media{ display:none; } }


/* ===========================================================
   NOSOTROS · Consejo Directivo — tarjetas modernas con avatar
   Scoped a .board para no afectar el Directorio Médico.
   =========================================================== */
.board{ gap:22px; }
.board .doc-card{
  cursor:default;
  text-align:center;
  padding:20px 16px 22px;
  border-radius:var(--radius-md);
  border:1px solid var(--line);
  background:var(--white);
  box-shadow:0 14px 34px -26px rgba(14,58,102,0.5);
  transition:transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.board .doc-card:hover{
  transform:translateY(-6px);
  box-shadow:var(--shadow-soft);
  border-color:var(--blue-soft);
}
.board .doc-card img{
  width:148px; height:148px;
  border-radius:50%;
  object-fit:cover; object-position:top center;
  margin:0 auto 14px;
  border:4px solid var(--white);
  box-shadow:0 0 0 3px var(--blue-pale), 0 12px 24px -12px rgba(14,58,102,0.5);
  transition:transform .3s ease;
}
.board .doc-card:hover img{ transform:scale(1.05); }
.board .doc-body{ padding:0; }
.board .doc-body h3{ font-size:1rem; margin-bottom:9px; line-height:1.28; }
.board .doc-body .spec{
  display:inline-block; margin:0 0 12px;
  color:var(--blue-primary); font-weight:700; font-size:0.72rem;
  letter-spacing:0.02em;
  background:var(--blue-pale);
  padding:5px 12px; border-radius:999px;
}
.board .doc-card.is-president .spec{
  background:linear-gradient(135deg,var(--blue-primary),var(--blue-deep));
  color:#fff;
}
.board .doc-body p{
  font-size:0.82rem; color:var(--ink-soft); line-height:1.55;
  margin:0; padding-top:11px; border-top:1px solid var(--line);
}

/* ===========================================================
   CONSEJO DIRECTIVO — tarjetas ejecutivas
   Se aplican solo dentro de <section class="council"> para no
   afectar las tarjetas del Directorio Médico.
   =========================================================== */
.council .grid-3{ gap:28px; }

.council .doc-card{
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  background:var(--white);
  overflow:hidden;
  box-shadow:0 14px 34px -26px rgba(14,58,102,0.5);
  transition:transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.council .doc-card:hover{
  transform:translateY(-6px);
  box-shadow:var(--shadow-soft);
  border-color:var(--blue-soft);
}

/* Marco de foto uniforme, encuadrado al rostro */
.council .doc-photo{
  position:relative;
  height:310px;
  background:linear-gradient(155deg,#e8f1fb 0%, #d3e3f4 100%);
  overflow:hidden;
}
.council .doc-photo img{
  width:100%; height:100%;
  object-fit:cover; object-position:top center;
  transition:transform .6s ease;
}
.council .doc-card:hover .doc-photo img{ transform:scale(1.045); }
.council .doc-photo::after{
  content:""; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(180deg, rgba(14,58,102,0) 52%, rgba(14,58,102,0.6) 100%);
}

/* Badge del cargo sobre la foto */
.council .role-badge{
  position:absolute; left:16px; bottom:14px; z-index:2;
  display:inline-flex; align-items:center; gap:7px;
  background:rgba(255,255,255,0.96);
  color:var(--blue-deep);
  font-family:var(--font-display); font-weight:700; font-size:0.75rem;
  letter-spacing:0.01em;
  padding:7px 14px; border-radius:999px;
  box-shadow:0 8px 18px -8px rgba(14,58,102,0.55);
}
.council .role-badge::before{
  content:""; width:7px; height:7px; border-radius:50%;
  background:var(--blue-mid); flex-shrink:0;
}
/* Presidente destacado */
.council .doc-card.is-president .role-badge{
  background:linear-gradient(135deg,var(--blue-primary),var(--blue-deep));
  color:#fff;
}
.council .doc-card.is-president .role-badge::before{ background:#7FE0C9; }

.council .doc-body{ padding:20px 22px 24px; }
.council .doc-body h3{
  font-size:1.14rem; color:var(--blue-deep); margin-bottom:0; line-height:1.28;
}
.council .doc-body p{
  font-size:0.9rem; color:var(--ink-soft); line-height:1.62;
  margin:12px 0 0; padding-top:14px; border-top:1px solid var(--line);
}

@media (max-width:760px){
  .council .doc-photo{ height:360px; }
}

/* ===========================================================
   DIRECTORIO MÉDICO · tarjetas compactas (2 por fila, foto circular)
   Scoped a #doctorsGrid para no afectar otras tarjetas.
   =========================================================== */
#doctorsGrid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:18px;
}
#doctorsGrid .doc-card{
  display:flex; flex-direction:row; align-items:center;
  gap:20px;
  padding:24px 28px;
  border-radius:var(--radius-md);
  border:1px solid var(--line);
  background:var(--white);
  box-shadow:0 10px 26px -22px rgba(14,58,102,0.5);
}
#doctorsGrid .doc-card:hover{
  transform:translateY(-4px);
  box-shadow:var(--shadow-card);
  border-color:var(--blue-soft);
}
#doctorsGrid .doc-photo{
  width:98px; height:98px; flex-shrink:0;
  border-radius:50%;
  overflow:hidden;
  background:linear-gradient(155deg,#e8f1fb,#d3e3f4);
  box-shadow:0 0 0 3px var(--blue-pale);
}
#doctorsGrid .doc-card img{
  width:100%; height:100%;
  object-fit:cover; object-position:top center;
  transition:transform .5s ease;
}
#doctorsGrid .doc-card:hover img{ transform:scale(1.06); }
#doctorsGrid .doc-body{
  display:flex; flex-direction:column; justify-content:center;
  flex:1; min-width:0; padding:0; gap:11px;
}
#doctorsGrid .doc-body h3{ font-size:1.12rem; line-height:1.25; margin:0; }
#doctorsGrid .doc-body .spec{
  display:inline-flex; align-items:center; gap:7px;
  align-self:flex-start; margin:0;
  color:var(--blue-primary); font-weight:600; font-size:0.74rem;
  letter-spacing:0.02em;
  background:var(--blue-pale);
  padding:5px 13px; border-radius:999px;
}

/* Botón "Ver más" dentro de cada tarjeta */
.btn-more{
  display:inline-flex; align-items:center; gap:6px;
  align-self:flex-start;
  font-family:var(--font-display); font-weight:700; font-size:0.76rem;
  color:var(--blue-primary);
  background:var(--white);
  border:1.5px solid var(--blue-soft);
  border-radius:999px;
  padding:7px 15px;
  cursor:pointer;
  transition:background .18s ease, color .18s ease, border-color .18s ease;
}
.btn-more svg{ width:12px; height:12px; transition:transform .2s ease; }
.btn-more:hover{ background:var(--blue-primary); color:var(--white); border-color:var(--blue-primary); }
.btn-more:hover svg{ transform:translateX(3px); }
.btn-more:focus-visible{ outline:3px solid var(--blue-mid); outline-offset:2px; }

/* Ícono ilustrativo de la especialidad */
.spec-icon{
  width:14px; height:14px;
  flex:0 0 auto;
  stroke:currentColor;
}
.modal-doc-headtext .spec{
  display:inline-flex; align-items:center; gap:8px;
}
.modal-doc-headtext .spec-icon{ width:16px; height:16px; }

/* Se mantienen 2 columnas: en pantallas angostas la tarjeta pasa a vertical */
@media (max-width:820px){
  #doctorsGrid{ gap:14px; }
  #doctorsGrid .doc-card{ padding:20px 18px; gap:14px; }
  #doctorsGrid .doc-photo{ width:84px; height:84px; }
  #doctorsGrid .doc-body h3{ font-size:1rem; }
}
@media (max-width:620px){
  #doctorsGrid .doc-card{
    flex-direction:column; align-items:center; text-align:center;
    padding:20px 14px; gap:12px;
  }
  #doctorsGrid .doc-body{ align-items:center; gap:8px; }
  #doctorsGrid .doc-photo{ width:74px; height:74px; }
  #doctorsGrid .doc-body h3{ font-size:0.92rem; }
  #doctorsGrid .doc-body .spec{
    align-self:center; font-size:0.66rem; padding:4px 10px; gap:5px;
  }
  #doctorsGrid .btn-more{ align-self:center; font-size:0.7rem; padding:6px 13px; }
  .spec-icon{ width:12px; height:12px; }
}

/* Paginación del directorio */
.pagination{
  display:flex; flex-wrap:wrap; align-items:center; justify-content:center;
  gap:8px; margin-top:42px;
}
.page-btn{
  min-width:40px; height:40px; padding:0 12px;
  display:inline-flex; align-items:center; justify-content:center;
  border:1px solid var(--line); border-radius:10px;
  background:var(--white); color:var(--ink);
  font-family:var(--font-display); font-weight:600; font-size:0.9rem;
  cursor:pointer;
  transition:background .2s ease, border-color .2s ease, color .2s ease, transform .15s ease;
}
.page-btn:hover:not(:disabled):not(.active){
  border-color:var(--blue-soft); background:var(--blue-pale-2); transform:translateY(-1px);
}
.page-btn.active{
  background:linear-gradient(135deg,var(--blue-primary),var(--blue-deep));
  border-color:transparent; color:#fff; cursor:default;
}
.page-btn.nav{ padding:0; }
.page-btn.nav svg{ width:18px; height:18px; }
.page-btn:disabled{ opacity:.4; cursor:not-allowed; }
.page-dots{ padding:0 2px; color:var(--ink-soft); font-weight:700; align-self:flex-end; }
.page-info{
  margin-left:10px; font-size:0.86rem; color:var(--ink-soft);
  font-weight:500;
}
@media (max-width:520px){
  .page-info{ width:100%; text-align:center; margin:8px 0 0; }
}

/* ===========================================================
   DIRECTORIO MÉDICO · Modal de perfil — avatar discreto
   Scoped a #doctorModal para no afectar otros modales.
   =========================================================== */
#doctorModal .modal-card{ max-width:680px; }
#doctorModal .modal-doc-header{
  display:flex; align-items:center; gap:20px;
  padding:32px 34px 26px;
  background:linear-gradient(135deg, var(--blue-pale) 0%, var(--blue-pale-2) 100%);
  border-bottom:1px solid var(--line);
}
#doctorModal .modal-doc-avatar{
  width:118px; height:118px; flex-shrink:0;
  border-radius:50%;
  object-fit:cover; object-position:top center;
  border:4px solid var(--white);
  box-shadow:0 0 0 3px var(--blue-pale), 0 12px 24px -12px rgba(14,58,102,0.5);
}
#doctorModal .modal-doc-headtext{ min-width:0; }
#doctorModal .modal-doc-headtext .spec{
  display:inline-block; margin:0 0 8px;
  color:var(--blue-primary); font-weight:700; font-size:0.7rem;
  letter-spacing:0.04em; text-transform:uppercase;
  background:var(--white);
  padding:5px 12px; border-radius:999px;
  box-shadow:0 4px 12px -8px rgba(14,58,102,0.4);
}
#doctorModal .modal-doc-headtext h2{
  font-size:clamp(1.3rem,3vw,1.6rem); line-height:1.22; margin:0;
  color:var(--blue-deep);
}
#doctorModal .modal-body{ padding:26px 34px 32px; }
#doctorModal .modal-body .bio{
  color:var(--ink); font-size:1rem; line-height:1.7; margin:0 0 26px;
}
#doctorModal .modal-grid{ gap:14px; margin-bottom:28px; }
#doctorModal .modal-info{
  background:var(--blue-pale-2); border:1px solid var(--line);
  border-radius:var(--radius-md); padding:16px 18px; gap:14px;
  transition:border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
#doctorModal .modal-info:hover{
  border-color:var(--blue-soft); background:var(--white);
  box-shadow:0 10px 24px -18px rgba(14,58,102,0.5);
}
#doctorModal .modal-info .dot{
  width:40px; height:40px; border-radius:11px;
  background:var(--white); box-shadow:0 5px 14px -8px rgba(14,58,102,0.5);
}
#doctorModal .modal-info h4{
  font-family:var(--font-body); font-size:0.68rem; font-weight:700;
  letter-spacing:0.06em; text-transform:uppercase; color:var(--blue-mid);
  margin-bottom:5px;
}
#doctorModal .modal-info p{
  font-size:0.92rem; color:var(--ink); font-weight:500; line-height:1.45;
}
#doctorModal .modal-actions{ gap:12px; padding-top:4px; }

@media (max-width:600px){
  #doctorModal .modal-doc-header{ padding:24px 22px 22px; gap:16px; }
  #doctorModal .modal-doc-avatar{ width:88px; height:88px; }
  #doctorModal .modal-body{ padding:22px 22px 26px; }
}
