/* VARIABLES PARA TEMA DE OFICINA - ADMINISTRACIÓN Y COMERCIO */
:root {
    --office-primary: #2563eb;
    --office-secondary: #3b82f6;
    --office-accent: #f59e0b;
    --office-success: #10b981;
    --office-neutral: #64748b;
    --office-light: #f8fafc;
    --office-dark: #1e293b;
    --office-glass: rgba(248, 250, 252, 0.8);
    --office-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --office-shadow-hover: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --office-border: rgba(148, 163, 184, 0.2);
    --gradient-office: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
}

/* TEMA OSCURO - COLORES OPTIMIZADOS */
[data-bs-theme="oscuro"] {
    --office-primary: #60a5fa;
    --office-secondary: #93c5fd;
    --office-accent: #fbbf24;
    --office-success: #34d399;
    --office-neutral: #94a3b8;
    --office-light: #0f172a;
    --office-dark: #f1f5f9;
    --office-glass: rgba(15, 23, 42, 0.8);
    --office-border: rgba(100, 116, 139, 0.3);
    --gradient-office: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    --gradient-glass: linear-gradient(135deg, rgba(30, 41, 59, 0.2), rgba(30, 41, 59, 0.1));
}

/* FONDO PRINCIPAL CON GRADIENTES MEJORADOS */
body {
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 184, 0, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(59, 130, 246, 0.04) 0%, transparent 50%),
        linear-gradient(135deg, var(--office-light) 0%, #e2e8f0 100%);
    min-height: 100vh;
    color: var(--office-dark);
    transition: all 0.3s ease;
}

/* TEMA OSCURO - FONDO OPTIMIZADO */
[data-bs-theme="oscuro"] body {
    background: 
        radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(251, 191, 36, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(16, 185, 129, 0.06) 0%, transparent 50%),
        linear-gradient(135deg, #020617 0%, #0f172a 100%);
    color: var(--office-dark);
}

/* CONTENEDOR PRINCIPAL */
.page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* SECCIÓN HERO MEJORADA */
.hero-section {
    position: relative;
    padding: 4rem 2rem;
    background: var(--gradient-office);
    border-radius: 24px;
    margin-bottom: 4rem;
    overflow: hidden;
    color: white;
    box-shadow: var(--office-shadow);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="white" stroke-width="0.3" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>'),
        radial-gradient(circle at 70% 30%, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: 
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="0.5" opacity="0.1"><rect x="2" y="3" width="20" height="14" rx="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/></svg>') repeat,
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="0.5" opacity="0.08"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14,2 14,8 20,8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/><polyline points="10,9 9,9 8,9"/></svg>') repeat;
    background-size: 40px 40px, 60px 60px;
    transform: rotate(15deg);
    pointer-events: none;
    opacity: 0.6;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.page-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    background: linear-gradient(45deg, #ffffff, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.page-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    opacity: 0.95;
    margin-bottom: 2rem;
    font-weight: 400;
    line-height: 1.6;
}

.hero-illustration {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    opacity: 0.9;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
    animation: float 3s ease-in-out infinite;
}

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

@keyframes shimmer {
    0% { transform: rotate(0deg) translate(0, 0); }
    100% { transform: rotate(360deg) translate(0, 0); }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes rotate-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse-slow {
    0%, 100% { 
        opacity: 0.04; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.08; 
        transform: scale(1.1);
    }
}

/* SECCIÓN DE CURSOS */
.cursos-seccion {
    margin: 4rem 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--office-dark);
    position: relative;
    font-weight: 700;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--office-primary), var(--office-accent));
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

.cursos-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2.5rem;
    padding: 2rem 0;
}

/* TARJETAS CON GLASSMORPHISM MEJORADO */
.curso-card {
    background: var(--office-glass);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--office-border);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--office-shadow);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(40px);
}

/* TEMA OSCURO - TARJETAS OPTIMIZADAS */
[data-bs-theme="oscuro"] .curso-card {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(100, 116, 139, 0.4);
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.4), 
        0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

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

/* MICROINTERACCIONES MEJORADAS */
.curso-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: var(--office-shadow-hover);
    border-color: var(--office-primary);
}

[data-bs-theme="oscuro"] .curso-card:hover {
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(96, 165, 250, 0.3);
}

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

