/* ============================================
   styles.css - Production CSS (auto-generated)
   Generated by rebuild_css.py
   ============================================ */


/* --- module: base.css --- */

:root {
    --primary: #00664a;
    --primary-dark: #004d38;
    --primary-light: #00896a;
    --secondary: #f9a825;
    --accent: #4a2c8a;
    --bg-primary: #ffffff;
    --bg-secondary: #f8faf9;
    --bg-tertiary: #f0f4f2;
    --text-primary: #1a2e28;
    --text-secondary: #4a5e58;
    --text-muted: #6b7e78;
    --border: #e0e8e4;
    --border-light: #edf2ef;
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #dc2626;
    --info: #0284c7;
    --code-bg: #1e1e2e;
    --code-text: #cdd6f4;
    --shadow-sm: 0 1px 3px rgba(0, 102, 74, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 102, 74, 0.1);
    --shadow-lg: 0 8px 30px rgba(0, 102, 74, 0.12);
    --shadow-xl: 0 20px 60px rgba(0, 102, 74, 0.15);
    --card-bg: var(--bg-primary);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
    --header-height: 72px;
    --sidebar-width: clamp(260px, 22vw, 360px);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Modo Oscuro */
[data-theme="dark"] {
    --primary: #00b386;
    --primary-dark: #00896a;
    --primary-light: #4dd0a8;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border: #334155;
    --border-light: #1e293b;
    --code-bg: #0a0e1a;
    --code-text: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.6);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.6s ease-out forwards;
}

.animate-fade-in-right {
    animation: fadeInRight 0.6s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.5s ease-out forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 16px);
    font-size: clamp(14px, 0.5vw + 0.5rem, 20px);
    min-height: 100dvh;
}

body {
    font-family: var(--font-sans);
    font-size: clamp(15px, 0.5vw + 0.5rem, 18px);
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100dvh;
    overflow-x: hidden;
}

/* Accesibilidad: secciones con margen de scroll para anclas */
section[id] {
    scroll-margin-top: calc(var(--header-height) + 16px);
}

/* Focus visible solo para navegación por teclado */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

:focus:not(:focus-visible) {
    outline: none;
}

/* Safe-guard: nada debe desbordar el viewport horizontal */
img, table, pre, code, video, iframe, svg {
    max-width: 100%;
}

/* Respetar preferencia de animaciones reducidas */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ── Container Responsive Mobile-First ─────────────────────────────────── */
/* Breakpoints canónicos: sm:640px, md:768px, lg:1024px, xl:1280px, 2xl:1536px */
.container {
    width: 100%;
    max-width: 100%;
    padding: 0 1rem;
    margin: 0 auto;
}

@media (min-width: 640px) {
    .container {
        padding: 0 1.25rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 1.5rem;
        max-width: 1280px;
    }
}

@media (min-width: 1280px) {
    .container {
        padding: 0 2rem;
        max-width: 1440px;
    }
}

@media (min-width: 1536px) {
    .container {
        max-width: 1680px;
    }
}

.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    z-index: 10000;
    transition: width 0.1s linear;
    width: 0%;
}


/* --- module: layout.css --- */


/* ============================================
   STACKING CONTEXT (z-index)
   ============================================
    100000+  → skip-link, elementos críticos de accesibilidad
    99999    → toast-container
    99998    → celebration-overlay
    10002    → search-modal, shortcuts-modal
    10001    → code-block.focus-mode
    10000    → code-overlay, reading-mode-exit-btn
    1003     → sidebar-link-preview (tooltips que salen del sidebar), sidebar-show-btn
    1002     → main-sidebar, quick-nav-tooltip
    1001     → quick-nav-panel, header.scrolled
    1000     → header, [data-tooltip]::after
    999      → scroll-top-btn, reading-progress, toc-wrapper, mobile-page-nav
   900      → section-nav, quick-nav-panel (legacy)
   ============================================ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    transition: var(--transition);
}

[data-theme="dark"] .header {
    background: rgba(15, 23, 42, 0.95);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sena-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sena-badge {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 1px;
}

.logo-subtitle {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-divider {
    width: 1px;
    height: 32px;
    background: var(--border);
}

.course-info {
    display: flex;
    flex-direction: column;
}

.course-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.course-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--primary);
    background: var(--bg-tertiary);
}

.nav-link.active {
    color: var(--primary);
    background: rgba(0, 102, 74, 0.08);
    font-weight: 600;
}

.nav-link i {
    font-size: 0.8rem;
}

.mobile-menu-btn {
    display: none;
    width: 42px;
    height: 42px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.2rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

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

.sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-primary);
    box-shadow: var(--shadow-xl);
    z-index: 2000;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sidebar.open {
    left: 0;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
}

.sidebar-close {
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.sidebar-close:hover {
    background: var(--danger);
    color: white;
}

.sidebar-nav {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-link {
    display: block;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.sidebar-link:hover {
    background: var(--bg-tertiary);
    color: var(--primary);
}

.sidebar-link.active {
    background: rgba(0, 102, 74, 0.08);
    color: var(--primary);
    font-weight: 600;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.progress-track {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.main-content {
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
    min-height: calc(100dvh - var(--header-height));
}




/* --- module: hero.css --- */

.hero-section {
    position: relative;
    min-height: calc(100dvh - var(--header-height));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    gap: 1.5rem;
    overflow: clip;
    margin: 0 auto;
    text-align: center;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .hero-bg {
        position: fixed;
    }
}

.hero-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 1px 1px, rgba(0, 102, 74, 0.05) 1px, transparent 0),
        radial-gradient(circle at 20% 80%, rgba(0, 137, 106, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(249, 168, 37, 0.05) 0%, transparent 50%);
    background-size: 40px 40px, 100% 100%, 100% 100%;
    animation: gradientShift 15s ease infinite;
}

.hero-gradient {
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(0, 102, 74, 0.04) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

.hero-content {
    max-width: 100%;
    animation: fadeInLeft 0.8s ease-out;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0, 102, 74, 0.08);
    border: 1px solid rgba(0, 102, 74, 0.15);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 24px;
    transition: var(--transition);
}

.hero-badge:hover {
    background: rgba(0, 102, 74, 0.12);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.hero-title {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--primary-light), var(--secondary));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

.hero-description {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.hero-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.stat-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, rgba(0, 102, 74, 0.1), rgba(0, 137, 106, 0.1));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.1rem;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: var(--font-sans);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 4px 14px rgba(0, 102, 74, 0.3);
}

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

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

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

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

.hero-visual {
    display: none;
}

/* ── Hero Responsive Mobile-First ───────────────────────────────────────── */
/* sm: (640px+) */
@media (min-width: 640px) {
    .hero-section {
        padding: 2rem;
    }

    .hero-title {
        font-size: 2.25rem;
        max-width: 800px;
        margin: 0 auto 1rem;
    }

    .hero-description {
        font-size: 1rem;
        max-width: 600px;
        margin: 0 auto 2rem;
    }

    .hero-stats {
        justify-content: center;
    }
}

/* lg: (1024px+) */
@media (min-width: 1024px) {
    .hero-section {
        flex-direction: row;
        text-align: left;
        padding: 2rem;
        min-height: calc(100vh - var(--header-height));
        min-height: calc(100dvh - var(--header-height));
        gap: 3rem;
    }

    .hero-content {
        max-width: 600px;
    }

    .hero-title {
        font-size: 2.75rem;
        margin: 0 0 1.25rem;
        max-width: none;
    }

    .hero-description {
        font-size: 1.125rem;
        max-width: none;
        margin: 0 0 2rem;
    }

    .hero-stats {
        justify-content: flex-start;
    }

    .hero-actions {
        justify-content: flex-start;
    }

    .hero-visual {
        display: block;
        flex: 1;
        max-width: 550px;
        animation: fadeInRight 0.8s ease-out;
    }
}

/* xl: (1280px+) */
@media (min-width: 1280px) {
    .hero-section {
        padding: 3rem;
    }

    .hero-title {
        font-size: 3.5rem;
    }
}

.code-window {
    background: var(--code-bg);
    border-radius: var(--radius-lg);
}


/* --- module: sections.css --- */

.exercise-section {
    margin-top: 2.5rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
}

.exercise-section h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.exercise-section > p {
    color: var(--text-muted);
    margin-bottom: 0;
}

.exercise-difficulty {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.architecture-evolution {
    position: relative;
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.architecture-evolution:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

@media (max-width: 600px) {
    .tier-details {
        grid-template-columns: 1fr;
    }
    .final-summary {
        padding: 1.5rem;
    }
}

.window-body {
    padding: 0;
    overflow: hidden;
}

.window-body pre {
    margin: 0;
}

/* (trasladado a code-blocks.css - estandar global) */

.tech-stack-section {
    padding: 3rem 0;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    position: relative;
    overflow: hidden;
}

@media (min-width: 640px) {
    .tech-stack-section { padding: 4rem 0; }
}

@media (min-width: 1024px) {
    .tech-stack-section { padding: 5rem 0; }
}

.tech-stack-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.3;
}

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

@media (min-width: 640px) {
    .section-header { margin-bottom: 2.5rem; }
}

@media (min-width: 1024px) {
    .section-header { margin-bottom: 3rem; }
}

.section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(0, 102, 74, 0.08);
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    transition: var(--transition);
}

.section-number:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.section-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

@media (min-width: 640px) {
    .section-title { font-size: 2rem; }
}

@media (min-width: 1024px) {
    .section-title { font-size: 2.4rem; }
}

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

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.tech-hint {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 16px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    animation: pulse 2s ease-in-out infinite;
}

.tech-hint i {
    font-size: 1rem;
}

.tech-card {
    background: var(--bg-primary);
    padding: 28px 20px;
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid var(--border-light);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.tech-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.tech-card:hover::before {
    transform: scaleX(1);
}

.tech-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.tech-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 16px;
    color: white;
    transition: var(--transition);
    position: relative;
}

.tech-card:hover .tech-icon {
    transform: scale(1.1) rotate(5deg);
}

