* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
}

html{
    scroll-behavior:smooth;
}

/* =====================================================
   ASISTENTE DORY
   ===================================================== */

.dory-asistente {
    position: fixed;

    right: 25px;

    /* Dory queda ENCIMA del botón de música */
    bottom: 105px;

    z-index: 9999;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    user-select: none;
}


/* =====================================================
   BOTÓN DORY
   ===================================================== */

.dory-boton {

    width: 82px;
    height: 82px;

    padding: 0;

    border: 4px solid white;

    border-radius: 50%;

    background: #cd70e9;

    cursor: pointer;

    overflow: visible;

    box-shadow:
        0 8px 25px
        rgba(0, 0, 0, .28);

    transition:
        transform .25s ease,
        box-shadow .25s ease;

    position: relative;

    animation:
        doryFlotar 3s ease-in-out infinite;

}


.dory-boton:hover {

    transform: scale(1.08);

    box-shadow:
        0 12px 30px
        rgba(0, 0, 0, .35);

}


.dory-boton:active {

    transform: scale(.96);

}


.dory-boton img {

    width: 100%;
    height: 100%;

    object-fit: cover;

    border-radius: 50%;

    display: block;

}


/* =====================================================
   NOTIFICACIÓN
   ===================================================== */

.dory-notificacion {

    position: absolute;

    top: -3px;
    right: -3px;

    width: 24px;
    height: 24px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #cc78e8;

    color: white;

    font-size: 13px;

    font-weight: 900;

    border: 2px solid white;

}


/* =====================================================
   VENTANA
   ===================================================== */

.dory-chat {
    position: absolute;

    right: 0;

    /* El chat aparece encima de Dory */
    bottom: 100px;

    width: 360px;
    height: 520px;

    background: #fff;

    border-radius: 25px;

    overflow: hidden;

    box-shadow:
        0 18px 45px
        rgba(0, 0, 0, .28);

    display: none;

    flex-direction: column;
}


.dory-chat.abierto {

    display: flex;

    animation:
        doryEntrada .3s ease;

}


/* =====================================================
   ENCABEZADO
   ===================================================== */

.dory-header {

    min-height: 75px;

    padding: 10px 15px;

    display: flex;

    align-items: center;

    gap: 11px;

    background:
        linear-gradient(
            135deg,
            #b815c4,
            #7008a8
        );

    color: white;

}


.dory-avatar {

    width: 50px;
    height: 50px;

    flex-shrink: 0;

    border-radius: 50%;

    overflow: hidden;

    border: 2px solid white;

}


.dory-avatar img {

    width: 100%;
    height: 100%;

    object-fit: cover;

    display: block;

}


.dory-titulo {

    min-width: 0;

}


.dory-header strong {

    display: block;

    font-size: 18px;

}


.dory-header span {

    display: block;

    margin-top: 3px;

    font-size: 12px;

    opacity: .85;

}


.dory-cerrar {

    margin-left: auto;

    width: 34px;
    height: 34px;

    border: none;

    border-radius: 50%;

    background:
        rgba(255,255,255,.15);

    color: white;

    font-size: 25px;

    line-height: 1;

    cursor: pointer;

    transition: .2s ease;

}


.dory-cerrar:hover {

    background:
        rgba(255,255,255,.28);

    transform: scale(1.08);

}


/* =====================================================
   MENSAJES
   ===================================================== */

.dory-mensajes {

    flex: 1;

    padding: 18px;

    overflow-y: auto;

    background:
        #f7f4f9;

    scroll-behavior: smooth;

}


.dory-mensaje {

    display: flex;

    gap: 8px;

    margin-bottom: 15px;

}


.dory-mensaje.dory {

    justify-content: flex-start;

}


.dory-mini-avatar {

    width: 32px;
    height: 32px;

    flex-shrink: 0;

    overflow: hidden;

    border-radius: 50%;

}


.dory-mini-avatar img {

    width: 100%;
    height: 100%;

    object-fit: cover;

    display: block;

}


.dory-burbuja {

    max-width: 82%;

    padding: 12px 15px;

    border-radius: 17px;

    font-size: 14px;

    line-height: 1.5;

    background: white;

    color: #403446;

    box-shadow:
        0 3px 9px
        rgba(0,0,0,.07);

    overflow-wrap: anywhere;

}


/* =====================================================
   MENSAJE DEL ESTUDIANTE
   ===================================================== */

.dory-mensaje.usuario {

    justify-content: flex-end;

}


.dory-mensaje.usuario .dory-burbuja {

    background: #f6dffa;

    border-bottom-right-radius: 5px;

}


/* =====================================================
   SUGERENCIAS
   ===================================================== */

.dory-sugerencias {

    display: flex;

    gap: 7px;

    padding: 9px;

    overflow-x: auto;

    background: white;

    border-top:
        1px solid #eee;

    scrollbar-width: thin;

}


.dory-sugerencias button {

    flex-shrink: 0;

    padding: 7px 11px;

    border:
        1px solid #cce8ef;

    border-radius: 20px;

    background: #f2fbfd;

    color: #73268b;

    font-size: 11px;

    font-weight: 700;

    cursor: pointer;

    transition: .2s ease;

}


.dory-sugerencias button:hover {

    background: #dff4fa;

    transform: translateY(-2px);

}


.dory-sugerencias button:active {

    transform: scale(.96);

}


/* =====================================================
   ENTRADA
   ===================================================== */

.dory-entrada {

    display: flex;

    gap: 8px;

    padding: 12px;

    background: white;

    border-top:
        1px solid #eee;

}


.dory-entrada input {

    flex: 1;

    min-width: 0;

    padding: 11px 13px;

    border:
        1px solid #ddd;

    border-radius: 22px;

    outline: none;

    font-family: inherit;

    font-size: 13px;

}


.dory-entrada input:focus {

    border-color: #ac51d0;

    box-shadow:
        0 0 0 3px
        rgba(81,181,208,.12);

}


.dory-entrada button {

    width: 42px;
    height: 42px;

    flex-shrink: 0;

    border: none;

    border-radius: 50%;

    background: #9815c4;

    color: white;

    font-size: 18px;

    cursor: pointer;

    transition: .2s ease;

}


.dory-entrada button:hover {

    transform: scale(1.08);

    background: #d68be3;

}


.dory-entrada button:active {

    transform: scale(.94);

}


/* =====================================================
   ANIMACIONES
   ===================================================== */

@keyframes doryFlotar {

    0%,
    100% {

        transform:
            translateY(0);

    }

    50% {

        transform:
            translateY(-7px);

    }

}


@keyframes doryEntrada {

    from {

        opacity: 0;

        transform:
            translateY(15px)
            scale(.96);

    }

    to {

        opacity: 1;

        transform:
            translateY(0)
            scale(1);

    }

}


/* =====================================================
   CELULAR
   ===================================================== */

@media (max-width: 600px) {

    .dory-asistente {
        right: 15px;

        /* Separación del botón de Música */
        bottom: 90px;
    }


    .dory-boton {

        width: 68px;

        height: 68px;

    }


    .dory-chat {

        position: fixed;

        left: 10px;
        right: 10px;

        bottom: 92px;

        width: auto;

        height: 500px;

        max-height:
            calc(100vh - 110px);

    }


    .dory-header {

        min-height: 68px;

    }


    .dory-mensajes {

        padding: 14px;

    }


    .dory-burbuja {

        max-width: 88%;

        font-size: 13px;

    }

}

body {
  background: #f5f7fa;
  color: #333
}

.reproductor-musica {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 9999;
}

#boton-musica {
    border: none;
    padding: 12px 20px;
    border-radius: 30px;
    background: #9b5fc7;
    color: white;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.18);
    transition: 0.3s ease;
}

#boton-musica:hover {
    transform: translateY(-4px) scale(1.05);
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  background: white;
  border-radius: 0 0 20px 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .08)
}

