/* =========================
   RESET
========================= */
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

/* =========================
   BODY
========================= */
body{

    min-height: 100vh;

    overflow-x: hidden;

    background: linear-gradient(-45deg,
    #667eea,
    #764ba2,
    #6a11cb,
    #2575fc);

    background-size: 400% 400%;

    animation: fondoAnimado 12s ease infinite;

    position: relative;
}

/* =========================
   FONDO ANIMADO
========================= */
@keyframes fondoAnimado{

    0%{
        background-position: 0% 50%;
    }

    50%{
        background-position: 100% 50%;
    }

    100%{
        background-position: 0% 50%;
    }
}

/* =========================
   MARIPOSAS
========================= */
body::before,
body::after{

    content: "🦋";

    position: absolute;

    font-size: 45px;

    animation: volar 18s linear infinite;

    opacity: 0.8;
}

body::before{

    left: -10%;

    top: 20%;
}

body::after{

    left: -15%;

    top: 70%;

    animation-delay: 8s;
}

/* ANIMACION MARIPOSAS */
@keyframes volar{

    0%{
        transform: translateX(0) translateY(0) rotate(0deg);
    }

    25%{
        transform: translateX(30vw) translateY(-50px) rotate(15deg);
    }

    50%{
        transform: translateX(60vw) translateY(30px) rotate(-10deg);
    }

    75%{
        transform: translateX(90vw) translateY(-40px) rotate(10deg);
    }

    100%{
        transform: translateX(120vw) translateY(0px) rotate(0deg);
    }
}

/* =========================
   MENU
========================= */
.menu{

    width: 100%;

    padding: 18px;

    background: rgba(0,0,0,0.25);

    backdrop-filter: blur(8px);

    display: flex;

    justify-content: center;

    gap: 20px;

    position: sticky;

    top: 0;

    z-index: 1000;
}

/* LINKS */
.menu a{

    color: white;

    text-decoration: none;

    padding: 10px 18px;

    border-radius: 12px;

    transition: 0.4s;
}

/* HOVER */
.menu a:hover{

    background: rgba(255,255,255,0.2);

    color: yellow;

    transform: translateY(-3px);

    box-shadow: 0 0 12px rgba(255,255,255,0.5);
}

/* =========================
   TITULO
========================= */
.titulo{

    text-align: center;

    color: white;

    font-size: 45px;

    margin-top: 40px;

    margin-bottom: 40px;

    animation: brillo 2s infinite alternate;
}

/* BRILLO */
@keyframes brillo{

    from{
        text-shadow: 0 0 10px white;
    }

    to{
        text-shadow: 0 0 25px yellow;
    }
}

/* =========================
   CONTENEDOR
========================= */
.contenedor-ejercicios{

    width: 90%;

    margin: auto;

    display: flex;

    justify-content: center;

    gap: 30px;

    flex-wrap: wrap;
}

/* =========================
   TARJETAS
========================= */
.ejercicio{

    width: 320px;

    background: rgba(255,255,255,0.15);

    backdrop-filter: blur(10px);

    border-radius: 20px;

    padding: 25px;

    text-align: center;

    box-shadow: 0 10px 25px rgba(0,0,0,0.3);

    transition: 0.5s;

    animation: flotar 4s ease-in-out infinite;
}

/* EFECTO */
.ejercicio:hover{

    transform: translateY(-10px) scale(1.04);

    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
}

/* FLOTAR */
@keyframes flotar{

    0%{
        transform: translateY(0px);
    }

    50%{
        transform: translateY(-8px);
    }

    100%{
        transform: translateY(0px);
    }
}

/* TITULO TARJETA */
.ejercicio h4{

    color: #ffe600;

    font-size: 28px;

    margin-bottom: 15px;
}

/* TEXTO */
.ejercicio p{

    color: white;

    margin-bottom: 20px;

    line-height: 1.5;
}

/* BOTONES */
.ejercicio button{

    width: 100%;

    margin-bottom: 12px;

    padding: 12px;

    border: none;

    border-radius: 12px;

    background: linear-gradient(45deg,#ff6b6b,#ffb347);

    color: white;

    font-size: 16px;

    cursor: pointer;

    transition: 0.4s;
}

/* HOVER BOTON */
.ejercicio button:hover{

    transform: scale(1.05);

    box-shadow: 0 0 15px rgba(255,255,255,0.6);
}

/* =========================
   RESPONSIVE
========================= */
@media(max-width:768px){

    .menu{

        flex-wrap: wrap;
    }

    .titulo{

        font-size: 35px;
    }

    .ejercicio{

        width: 90%;
    }
}