/* =========================================================================
   UCITE.org — Hoja de estilos propia
   Paleta: verde azulado (teal) sanitario + acento coral (trauma/emergencia)
   ========================================================================= */

/* ---------- 1. Sistema de color ---------- */

/* Modo claro */
[data-md-color-scheme="default"] {
  --md-primary-fg-color:        #0d7d7c;
  --md-primary-fg-color--light: #14a3a1;
  --md-primary-fg-color--dark:  #0a5f5e;
  --md-primary-bg-color:        #ffffff;
  --md-primary-bg-color--light: rgba(255, 255, 255, 0.72);

  --md-accent-fg-color:         #e85c47;
  --md-accent-fg-color--transparent: rgba(232, 92, 71, 0.1);

  --md-typeset-a-color:         #0d6b6a;

  --ucite-coral:      #ff6b57;
  --ucite-coral-dark: #e85c47;
  --ucite-ink:        #0f2b2b;
  --ucite-surface:    #f3f8f8;
  --ucite-border:     #dce8e8;
  --ucite-hero-1:     #0f8a89;
  --ucite-hero-2:     #0a4f4e;
}

/* Modo oscuro (slate afinado hacia el teal) */
[data-md-color-scheme="slate"] {
  --md-primary-fg-color:        #16b0ad;
  --md-primary-fg-color--light: #3ec6c3;
  --md-primary-fg-color--dark:  #0d7d7c;

  --md-accent-fg-color:         #ff7d6a;

  --md-typeset-a-color:         #4fd0cd;

  --md-hue: 190;
  --md-default-bg-color:        hsla(190, 20%, 9%, 1);
  --md-default-bg-color--light: hsla(190, 20%, 9%, 0.7);

  --ucite-coral:      #ff8676;
  --ucite-coral-dark: #ff6b57;
  --ucite-ink:        #e6f2f2;
  --ucite-surface:    rgba(255, 255, 255, 0.03);
  --ucite-border:     rgba(255, 255, 255, 0.10);
  --ucite-hero-1:     #0f8a89;
  --ucite-hero-2:     #062f2f;
}

/* ---------- 2. Cabecera y navegación ---------- */

/* Se oculta el título de texto: el logo hace de identidad. */
.md-header__topic {
  display: none;
}

.md-header {
  box-shadow: 0 2px 10px rgba(10, 79, 78, 0.18);
}

/* El logo respira un poco más en la cabecera. */
.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  height: 1.65rem;
  width: auto;
}

/* Barra de pestañas con un sutil degradado teal. */
.md-tabs {
  background: linear-gradient(90deg, var(--md-primary-fg-color--dark), var(--md-primary-fg-color));
}

/* Acento coral bajo la pestaña activa. */
.md-tabs__item--active .md-tabs__link {
  position: relative;
  opacity: 1;
}
.md-tabs__item--active .md-tabs__link::after {
  content: "";
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  bottom: -0.15rem;
  height: 3px;
  border-radius: 3px;
  background: var(--ucite-coral);
}

/* ---------- 3. Página PROP-TBI (heredado) ---------- */
.prop-tbi-heading-image h1 { margin-bottom: 0; }
.prop-tbi-heading-image img { display: block; }

/* ---------- 4. Índice de protocolos con iconos ---------- */
.protocol-index {
  display: grid;
  gap: 0.15rem;
}
.protocol-index a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0.6rem;
  border-radius: 0.5rem;
  color: var(--ucite-ink);
  transition: background-color .15s ease, color .15s ease, transform .15s ease;
}
.protocol-index a:hover {
  background: var(--md-accent-fg-color--transparent, rgba(232, 92, 71, 0.1));
  color: var(--md-primary-fg-color);
  transform: translateX(2px);
}
.protocol-index svg {
  width: 1.2rem;
  height: 1.2rem;
  flex: 0 0 1.2rem;
  fill: none;
  stroke: var(--md-primary-fg-color);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.protocol-index svg .icon-fill { fill: var(--md-primary-fg-color); stroke: none; }

/* Pestañas navegables en móvil (heredado). */
@media screen and (max-width: 76.234375em) {
  .md-tabs { display: block; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  .md-tabs::-webkit-scrollbar { display: none; }
  .md-tabs__list { display: flex; width: max-content; min-width: 100%; }
  .md-tabs__item { flex: 0 0 auto; }
}

/* =========================================================================
   5. Portada (Inicio)
   ========================================================================= */

.ucite-hero {
  position: relative;
  overflow: hidden;
  margin: 0.2rem 0 2.2rem;
  padding: 2.6rem 2rem;
  border-radius: 1rem;
  background:
    radial-gradient(1200px 400px at 85% -20%, rgba(255, 107, 87, 0.35), transparent 60%),
    linear-gradient(135deg, var(--ucite-hero-1), var(--ucite-hero-2));
  color: #fff;
  box-shadow: 0 18px 40px -20px rgba(10, 79, 78, 0.6);
}

.ucite-hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 1.8rem;
  flex-wrap: wrap;
}

.ucite-hero__logo {
  width: 96px;
  height: 96px;
  flex: 0 0 auto;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.25));
}