header a {
  text-decoration: none;
  color: #333
}

.Menu{
    background:#c38ecd;
    padding:0px 30px;
    border-radius:0 0 20px 20px;
    display:flex;
    justify-content:flex-end;
}

/* menú principal */

.menu{
    list-style:none;
    margin:0;
    padding:0;
}

.menu li{
    position:relative;
}

.menu li a{
    text-decoration:none;
    color:#222;
    font-size:20px;
    font-weight:bold;
    display:block;
    padding:10px 20px;
}

/* submenu */

.submenu{
    display:none;
    list-style:none;
    position:absolute;
    right:0;
    top:100%;

    margin:0;
    padding:0;   /* Muy importante */

    background:white;
    min-width:250px;
    border-radius:10px;
    box-shadow:0 5px 15px rgba(0,0,0,.2);
}

.submenu li a{
    color:#333;
    font-size:17px;
    padding:12px 18px;
}

.submenu li a:hover{
    background:#95659f;
}

/* mostrar */

.menu li:hover .submenu{
    display:block;
}

.MyName{
  margin-top: 15px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1.25rem;
  font-weight: bold
}

.logo img {
  height: 70px;
  border-radius: 50%
}

.Icono_Matemáticas {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.Icono_Matemáticas:hover {
  transform: scale(1.15);
    box-shadow: 0 0px 0px rgba(0, 0, 0, 0.2);
}

/* ================================
   CURSOR PERSONALIZADO
   ================================ */

html,
body {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M5 27 L7 20 L22 5 L27 10 L12 25 Z' fill='%239B59B6' stroke='%234B2354' stroke-width='1.5'/%3E%3Cpath d='M5 27 L7 20 L12 25 Z' fill='%23F5D6A0' stroke='%234B2354' stroke-width='1.2'/%3E%3Cpath d='M22 5 L25 2 L30 7 L27 10 Z' fill='%236C3483' stroke='%234B2354' stroke-width='1.5'/%3E%3Cpath d='M9 18 L14 23' stroke='%23FFFFFF' stroke-width='1.5'/%3E%3C/svg%3E") 5 5, auto;
}

/* Mantiene el cursor personalizado al pasar por textos y elementos */
a,
button,
summary,
details,
input,
textarea,
select,
label {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M5 27 L7 20 L22 5 L27 10 L12 25 Z' fill='%239B59B6' stroke='%234B2354' stroke-width='1.5'/%3E%3Cpath d='M5 27 L7 20 L12 25 Z' fill='%23F5D6A0' stroke='%234B2354' stroke-width='1.2'/%3E%3Cpath d='M22 5 L25 2 L30 7 L27 10 Z' fill='%236C3483' stroke='%234B2354' stroke-width='1.5'/%3E%3Cpath d='M9 18 L14 23' stroke='%23FFFFFF' stroke-width='1.5'/%3E%3C/svg%3E") 5 5, pointer;
}

nav a {
  margin-left: 18px;
  padding: 10px 16px;
  border-radius: 14px;
  transition: .3s
}

nav a:hover {
  background: #95659f;
  color: white
}

.centro {
  max-width: 1100px;
  margin: 40px auto;
  background: white;
  padding: 50px;
  border-radius: 28px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .08)
}

.centro img {
  width: 180px;
  border-radius: 50%;
  margin-bottom: 20px
}

.boton {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 24px;
  background: #95659f;
  color: white;
  text-decoration: none;
  border-radius: 16px
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 30px auto
}

.centro {
    background-image: url("../imageskaren/u_jnera66lrn-star-7089.gif");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    max-width: 1000px;
    margin: 50px auto;
    padding: 60px;
    background-color: white;
    border-radius: 30px;
    text-align: center;
}

.P-P{
    max-width:1100px;
    margin:60px auto;
    padding:35px;
    display:flex;
    align-items:center;
    gap:30px;
    background:#fff;
    border-radius:20px;
    box-shadow:0 5px 15px rgba(0,0,0,.1);
    transition:.3s;
}

.P-P:hover{
    transform:translateY(-5px);
    box-shadow:0 10px 20px rgba(0,0,0,.15);
}

.P-P img{
    width:220px;
    transition:.3s;
}

.P-P:hover img{
    transform:scale(1.08);
}

.P-P h1{
    color:#95659f;
    margin-bottom:15px;
}

.P-P p{
    text-align:justify;
    line-height:1.7;
    color:#444;
}

/* OBJETIVOS */

.titulo-seccion{
    text-align:center;
    font-size:42px;
    color:#95659f;
    margin:60px 0 35px;
}

/* Tarjeta grande */

.card-general{
    width:85%;
    margin:auto;
    background:white;
    border-radius:20px;
    padding:30px;
    display:flex;
    align-items:center;
    gap:30px;
    box-shadow:0 5px 15px rgba(0,0,0,.12);
    transition:.3s;
}

.card-general:hover{
    transform:translateY(-8px);
}

.card-general:hover img{
  transform:scale(1.08);
}

.card-general img{
    width:180px;
    
}

.texto-general h3{
    color:#95659f;
    font-size:32px;
    margin-bottom:15px;
}

.texto-general p{
    line-height:1.7;
    font-size:18px;
}

/* Tarjetas pequeñas */

.contenedor-objetivos{
    width:85%;
    margin:45px auto;
    display:flex;
    justify-content:space-between;
    gap:25px;
}

.card-objetivo{
    flex:1;
    background:white;
    border-radius:20px;
    padding:25px;
    text-align:center;
    box-shadow:0 5px 15px rgba(0,0,0,.12);
    transition:.3s;
}

.card-objetivo:hover{
    transform:translateY(-10px);
}

.encuestaimg{
  size: 200px;
}

.card-objetivo img{
    width:130px;
    margin-bottom:15px;
}

.card-objetivo:hover{
    transform:translateY(-5px);
    box-shadow:0 10px 20px rgba(0,0,0,.15);
}

.card-objetivo h3{
    color:#95659f;
    margin-bottom:15px;
}

.card-objetivo p{
    line-height:1.6;
}

.card-objetivo:hover img {
  transform:scale(1.08);
}

/*================ JUSTIFICACIÓN ================*/

.J{
    width:85%;
    margin:60px auto;
    background:white;
    border-radius:20px;
    padding:35px;
    display:flex;
    align-items:center;
    gap:30px;
    box-shadow:0 5px 15px rgba(0,0,0,.12);
    transition:.3s;
}

.J:hover{
    transform:translateY(-8px);
    box-shadow:0 10px 20px rgba(0,0,0,.18);
}

.J img{
    width:180px;
    transition:.3s;
}

.J:hover img{
    transform:scale(1.08);
}

.texto-j{
    flex:1;
}

.texto-j h1{
    color:#95659f;
    margin-bottom:15px;
}

.texto-j p{
    text-align:justify;
    line-height:1.7;
    color:#444;
}

/*================ HIPÓTESIS ================*/

.titulo-hipotesis{
    text-align:center;
    color:#95659f;
    font-size:40px;
    margin:60px 0 35px;
}

.contenedor-hipotesis{
    width:85%;
    margin:auto;
    display:flex;
    justify-content:space-between;
    gap:25px;
    flex-wrap:wrap;
}

.card-hipotesis{
    flex:1;
    min-width:280px;
    background:white;
    border-radius:20px;
    padding:30px;
    text-align:center;
    box-shadow:0 5px 15px rgba(0,0,0,.12);
    transition:.3s;
}

.card-hipotesis:hover{
    transform:translateY(-10px);
    box-shadow:0 10px 20px rgba(0,0,0,.18);
}

.card-hipotesis img{
    width:150px;
    margin-bottom:15px;
    transition:.3s;
}

.card-hipotesis:hover img{
    transform:scale(1.1);
}

.card-hipotesis h2{
    color:#95659f;
    font-size:40px;
    margin:10px 0;
}