.tech-icon.java { background: linear-gradient(135deg, #f89820, #e76f00); }
.tech-icon.jakarta { background: linear-gradient(135deg, #4a2c8a, #7c3aed); }
.tech-icon.postgres { background: linear-gradient(135deg, #336791, #1d4e89); }
.tech-icon.tomcat { background: linear-gradient(135deg, #f8dc75, #e8a825); color: #333; }
.tech-icon.maven { background: linear-gradient(135deg, #c71a36, #a01529); }
.tech-icon.docker { background: linear-gradient(135deg, #0db7ed, #008fd5); }
.tech-icon.fastapi { background: linear-gradient(135deg, #009688, #00796B); }
.tech-icon.react { background: linear-gradient(135deg, #61DAFB, #00BCD4); }

.tech-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.tech-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.tech-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 8px;
    font-size: 0.65rem;
    font-weight: 600;
    background: rgba(0, 102, 74, 0.08);
    color: var(--primary);
    border-radius: 4px;
    text-transform: uppercase;
    transition: var(--transition);
}

.tech-card:hover .tech-tag {
    background: var(--primary);
    color: white;
}

.learning-path-section {
    padding: 3rem 0;
    background: var(--bg-primary);
    position: relative;
}

@media (min-width: 640px) {
    .learning-path-section { padding: 4rem 0; }
}

@media (min-width: 1024px) {
    .learning-path-section { padding: 5rem 0; }
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--primary), var(--primary-light), var(--secondary));
    transform: translateX(-50%);
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    animation: fadeInUp 0.6s ease-out backwards;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }
.timeline-item:nth-child(5) { animation-delay: 0.5s; }
.timeline-item:nth-child(6) { animation-delay: 0.6s; }

.timeline-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.timeline-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0, 102, 74, 0.3);
    transition: var(--transition);
}

.timeline-item:hover .timeline-icon {
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(0, 102, 74, 0.4);
}

.timeline-content {
    width: 100%;
    padding: 24px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid var(--border-light);
    transition: var(--transition);
    box-sizing: border-box;
}

.timeline-link {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 45%;
}

.timeline-item:nth-child(odd) .timeline-link {
    margin-right: auto;
    margin-left: 0;
}

.timeline-item:nth-child(even) .timeline-link {
    margin-left: auto;
    margin-right: 0;
}

.timeline-link:hover .timeline-content {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

@media (max-width: 768px) {
    .timeline-link {
        width: 100%;
    }
}

@media (max-width: 360px) {
    .timeline-item {
        padding-left: 40px;
    }
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.timeline-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.timeline-duration {
    padding: 4px 12px;
    background: rgba(0, 102, 74, 0.08);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 50px;
}

.timeline-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.timeline-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    padding: 4px 10px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    transition: var(--transition);
}

.timeline-content:hover .tag {
    background: rgba(0, 102, 74, 0.1);
    color: var(--primary);
}

@media (max-width: 768px) {
    .timeline::before {
        left: 24px;
    }
    
    .timeline-item {
        flex-direction: row !important;
        padding-left: 60px;
    }
    
    .timeline-marker {
        left: 24px;
    }
    
    .timeline-content {
        width: 100%;
    }
}


/* --- module: sidebar-nav.css --- */




.search-modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    max-height: 70vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    animation: scaleIn 0.2s ease;
}

.search-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-modal-header i {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.search-modal-input {
    flex: 1;
    border: none;
    outline: none;
    font-family: var(--font-sans);
    font-size: 1.1rem;
    color: var(--text-primary);
    background: transparent;
}

.search-modal-close {
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.search-modal-results {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-primary);
}

.search-result-item:hover, .search-result-item.highlighted {
    background: var(--bg-secondary);
}

.search-result-item.active {
    background: rgba(0, 102, 74, 0.08);
}

.search-result-icon {
    width: 36px;
    height: 36px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.search-result-section {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.search-result-arrow {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.search-modal-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.search-modal-footer kbd {
    padding: 2px 6px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    margin: 0 2px;
}

.no-results {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

.no-results i {
    font-size: 2rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* ============================================
   MODO OSCURO TOGGLE
   ============================================ */

.theme-toggle {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1rem;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.theme-toggle .fa-sun {
    display: none;
}

[data-theme="dark"] .theme-toggle .fa-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle .fa-sun {
    display: block;
}

/* ============================================
   QUIZ INTERACTIVO
   ============================================ */

.quiz-container {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin: 32px 0;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
}

.quiz-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}

.quiz-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
}

.quiz-title {
    flex: 1;
}

.quiz-title h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.quiz-title p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.quiz-progress {
    padding: 4px 12px;
    background: var(--bg-tertiary);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
}

.quiz-question {
    margin-bottom: 24px;
}

.quiz-question-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    line-height: 1.5;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    width: 100%;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--text-primary);
}

.quiz-option:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary);
    transform: translateX(4px);
}

.quiz-option.selected {
    background: rgba(0, 102, 74, 0.08);
    border-color: var(--primary);
}

.quiz-option.correct {
    background: rgba(22, 163, 74, 0.1);
    border-color: var(--success);
    color: var(--success);
}

.quiz-option.incorrect {
    background: rgba(220, 38, 38, 0.1);
    border-color: var(--danger);
    color: var(--danger);
}

.quiz-option-letter {
    width: 32px;
    height: 32px;
    background: var(--bg-primary);
    border: 2px solid currentColor;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.quiz-feedback {
    margin-top: 16px;
    padding: 16px;
    border-radius: var(--radius-sm);
    display: none;
    animation: fadeIn 0.3s ease;
}

.quiz-feedback.show {
    display: block;
}

.quiz-feedback.correct {
    background: rgba(22, 163, 74, 0.1);
    border: 1px solid rgba(22, 163, 74, 0.3);
    color: var(--success);
}

.quiz-feedback.incorrect {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: var(--danger);
}

.quiz-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.quiz-btn {
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.quiz-btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
}

.quiz-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 74, 0.3);
}

.quiz-btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.quiz-btn-secondary:hover {
    background: var(--border);
}

/* ============================================
   TIEMPO DE LECTURA
   ============================================ */

.reading-time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(0, 102, 74, 0.08);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    margin-left: 12px;
}

.reading-time i {
    font-size: 0.7rem;
}

/* ============================================
   BREADCRUMBS
   ============================================ */

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb-item a {
    color: var(--text-secondary);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--primary);
}

.breadcrumb-separator {
    color: var(--text-muted);
    font-size: 0.7rem;
}

.breadcrumb-current {
    color: var(--primary);
    font-weight: 600;
}

/* ============================================
   TABS MEJORADOS
   ============================================ */

.tabs-header {
    display: flex;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    position: relative;
}

.tab-btn {
    padding: 14px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 3px solid transparent;
    font-family: var(--font-sans);
    position: relative;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.tab-btn:hover::after {
    width: 50%;
}

.tab-btn.active {
    color: var(--primary);
    background: var(--bg-primary);
}

.tab-btn.active::after {
    width: 100%;
}

/* Quiz timer, score, progress, navigation — generated by JS quiz */
.quiz-timer {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.quiz-current {
    font-weight: 700;
    color: var(--primary);
}
.quiz-score {
    font-weight: 700;
    color: var(--primary);
}
.quiz-progress-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
    flex: 1;
    margin: 0 12px;
}
.quiz-progress-bar::after {
    content: '';
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 3px;
    transition: width 0.3s ease;
}
.quiz-btn-prev,
.quiz-btn-next {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.quiz-btn-prev {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}
.quiz-btn-prev:hover {
    background: var(--border);
}
.quiz-btn-next {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
}
.quiz-btn-next:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 74, 0.3);
}
.quiz-btn-prev:disabled,
.quiz-btn-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.quiz-result {
    margin-top: 20px;
}

/* ============================================
   ANIMACIONES
   ============================================ */

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-in-left {
    animation: slideInLeft 0.5s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.5s ease-out forwards;
}

/* ============================================
   SCROLLBAR PERSONALIZADO
   ============================================ */

.sidebar-navigation::-webkit-scrollbar {
    width: 6px;
}

.sidebar-navigation::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-navigation::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.sidebar-navigation::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .main-sidebar {
        transform: translateX(-100%);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .header {
        left: 0;
    }
    
.sidebar-show-btn {
        display: flex;
    }
}



/* --- module: components.css --- */

.section {
    padding: 2rem 0;
}

@media (min-width: 640px) {
    .section { padding: 2.5rem 0; }
}

@media (min-width: 1024px) {
    .section { padding: 3rem 0; }
}

@media (min-width: 1536px) {
    .section { padding: 4rem 0; }
}

.section-alt {
    background: var(--bg-secondary);
}

.info-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

.info-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table tr {
    border-bottom: 1px solid var(--border-light);
}

.info-table tr:last-child {
    border-bottom: none;
}

.info-table td {
    padding: 18px 24px;
    vertical-align: top;
    word-break: break-word;
    overflow-wrap: break-word;
}

.info-label {
    width: 200px;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-label i {
    color: var(--primary);
    width: 20px;
    text-align: center;
}

.info-value {
    color: var(--text-secondary);
}

.tech-badge {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(0, 102, 74, 0.08);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 4px;
    margin: 2px;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 48px;
}

@media (min-width: 480px) {
    .content-grid {
        grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
        gap: 24px;
    }
}

@media (min-width: 640px) {
    .content-grid {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }
}

.content-card {
    background: var(--bg-primary);
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.content-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-icon {
    width: 48px;
    height: 48px;
    background: rgba(0, 102, 74, 0.08);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.content-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.content-card p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.feature-list {
    list-style: none;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.feature-list li i {
    color: var(--primary);
    margin-top: 4px;
    flex-shrink: 0;
}

.mvc-diagram {
    background: var(--bg-primary);
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}

.diagram-title {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--text-primary);
}

.diagram-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.diagram-box {
    flex: 1;
    min-width: 200px;
    max-width: 250px;
    padding: 28px 20px;
    border-radius: var(--radius-md);
    text-align: center;
    border: 2px solid;
    transition: var(--transition);
}

.diagram-box:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.diagram-box.model {
    border-color: var(--info);
    background: rgba(2, 132, 199, 0.04);
}

.diagram-box.controller {
    border-color: var(--accent);
    background: rgba(74, 44, 138, 0.04);
}

.diagram-box.view {
    border-color: var(--success);
    background: rgba(22, 163, 74, 0.04);
}

.box-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 1.3rem;
    color: white;
}

.model .box-icon { background: var(--info); }
.controller .box-icon { background: var(--accent); }
.view .box-icon { background: var(--success); }

.diagram-box h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.diagram-box p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.box-tag {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-secondary);
}

.diagram-arrow {
    font-size: 1.5rem;
    color: var(--text-muted);
}

.learning-objectives {
    margin-top: 48px;
    padding: 32px;
    background: linear-gradient(135deg, rgba(0, 102, 74, 0.03), rgba(0, 137, 106, 0.03));
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}

.objectives-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.objectives-title i {
    color: var(--primary);
    font-size: 1.3rem;
}

.objectives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.objective-item {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.objective-item:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.objective-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.objective-content h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.objective-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.case-study {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    margin-bottom: 32px;
}

.case-header {
    padding: 20px 28px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border);
}

.case-header i {
    font-size: 1.3rem;
    color: var(--warning);
}

.case-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.case-content {
    padding: 28px;
}

.case-content p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* ── Bloque de Código Responsive Mobile-First ──────────────────────────── */
.code-block {
    border-radius: var(--radius-lg);
    margin: 20px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--code-bg);
    box-shadow: var(--shadow-xl);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-wrap: wrap;
}

.code-lang {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.65);
    font-family: var(--font-mono);
    flex-shrink: 0;
}

.code-file {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.45);
    font-family: var(--font-mono);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.code-file i {
    flex-shrink: 0;
    font-size: 0.7rem;
}

.code-body,
.code-block pre {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0;
    padding: 1rem;
}

.code-block code {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--code-text);
    white-space: pre;
}

@media (min-width: 768px) {
    .code-header {
        padding: 0.75rem 1.25rem;
    }

    .code-body,
    .code-block pre {
        padding: 1.25rem 1.5rem;
    }

    .code-block code {
        font-size: 0.875rem;
        line-height: 1.65;
    }
}

.bad-code .code-header,
.bad-code .window-header {
    background: rgba(220, 38, 38, 0.12);
}

.bad-code .code-lang,
.bad-code .window-title {
    color: var(--danger);
}

.bad-code.code-window {
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.problems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.problem-card {
    padding: 28px;
    border-radius: var(--radius-md);
    border: 1px solid;
}

.problem-card.danger {
    background: rgba(220, 38, 38, 0.04);
    border-color: rgba(220, 38, 38, 0.2);
}

.problem-card.warning {
    background: rgba(245, 158, 11, 0.04);
    border-color: rgba(245, 158, 11, 0.2);
}

.problem-card.info {
    background: rgba(2, 132, 199, 0.04);
    border-color: rgba(2, 132, 199, 0.2);
}

.problem-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: white;
}

.danger .problem-icon { background: var(--danger); }
.warning .problem-icon { background: var(--warning); }
.info .problem-icon { background: var(--info); }

.problem-card h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.problem-card ul {
    list-style: none;
}

.problem-card ul li {
    padding: 4px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.problem-card ul li::before {
    content: "\2022";
    color: inherit;
    font-weight: bold;
    flex-shrink: 0;
}

.reflection-questions {
    background: var(--bg-primary);
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}

.reflection-questions h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.reflection-questions h3 i {
    color: var(--primary);
}

.questions-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.question-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.question-item:hover {
    background: rgba(0, 102, 74, 0.06);
}

.question-number {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}

.question-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    padding-top: 4px;
}

.tabs-container {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

.tabs-header {
    display: flex;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}

.tab-btn {
    padding: 16px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 3px solid transparent;
    font-family: var(--font-sans);
}

.tab-btn:hover {
    color: var(--primary);
    background: rgba(0, 102, 74, 0.04);
}

.tab-btn.active {
    color: var(--primary);
    background: var(--bg-primary);
    border-bottom-color: var(--primary);
}

.tabs-content {
    padding: 32px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tab-panel h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.tab-panel h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 24px 0 12px;
    color: var(--text-primary);
}

.tab-panel p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.tab-panel code {
    padding: 2px 6px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.85em;
    color: var(--primary);
}

.concept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.concept-card {
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.concept-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: white;
}

.concept-icon.model { background: var(--info); }
.concept-icon.view { background: var(--success); }
.concept-icon.controller { background: var(--accent); }

.concept-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.concept-card p {
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.concept-example {
    padding: 8px 12px;
    background: var(--code-bg);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--code-text);
}

.flow-diagram {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin: 16px 0;
}

.flow-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    flex: 1;
    min-width: 180px;
}

.step-number {
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.flow-step p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.flow-arrow {
    color: var(--text-muted);
    font-size: 1rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.feature-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

.feature-item i {
    color: var(--success);
    font-size: 1.2rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.feature-item h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.feature-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.comparison-table {
    display: flex;
    gap: 20px;
    align-items: stretch;
    margin: 20px 0;
    flex-wrap: wrap;
}

.comparison-item {
    flex: 1;
    min-width: 280px;
    padding: 20px;
    border-radius: var(--radius-md);
}

.comparison-item.old {
    background: rgba(220, 38, 38, 0.04);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.comparison-item.new {
    background: rgba(22, 163, 74, 0.04);
    border: 1px solid rgba(22, 163, 74, 0.2);
}

.comparison-item h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.comparison-item.old h4 i { color: var(--danger); }
.comparison-item.new h4 i { color: var(--success); }

.comparison-arrow {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    color: var(--text-muted);
}

.component-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.component-card {
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

.component-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.component-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.warning-box {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-md);
    margin: 20px 0;
}

.warning-box i {
    color: var(--warning);
    font-size: 1.3rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.warning-box h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.warning-box p {
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.advantage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.advantage-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(0, 102, 74, 0.04);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 102, 74, 0.1);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.advantage-item i {
    color: var(--success);
    flex-shrink: 0;
}

.tutorial-steps {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.step-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

.step-header:first-child {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.step-card > :last-child {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.step-header {
    padding: 24px 28px;
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, rgba(0, 102, 74, 0.04), rgba(0, 102, 74, 0.02));
    border-bottom: 1px solid var(--border-light);
}

.step-number {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 800;
    flex-shrink: 0;
}

.step-info h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

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

.step-content {
    padding: 20px 28px;
}

.step-content .code-window {
    margin-left: -28px;
    margin-right: -28px;
    border-left: none;
    border-right: none;
    border-radius: 0;
    max-width: calc(100% + 56px);
}

.step-content .code-window:first-child {
    margin-top: -20px;
    border-top: none;
    border-radius: 0;
}

.step-content .code-window:last-child {
    margin-bottom: -20px;
    border-bottom: none;
}

.step-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 24px 0 12px;
}

.step-content h4:first-child {
    margin-top: 0;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.tool-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

.tool-item i {
    font-size: 1.5rem;
    color: var(--primary);
    width: 32px;
    text-align: center;
}

.tool-item strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.tool-item span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.exercise-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 480px) {
    .exercise-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (min-width: 640px) {
    .exercise-grid {
        grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    }
}

.exercise-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.exercise-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.exercise-header {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-light);
}

.exercise-number {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 800;
}

.difficulty-badge {
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    text-transform: uppercase;
}

.difficulty-badge.medium {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.difficulty-badge.hard {
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger);
}

.difficulty-badge.expert {
    background: rgba(74, 44, 138, 0.1);
    color: var(--accent);
}

.exercise-card h3 {
    padding: 20px 24px 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.exercise-card > p {
    padding: 8px 24px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.exercise-card h4 {
    padding: 16px 24px 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.requirement-list {
    padding: 0 24px;
    list-style: none;
}

.requirement-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 4px 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.requirement-list li i {
    color: var(--success);
    margin-top: 3px;
    flex-shrink: 0;
    font-size: 0.8rem;
}

.requirement-list li .fa-star {
    color: var(--secondary);
}

.exercise-hint {
    margin: 16px 24px 24px;
    padding: 12px 16px;
    background: rgba(0, 102, 74, 0.04);
    border: 1px solid rgba(0, 102, 74, 0.1);
    border-radius: var(--radius-sm);
    display: flex;
    gap: 10px;
    font-size: 0.85rem;
}

.exercise-hint i {
    color: var(--primary);
    margin-top: 2px;
}

.exercise-hint p {
    color: var(--text-secondary);
    margin: 0;
}

.deploy-steps {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.deploy-step {
    display: flex;
    gap: 24px;
    padding: 28px;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

.step-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.deploy-step h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.deploy-step p {
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.deploy-list {
    padding-left: 20px;
    color: var(--text-secondary);
}

.deploy-list li {
    padding: 4px 0;
    font-size: 0.9rem;
}

.deploy-list a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.deploy-list a:hover {
    text-decoration: underline;
}

.evidence-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.evidence-card {
    background: var(--bg-primary);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    text-align: center;
    transition: var(--transition);
}

.evidence-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.evidence-icon {
    width: 64px;
    height: 64px;
    background: rgba(0, 102, 74, 0.08);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    margin: 0 auto 20px;
}

.evidence-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.evidence-card > p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.evidence-card ul {
    list-style: none;
    text-align: left;
    margin-bottom: 20px;
}

.evidence-card ul li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.evidence-card ul li::before {
    content: "\2713";
    color: var(--success);
    font-weight: bold;
    flex-shrink: 0;
}

.evidence-weight {
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    display: inline-block;
}

.rubric-section {
    background: var(--bg-primary);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

.rubric-section h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 24px;
    text-align: center;
}

.rubric-table {
    overflow-x: auto;
}

.rubric-table table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.rubric-table th,
.rubric-table td {
    padding: 14px 16px;
    text-align: left;
    border: 1px solid var(--border);
    font-size: 0.85rem;
    word-break: break-word;
    overflow-wrap: break-word;
}

.rubric-table th {
    background: var(--bg-tertiary);
    font-weight: 700;
    color: var(--text-primary);
}

.rubric-table td:first-child {
    font-weight: 600;
    color: var(--text-primary);
    background: rgba(0, 102, 74, 0.02);
}

.footer {
    background: var(--text-primary);
    color: rgba(255, 255, 255, 0.8);
    padding: 48px 0 24px;
}

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

.footer-section h4 {
    color: white;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-section p {
    font-size: 0.9rem;
    margin-bottom: 8px;
}

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

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: white;
}

.footer-section p i {
    margin-right: 8px;
    color: var(--primary-light);
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 4px;
}

.scroll-top-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

@media (max-width: 768px) {
    .scroll-top-btn {
        bottom: calc(24px + 60px);
        z-index: 1000;
    }
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-4px);
}

@media (max-width: 1024px) {
    .main-nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .diagram-container {
        flex-direction: column;
    }
    
    .diagram-arrow {
        transform: rotate(90deg);
    }
    
    .comparison-table {
        flex-direction: column;
    }
    
    .comparison-arrow {
        justify-content: center;
        transform: rotate(90deg);
    }
    
    .deploy-step {
        flex-direction: column;
        text-align: center;
    }
    
    .step-icon {
        margin: 0 auto;
    }
}

@media (max-width: 768px) {    
    .hero-stats {
        gap: 16px;
    }
    
    .stat-item {
        flex: 1;
        min-width: 120px;
    }
    
    .info-label {
        width: 140px;
        font-size: 0.85rem;
    }
    
    .tabs-header {
        flex-wrap: nowrap;
        overflow-x: auto;
    }
    
    .tab-btn {
        padding: 12px 16px;
        font-size: 0.8rem;
    }
    
    .flow-diagram {
        flex-direction: column;
    }
    
    .flow-arrow {
        transform: rotate(90deg);
    }
    
    .exercise-grid {
        grid-template-columns: 1fr;
    }
    
    .evidence-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0 12px;
    }
    
    .course-info {
        display: none;
    }
    
    .header-divider {
        display: none;
    }
    
    .btn-lg {
        padding: 12px 20px;
        font-size: 0.9rem;
        width: 100%;
        justify-content: center;
    }
    
    .section {
        padding: 48px 0;
    }
    
    .content-card,
    .step-content,
    .case-content,
    .tabs-content {
        padding: 20px;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .header-badge {
        display: none;
    }
}

@media (max-width: 380px) {
    .header-icon-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .logo-text {
        display: none;
    }
    
    .sena-badge {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }
    
    .hero-title {
        font-size: 1.4rem;
    }
    
    .hero-stats {
        gap: 8px;
    }
    
    .stat-item {
        min-width: 100px;
        padding: 8px 12px;
        gap: 8px;
    }
    
    .stat-icon {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    
    .stat-value {
        font-size: 1.1rem;
    }
}

@media (max-width: 400px) {
    .comparison-item {
        min-width: 100%;
    }
    .diagram-box {
        min-width: 100%;
    }
}

@media (max-width: 320px) {
    .flow-step {
        min-width: 100%;
    }
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

::selection {
    background: rgba(0, 102, 74, 0.15);
    color: var(--text-primary);
}

/* ============================================
   NUEVAS SECCIONES: PostgreSQL, ORM, Simuladores


/* --- module: code-blocks.css --- */

/* ============================================
   CODE-BLOCKS.css — Estándar de Presentación
   Sintaxis global, overflow controlado, line numbers y wrap toggle
   Paleta: One Dark Pro (Atom) adaptada
   ============================================ */

/* ── 1. CONTENEDOR PRINCIPAL ─────────────────────────────────────────────── */
.code-window {
    box-shadow: var(--shadow-xl);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin: 24px 0;
    background: var(--code-bg);
    border-radius: var(--radius-lg);
}

.code-window:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
}

/* ── 2. WINDOW HEADER (CHROME) ──────────────────────────────────────────── */
.window-header {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.window-header .window-title {
    flex: 1;
    text-align: left;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
    font-family: var(--font-mono);
    font-weight: 500;
    letter-spacing: 0.01em;
}

.window-header .window-title i {
    margin-right: 6px;
    opacity: 0.7;
}

.window-header .copy-btn {
    flex-shrink: 0;
}

.window-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.dot:hover {
    transform: scale(1.2);
}

.dot.red { background: #ff5f57; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #28ca42; }

.copy-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.5);
    padding: 5px 12px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-sans);
    min-height: 32px;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
}

.copy-btn:active {
    transform: scale(0.95);
}

.copy-btn.copied {
    background: rgba(40, 202, 66, 0.15);
    color: #28ca42;
    border-color: rgba(40, 202, 66, 0.3);
}

/* ── 3. LINE NUMBERS (CSS COUNTERS) ─────────────────────────────────────── */
.code-window pre,
.tech-module pre[class*="language-"],
.code-block pre {
    counter-reset: code-line;
}

.code-window pre code,
.tech-module pre code,
.code-block pre code {
    display: block;
    padding: 0;
}

.code-window pre code .line-number::before,
.tech-module pre code .line-number::before,
.code-block pre code .line-number::before {
    counter-increment: code-line;
    content: counter(code-line);
    display: inline-block;
    width: 3ch;
    margin-right: 1.5ch;
    text-align: right;
    color: rgba(255, 255, 255, 0.2);
    font-variant-numeric: tabular-nums;
    user-select: none;
    font-size: 0.8em;
}

.code-window pre code .line-number,
.tech-module pre code .line-number,
.code-block pre code .line-number {
    display: block;
    padding: 0 1rem 0 0;
}

.code-window pre code .line-number:hover::before,
.tech-module pre code .line-number:hover::before,
.code-block pre code .line-number:hover::before {
    color: var(--primary-light);
    opacity: 1;
}

/* ── 4. OVERFLOW INTELIGENTE ────────────────────────────────────────────── */
pre {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.window-body pre,
.tech-module pre[class*="language-"],
.code-block pre {
    margin: 0;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: pre;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.65;
    color: var(--code-text);
    background-color: transparent !important;
}

.code-window.pre-wrap pre,
.code-block.pre-wrap pre,
.tech-module.pre-wrap pre[class*="language-"] {
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-word;
    overflow-x: hidden;
}

/* ── 5. CODE BODY ────────────────────────────────────────────────────────── */
.window-body {
    padding: 0;
}

.window-body pre {
    padding: 20px;
    border-radius: 0;
}

.window-body pre code {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.65;
    color: var(--code-text);
    background-color: transparent !important;
    padding: 0;
    tab-size: 2;
}

/* ── 5b. INDENT GUIDES ───────────────────────────────────────────────────── */
.window-body pre,
.code-block pre,
.tech-module pre {
    background-image: repeating-linear-gradient(
        to right,
        transparent 0px,
        transparent calc(2ch - 0.5px),
        rgba(255, 255, 255, 0.05) calc(2ch - 0.5px),
        rgba(255, 255, 255, 0.05) 2ch
    );
    background-attachment: local;
}

[data-theme="dark"] .window-body pre,
[data-theme="dark"] .code-block pre,
[data-theme="dark"] .tech-module pre {
    background-image: repeating-linear-gradient(
        to right,
        transparent 0px,
        transparent calc(2ch - 0.5px),
        rgba(255, 255, 255, 0.07) calc(2ch - 0.5px),
        rgba(255, 255, 255, 0.07) 2ch
    );
}

/* ── 6. SINTASIS GLOBAL (Prism.js tokens) ────────────────────────────────── */
pre[class*="language-"] .token,
code[class*="language-"] .token {
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    box-shadow: none !important;
    border: none !important;
    display: inline !important;
}

.token.keyword,
.token.control,
.token.directive {
    color: #c678dd;
    font-weight: 600;
}

.token.string,
.token.char,
.token.doc-string {
    color: #98c379;
}

.token.comment,
.token.documentation,
.token.shebang {
    color: #636d83;
    font-style: italic;
}

.token.function,
.token.macro {
    color: #61afef;
}

.token.number,
.token.unit {
    color: #d19a66;
}

.token.operator,
.token.arrow {
    color: #56b6c2;
}

.token.class-name,
.token.type {
    color: #e5c07b;
    font-weight: 600;
}

.token.punctuation,
.token.delimiter {
    color: #abb2bf;
}

.token.annotation,
.token.decorator {
    color: #e06c75;
    font-weight: 600;
}

.token.boolean,
.token.nil {
    color: #d19a66;
}

.token.builtin,
.token.global {
    color: #56b6c2;
}

.token.regex,
.token.embedding {
    color: #98c379;
}

.token.variable,
.token.parameter,
.token.label {
    color: #e06c75;
}

.token.property,
.token.attribute {
    color: #e06c75;
}

.token.tag,
.token.element {
    color: #e06c75;
}

.token.attr-name {
    color: #d19a66;
}

.token.attr-value {
    color: #98c379;
}

.token.entity {
    color: #e06c75;
}

.token.namespace {
    opacity: 0.7;
}

.token.important {
    color: #c678dd;
    font-weight: bold;
}

.token.url {
    color: #61afef;
    text-decoration: underline;
}

.token.prolog,
.token.doctype,
.token.cdata {
    color: #636d83;
}

.token.selector,
.token.inserted {
    color: #98c379;
}

.token.atrule,
.token.changed {
    color: #d19a66;
}

.token.deleted {
    color: #e06c75;
}

/* ── 7. INLINE CODE ─────────────────────────────────────────────────────── */
code:not(pre code):not([class*="language-"]) {
    padding: 2px 6px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.85em;
    color: var(--primary);
    border: 1px solid var(--border-light);
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* ── 8. FOCUS MODE ──────────────────────────────────────────────────────── */
.code-block.focus-mode {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: min(90vw, 1000px);
    max-height: 80vh;
    z-index: 10001;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--primary);
}

.code-block.focus-mode pre {
    max-height: 70vh;
}

.code-block.focus-mode .focus-toggle-btn {
    background: var(--danger);
    color: white;
}

.code-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.code-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.focus-toggle-btn {
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.65rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-sans);
}

.focus-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: white;
}

/* ── 9. RESULT BOX ──────────────────────────────────────────────────────── */
.result-box {
    background: var(--card-bg);
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: 20px 0;
    box-shadow: var(--shadow-lg);
}

.result-header {
    background: var(--primary);
    color: white;
    padding: 10px 18px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.01em;
}

.result-header i {
    font-size: 0.9rem;
    opacity: 0.9;
}

.result-content {
    padding: 0 !important;
    margin: 0 !important;
}

.result-content code {
    display: block;
    padding: 20px;
    background: var(--code-bg);
    color: var(--code-text);
    font-size: 0.85rem;
    line-height: 1.6;
    font-family: var(--font-mono);
}

.result-content code.language-text {
    color: #a6adc8;
    white-space: pre;
}

/* ── 10. SCROLLBAR ───────────────────────────────────────────────────────── */
pre::-webkit-scrollbar {
    height: 7px;
    width: 7px;
}

pre::-webkit-scrollbar-track {
    background: transparent;
}

pre::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
}

pre::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ── 11. TECH-MODULE OVERRIDES ──────────────────────────────────────────── */
.tech-module pre {
    background: var(--code-bg) !important;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin: 0.75rem 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    line-height: 1.65;
    font-size: 0.85rem;
}

.tech-module code {
    font-family: var(--font-mono);
    color: var(--code-text);
    background: transparent !important;
    padding: 0;
    tab-size: 4;
}

/* ── 12. RESPONSIVE ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .code-window {
        margin: 16px 0;
    }

    .window-body pre {
        padding: 14px;
        font-size: 0.78rem;
        line-height: 1.55;
    }

    .window-header {
        padding: 10px 14px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .window-header .window-title {
        font-size: 0.75rem;
    }

    .code-block.focus-mode {
        width: 95vw;
    }

    .copy-btn {
        font-size: 0.7rem;
        padding: 3px 8px;
        min-height: 28px;
    }

    .result-content code {
        padding: 14px;
        font-size: 0.78rem;
    }
}

@media (max-width: 480px) {
    .window-body pre {
        padding: 10px;
        font-size: 0.72rem;
    }

    .window-dots {
        display: none;
    }
}

/* ── 13. IMPRENTA ───────────────────────────────────────────────────────── */
@media print {
    .code-window {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }

    .code-window .window-header {
        background: #f5f5f5 !important;
    }

    .code-window pre,
    .code-window code {
        white-space: pre-wrap !important;
        word-wrap: break-word !important;
        font-size: 8pt !important;
        line-height: 1.3 !important;
    }

    .window-dots {
        display: none;
    }
}


/* --- module: modules-tech.css --- */

/* ============================================
   MÓDULOS DE TECNOLOGÍA
   ============================================ */

/* ── Tech Modules Responsive Mobile-First ───────────────────────────────── */
.tech-modules {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tech-module {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), 
                box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), 
                border-color 0.3s ease;
}

.tech-module:not(.active):hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(0, 102, 74, 0.3);
}

.tech-module.active {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

/* Header del módulo — padding responsive */
.module-header {
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: background 0.3s ease;
    background: var(--bg-secondary);
}

.module-header:hover {
    background: var(--bg-tertiary);
}

.tech-module.active .module-header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-light);
}

/* Ícono del módulo — responsive */
.module-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.tech-module:hover .module-icon {
    transform: scale(1.05);
}

.module-icon.java { background: linear-gradient(135deg, #f89820, #e76f00); }
.module-icon.jakarta { background: linear-gradient(135deg, #4a2c8a, #7c3aed); }
.module-icon.postgres { background: linear-gradient(135deg, #336791, #1d4e89); }
.module-icon.tomcat { background: linear-gradient(135deg, #f8dc75, #e8a825); color: #333; }
.module-icon.maven { background: linear-gradient(135deg, #c71a36, #a01529); }
.module-icon.docker { background: linear-gradient(135deg, #0db7ed, #008fd5); }
.module-icon.fastapi { background: linear-gradient(135deg, #009688, #00796B); }
.module-icon.react { background: linear-gradient(135deg, #61DAFB, #00BCD4); }

.module-info {
    flex: 1;
    min-width: 0;
}

.module-info h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.module-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Botón toggle — touch target 44px en móvil */
.module-toggle {
    width: 36px;
    height: 36px;
    min-height: 36px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.module-toggle:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.module-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 102, 74, 0.4);
}

.tech-module.active .module-toggle {
    transform: rotate(180deg);
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Contenido del módulo — padding responsive */
.module-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.tech-module.active .module-content {
    max-height: none;
    overflow: visible;
}

.module-section {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
}

/* ── Responsive: Tablet sm: (640px+) ────────────────────────────────────── */
@media (min-width: 640px) {
    .tech-modules {
        gap: 1.25rem;
    }
    
    .module-header {
        padding: 1.25rem;
        gap: 1rem;
    }
    
    .module-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }
    
    .module-info h3 {
        font-size: 1.125rem;
    }
    
    .module-subtitle {
        font-size: 0.875rem;
    }
    
    .module-section {
        padding: 1.25rem;
    }
}

/* ── Responsive: Portátil lg: (1024px+) ─────────────────────────────────── */
@media (min-width: 1024px) {
    .module-header {
        padding: 1.5rem;
    }
    
    .module-section {
        padding: 1.5rem;
    }
}

/* ============================================
   CODE BLOCK PRESENTATION — hereda de code-blocks.css
   Solo overrides específicos para tech-module
   ============================================ */
.tech-module pre {
    background: var(--code-bg) !important;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin: 0.75rem 0;
    border: 1px solid rgba(255,255,255,0.08);
    line-height: 1.65;
    font-size: 0.85rem;
}

.tech-module code {
    font-family: var(--font-mono);
    color: var(--code-text);
    background: transparent !important;
    padding: 0;
    tab-size: 4;
}

.tech-module pre[class*="language-"] {
    background: var(--code-bg) !important;
    margin: 0;
    border: none;
    border-radius: 0;
}

.module-section {
    padding: 24px;
    border-bottom: 1px solid var(--border-light);
}

.module-section:last-child {
    border-bottom: none;
}

.module-section h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.module-section h4 i {
    color: var(--primary);
}

.module-section p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.feature-highlights {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

@media (min-width: 1024px) {
    .feature-highlights {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

.highlight-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.highlight-item i {
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.highlight-item strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.highlight-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

/* ── Feature Grid Responsive Mobile-First ───────────────────────────────── */
/* 1 col móvil → 2 col max — prioriza legibilidad, evita saturación */
.feature-grid-detailed {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin: 1.5rem 0;
    min-width: 0;
}

.feature-card {
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
    min-width: 0;
}

.feature-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.feature-card h5 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.feature-card pre {
    background: var(--code-bg);
    color: var(--code-text);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    overflow-x: auto;
    overflow-y: hidden;
    margin: 0;
    line-height: 1.5;
    white-space: pre;
    word-wrap: normal;
}

/* ── Responsive: tablet landscape+ (1024px+) — max 2 columnas ──────────── */
@media (min-width: 1024px) {
    .feature-grid-detailed {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .feature-card pre {
        padding: 1rem;
        font-size: 0.85rem;
    }
}

/* ── Comparison Box Responsive Mobile-First ─────────────────────────────── */
/* Antes vs Después — stack en móvil, row en portátil+ */
.comparison-box {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
    align-items: stretch;
}

.comparison-item {
    flex: 1;
    min-width: 0;
    padding: 1rem;
    border-radius: var(--radius-md);
}

.comparison-item.old {
    background: rgba(220, 38, 38, 0.04);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-left: 3px solid var(--danger);
}

.comparison-item.new {
    background: rgba(22, 163, 74, 0.04);
    border: 1px solid rgba(22, 163, 74, 0.2);
    border-left: 3px solid var(--success);
}

.comparison-item h5 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.comparison-item.old h5 i { color: var(--danger); }
.comparison-item.new h5 i { color: var(--success); }

.comparison-item pre {
    background: var(--code-bg);
    color: var(--code-text);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    overflow-x: auto;
    margin: 0;
    line-height: 1.5;
}

/* Flecha — oculta en móvil, visible en lg+ */
.comparison-arrow {
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    padding: 0.5rem 0;
    flex-shrink: 0;
}

/* ── Responsive: Tablet sm: (640px+) ────────────────────────────────────── */
@media (min-width: 640px) {
    .comparison-box {
        gap: 1.25rem;
    }
    
    .comparison-item {
        padding: 1.25rem;
    }
    
    .comparison-item pre {
        padding: 1rem;
        font-size: 0.8rem;
    }
}

/* ── Responsive: Portátil lg: (1024px+) ─────────────────────────────────── */
@media (min-width: 1024px) {
    .comparison-box {
        flex-direction: row;
        align-items: flex-start;
        gap: 1.5rem;
    }
    
    .comparison-arrow {
        display: flex;
        padding: 2rem 0;
    }
    
    .comparison-item {
        padding: 1.5rem;
    }
    
    .comparison-item pre {
        font-size: 0.85rem;
    }
}

.components-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.component-card {
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.component-icon {
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.component-card h5 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.component-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.component-card pre {
    background: var(--code-bg);
    color: var(--code-text);
    padding: 12px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    overflow-x: auto;
    margin: 0;
}

.types-table {
    overflow-x: auto;
    margin: 20px 0;
}

.types-table table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.types-table th {
    background: var(--primary);
    color: white;
    padding: 12px;
    text-align: left;
    font-size: 0.9rem;
    font-weight: 600;
}

.types-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.85rem;
}

.types-table code {
    padding: 2px 6px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--primary);
}

.sql-examples {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

.sql-example {
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.sql-example h5 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.sql-example pre {
    background: var(--code-bg);
    color: var(--code-text);
    padding: 16px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    overflow-x: auto;
    margin: 0;
}

.installation-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 20px 0;
}

.install-step {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.step-num {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.install-step strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.install-step p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.install-step a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.install-step a:hover {
    text-decoration: underline;
}

.commands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.command-card {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.command-card h5 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.command-card pre {
    background: var(--code-bg);
    color: var(--code-text);
    padding: 12px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    overflow-x: auto;
    margin: 0;
}

.tips-list {
    list-style: none;
    margin: 20px 0;
}

.tips-list li {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.tips-list li:last-child {
    border-bottom: none;
}

.tips-list li i {
    color: var(--success);
    margin-top: 4px;
    flex-shrink: 0;
}

.tips-list li strong {
    color: var(--text-primary);
}

@media (max-width: 1023px) {
    .feature-highlights,
    .feature-grid-detailed,
    .components-grid,
    .commands-grid {
        grid-template-columns: 1fr;
    }
    
    .comparison-box {
        flex-direction: column;
    }
    
    .comparison-arrow {
        transform: rotate(90deg);
    }
    
    .module-header {
        padding: 16px;
    }
    
    .module-icon {
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
    }
    
    .module-info h3 {
        font-size: 1rem;
    }
    
    .module-section {
        padding: 16px;
    }
}

/* ============================================
   ESTANDARIZACIÓN Y CORRECCIONES DE DISEÑO


/* --- module: quiz-search.css --- */

/* ============================================
   NUEVAS SECCIONES: PostgreSQL, ORM, Simuladores
   ============================================ */
/* ============================================
   QUIZ & SEARCH
   ============================================ */

/* Info Banner */
.info-banner {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: rgba(2, 132, 199, 0.06);
    border: 1px solid rgba(2, 132, 199, 0.2);
    border-radius: var(--radius-md);
    margin-bottom: 32px;
}

.info-banner i {
    color: var(--info);
    font-size: 1.3rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.info-banner h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.info-banner p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.info-banner code {
    padding: 2px 6px;
    background: rgba(2, 132, 199, 0.1);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.85em;
    color: var(--info);
}

/* Config Steps */
.config-steps {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 32px;
}

.config-step {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.config-step:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.config-step .step-number {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 800;
    flex-shrink: 0;
}

.config-step .step-content {
    flex: 1;
}

.config-step h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.config-step p {
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-size: 0.95rem;
}

/* URL Explainer */
.url-explainer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin: 16px 0;
}

.url-part {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.url-part code {
    padding: 6px 12px;
    background: var(--code-bg);
    color: var(--code-text);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow-x: auto;
    max-width: 100%;
    display: inline-block;
    vertical-align: middle;
}

.url-part span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Troubleshooting */
.troubleshooting {
    background: var(--bg-primary);
    padding: 28px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

.troubleshooting h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.troubleshooting h3 i {
    color: var(--warning);
}

.problem-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.problem-item {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--danger);
}

.problem-item h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.problem-item h4 i {
    color: var(--danger);
}

.problem-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.problem-item p:last-child {
    margin-bottom: 0;
}

.problem-item code {
    padding: 2px 6px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.85em;
}

/* ORM Comparison */
.comparison-intro {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 24px;
    background: linear-gradient(135deg, rgba(0, 102, 74, 0.04), rgba(0, 137, 106, 0.04));
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    margin-bottom: 32px;
}

.comparison-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.comparison-text h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.comparison-text p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

.comparison-text strong {
    color: var(--primary);
}

/* ORM Comparison Grid */
.orm-comparison {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: stretch;
    margin-bottom: 32px;
}

@media (max-width: 1024px) {
    .orm-comparison {
        grid-template-columns: 1fr;
    }
    .orm-vs {
        justify-content: center;
    }
}

.orm-side {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border-light);
    transition: var(--transition);
}

.orm-side:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.orm-side.jdbc {
    border-color: rgba(220, 38, 38, 0.2);
}

.orm-side.jpa {
    border-color: rgba(22, 163, 74, 0.2);
}

.orm-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-light);
}

.orm-side.jdbc .orm-header {
    background: rgba(220, 38, 38, 0.04);
}

.orm-side.jpa .orm-header {
    background: rgba(22, 163, 74, 0.04);
}

.orm-header i {
    font-size: 1.3rem;
}

.orm-side.jdbc .orm-header i {
    color: var(--danger);
}

.orm-side.jpa .orm-header i {
    color: var(--success);
}

.orm-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.orm-content {
    padding: 20px;
}

.orm-content h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 16px 0 8px;
    color: var(--text-primary);
}

.orm-content h4:first-child {
    margin-top: 0;
}

.code-block.small pre {
    padding: 12px;
    font-size: 0.8rem;
    overflow-x: auto;
}

.pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}

.pros, .cons {
    padding: 12px;
    border-radius: var(--radius-sm);
}

.pros {
    background: rgba(22, 163, 74, 0.04);
    border: 1px solid rgba(22, 163, 74, 0.15);
}

.cons {
    background: rgba(220, 38, 38, 0.04);
    border: 1px solid rgba(220, 38, 38, 0.15);
}

.pros h5, .cons h5 {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.pros h5 i { color: var(--success); }
.cons h5 i { color: var(--danger); }

.pros ul, .cons ul {
    list-style: none;
    font-size: 0.8rem;
}

.pros ul li, .cons ul li {
    padding: 3px 0;
    color: var(--text-secondary);
}

.orm-vs {
    display: flex;
    align-items: center;
    justify-content: center;
}

.orm-vs span {
    width: 48px;
    height: 48px;
    background: var(--text-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
}

/* Flask Analogy */
.flask-analogy {
    background: var(--bg-primary);
    padding: 28px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    margin-bottom: 32px;
}

.flask-analogy h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.flask-analogy h3 i {
    color: #3776ab;
}

.analogy-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
}

@media (max-width: 768px) {
    .analogy-grid {
        grid-template-columns: 1fr;
    }
    .analogy-arrow {
        justify-content: center;
        transform: rotate(90deg);
    }
}

.analogy-item {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    min-width: 0;
    overflow-x: auto;
}

.analogy-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.analogy-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 1.2rem;
}

.analogy-arrow span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Recommendation Box */
.recommendation-box {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(249, 168, 37, 0.08), rgba(249, 168, 37, 0.04));
    border: 1px solid rgba(249, 168, 37, 0.3);
    border-radius: var(--radius-md);
    margin-bottom: 32px;
}

.recommendation-box i {
    color: var(--secondary);
    font-size: 1.5rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.recommendation-box h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.recommendation-box p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

.recommendation-box strong {
    color: var(--primary);
}

/* Simulator Cards */
.simulator-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.simulator-card {
    background: var(--bg-primary);
    padding: 28px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.simulator-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.sim-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    margin-bottom: 16px;
}

.simulator-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.simulator-card > p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 16px;
    flex: 1;
}

.sim-features {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.sim-features span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.sim-features i {
    color: var(--success);
    font-size: 0.75rem;
}

.sim-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(0, 102, 74, 0.06);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    transition: var(--transition);
}

.simulator-card:hover .sim-cta {
    background: var(--primary);
    color: white;
}

/* Diagram Container */
.diagram-container {
    background: var(--bg-primary);
    padding: 28px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    margin-bottom: 24px;
    text-align: center;
}

.diagram-container h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.diagram-svg {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

/* Code block copy button */
.code-block .copy-btn {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-sans);
}

.code-block .copy-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.code-block .copy-btn.copied {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .config-step {
        flex-direction: column;
    }
    
    .config-step .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .url-part {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .pros-cons {
        grid-template-columns: 1fr;
    }
    
    .comparison-intro {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================
   SIDEBAR FIJO PROFESIONAL
   ============================================ */

.main-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-primary);
    border-right: 1px solid var(--border-light);
    z-index: 1002;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
}

.main-sidebar.collapsed {
    transform: translateX(-100%);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}

.sidebar-logo-text h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.sidebar-logo-text p {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}

.sidebar-toggle {
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.sidebar-toggle:hover {
    background: var(--primary);
    color: white;
}

/* Búsqueda en sidebar */
.sidebar-search {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-container i {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.search-container input {
    width: 100%;
    padding: 8px 12px 8px 32px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: var(--transition);
}

.search-container input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 74, 0.1);
}

.search-shortcut {
    position: absolute;
    right: 8px;
    padding: 2px 6px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* Navegación del sidebar */
.sidebar-navigation {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
}

.sidebar-section {
    margin-bottom: 16px;
}

.sidebar-section-title {
    padding: 8px 20px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    font-size: 0.9rem;
}

.sidebar-link:hover {
    background: var(--bg-secondary);
    color: var(--primary);
}

.sidebar-link.active {
    background: rgba(0, 102, 74, 0.08);
    color: var(--primary);
    font-weight: 600;
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
}

.sidebar-link-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.sidebar-link.active .sidebar-link-icon {
    color: var(--primary);
}

.sidebar-link-content {
    flex: 1;
    min-width: 0;
}

.sidebar-link-title {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.sidebar-link-subtitle {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.sidebar-link-check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: transparent;
    flex-shrink: 0;
    transition: var(--transition);
    cursor: pointer;
}

.sidebar-link-check.completed {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.sidebar-link-check:hover {
    border-color: var(--primary);
}

/* Footer del sidebar */
.sidebar-footer {
    border-top: 1px solid var(--border-light);
    padding: 16px 20px;
    flex-shrink: 0;
}

.sidebar-progress {
    margin-bottom: 12px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.progress-label strong {
    color: var(--primary);
    font-weight: 700;
}

.progress-bar-track {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 3px;
    transition: width 0.5s ease;
    width: 0%;
}

.sidebar-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.sidebar-action-btn {
    flex: 1;
    padding: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--font-sans);
}

.sidebar-action-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Ajustar contenido principal para el sidebar */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    min-height: 100vh;
    transition: margin-left 0.3s ease, margin-top 0.3s ease;
    padding-right: 8px;
}

body.sidebar-collapsed .main-content {
    margin-left: 0;
    margin-top: var(--header-height);
}

body.sidebar-collapsed .main-sidebar {
    transform: translateX(-100%);
}

/* Botón flotante para mostrar sidebar cuando está oculto */
.sidebar-show-btn {
    position: fixed;
    top: calc((var(--header-height) - 40px) / 2);
    left: 16px;
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    z-index: 1003;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

@media (max-width: 480px) {
    .sidebar-show-btn {
        top: calc((var(--header-height) - 36px) / 2);
        left: 8px;
        width: 36px;
        height: 36px;
    }
}

body.sidebar-collapsed .sidebar-show-btn {
    display: flex;
}

.sidebar-show-btn:hover {
    transform: scale(1.1);
}

/* Header ajustado para sidebar */
.header {
    left: var(--sidebar-width);
    transition: left 0.3s ease;
}

body.sidebar-collapsed .header {
    left: 0;
}

/* ============================================
   MODAL DE BÚSQUEDA GLOBAL
   ============================================ */

.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10002;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.search-modal.active {
    display: flex;
    opacity: 1;
    visibility: visible;
}


/* --- module: enhancements.css --- */

/* ============================================
   ESTANDARIZACIÓN Y CORRECCIONES DE DISEÑO
   ============================================ */

/* 1. Reset de Prism.js para evitar conflictos con clases globales de la UI */
pre[class*="language-"] .token,
code[class*="language-"] .token {
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    box-shadow: none !important;
    border: none !important;
    display: inline !important;
}

/* 2. Estandarización de fondos y adaptación de modo oscuro */
.content-card,
.step-card,
.exercise-card,
.evidence-card,
.simulator-card,
.tech-card,
.timeline-content,
.mvc-diagram,
.objective-item,
.case-study,
.problem-card,
.sidebar,
.config-step {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

/* En modo oscuro, asegurar que los fondos de tarjetas tomen el color secundario oscuro para un contraste refinado */
[data-theme="dark"] .content-card,
[data-theme="dark"] .step-card,
[data-theme="dark"] .exercise-card,
[data-theme="dark"] .evidence-card,
[data-theme="dark"] .simulator-card,
[data-theme="dark"] .tech-card,
[data-theme="dark"] .timeline-content,
[data-theme="dark"] .mvc-diagram,
[data-theme="dark"] .objective-item,
[data-theme="dark"] .case-study,
[data-theme="dark"] .problem-card,
[data-theme="dark"] .sidebar,
[data-theme="dark"] .config-step {
    background: var(--bg-secondary) !important;
    border-color: var(--border) !important;
}

/* 3. Estandarización de Bordes Redondeados */
/* Nivel 1: Contenedores Principales */
.content-card,
.step-card,
.exercise-card,
.evidence-card,
.simulator-card,
.case-study,
.mvc-diagram,
.config-step {
    border-radius: var(--radius-lg) !important;
}

/* Nivel 2: Sub-elementos e Items de Grids */
.tech-card,
.component-card,
.objective-item,
.advantage-item,
.problem-card,
.warning-box,
.info-banner,
.timeline-content {
    border-radius: var(--radius-md) !important;
}

/* 4. Unificación de Animaciones y Elevación de Tarjetas (Hover) */
.content-card,
.step-card,
.exercise-card,
.evidence-card,
.simulator-card,
.tech-card,
.timeline-content,
.objective-item,
.config-step {
    transition: var(--transition);
}

.content-card:hover,
.step-card:hover,
.exercise-card:hover,
.evidence-card:hover,
.simulator-card:hover,
.tech-card:hover,
.timeline-content:hover,
.objective-item:hover,
.config-step:hover {
    transform: translateY(-4px) !important;
    box-shadow: var(--shadow-lg) !important;
    border-color: var(--primary) !important;
}

/* 5. Refinamientos Adicionales de UI */
/* Scrollbar general más elegante */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
    transition: var(--transition);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================
    MEJORAS DE ACCESIBILIDAD Y DISEÑO
    ============================================ */

*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

::selection {
    background: rgba(0, 102, 74, 0.2);
    color: var(--text-primary);
}

[data-theme="dark"] ::selection {
    background: rgba(0, 179, 134, 0.3);
}

a {
    transition: var(--transition);
}

a:hover {
    text-decoration-color: var(--primary);
}

.version-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(249, 168, 37, 0.1);
    border: 1px solid rgba(249, 168, 37, 0.3);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--secondary);
    margin-left: 8px;
}

.reading-progress {
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    position: fixed;
    top: var(--header-height);
    left: var(--sidebar-width);
    right: 0;
    z-index: 999;
    transition: width 0.1s linear;
}

body.sidebar-collapsed .reading-progress {
    left: 0;
}

[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 12px;
    background: var(--text-primary);
    color: var(--bg-primary);
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    max-width: 80vw;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    pointer-events: none;
    z-index: 1000;
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}

@keyframes softPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 102, 74, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(0, 102, 74, 0);
    }
}

.btn-primary:focus {
    animation: softPulse 1.5s ease-in-out;
}

@media (max-width: 768px) {
    .info-table {
        display: block;
        overflow-x: auto;
        max-width: 100%;
    }
    
    .info-table tbody {
        display: block;
    }
    
    .info-table tr {
        display: flex;
        flex-direction: column;
        margin-bottom: 12px;
        border: 1px solid var(--border-light);
        border-radius: var(--radius-sm);
        overflow: hidden;
    }
    
    .info-label {
        width: 100%;
        padding: 10px 16px;
        font-size: 0.8rem;
    }
    
    .info-value {
        padding: 12px 16px;
    }
}

@keyframes contentLoad {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-panel.active {
    animation: contentLoad 0.3s ease-out;
}

.sidebar-link.active .sidebar-link-title {
    font-weight: 600;
}

.tech-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    opacity: 0;
    transition: opacity 0.3s;
    background: linear-gradient(135deg, rgba(0, 102, 74, 0.05), rgba(0, 137, 106, 0.05));
}

.tech-card:hover::after {
    opacity: 1;
}

.footer {
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary));
    background-size: 200% 100%;
    animation: gradientShift 3s ease infinite;
}

/* ============================================
   TV / LARGE SCREEN BREAKPOINT  (1536px+ — 2xl canónico)
   ============================================ */
@media (min-width: 1536px) {
    html { font-size: clamp(16px, 0.7vw + 0.3rem, 20px); }
    .container { max-width: 1680px; }
    .feature-grid-detailed { grid-template-columns: repeat(3, 1fr); }
    .tech-modules { gap: 1.75rem; }
    .module-section { padding: 2rem; }
    .module-header { padding: 1.75rem 2rem; }
    .module-toggle { width: 40px; height: 40px; font-size: 1.1rem; }
}

/* ============================================
   IMPRENTA
   ============================================ */
@media print {
    .main-sidebar,
    .sidebar-show-btn,
    .scroll-top-btn,
    .header,
    .footer,
    .search-modal,
    .toast-container,
    .quick-nav-panel,
    .celebration-overlay {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .section {
        page-break-inside: avoid;
    }
    
    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }
}

/* ============================================
   UI/UX ENHANCEMENTS v2.0
   Reading State, Toast, Quick Nav, Progress
   ============================================ */

/* --- Reading State Badges --- */
.section-read-state {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: 12px;
    border: 1px solid transparent;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 480px) {
    .section-read-state {
        max-width: 100px;
        font-size: 0.6rem;
        padding: 2px 8px;
    }
}

.section-read-state.unread {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    border-color: var(--border);
}

.section-read-state.reading {
    background: rgba(2, 132, 199, 0.08);
    color: var(--info);
    border-color: rgba(2, 132, 199, 0.2);
    animation: readingPulse 2s ease-in-out infinite;
}

@keyframes readingPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.2); }
    50% { box-shadow: 0 0 0 6px rgba(2, 132, 199, 0); }
}

.section-read-state.completed {
    background: rgba(22, 163, 74, 0.08);
    color: var(--success);
    border-color: rgba(22, 163, 74, 0.2);
}

.section-read-state.completed::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.6rem;
}

.section-read-state .read-state-icon {
    font-size: 0.6rem;
}

/* --- Reading Time Badge --- */
.reading-time-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    background: var(--bg-tertiary);
    border-radius: 50px;
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-left: 8px;
    white-space: nowrap;
}

.reading-time-badge i {
    font-size: 0.55rem;
    opacity: 0.7;
}

/* --- Section visual state --- */
section[id].section-read {
    transition: opacity 0.5s ease;
}

.section-state-overlay {
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    border-radius: 0 0 0 4px;
    transition: all 0.5s ease;
    opacity: 0;
}

section[id].section-state-unread .section-state-overlay {
    background: var(--border);
    opacity: 0.3;
}

section[id].section-state-reading .section-state-overlay {
    background: var(--info);
    opacity: 0.6;
    box-shadow: 0 0 8px rgba(2, 132, 199, 0.3);
}

section[id].section-state-completed .section-state-overlay {
    background: var(--success);
    opacity: 0.8;
    box-shadow: 0 0 8px rgba(22, 163, 74, 0.3);
}

section[id] {
    position: relative;
    transition: box-shadow 0.4s ease;
}

section[id]:target {
    animation: sectionTarget 2s ease-out;
}

@keyframes sectionTarget {
    0% { box-shadow: inset 0 0 0 2px var(--primary); }
    100% { box-shadow: inset 0 0 0 0 transparent; }
}

/* --- Section header with state --- */
.section-header-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* --- TOAST SYSTEM --- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-light);
    pointer-events: auto;
    animation: toastIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-width: 380px;
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.toast.toast-out {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
    from { transform: translateX(120%) scale(0.8); opacity: 0; }
    to { transform: translateX(0) scale(1); opacity: 1; }
}

@keyframes toastOut {
    from { transform: translateX(0) scale(1); opacity: 1; }
    to { transform: translateX(120%) scale(0.8); opacity: 0; }
}

.toast-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.toast-icon.success { background: rgba(22, 163, 74, 0.12); color: var(--success); }
.toast-icon.info { background: rgba(2, 132, 199, 0.12); color: var(--info); }
.toast-icon.warning { background: rgba(245, 158, 11, 0.12); color: var(--warning); }
.toast-icon.error { background: rgba(220, 38, 38, 0.12); color: var(--danger); }
.toast-icon.celebration { background: rgba(249, 168, 37, 0.15); color: var(--secondary); animation: toastCelebrate 1s ease infinite; }

@keyframes toastCelebrate {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.toast-text { flex: 1; }
.toast-close {
    width: 20px;
    height: 20px;
    border: none;
    background: var(--bg-tertiary);
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.55rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
}
.toast-close:hover { background: var(--danger); color: white; }

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 8px 8px;
    background: var(--primary);
    animation: toastProgress 4s linear forwards;
}

.toast-progress.success { background: var(--success); }
.toast-progress.info { background: var(--info); }
.toast-progress.warning { background: var(--warning); }
.toast-progress.celebration { background: var(--secondary); }

@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

/* --- QUICK NAV PANEL --- */
.quick-nav-panel {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 3px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.quick-nav-panel.visible {
    opacity: 1;
}

.quick-nav-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    font-size: 0.4rem;
    color: transparent;
}

.quick-nav-dot:hover {
    border-color: var(--primary);
    background: rgba(0, 102, 74, 0.08);
    transform: scale(1.2);
}

.quick-nav-dot.completed {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.quick-nav-dot.reading {
    background: var(--info);
    border-color: var(--info);
    color: white;
    animation: readingPulse 2s ease-in-out infinite;
}

.quick-nav-dot.active-section {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
    transform: scale(1.3);
    box-shadow: 0 0 12px rgba(0, 102, 74, 0.4);
}

.quick-nav-tooltip {
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1002;
}

.quick-nav-dot:hover .quick-nav-tooltip {
    opacity: 1;
}

/* --- FOCUS MODE FOR CODE BLOCKS --- */
.code-block.focus-mode {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: min(90vw, 1000px);
    max-height: 80vh;
    z-index: 10001;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--primary);
}

.code-block.focus-mode pre {
    max-height: 70vh;
}

.code-block.focus-mode .focus-toggle-btn {
    background: var(--danger);
    color: white;
}

.code-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.code-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.focus-toggle-btn {
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.65rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-sans);
}

.focus-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: white;
}

/* --- CELEBRATION OVERLAY --- */
.celebration-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 99998;
    overflow: hidden;
}

.celebration-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: celebrationFall var(--duration, 3s) ease-out forwards;
    opacity: 0;
}

@keyframes celebrationFall {
    0% { transform: translateY(-20px) rotate(0deg) scale(0); opacity: 1; }
    20% { opacity: 1; transform: translateY(20vh) rotate(180deg) scale(1.2); }
    100% { transform: translateY(105vh) rotate(720deg) scale(0.3); opacity: 0; }
}

/* --- PROGRESS RING (sidebar) --- */
.progress-ring-container {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.progress-ring {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.progress-ring svg {
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: var(--bg-tertiary);
    stroke-width: 3;
}

.progress-ring-fill {
    fill: none;
    stroke: var(--primary);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-ring-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.progress-ring-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.progress-ring-label strong {
    color: var(--text-primary);
    font-weight: 700;
}

/* --- KEYBOARD SHORTCUTS MODAL --- */
.shortcuts-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    z-index: 10002;
    display: none;
    align-items: center;
    justify-content: center;
}

.shortcuts-modal.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.shortcuts-content {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
}

.shortcuts-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.shortcuts-grid {
    display: grid;
    gap: 10px;
}

.shortcut-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}

.shortcut-row:last-child {
    border-bottom: none;
}

.shortcut-row span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.shortcut-keys {
    display: flex;
    gap: 4px;
}

.shortcut-key {
    padding: 2px 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

/* --- SIDEBAR SECTION PROGRESS --- */
.sidebar-link .section-progress-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border);
    flex-shrink: 0;
    margin-left: auto;
    transition: all 0.3s ease;
}

.sidebar-link .section-progress-dot.completed {
    background: var(--success);
    box-shadow: 0 0 6px rgba(22, 163, 74, 0.4);
}

.sidebar-link .section-progress-dot.reading {
    background: var(--info);
    animation: readingPulse 2s ease-in-out infinite;
}

/* --- SECTION ACTION BUTTONS --- */
.section-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.section-action-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: var(--bg-tertiary);
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.7rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.section-action-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.section-action-btn.bookmarked {
    background: var(--secondary);
    color: white;
}

/* --- SECTION DIVIDER WITH PROGRESS --- */
.section-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 48px 0 32px;
    opacity: 0.5;
}

.section-divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border), transparent);
}

.section-divider-icon {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .quick-nav-panel { display: none; }
    .toast-container { top: auto; bottom: 80px; right: 50%; transform: translateX(50%); }
    .toast { max-width: 90vw; font-size: 0.8rem; }
    .section-read-state { font-size: 0.6rem; padding: 2px 8px; }
    .reading-time-badge { display: none; }
    .shortcuts-content { padding: 24px; max-width: 100%; }
    .code-block.focus-mode { width: 95vw; }
}

@media (max-width: 480px) {
    .toast { padding: 10px 14px; }
    .section-read-state { font-size: 0.55rem; padding: 2px 6px; }
}

/* --- ENHANCED SIDEBAR SECTION STYLES --- */
.sidebar-section .sidebar-section-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-left: 8px;
    font-weight: 400;
}

.sidebar-section .sidebar-section-status.complete {
    color: var(--success);
}

.sidebar-section .sidebar-section-status .status-bar {
    width: 40px;
    height: 3px;
    border-radius: 2px;
    background: var(--bg-tertiary);
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
}

.sidebar-section .sidebar-section-status .status-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
    transition: width 0.6s ease;
}

/* --- SECTION TRANSITIONS --- */
section[id] .section-header,
section[id] .content-card,
section[id] .tech-card,
section[id] .timeline-item,
section[id] .exercise-card {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* --- MARK COMPLETE BUTTON (floating in section) --- */
.mark-read-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 50px;
    background: var(--bg-primary);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-sans);
}

.mark-read-btn:hover {
    border-color: var(--success);
    color: var(--success);
    background: rgba(22, 163, 74, 0.04);
}

.mark-read-btn.completed {
    background: rgba(22, 163, 74, 0.08);
    border-color: var(--success);
    color: var(--success);
}

/* --- PROGRESS STATS IN HEADER --- */
.header-progress-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.header-progress-stats .stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-progress-stats .stat strong {
    color: var(--text-primary);
}

.header-progress-stats .stat-divider {
    width: 1px;
    height: 16px;
    background: var(--border);
}

/* --- HEADER META & ICON BUTTONS --- */
.header-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.header-icon-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: var(--transition);
}

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

.header-badge {
    padding: 4px 10px;
    background: rgba(0, 102, 74, 0.08);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* --- SIDEBAR ACTIONS --- */
.sidebar-actions {
    display: flex;
    gap: 6px;
}

.sidebar-action-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: var(--transition);
}

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

/* --- HOVER PREVIEW FOR SIDEBAR LINKS --- */
.sidebar-link .sidebar-link-preview {
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 500;
    white-space: nowrap;
    max-width: 60vw;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1003;
}

.sidebar-link:hover .sidebar-link-preview {
    opacity: 1;
}

/* ============================================
   NAVIGATION ENHANCEMENTS v2.1
   ============================================ */

/* --- PAGE SWITCHER (Header) --- */
.page-switcher {
    display: flex;
    align-items: center;
    gap: 2px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    padding: 3px;
    margin-left: 12px;
}

.page-switcher-link {
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.page-switcher-link:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.page-switcher-link.active {
    background: var(--primary);
    color: white;
}

@media (max-width: 768px) {
    .page-switcher {
        display: none;
    }
}

/* --- BREADCRUMBS --- */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 0;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.breadcrumbs a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
}

.breadcrumbs a:hover {
    color: var(--primary);
}

.breadcrumbs .breadcrumb-sep {
    font-size: 0.65rem;
    opacity: 0.5;
}

.breadcrumbs .breadcrumb-current {
    color: var(--text-primary);
    font-weight: 600;
}

/* --- PREV/NEXT NAVIGATION --- */
.section-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 48px;
    margin-bottom: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

@media (max-width: 600px) {
    .section-nav {
        grid-template-columns: 1fr;
    }
}

.section-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    background: var(--bg-primary);
}

.section-nav-link:hover {
    border-color: var(--primary);
    background: rgba(0, 102, 74, 0.03);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.section-nav-link.next {
    justify-content: flex-end;
    text-align: right;
}

.section-nav-link .nav-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.section-nav-link:hover .nav-arrow {
    background: var(--primary);
    color: white;
}

.section-nav-link .nav-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.section-nav-link .nav-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 2px;
}

/* --- MOBILE PAGE NAV (Bottom) --- */
.mobile-page-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
    padding: 8px 16px;
    z-index: 999;
    justify-content: space-around;
    gap: 4px;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
}

@media (max-width: 768px) {
    .mobile-page-nav {
        display: flex;
    }
}

.mobile-page-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 600;
    transition: var(--transition);
}

.mobile-page-nav-link i {
    font-size: 1.1rem;
}

.mobile-page-nav-link:hover,
.mobile-page-nav-link.active {
    color: var(--primary);
    background: rgba(0, 102, 74, 0.06);
}

/* --- SCROLL ANCHOR OFFSET --- */
section[id] {
    scroll-margin-top: 80px;
}

/* =============================================
   3.2 FUNDAMENTOS TEÓRICOS — Color Enhancements
   ============================================= */

/* Gradient top accent bar */
#fundamentos.section-alt {
    position: relative;
    background: linear-gradient(180deg, rgba(0, 102, 74, 0.03), var(--bg-secondary) 40%);
}

#fundamentos.section-alt::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--info), var(--success));
    z-index: 1;
}

#fundamentos .section-header {
    position: relative;
    padding-bottom: 8px;
}

#fundamentos .section-number {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 102, 74, 0.25);
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
}

#fundamentos .section-title {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#fundamentos .section-subtitle {
    color: var(--text-muted);
    font-style: italic;
}

/* Colorful Tab Buttons */
#fundamentos .tab-btn {
    position: relative;
    overflow: hidden;
}

#fundamentos .tab-btn::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

#fundamentos .tab-btn.active::before {
    transform: scaleX(1);
}

#fundamentos .tab-btn[data-tab="mvc"] {
    color: var(--primary);
}
#fundamentos .tab-btn[data-tab="mvc"]::before,
#fundamentos .tab-btn[data-tab="mvc"].active {
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-bottom-color: transparent;
}

#fundamentos .tab-btn[data-tab="jsp"] {
    color: #d97706;
}
#fundamentos .tab-btn[data-tab="jsp"]::before,
#fundamentos .tab-btn[data-tab="jsp"].active {
    background: linear-gradient(90deg, #d97706, #f59e0b);
    border-bottom-color: transparent;
}

#fundamentos .tab-btn[data-tab="jakarta"] {
    color: var(--accent);
}
#fundamentos .tab-btn[data-tab="jakarta"]::before,
#fundamentos .tab-btn[data-tab="jakarta"].active {
    background: linear-gradient(90deg, var(--accent), #7c3aed);
    border-bottom-color: transparent;
}

#fundamentos .tab-btn[data-tab="jdbc"] {
    color: var(--info);
}
#fundamentos .tab-btn[data-tab="jdbc"]::before,
#fundamentos .tab-btn[data-tab="jdbc"].active {
    background: linear-gradient(90deg, var(--info), #38bdf8);
    border-bottom-color: transparent;
}

#fundamentos .tab-btn[data-tab="records"] {
    color: #0d9488;
}
#fundamentos .tab-btn[data-tab="records"]::before,
#fundamentos .tab-btn[data-tab="records"].active {
    background: linear-gradient(90deg, #0d9488, #14b8a6);
    border-bottom-color: transparent;
}

