/* ==========================================================================
   Patrimonia Campus — Rediseño Premium "Legal-Fiscal High-End V2"
   Diseñado con amor por Antigravity para Patrimonio Administradora
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Paleta HSL "Legal-Fiscal Premium" */
    --azul: hsl(215, 60%, 16%);        /* Navy profundo corporativo */
    --azul2: hsl(212, 50%, 26%);       /* Navy secundario elegante */
    --azul-light: hsl(214, 40%, 96%);  /* Fondo azul claro de alto contraste */
    --azul-glow: rgba(15, 32, 56, 0.04);
    
    --verde: hsl(162, 80%, 30%);       /* Verde esmeralda fiscal refinado */
    --verde2: hsl(162, 70%, 40%);      /* Tono verde claro brillante */
    --verde-osc: hsl(162, 85%, 20%);   /* Verde profundo de autoridad */
    --verde-glow: rgba(5, 150, 105, 0.15);
    
    --amarillo: hsl(35, 90%, 45%);     /* Ámbar dorado legal / distinción */
    --amarillo-light: hsl(35, 90%, 96%);
    
    --tinta: hsl(215, 45%, 12%);       /* Color de texto Slate premium */
    --gris: hsl(215, 15%, 45%);        /* Slate-600 */
    --gris2: hsl(215, 15%, 65%);       /* Slate-400 */
    --linea: hsla(215, 45%, 12%, 0.06); /* Borde translúcido fino */
    
    --bg: #F8FAFC;                     /* Lienzo limpio e inmaculado */
    --blanco: #ffffff;
    
    /* Efectos de sombras múltiples de alta fidelidad */
    --sombra: 0 10px 30px -10px rgba(15, 23, 42, 0.04),
              0 1px 3px rgba(15, 23, 42, 0.02);
    --sombra-sm: 0 4px 10px -4px rgba(15, 23, 42, 0.03);
    --sombra-lg: 0 30px 60px -15px rgba(15, 23, 42, 0.08),
                 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
    
    /* Transición estándar fluida */
    --tr: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset & Estilos Base ---- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--tinta);
    line-height: 1.65;
}

h1, h2, h3, .brand-text, .diploma-marca, .diploma-titulo, .diploma-nombre {
    font-family: 'Outfit', sans-serif;
}

a {
    color: inherit;
    transition: var(--tr);
}

/* ---- Topbar (Frosted Glass Navigation) ---- */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 2.8rem;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--linea);
    box-shadow: 0 10px 30px -15px rgba(15, 23, 42, 0.03);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    text-decoration: none;
}

.brand-logo {
    height: 48px;
    width: auto;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.03));
    transition: var(--tr);
}

.brand:hover .brand-logo {
    transform: scale(1.03);
}

.brand-text {
    font-size: 1.25rem;
    color: var(--azul);
    font-weight: 700;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.brand-text strong {
    color: var(--verde);
    font-weight: 800;
}

.brand-madre {
    margin-left: 0.8rem;
    color: var(--gris);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    border-left: 1.5px solid var(--linea);
    padding-left: 0.8rem;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--azul), var(--azul2));
    color: #fff;
    font-family: 'Outfit';
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.brand-mark.sm {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
    border-radius: 8px;
}

.topbar nav {
    display: flex;
    align-items: center;
}

.topbar nav a {
    margin-left: 1.8rem;
    text-decoration: none;
    color: var(--gris);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    padding: 0.2rem 0;
}

.topbar nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--verde);
    transition: var(--tr);
}

.topbar nav a:hover {
    color: var(--azul);
}

.topbar nav a:hover::after {
    width: 100%;
}