.card-hipotesis h3{
    color:#555;
    margin-bottom:15px;
}

.card-hipotesis p{
    text-align:justify;
    line-height:1.6;
    color:#444;
}

/*================ RESUMEN Y ABSTRACT ================*/

.titulo-ra{
    text-align:center;
    color:#95659f;
    font-size:40px;
    margin:60px 0 35px;
}

.contenedor-ra{
    width:85%;
    margin:auto;
    display:flex;
    justify-content:center;
    gap:35px;
    flex-wrap:wrap;
}

.card-ra{
    width:420px;
    min-height:600px;
    background:white;
    border-radius:20px;
    padding:30px;
    text-align:center;
    box-shadow:0 5px 15px rgba(0,0,0,.12);
    transition:.3s;
}

.card-ra:hover{
    transform:translateY(-10px);
    box-shadow:0 10px 20px rgba(0,0,0,.18);
}

.card-ra img{
    width:250px;
    margin-bottom:20px;
    transition:.3s;
}

.card-ra:hover img{
    transform:scale(1.08);
}

.card-ra h2{
    color:#95659f;
    margin-bottom:20px;
}

.card-ra p{
    text-align:justify;
    line-height:1.8;
    color:#444;
}

/*=============== MARCO TEÓRICO ===============*/

.marco-teorico {
    padding: 70px 6%;
}

.marco-teorico h1 {
    text-align: center;
    color: #9860b5;
    font-size: 45px;
    margin-bottom: 35px;
}

.marco-card {
    display: flex;
    align-items: center;
    gap: 45px;
    background: white;
    padding: 40px;
    border-radius: 30px;
    box-shadow: 0 10px 25px #00000015;
}

.marco-imagen img {
    width: 250px;
    transition: .3s;
}

.marco-imagen img:hover {
    transform: scale(1.08) rotate(-2deg);
}

.marco-contenido {
    flex: 1;
}

.marco-contenido h2 {
    color: #9860b5;
}

.marco-contenido p {
    line-height: 1.7;
    text-align: justify;
}

/* =====================================================
   MARCO TEÓRICO
   ===================================================== */

.marco-seccion {
    width: 92%;
    max-width: 1450px;
    margin: 0 auto;
    padding: 60px 0 90px;
}


/* TÍTULO */

.titulo-marco {
    text-align: center;
    font-size: 48px;
    color: #925eb5;
    margin-bottom: 18px;
    font-weight: 700;
}

.intro-marco {
    max-width: 950px;
    margin: 0 auto 55px;
    text-align: center;
    font-size: 18px;
    line-height: 1.7;
    color: #30303a;
}

/* ==========================================
   SECCIÓN DE EVIDENCIAS
   ========================================== */

.evidencias-seccion {
    width: 90%;
    max-width: 1200px;
    margin: 70px auto;
    padding: 20px;
}

.descripcion-evidencias {
    text-align: center;
    max-width: 750px;
    margin: -10px auto 45px;
    line-height: 1.7;
    font-size: 1.05rem;
}


/* ==========================================
   BLOQUES
   ========================================== */

.bloque-evidencias {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 22px;
    padding: 30px;
    margin-bottom: 35px;

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.10);

    border: 2px solid rgba(153, 89, 184, 0.15);
}


/* ==========================================
   ENCABEZADO DE CADA BLOQUE
   ========================================== */

.encabezado-evidencia {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 25px;
}

.icono-evidencia {
    font-size: 2.4rem;
    min-width: 55px;
    text-align: center;
}

.encabezado-evidencia h3 {
    margin: 0 0 6px;
    font-size: 1.5rem;
}

.encabezado-evidencia p {
    margin: 0;
    line-height: 1.5;
}


/* ==========================================
   GALERÍA
   ========================================== */

.galeria-evidencias {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}


/* ==========================================
   TARJETAS DE FOTOS
   ========================================== */

.evidencia-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;

    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.10);

    transition: transform 0.25s ease,
                box-shadow 0.25s ease;
}

.evidencia-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.15);
}

.evidencia-card img {
    display: block;
    width: 100%;
    height: 230px;
    object-fit: cover;
}

.evidencia-card p {
    text-align: center;
    margin: 0;
    padding: 13px 10px;
    font-weight: 600;
}


/* ==========================================
   KAHOOT: DOS FOTOS CENTRADAS
   ========================================== */

.kahoot-galeria {
    grid-template-columns: repeat(2, minmax(250px, 400px));
    justify-content: center;
}


/* ==========================================
   ADAPTACIÓN PARA CELULAR
   ========================================== */

@media (max-width: 850px) {

    .galeria-evidencias {
        grid-template-columns: repeat(2, 1fr);
    }

}

@media (max-width: 600px) {

    .evidencias-seccion {
        width: 94%;
        padding: 10px;
    }

    .bloque-evidencias {
        padding: 20px;
    }

    .encabezado-evidencia {
        align-items: flex-start;
    }

    .icono-evidencia {
        font-size: 2rem;
    }

    .encabezado-evidencia h3 {
        font-size: 1.25rem;
    }

    .galeria-evidencias,
    .kahoot-galeria {
        grid-template-columns: 1fr;
    }

    .evidencia-card img {
        height: 250px;
    }

}


/* =====================================================
   BLOQUES PRINCIPALES
   ===================================================== */

.bloque-marco {
    background: white;
    border-radius: 28px;
    padding: 45px 55px;
    margin-bottom: 35px;

    box-shadow: 0 12px 30px rgba(90, 70, 110, 0.12);

    display: flex;
    align-items: center;
    gap: 45px;

    transition: transform 0.35s ease,
                box-shadow 0.35s ease;
}


/* HOVER */

.bloque-marco:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(120, 80, 150, 0.20);
}


/* =====================================================
   ICONOS
   ===================================================== */

.icono-marco {
    min-width: 300px;
    width: 150px;
    height: 400px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10%;

    background: #f3e7fa;

    transition: transform 0.4s ease;
}

.bloque-marco:hover .icono-marco {
    transform: rotate(-5deg) scale(1.08);
}

.icono-marco img {
    width: 240px;
    height: 600px;
    object-fit: contain;
    border-radius: 10%;
}

.icono-marco2 {
    width: 400px;
    min-width: 400px;
    height: 280px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f3e7fa;
    border-radius: 12%;
    padding: 20px;

    transition: transform 0.4s ease;
}

.bloque-marco:hover .icono-marco2 {
    transform: rotate(-3deg) scale(1.05);
}

.icono-marco2 img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8%;
}


/* =====================================================
   CONTENIDO
   ===================================================== */

.contenido-marco {
    flex: 1;
}

.etiqueta-marco {
    display: inline-block;

    font-size: 13px;
    letter-spacing: 3px;
    font-weight: bold;

    color: #9a62b7;

    margin-bottom: 8px;
}

.contenido-marco h2 {
    color: #925eb5;
    font-size: 29px;
    margin: 5px 0 20px;
}

.contenido-marco p {
    font-size: 17px;
    line-height: 1.75;
    color: #25252c;

    text-align: justify;

    margin-bottom: 15px;
}


/* =====================================================
   FUNDAMENTOS MATEMÁTICOS
   ===================================================== */

.bloque-matematico {
    background: linear-gradient(
        135deg,
        #ffffff 0%,
        #faf3ff 100%
    );
}


/* =====================================================
   FIGURA
   ===================================================== */

.figura-marco {
    width: 38%;
    min-width: 300px;

    text-align: center;

    padding: 20px;

    border-radius: 20px;

    background: #f7f2fa;

    transition: transform 0.4s ease;
}

.bloque-matematico:hover .figura-marco {
    transform: scale(1.04) rotate(1deg);
}

.figura-marco img {
    width: 100%;
    border-radius: 12px;
}

.figura-marco span {
    display: block;

    margin-top: 12px;

    font-size: 13px;
    font-style: italic;

    color: #666;
}


