/* Hero Section Responsive */
.hero {
    min-height: 70vh;
    background: linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.5));   
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    position: relative;
    overflow: visible;
    z-index: 1;
    padding-bottom: 6rem;
    padding-top: 3rem;
}
.hero2 {
    background-image: url('../img/fondo1.jpg');
    background-repeat: no-repeat;
    background-size: cover;
}

.hero-content {
    color: rgb(0, 0, 0);
    width: 100%;
    max-width: 1200px;
    text-align: center;
    padding: 2rem 0;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    text-align: center;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    color: rgba(0, 0, 0, 0.9);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* Form Responsive */
.form-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

.form-group {
    flex: 1;
    min-width: 250px;
    margin-bottom: 1rem;
}

.fondo {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    margin-top: 0;
    padding-top: 0;
}

.fondo img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.fondo p {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    text-align: center;
    z-index: 2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: bold;
    width: 100%;
}

.fondo p.texto-fondo {
    top: 30%;
    font-size: 3.5rem;
}

.fondo p:last-child {
    top: 39%;
    font-size: 2.5rem;
}

/* Responsive Adjustments */
    @media (max-width: 818px) {

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }
    .hero-content {
    width: 100%;


}
    .fondo p.texto-fondo {
        top: 34%;
        font-size: 2rem;
    }

    .fondo p:last-child {
        top: 39%;
        font-size: 2rem;
    }
}
    /* Responsive Adjustments */
    @media (max-width: 768px) {

    .hero {
        height: auto;
        min-height: 100vh;
        padding-top: 3rem;
        overflow: visible;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }
    .hero-content {
        width: 100%;
        position: relative;
        z-index: 2;
    }
    .fondo p.texto-fondo {
        top: 34%;
        font-size: 2rem;
    }

    .fondo p:last-child {
        top: 39%;
        font-size: 2rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }
    .fondo-video-text-content h1 {
        font-size: 2.5rem;
    }
    .fondo-video-text-content p {
        font-size: 1rem;
    }
    
    .animated-text {
        flex-direction: column;
        gap: 0.2rem;
        line-height: 1.1;
        max-height: 60vh;
        justify-content: center;
        align-items: center;
        margin-bottom: 1rem;
    }

        .animated-text-bottom {
        flex-direction: column;
        gap: 0.3rem;
        justify-content: center;
        align-items: center;
        margin-top: 0.5rem;
    }
    
    .text-word {
        margin: 0;
        font-size: 1rem;
        flex-shrink: 0;
        white-space: nowrap;
        text-align: center;
    }
}
    /* Responsive Adjustments */
    @media (max-width: 512px) {

    .hero {
        height: auto;
        min-height: 100vh;
        padding-top: 3rem;
        overflow: visible;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-content h1 {
        font-size: 1.3rem;
    }

    .hero p {
        font-size: 1.1rem;
    }
    
    .hero-about-transition {
        height: 80px;
        min-height: 80px;
    }
        .fondo p.texto-fondo {
        top: 35%;
        font-size: 1.7rem;
    }

    .fondo p:last-child {
        top: 40%;
        font-size: 1.7rem;
    }
}
    /* Responsive Adjustments */
    @media (max-width: 403px) {

    .hero {
        height: auto;
        min-height: 100vh;
        padding-top: 3remx;
        overflow: visible;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }
    
    .hero-about-transition {
        height: 80px;
        min-height: 80px;
    }
        .fondo p.texto-fondo {
        top: 35%;
        font-size: 1.2rem;
    }

    .fondo p:last-child {
        top: 40%;
        font-size: 1.2rem;
    }
       .hero-content {
    width: 100%;
}
}

.fondo-video {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    margin-top: 0;
    padding-top: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000; /* Fondo negro mientras carga el video */
}

.fondo-video-text-content {
    position: absolute;
    top: 80%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
}

.fondo-video-text-content h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.fondo-video-text-content p {
    font-size: 1.2rem;
    margin-top: 2rem;
    line-height: 1.6;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Estilos para el texto animado */
.animated-text {
    display: flex;
    flex-direction: row;
    gap: 2.5rem;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 2rem;
}
.animated-text .text-line {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    align-items: center;
}

/* "You Decide" siempre centrado debajo */
.animated-text-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 1rem;
}

.text-line {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.text-word {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
    font-size: 1.5rem;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    transition: transform 0.3s ease, color 0.3s ease;
}

/* Animación para cada línea con delay progresivo */
.text-line:nth-child(1) .text-word:nth-child(1) { animation-delay: 0.2s; }
.text-line:nth-child(1) .text-word:nth-child(2) { animation-delay: 0.4s; }
.text-line:nth-child(2) .text-word:nth-child(1) { animation-delay: 0.6s; }
.text-line:nth-child(2) .text-word:nth-child(2) { animation-delay: 0.8s; }
.text-line:nth-child(3) .text-word:nth-child(1) { animation-delay: 1.0s; }
.text-line:nth-child(3) .text-word:nth-child(2) { animation-delay: 1.2s; }

/* Animación para "You Decide" (línea inferior) */
.animated-text-bottom .text-line:nth-child(1) .text-word:nth-child(1) { animation-delay: 1.8s; }
.animated-text-bottom .text-line:nth-child(1) .text-word:nth-child(2) { animation-delay: 2.0s; }

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Efecto de hover para las palabras */
.text-word:hover {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.logo-video {
    position: absolute;
    bottom: 25px; /* Distancia desde la parte inferior */
    left: 50%;
    transform: translateX(-50%);
    z-index: 10; /* Asegura que esté sobre el video */
    width: 150px; /* Ajusta el tamaño según sea necesario */
will-change: transform; /* Optimización de renderizado */
    contain: layout style paint; /* Optimización de composición */
}

/* Optimización para LCP - mostrar logo inmediatamente en mobile */
@media (max-width: 900px) {
    .logo-video {
        position: relative !important;
        bottom: unset !important;
        left: unset !important;
        transform: none !important;
        margin: 0 auto;
        width: 100px;
        max-width: 30vw;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        will-change: auto; /* Desactivar will-change en mobile */
    }
    
    .logo-video img {
        width: 100%;
        height: auto;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .logo-video source {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

@media (max-width: 480px) {
    .fondo-video-text-content h1 {
        font-size: 2rem;
    }
    
    .animated-text {
        flex-direction: column;
        gap: 0.2rem;
        max-height: 50vh;
        margin-bottom: 0.5rem;
    }

        .animated-text-bottom {
        flex-direction: column;
        gap: 0.2rem;
        margin-top: 0.3rem;
    }
    
    .text-line {
        gap: 0.2rem;
    }
    
    .text-word {
        font-size: 1rem;
        margin: 0 0.1rem;
        flex-shrink: 0;
        text-align: center;
    }
}

@media (max-width: 360px) {
    .fondo-video-text-content h1 {
        font-size: 1.8rem;
    }
    
    .animated-text {
        flex-direction: column;
        gap: 0.15rem;
        max-height: 45vh;
        margin-bottom: 0.3rem;
    }

        .animated-text-bottom {
        flex-direction: column;
        gap: 0.15rem;
        margin-top: 0.2rem;
    }
    
    .text-line {
        gap: 0.15rem;
    }
    
    .text-word {
        font-size: 1rem;
        margin: 0 0.05rem;
        text-align: center;
    }
}

@media (max-width: 900px) and (max-height: 900px) and (orientation: landscape) {
    .hero {
        min-height: 70vh;
    }
    .hero h1, .hero-content h1, .fondo-video-text-content h1 {
        font-size: 1rem;
    }
    .hero p, .fondo-video-text-content p {
        font-size: 1rem;
    }
    .animated-text,
    .animated-text-bottom {
        margin-bottom: 2.5rem;
        margin-top: -0.2rem;
    }
    .logo-video {
        margin-top: 2.5rem;
        max-width: 120px;
    }
    /* Puedes agregar más ajustes aquí según lo que veas necesario */
}

@media (max-width: 1400px) and (max-height: 900px) and (orientation: landscape) {
    .animated-text .text-word,
    .animated-text-bottom .text-word {
        font-size: 1.2rem !important;
    }
    .animated-text,
    .animated-text-bottom {
        margin-bottom: 1rem;
    }
    .logo-video {
        margin-top: 1.3rem;
        max-width: 100px;
    }
    .hero h1, .hero-content h1, .fondo-video-text-content h1 {
        font-size: 1.1rem;
    }
    .hero p, .fondo-video-text-content p {
        font-size: 1.3rem;
        padding-top: 5rem;

    }
    .fondo-video-text-content {
        position: absolute;
        top: 80%;
        transform: translate(-50%, -50%);
        text-align: center;
        color: #fff;
        z-index: 2;
        width: 100%;
        max-width: 1200px;
        padding: 0 20px;

    }
    
}

@media (max-width: 1600px) and (max-height: 700px) and (orientation: landscape) {
    .fondo-video-text-content {
        position: absolute;
        top:75%;
        left: 50%;
        transform: translate(-50%, -50%);
        text-align: center;
        color: #fff;
        z-index: 2;
        width: 100%;
        max-width: 1200px;
        padding: 0 20px;
    }
}

/* --- AJUSTES RESPONSIVE PARA SEPARACIÓN TEXTO Y LOGO EN HERO --- */
@media (max-width: 900px), (orientation: landscape) and (max-height: 900px) {
  .fondo-video {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    height: 100vh;
    min-height: 100vw;
    position: relative;
    gap: 1.2rem;
    padding-bottom: 2.5rem;
  }
  .fondo-video-text-content {
    position: static !important;
    top: unset !important;
    left: unset !important;
    transform: none !important;
    margin-top: 0;
    margin-bottom: 0;
    width: 100%;
    max-width: 90vw;
    z-index: 2;
    padding: 0 10px;
  }
  .logo-video {
    position: static !important;
    margin-bottom: 0;
    margin-top: 0;
    width: 100px;
    max-width: 30vw;
    left: unset;
    transform: none;
  }
}

@media (max-width: 480px) {
  .fondo-video-text-content {
    margin-top: 0;
    margin-bottom: 0;
    max-width: 98vw;
    padding: 0 4vw;
  }
  .logo-video {
    margin-bottom: 0;
    margin-top: 0;
    width: 70px;
    max-width: 30vw;
  }
}

@media (max-width: 360px) {
  .fondo-video-text-content {
    margin-top: 0;
    margin-bottom: 0;
    max-width: 99vw;
    padding: 0 2vw;
  }
  .logo-video {
    margin-bottom: 0;
    margin-top: 0;
    width: 55px;
    max-width: 40vw;
  }
}
/* --- FIN AJUSTES RESPONSIVE HERO --- */