/* Tab panels with subtle background tint */
#fundamentos .tab-panel.active {
    border-left: 3px solid var(--border-light);
}

#fundamentos #tab-mvc.active {
    border-left-color: var(--primary);
}
#fundamentos #tab-jsp.active {
    border-left-color: #d97706;
}
#fundamentos #tab-jakarta.active {
    border-left-color: var(--accent);
}
#fundamentos #tab-jdbc.active {
    border-left-color: var(--info);
}
#fundamentos #tab-records.active {
    border-left-color: #0d9488;
}

/* Enhanced Concept Cards */
#fundamentos .concept-card {
    position: relative;
    border-left: 4px solid var(--border-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#fundamentos .concept-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

#fundamentos .concept-card:has(.concept-icon.model) {
    border-left-color: var(--info);
}
#fundamentos .concept-card:has(.concept-icon.view) {
    border-left-color: var(--success);
}
#fundamentos .concept-card:has(.concept-icon.controller) {
    border-left-color: var(--accent);
}

/* Colorful flow diagram */
#fundamentos .flow-diagram {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border: 1px solid var(--border);
    gap: 8px;
}

#fundamentos .flow-step {
    border-left: 3px solid var(--primary);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#fundamentos .flow-step:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

#fundamentos .flow-step:nth-child(3) { border-left-color: var(--primary); }
#fundamentos .flow-step:nth-child(5) { border-left-color: var(--accent); }
#fundamentos .flow-step:nth-child(7) { border-left-color: var(--info); }
#fundamentos .flow-step:nth-child(9) { border-left-color: var(--success); }
#fundamentos .flow-step:nth-child(11) { border-left-color: #d97706; }
#fundamentos .flow-step:nth-child(13) { border-left-color: #0d9488; }