/* =====================================================
   MARCO LEGAL
   ===================================================== */

.bloque-legal {
    border-left: 10px solid #b77aca;
}


/* =====================================================
   ANTECEDENTES
   ===================================================== */

.bloque-antecedentes {
    display: block;
}

.bloque-antecedentes .contenido-marco {
    width: 100%;
}

.antecedente {
    padding: 18px 22px;
    margin: 18px 0;

    border-left: 4px solid #b77aca;

    background: #faf7fc;
    border-radius: 0 15px 15px 0;

    transition: transform 0.3s ease,
                background 0.3s ease;
}

.antecedente:hover {
    transform: translateX(8px);
    background: #f4eafa;
}

.antecedente h3 {
    color: #925eb5;
    margin: 0 0 8px;
    font-size: 20px;
}

.antecedente p {
    margin: 0;
}

/*=============== METODOLOGÍA ===============*/

.titulo-metodologia{
    text-align:center;
    font-size:42px;
    color:#95659f;
    margin:60px 0;
}

/* Línea del proceso */

.timeline{
    width:90%;
    margin:auto;
    display:flex;
    justify-content:center;
    align-items:center;
    margin-bottom:60px;
}

.paso{
    text-align:center;
}

.circulo{
    width:70px;
    height:70px;
    border-radius:50%;
    background:#b77dd1;
    color:white;
    font-size:28px;
    font-weight:bold;
    display:flex;
    justify-content:center;
    align-items:center;
    transition:.3s;
}

.circulo:hover{
    transform:scale(1.15);
    background:#95659f;
}

.linea{
    width:90px;
    height:5px;
    background:#d6b6eb;
    margin:0 15px;
}

.paso h3{
    margin-top:12px;
    color:#666;
    font-size:18px;
}

/* Tarjetas */

.contenedor-metodologia{
    width:90%;
    margin:auto;
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:30px;
}

.mini-metodo{
    background:white;
    border-radius:20px;
    padding:30px;
    text-align:center;
    box-shadow:0 5px 15px rgba(0,0,0,.12);
    transition:.3s;
}

.mini-metodo:hover{
    transform:translateY(-10px);
}

.mini-metodo img{
    width:250px;
    margin-bottom:15px;
    transition:.3s;
}

.mini-metodo:hover img{
    transform:scale(1.1);
}

.mini-metodo h3{
    color:#95659f;
    margin-bottom:10px;
}

.mini-metodo p{
    line-height:1.6;
}

/* =========================================
   METODOLOGÍA
   ========================================= */

.metodologia {
    padding: 70px 8%;
    background: #fffafd;
}


/* ENCABEZADO */

.metodologia-encabezado {
    max-width: 850px;
    margin: 0 auto 35px;
    text-align: center;
}

.etiqueta-metodologia {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgb(236, 212, 238);
    color: #8e44ad;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
}

.metodologia-encabezado h2 {
    margin: 12px 0;
    color: #493650;
    font-size: 34px;
}

.metodologia-encabezado p {
    color: #6c6270;
    line-height: 1.7;
    font-size: 15px;
}


/* DATOS GENERALES */

.datos-metodologia {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    max-width: 1000px;
    margin: 0 auto 55px;
}

.dato-metodologia {
    background: white;
    border: 1px solid #7f179f;
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    box-shadow: 0 3px 12px rgba(100, 70, 110, 0.06);
}

.dato-metodologia span {
    display: block;
    color: #441655;
    font-size: 11px;
    letter-spacing: 1px;
    margin-bottom: 7px;
}

.dato-metodologia strong {
    color: #493650;
    font-size: 14px;
}


/* TÍTULO INTERVENCIONES */

.intervenciones {
    max-width: 1200px;
    margin: auto;
}

.intervenciones > h3 {
    text-align: center;
    color: #493650;
    font-size: 24px;
    margin-bottom: 25px;
}


/* TARJETAS */

.tarjetas-intervenciones {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}

.tarjeta-intervencion {
    position: relative;
    background: rgb(239, 224, 240);
    border: 1px solid #eee2f2;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 5px 18px rgba(100, 70, 110, 0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tarjeta-intervencion:hover {
    transform: translateY(-4px);
    box-shadow: 0 9px 24px rgba(100, 70, 110, 0.12);
}


/* NÚMERO */

.numero-intervencion {
    position: absolute;
    top: 18px;
    right: 20px;

    color: #b59bc0;
    font-size: 13px;
    font-weight: 600;
}


/* ICONO */

.icono-intervencion {
    width: 45px;
    height: 45px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f4eafa;
    border-radius: 12px;

    font-size: 22px;
    margin-bottom: 18px;
}


/* TÍTULO */

.tarjeta-intervencion h4 {
    margin: 0 0 12px;
    color: #493650;
    font-size: 20px;
}


/* DESCRIPCIÓN */

.tarjeta-intervencion > p {
    color: #6b626f;
    font-size: 14px;
    line-height: 1.65;
    margin-bottom: 20px;
}


/* DETALLES */

.intervencion-detalle {
    border-top: 1px solid #f0e8f3;
    padding-top: 12px;
    margin-top: 12px;
}

.intervencion-detalle strong {
    display: block;
    color: #8e44ad;
    font-size: 12px;
    margin-bottom: 4px;
}

.intervencion-detalle span {
    display: block;
    color: #665c69;
    font-size: 13px;
    line-height: 1.5;
}


/* RESPONSIVE */

@media (max-width: 850px) {

    .datos-metodologia {
        grid-template-columns: repeat(2, 1fr);
    }

    .tarjetas-intervenciones {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 500px) {

    .metodologia {
        padding: 50px 5%;
    }

    .datos-metodologia {
        grid-template-columns: 1fr;
    }

}

/*================ RESULTADOS ================*/

.titulo-resultados{
    text-align:center;
    font-size:42px;
    color:#95659f;
    margin:70px 0 40px;
}

/* Caja de cada intervención */

.intervencion{
    width:88%;
    margin:25px auto;
    background:white;
    border-radius:20px;
    box-shadow:0 5px 15px rgba(0,0,0,.12);
    overflow:hidden;
}

.intervencion>summary{
    padding:22px 28px;
    cursor:pointer;
    font-size:24px;
    font-weight:bold;
    color:#95659f;
    list-style:none;
    background:#f7efff;
}

.intervencion>summary::-webkit-details-marker{
    display:none;
}

.intervencion>summary::after{
    content:"▼";
    float:right;
    transition:.3s;
}

.intervencion[open]>summary::after{
    transform:rotate(180deg);
}

/* Figuras */

.figura{
    margin:20px;
    background:#fafafa;
    border-radius:15px;
    border-left:6px solid #b77dd1;
}

.figura summary{
    padding:18px;
    cursor:pointer;
    font-size:19px;
    font-weight:bold;
    color:#555;
    list-style:none;
}

.figura summary::-webkit-details-marker{
    display:none;
}

.figura summary::after{
    content:"+";
    float:right;
    font-size:24px;
    color:#95659f;
}

.figura[open] summary::after{
    content:"−";
}

.figura img{
    width:500px;
    display:block;
    margin:20px auto;
    border-radius:15px;
    box-shadow:0 4px 12px rgba(0,0,0,.15);
}

.figura p{
    padding:0 25px 25px;
    text-align:justify;
    line-height:1.7;
}

.figura img {
    transition: 0.3s;
    max-width: 90%;
    display: block;
    margin: 15px auto;
}

.figura img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* DISCUSIÓN */

.titulo-seccion {
    text-align: center;
    color: #9565b9;
    font-size: 40px;
}

.card-discusion {
    background: white;
    width: 85%;
    margin: 30px auto;
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.12);
}

.card-discusion h2 {
    color: #9565b9;
}

.card-discusion p {
    font-size: 18px;
    line-height: 1.6;
    text-align: justify;
}