/* ---- Botones ---- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--verde), var(--verde2));
    color: #fff;
    border: none;
    padding: 0.75rem 1.6rem;
    border-radius: 12px;
    font-family: 'Outfit';
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    transition: var(--tr);
    box-shadow: 0 4px 14px var(--verde-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--verde-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-lg {
    padding: 0.95rem 2.2rem;
    font-size: 1.05rem;
    border-radius: 14px;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.6rem;
    border: 1.5px solid var(--linea);
    border-radius: 12px;
    text-decoration: none;
    color: var(--azul);
    font-family: 'Outfit';
    font-weight: 600;
    background: #fff;
    transition: var(--tr);
}

.btn-ghost:hover {
    border-color: var(--azul);
    background: var(--azul-light);
    transform: translateY(-1px);
}

/* ---- Hero Section (Landing) ---- */
.hero {
    background: 
        radial-gradient(circle at 85% 15%, color-mix(in srgb, var(--verde) 8%, transparent) 0%, transparent 45%),
        radial-gradient(circle at 15% 85%, color-mix(in srgb, var(--azul) 6%, transparent) 0%, transparent 45%),
        linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
    padding: 6.5rem 2rem 7.5rem;
    border-bottom: 1px solid var(--linea);
    position: relative;
}

.hero-in {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 4rem;
    align-items: center;
}

.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.9);
    color: var(--verde-osc);
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.45rem 1.1rem;
    border-radius: 20px;
    box-shadow: var(--sombra-sm);
    border: 1px solid rgba(5, 150, 105, 0.08);
    margin-bottom: 1.5rem;
    letter-spacing: 0.2px;
}

.hero-text h1 {
    font-size: 3.25rem;
    line-height: 1.15;
    color: var(--azul);
    font-weight: 800;
    letter-spacing: -1.2px;
}

.hero-text h1 span {
    background: linear-gradient(135deg, var(--azul2) 0%, var(--verde) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-sub {
    font-size: 1.15rem;
    color: var(--gris);
    margin: 1.4rem 0 2.2rem;
    max-width: 92%;
    line-height: 1.7;
}

.hero-meta {
    margin-top: 1.5rem;
    color: var(--gris2);
    font-size: 0.88rem;
    font-weight: 500;
}

.hero-art {
    display: grid;
    place-items: center;
    perspective: 1000px;
}

.hero-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.55) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 28px;
    padding: 2.8rem 2.4rem;
    box-shadow: 0 30px 60px -15px rgba(15, 23, 42, 0.1),
                0 0 0 1px rgba(255, 255, 255, 0.6) inset;
    border: 1px solid rgba(15, 23, 42, 0.05);
    width: 100%;
    max-width: 350px;
    text-align: center;
    transform: rotate(2.5deg);
    transition: var(--tr);
}

.hero-card:hover {
    transform: scale(1.03) rotate(0deg);
    box-shadow: 0 40px 80px -20px rgba(15, 23, 42, 0.15),
                0 0 0 1px rgba(255, 255, 255, 0.8) inset;
}

.hc-icon {
    background: color-mix(in srgb, var(--verde) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--verde) 20%, transparent);
    width: 75px;
    height: 75px;
    border-radius: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.4rem;
    color: var(--verde);
    box-shadow: 0 8px 24px -6px var(--verde-glow);
    transition: var(--tr);
}

.hero-card:hover .hc-icon {
    transform: scale(1.05);
    background: color-mix(in srgb, var(--verde) 12%, transparent);
    box-shadow: 0 10px 28px -4px var(--verde-glow);
}

.hc-icon .svg-icon {
    width: 36px;
    height: 36px;
    margin: 0;
}

.hc-title {
    font-family: 'Outfit';
    font-weight: 700;
    color: var(--azul);
    font-size: 1.5rem;
    margin-top: 0rem;
}

.hc-sub {
    color: var(--gris);
    font-size: 0.95rem;
    margin: 0.4rem 0 1.5rem;
    font-weight: 500;
}

.hc-bar {
    height: 8px;
    background: var(--linea);
    border-radius: 10px;
    overflow: hidden;
}

.hc-fill {
    height: 100%;
    width: 35%;
    background: linear-gradient(90deg, var(--verde), var(--verde2));
    border-radius: 10px;
}

/* ---- Secciones Generales ---- */
.seccion {
    padding: 5.5rem 2rem;
}

.seccion.alt {
    background: #fff;
    border-top: 1px solid var(--linea);
    border-bottom: 1px solid var(--linea);
}

.seccion-in {
    max-width: 1100px;
    margin: 0 auto;
}

.seccion-in.estrecho {
    max-width: 720px;
    text-align: center;
}

