/* Instituto DPC — identidad institucional (no mezclar con NODO) */
:root {
  --rojo: #CA233F;
  --rojo-hover: #a81c34;
  --gris-claro: #ECECEC;
  --gris-medio: #BDBDBD;
  --ink: #192126;
  --blanco: #FFFFFF;
  --sombra: 0 12px 32px rgba(25, 33, 38, 0.1);
  --radio: 14px;
  --max: 1120px;
  --font: Verdana, Geneva, Tahoma, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--blanco);
  line-height: 1.55;
  font-size: 16px;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font-family: inherit; }

.container {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}
.container-narrow {
  max-width: 760px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rojo);
  margin-bottom: 10px;
}
h1, h2, h3 {
  font-family: var(--font);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 14px;
}
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.35rem); }
h3 { font-size: 1.15rem; }
.accent { color: var(--rojo); }
.lead { color: #4a555c; font-size: 1.05rem; max-width: 640px; }
.section { padding: 72px 0; }
.section.alt { background: var(--gris-claro); }
.section.dark { background: var(--ink); color: var(--blanco); }
.section.dark .lead { color: #c8cdd0; }
.section-head { margin-bottom: 36px; max-width: 720px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 8px;
  border: 2px solid transparent;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s, color .15s, border-color .15s, transform .12s, box-shadow .12s, filter .12s;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible {
  outline: 3px solid rgba(202, 35, 63, 0.45);
  outline-offset: 2px;
}
.btn:active,
.btn.is-pressed {
  transform: translateY(1px) scale(0.98);
  filter: brightness(0.92);
}
.btn-primary { background: var(--rojo); color: var(--blanco); }
.btn-primary:hover { background: var(--rojo-hover); }
.btn-primary:active,
.btn-primary.is-pressed {
  background: #8f172c;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.28);
  filter: none;
}
.btn-secondary {
  background: transparent;
  color: var(--blanco);
  border-color: rgba(255,255,255,.75);
}
.btn-secondary:hover { background: rgba(255,255,255,.12); }
.btn-secondary:active,
.btn-secondary.is-pressed {
  background: rgba(255, 255, 255, 0.22);
  filter: none;
}
.btn-outline {
  background: transparent;
  color: var(--rojo);
  border-color: var(--rojo);
}
.btn-outline:hover { background: var(--rojo); color: var(--blanco); }
.btn-outline:active,
.btn-outline.is-pressed {
  background: var(--rojo-hover);
  color: var(--blanco);
  filter: none;
}
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--gris-claro);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  @media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
    .site-header {
      background: rgba(255, 255, 255, 0.96);
      -webkit-backdrop-filter: blur(8px);
      backdrop-filter: blur(8px);
    }
  }
}
.site-header .container { position: relative; }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
}
.brand img { height: 64px; width: auto; object-fit: contain; }
.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 28px;
}
.nav-primary {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-primary > a,
.nav-drop-btn {
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
  -webkit-tap-highlight-color: transparent;
  transition: background .12s, color .12s, transform .1s;
}
.nav-primary > a:hover,
.nav-drop-btn:hover {
  color: var(--rojo);
  background: rgba(202, 35, 63, 0.06);
}
.nav-primary > a:focus-visible,
.nav-drop-btn:focus-visible {
  outline: 3px solid rgba(202, 35, 63, 0.4);
  outline-offset: 2px;
}
.nav-primary > a:active,
.nav-primary > a.is-pressed,
.nav-drop-btn:active,
.nav-drop-btn.is-pressed {
  color: var(--rojo);
  background: rgba(202, 35, 63, 0.14);
  transform: scale(0.97);
}
.nav-primary > a.active,
.nav-primary > a.is-active,
.nav-dropdown.is-active > .nav-drop-btn {
  color: var(--rojo);
}
.nav-dropdown { position: relative; }
.nav-drop-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.7;
  transition: transform 0.15s ease;
}
.nav-dropdown.open .nav-caret { transform: rotate(180deg); }
.nav-drop-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--gris-claro);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(25, 33, 38, 0.12);
  z-index: 60;
}
.nav-drop-panel[hidden] { display: none !important; }
.nav-drop-panel a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.nav-cat-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #CA233F;
  opacity: 0.9;
}
.nav-drop-panel a:hover .nav-cat-icon,
.nav-drop-panel a.active .nav-cat-icon,
.nav-drop-panel a.is-active .nav-cat-icon {
  opacity: 1;
}
.nav-drop-panel a:hover {
  background: rgba(202, 35, 63, 0.06);
  color: var(--rojo);
}
.nav-drop-panel a:focus-visible {
  outline: 2px solid rgba(202, 35, 63, 0.45);
  outline-offset: 1px;
}
.nav-drop-panel a:active,
.nav-drop-panel a.is-pressed {
  background: rgba(202, 35, 63, 0.16);
  color: var(--rojo);
  transform: scale(0.98);
}
.nav-drop-panel a.active,
.nav-drop-panel a.is-active {
  color: var(--rojo);
  background: rgba(202, 35, 63, 0.08);
}
.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.nav-login {
  min-height: 42px;
  padding: 0 16px;
  font-size: 0.88rem;
}
.nav-login[hidden] { display: none !important; }
.nav-cta { margin-left: 0; }
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--gris-medio);
  border-radius: 8px;
  background: var(--blanco);
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