/* ===== DISCUSIÓN, CONCLUSIONES Y RECOMENDACIONES ===== */

.seccion-final {
    padding: 50px 5%;
}

.titulo-final {
    text-align: center;
    color: #9565b9;
    font-size: 42px;
    margin-bottom: 35px;
}


/* ===== DISCUSIÓN ===== */

.contenedor-discusion {
    width: 90%;
    margin: auto;
}

.card-discusion {
    background: #f8efff;
    margin: 20px 0;
    border-radius: 20px;
    box-shadow: 0 6px 15px rgba(0,0,0,.12);
    overflow: hidden;
    transition: .3s;
}

.card-discusion:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 22px rgba(0,0,0,.18);
}

.card-discusion summary {
    cursor: pointer;
    padding: 25px 30px;
    color: #9565b9;
    font-size: 23px;
    font-weight: bold;
    list-style: none;
}

.card-discusion summary::after {
    content: "▼";
    float: right;
    transition: .3s;
}

.card-discusion[open] summary::after {
    transform: rotate(180deg);
}

.contenido-discusion {
    background: white;
    padding: 25px 35px;
}

.contenido-discusion p {
    font-size: 17px;
    line-height: 1.6;
    text-align: justify;
}

/* CONCLUSIONES */

.conclusiones{
    padding:60px 7%;
}

.titulo-conclusiones{
    text-align:center;
    color:#9565b9;
    font-size:48px;
    margin-bottom:15px;
}

.intro-conclusiones{
    text-align:center;
    max-width:900px;
    margin:0 auto 60px;
    font-size:18px;
}

/* línea central */

.ruta-conclusiones{
    position:relative;
    max-width:1100px;
    margin:auto;
}

.ruta-conclusiones::before{
    content:"";
    position:absolute;
    left:50%;
    top:0;
    bottom:0;
    width:4px;
    background:#c38ecd;
    transform:translateX(-50%);
}

/* cada conclusión */

.conclusion{
    width:44%;
    background:white;
    padding:25px;
    margin:35px 0;
    border-radius:20px;
    box-shadow:0 8px 20px #0002;
    position:relative;
    transition:.3s;
}

.conclusion:nth-child(even){
    margin-left:56%;
}

.conclusion:hover{
    transform:translateY(-8px) scale(1.02);
    box-shadow:0 15px 30px #9565b955;
}

.numero{
    color:#9565b9;
    font-size:25px;
    font-weight:bold;
}

.icono{
    font-size:32px;
    margin:8px 0;
}

.conclusion h2{
    color:#9565b9;
    margin:8px 0;
}

.conclusion p{
    line-height:1.6;
    text-align:justify;
}

.icono-conclusion img {
    width: 240px;
    height: 240px;
    object-fit: contain;
    transition: 0.3s;
}

.icono-conclusion img:hover {
    transform: translateY(-6px) scale(1.1);
}

/* RECOMENDACIONES */

.recomendaciones{
    padding:80px 8%;
}

.recomendaciones > h1{
    text-align:center;
    color:#9565b9;
    font-size:48px;
    margin-bottom:50px;
}

.recomendacion-final{
    max-width:1100px;
    margin:auto;
    background:white;
    border-radius:30px;
    padding:45px;
    display:flex;
    align-items:center;
    gap:50px;
    box-shadow:0 10px 30px #0002;
    border-left:8px solid #c38ecd;
    transition:.3s;
}

.recomendacion-final:hover{
    transform:translateY(-7px);
    box-shadow:0 18px 35px #9565b955;
}

.recomendacion-icono{
    font-size:90px;
    transition:.3s;
}

.recomendacion-final:hover .recomendacion-icono{
    transform:rotate(-8deg) scale(1.1);
}

.subtitulo-recomendacion {
    margin-bottom: 8px;
    color: #8454a8;
    font-weight:bold;
    letter-spacing:2px;
}

.titulo-recomendacion {
    margin-top: 0;
    margin-bottom: 12px;
    color:#9565b9;
    font-size:28px;
}

.recomendacion-texto p{
    line-height:1.7;
    text-align:justify;
}


/* =====================================================
   REFERENCIAS
   ===================================================== */

.referencias-marco {
    width: 82%;
    margin: 70px auto 40px;

    background: #f0def4;

    border-radius: 25px;

    padding: 35px 50px;

    display: flex;
    align-items: center;

    gap: 35px;

    box-shadow: 0 10px 28px rgba(80, 60, 100, 0.12);

    transition: transform 0.35s ease,
                box-shadow 0.35s ease;
}


/* posición diferente */

.referencias-marco:hover {
    transform: translateX(12px);
    box-shadow: 0 18px 35px rgba(120, 80, 150, 0.18);
}

.referencias-icono {
    width: 110px;
    height: 110px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f2e6f8;

    border-radius: 25px;

    transition: transform 0.4s ease;
}

.referencias-marco:hover .referencias-icono {
    transform: rotate(6deg) scale(1.08);
}

.referencias-icono img {
    width: 70px;
}

.referencias-marco h2 {
    color: #925eb5;
    font-size: 30px;
    margin: 5px 0 12px;
}

.referencias-marco p {
    font-size: 16px;
    line-height: 1.6;
}


/* LISTA DE REFERENCIAS */

.referencias-lista {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.referencias-lista span {
    padding: 8px 14px;

    border-radius: 20px;

    background: #f3eafa;

    color: #80519e;

    font-size: 14px;

    transition: transform 0.25s ease,
                background 0.25s ease;
}

.referencias-lista span:hover {
    transform: translateY(-4px);
    background: #e7d4f2;
}

/* =========================================
   REFERENCIAS DESPLEGABLES
   ========================================= */

.referencias-lista {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: 24px;
    width: 100%;
}

.referencia-item {
    width: 100%;
    border: 1px solid rgba(142, 68, 173, 0.18);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.72);
    overflow: hidden;
    transition: all 0.25s ease;
}

.referencia-item:hover {
    border-color: rgba(142, 68, 173, 0.38);
    box-shadow: 0 4px 12px rgba(142, 68, 173, 0.08);
}


/* BOTÓN DE LA REFERENCIA */

.referencia-item button {
    width: 100%;
    display: flex;
    align-items: center;

    background: transparent;
    color: #4a3b52;

    border: none;
    padding: 13px 16px;

    font-family: inherit;
    font-size: 14px;
    font-weight: 500;

    cursor: pointer;
    text-align: left;

    transition: all 0.2s ease;
}

.referencia-item button:hover {
    background: rgba(142, 68, 173, 0.055);
    color: #732d91;
}


/* CUADRADITO MORADO */

.referencia-item button::before {
    content: "▪";
    color: #8e44ad;
    font-size: 20px;
    line-height: 1;
    margin-right: 10px;
}


/* SIGNO + */

.referencia-item button::after {
    content: "+";

    color: #8e44ad;

    font-size: 18px;
    font-weight: 400;

    margin-left: auto;
    padding-left: 15px;

    transition: transform 0.2s ease;
}


/* SIGNO − CUANDO ESTÁ ABIERTA */

.referencia-item button.abierto::after {
    content: "−";
}


/* REFERENCIA COMPLETA */

.referencia-completa {
    display: none;

    padding: 0 18px 17px 40px;

    background: rgba(142, 68, 173, 0.035);

    color: #5b5260;

    font-size: 13px;
    line-height: 1.65;

    border-top: 1px solid rgba(142, 68, 173, 0.08);
}


/* REFERENCIA ABIERTA */

.referencia-completa.mostrar {
    display: block;
    animation: aparecerReferencia 0.25s ease;
}


/* ANIMACIÓN */

@keyframes aparecerReferencia {

    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}

/* =====================================================
   EVIDENCIAS
   ===================================================== */