.seccion-titulo {
    font-size: 2.25rem;
    color: var(--azul);
    text-align: center;
    font-weight: 800;
    letter-spacing: -0.8px;
}

.seccion-sub {
    text-align: center;
    color: var(--gris);
    margin: 0.7rem 0 3rem;
    font-size: 1.1rem;
    font-weight: 500;
}

/* ---- Ecosistema de Niveles (4 Niveles) ---- */
.niveles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.4rem;
}

.nivel-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.55) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2.4rem 1.8rem;
    box-shadow: 0 15px 35px -15px rgba(15, 23, 42, 0.03),
                0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-top: 5px solid var(--c);
    transition: var(--tr);
    position: relative;
    overflow: hidden;
}

.nivel-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px -15px rgba(15, 23, 42, 0.1),
                0 0 0 1px rgba(255, 255, 255, 0.7) inset;
    border-color: var(--c);
}

.nivel-card.bloqueado {
    opacity: 0.68;
    background: rgba(248, 250, 252, 0.8);
}

.nivel-icono {
    background: color-mix(in srgb, var(--c) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--c) 18%, transparent);
    padding: 0.75rem;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.1rem;
    transition: var(--tr);
}

.nivel-card:hover .nivel-icono {
    transform: scale(1.05);
    background: color-mix(in srgb, var(--c) 12%, transparent);
}

.nivel-icono .svg-icon {
    width: 26px;
    height: 26px;
    color: var(--c);
}

.nivel-nombre {
    font-family: 'Outfit';
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--azul);
    margin: 0.4rem 0;
}

.nivel-desc {
    color: var(--gris);
    font-size: 0.92rem;
    min-height: 75px;
    line-height: 1.6;
}

.nivel-link {
    display: inline-flex;
    align-items: center;
    margin-top: 1rem;
    color: var(--verde-osc);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    gap: 0.2rem;
}

.nivel-link:hover {
    gap: 0.4rem;
    color: var(--verde);
}

.nivel-pronto {
    margin-top: 1rem;
    color: var(--gris2);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

/* ---- Features / Beneficios ---- */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature {
    text-align: center;
    padding: 2.2rem 1.8rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.4) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid var(--linea);
    box-shadow: var(--sombra);
    transition: var(--tr);
}

.feature:hover {
    background: #fff;
    box-shadow: var(--sombra-lg);
    transform: translateY(-3px);
}

.feature-ic {
    background: var(--azul-light);
    width: 65px;
    height: 65px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.2rem;
    color: var(--azul);
    transition: var(--tr);
    border: 1px solid rgba(15, 23, 42, 0.04);
}

.feature:hover .feature-ic {
    transform: scale(1.05);
    background: color-mix(in srgb, var(--azul2) 8%, transparent);
}

.feature-ic .svg-icon {
    width: 30px;
    height: 30px;
}

.feature h3 {
    color: var(--azul);
    margin: 0.6rem 0 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.feature p {
    color: var(--gris);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ---- Form Registro Empezar ---- */
.form-empezar {
    display: flex;
    gap: 0.8rem;
    max-width: 540px;
    margin: 0 auto;
}

.form-empezar input {
    flex: 1;
    padding: 0.95rem 1.3rem;
    border: 1.5px solid var(--linea);
    border-radius: 14px;
    font-size: 1rem;
    color: var(--tinta);
    background: #fff;
    font-family: inherit;
    transition: var(--tr);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.01);
}

.form-empezar input:focus {
    outline: none;
    border-color: var(--verde);
    box-shadow: 0 0 0 4px var(--verde-glow);
    background: #fff;
}

/* ---- Sección Marca Madre ---- */
.marca-madre-sec {
    background: radial-gradient(circle at center, hsla(214, 40%, 96%, 0.5) 0%, #fff 100%);
    border-top: 1px solid var(--linea);
    border-bottom: 1px solid var(--linea);
}

.mm-logo-slot {
    margin-bottom: 1.5rem;
    display: inline-block;
}

.mm-logo-slot img {
    max-height: 75px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.04));
}

.mm-placeholder {
    display: inline-block;
    background: #fff;
    color: var(--azul);
    font-family: 'Outfit';
    font-weight: 700;
    padding: 0.7rem 1.6rem;
    border-radius: 12px;
    box-shadow: var(--sombra-sm);
    border: 2px dashed var(--verde2);
}