.ucite-hero__text { flex: 1 1 320px; min-width: 260px; }

.ucite-hero__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.85;
}

.ucite-hero h1 {
  margin: 0;
  font-size: 3rem;
  line-height: 1.05;
  letter-spacing: 0.03em;
  color: #fff;
  font-weight: 800;
}

.ucite-hero__sub {
  margin: 0.5rem 0 0;
  font-weight: 600;
  font-size: 1rem;
  opacity: 0.96;
}

.ucite-hero__lead {
  margin: 0.6rem 0 0;
  font-size: 0.86rem;
  max-width: 46ch;
  opacity: 0.9;
}

.ucite-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.3rem;
}

.ucite-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: 2rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none !important;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.ucite-btn--primary {
  background: var(--ucite-coral);
  color: #fff !important;
  box-shadow: 0 8px 18px -8px rgba(255, 107, 87, 0.9);
}
.ucite-btn--primary:hover { background: var(--ucite-coral-dark); transform: translateY(-2px); }
.ucite-btn--ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.4);
}
.ucite-btn--ghost:hover { background: rgba(255, 255, 255, 0.22); transform: translateY(-2px); }
.ucite-btn svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 2; }
.ucite-btn--app {
  background: #fff;
  color: var(--md-primary-fg-color--dark) !important;
  box-shadow: 0 8px 18px -8px rgba(0, 0, 0, 0.45);
}
.ucite-btn--app:hover { background: #eafafa; transform: translateY(-2px); }
.ucite-hero__alt { margin-top: 0.6rem; font-size: 0.72rem; color: rgba(255, 255, 255, 0.82); }
.ucite-hero__alt a { color: #fff; text-decoration: underline; font-weight: 700; }

/* ---------- Tarjetas de accesos rápidos ---------- */
.ucite-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}
.ucite-card {
  position: relative;
  display: block;
  padding: 1.2rem 1.2rem 1.25rem;
  background: var(--ucite-surface);
  border: 1px solid var(--ucite-border);
  border-radius: 0.9rem;
  color: inherit !important;
  text-decoration: none !important;
  overflow: hidden;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.ucite-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--md-primary-fg-color), var(--ucite-coral));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.ucite-card:hover {
  border-color: var(--md-primary-fg-color);
  box-shadow: 0 14px 30px -18px rgba(10, 79, 78, 0.55);
  transform: translateY(-3px);
}
.ucite-card:hover::before { transform: scaleX(1); }
.ucite-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.7rem;
  background: linear-gradient(135deg, rgba(20, 163, 161, 0.16), rgba(255, 107, 87, 0.14));
}
.ucite-card svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: none;
  stroke: var(--md-primary-fg-color);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ucite-card__title {
  display: block;
  margin-top: 0.7rem;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ucite-ink);
}
.ucite-card__desc {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.76rem;
  line-height: 1.4;
  color: var(--md-default-fg-color--light);
}

/* ---------- Áreas de especialización ---------- */
.ucite-features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.8rem;
  margin: 1rem 0 1.5rem;
}
.ucite-feature {
  display: flex;
  gap: 0.7rem;
  padding: 0.9rem 1rem;
  background: var(--ucite-surface);
  border: 1px solid var(--ucite-border);
  border-left: 3px solid var(--md-primary-fg-color);
  border-radius: 0.6rem;
}
.ucite-feature svg {
  width: 1.3rem; height: 1.3rem; flex: 0 0 1.3rem; margin-top: 0.1rem;
  fill: none; stroke: var(--ucite-coral); stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.ucite-feature b { display: block; font-size: 0.85rem; color: var(--ucite-ink); }
.ucite-feature span { font-size: 0.76rem; color: var(--md-default-fg-color--light); }

/* ---------- Franja institucional (hospital) ---------- */
.ucite-inst {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin: 2rem 0 0.5rem;
  padding: 1.1rem 1.3rem;
  background: var(--ucite-surface);
  border: 1px solid var(--ucite-border);
  border-radius: 0.8rem;
}
.ucite-inst img { height: 58px; width: auto; }
.ucite-inst p { margin: 0; font-size: 0.78rem; color: var(--md-default-fg-color--light); }

/* ---------- Etiqueta de referencia en el hero ---------- */
.ucite-hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.9rem;
  padding: 0.28rem 0.7rem;
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ucite-hero__tag::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ucite-coral);
  box-shadow: 0 0 0 4px rgba(255, 107, 87, 0.28);
}

/* ---------- Banda de cifras ---------- */
.ucite-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 0.8rem;
  margin: -0.8rem 0 2.2rem;
}
.ucite-stat {
  text-align: center;
  padding: 1.1rem 0.7rem;
  background: var(--ucite-surface);
  border: 1px solid var(--ucite-border);
  border-radius: 0.8rem;
}
.ucite-stat b {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  color: var(--md-primary-fg-color);
}
.ucite-stat span {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--md-default-fg-color--light);
}