.evidencias-marco {
    width: 88%;
    margin: 65px auto 0;

    padding: 45px;

    background: #272333;

    border-radius: 30px;

    color: white;

    display: flex;
    align-items: center;
    gap: 45px;

    box-shadow: 0 15px 35px rgba(30, 25, 40, 0.25);

    transition: transform 0.35s ease;
}

.evidencias-marco:hover {
    transform: translateY(-7px);
}

.evidencia-texto {
    flex: 1;
}

.evidencia-texto .etiqueta-marco {
    color: #d9b6e9;
}

.evidencia-texto h2 {
    font-size: 30px;
    margin: 8px 0 18px;
}

.evidencia-texto p {
    font-size: 17px;
    line-height: 1.7;
}


/* IMAGEN DE EVIDENCIA */

.evidencia-imagen {
    width: 38%;
}

.evidencia-imagen img {
    width: 100%;

    border-radius: 18px;

    display: block;

    transition: transform 0.4s ease;
}

.evidencias-marco:hover .evidencia-imagen img {
    transform: scale(1.04);
}

.evidencia-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;

    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.10);

    transition: transform 0.25s ease,
                box-shadow 0.25s ease;
}

.evidencia-card img {
    display: block;
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.evidencia-card p {
    text-align: center;
    margin: 0;
    padding: 15px 10px;
    font-weight: 600;
}

/* CENTRAR LAS DOS EVIDENCIAS DE NOTAS ADHESIVAS */

.notas-galeria {
    display: grid;
    grid-template-columns: repeat(2, minmax(250px, 400px));
    justify-content: center;
    gap: 25px;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 900px) {

    .bloque-marco {
        flex-direction: column;
        padding: 35px 30px;
    }

    .figura-marco {
        width: 100%;
    }

    .referencias-marco {
        width: 90%;
        flex-direction: column;
        text-align: center;
    }

    .evidencias-marco {
        width: 85%;
        flex-direction: column;
    }

    .evidencia-imagen {
        width: 100%;
    }

}

/* =========================================
   JUEGOS INTERACTIVOS
   ========================================= */

.seccion-juegos {
    min-height: 100vh;
    padding: 90px 7% 80px;
    position: relative;
    overflow: hidden;
}


/* =========================================
   DECORACIÓN DEL FONDO
   ========================================= */

.seccion-juegos::before {
    content: "";
    position: absolute;

    width: 420px;
    height: 420px;

    border-radius: 50%;

    background: rgba(190, 140, 220, 0.12);

    top: 40px;
    left: -180px;

    filter: blur(5px);

    z-index: -1;
}

.seccion-juegos::after {
    content: "";

    position: absolute;

    width: 350px;
    height: 350px;

    border-radius: 50%;

    background: rgba(155, 89, 182, 0.10);

    right: -150px;
    bottom: 20px;

    filter: blur(5px);

    z-index: -1;
}


/* =========================================
   ENCABEZADO
   ========================================= */

.encabezado-juegos {
    text-align: center;
    max-width: 850px;

    margin: 0 auto 65px;
}

.etiqueta-juegos {
    display: inline-block;

    font-size: 14px;
    font-weight: 700;

    letter-spacing: 4px;

    color: #9b59b6;

    margin-bottom: 12px;
}

.encabezado-juegos h1 {
    font-size: 52px;

    margin: 0 0 15px;

    color: #965bb4;

    font-weight: 700;
}

.encabezado-juegos p {
    font-size: 19px;

    line-height: 1.6;

    color: #333;

    margin: 0 auto;

    max-width: 750px;
}


/* =========================================
   CONTENEDOR DE LAS TARJETAS
   ========================================= */

.contenedor-juegos {

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 28px;

    max-width: 1250px;

    margin: auto;

    align-items: stretch;
}


/* =========================================
   TARJETAS
   ========================================= */

.juego-card {

    position: relative;

    background: white;

    border-radius: 30px;

    padding: 22px;

    min-height: 520px;

    display: flex;

    flex-direction: column;

    overflow: hidden;

    box-shadow:
        0 15px 35px rgba(70, 40, 90, 0.10);

    transition:
        transform 0.45s ease,
        box-shadow 0.45s ease;

    border: 1px solid rgba(155, 89, 182, 0.08);
}


/* Línea superior */

.juego-card::before {

    content: "";

    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 7px;

    background: #9b59b6;

    transform: scaleX(0);

    transform-origin: left;

    transition: transform 0.45s ease;
}


/* Hover */

.juego-card:hover {

    transform:
        translateY(-15px)
        rotate(-0.5deg);

    box-shadow:
        0 25px 50px rgba(110, 70, 130, 0.20);
}

.juego-card:hover::before {

    transform: scaleX(1);
}


/* =========================================
   TARJETA CENTRAL DESTACADA
   ========================================= */

.juego-card.destacado {

    transform: translateY(-18px);

    box-shadow:
        0 22px 45px rgba(155, 89, 182, 0.18);

    border: 2px solid rgba(155, 89, 182, 0.15);
}

.juego-card.destacado:hover {

    transform:
        translateY(-28px)
        rotate(0.5deg);

    box-shadow:
        0 30px 60px rgba(155, 89, 182, 0.25);
}


/* =========================================
   NÚMERO
   ========================================= */

.numero-juego {

    position: absolute;

    top: 20px;
    right: 24px;

    font-size: 18px;

    font-weight: 700;

    color: #b179c7;

    opacity: 0.8;
}


/* =========================================
   IMAGEN
   ========================================= */

.imagen-juego {

    height: 210px;

    border-radius: 22px;

    background: #f5eafa;

    display: flex;

    justify-content: center;
    align-items: center;

    overflow: hidden;

    margin-bottom: 25px;

    transition:
        transform 0.45s ease,
        background 0.45s ease;
}

.imagen-juego img {

    width: 82%;
    height: 82%;

    object-fit: contain;

    transition:
        transform 0.5s ease;
}


/* Movimiento de imagen */

.juego-card:hover .imagen-juego {

    transform: scale(1.02);

    background: #f0e1f7;
}

.juego-card:hover .imagen-juego img {

    transform:
        scale(1.08)
        rotate(2deg);
}


/* =========================================
   CONTENIDO
   ========================================= */

.contenido-juego {

    display: flex;

    flex-direction: column;

    flex: 1;
}


.categoria-juego {

    font-size: 12px;

    font-weight: 700;

    letter-spacing: 2px;

    color: #9b59b6;

    margin-bottom: 8px;
}


.contenido-juego h2 {

    font-size: 27px;

    line-height: 1.15;

    color: #8f55ad;

    margin: 0 0 15px;

    transition:
        transform 0.3s ease;
}


.juego-card:hover .contenido-juego h2 {

    transform: translateX(5px);
}


.contenido-juego p {

    font-size: 16px;

    line-height: 1.6;

    color: #333;

    margin: 0 0 25px;
}


/* =========================================
   BOTÓN
   ========================================= */

.boton-juego {

    margin-top: auto;

    display: flex;

    align-items: center;

    justify-content: space-between;

    text-decoration: none;

    padding: 14px 20px;

    border-radius: 15px;

    background: #9b59b6;

    color: white;

    font-size: 15px;

    font-weight: 600;

    transition:
        background 0.3s ease,
        transform 0.3s ease,
        box-shadow 0.3s ease;
}


.boton-juego:hover {

    background: #8146a0;

    transform: translateY(-3px);

    box-shadow:
        0 8px 18px rgba(155, 89, 182, 0.30);
}


.flecha {

    font-size: 22px;

    transition:
        transform 0.3s ease;
}


.boton-juego:hover .flecha {

    transform: translateX(6px);
}


/* =========================================
   MENSAJE FINAL
   ========================================= */

.mensaje-juegos {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 18px;

    margin-top: 60px;
}


.mensaje-juegos p {

    margin: 0;

    font-size: 15px;

    color: #8f55ad;

    font-weight: 600;

    letter-spacing: 0.5px;
}


.linea {

    width: 70px;

    height: 1px;

    background: #c99bd9;
}


/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 950px) {

    .contenedor-juegos {

        grid-template-columns: 1fr;

        max-width: 550px;
    }

    .juego-card.destacado {

        transform: none;
    }

    .juego-card.destacado:hover {

        transform: translateY(-15px);
    }

}