/* ---- Curso Head (Dashboard de Cursos) ---- */
.curso-head {
    background: linear-gradient(135deg, var(--azul) 0%, var(--azul2) 100%);
    color: #fff;
    padding: 4.5rem 2rem;
    border-bottom: 4px solid var(--c, var(--verde));
    position: relative;
    overflow: hidden;
}

.curso-head::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 80%;
    height: 180%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 60%);
    pointer-events: none;
}

.curso-head .seccion-in {
    max-width: 900px;
    position: relative;
    z-index: 10;
}

.curso-nivel {
    display: inline-block;
    background: var(--c, var(--verde));
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.35rem 1.1rem;
    border-radius: 20px;
    margin-bottom: 1.2rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.curso-head h1 {
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: -0.8px;
    line-height: 1.2;
}

.curso-sub {
    color: hsl(212, 35%, 85%);
    margin: 0.8rem 0 1.6rem;
    font-size: 1.15rem;
    max-width: 90%;
    line-height: 1.6;
}

.curso-stats {
    display: flex;
    gap: 1.8rem;
    flex-wrap: wrap;
    color: hsl(212, 30%, 80%);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1.8rem;
}

.progreso-curso {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.progreso-barra {
    flex: 1;
    height: 10px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    overflow: hidden;
    max-width: 420px;
}

.progreso-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--verde), var(--verde2));
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.progreso-txt {
    font-size: 0.95rem;
    font-weight: 600;
    color: hsl(212, 30%, 85%);
}

/* ---- Lista de Lecciones ---- */
.lecciones-lista {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.leccion-fila {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    background: #fff;
    border: 1.5px solid var(--linea);
    border-radius: 16px;
    padding: 1.1rem 1.4rem;
    text-decoration: none;
    transition: var(--tr);
}

.leccion-fila:hover {
    transform: translateX(6px);
    box-shadow: var(--sombra);
    border-color: var(--verde2);
}

.lec-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--azul-light);
    color: var(--azul);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 0.95rem;
    font-family: 'Outfit';
    flex-shrink: 0;
    transition: var(--tr);
    border: 1px solid transparent;
}

.leccion-fila.hecha .lec-num {
    background: var(--verde);
    color: #fff;
    box-shadow: 0 2px 8px var(--verde-glow);
}

.leccion-fila:hover .lec-num {
    transform: scale(1.05);
}

.lec-info {
    flex: 1;
}

.lec-titulo {
    font-weight: 700;
    color: var(--tinta);
    font-size: 1.05rem;
    font-family: 'Outfit';
}

.lec-min {
    font-size: 0.85rem;
    color: var(--gris);
    font-weight: 500;
    margin-top: 0.1rem;
}

.lec-flecha {
    color: var(--gris2);
    font-weight: 800;
    transition: var(--tr);
}

.leccion-fila:hover .lec-flecha {
    color: var(--verde);
    transform: translateX(3px);
}

/* ---- Examen Bloque de Desbloqueo ---- */
.examen-bloque {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    background: radial-gradient(circle at 90% 10%, hsla(35, 90%, 45%, 0.05) 0%, #fff 100%), #fff;
    border: 2px dashed var(--amarillo);
    border-radius: 20px;
    padding: 1.5rem;
    margin-top: 1rem;
    box-shadow: var(--sombra);
    transition: var(--tr);
}

.examen-bloque.bloqueado {
    opacity: 0.65;
    background: #F8FAFC;
    border-color: var(--linea);
    box-shadow: none;
}

.examen-ic {
    font-size: 2.5rem;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.05));
}

.examen-info {
    flex: 1;
}

.examen-titulo {
    font-family: 'Outfit';
    font-weight: 700;
    color: var(--azul);
    font-size: 1.25rem;
}

.examen-estado {
    font-size: 0.95rem;
    color: var(--gris);
    font-weight: 500;
    margin-top: 0.2rem;
}

.examen-estado.aprobado {
    color: var(--verde-osc);
    font-weight: 700;
}

.candado {
    font-size: 1.5rem;
    color: var(--gris2);
}

