/* ==========================================================================
   VARIABLES GLOBALES
   Colores modernos, vibrantes y frescos enfocados en adolescentes (10-18)
   ========================================================================== */
:root {
    /* Paleta Principal */
    --primary: #4F46E5;
    /* Indigo brillante */
    --primary-hover: #4338CA;
    --secondary: #10B981;
    --accent: #F43F5E;
    --success: #3dfc03;
    /* Verde fosforescente */
    --success-hover: #35e202;
    --bg-light: #F8FAFC;

    /* Colores Especiales de Rutas */
    --tech-color: #3B82F6;
    /* Azul */
    --robotic-color: #F43F5E;
    /* Rosa/Rojo */
    --office-color: #F59E0B;
    /* Amarillo/Naranja */

    /* Gradients */
    --grad-1: linear-gradient(135deg, #4F46E5, #EC4899);
    --grad-2: linear-gradient(135deg, #10B981, #3B82F6);
    --grad-3: linear-gradient(135deg, #F59E0B, #F43F5E);
    --grad-button: linear-gradient(135deg, #6366f1, #8b5cf6);
    --grad-success: linear-gradient(135deg, #3dfc03, #32D74B);

    /* Backgrounds y Textos */
    --bg-main: #F8FAFC;
    --bg-card: #FFFFFF;
    --bg-dark: #0F172A;
    --text-main: #1E293B;
    --text-muted: #64748B;

    /* Radios y Sombras (Efectos modernos) */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-soft: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ==========================================================================
   RESET & TIPOGRAFÍA
   Uso de fuentes modernas: Inter y Outfit
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--bg-dark);
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Utilidades */
.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.bg-light {
    background-color: #F1F5F9;
}

/* Botones */
.btn-primary,
.btn-secondary,
.btn-outline,
.btn-accent,
.btn-success {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
}

.btn-primary {
    background: var(--grad-button);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.btn-secondary {
    background: white;
    color: var(--primary);
    box-shadow: var(--shadow-soft);
}

.btn-secondary:hover {
    color: var(--primary-hover);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 0.5rem 1.2rem;
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-accent {
    background: var(--grad-3);
    color: white;
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.4);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 63, 94, 0.6);
}

.btn-success {
    background: var(--grad-success);
    color: #000;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(61, 252, 3, 0.4);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(61, 252, 3, 0.6);
    filter: brightness(1.1);
}

/* ==========================================================================
   NAVBAR (HEADER)
   Fijo en la parte superior, efecto tipo cristal (glassmorphism)
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.logo-icon {
    font-size: 1.8rem;
    background: var(--grad-button);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a:not(.btn-primary):not(.btn-accent):not(.btn-success) {
    font-weight: 500;
    color: var(--text-main);
    position: relative;
}

.nav-links a:not(.btn-primary):not(.btn-accent):not(.btn-success)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:not(.btn-primary):not(.btn-accent):not(.btn-success):hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    padding: 8rem 0 5rem 0;
    background: linear-gradient(180deg, #F8FAFC 0%, #FFFFFF 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: var(--grad-1);
    opacity: 0.1;
    z-index: 0;
    filter: blur(80px);
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.hero-text {
    flex: 1;
    max-width: 600px;
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero-text .highlight {
    background: var(--grad-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hero-image img {
    max-width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    animation: floating 6s ease-in-out infinite;
}

@keyframes floating {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* ==========================================================================
   SECCIONES GENERALES
   ========================================================================== */
.section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 4px;
    background: var(--grad-button);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   RUTAS DE APRENDIZAJE
   ========================================================================== */
.grid-rutas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card-ruta {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card-ruta:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.card-img-placeholder img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 2rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.badge-tech {
    background-color: var(--tech-color);
}

.badge-robotic {
    background-color: var(--robotic-color);
}

.badge-office {
    background-color: var(--office-color);
}

.card-content h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.card-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    min-height: 50px;
}

/* ==========================================================================
   TUTORIALES RECIENTES
   ========================================================================== */
.grid-tutoriales {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.card-video {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    transition: all 0.3s;
}

.card-video:hover {
    transform: scale(1.02);
}

.video-thumb {
    position: relative;
    width: 100%;
    height: 180px;
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: background 0.3s;
}

.card-video:hover .play-btn {
    background: var(--accent);
}

.video-info {
    padding: 1.2rem;
}

.video-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.video-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ==========================================================================
   RECURSOS Y ENLACES
   ========================================================================== */
.grid-enlaces {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.enlace-box {
    background: var(--bg-card);
    padding: 2rem 1.5rem;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.enlace-box:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.enlace-box i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.text-gradient-1 {
    background: var(--grad-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-2 {
    background: var(--grad-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-3 {
    background: var(--grad-3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-4 {
    background: var(--grad-button);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.enlace-box h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.enlace-box p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
    background-color: var(--bg-dark);
    color: white;
    padding: 4rem 0 1rem 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer .logo {
    padding: 0;
}

.footer .logo-text,
.footer .logo-icon {
    color: white;
    background: none;
    -webkit-text-fill-color: white;
}

.footer-brand p {
    color: #94A3B8;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.footer-links h4,
.footer-social h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 1.2rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

.footer-links ul li a {
    color: #94A3B8;
}

.footer-links ul li a:hover {
    color: white;
    padding-left: 5px;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.social-icons a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #64748B;
    font-size: 0.85rem;
}

/* ==========================================================================
   ENLACE ACTIVO EN NAVBAR
   Resalta la página actual en el menú de navegación
   ========================================================================== */
.nav-links a.active-nav:not(.btn-primary):not(.btn-accent):not(.btn-success) {
    color: var(--primary);
    font-weight: 700;
}

/* Efecto para botones activos (Actividades / Recuperaciones) */
.nav-links a.active-nav.btn-primary,
.nav-links a.active-nav.btn-success {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15), 0 0 10px rgba(255, 255, 255, 0.2);
    filter: brightness(1.1);
}

.nav-links a.btn-success {
    color: #000;
    /* Texto oscuro para mejor contraste sobre verde neón */
    position: relative;
}

.nav-links a.btn-success:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(61, 252, 3, 0.6) !important;
    filter: brightness(1.1);
}

/* ==========================================================================
   PAGE HERO (Banner superior de páginas internas)
   Se usa en rutas, tutoriales, recursos y actividades
   ========================================================================== */
.page-hero {
    padding: 8rem 0 4rem 0;
    background: linear-gradient(135deg, #0F172A 0%, #1e1b4b 50%, #312e81 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Círculo decorativo animado de fondo */
.page-hero::before {
    content: '';
    position: absolute;
    top: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: var(--grad-button);
    opacity: 0.08;
    filter: blur(60px);
}

.page-hero-content {
    position: relative;
    z-index: 1;
}

/* Ícono grande decorativo en el hero de página */
.page-hero-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: var(--grad-button);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.page-hero h1 {
    font-size: 3rem;
    color: white;
    margin-bottom: 1rem;
}

.page-hero p {
    color: #94A3B8;
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Variante de color para la página de actividades */
.page-hero-actividades {
    background: linear-gradient(135deg, #0F172A 0%, #1f2937 50%, #064e3b 100%);
}

/* Variante de color para la página de recuperaciones (Oportunidad/Éxito) */
.page-hero-recuperaciones {
    background: linear-gradient(135deg, #0F172A 0%, #064e3b 50%, #15803d 100%);
}

/* ==========================================================================
   PASOS / CÓMO FUNCIONA (Steps Grid)
   Usado en rutas.html para explicar el proceso de aprendizaje
   ========================================================================== */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.step-box {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(79, 70, 229, 0.08);
    transition: transform 0.3s;
}

.step-box:hover {
    transform: translateY(-4px);
}

/* Número grande y llamativo del paso */
.step-number {
    width: 55px;
    height: 55px;
    background: var(--grad-button);
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
}

.step-box h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.step-box p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ==========================================================================
   META DE RUTA (info: lecciones, duración, nivel)
   Aparece en las tarjetas de rutas.html
   ========================================================================== */
.ruta-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.ruta-meta span {
    font-size: 0.82rem;
    color: var(--text-muted);
    background: #F1F5F9;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* ==========================================================================
   RECURSOS: GRID DE PLATAFORMAS (enlace-box-grande)
   Tarjetas grandes para plataformas educativas en recursos.html
   ========================================================================== */
.recursos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.enlace-box-grande {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1.8rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.3s;
    position: relative;
    text-decoration: none;
    color: var(--text-main);
}

.enlace-box-grande:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.recurso-icon {
    font-size: 2.2rem;
    flex-shrink: 0;
    width: 50px;
    text-align: center;
}

.recurso-info {
    flex: 1;
}

.recurso-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.recurso-info p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.recurso-tag {
    display: inline-block;
    font-size: 0.78rem;
    background: #F1F5F9;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    color: var(--text-muted);
    font-weight: 600;
}

.recurso-arrow {
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: transform 0.3s;
}

.enlace-box-grande:hover .recurso-arrow {
    transform: translateX(4px);
    color: var(--primary);
}

/* ==========================================================================
   DOCUMENTOS DEL PROFE (docs-grid / doc-card)
   Tarjetas de archivos y documentos compartidos en recursos.html
   ========================================================================== */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.doc-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.3s;
    text-decoration: none;
    color: var(--text-main);
}

.doc-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: var(--shadow-hover);
}

.doc-icon {
    font-size: 2.2rem;
    flex-shrink: 0;
}

.doc-info h4 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.doc-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.doc-meta {
    font-size: 0.78rem;
    color: var(--primary);
    font-weight: 600;
}

/* ==========================================================================
   TUTORIALES: CATEGORÍAS AGRUPADAS
   Agrupa los videos por tema en tutoriales.html
   ========================================================================== */
.categorias-grid {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.categoria-grupo {
    border-radius: var(--radius-md);
}

.categoria-titulo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #E2E8F0;
}

.categoria-titulo i {
    font-size: 1.8rem;
}

.categoria-titulo h3 {
    font-size: 1.6rem;
}

/* Descripción breve debajo del título en cada video */
.video-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
    line-height: 1.5;
}

/* ==========================================================================
   ACTIVIDADES: FILTROS POR GRADO (Pestañas/Tabs)
   ========================================================================== */
.grados-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 2rem;
    padding: 0.5rem;
    background: #F1F5F9;
    border-radius: var(--radius-md);
}

.grado-btn {
    padding: 0.5rem 1.1rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.grado-btn:hover {
    background: white;
    color: var(--primary);
}

.grado-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

/* ==========================================================================
   ACTIVIDADES: TARJETAS DE ACTIVIDADES / TAREAS
   ========================================================================== */
.actividades-lista {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.actividad-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.actividad-card:hover {
    box-shadow: var(--shadow-hover);
}

/* Tarjeta de actividad cerrada: más apagada */
.actividad-cerrada {
    opacity: 0.65;
}

.actividad-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #F1F5F9;
    gap: 1rem;
    flex-wrap: wrap;
}

.actividad-header h3 {
    font-size: 1.2rem;
    margin-top: 0.5rem;
}

.actividad-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.3rem;
}

/* Etiquetas/badges de las tarjetas de actividades */
.actividad-badge {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
}

.badge-active {
    background: #D1FAE5;
    color: #065F46;
}

.badge-warning {
    background: #FEF3C7;
    color: #92400E;
}

.badge-closed {
    background: #F1F5F9;
    color: #64748B;
}

.badge-grado {
    background: #EDE9FE;
    color: #5B21B6;
}

.actividad-fecha {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    font-size: 0.88rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.actividad-body {
    padding: 1.5rem 2rem;
}

.actividad-body>p {
    color: var(--text-muted);
    margin-bottom: 1.2rem;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Bloque de instrucciones paso a paso */
.actividad-instrucciones {
    background: #F8FAFC;
    border-left: 4px solid var(--primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 1.2rem 1.5rem;
    margin-bottom: 1.5rem;
}

.actividad-instrucciones h4 {
    font-size: 1rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.actividad-instrucciones ol {
    padding-left: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.actividad-instrucciones li {
    font-size: 0.9rem;
    color: var(--text-main);
    line-height: 1.5;
}

.actividad-instrucciones a {
    color: var(--primary);
    font-weight: 600;
}

.actividad-footer {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ==========================================================================
   CTA AUTOEVALUACIÓN (Bloque destacado en actividades.html)
   ========================================================================== */
.cta-autoevaluacion {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: linear-gradient(135deg, #0F172A, #312e81);
    border-radius: var(--radius-lg);
    padding: 3rem 2.5rem;
    flex-wrap: wrap;
    justify-content: space-between;
}

.cta-icon {
    font-size: 3.5rem;
    color: white;
    opacity: 0.8;
    flex-shrink: 0;
}

.cta-texto {
    flex: 1;
    min-width: 200px;
}

.cta-texto h2 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.cta-texto p {
    color: #94A3B8;
    font-size: 0.95rem;
}

/* Variante de botón más grande para CTAs especiales */
.btn-grande {
    padding: 1rem 2.2rem;
    font-size: 1.05rem;
    white-space: nowrap;
}

/* ==========================================================================
   RESPONSIVE DESIGN (Móviles y Tablets)
   ========================================================================== */
@media (max-width: 900px) {
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 2rem;
    }

    .hero-text h1 {
        font-size: 2.8rem;
    }

    .hero-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .nav-links {
        display: none;
        /* Se ocultan por defecto en móvil */
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: white;
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .page-hero h1 {
        font-size: 2.2rem;
    }

    .steps-grid {
        grid-template-columns: 1fr 1fr;
    }

    .actividad-header {
        flex-direction: column;
    }

    .cta-autoevaluacion {
        flex-direction: column;
        text-align: center;
    }

    .cta-autoevaluacion .btn-grande {
        width: 100%;
        text-align: center;
    }

    .docs-grid,
    .recursos-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .page-hero h1 {
        font-size: 1.8rem;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }

    .grados-tabs {
        gap: 0.4rem;
    }

    .grado-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}