/* Hero */
.hero {
  position: relative;
  min-height: min(78vh, 680px);
  display: grid;
  place-items: end start;
  color: var(--blanco);
  background:
    linear-gradient(105deg, rgba(25,33,38,.82) 0%, rgba(25,33,38,.55) 55%, rgba(202,35,63,.35) 100%),
    radial-gradient(ellipse at 70% 30%, rgba(202,35,63,.35), transparent 50%),
    linear-gradient(160deg, #192126 0%, #2a343b 45%, #3a1a22 100%);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding: 100px 0 72px;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}
.hero .eyebrow { color: #ffb3c0; }
.hero h1 { max-width: 16ch; }
.hero .lead { color: #e4e7e9; }
.hero-short {
  min-height: 0;
  place-items: center start;
}
.hero-short .hero-inner { padding: 72px 0 56px; }

/* Stats band */
.stats {
  background: var(--rojo);
  color: var(--blanco);
  padding: 28px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  text-align: center;
}
.stats strong {
  display: block;
  font-size: 1.7rem;
  margin-bottom: 4px;
}
.stats span { font-size: 0.88rem; opacity: .95; }

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

.card {
  background: var(--blanco);
  border: 1px solid rgba(189,189,189,.55);
  border-radius: var(--radio);
  padding: 24px;
  box-shadow: var(--sombra);
}
.card .icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(202,35,63,.1);
  color: var(--rojo);
  display: grid;
  place-items: center;
  font-weight: 700;
  margin-bottom: 14px;
  font-size: 1.1rem;
}
.card p { margin: 0; color: #4a555c; font-size: 0.95rem; }
.offer-card {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(160deg, #fff 0%, #f7f7f7 100%);
  border-top: 4px solid var(--rojo);
}
.offer-card h3 { font-size: 1.45rem; }

.manifesto { text-align: center; }
.manifesto h2 { max-width: 18ch; margin-left: auto; margin-right: auto; }
.manifesto p {
  max-width: 720px;
  margin: 0 auto;
  color: #d5d9dc;
  font-size: 1.05rem;
}

.steps { counter-reset: step; }
.step {
  position: relative;
  padding-left: 0;
}
.step .num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--rojo);
  color: var(--blanco);
  display: grid;
  place-items: center;
  font-weight: 700;
  margin-bottom: 14px;
}

.stars { color: #e6a800; letter-spacing: 2px; margin-bottom: 10px; }
.quote { font-style: italic; color: #4a555c; }

.values {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.value-pill {
  background: var(--blanco);
  border: 1px solid var(--gris-medio);
  border-radius: 999px;
  padding: 12px 16px;
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.gallery-item {
  aspect-ratio: 4/3;
  border-radius: 12px;
  background: linear-gradient(135deg, #d7dce0, #ececec);
  border: 1px dashed var(--gris-medio);
  display: grid;
  place-items: center;
  color: #6a7378;
  font-size: 0.85rem;
  text-align: center;
  padding: 12px;
}

.feature-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 20px 0 8px;
}
.feature-row span {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  padding: 8px 12px;
  background: var(--gris-claro);
  border-radius: 999px;
}

.faq details {
  background: var(--blanco);
  border: 1px solid rgba(189,189,189,.6);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.faq summary {
  font-weight: 700;
  cursor: pointer;
}
.faq p { margin: 10px 0 0; color: #4a555c; }

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: start;
}
.form {
  display: grid;
  gap: 12px;
}
.form label {
  display: grid;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 700;
}
.form input,
.form select,
.form textarea {
  min-height: 46px;
  border: 1px solid var(--gris-medio);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.95rem;
  background: var(--blanco);
}
.form textarea { min-height: 110px; resize: vertical; }
.contact-box {
  background: var(--ink);
  color: var(--blanco);
  border-radius: var(--radio);
  padding: 28px;
}
.contact-box a { color: #ffc0cb; }
.contact-box p { margin: 0 0 12px; color: #d5d9dc; }
.map-wrap {
  margin-top: 28px;
  border-radius: var(--radio);
  overflow: hidden;
  border: 1px solid var(--gris-medio);
  min-height: 300px;
}
.map-wrap iframe { width: 100%; height: 320px; border: 0; }

.cta-band {
  background: var(--rojo);
  color: var(--blanco);
  text-align: center;
  padding: 56px 0;
}
.cta-band .lead { color: rgba(255,255,255,.92); margin: 0 auto 22px; }
.cta-band .btn-secondary { border-color: #fff; }

.director {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  align-items: center;
}
.director-photo {
  width: 180px;
  height: 180px;
  border-radius: 16px;
  background: linear-gradient(160deg, #CA233F, #192126);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 2rem;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: #d5d9dc;
  padding: 48px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.2fr;
  gap: 28px;
  margin-bottom: 28px;
}
.site-footer .brand img { height: 56px; margin-bottom: 12px; }
.site-footer a:hover { color: #fff; }
.footer-links { display: grid; gap: 8px; }
.social { display: flex; gap: 12px; margin-top: 12px; }
.social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.25);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
}
.footer-copy {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 16px;
  font-size: 0.85rem;
  color: #9aa3a8;
}

.wa-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
  font-weight: 700;
  font-size: 0.7rem;
  -webkit-tap-highlight-color: transparent;
  transition: transform .12s, filter .12s;
}
.wa-float:hover { filter: brightness(1.05); }
.wa-float:active,
.wa-float.is-pressed {
  transform: scale(0.92);
  filter: brightness(0.9);
}

/* —— Responsive —— */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
  .container { width: min(var(--max), calc(100% - 32px)); }
  .section { padding: 56px 0; }
  .grid-4, .values { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .gallery { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 22px; }
  .split, .footer-grid, .director { grid-template-columns: 1fr; }
  .director-photo { width: 140px; height: 140px; }
  .hero h1 { max-width: none; }
}

@media (max-width: 900px) {
  .menu-toggle { display: inline-grid; place-items: center; flex-shrink: 0; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--gris-claro);
    box-shadow: 0 12px 24px rgba(25, 33, 38, 0.08);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 16px 16px;
    display: none;
    max-height: min(80vh, 640px);
    overflow-y: auto;
  }
  .nav.open { display: flex; }
  .nav-primary {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .nav-primary > a,
  .nav-drop-btn {
    width: 100%;
    justify-content: space-between;
    padding: 14px 4px;
    border-radius: 0;
    border-bottom: 1px solid var(--gris-claro);
    font-size: 0.95rem;
  }
  .nav-primary > a:hover,
  .nav-drop-btn:hover { background: transparent; }
  .nav-dropdown { width: 100%; }
  .nav-drop-panel {
    position: static;
    min-width: 0;
    margin: 0 0 8px;
    padding: 4px 0 8px 12px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }
  .nav-drop-panel a {
    padding: 10px 8px;
    font-weight: 500;
    color: #555;
  }
  .nav-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 12px 0 0;
    width: 100%;
  }
  .nav-actions .btn {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .header-inner { min-height: 68px; gap: 12px; }
  .brand img { height: 52px; }
  .grid-2, .grid-3, .gallery, .grid-4 { grid-template-columns: 1fr; }
  .values { grid-template-columns: 1fr 1fr; }
  .hero { min-height: 0; }
  .hero-inner { padding: 64px 0 48px; width: min(var(--max), calc(100% - 32px)); }
  .hero-short .hero-inner { padding: 48px 0 40px; }
  .btn-row { width: 100%; }
  .btn-row .btn { flex: 1 1 100%; }
  .section { padding: 48px 0; }
  .section-head { margin-bottom: 28px; }
  .lead { font-size: 1rem; }
  .stats { padding: 22px 0; }
  .stats strong { font-size: 1.4rem; }
  .feature-row { gap: 8px; }
  .feature-row span { font-size: 0.8rem; }
  .map-wrap iframe { height: 260px; }
  .wa-float {
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
    width: 54px;
    height: 54px;
  }
  .cta-band { padding: 44px 0; }
  .site-footer { padding: 40px 0 20px; }
}

@media (max-width: 420px) {
  .container { width: calc(100% - 24px); }
  .values { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; gap: 16px; }
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.45rem; }
  .brand img { height: 46px; }
}