/* ---- Lección Viewer (Lectura) ---- */
.leccion-wrap, .examen-wrap, .cert-wrap {
    max-width: 800px;
    margin: 3.5rem auto;
    padding: 0 1.5rem;
}

.leccion-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.8rem;
}

.volver {
    color: var(--azul);
    text-decoration: none;
    font-weight: 700;
    font-family: 'Outfit';
    font-size: 0.95rem;
}

.volver:hover {
    color: var(--verde);
}

.leccion-contador {
    color: var(--gris);
    font-size: 0.9rem;
    font-weight: 600;
    background: rgba(15, 23, 42, 0.04);
    padding: 0.25rem 0.8rem;
    border-radius: 12px;
}

/* Contenido Principal de Lecciones */
.leccion-contenido {
    background: #fff;
    border-radius: 24px;
    padding: 3.5rem 3.5rem;
    box-shadow: var(--sombra);
    border: 1px solid var(--linea);
}

.leccion-contenido h1 {
    color: var(--azul);
    font-size: 2.3rem;
    font-weight: 800;
    letter-spacing: -0.8px;
    line-height: 1.25;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--azul-light);
    padding-bottom: 1rem;
}

.leccion-contenido h2 {
    color: var(--azul);
    margin: 2.2rem 0 1rem;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.4px;
}

.leccion-contenido h3 {
    color: var(--azul2);
    margin: 1.6rem 0 0.8rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.leccion-contenido p {
    margin-bottom: 1.25rem;
    color: hsl(215, 30%, 20%);
    font-size: 1.05rem;
    line-height: 1.75;
}

.leccion-contenido ul, .leccion-contenido ol {
    margin: 0 0 1.5rem 1.6rem;
    color: hsl(215, 30%, 20%);
    font-size: 1.02rem;
}

.leccion-contenido li {
    margin-bottom: 0.6rem;
    line-height: 1.65;
}

.leccion-contenido blockquote {
    background: radial-gradient(circle at 10% 10%, var(--azul-light) 0%, transparent 100%), var(--azul-light);
    border-left: 4px solid var(--verde);
    padding: 1.2rem 1.6rem;
    border-radius: 0 16px 16px 0;
    margin: 1.8rem 0;
    color: var(--azul);
    font-weight: 500;
    font-size: 1.02rem;
    line-height: 1.65;
    border-top: 1px solid rgba(15, 32, 56, 0.03);
    border-bottom: 1px solid rgba(15, 32, 56, 0.03);
    border-right: 1px solid rgba(15, 32, 56, 0.03);
}

/* Tablas Legales Premium */
.leccion-contenido table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 2rem 0;
    font-size: 0.95rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--linea);
    box-shadow: var(--sombra-sm);
}

.leccion-contenido th, .leccion-contenido td {
    padding: 0.9rem 1.1rem;
    text-align: left;
    border-bottom: 1px solid var(--linea);
}

.leccion-contenido th {
    background: var(--azul);
    color: #fff;
    font-weight: 700;
    font-family: 'Outfit';
    letter-spacing: 0.2px;
}

.leccion-contenido td {
    color: hsl(215, 30%, 24%);
    background: #fff;
}

.leccion-contenido tr:last-child td {
    border-bottom: none;
}

.leccion-contenido tr:nth-child(even) td {
    background: var(--azul-light);
}

.leccion-contenido code {
    background: var(--azul-light);
    color: var(--azul);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.88em;
    font-weight: 600;
    border: 1px solid rgba(15, 32, 56, 0.05);
}

.leccion-contenido pre {
    background: var(--azul);
    color: #e8eef5;
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.leccion-contenido pre code {
    background: none;
    color: inherit;
    border: none;
    padding: 0;
}

.leccion-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
}

/* ---- Examen / Preguntas ---- */
.examen-h1 {
    color: var(--azul);
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.8px;
    margin-bottom: 0.5rem;
}

.examen-instr {
    color: var(--gris);
    font-size: 1.05rem;
    margin-bottom: 2.5rem;
    font-weight: 500;
}

.pregunta-card {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 1.4rem;
    box-shadow: var(--sombra);
    border: 1px solid var(--linea);
}

