/* ==========================================
   ESTILOS ORIGINALES (PC) - NO CAMBIADOS
   ========================================== */

#primeraSeccion {
    height: 100vh;
    overflow: clip !important;
    background: linear-gradient( #0e734e, #2f955f);
    position: relative;
    width: 100%;
    max-width: 100%;
    contain: layout paint;
}

section, header {
  max-width: 100%;
  overflow-x: hidden;
}
.clipper {
  overflow: clip;
  width: 100%;
}

#primeraSeccion > h1 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) skewX(-15deg) translateX(60px);
    transform-origin: center;
    text-shadow: 10px 10px 20px rgba(0,0,0,0.7);
    z-index: 999;
    color: white;
    font-size: 180px;
    white-space: nowrap;
    pointer-events: none;
    width: 90%;
}

.row-loop {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  height: 120px;
  position: relative;
  animation-delay: calc(var(--row) * 0.4s);
  padding: 30px 0;
  margin: -10px 0;
}

.band {
    display: flex;
    width: max-content;
    animation: loop-right 9s linear infinite;
}

.sequence {
    display: flex;
    gap: 10px;
    margin-right: 20px;
}

.sequence img {
    width: 60px;
    height: 60px;
    animation: bounce 0.8s ease infinite alternate;
    animation-delay: calc(var(--i) * 0.1s);
    
}

@keyframes bounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-20px); }
}

@keyframes loop-right {
  0%   { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

.showOnMobile { display: none; }

#dos {
    height: 768px;
    background-color: #f9fafb;
    justify-content: center;
    align-items: center;
    display: flex;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

#dos div {
    flex-direction: column;
    padding-bottom: 100px;
}

#dos div h1 {
    font-size: 70px;
    color: #166548;
}

#dos div p { color: #257f5d; }

#dos img {
  width: min(800px, 100%);
  height: auto;
  padding-top: 50px;
}

#tresa {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: white;
    flex-direction: column;
}

.divss {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    max-width: 1400px;
}

.rectang6 {
    background: linear-gradient(#329457, #09ac81);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    transition: all 0.3s ease;
    cursor: default;
    border: 5px solid #329457;
}

.rectang6:hover {
    background: white;
    color: black;
}

.rectang6 h1 {
    padding: 15px;
    font-weight: 800;
    font-size: 30px;
}

.rectang6 p {
    padding: 0px 20px 30px;
    text-align: justify;
}

#cinco {
    height: auto;
    background-color: white;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.logo-container {
    position: relative;
    width: 80vw;
    max-width: 400px;
    aspect-ratio: 1 / 1;
}

.ojoboton {
    width: 100%;
    height: auto;
    display: block;
}

.ojo-boton {
    position: absolute;
    top: 46%;
    left: 45%;
    width: 10%;
    aspect-ratio: 1 / 1;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 2;
}

#cincotext {
    max-width: 500px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

#cincotext h1 {
    font-size: 2.5rem;
    color: #166548;
    margin-bottom: 10px;
}

#cincotext p {
    color: #257f5d;
    font-size: 1rem;
}

/* ==========================================
   MEDIA QUERIES - ARREGLADAS Y ORDENADAS
   ========================================== */

/* TABLETS Y PANTALLAS MEDIANAS */
@media screen and (max-width: 1200px) {
    .divss {
        grid-template-columns: repeat(2, 1fr);
        width: 90%;
    }
}

/* MÓVILES (PWA PRINCIPAL) */
@media screen and (max-width: 880px) {
    .hideOnMobile { display: none; }

    .showOnMobile {
      color: white;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 40%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 999;
    }

    .showOnMobile h1 {
        font-size: 80px;
        text-shadow: 10px 10px 20px rgba(0,0,0,0.7);
        transform: skewX(-20deg);
    }

    #dos {
        height: auto;
        flex-direction: column;
        padding: 60px 20px;
        text-align: center;
    }

    #dos div { padding-bottom: 30px; }

    #dos div h1 { font-size: 40px; }

    #tresa { height: auto; padding: 50px 10px; }

    .divss {
        grid-template-columns: 1fr; /* Una sola columna para que sea fácil de leer en el cel */
        width: 100%;
    }

    #cinco { flex-direction: column; text-align: center; }

    #cincotext h1 { font-size: 2rem; }

    .ojo-boton { width: 12%; }
}

/* MODO HORIZONTAL (LANDSCAPE) */
@media screen and (max-height: 450px) {
    #header-responsive a { font-size: 20px; }
    #cerrar { font-size: 40px; top: 15px; right: 35px; }
}

/* NAVBAR RESPONSIVE */
#menu { display: none; }

@media screen and (max-width: 800px) {
    .nav, #inicia { display: none; }
}