#fundamentos .step-number {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    box-shadow: 0 2px 6px rgba(0, 102, 74, 0.3);
}

#fundamentos .flow-arrow {
    color: var(--primary);
    font-size: 1.2rem;
    opacity: 0.6;
}

/* Feature items with gradient icons */
#fundamentos .feature-item i {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.3rem;
}

/* Colorful comparison items */
#fundamentos .comparison-table {
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
}

#fundamentos .comparison-item.old {
    border-left: 4px solid var(--danger);
}

#fundamentos .comparison-item.new {
    border-left: 4px solid var(--success);
}

/* Advantage grid colorful items */
#fundamentos .advantage-item i {
    background: linear-gradient(135deg, var(--success), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.1rem;
}

/* Warning box enhancement */
#fundamentos .warning-box {
    border-left: 4px solid var(--danger);
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.04), rgba(220, 38, 38, 0.01));
}

/* Pros/Cons colorful styling */
#fundamentos .pros h5 {
    color: var(--success);
}
#fundamentos .pros h5 i {
    color: var(--success);
}
#fundamentos .cons h5 {
    color: var(--danger);
}
#fundamentos .cons h5 i {
    color: var(--danger);
}

/* ORM vs badge */
#fundamentos .orm-vs span {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0, 102, 74, 0.25);
}

