/* =========================================================
   SISTEMA DE VARIABLES INSTITUCIONALES
========================================================= */

:root {
  --deep-navy: #0a1128;
  --prussian-blue: #001f54;
  --steel-blue: #034078;
  --soft-gray: #f4f7f9;
  --white: #ffffff;

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 26px;

  --shadow-soft: 0 16px 40px rgba(0,0,0,.08);
  --shadow-medium: 0 30px 70px rgba(0,0,0,.12);
  --shadow-strong: 0 40px 90px rgba(0,0,0,.18);

  --line-institutional: rgba(10,17,40,.08);
}

/* =========================================================
   HERO / SLIDER DE SERVICIOS
========================================================= */

.hero--slider {
  position: relative;
  height: 100vh;
  min-height: 720px;
  margin-top: -140px;
  overflow: hidden;
  background: var(--deep-navy);
}

/* Formas decorativas */
.hero--slider::before {
  content: "";
  position: absolute;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  top: -140px;
  right: -180px;
  z-index: 1;
}

.hero--slider::after {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,.12);
  bottom: 90px;
  left: -180px;
  transform: rotate(18deg);
  z-index: 1;
}

.slider {
  position: relative;
  height: 100%;
}

/* =========================================================
   SLIDES
========================================================= */

.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  opacity: 0;
  transform: scale(1.05);
  transition:
    opacity 1.2s ease,
    transform 2s ease;
}

.slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

/* Overlay institucional */
.slide__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(0, 31, 84, 0.5),
    rgba(0, 31, 84, 0.45),
    rgba(0, 31, 84, 0.4)
  );
}

/* =========================================================
   CONTENIDO DEL SLIDE
========================================================= */

.slide__content {
  position: relative;
  z-index: 3;
  height: 100%;
  max-width: 980px;
  margin: 0 auto;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  text-align: center;
  color: var(--white);
}

/* Tipografía */
.slide__content h1,
.slide__content h2 {
  font-size: clamp(2.6rem, 4.5vw, 3.9rem);
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 1.3rem;
}

.slide__subtitle {
  max-width: 780px;
  font-size: 1.15rem;
  line-height: 1.65;
  margin-bottom: 2.4rem;
  opacity: .95;
}

.slide__lead {
  font-size: .75rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  opacity: .85;
  margin-bottom: 3.6rem;
}

/* =========================================================
   ANIMACIÓN DE ENTRADA DEL TEXTO
========================================================= */

.slide__content > * {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity .8s ease,
    transform .8s ease;
}

.slide.is-active .slide__content h1,
.slide.is-active .slide__content h2 {
  opacity: 1;
  transform: translateY(0);
  transition-delay: .3s;
}

.slide.is-active .slide__subtitle {
  opacity: 1;
  transform: translateY(0);
  transition-delay: .55s;
}

.slide.is-active .slide__lead {
  opacity: 1;
  transform: translateY(0);
  transition-delay: .75s;
}

.slide.is-active .slide__actions {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 1s;
}

/* =========================================================
   ACCIONES DEL SLIDER
========================================================= */

.slide__actions {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

/* =========================================================
   BOTONES INSTITUCIONALES
========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 15px 42px;
  border-radius: 999px;

  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;

  cursor: pointer;
  transition: all .25s ease;
}

/* Botón principal */
.btn--primary {
  position: relative;
  background: linear-gradient(
    135deg,
    var(--deep-navy),
    var(--steel-blue)
  );
  color: var(--white);
  box-shadow: 0 14px 34px rgba(0,31,84,.4);
  overflow: hidden;
}

.btn--primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255,255,255,.35),
    transparent
  );
  transform: translateX(-100%);
}

.btn--primary:hover::after {
  transform: translateX(100%);
  transition: transform .6s ease;
}

.btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 48px rgba(0,31,84,.5);
}

/* Botón ghost */
.btn--ghost {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,.55);
  backdrop-filter: blur(4px);
}

.btn--ghost:hover {
  background: rgba(255,255,255,.18);
  transform: translateY(-3px);
}

/* =========================================================
   CONTROLES DEL SLIDER (SIN CÍRCULO)
========================================================= */

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;

  font-size: 3.4rem;
  font-weight: 300;
  color: rgba(255,255,255,.65);

  cursor: pointer;
  z-index: 10;

  transition:
    color .25s ease,
    transform .25s ease;
}

.slider-btn:hover {
  color: #ffffff;
  transform: translateY(-50%) scale(1.2);
}

