.fondo-imagen {
    background-image: url('../../repos/images/b3_1.jpg');
    background-size: cover;
    background-position: center;
    height: 70vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.capa-oscura {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    transition: background-color 0.5s ease;
}

.capa-oscura:hover {
    background-color: rgba(0, 0, 0, 0.2);
}

.caja-texto {
    position: relative;
    color: white;
    z-index: 1;
    max-width: 700px;
    padding: 30px;
    font-family: 'Montserrat', Arial, sans-serif;
}

.titulo-principal {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    position: relative;
}

.titulo-animado {
    display: inline-block;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0);
    position: relative;
}

.texto-descripcion {
    font-size: 1rem;
    margin: 15px auto 30px;
    line-height: 1.6;
    max-width: 80%;
    perspective: 100px;
    letter-spacing: .5px;
}

.descripcion-animada {
    display: inline-block;
}


.boton-historia {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border: 2px solid white;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
    overflow: hidden;
    position: relative;
}

.boton-historia::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: white;
    transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
    z-index: -1;
}

.boton-historia:hover {
    color: #222;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.boton-historia:hover::before {
    left: 0;
}

.boton-historia:hover .icon-arrow {
    transform: translateX(5px);
}

.icon-arrow {
    transition: transform 0.3s ease;
}

@keyframes lightPulse {

    0%,
    100% {
        text-shadow: 0 0 8px rgba(255, 255, 255, 0);
        transform: scale(1);
    }

    25% {
        text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
    }

    50% {
        text-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
        transform: scale(1.02);
    }

    75% {
        text-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
    }
}

@keyframes gentleTilt {

    0%,
    100% {
        transform: rotateX(0deg) rotateY(0deg);
    }

    25% {
        transform: rotateX(1deg) rotateY(1deg);
    }

    50% {
        transform: rotateX(0deg) rotateY(-1deg);
    }

    75% {
        transform: rotateX(-1deg) rotateY(0deg);
    }
}

@keyframes gentleTiltHover {

    0%,
    100% {
        transform: rotateX(0deg) rotateY(0deg) scale(1.02);
    }

    50% {
        transform: rotateX(2deg) rotateY(2deg) scale(1.02);
    }
}

@media (max-width: 768px) {
    .fondo-imagen {
        height: 60vh;
    }

    .caja-texto {
        padding: 0px;
        max-width: 100%;
    }

    .texto-descripcion {
        max-width: 100%;
    }

    .titulo-animado {
        /* animation: none; */
        text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    }

    .descripcion-animada {
        /* animation: none; */
    }
}

@media (max-width: 480px) {
    .fondo-imagen {
        height: 50vh;
    }

    .titulo-principal {
        font-size: 1.8rem;
        text-align: left;
    }

    .texto-descripcion {
        font-size: 0.9rem;
        margin-bottom: 20px;
        text-align: left;
    }

    .boton-historia {
        font-size: 14px;
        padding: 10px 15px;
        display: block;
        text-align: left;
        width: 222px;
    }
}

#historia-animate.animate__animated,
#historia-animate .animate__animated {
    opacity: 0;
}

.fondo-imagen.animate__fadeIn {
    animation: fadeInWithParallax 1.5s ease-out forwards;
}

@keyframes fadeInWithParallax {
    0% {
        opacity: 0;
        background-position: 50% 30%;
    }

    100% {
        opacity: 1;
        background-position: 50% 50%;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

#historia-animate.animate__fadeIn,
.titulo-animado.animate__fadeInDown,
.descripcion-animada.animate__fadeInLeft,
.boton-historia.animate__fadeInRight {
    opacity: 1 !important;
}

.titulo-principal {
    overflow: hidden;
}

.titulo-animado {
    display: inline-block;
}

.boton-historia.animate__fadeInRight {
    transition: all 0.5s ease;
}

.boton-historia.animate__fadeInRight:hover {
    transform: translateX(5px);
}


.animate__animated {
    opacity: 0;
}

.animate__fadeIn,
.animate__fadeInDown,
.animate__fadeInLeft,
.animate__fadeInRight {
    opacity: 1 !important;
}

.sticky-parent {
    position: relative;
    height: 75vh;
}

.sticky-section {
    position: sticky;
    top: 0;
    height: 100vh;
}