/* Recommendation box enhancement */
#fundamentos .recommendation-box {
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-md);
}

#fundamentos .recommendation-box i {
    background: linear-gradient(135deg, var(--warning), #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.4rem;
}


/* --- module: ux-enhancements.css --- */

/* ============================================
   UX ENHANCEMENTS v3.0
   Accesibilidad, rendimiento percibido y pulido
   ============================================ */

/* 1. SKIP TO CONTENT - Navegación por teclado */
.skip-link {
    position: fixed;
    top: -100%;
    left: 1rem;
    z-index: 100000;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    border-radius: var(--radius-md);
    text-decoration: none;
    box-shadow: var(--shadow-lg);
    transition: top 0.2s ease;
}
.skip-link:focus {
    top: 1rem;
}
.skip-link:not(:focus) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* 2. PREFERS-REDUCED-MOTION - Respetar preferencias del usuario */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .hero-gradient,
    .hero-pattern {
        animation: none !important;
    }
    .gradient-text {
        animation: none !important;
        background-size: 100% !important;
    }
    .timeline-item {
        animation: none !important;
        opacity: 1 !important;
    }
    .toast {
        animation: none !important;
    }
    .celebration-particle {
        display: none !important;
    }
    .shimmer,
    .skeleton {
        animation: none !important;
        background: var(--bg-tertiary) !important;
    }
}