/* ---------- Pilares del equipo ---------- */
.ucite-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.9rem;
  margin: 1rem 0 1.5rem;
}
.ucite-pillar {
  padding: 1.15rem 1.2rem;
  background: var(--ucite-surface);
  border: 1px solid var(--ucite-border);
  border-radius: 0.9rem;
}
.ucite-pillar .ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem; height: 2.4rem;
  border-radius: 0.6rem;
  background: linear-gradient(135deg, rgba(20, 163, 161, 0.16), rgba(255, 107, 87, 0.14));
}
.ucite-pillar svg {
  width: 1.4rem; height: 1.4rem;
  fill: none; stroke: var(--md-primary-fg-color); stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.ucite-pillar b { display: block; margin-top: 0.6rem; font-size: 0.95rem; color: var(--ucite-ink); }
.ucite-pillar span { display: block; margin-top: 0.25rem; font-size: 0.78rem; line-height: 1.45; color: var(--md-default-fg-color--light); }

/* ---------- Bloque de redes sociales ---------- */
.ucite-social {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}
.ucite-social a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.95rem;
  border-radius: 2rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none !important;
  color: #fff !important;
  background: var(--md-primary-fg-color);
  transition: transform .15s ease, box-shadow .15s ease;
}
.ucite-social a:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -8px rgba(10, 79, 78, 0.6); }
.ucite-social svg { width: 1.05rem; height: 1.05rem; fill: currentColor; }

/* ---------- Co-branding del hospital en el hero ---------- */
.ucite-hero__cobrand {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: #fff;
  border-radius: 0.6rem;
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.35);
}
.ucite-hero__cobrand img { height: 40px; width: auto; display: block; }

/* ---------- Galería de infografías ---------- */
.ucite-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.6rem;
  margin: 0.8rem 0 1.8rem;
}
.ucite-gallery a {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--ucite-border);
  border-radius: 0.6rem;
  background: var(--ucite-surface);
}
.ucite-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .2s ease;
}
.ucite-gallery a:hover { border-color: var(--md-primary-fg-color); }
.ucite-gallery a:hover img { transform: scale(1.06); }

/* ---------- Vídeos en código QR ---------- */
.ucite-qr {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}
.ucite-qr__card {
  text-align: center;
  padding: 1rem;
  background: var(--ucite-surface);
  border: 1px solid var(--ucite-border);
  border-radius: 0.9rem;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.ucite-qr__card:hover {
  border-color: var(--md-primary-fg-color);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -18px rgba(10, 79, 78, 0.55);
}
.ucite-qr__card img {
  width: 100%;
  max-width: 175px;
  height: auto;
  background: #fff;
  border-radius: 0.5rem;
  padding: 0.35rem;
}
.ucite-qr__title {
  display: block;
  margin-top: 0.7rem;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ucite-ink);
}
.ucite-qr__meta {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.72rem;
  color: var(--md-default-fg-color--light);
}

/* ---------- Tarjetas de cursos ---------- */
.ucite-course {
  padding: 1.4rem 1.5rem;
  margin: 0.6rem 0 1.8rem;
  background: var(--ucite-surface);
  border: 1px solid var(--ucite-border);
  border-left: 4px solid var(--md-primary-fg-color);
  border-radius: 1rem;
}
.ucite-course__head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.6rem;
}
.ucite-course__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 3rem; height: 3rem;
  border-radius: 0.8rem;
  background: linear-gradient(135deg, var(--md-primary-fg-color), var(--ucite-coral));
}
.ucite-course__icon svg {
  width: 1.6rem; height: 1.6rem;
  fill: none; stroke: #fff; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.ucite-course__sub {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--md-primary-fg-color);
}
.ucite-course__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.9rem 0;
}
.ucite-course__meta span {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.28rem 0.72rem;
  border-radius: 2rem;
  background: rgba(20, 163, 161, 0.12);
  color: var(--md-primary-fg-color);
}
.ucite-course__contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--ucite-border);
}
.ucite-course__contact .lbl {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--md-default-fg-color--light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.ucite-course__contact a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  border-radius: 2rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none !important;
  color: #fff !important;
  background: var(--md-primary-fg-color);
  transition: transform .15s ease, box-shadow .15s ease;
}
.ucite-course__contact a:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -8px rgba(10, 79, 78, 0.6); }
.ucite-course__contact a.ghost {
  background: transparent;
  color: var(--md-primary-fg-color) !important;
  border: 1px solid var(--md-primary-fg-color);
}
.ucite-course__contact svg { width: 1rem; height: 1rem; fill: currentColor; }

@media screen and (max-width: 44rem) {
  .ucite-hero { padding: 2rem 1.3rem; }
  .ucite-hero h1 { font-size: 2.4rem; }
  .ucite-hero__logo { width: 76px; height: 76px; }
  .ucite-stat b { font-size: 1.6rem; }
  .ucite-hero__cobrand { position: static; margin: 0 0 1rem auto; }
}