.pregunta-num {
    color: var(--amarillo);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Outfit';
}

.pregunta-texto {
    font-weight: 700;
    font-size: 1.2rem;
    margin: 0.5rem 0 1.25rem;
    color: var(--tinta);
    font-family: 'Outfit';
    line-height: 1.4;
}

.opciones {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.opcion {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border: 1.5px solid var(--linea);
    border-radius: 14px;
    cursor: pointer;
    transition: var(--tr);
    background: #fff;
}

.opcion:hover {
    border-color: var(--verde2);
    background: var(--azul-light);
}

.opcion input {
    display: none;
}

.op-radio {
    width: 22px;
    height: 22px;
    border: 2px solid var(--gris2);
    border-radius: 50%;
    flex-shrink: 0;
    transition: var(--tr);
    position: relative;
    background: #fff;
}

.opcion input:checked + .op-radio {
    border-color: var(--verde);
    background: var(--verde);
    box-shadow: inset 0 0 0 5px #fff;
}

.opcion input:checked {
    background: var(--azul-light);
}

.opcion input:checked ~ .op-texto {
    color: var(--azul);
    font-weight: 700;
}

.op-texto {
    font-size: 1rem;
    color: var(--tinta);
    font-weight: 500;
}

.op-texto b {
    color: var(--azul2);
}

/* ---- Resultados del Examen ---- */
.resultado {
    text-align: center;
    background: #fff;
    border-radius: 24px;
    padding: 4rem 3rem;
    box-shadow: var(--sombra-lg);
    border: 1px solid var(--linea);
    margin-top: 1rem;
    animation: fadeIn 0.6s ease-out;
}

.res-circulo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0 auto 1.5rem;
    border: 8px solid var(--verde);
    box-shadow: 0 0 20px var(--verde-glow);
}

.res-circulo.reprobado {
    border-color: var(--amarillo);
    box-shadow: 0 0 20px rgba(217, 119, 6, 0.15);
}

.res-num {
    font-family: 'Outfit';
    font-size: 3rem;
    font-weight: 800;
    color: var(--azul);
    line-height: 1;
}

.res-de {
    color: var(--gris);
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0.1rem;
}

.res-titulo {
    font-family: 'Outfit';
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--verde-osc);
    margin: 0.5rem 0;
}

.res-titulo.reprobado {
    color: var(--amarillo);
}

.res-detalle {
    color: var(--gris);
    font-size: 1.05rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.res-folio {
    color: var(--azul);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.8rem;
    background: var(--azul-light);
    display: inline-block;
    padding: 0.4rem 1.2rem;
    border-radius: 12px;
    border: 1px solid rgba(15, 32, 56, 0.05);
}

.resultado .btn-primary, .resultado .btn-ghost {
    margin: 0.4rem;
}

/* ---- Certificado / Diploma Web Premium ---- */
.diploma {
    background: #fff;
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: var(--sombra-lg);
    border: 1px solid var(--linea);
    margin-bottom: 2rem;
    position: relative;
    background-image: 
        radial-gradient(circle at 0% 0%, hsla(35, 90%, 45%, 0.02) 0%, transparent 40%),
        radial-gradient(circle at 100% 100%, hsla(162, 80%, 30%, 0.02) 0%, transparent 40%);
}

.diploma-borde {
    border: 3px double var(--verde);
    border-radius: 18px;
    padding: 4rem 3rem;
    text-align: center;
    background: linear-gradient(180deg, #fff 0%, var(--azul-light) 100%);
    position: relative;
}

/* Esquinas ornamentales del diploma */
.diploma-borde::before {
    content: '';
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 10px;
    right: 10px;
    border: 1px solid rgba(5, 150, 105, 0.15);
    border-radius: 12px;
    pointer-events: none;
}

.diploma-logo {
    max-height: 85px;
    width: auto;
    margin-bottom: 1rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.03));
}