.slider-btn--prev { left: 40px; }
.slider-btn--next { right: 40px; }

.slider-btn span {
  pointer-events: none;
}

/* =========================================================
   SECCIONES GENERALES
========================================================= */

.section {
  position: relative;
  padding: 150px 0;
}

.section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 60px;
  background: var(--line-institutional);
  transform: translateX(-50%);
}

.section--light {
  background: var(--soft-gray);
}

/* =========================================================
   GRID EDITORIAL
========================================================= */

.editorial-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 100px;
  align-items: center;
}

.editorial-grid.reverse {
  grid-template-columns: 0.9fr 1.1fr;
}

.editorial-text {
  position: relative;
  padding-left: 40px;
}

.editorial-text::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  background: var(--steel-blue);
  left: 0;
  top: 10px;
}

.editorial-text h2 {
  font-size: 2.4rem;
  color: var(--deep-navy);
  margin-bottom: 1.6rem;
}

.editorial-text p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--prussian-blue);
  margin-bottom: 1.6rem;
}

/* Imagen editorial */
.editorial-image {
  position: relative;
}

.editorial-image::before {
  content: "";
  position: absolute;
  inset: -18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-institutional);
}

.editorial-image img {
  width: 100%;
  max-width: 440px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-strong);
  display: block;
}

/* =========================================================
   MISIÓN / VISIÓN
========================================================= */

.mission-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 60px;
}

.mission-box {
  background: var(--white);
  padding: 56px 52px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.mission-box h3 {
  font-size: 1.6rem;
  color: var(--deep-navy);
  margin-bottom: 1.2rem;
}

.mission-box p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--prussian-blue);
}

/* =========================================================
   CERTIFICACIONES – MEJORA INSTITUCIONAL
========================================================= */

.certifications {
  position: relative;
}

/* =========================================================
   HEADER
========================================================= */

.section-header--center {
  max-width: 760px;
  margin: 0 auto 100px;
  text-align: center;
}

.section-header--center h2 {
  font-size: clamp(2.1rem, 3.4vw, 2.6rem);
  font-weight: 600;
  color: var(--deep-navy);
  margin-bottom: 1.4rem;
}

.section-header--center p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--prussian-blue);
}

/* =========================================================
   GRID
========================================================= */

.certifications-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 480px));
  gap: 90px;
  justify-content: center;
}

/* =========================================================
   CARD
========================================================= */

.certification-card {
  position: relative;
  background: var(--white);
  padding: 80px 72px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  text-align: center;

  transition:
    transform .4s ease,
    box-shadow .4s ease;
}

/* Borde institucional sutil */
.certification-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid var(--line-institutional);
  pointer-events: none;
}

.certification-card:hover {
  transform: translateY(-12px);
  box-shadow: var(--shadow-medium);
}

/* =========================================================
   LOGO
========================================================= */

.certification-logo {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 0 auto 44px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
  background: radial-gradient(
    circle at top,
    #ffffff,
    var(--soft-gray)
  );
}

.certification-logo::after {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1px dashed rgba(10,17,40,.12);
  pointer-events: none;
}

.certification-logo img {
  max-width: 180px;
  max-height: 180px;
  object-fit: contain;
}

/* =========================================================
   TEXTO
========================================================= */

.certification-card h3 {
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--deep-navy);
  margin-bottom: 1.2rem;
}

.certification-card p {
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--prussian-blue);
  max-width: 420px;
  margin: 0 auto;
}

/* =========================================================
   RESPONSIVE
========================================================= */

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

  .certification-card {
    padding: 70px 56px;
  }
}

@media (max-width: 640px) {
  .section-header--center {
    margin-bottom: 80px;
  }

  .certification-logo {
    width: 190px;
    height: 190px;
  }

  .certification-logo img {
    max-width: 150px;
  }
}


/* =========================================================
   RESPONSIVE
========================================================= */

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

  .certification-card {
    padding: 60px 48px;
  }
}

@media (max-width: 640px) {
  .certification-logo {
    width: 140px;
    height: 140px;
  }
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1100px) {
  .editorial-grid,
  .editorial-grid.reverse,
  .mission-grid,
  .certifications-list {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .editorial-text {
    padding-left: 0;
  }

  .editorial-text::before {
    display: none;
  }

  .editorial-image img {
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  .hero--slider {
    min-height: 620px;
  }

  .slider-btn {
    display: none;
  }

  .section {
    padding: 120px 0;
  }
}
