/* LabAncestral · inicio.css
   Estilos exclusivos de la página de inicio. */

.home {
  display: block;
  position: relative;
  width: 100%;
  min-width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #F6EFE1;
  color: #152514;
  font-family: 'IBM Plex Sans', sans-serif;
}

.home > div {
  width: 100%;
  min-width: 100%;
}

/* Los hijos de flex y grid deben poder encogerse. */
.news-grid > *,
.principles-grid > *,
.work-grid > *,
.territory-grid > *,
.pillars-grid > *,
.news-list-item > div:last-child {
  min-width: 0;
}

/* Carrusel principal */
.hero-slide {
  transition: opacity 1.2s ease;
}

.hero-slide.active {
  opacity: 1 !important;
}

.hero-dot {
  width: 28px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: rgba(255, 255, 255, .3);
  cursor: pointer;
  transition: background .3s;
}

.hero-dot:hover {
  background: rgba(255, 255, 255, .6);
}

.hero-dot.hero-dot-active {
  width: 44px;
  background: #EE9A1C;
}

/* Animaciones utilizadas solo en el inicio. */
@keyframes la_rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes la_pan {
  0%   { transform: scale(1.12) translate(0, 0); }
  50%  { transform: scale(1.2) translate(-2.5%, -1.8%); }
  100% { transform: scale(1.12) translate(0, 0); }
}

@keyframes la_sun {
  0%, 100% { transform: translate(0, 0); opacity: .8; }
  50%      { transform: translate(3%, 2%); opacity: 1; }
}

/* Tablet */
@media (max-width: 900px) {
  .news-grid,
  .territory-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .pillars-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Móvil */
@media (max-width: 700px) {
  .home-section {
    padding: 64px 20px !important;
  }

  .home-hero-content {
    padding: 120px 20px 80px !important;
  }

  .news-grid,
  .principles-grid,
  .work-grid,
  .territory-grid,
  .pillars-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .principles-grid {
    margin-top: 42px !important;
  }

  .principles-grid > div {
    padding: 26px 0 !important;
    border-right: 0 !important;
    border-bottom: 1px solid #e0d3b6;
  }

  .principles-grid > div:last-child {
    border-bottom: 0;
  }

  .home-hero-title {
    font-size: clamp(42px, 14vw, 64px) !important;
  }

  .home-hero-lead {
    font-size: 18px !important;
  }

  .home-video {
    min-height: 580px !important;
  }

  .home-video > div:last-child {
    padding: 52px 20px 46px !important;
  }

  .home-video-title {
    font-size: clamp(30px, 9vw, 42px) !important;
  }

  .work-grid > div {
    padding: 26px 22px !important;
    gap: 18px !important;
  }

  .la-m2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Teléfonos estrechos */
@media (max-width: 420px) {
  .home-hero-badge {
    align-items: flex-start !important;
    border-radius: 16px !important;
    line-height: 1.5;
  }

  .news-list-item {
    align-items: flex-start !important;
    gap: 12px !important;
  }

  .news-list-item > div:first-child {
    width: 76px !important;
    height: 64px !important;
    flex-basis: 76px !important;
  }

  .la-m2 {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

@supports (width: 100dvw) {
  .home,
  .home > div {
    width: 100dvw;
  }
}

/* Impide que 01–04 se dividan verticalmente */
#lineas .work-grid > div > span:first-child {
  display: block !important;
  width: 56px !important;
  min-width: 56px !important;
  max-width: 56px !important;
  flex: 0 0 56px !important;

  white-space: nowrap !important;
  overflow-wrap: normal !important;
  word-break: normal !important;

  text-align: left;
}

#lineas .work-grid > div > div {
  min-width: 0;
  flex: 1 1 auto;
}

@media (max-width: 700px) {
  #lineas .work-grid > div > span:first-child {
    width: 46px !important;
    min-width: 46px !important;
    max-width: 46px !important;
    flex-basis: 46px !important;
    font-size: 38px !important;
  }
}