/*
==========================================
DavidSO Math Engine
Autor: David Sánchez
==========================================
*/

:root{
    --dso-radius:22px;
    --dso-shadow:0 12px 32px rgba(0,0,0,.08);
    --dso-font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
}

/* CONTENEDOR GENERAL */

.dso-math{

    max-width:980px;

    margin:25px auto;

    padding:0 14px;

    box-sizing:border-box;

    font-family:var(--dso-font);

    color:#1f2937;

    line-height:1.75;

}

/* HERO */

.dso-hero{

    background:linear-gradient(
        135deg,
        #111827 0%,
        var(--dso-dark) 55%,
        var(--dso-main) 100%
    );

    color:white;

    border-radius:30px;

    padding:42px;

    margin-bottom:28px;

    box-shadow:var(--dso-shadow);

}

.dso-badges{

    display:flex;

    flex-wrap:wrap;

    gap:10px;

    margin-bottom:20px;

}

.dso-badge{

    padding:7px 14px;

    border-radius:999px;

    font-size:13px;

    font-weight:700;

    background:rgba(255,255,255,.15);

}

.dso-badge-main{

    background:white;

    color:var(--dso-main);

}

.dso-hero h1{

    margin:0;

    color:white;

    font-size:clamp(30px,5vw,48px);

    line-height:1.15;

}

.dso-hero p{

    margin-top:18px;

    color:#f3f4f6;

    font-size:18px;

}

/* TARJETAS */

.dso-card{

    background:white;

    border-radius:22px;

    border:1px solid var(--dso-border);

    padding:26px;

    margin-bottom:26px;

    box-shadow:0 8px 24px rgba(0,0,0,.035);

}

.dso-card h2{

    margin-top:0;

}

/* GRID */

.dso-grid{

    display:grid;

    grid-template-columns:repeat(auto-fit,minmax(190px,1fr));

    gap:14px;

}

.dso-grid-item{

    background:var(--dso-light);

    border:1px solid var(--dso-border);

    border-radius:14px;

    padding:14px;

}

.dso-grid-title{

    font-size:12px;

    text-transform:uppercase;

    font-weight:800;

    color:var(--dso-main);

    margin-bottom:5px;

}

.dso-grid-value{

    font-size:15px;

    font-weight:700;

}

/* BOTÓN */

.dso-button{

    display:inline-block;

    background:var(--dso-main);

    color:white;

    text-decoration:none;

    font-weight:700;

    padding:13px 20px;

    border-radius:12px;

    transition:.25s;

}

.dso-button:hover{

    opacity:.9;

    transform:translateY(-2px);

}

/* DETAILS */

.dso-details{

    background:white;

    border-radius:18px;

    border:1px solid var(--dso-border);

    margin-bottom:16px;

    overflow:hidden;

}

.dso-details summary{

    cursor:pointer;

    list-style:none;

    padding:18px 22px;

    font-size:18px;

    font-weight:700;

    background:var(--dso-light);

}

.dso-details summary::-webkit-details-marker{

    display:none;

}

.dso-details-content{

    padding:24px;

}

/* CAJA RECORDATORIO */

.dso-remember{

    background:#111827;

    color:white;

    border-radius:22px;

    padding:28px;

}

.dso-remember h2{

    color:white;

}

.dso-remember ul{

    color:#f3f4f6;

}

/* RESPONSIVE */

@media (max-width:768px){

    .dso-math{

        padding:0 10px;

    }

    .dso-hero{

        padding:28px;

    }

    .dso-card{

        padding:20px;

    }

}

.dso-button-wrap{
    text-align:center;
    margin-bottom:30px;
}
.dso-actions{

    display:flex;

    justify-content:center;

    align-items:center;

    gap:14px;

    flex-wrap:wrap;

    margin:32px 0;

}
/* COMPONENTES DE AYUDA */