@media (max-width: 600px) {

    .seccion-juegos {

        padding: 60px 20px;
    }

    .encabezado-juegos h1 {

        font-size: 40px;
    }

    .encabezado-juegos p {

        font-size: 16px;
    }

}

/* ==========================================
   SECCIÓN JUEGOS INTERACTIVOS
   ========================================== */

.seccion-juegos {
    width: 100%;
    padding: 90px 6% 70px;
    box-sizing: border-box;
}

/* Título principal */
.titulo-juegos {
    text-align: center;
    color: #9959b8;
    font-size: 48px;
    font-weight: 700;
    margin: 0 0 15px;
}

/* Texto debajo del título */
.descripcion-juegos {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 55px;

    font-size: 20px;
    line-height: 1.6;
    color: #222;
}

/* Las 6 tarjetas */
.contenedor-juegos {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;

    align-items: stretch;
}

/* ==========================================
   TARJETAS DE VIDEO
   ========================================== */

.enlace-video {
    display: block;
    text-decoration: none;
    color: inherit;
}

.video-portada {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.video-portada img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.icono-play {
    position: absolute;
    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%);

    width: 65px;
    height: 65px;

    border-radius: 50%;

    background: rgba(153, 89, 184, 0.95);
    color: white;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 28px;
    padding-left: 4px;

    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.20);

    transition: all 0.3s ease;
}

.enlace-video:hover .video-portada img {
    transform: scale(1.05);
}

.enlace-video:hover .icono-play {
    transform: translate(-50%, -50%) scale(1.12);
}

/* ==========================================
   LABORATORIO MATEMÁTICO
   ========================================== */

.laboratorio-seccion {
    width: 100%;
    padding: 90px 6%;
    box-sizing: border-box;
    background: #faf7fc;
}


/* TÍTULO */

.titulo-laboratorio {
    text-align: center;

    color: #9959b8;

    font-size: 48px;

    margin: 0 0 15px;
}

.descripcion-laboratorio {
    max-width: 850px;

    margin: 0 auto 40px;

    text-align: center;

    font-size: 19px;

    line-height: 1.6;

    color: #333;
}


/* ==========================================
   BOTONES DE RETOS
   ========================================== */

.retos-matematicos {

    max-width: 1100px;

    margin: 0 auto 30px;

    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 15px;
}


.reto-btn {

    border: 2px solid #ead8f2;

    background: white;

    color: #555;

    border-radius: 18px;

    padding: 18px 12px;

    min-height: 85px;

    cursor: pointer;

    font-size: 15px;

    font-weight: 600;

    transition: all 0.25s ease;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 7px;
}


.reto-icono {
    font-size: 27px;
}


.reto-btn:hover {

    transform: translateY(-3px);

    box-shadow:
        0 8px 20px
        rgba(153, 89, 184, 0.15);

}


.reto-btn.activo {

    background: #9959b8;

    color: white;

    border-color: #9959b8;

    box-shadow:
        0 8px 20px
        rgba(153, 89, 184, 0.25);
}


/* ==========================================
   RETO ACTUAL
   ========================================== */

.reto-actual {

    max-width: 1100px;

    margin: 0 auto 25px;

    background: white;

    border-left: 6px solid #9959b8;

    border-radius: 16px;

    padding: 20px 25px;

    box-shadow:
        0 5px 20px
        rgba(0,0,0,0.06);
}


.etiqueta-reto {

    color: #9959b8;

    font-size: 13px;

    font-weight: 800;

    letter-spacing: 1px;
}


.reto-actual h2 {

    margin: 7px 0;

    color: #333;

    font-size: 25px;
}


.reto-actual p {

    margin: 0;

    color: #555;

    font-size: 17px;

    line-height: 1.5;
}


/* ==========================================
   PIZARRA
   ========================================== */

.pizarra-contenedor {

    max-width: 1100px;

    margin: auto;

    background: white;

    border-radius: 25px;

    padding: 22px;

    box-sizing: border-box;

    box-shadow:
        0 15px 40px
        rgba(120, 70, 150, 0.13);

    border: 3px solid #ead8f2;
}


/* ==========================================
   HERRAMIENTAS
   ========================================== */

.herramientas-pizarra {

    display: flex;

    align-items: center;

    justify-content: center;

    flex-wrap: wrap;

    gap: 14px;

    margin-bottom: 18px;

    padding: 14px;

    background: #f5eafa;

    border-radius: 17px;
}


.grupo-herramienta {

    display: flex;

    align-items: center;

    gap: 8px;

    font-weight: 600;

    color: #555;
}


/* COLORES */

.color-btn {

    width: 30px;

    height: 30px;

    border-radius: 50%;

    border: 3px solid white;

    cursor: pointer;

    box-shadow:
        0 2px 7px
        rgba(0,0,0,0.15);

    transition: transform 0.2s;
}


.color-btn:hover {

    transform: scale(1.18);

}


/* BOTONES */

.herramienta-btn {

    border: none;

    background: #9959b8;

    color: white;

    padding: 10px 16px;

    border-radius: 12px;

    font-size: 14px;

    font-weight: 600;

    cursor: pointer;

    transition: 0.2s;
}


.herramienta-btn:hover {

    background: #7d4499;

    transform: translateY(-2px);

}


.limpiar-btn {

    background: #d95c7a;

}


/* ==========================================
   CANVAS
   ========================================== */

.canvas-contenedor {

    width: 100%;

    height: 520px;

    border-radius: 18px;

    overflow: hidden;

    border: 2px solid #e2cce9;

    background-color: white;

    background-image:
        linear-gradient(
            #eadcf0 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            #eadcf0 1px,
            transparent 1px
        );

    background-size: 30px 30px;

    cursor: crosshair;
}


#pizarraCanvas {

    width: 100%;

    height: 100%;

    display: block;

    touch-action: none;
}


/* ==========================================
   MENSAJE
   ========================================== */

.mensaje-pizarra {

    text-align: center;

    margin-top: 16px;

    color: #9959b8;

    font-weight: 700;

    font-size: 16px;
}


/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 900px) {

    .retos-matematicos {

        grid-template-columns:
            repeat(2, 1fr);

    }

}


@media (max-width: 600px) {

    .laboratorio-seccion {

        padding: 60px 20px;

    }

    .titulo-laboratorio {

        font-size: 36px;

    }

    .descripcion-laboratorio {

        font-size: 17px;

    }

    .retos-matematicos {

        grid-template-columns: 1fr;

    }

    .canvas-contenedor {

        height: 400px;

    }

}

/* =====================================================
   RETO MATEMÁTICO
   ===================================================== */

.reto-matematico {
    width: 88%;
    max-width: 1200px;

    margin: 70px auto;

    padding: 45px;

    background:
        linear-gradient(
            145deg,
            #30283f,
            #211d30
        );

    border-radius: 32px;

    color: white;

    box-shadow:
        0 18px 40px rgba(30, 25, 40, 0.30);

    position: relative;

    overflow: hidden;
}


/* DECORACIÓN */

.reto-matematico::before {
    content: "✦";

    position: absolute;

    top: 20px;
    right: 35px;

    font-size: 65px;

    opacity: 0.12;
}

.reto-matematico::after {
    content: "✧";

    position: absolute;

    bottom: 15px;
    left: 30px;

    font-size: 75px;

    opacity: 0.10;
}


/* =====================================================
   CABECERA
   ===================================================== */

.reto-cabecera {
    text-align: center;

    position: relative;

    z-index: 2;
}