/* 3. SKELETON / SHIMMER LOADING - Estado de carga percibida */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-tertiary) 25%,
        var(--bg-secondary) 50%,
        var(--bg-tertiary) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}
.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
    width: 100%;
}
.skeleton-text.short {
    width: 60%;
}
.skeleton-title {
    height: 1.5em;
    width: 80%;
    margin-bottom: 1em;
}
.skeleton-card {
    height: 200px;
    width: 100%;
}
.skeleton-code {
    height: 120px;
    width: 100%;
    border-radius: var(--radius-md);
}

/* 5. TABLAS RESPONSIVE con scroll horizontal */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1rem 0;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}
.table-responsive table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    margin: 0;
}
.table-responsive th {
    position: sticky;
    top: 0;
    z-index: 1;
}

/* 6. STICKY TABLE HEADERS para tablas largas */
table th {
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    z-index: 1;
    box-shadow: inset 0 -2px 0 var(--border);
}

/* 7. CONTENT ANCHOR BUTTONS en secciones */
.section-header {
    position: relative;
}
.section-title {
    position: relative;
}
.section-title .anchor-link {
    position: absolute;
    left: -2rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.2s ease;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.7em;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}
.section-title:hover .anchor-link {
    opacity: 0.6;
}
.section-title .anchor-link:hover {
    opacity: 1;
    background: var(--bg-tertiary);
}
h2:hover .anchor-link,
h3:hover .anchor-link,
h4:hover .anchor-link {
    opacity: 0.6;
}
h2 .anchor-link,
h3 .anchor-link,
h4 .anchor-link {
    position: absolute;
    left: -1.8em;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.2s ease;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.7em;
    padding: 0.15em 0.4em;
    border-radius: var(--radius-sm);
}
h2:hover .anchor-link,
h3:hover .anchor-link,
h4:hover .anchor-link {
    opacity: 0.5;
}