.diploma-marca {
    font-weight: 800;
    color: var(--verde-osc);
    font-size: 1.25rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.diploma-sub {
    color: var(--gris);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 2rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.diploma-titulo {
    font-weight: 800;
    color: var(--azul);
    font-size: 2.2rem;
    letter-spacing: -0.5px;
    margin-bottom: 1.6rem;
}

.diploma-otorga {
    color: var(--gris);
    font-size: 0.95rem;
    font-weight: 500;
}

.diploma-nombre {
    font-weight: 800;
    color: var(--azul2);
    font-size: 2.2rem;
    margin: 0.6rem 0 1.4rem;
    border-bottom: 1px dashed rgba(15, 32, 56, 0.15);
    display: inline-block;
    padding: 0 2rem 0.3rem;
}

.diploma-por {
    color: var(--gris);
    font-size: 0.95rem;
    font-weight: 500;
}

.diploma-curso {
    color: var(--verde-osc);
    font-weight: 800;
    font-size: 1.35rem;
    margin-top: 0.4rem;
    font-family: 'Outfit';
}

.diploma-nivel {
    color: var(--gris);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
}

.diploma-calif {
    color: var(--azul);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.diploma-folio {
    color: var(--gris);
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 2.2rem;
}

.diploma-firma {
    color: var(--gris2);
    margin-top: 1rem;
}

.diploma-firmante {
    color: var(--azul);
    font-weight: 700;
    font-family: 'Outfit';
    font-size: 1.05rem;
    margin-top: 0.2rem;
}

.cert-acciones {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cert-nota {
    text-align: center;
    color: var(--gris);
    margin-top: 2rem;
    font-size: 0.95rem;
    font-weight: 500;
}

/* ---- Footer ---- */
.footer {
    background: var(--azul);
    color: hsl(212, 30%, 80%);
    padding: 2.2rem;
    margin-top: 5rem;
    border-top: 4px solid var(--verde);
}

.footer-in {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    font-size: 0.92rem;
    justify-content: center;
    font-weight: 500;
    text-align: center;
}

.footer-in strong {
    color: #fff;
}

.oculto {
    display: none !important;
}

/* ---- SVG Icons Styling ---- */
.svg-icon {
    width: 24px;
    height: 24px;
    display: inline-block;
    vertical-align: middle;
    stroke: currentColor;
    fill: none;
    transition: var(--tr);
}
.hero-art .svg-icon {
    width: 60px;
    height: 60px;
    color: var(--verde);
    margin-bottom: 0.5rem;
}
.feature .svg-icon {
    width: 44px;
    height: 44px;
    color: var(--azul);
    margin-bottom: 0.8rem;
}
.nivel-icono .svg-icon {
    width: 38px;
    height: 38px;
    color: var(--c);
}
.curso-stats .svg-icon {
    width: 18px;
    height: 18px;
    margin-right: 0.3rem;
    margin-top: -3px;
    color: hsl(212, 30%, 80%);
}
.examen-ic .svg-icon {
    width: 48px;
    height: 48px;
    color: var(--amarillo);
}
.candado .svg-icon {
    width: 22px;
    height: 22px;
    color: var(--gris2);
}

/* ---- Animaciones CSS ---- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- Responsivo Adaptativo ---- */
@media (max-width: 860px) {
    .topbar {
        padding: 0.9rem 1.5rem;
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        text-align: center;
    }
    
    .topbar nav {
        width: 100%;
        justify-content: center;
    }
    
    .topbar nav a {
        margin: 0 0.8rem;
    }
    
    .brand-madre {
        display: none; /* Simplificar en móvil */
    }

    .hero-in {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }
    
    .hero-text h1 {
        font-size: 2.4rem;
    }
    
    .hero-sub {
        max-width: 100%;
    }
    
    .hero-card {
        transform: none;
        margin: 0 auto;
    }
    
    .hero-card:hover {
        transform: translateY(-5px);
    }
    
    .niveles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .features {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
    
    .form-empezar {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .leccion-contenido {
        padding: 2.2rem 1.5rem;
    }
    
    .leccion-contenido h1 {
        font-size: 1.8rem;
    }
    
    .diploma-borde {
        padding: 2.5rem 1.2rem;
    }
    
    .diploma-nombre {
        font-size: 1.8rem;
        padding: 0 0.5rem 0.3rem;
    }
}

@media (max-width: 480px) {
    .niveles-grid {
        grid-template-columns: 1fr;
    }
}
