/* ==========================================================================
   Portada — el héroe y «Lo que hacemos» (`cid.home`, página 1976)
   --------------------------------------------------------------------------
   Dos diapositivas a 90vh que se funden cada 5 s. La foto lleva un velo
   azul que se va aclarando hacia la derecha, para que el título se lea sin
   tapar a quien sale en ella.
   ========================================================================== */
.cid-heroe { position: relative; height: 90vh; min-height: 560px; overflow: hidden; background: var(--azul); }

.cid-heroe-diapositiva {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  transition: opacity 1.2s ease;
  pointer-events: none;
}

.cid-heroe-diapositiva.es-actual { opacity: 1; pointer-events: auto; }

.cid-heroe-fondo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.cid-heroe-diapositiva::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(30, 50, 92, .88) 0%, rgba(30, 50, 92, .66) 45%, rgba(30, 50, 92, .15) 100%);
}

.cid-heroe-diapositiva.es-actual .cid-heroe-fondo { animation: cid-acercar 9s ease-out both; }

@keyframes cid-acercar { from { transform: scale(1.06); } to { transform: none; } }

.cid-heroe-cuerpo {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 0 10px;
  color: var(--blanco);
}

.cid-heroe-cuerpo h1 {
  max-width: 680px;
  font-size: 56px;
  font-weight: 500;
  line-height: 1;
}

.cid-heroe-cuerpo h1 strong { color: #E31B2D; font-weight: 700; }

/* Al entrar cada diapositiva, el texto sube por partes: título, bajada y
   botones, uno detrás de otro. */
.cid-heroe-diapositiva.es-actual .cid-heroe-cuerpo > * {
  animation: cid-heroe-sube 1s cubic-bezier(.16, 1, .3, 1) both;
}

.cid-heroe-diapositiva.es-actual .cid-heroe-cuerpo > :nth-child(2) { animation-delay: .15s; }

.cid-heroe-diapositiva.es-actual .cid-heroe-cuerpo > :nth-child(3) { animation-delay: .3s; }

@keyframes cid-heroe-sube { from { opacity: 0; transform: translateY(34px); } }

/* Progreso: una barra por diapositiva, la actual se llena en su tiempo. */
.cid-heroe-progreso {
  position: absolute;
  left: max(20px, calc((100% - var(--ancho)) / 2 + 10px));
  bottom: 48px;
  z-index: 2;
  display: flex;
  gap: 10px;
}

.cid-heroe-progreso button {
  width: 56px;
  height: 18px;
  padding: 8px 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.cid-heroe-progreso span {
  position: relative;
  display: block;
  height: 2px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(255, 255, 255, .35);
}

.cid-heroe-progreso span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--blanco);
  transform: scaleX(0);
  transform-origin: left;
}

.cid-heroe-progreso .es-vista span::after { transform: none; }

.cid-heroe-progreso .es-actual span::after { animation: cid-progreso var(--duracion) linear forwards; }

@keyframes cid-progreso { to { transform: none; } }

.cid-heroe-cuerpo p { max-width: 650px; margin-top: 40px; font-size: 16px; line-height: 24px; }

.cid-heroe-botones { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 44px; }

/* Botones de la portada: rojo lleno y borde blanco, con su flecha. */
.cid-boton-rojo,
.cid-boton-borde {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 15px 22px;
  border: 3px solid transparent;
  border-radius: 4px;
  font-family: var(--titular);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  transition: background .3s, color .3s, border-color .3s;
}

.cid-boton-rojo { background: #E31B2D; color: var(--blanco); }

.cid-boton-rojo:hover { background: var(--azul); color: var(--blanco); }

.cid-boton-borde { border-color: var(--blanco); color: var(--blanco); }

.cid-boton-borde:hover { background: var(--blanco); color: var(--azul); }

.cid-boton-rojo svg,
.cid-boton-borde svg { width: 16px; height: 18px; transition: transform .3s; }

.cid-boton-rojo:hover svg,
.cid-boton-borde:hover svg { transform: translateX(4px); }

/* --- Lo que hacemos ---------------------------------------------------------- */
.cid-hacemos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 110px 10px;
}

.cid-antetitulo { margin-bottom: 14px; color: var(--rojo); font-size: 18px; font-weight: 500; line-height: 1.2; }

.cid-titulo-grande { color: var(--azul); font-size: 48px; font-weight: 700; line-height: 1.1; }

.cid-titulo-seccion { color: var(--azul); font-size: 36.8px; font-weight: 700; line-height: 1.2; text-align: center; }

.cid-hacemos-der { display: grid; gap: 20px; justify-items: start; }

.cid-destacado { color: var(--azul); font-size: 24px; line-height: 1.4; }

.cid-hacemos-der p:not(.cid-destacado),
.cid-liderazgo-texto p { color: var(--tinta); font-size: 16px; line-height: 1.6; }

@media (max-width: 1024px) {
  .cid-heroe-cuerpo { padding: 0 40px; }

  .cid-heroe-cuerpo h1 { font-size: 46px; }

  .cid-hacemos { grid-template-columns: 1fr; gap: 30px; padding: 80px 40px; }

  .cid-titulo-grande { font-size: 40px; }
}

@media (max-width: 767px) {
  .cid-heroe { height: 80vh; }

  .cid-heroe-cuerpo { padding: 0 20px; }

  .cid-heroe-cuerpo h1 { font-size: 36px; }

  .cid-heroe-cuerpo p { margin-top: 24px; }

  .cid-heroe-botones { margin-top: 30px; }

  .cid-hacemos { padding: 60px 20px; }

  .cid-titulo-grande { font-size: 32px; }

  .cid-titulo-seccion { font-size: 30px; }
}