/* 8. ENHANCED FOCUS STYLES - Navegación por teclado */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}
.sidebar-link:focus-visible {
    outline-offset: -2px;
}
.btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
.code-block:focus-within {
    box-shadow: 0 0 0 2px var(--primary);
    border-radius: var(--radius-md);
}

/* 9. IMAGE LOADING - Prevenir layout shift */
img {
    max-width: 100%;
    height: auto;
    aspect-ratio: attr(width) / attr(height);
}
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}
img[loading="lazy"].loaded,
img[loading="lazy"][complete] {
    opacity: 1;
}

/* 10. SMOOTH ANCHOR SCROLLING con offset */
html {
    scroll-padding-top: calc(var(--header-height) + 16px);
}

/* 11. READING MODE - Vista limpia para lectura */
body.reading-mode .main-sidebar,
body.reading-mode .sidebar-show-btn,
body.reading-mode .header,
body.reading-mode .footer,
body.reading-mode .scroll-top-btn,
body.reading-mode .quick-nav-panel,
body.reading-mode .toast-container,
body.reading-mode .celebration-overlay,
body.reading-mode .breadcrumbs,
body.reading-mode .section-nav {
    display: none !important;
}
body.reading-mode .main-content {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 1rem 1.25rem;
    min-height: 100vh;
    min-height: 100dvh;
}