.dso-details{
    background:#ffffff;
    border-radius:18px;
    border:1px solid var(--ayuda-border,#e5e7eb);
    border-left:6px solid var(--ayuda-main,#111827);
    margin-bottom:16px;
    overflow:hidden;
    box-shadow:0 6px 18px rgba(0,0,0,.035);
}

.dso-details summary{
    cursor:pointer;
    list-style:none;
    padding:18px 22px;
    font-size:18px;
    font-weight:800;
    background:var(--ayuda-light,#f9fafb);
    color:var(--ayuda-main,#111827);
}

.dso-details summary::-webkit-details-marker{
    display:none;
}

.dso-details-content{
    padding:24px;
    color:#374151;
}

/* Tipos didácticos */

.dso-ayuda-comprension{
    --ayuda-main:#ea580c;
    --ayuda-light:#fff7ed;
    --ayuda-border:#fed7aa;
}

.dso-ayuda-conceptos{
    --ayuda-main:#2563eb;
    --ayuda-light:#eff6ff;
    --ayuda-border:#bfdbfe;
}

.dso-ayuda-estrategia{
    --ayuda-main:#16a34a;
    --ayuda-light:#f0fdf4;
    --ayuda-border:#bbf7d0;
}

.dso-ayuda-resolucion{
    --ayuda-main:#7e22ce;
    --ayuda-light:#faf5ff;
    --ayuda-border:#e9d5ff;
}

.dso-ayuda-advertencia{
    --ayuda-main:#ca8a04;
    --ayuda-light:#fefce8;
    --ayuda-border:#fde68a;
}

.dso-ayuda-error{
    --ayuda-main:#dc2626;
    --ayuda-light:#fef2f2;
    --ayuda-border:#fecaca;
}

.dso-ayuda-consejo{
    --ayuda-main:#0891b2;
    --ayuda-light:#ecfeff;
    --ayuda-border:#a5f3fc;
}

.dso-ayuda-recuerda{
    --ayuda-main:#4f46e5;
    --ayuda-light:#eef2ff;
    --ayuda-border:#c7d2fe;
}
.dso-enunciado h2{
    font-size:24px;
    margin-bottom:14px;
}

.dso-enunciado-content{
    max-width:840px;
    margin:0 auto;
    font-size:17px;
    line-height:1.85;
    color:#374151;
}

.dso-enunciado-content ol,
.dso-enunciado-content ul{
    margin-top:12px;
}
.dso-aprendizaje-content{
    color:#e5e7eb;
    line-height:1.8;
}

.dso-aprendizaje-content ul{
    margin-bottom:0;
}

/* NAVEGACIÓN DSME */

.dso-nav-taxonomia{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:22px;
    margin:45px 0;
}

.dso-nav-link{
    display:flex;
    flex-direction:column;
    justify-content:center;
    min-height:120px;
    padding:24px;
    text-decoration:none;
    border-radius:18px;
    transition:.25s;
    box-shadow:0 8px 22px rgba(0,0,0,.05);
}

.dso-nav-link:hover{
    transform:translateY(-3px);
}

.dso-nav-secondary{
    background:#f9fafb;
    border:1px solid #e5e7eb;
    color:#374151;
}

.dso-nav-primary{
    background:var(--dso-main);
    color:white;
}

.dso-nav-center{
    background:var(--dso-light);
    border:2px solid var(--dso-border);
    color:var(--dso-main);
}

.dso-nav-label{
    font-size:13px;
    text-transform:uppercase;
    letter-spacing:.06em;
    opacity:.75;
    margin-bottom:10px;
    font-weight:700;
}

.dso-nav-title{
    font-size:20px;
    font-weight:800;
    line-height:1.35;
}

.dso-nav-empty{
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:120px;
    padding:24px;
    border:2px dashed #d1d5db;
    border-radius:18px;
    background:#fafafa;
    color:#9ca3af;
    text-align:center;
    font-weight:700;
}

@media(max-width:900px){
    .dso-nav-taxonomia{
        grid-template-columns:1fr;
    }
}
.dso-nav-link,
.dso-nav-empty{
    min-height:110px;
}

.dso-nav-empty{
    font-size:16px;
}

.dso-nav-title{
    max-width:260px;
}

.dso-lista{
    margin:35px 0;
}

.dso-lista-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
    gap:18px;
}

.dso-problema-card{
    display:block;
    background:#ffffff;
    border:1px solid var(--dso-border);
    border-radius:20px;
    padding:22px;
    text-decoration:none;
    color:#1f2937;
    box-shadow:0 8px 24px rgba(0,0,0,.04);
    transition:.25s;
}

.dso-problema-card:hover{
    transform:translateY(-3px);
    border-color:var(--dso-main);
}

.dso-problema-card-label{
    display:inline-block;
    background:var(--dso-light);
    color:var(--dso-main);
    border:1px solid var(--dso-border);
    padding:5px 10px;
    border-radius:999px;
    font-size:12px;
    font-weight:800;
    text-transform:uppercase;
    margin-bottom:12px;
}

.dso-problema-card h3{
    margin:0 0 10px 0;
    color:#111827;
    font-size:20px;
    line-height:1.35;
}

.dso-problema-card p{
    margin:0;
    color:#4b5563;
    font-size:14px;
    line-height:1.7;
}

.dso-lista-empty{
    background:#f9fafb;
    border:1px dashed #d1d5db;
    border-radius:18px;
    padding:24px;
    color:#6b7280;
    text-align:center;
    font-weight:700;
}
/* =====================================================
   LISTADO DE PROBLEMAS DSME
===================================================== */

.dso-lista{
    margin:32px 0 50px;
}

.dso-lista-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:20px;
}

.dso-problema-card{
    --card-main:#6b7280;
    --card-light:#f9fafb;
    --card-border:#e5e7eb;

    display:flex;
    flex-direction:column;
    min-height:245px;
    padding:24px;
    background:#ffffff;
    border:1px solid var(--card-border);
    border-top:5px solid var(--card-main);
    border-radius:20px;
    text-decoration:none !important;
    color:#1f2937;
    box-shadow:0 8px 26px rgba(0,0,0,.045);
    transition:transform .25s ease, box-shadow .25s ease;
    box-sizing:border-box;
}

.dso-problema-card:hover{
    transform:translateY(-4px);
    box-shadow:0 16px 36px rgba(0,0,0,.09);
}

.dso-problema-card-top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    margin-bottom:22px;
}

.dso-problema-numero{
    display:flex;
    align-items:center;
    justify-content:center;
    min-width:52px;
    height:52px;
    padding:0 10px;
    border-radius:15px;
    background:var(--card-main);
    color:#ffffff;
    font-size:21px;
    font-weight:900;
    line-height:1;
}

.dso-problema-bloque{
    color:var(--card-main);
    font-size:12px;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.08em;
    text-align:right;
}

.dso-problema-card h3{
    margin:0 0 10px;
    color:#111827;
    font-size:21px;
    line-height:1.35;
}

.dso-problema-tema{
    color:#6b7280;
    font-size:14px;
    line-height:1.55;
    margin-bottom:24px;
}

.dso-problema-card-footer{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    margin-top:auto;
    padding-top:18px;
    border-top:1px solid var(--card-border);
}

.dso-problema-dificultad{
    padding:5px 10px;
    border-radius:999px;
    background:var(--card-light);
    color:var(--card-main);
    font-size:12px;
    font-weight:800;
}

.dso-problema-ver{
    color:var(--card-main);
    font-size:13px;
    font-weight:800;
}

.dso-card-analisis{
    --card-main:#ea580c;
    --card-light:#fff7ed;
    --card-border:#fed7aa;
}

.dso-card-algebra{
    --card-main:#2563eb;
    --card-light:#eff6ff;
    --card-border:#bfdbfe;
}

.dso-card-geometria{
    --card-main:#15803d;
    --card-light:#f0fdf4;
    --card-border:#bbf7d0;
}

.dso-card-probabilidad{
    --card-main:#7e22ce;
    --card-light:#faf5ff;
    --card-border:#e9d5ff;
}

.dso-card-wide{
    grid-column:1 / -1;
}

@media(max-width:760px){
    .dso-lista-grid{
        grid-template-columns:1fr;
    }

    .dso-problema-card{
        min-height:auto;
    }
}
.dso-hero-nav{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:14px;
    margin-top:30px;
    padding-top:22px;
    border-top:1px solid rgba(255,255,255,.18);
}

.dso-hero-nav a{
    display:inline-flex;
    align-items:center;
    padding:11px 16px;
    border-radius:11px;
    text-decoration:none;
    font-size:14px;
    font-weight:800;
    transition:.2s;
}

.dso-hero-nav-primary{
    background:#ffffff;
    color:var(--dso-main);
}

.dso-hero-nav-secondary{
    background:rgba(255,255,255,.10);
    color:#ffffff;
    border:1px solid rgba(255,255,255,.25);
}

.dso-hero-nav a:hover{
    transform:translateY(-2px);
}

@media(max-width:600px){
    .dso-hero-nav{
        flex-direction:column;
        align-items:stretch;
    }

    .dso-hero-nav a{
        justify-content:center;
        text-align:center;
    }
}