.curso-card.fade-in {
    opacity: 1;
    transform: translateY(0);
    animation: slideInUp 0.6s ease-out forwards;
}

.card-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    z-index: 2;
}

/* ILUSTRACIONES CON ICONOS ESPECÍFICOS MEJORADOS */
.card-illustration {
    width: 90px;
    height: 90px;
    margin: 0 auto 2rem;
    padding: 24px;
    background: 
        linear-gradient(135deg, var(--office-primary) 0%, var(--office-secondary) 100%),
        var(--gradient-glass);
    background-blend-mode: overlay;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 
        0 8px 32px rgba(37, 99, 235, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* TEMA OSCURO - ILUSTRACIONES */
[data-bs-theme="oscuro"] .card-illustration {
    box-shadow: 
        0 8px 32px rgba(96, 165, 250, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.card-illustration::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 8px 8px;
    opacity: 0.5;
    animation: shimmer 8s linear infinite;
}

.card-illustration svg {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* MICROINTERACCIONES ESPECÍFICAS PARA ICONOS */
.curso-card:hover .card-illustration {
    transform: scale(1.05) rotate(2deg);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 12px 40px rgba(37, 99, 235, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

[data-bs-theme="oscuro"] .curso-card:hover .card-illustration {
    box-shadow: 
        0 12px 40px rgba(96, 165, 250, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* INFORMACIÓN DE LAS TARJETAS */
.card-info {
    flex: 1;
    text-align: left;
}

.card-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--office-dark);
    margin: 0 0 1rem 0;
    line-height: 1.3;
    text-align: center;
}

[data-bs-theme="oscuro"] .card-info h3 {
    color: var(--office-dark);
}

.card-info p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--office-neutral);
    margin: 0 0 2rem 0;
    letter-spacing: 0.01em;
}

[data-bs-theme="oscuro"] .card-info p {
    color: #cbd5e1;
}

/* TAGS Y ETIQUETAS */
.card-tags {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: auto;
}

.nivel, .year-info {
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
}

.nivel::before, .year-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    filter: brightness(1.1);
    z-index: -1;
}

.nivel {
    background: linear-gradient(135deg, var(--office-success) 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.year-info {
    background: linear-gradient(135deg, var(--office-accent) 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

/* ELEMENTOS DECORATIVOS DE OFICINA - RESPONSIVE MEJORADOS */
.office-decoration {
    position: fixed;
    pointer-events: none;
    opacity: 0.05;
    z-index: 1;
    color: var(--office-primary);
    user-select: none;
    font-size: 60px;
    transition: opacity 0.3s ease;
}

/* Decoraciones específicas para desktop */
.office-decoration:nth-child(1) {
    top: 15%;
    left: 8%;
    font-size: 80px;
    animation: float 6s ease-in-out infinite;
    color: var(--office-accent);
}

.office-decoration:nth-child(2) {
    bottom: 25%;
    right: 12%;
    font-size: 70px;
    animation: float 4s ease-in-out infinite reverse;
    animation-delay: -1s;
    color: var(--office-success);
}

.office-decoration:nth-child(3) {
    top: 45%;
    left: 5%;
    font-size: 65px;
    animation: float 7s ease-in-out infinite;
    animation-delay: -2s;
    color: var(--office-secondary);
}

/* Decoraciones adicionales */
.office-decoration:nth-child(7) {
    top: 25%;
    right: 5%;
    font-size: 50px;
    animation-delay: -4s;
}

.office-decoration:nth-child(8) {
    bottom: 45%;
    left: 75%;
    font-size: 45px;
    animation-delay: -2.5s;
}

.office-decoration:nth-child(9) {
    top: 80%;
    left: 12%;
    font-size: 55px;
    animation-delay: -3.5s;
}

.office-decoration:nth-child(10) {
    top: 55%;
    right: 20%;
    font-size: 40px;
    animation-delay: -1.8s;
}

.office-decoration:nth-child(11) {
    bottom: 15%;
    left: 30%;
    font-size: 48px;
    animation-delay: -2.8s;
}

/* Decoraciones SVG - Responsive */
.office-decoration-svg {
    position: fixed;
    pointer-events: none;
    opacity: 0.04;
    z-index: 1;
    color: var(--office-primary);
    transition: opacity 0.3s ease;
}

.office-decoration-svg:nth-child(4) {
    top: 20%;
    right: 25%;
    width: 60px;
    height: 60px;
    animation: rotate-slow 20s linear infinite;
}

.office-decoration-svg:nth-child(5) {
    bottom: 40%;
    left: 25%;
    width: 50px;
    height: 50px;
    animation: float 5s ease-in-out infinite;
    animation-delay: -3s;
}

.office-decoration-svg:nth-child(6) {
    top: 70%;
    right: 8%;
    width: 55px;
    height: 55px;
    animation: pulse-slow 8s ease-in-out infinite;
}

/* Tema oscuro - decoraciones más visibles */
[data-bs-theme="oscuro"] .office-decoration {
    opacity: 0.08;
}

[data-bs-theme="oscuro"] .office-decoration-svg {
    opacity: 0.06;
}

/* RESPONSIVE MEJORADO - TABLET */
@media (max-width: 1024px) and (min-width: 769px) {
    .office-decoration {
        font-size: clamp(40px, 4vw, 60px);
    }
    
    .office-decoration-svg {
        width: clamp(35px, 4vw, 50px);
        height: clamp(35px, 4vw, 50px);
    }
    
    .cursos-container {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 2rem;
    }
}

/* RESPONSIVE MEJORADO - MÓVIL */
@media (max-width: 768px) {
    .page-container { 
        padding: 1rem; 
    }
    
    .hero-section { 
        padding: 3rem 1.5rem; 
        border-radius: 16px; 
    }
    
    .cursos-container { 
        grid-template-columns: 1fr; 
        gap: 2rem; 
    }
    
    .curso-card { 
        padding: 2rem; 
        border-radius: 16px; 
    }
    
    .card-illustration { 
        width: 75px; 
        height: 75px; 
    }
    
    .card-tags { 
        flex-direction: column; 
        align-items: center; 
    }
    
    /* DECORACIONES MÓVIL - FORZAR VISIBILIDAD */
    .office-decoration {
        display: block !important;
        font-size: clamp(25px, 6vw, 35px) !important;
        opacity: 0.06 !important;
    }
    
    .office-decoration-svg {
        display: block !important;
        width: clamp(20px, 5vw, 30px) !important;
        height: clamp(20px, 5vw, 30px) !important;
        opacity: 0.04 !important;
    }
    
    /* Estilos específicos para elementos con estilos inline del HTML */
    .office-decoration[style*="top: 25%"][style*="right: 5%"] {
        top: 20% !important;
        right: 8% !important;
        font-size: 28px !important;
        display: block !important;
    }
    
    .office-decoration[style*="bottom: 45%"][style*="left: 75%"] {
        bottom: 35% !important;
        left: 70% !important;
        font-size: 26px !important;
        display: block !important;
    }
    
    .office-decoration[style*="top: 80%"][style*="left: 12%"] {
        top: 75% !important;
        left: 10% !important;
        font-size: 30px !important;
        display: block !important;
    }
    
    .office-decoration[style*="top: 55%"][style*="right: 20%"] {
        top: 50% !important;
        right: 15% !important;
        font-size: 24px !important;
        display: block !important;
    }
    
    .office-decoration[style*="bottom: 15%"][style*="left: 30%"] {
        bottom: 12% !important;
        left: 25% !important;
        font-size: 26px !important;
        display: block !important;
    }
    
    /* Posiciones optimizadas para móvil - selectores generales */
    .office-decoration:nth-child(1) {
        top: 10% !important;
        left: 5% !important;
        font-size: 30px !important;
        display: block !important;
    }
    
    .office-decoration:nth-child(2) {
        bottom: 20% !important;
        right: 8% !important;
        font-size: 28px !important;
        display: block !important;
    }
    
    .office-decoration:nth-child(3) {
        top: 35% !important;
        left: 3% !important;
        font-size: 26px !important;
        display: block !important;
    }
    
    /* SVG móvil posiciones con !important */
    .office-decoration-svg:nth-child(4) {
        top: 15% !important;
        right: 20% !important;
        width: 25px !important;
        height: 25px !important;
        display: block !important;
    }
    
    .office-decoration-svg:nth-child(5) {
        bottom: 35% !important;
        left: 20% !important;
        width: 22px !important;
        height: 22px !important;
        display: block !important;
    }
    
    .office-decoration-svg:nth-child(6) {
        top: 65% !important;
        right: 5% !important;
        width: 24px !important;
        height: 24px !important;
        display: block !important;
    }
    
    .office-decoration-svg:nth-child(7) {
        top: 25% !important;
        left: 65% !important;
        width: 20px !important;
        height: 20px !important;
        display: block !important;
    }
    
    .office-decoration-svg:nth-child(8) {
        bottom: 50% !important;
        right: 30% !important;
        width: 18px !important;
        height: 18px !important;
        display: block !important;
    }
    
    /* Tema oscuro móvil */
    [data-bs-theme="oscuro"] .office-decoration {
        opacity: 0.08 !important;
    }
    
    [data-bs-theme="oscuro"] .office-decoration-svg {
        opacity: 0.06 !important;
    }
}

/* MÓVIL PEQUEÑO */
@media (max-width: 480px) {
    .office-decoration {
        font-size: clamp(18px, 5vw, 25px);
        opacity: 0.025;
    }
    
    .office-decoration-svg {
        width: clamp(15px, 4vw, 20px);
        height: clamp(15px, 4vw, 20px);
        opacity: 0.02;
    }
    
    /* Reducir cantidad de decoraciones en pantallas muy pequeñas */
    .office-decoration:nth-child(n+9),
    .office-decoration-svg:nth-child(n+6) {
        display: none;
    }
}

/* ACCESIBILIDAD - MOVIMIENTO REDUCIDO */
@media (prefers-reduced-motion: reduce) {
    .curso-card,
    .card-illustration,
    .hero-illustration {
        animation: none;
        transition: none;
    }
    
    .curso-card:hover {
        transform: none;
    }
    
    .curso-card:hover .card-illustration {
        transform: none;
    }
    
    .office-decoration,
    .office-decoration-svg {
        animation: none;
    }
}

/* ESTADOS DE FOCO PARA ACCESIBILIDAD */
.curso-card:focus {
    outline: 2px solid var(--office-primary);
    outline-offset: 4px;
}

.curso-card.keyboard-focus {
    transform: translateY(-8px) scale(1.01);
    box-shadow: var(--office-shadow-hover);
    border-color: var(--office-primary);
}

[data-bs-theme="oscuro"] .curso-card:focus {
    outline-color: var(--office-accent);
}

/* ESTADOS DE CARGA */
.curso-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

.curso-card.loading .card-illustration {
    animation: pulse 1.5s ease-in-out infinite;
}

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

/* UTILIDADES */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* MEJORAS DE PERFORMANCE */
.curso-card {
    contain: layout style paint;
    will-change: transform, box-shadow;
}

.card-illustration {
    contain: layout style paint;
    will-change: transform;
}

/* EFECTOS ADICIONALES PARA TEMA OSCURO */
[data-bs-theme="oscuro"] .section-title {
    color: var(--office-dark);
}

[data-bs-theme="oscuro"] .nivel {
    box-shadow: 0 4px 16px rgba(52, 211, 153, 0.4);
}

[data-bs-theme="oscuro"] .year-info {
    box-shadow: 0 4px 16px rgba(251, 191, 36, 0.4);
}

/* OPTIMIZACIONES ADICIONALES PARA RENDIMIENTO MÓVIL */
@media (max-width: 768px) {
    /* Reducir blur para mejor rendimiento en móvil */
    .curso-card {
        backdrop-filter: blur(8px) saturate(160%);
        -webkit-backdrop-filter: blur(8px) saturate(160%);
    }
    
    /* Simplificar animaciones en móvil */
    .office-decoration,
    .office-decoration-svg {
        animation-duration: 8s;
    }
    
    /* Optimizar transiciones */
    .curso-card:hover {
        transform: translateY(-8px) scale(1.01);
    }
}
/* ============================================
   ESTILOS DE IMPRESIÓN - ADMINISTRACIÓN
   ============================================ */

@media print {
    /* RESET GENERAL PARA IMPRESIÓN */
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    /* OCULTAR ELEMENTOS INNECESARIOS */
    #header-placeholder,
    #footer-placeholder,
    #theme-toggle-placeholder,
    #arrow-button-placeholder,
    #preloader-placeholder,
    .skip-link,
    .office-decoration,
    .office-decoration-svg {
        display: none !important;
    }

    /* CONFIGURACIÓN DE PÁGINA */
    @page {
        margin: 2cm;
        size: A4 portrait;
    }

    /* CONTENEDOR PRINCIPAL */
    body {
        margin: 0;
        padding: 0;
        background: white !important;
        color: black !important;
        font-size: 12pt;
        line-height: 1.6;
    }

    .page-container {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }

    /* SECCIÓN HERO */
    .hero-section {
        background: white !important;
        border: 2px solid black;
        border-radius: 0;
        padding: 1.5cm !important;
        margin-bottom: 1cm;
        box-shadow: none !important;
        page-break-after: avoid;
    }

    .hero-section::before,
    .hero-section::after {
        display: none !important;
    }

    .hero-content {
        text-align: center;
    }

    .page-title {
        font-size: 24pt;
        font-weight: bold;
        color: black !important;
        margin-bottom: 0.5cm;
        background: none !important;
        -webkit-text-fill-color: black !important;
        text-shadow: none !important;
    }

    .page-subtitle {
        font-size: 14pt;
        color: black !important;
        margin-bottom: 0.5cm;
        opacity: 1 !important;
    }

    .hero-illustration {
        display: none;
    }

    /* SECCIÓN DE CURSOS */
    .cursos-seccion {
        margin: 0;
        page-break-inside: avoid;
    }

    .section-title {
        font-size: 18pt;
        font-weight: bold;
        color: black !important;
        text-align: center;
        margin: 1cm 0 0.5cm 0;
        border-bottom: 2px solid black;
        padding-bottom: 0.3cm;
    }

    .section-title::after {
        display: none;
    }

    /* CONTENEDOR DE TARJETAS */
    .cursos-container {
        display: block;
        padding: 0;
        margin: 0;
    }

    /* TARJETAS DE CURSOS */
    .curso-card {
        background: white !important;
        border: 1px solid black !important;
        border-radius: 0;
        padding: 0.8cm;
        margin-bottom: 0.8cm;
        page-break-inside: avoid;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .curso-card::before {
        display: none !important;
    }

    /* ILUSTRACIONES DE TARJETAS */
    .card-illustration {
        display: none;
    }

    /* CONTENIDO DE TARJETAS */
    .card-content {
        display: block;
    }

    .card-info {
        text-align: left;
    }

    .card-info h3 {
        font-size: 16pt;
        font-weight: bold;
        color: black !important;
        margin: 0 0 0.3cm 0;
        text-align: left;
        border-bottom: 1px solid #666;
        padding-bottom: 0.2cm;
    }

    .card-info p {
        font-size: 11pt;
        color: black !important;
        line-height: 1.5;
        margin: 0.3cm 0 0.5cm 0;
        text-align: justify;
    }

    /* ETIQUETAS/TAGS */
    .card-tags {
        display: flex;
        gap: 0.5cm;
        margin-top: 0.4cm;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .nivel,
    .year-info {
        background: white !important;
        color: black !important;
        border: 1px solid black;
        padding: 0.2cm 0.4cm;
        border-radius: 0;
        font-size: 10pt;
        font-weight: bold;
        box-shadow: none !important;
        backdrop-filter: none !important;
    }

    .nivel::before,
    .year-info::before {
        display: none;
    }

    /* PREVENIR SALTOS DE PÁGINA INDESEADOS */
    h1, h2, h3 {
        page-break-after: avoid;
    }

    article {
        page-break-inside: avoid;
    }

    /* ENLACES */
    a {
        text-decoration: underline;
        color: black !important;
    }

    /* Mostrar URLs después de los enlaces */
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        font-style: italic;
    }

    /* No mostrar URLs para enlaces internos */
    a[href^="#"]:after,
    a[href^="javascript:"]:after {
        content: "";
    }

    /* OPTIMIZACIÓN DE COLORES */
    [data-bs-theme="oscuro"] * {
        background: white !important;
        color: black !important;
    }
}