.s21-kinder{
  position: relative;               
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: #fff;
  overflow: hidden;
}
.s21-bg{
  position: absolute;
  inset: 0;
  z-index: -2;
}
.s21-overlay{/* ====== Base ====== */
.s21-kinder{
  position: relative;               
  width: 100%;
  height: 100vh; /* se ajusta en móviles con media queries */
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: #fff;
  overflow: hidden;
  /* respeta notch/barras del sistema */
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.s21-bg{
  position: absolute;
  inset: 0;
  background: url("../../images/image-22.jpg") center/cover no-repeat;
  z-index: -2;
}

.s21-inner{
  width: min(1100px, 92vw);
  margin-left: clamp(18px, 6vw, 72px);
}

.s21-text h3{
  font-weight: 900;
  font-size: clamp(36px, 6vw, 64px) !important; /* bajamos mínimo para móviles */
  text-shadow: 0 8px 24px rgba(0,0,0,.35);
  margin: 0 0 12px 0;
}

.s21-text p{
  max-width: 52ch; /* legibilidad */
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 1.65;
  margin: 0;
}

/* ====== Preferencias de usuario ====== */
@media (prefers-reduced-motion: reduce) {
  .s21-bg, .s21-overlay {
    transition: none !important;
  }
}

/* ====== Altas densidades (mejor nitidez en pantallas retina) ====== */
@media (min-resolution: 2dppx) {
  .s21-bg{
    image-rendering: -webkit-optimize-contrast;
  }
}

/* ====== Dispositivos pequeños (móviles) ====== */
@media (max-width: 480px){
  .s21-kinder{
    height: auto;         /* deja que crezca según contenido */
    min-height: 100dvh;   /* asegura pantalla completa en móviles modernos */
    align-items: flex-end;/* empuja contenido hacia abajo, más natural en móvil */
  }

  .s21-inner{
    width: 92vw;
    margin-left: clamp(16px, 4vw, 24px);
    margin-bottom: 18dvh; /* espacio para separar del borde inferior */
  }

  .s21-text h3{
    font-size: clamp(28px, 9vw, 40px) !important;
    line-height: 1.1;
  }

  .s21-text p{
    font-size: clamp(14px, 4vw, 16px);
    max-width: 100%;
  }

  .s21-overlay{
    /* overlay más sólido para mejorar contraste en pantallas pequeñas */
    background: linear-gradient(
      to bottom,
      rgba(0,103,26,0.9) 0%,
      rgba(0,103,26,0.85) 40%,
      rgba(0,103,26,0.5) 80%,
      rgba(0,103,26,0) 100%
    );
  }

  .s21-pill{
    position: static;         /* evita solaparse con el contenido */
    align-self: flex-start;
    margin: 16px 0 20px 16px;
    padding: 12px 20px;
    font-size: clamp(16px, 5vw, 20px);
    border-radius: 999px;
    white-space: normal;      /* permite salto de línea */
  }
}

/* ====== Móviles en landscape (alto reducido) ====== */
@media (max-height: 500px) and (orientation: landscape){
  .s21-kinder{
    height: auto;
    min-height: 100dvh;
    align-items: center;
  }
  .s21-inner{
    margin-left: clamp(12px, 4vw, 32px);
    margin-bottom: 0;
  }
  .s21-text h3{
    font-size: clamp(22px, 5vw, 36px) !important;
  }
  .s21-pill{
    bottom: 12px;
    padding: 10px 18px;
    font-size: clamp(14px, 3.2vw, 18px);
  }
}

/* ====== Tablets (≥481px hasta 1024px) ====== */
@media (min-width: 481px) and (max-width: 1024px){
  .s21-kinder{
    min-height: 100dvh;
  }
  .s21-inner{
    width: min(820px, 92vw);
    margin-left: clamp(20px, 6vw, 48px);
  }
  .s21-text h3{
    font-size: clamp(34px, 6vw, 54px) !important;
  }
  .s21-text p{
    font-size: clamp(15px, 2.1vw, 18px);
  }
  .s21-pill{
    padding: 14px clamp(24px, 5vw, 40px);
    font-size: clamp(18px, 3.5vw, 28px);
  }
}

/* ====== Laptops/desktop grandes (≥1280px) ====== */
@media (min-width: 1280px){
  .s21-inner{
    width: min(1200px, 90vw);
    margin-left: clamp(48px, 7vw, 96px);
  }
  .s21-text p{
    max-width: 60ch;
  }
  .s21-pill{
    bottom: 36px;
    padding: 20px 64px;
    font-size: clamp(28px, 2.8vw, 44px);
  }
}

/* ====== Muy grandes (ultrawide) ====== */
@media (min-width: 1600px){
  .s21-overlay{
    /* extiende un poco el gradiente para que el texto no “flote” */
    background: linear-gradient(
      to right,
      rgba(0,103,26,0.92) 0%,
      rgba(0,103,26,0.78) 30%,
      rgba(0,103,26,0.5) 55%,
      rgba(0,103,26,0.2) 78%,
      rgba(0,103,26,0) 100%
    );
  }
}

/* ====== Soporte opcional de tema oscuro/claro (si usas variables) ====== */
@media (prefers-color-scheme: dark){
  .s21-text h3, .s21-text p{
    text-shadow: 0 8px 24px rgba(0,0,0,.45);
  }
}

  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
  rgba(0,103,26,0.92) 0%,
  rgba(0,103,26,0.78) 35%,
  rgba(0,103,26,0.45) 65%,
  rgba(0,103,26,0) 100%
  );
  z-index: -1;
}
.s21-inner{
  width: min(1100px, 92vw);
  margin-left: clamp(18px, 6vw, 72px);
}
.s21-text h3{
  font-weight: 900;
  font-size: clamp(42px, 6vw, 64px) !important;
  text-shadow: 0 8px 24px rgba(0,0,0,.35);
  margin: 0 0 12px 0;
}
.s21-text p{
  font-size: 20px;
  max-width: 520px;
  font-size: 20px;
  line-height: 1.65;
  margin: 0;
}
.s21-pill {
  position: absolute;
  right: 0;  
  bottom: 7rem;        
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 60px;
  font-weight: 900;
  font-size: clamp(28px, 4vw, 42px);
  color: #fff;
  background: linear-gradient(90deg, #00671a, #2c7e40);
  box-shadow: 0 10px 24px rgba(0,0,0,.28);
  border-radius: 999px 0 0 999px;
}

