/* ============================================================
   styles.css — Optimizado para PageSpeed Insights
   ============================================================ */

/* Variables globales */
:root {
  --color-primary: #df2130;
  --color-secondary: #fdb713;
  --color-accent-aliee: #e84015;
  --color-accent-galeon: #ebbd2e;
  --color-accent-redMS: #ac1a2f;
  --color-gray-bg: #f4f2f2;
  --color-gray-slm: #4a5253;
  --color-card-bg: #e8e6e6;
  --color-text-muted: #555;
  --color-text-dark: #1a1a1a;
  --color-text-list: #604b4b;
  --font-main: "Montserrat", sans-serif;
}

/* Reset mínimo */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  margin: 0;
  padding: 0;
  color: var(--color-gray-slm);
}

.bg-gray {
  background-color: var(--color-gray-bg);
}

/* ============================================================
   HEADER / HERO
   ============================================================ */
header {
  color: #fff;
  background-image: url("../img/hero-slm.jpg");
  background-size: cover;
  background-position: top center;
  min-height: 700px;
  position: relative;
}

.contenido-hero {
  position: relative;
  z-index: 9999;
}

/* Overlay: will-change evitado intencionalmente para no generar capas extra */
.hero-slm {
  background-image: url("../img/bg.png");
  background-size: cover;
  background-position: center;
  position: absolute;
  inset: 0; /* shorthand moderno para top/right/bottom/left: 0 */
  opacity: 0.7;
  pointer-events: none;
}

header a {
  color: #fff !important;
  font-weight: 700;
  transition: color 0.3s ease;
  font-size: 18px;
  text-decoration: none;
}

header a:hover {
  color: #e7460f !important;
}

header .logo {
  max-width: 160px;
  height: auto;
}

/* ============================================================
   HERO TITLE
   ============================================================ */
.hero h1 {
  font-size: 80px;
  font-weight: 900;
  margin: auto;
  text-align: center;
  line-height: 1.15;
}

.hero h1 span {
  background: linear-gradient(
    to right,
    var(--color-accent-redMS),
    var(--color-secondary)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#ms {
  background-color: var(--color-accent-redMS);
}

#ms h2,
#ms p,
#ms h2 span,
#ms ul li {
  color: #fff !important;
}

#ms .ruav-card p {
  color: var(--color-text-muted) !important;
}

/* ============================================================
   PARTNERS / SWIPER
   ============================================================ */
.partners img {
  max-height: 80px;
  object-fit: contain;
}

.partners h2 {
  font-size: 40px;
  font-weight: 700;
}

.swiper-outer {
  display: flex;
  align-items: center;
  gap: 16px;
}

.swiper-outer .swiper {
  flex: 1;
  overflow: hidden;
  /* Altura fija evita Layout Shift (CLS) */
  height: 180px;
  padding-bottom: 35px !important;
}

/* Flechas fuera del flujo absoluto de Swiper */
.swiper-outer .swiper-button-prev,
.swiper-outer .swiper-button-next {
  position: static !important;
  transform: none !important;
  margin: 0;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  /* Área de toque mínima 44×44px para accesibilidad */
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
  border: none;
  background: none;
}

.item-partner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 170px;
}

/* ============================================================
   SECCIÓN RUAV
   ============================================================ */
#ms h2,
#ms h3 {
  font-weight: 700;
  font-size: 40px;
  line-height: 1.2;
}

#ms h2 span,
#ms h3 span {
  color: var(--color-accent-aliee);
}

#ms p {
  line-height: 1.6;
}

#ms ul li {
  color: var(--color-text-list);
  font-weight: 700;
  line-height: 1.6;
}

/* Tarjetas RUAV */
.ruav-card {
  background-color: var(--color-card-bg);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 160px;
  width: 100%;
}

.ruav-card--tall {
  min-height: 200px;
}

.ruav-card__icon {
  font-size: 24px;
  color: var(--color-accent-redMS);
  margin-bottom: auto;
}