.reto-etiqueta {
    display: inline-block;

    padding: 8px 18px;

    border-radius: 30px;

    background:
        rgba(217, 182, 233, 0.15);

    color: #e5c8f2;

    font-size: 13px;

    font-weight: 800;

    letter-spacing: 1px;
}

.reto-cabecera h2 {
    font-size: 36px;

    margin: 12px 0;
}

.reto-cabecera p {
    max-width: 680px;

    margin: auto;

    line-height: 1.7;

    font-size: 17px;

    opacity: 0.9;
}


/* =====================================================
   ESTADÍSTICAS
   ===================================================== */

.reto-estadisticas {
    display: flex;

    justify-content: center;

    gap: 18px;

    margin: 35px 0 20px;

    position: relative;

    z-index: 2;
}

.reto-stat {
    min-width: 120px;

    padding: 14px 20px;

    text-align: center;

    background:
        rgba(255,255,255,0.09);

    border:
        1px solid rgba(255,255,255,0.12);

    border-radius: 18px;
}

.reto-stat span {
    display: block;

    font-size: 23px;
}

.reto-stat strong {
    display: block;

    font-size: 24px;

    margin: 3px 0;
}

.reto-stat small {
    opacity: 0.7;
}


/* =====================================================
   BARRA
   ===================================================== */

.reto-barra {
    max-width: 900px;

    height: 10px;

    margin:
        0 auto 35px;

    border-radius: 20px;

    background:
        rgba(255,255,255,0.12);

    overflow: hidden;
}

#retoBarra {
    width: 0%;

    height: 100%;

    border-radius: 20px;

    background:
        linear-gradient(
            90deg,
            #d9b6e9,
            #a86ac5
        );

    transition:
        width 0.5s ease;
}


/* =====================================================
   EJERCICIOS
   ===================================================== */

.reto-ejercicios {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(280px, 1fr));

    gap: 22px;

    max-width: 950px;

    margin: auto;

    position: relative;

    z-index: 2;
}

.reto-ejercicio {
    display: flex;

    gap: 15px;

    padding: 22px;

    background: white;

    color: #30283f;

    border-radius: 21px;

    box-shadow:
        0 8px 20px
        rgba(0,0,0,0.15);

    transition:
        transform 0.25s ease,
        border 0.25s ease;
}

.reto-ejercicio:hover {
    transform: translateY(-3px);
}

.reto-numero {
    flex-shrink: 0;

    width: 40px;
    height: 40px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #ead8f1;

    font-weight: 900;
}

.reto-contenido {
    flex: 1;
}

.reto-tema {
    display: inline-block;

    margin-bottom: 8px;

    color: #8b5a9f;

    font-size: 13px;

    font-weight: 800;
}

.reto-contenido h3 {
    margin: 0 0 16px;

    font-size: 19px;

    line-height: 1.4;
}


/* =====================================================
   ZONA PARA SOLTAR
   ===================================================== */

.reto-zona {
    min-height: 58px;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 8px;

    border:
        2px dashed #c6a4d8;

    border-radius: 15px;

    color: #9c85a6;

    transition:
        0.25s ease;
}

.reto-zona.activa {
    background: #f4eafa;

    border-color: #9b62b8;

    transform: scale(1.02);
}

.reto-zona.colocada {
    border-style: solid;

    border-color: #73c991;

    background: #e8f8ed;

    color: #287a42;
}


/* CORRECTO */

.reto-ejercicio.correcto {
    border:
        3px solid #73c991;

    animation:
        retoCorrecto 0.5s ease;
}


/* ERROR */

.reto-ejercicio.error {
    animation:
        retoError 0.4s ease;
}

@keyframes retoCorrecto {

    50% {
        transform: scale(1.03);
    }

}

@keyframes retoError {

    25% {
        transform: translateX(-7px);
    }

    50% {
        transform: translateX(7px);
    }

    75% {
        transform: translateX(-5px);
    }

}


/* =====================================================
   TÍTULO RESPUESTAS
   ===================================================== */

.reto-respuestas-titulo {
    display: flex;

    justify-content: center;
    align-items: center;

    gap: 10px;

    margin:
        40px 0 20px;

    position: relative;

    z-index: 2;
}

.reto-respuestas-titulo span {
    font-size: 25px;
}

.reto-respuestas-titulo h3 {
    margin: 0;

    font-size: 21px;
}


/* =====================================================
   RESPUESTAS
   ===================================================== */

.reto-respuestas {
    display: flex;

    justify-content: center;

    align-items: center;

    flex-wrap: wrap;

    gap: 15px;

    position: relative;

    z-index: 5;
}

.reto-respuesta {
    min-width: 75px;

    height: 70px;

    padding: 0 15px;

    display: flex;

    justify-content: center;
    align-items: center;

    border-radius: 18px;

    background:
        linear-gradient(
            145deg,
            #ffffff,
            #f1e9f5
        );

    color: #4b3158;

    font-size: 21px;

    font-weight: 900;

    cursor: grab;

    user-select: none;

    touch-action: none;

    box-shadow:
        0 7px 15px
        rgba(0,0,0,0.20);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.reto-respuesta:hover {
    transform:
        translateY(-5px)
        rotate(2deg);

    box-shadow:
        0 12px 20px
        rgba(0,0,0,0.25);
}

.reto-respuesta.fraccion {
    min-width: 85px;
}

.reto-respuesta.medida {
    min-width: 105px;
}

.reto-respuesta.usada {
    opacity: 0.2;

    pointer-events: none;
}


/* =====================================================
   TARJETA QUE SE ESTÁ ARRASTRANDO
   ===================================================== */

.reto-respuesta.arrastrando {
    position: fixed;

    z-index: 99999;

    pointer-events: none;

    transform:
        scale(1.1)
        rotate(3deg);

    box-shadow:
        0 18px 35px
        rgba(0,0,0,0.30);
}


/* =====================================================
   FINAL
   ===================================================== */

.reto-final {
    display: none;

    max-width: 520px;

    margin:
        40px auto 0;

    padding: 32px;

    text-align: center;

    background:
        rgba(255,255,255,0.10);

    border-radius: 25px;

    position: relative;

    z-index: 2;
}

.reto-final.mostrar {
    display: block;

    animation:
        aparecerRetoFinal 0.6s ease;
}

.reto-trofeo {
    font-size: 65px;

    animation:
        trofeoReto 1s
        ease
        infinite
        alternate;
}

.reto-final h2 {
    margin: 10px 0;

    font-size: 29px;
}

.reto-resultado {
    margin: 18px;

    font-size: 42px;
}

.reto-mensaje {
    font-size: 17px;
}

.reto-final button {
    border: none;

    padding: 13px 25px;

    border-radius: 30px;

    background: white;

    color: #4b3158;

    font-size: 16px;

    font-weight: 800;

    cursor: pointer;

    transition: 0.25s ease;
}

.reto-final button:hover {
    transform: scale(1.06);
}

@keyframes trofeoReto {

    from {
        transform:
            translateY(0);
    }

    to {
        transform:
            translateY(-8px)
            rotate(3deg);
    }
}

@keyframes aparecerRetoFinal {

    from {
        opacity: 0;

        transform:
            translateY(20px);
    }

    to {
        opacity: 1;

        transform:
            translateY(0);
    }
}


/* =====================================================
   CELULAR
   ===================================================== */

@media (max-width: 750px) {

    .reto-matematico {
        width: 92%;

        padding: 30px 20px;
    }

    .reto-cabecera h2 {
        font-size: 29px;
    }

    .reto-estadisticas {
        gap: 8px;
    }

    .reto-stat {
        min-width: 80px;

        padding:
            12px 7px;
    }

    .reto-ejercicios {
        grid-template-columns: 1fr;
    }

    .reto-respuesta {
        min-width: 65px;

        height: 65px;

        font-size: 19px;
    }

}

footer {
  margin-top: 40px;
  background: white;
  padding: 20px;
  text-align: center;
  border-radius: 20px 20px 0 0
}
