:root{
  --bg:#ffffff;
  --panel:#f6f9fc;
  --text:#0b2a3f;
  --muted:#5c7286;
  --line:rgba(11,42,63,.08);

  --accent:#0a3cff;      /* azul rey */
  --accent2:#00a884;     /* verde esmeralda */

  --shadow:0 18px 50px rgba(0,0,0,.06);
  --radius:18px;
  --max:1120px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

*{ box-sizing:border-box; }

html,body{
  margin:0;
  padding:0;
  background:var(--bg);
  color:var(--text);
  font-family:var(--font);
  line-height:1.6;
}

a{ color:var(--accent); text-decoration:none; }

.container{
  max-width:var(--max);
  margin:0 auto;
  padding:0 20px;
}

/* =========================
   HEADER (STICKY)
========================= */
.header{
  position:sticky;
  top:0;
  z-index:1000;
  background:#ffffff;
  border-bottom:1px solid var(--line);
  position:sticky;
}

.header::after{
  content:"";
  position:absolute;
  bottom:0;
  left:0;
  width:100%;
  height:2px;
  background:linear-gradient(90deg, transparent, var(--accent2), transparent);
  opacity:.55;
}

.header__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:18px 0;
  gap:16px;
}

.logo{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}

.logo__img{
  width:110px;
  height:auto;
  display:block;
}

.logo__text{
  font-size:1.6rem;
  font-weight:750;
  letter-spacing:.02em;
  color:var(--text);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* NAV */
.nav{
  display:flex;
  gap:20px;
  align-items:center;
}

.nav a{
  color:var(--text);
  font-weight:550;
}

.nav a:hover{ color:var(--accent); }

.nav__cta{
  border:1px solid var(--accent);
  padding:8px 14px;
  border-radius:999px;
}

@media (max-width: 700px){
  .nav a{ display:none; }
  .nav .nav__cta{ display:inline-flex; }
}

/* =========================
   SECTIONS / TYPO
========================= */
.section{ padding:64px 0; }
.section--alt{ background:#fbfdff; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }

.eyebrow{
  color:var(--accent);
  letter-spacing:.18em;
  text-transform:uppercase;
  font-size:.8rem;
  margin:0 0 10px;
}

h1{
  font-size:clamp(2.4rem,4vw,3.4rem);
  margin:0 0 18px;
  line-height:1.15;
}

h2{
  margin:0 0 12px;
  font-size:1.75rem;
}

h3{
  margin:0 0 8px;
  font-size:1.2rem;
}

.lead{
  font-size:1.15rem;
  color:var(--muted);
  margin:0 0 24px;
}

.subhead{
  color:var(--muted);
  margin:0 0 18px;
}

.micro{
  color:var(--muted);
  font-size:.92rem;
  margin:6px 0 0;
}

/* =========================
   HERO
========================= */
.hero{ padding:70px 0 40px; }

.hero__grid{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:40px;
  align-items:start;
}

@media(max-width:900px){
  .hero__grid{ grid-template-columns:1fr; }
}

/* =========================
   BUTTONS
========================= */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:12px 18px;
  border-radius:999px;
  border:1px solid var(--accent);
  font-weight:650;
  transition:.2s;
}

.btn--primary{
  background:linear-gradient(135deg,var(--accent),var(--accent2));
  color:#fff;
  border:none;
}

.btn--primary:hover{ opacity:.92; }
.btn--ghost{ background:transparent; color:var(--accent); }
.btn--block{ width:100%; }

/* =========================
   PANELS / CARDS
========================= */
.panel,
.card,
.step,
.contact__card{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:20px;
  box-shadow:var(--shadow);
}

.cards{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:20px;
}

@media(max-width:900px){
  .cards{ grid-template-columns:1fr; }
}

.two-col{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
}

@media(max-width:900px){
  .two-col{ grid-template-columns:1fr; }
}

/* =========================
   DOCTORS
========================= */
.doctor-card{ padding:24px; }

.doctor-header{
  display:flex;
  align-items:center;
  gap:20px;
  margin-bottom:16px;
}

.doctor-photo{
  width:140px;
  height:140px;
  border-radius:20px;
  object-fit:cover;
  box-shadow:0 10px 30px rgba(0,0,0,.08);
  border:1px solid var(--line);
  background:#fff;
}

@media(max-width:700px){
  .doctor-header{
    flex-direction:column;
    align-items:flex-start;
  }
}

/* =========================
   BLOG CARDS (HOME)
========================= */
.blog-grid{
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  gap:16px;
  margin-top:18px;
}
@media(max-width:900px){
  .blog-grid{ grid-template-columns:1fr; }
}

.blog-card{
  background:var(--panel);
  border-radius:16px;
  padding:20px;
  border:1px solid var(--line);
  box-shadow:var(--shadow);
}

.blog-title{
  font-size:1.2rem;
  font-weight:750;
  margin:0 0 10px;
}

.blog-title a{ color:var(--text); }
.blog-title a:hover{ color:var(--accent); }

/* =========================
   MAP (FIXED + CLOSED)
========================= */
.map-embed{
  width:100%;
  height:200px;
  border-radius:16px;
  overflow:hidden;
  border:1px solid var(--line);
  background:#fff;
}

.map-embed iframe{
  width:100%;
  height:100%;
  border:0;
}

/* =========================
   LOGOS EN BIOS (UNIVERSIDADES) - PEQUEÑOS + AZUL
========================= */
.institution-logos{
  display:flex;
  align-items:center;
  gap:12px;
  margin-top:14px;
  flex-wrap:wrap;
  max-width:100%;
}

.institution-logos img{
  height:22px !important;
  width:auto !important;
  max-width:90px !important;
  object-fit:contain !important;
  display:block;

  /* Azul institucional */
  filter:
    grayscale(100%)
    sepia(100%)
    hue-rotate(190deg)
    saturate(380%)
    brightness(0.92)
    contrast(1.05) !important;

  opacity:.78;
}

/* =========================
   AFILIACIONES - GRID + LOGOS PEQUEÑOS + AZUL
========================= */
.associations-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:14px;
  margin-top:20px;
}

@media(max-width:800px){
  .associations-grid{ grid-template-columns:1fr; }
}

.association-item{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 16px;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--panel);
  box-shadow:var(--shadow);
}

.association-item img{
  height:20px !important;
  width:auto !important;
  max-width:80px !important;
  object-fit:contain !important;
  display:block;

  /* Azul institucional (más uniforme) */
  filter:
    grayscale(100%)
    sepia(100%)
    hue-rotate(190deg)
    saturate(330%)
    brightness(0.96)
    contrast(1.05) !important;

  opacity:.75 !important;
}

.association-item span{
  color:var(--text);
  font-weight:550;
  font-size:1rem;
}

/* =========================
   FOOTER
========================= */
.footer{
  border-top:1px solid var(--line);
  padding:30px 0;
  color:var(--muted);
}