.ruav-card__number {
  font-size: 36px;
  font-weight: 700;
  color: var(--color-text-dark);
  margin: 0;
  margin-top: auto;
}

.ruav-card__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-dark);
  margin: 0;
}

.ruav-card__label {
  font-size: 14px;
  color: var(--color-text-muted);
  margin: 4px 0 0 0;
}

/* ============================================================
   PLATAFORMAS
   ============================================================ */
#plataformas h2 {
  font-size: 45px;
  font-weight: 700;
}

/* ALIEE */
#aliee h3 {
  font-size: 35px;
  font-weight: 900;
}

#aliee .subtitle {
  color: var(--color-accent-aliee);
  font-weight: 700;
}

#aliee i {
  color: var(--color-accent-aliee);
}

/* GALEON */
#galeon h3 {
  font-size: 35px;
  font-weight: 900;
}

#galeon .subtitle {
  color: var(--color-accent-aliee);
  font-weight: 700;
}

#galeon i {
  color: var(--color-accent-aliee);
}

/* Contenedor de video con preview */
.cuadro-video {
  background-color: #d0cece;
  height: 400px;
  border-radius: 5em;
  width: 95%;
  /* Reservar espacio explícito evita Layout Shift */
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.cuadro-video__preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

.cuadro-video__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
  transition: background 0.2s ease;
}

.cuadro-video__play i {
  font-size: 4rem;
  color: #fff;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6));
  transition: transform 0.2s ease;
}

.cuadro-video:hover .cuadro-video__play {
  background: rgba(0, 0, 0, 0.45);
}

.cuadro-video:hover .cuadro-video__play i {
  transform: scale(1.1);
}

/* ============================================================
   SINERGIA
   IMPORTANTE: background-attachment: fixed está ELIMINADO.
   Causa repaint constante en móvil y penaliza gravemente
   el Performance score en PageSpeed.
   Reemplazado por un efecto alternativo con transform.
   ============================================================ */
#sinergia {
  background: url("../img/sinergia-bg.jpg") center/cover no-repeat;
  color: #fff;
  position: relative;
  isolation: isolate; /* crea stacking context limpio */
}

#sinergia .sinergia-content {
  position: relative;
  z-index: 1;
}

#sinergia h2 {
  font-size: 45px;
  font-weight: 900;
  background: white;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#sinergia p {
  font-size: 23px;
  font-weight: 500;
}

#sinergia .sinergia-overlay {
  position: absolute;
  background-color: var(--color-accent-redMS);
  inset: 0;
  opacity: 0.85;
  z-index: 0;
  pointer-events: none;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer .logos img {
  max-height: 40px;
  object-fit: contain;
}

/* ============================================================
   BOTÓN ROJO (utilitario)
   ============================================================ */
.btn-red {
  background-color: #da243e !important;
  padding: 0.8em 1.5em;
  font-weight: 700;
  color: #fff !important;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media screen and (max-width: 768px) {
  .hero h1 {
    font-size: 50px;
  }

  #ms h2,
  #ms h3 {
    font-size: 28px;
  }

  #plataformas h2 {
    font-size: 32px;
  }

  #aliee h3,
  #galeon h3 {
    font-size: 26px;
  }

  #sinergia h2 {
    font-size: 32px;
  }

  #sinergia p {
    font-size: 18px;
  }

  .cuadro-video {
    width: 100%;
    border-radius: 2em;
    height: 220px;
  }
}

@media screen and (max-width: 480px) {
  .hero h1 {
    font-size: 38px;
  }

  .partners h2 {
    font-size: 28px;
  }
}

/* ============================================================
   UTILIDADES DE ACCESIBILIDAD
   ============================================================ */
/* Foco visible para navegación por teclado */
:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

/* Skip link para lectores de pantalla */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--color-primary);
  color: #fff;
  padding: 8px 16px;
  z-index: 99999;
  font-weight: 700;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}