@media (min-width: 640px) {
    body.reading-mode .main-content {
        padding: 1.5rem 2rem;
    }
}

@media (min-width: 1024px) {
    body.reading-mode .main-content {
        padding: 2rem 3rem;
    }
}

@media (min-width: 1200px) {
    body.reading-mode .main-content {
        padding: 2rem 6rem;
    }
}
body.reading-mode .container {
    max-width: 100% !important;
    padding: 0 !important;
}
body.reading-mode .code-window {
    max-width: 100% !important;
}
body.reading-mode p,
body.reading-mode li {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* 12. SEARCH HIGHLIGHT ANIMATION */
@keyframes searchHighlight {
    0% { background: var(--primary); color: #fff; }
    100% { background: transparent; color: inherit; }
}
.search-highlight {
    animation: searchHighlight 2s ease-out;
    border-radius: 2px;
    padding: 0 2px;
}

/* 14. SECTION TRANSITION ON SCROLL */
section,
.section,
.section-alt {
    opacity: 1;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* 15. MESSAGE EMPTY STATES */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    color: var(--text-muted);
}
.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}
.empty-state .empty-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}
.empty-state .empty-description {
    font-size: 0.95rem;
    max-width: 400px;
}

/* 16. BETTER PRINT STYLES - Código legible en papel */
@media print {
    .code-window {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
    .code-window .window-header {
        background: #f5f5f5 !important;
    }
    .code-window pre,
    .code-window code {
        white-space: pre-wrap !important;
        word-wrap: break-word !important;
        font-size: 8pt !important;
        line-height: 1.3 !important;
    }
    .section-title .anchor-link {
        display: none !important;
    }
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }
    table {
        font-size: 9pt !important;
        page-break-inside: avoid;
    }
    .hero-section {
        min-height: auto !important;
        padding: 2rem 0 !important;
    }
    .hero-bg {
        display: none !important;
    }
    a[href]::after {
        content: none !important;
    }
}

/* 17. TECH CARD INTERACTIVE IMPROVEMENTS */
.tech-card {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.tech-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        transparent 0%,
        transparent 50%,
        rgba(255, 255, 255, 0.05) 50%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.tech-card:hover::after {
    opacity: 1;
}
.tech-card:active {
    transform: scale(0.98);
}

/* 18. MODULE ACCORDION SMOOTH OPEN/CLOSE */
.module-content {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s ease, padding 0.4s ease, opacity 0.4s ease;
    opacity: 0;
    padding: 0 1.5rem;
    overflow: hidden;
    min-width: 0;
}
.module-content > * {
    min-width: 0;
    min-height: 0;
}
.tech-module.active .module-content {
    grid-template-rows: 1fr;
    opacity: 1;
    padding: 1.5rem;
    overflow: visible;
}

/* 19. HEADER SCROLL PROGRESS - Indicador adicional en header */
.header.scrolled::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: calc(var(--scroll-progress, 0) * 1%);
    transition: width 0.1s linear;
}

/* 20. MOBILE TAP TARGETS */
@media (max-width: 768px) {
    .sidebar-link,
    .nav-link,
    .page-switcher-link,
    .tab-btn,
    .quiz-option,
    .btn {
        min-height: 44px;
    }
    .sidebar-link,
    .page-switcher-link {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
}

/* 21. CONTRAST RATIO IMPROVEMENTS */
.section-subtitle,
.hero-description {
    color: var(--text-secondary);
}
.tag {
    color: var(--text-secondary);
    background: var(--bg-tertiary);
}
.stat-label {
    color: var(--text-secondary);
}
.sidebar-link-title {
    color: var(--text-primary);
}
.sidebar-link-subtitle {
    color: var(--text-muted);
}

/* 22. TRANSITION ON THEME SWITCH */
*,
*::before,
*::after {
    transition: background-color 0.3s ease,
                border-color 0.3s ease,
                color 0.3s ease,
                box-shadow 0.3s ease;
}

/* 23. SELECTION COLORS (ya existe en enhancements, refuerzo) */
::selection {
    background: var(--primary);
    color: #fff;
}
[data-theme="dark"] ::selection {
    background: var(--primary-light);
    color: #0f172a;
}

/* 24. SECTION ACTIVE STATE INDICATOR */
section:target {
    animation: sectionFlash 1.5s ease-out;
}
@keyframes sectionFlash {
    0% { box-shadow: inset 0 0 0 4px var(--primary-light); }
    100% { box-shadow: inset 0 0 0 0px transparent; }
}

/* 25. READING MODE EXIT BUTTON */
.reading-mode-exit-btn {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10000;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.2s;
}
body.reading-mode .reading-mode-exit-btn {
    display: flex;
}
.reading-mode-exit-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: scale(1.1);
}

/* 26. READING MODE TOGGLE BUTTON ACTIVE STATE */
#readingModeToggle.active {
    color: var(--primary-light);
    background: rgba(0, 102, 74, 0.1);
}
[data-theme="dark"] #readingModeToggle.active {
    color: #4dd0a8;
    background: rgba(0, 179, 134, 0.15);
}

/* 26. SCROLLBAR FINA Y CONSISTENTE */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* 27. TRANSITION SUAVE PARA MODALES */
.search-modal,
.shortcuts-modal,
.code-overlay {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.search-modal.active,
.shortcuts-modal.active,
.code-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 28. HEADER BADGE VERSION */
.header-badge {
    font-size: 0.7rem;
    background: var(--primary);
    color: #fff;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* 29. LINKS EN CARD FOOTER */
.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
    transition: gap 0.2s ease;
}
.card-link:hover {
    gap: 0.7rem;
    color: var(--primary-dark);
}
.card-link::after {
    content: '\f061';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.8em;
}

/* 30. MEJORAS DE ESPACIADO MÓVIL */
@media (max-width: 480px) {
    .header-meta {
        gap: 0.25rem;
    }
    .header-icon-btn {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }
    .hero-content {
        padding: 1rem;
    }
}


/* --- module: flutter-theme.css --- */

/* Flutter Theme - auto-extracted from flutter-guide.html */
        :root{--flutter-blue:#1389FD;--flutter-dark:#0175C2;--flutter-light:#54C5F8}
        .flutter-hero{background:linear-gradient(135deg,#0175C2,#1389FD 50%,#54C5F8)!important}
        .flutter-hero .hero-subtitle,.flutter-hero .hero-description{color:rgba(255,255,255,.9)!important}
        .flutter-hero .hero-stats .stat-item{background:rgba(255,255,255,.15);border-color:rgba(255,255,255,.2)}
        .flutter-hero .hero-stats .stat-value{color:#fff}
        .flutter-hero .hero-stats .stat-label{color:rgba(255,255,255,.8)}
        .tech-flutter .module-header{background:linear-gradient(135deg,#0175C2,#1389FD)}
        .tech-dart .module-header{background:linear-gradient(135deg,#0175C2,#00B4D8)}
        .tech-openapi .module-header{background:linear-gradient(135deg,#6DB33F,#8BC34A)}
        .tech-micro .module-header{background:linear-gradient(135deg,#7c3aed,#a78bfa)}
        .step-card-flutter{border-left:3px solid #1389FD}
        .flutter-nav-icon{color:#1389FD}
        [data-theme=dark] .flutter-nav-icon{color:#54C5F8}
.flutter-btn{border-color:#1389FD!important;color:#1389FD!important}
[data-theme=dark] .flutter-btn{border-color:#54C5F8!important;color:#54C5F8!important}
