/* Estilos para el curso mejorado estilo Udemy */

:root {
    --primary-color: #a435f0;
    --secondary-color: #f69c08;
    --dark-bg: #1c1d1f;
    --light-bg: #f7f9fa;
    --border-color: #d1d7dc;
    --text-color: #1c1d1f;
    --text-muted: #6a6f73;
    --success-color: #27ae60;
    --error-color: #e74c3c;
    --info-color: #3498db;
}

.course-enhanced-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

/* Header del curso con fondo oscuro */
.course-header-section {
    background: linear-gradient(135deg, var(--dark-bg) 0%, #2d2f31 100%);
    color: white;
    padding: 2rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.course-header-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="rgba(255,255,255,0.03)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
}

.course-header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.course-breadcrumb {
    font-size: 0.875rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.course-breadcrumb a {
    color: #c0c4fc;
    text-decoration: none;
}

.course-breadcrumb a:hover {
    text-decoration: underline;
}

.course-header-main {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.course-info-left {
    flex: 1;
    max-width: 60%;
}

.course-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 1rem;
    line-height: 1.2;
    color: #fff
}

.course-subtitle {
    font-size: 1.125rem;
    margin: 0 0 1.5rem;
    opacity: 0.9;
    font-weight: 400;
}

.course-meta-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bestseller-badge {
    background: var(--secondary-color);
    color: var(--dark-bg);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    width: fit-content;
}

.rating-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rating-number {
    font-weight: 700;
    color: var(--secondary-color);
    font-size: 1rem;
}

.stars {
    display: flex;
    gap: 2px;
}

.star {
    font-size: 1rem;
    color: var(--secondary-color);
}

.star.empty {
    color: var(--text-muted);
}

.students-count {
    color: #c0c4fc;
    font-size: 0.875rem;
}

.course-author {
    font-size: 0.875rem;
}

.course-details {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    opacity: 0.8;
}

.course-details span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Sidebar flotante */
.course-sidebar-floating {
    position: sticky;
    top: 2rem;
    width: 340px;
    flex-shrink: 0;
}

.course-preview-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 8px 32px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.course-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    max-height: 191px;
}

.course-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
     max-height: 191px;
}

.play-button-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.play-preview-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-preview-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.price-section {
    padding: 1.5rem;
    text-align: center;
}

.price-current {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.price-original {
    font-size: 1rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-bottom: 0.25rem;
}

.discount-percentage {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.875rem;
}

.price-free {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
}

.cta-buttons {
    padding: 0 1.5rem 1.5rem;
}

.btn-add-cart, .btn-buy-now {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 0.75rem;
}

.btn-add-cart {
    background: var(--primary-color);
    color: white;
}

.btn-add-cart:hover {
    background: #8710d8;
}

.btn-buy-now {
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--text-color);
}

.btn-buy-now:hover {
    background: var(--text-color);
    color: white;
}

.guarantee-text {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.course-includes {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.course-includes h4 {
    margin: 0 0 1rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
}

.course-includes ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.course-includes li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: var(--text-color);
}

.course-includes i {
    color: var(--text-color);
    font-size: 1rem;
}

.share-links {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 1rem;
}

.share-btn, .wishlist-btn {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--text-color);
    background: transparent;
    color: var(--text-color);
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-btn:hover, .wishlist-btn:hover {
    background: var(--light-bg);
}

/* Contenido principal */
.course-main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    display: flex;
    gap: 2rem;
}

.course-content-left {
    flex: 1;
    max-width: 60%;
}

/* Sección: Lo que aprenderás */
.what-you-learn-section {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 3rem;
}

.what-you-learn-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1.5rem;
    color: var(--text-color);
}

.learning-objectives {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.objective-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.4;
}

.objective-item i {
    color: var(--text-color);
    margin-top: 0.1rem;
    flex-shrink: 0;
}

/* Sección: Contenido del curso */
.course-curriculum-section {
    margin-bottom: 3rem;
}

.course-curriculum-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1rem;
    color: var(--text-color);
}

.curriculum-stats {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.curriculum-content {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.curriculum-section {
    border-bottom: 1px solid var(--border-color);
}

.curriculum-section:last-child {
    border-bottom: none;
}

.section-header {
    background: var(--light-bg);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
    position: relative;
}

.section-header:hover {
    background: #e8f5e8;
}

.section-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-color);
}

.section-info {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.section-lessons {
    background: white;
}

.lesson-item {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--light-bg);
    transition: background-color 0.3s ease;
}

.lesson-item:hover {
    background: var(--light-bg);
}

.lesson-item:last-child {
    border-bottom: none;
}

.lesson-item i {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.lesson-title {
    flex: 1;
    font-size: 0.875rem;
    color: var(--text-color);
}

.lesson-duration {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.preview-label {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
}

.show-all-sections {
    width: 100%;
    padding: 1rem;
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.show-all-sections:hover {
    background: var(--primary-color);
    color: white;
}

/* Sección: Requisitos */
.requirements-section {
    margin-bottom: 3rem;
}

.requirements-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1rem;
    color: var(--text-color);
}

.requirements-section ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.requirements-section li {
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: var(--text-color);
    position: relative;
    padding-left: 1.5rem;
}

.requirements-section li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--text-muted);
}

/* Sección: Descripción */
.description-section {
    margin-bottom: 3rem;
}

.description-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1rem;
    color: var(--text-color);
}

.course-description {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-color);
}

.course-description p {
    margin-bottom: 1rem;
}

/* Sección: Instructor */
.instructor-section {
    margin-bottom: 3rem;
}

.instructor-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1.5rem;
    color: var(--text-color);
}

.instructor-info {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.instructor-avatar {
    flex-shrink: 0;
}

.instructor-avatar img {
    border-radius: 50%;
    width: 80px;
    height: 80px;
    object-fit: cover;
}

.instructor-details h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
    color: var(--primary-color);
    cursor: pointer;
}

.instructor-details h3:hover {
    text-decoration: underline;
}

.instructor-title {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0 0 1rem;
}

.instructor-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-color);
}

.stat-item i {
    color: var(--text-muted);
    font-size: 1rem;
}

.instructor-bio {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-color);
}

/* Estados del currículum */
.collapsed .section-header::after {
    content: "+";
    position: absolute;
    right: 1.5rem;
    font-weight: bold;
    font-size: 1.2rem;
}

.section-header::after {
    content: "−";
    position: absolute;
    right: 1.5rem;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Responsive Design */
/* Continuación del CSS - Responsive y Animaciones */

@media (max-width: 1024px) {
    .course-header-main {
        flex-direction: column;
    }
    
    .course-info-left {
        max-width: 100%;
    }
    
    .course-sidebar-floating {
        position: static;
        width: 100%;
        max-width: 400px;
    }
    
    .course-main-content {
        flex-direction: column;
    }
    
    .course-content-left {
        max-width: 100%;
    }
    
    .learning-objectives {
        grid-template-columns: 1fr;
    }
    
    .instructor-info {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .course-header-content,
    .course-main-content {
        padding: 0 1rem;
    }
    
    .course-title {
        font-size: 2rem;
    }
    
    .course-details {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .what-you-learn-section {
        padding: 1.5rem;
    }
    
    .section-header {
        padding: 0.75rem 1rem;
    }
    
    .lesson-item {
        padding: 0.75rem 1rem;
    }
    
    .instructor-info {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .course-title {
        font-size: 1.5rem;
    }
    
    .course-subtitle {
        font-size: 1rem;
    }
    
    .course-header-main {
        gap: 1rem;
    }
    
    .price-section {
        padding: 1rem;
    }
    
    .price-current {
        font-size: 1.5rem;
    }
    
    .btn-add-cart, .btn-buy-now {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from { 
        transform: translateX(100%); 
        opacity: 0;
    }
    to { 
        transform: translateX(0); 
        opacity: 1;
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes bounce {
    0%, 20%, 60%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    80% { transform: translateY(-5px); }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Aplicar animaciones */
.course-enhanced-container * {
    animation: fadeInUp 0.6s ease-out;
}

.course-sidebar-floating {
    animation: slideInRight 0.8s ease-out 0.3s both;
}

/* Estados especiales */
.sticky-active {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 999999 !important;
    animation: slideInRight 0.3s ease-out !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
}

.pulse {
    animation: pulse 1s ease-in-out;
}

.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

/* Modal de video */
.video-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    animation: fadeInUp 0.3s ease-out;
}

.video-modal-content {
    position: relative;
    margin: 5% auto;
    width: 80%;
    max-width: 800px;
    animation: fadeInUp 0.4s ease-out 0.1s both;
}

.video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.video-modal-close:hover {
    opacity: 0.7;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Sistema de notificaciones */
#notifications-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

.notification {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 1rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 1rem;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    min-width: 300px;
    max-width: 400px;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-success {
    border-left: 4px solid var(--success-color);
}

.notification-error {
    border-left: 4px solid var(--error-color);
}

.notification-info {
    border-left: 4px solid var(--info-color);
}

.notification-message {
    flex: 1;
    font-size: 0.875rem;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.notification-close:hover {
    color: var(--text-color);
}

/* Carrito actualizado */
.cart-count.updated {
    animation: bounce 0.5s ease;
}

/* Botones con estados */
.btn-add-cart:disabled,
.btn-buy-now:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-add-cart.success {
    background: var(--success-color);
}

.btn-add-cart.error {
    background: var(--error-color);
}

/* Wishlist activo */
.wishlist-btn.active {
    background: #ffebee;
    color: #e91e63;
    border-color: #e91e63;
}

/* Efectos hover mejorados */
.course-preview-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), 0 12px 40px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.lesson-item:hover .lesson-title {
    color: var(--primary-color);
}

.objective-item:hover {
    transform: translateX(5px);
    transition: transform 0.3s ease;
}

/* Breadcrumbs mejorados */
.course-breadcrumbs {
    margin-bottom: 1rem;
}

.breadcrumb-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
    align-items: center;
}

.breadcrumb-list li {
    font-size: 0.875rem;
    color: #c0c4fc;
}

.breadcrumb-list li:not(:last-child)::after {
    content: ">";
    margin-left: 0.5rem;
    opacity: 0.6;
}

.breadcrumb-list a {
    color: #c0c4fc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-list a:hover {
    color: white;
    text-decoration: underline;
}

/* Banner promocional */
.promotional-banner {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
    padding: 1rem 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.promotional-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 2;
}

.banner-icon {
    font-size: 1.5rem;
}

.banner-text {
    flex: 1;
}

.banner-text strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.countdown-timer {
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: bold;
}

/* Prueba social */
.social-proof-section {
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.recent-activity h4 {
    margin: 0 0 1rem;
    font-size: 1rem;
    color: var(--text-color);
}

.recent-enrollments {
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
}

.recent-enrollments li {
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: var(--text-muted);
    border-bottom: 1px solid #eee;
}

.recent-enrollments li:last-child {
    border-bottom: none;
}

.trust-indicators {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.trust-item .icon {
    font-size: 1.1rem;
}

/* Mejoras de accesibilidad */
button:focus,
a:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
    
    .course-enhanced-container * {
        animation: none;
    }
}

/* Estados de carga específicos */
.section-header.loading {
    opacity: 0.7;
    pointer-events: none;
}

.btn-add-cart.loading {
    position: relative;
    color: transparent;
}

.btn-add-cart.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

/* Utilidades adicionales */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

.hidden { display: none; }
.visible { display: block; }

/* Print styles */
@media print {
    .course-sidebar-floating,
    .promotional-banner,
    .social-proof-section,
    #notifications-container {
        display: none;
    }
    
    .course-main-content {
        flex-direction: column;
    }
    
    .course-content-left {
        max-width: 100%;
    }
}

/* Mejorar la transición del sticky */
.course-sidebar-floating {
    transition: all 0.3s ease;
}

/* Prevenir overflow horizontal */
.course-enhanced-container {
    overflow-x: hidden;
    max-width: 100vw;
}

.course-header-content,
.course-main-content {
    max-width: 1200px;
    width: 100%;
    box-sizing: border-box;
}

/* CSS Adicional para las nuevas funcionalidades */

/* Descripción en el header */
.course-description-header {
    margin: 1rem 0 1.5rem;
    max-width: 600px;
}

.course-description-header p {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
}

.show-more-description {
    background: none;
    border: none;
    color: #c0c4fc;
    font-size: 0.875rem;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}

.show-more-description:hover {
    color: white;
}

/* Estados de inscripción */
.enrolled-status {
    text-align: center;
    padding: 1rem 0;
}

.enrolled-badge {
    display: inline-block;
    background: var(--success-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.progress-info {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.price-free {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--success-color);
    text-align: center;
}

/* Nuevos botones */
.btn-continue-course,
.btn-enroll-course,
.btn-login-required {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 0.75rem;
    text-decoration: none;
    display: block;
    text-align: center;
}

.btn-continue-course {
    background: var(--success-color);
    color: white;
}

.btn-continue-course:hover {
    background: #219a54;
}

.btn-enroll-course {
    background: var(--primary-color);
    color: white;
}

.btn-enroll-course:hover {
    background: #8710d8;
}

.btn-login-required {
    background: var(--info-color);
    color: white;
}

.btn-login-required:hover {
    background: #2980b9;
}

.btn-view-content {
    width: 100%;
    padding: 1rem;
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--text-color);
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 0.75rem;
}

.btn-view-content:hover {
    background: var(--text-color);
    color: white;
}

/* Barra de progreso en overlay */
.course-progress-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 1rem;
    color: white;
}

.progress-bar {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    display: block;
}

/* Barra de progreso en sidebar */
.course-progress-sidebar {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: #f8f9ff;
}

.course-progress-sidebar h4 {
    margin: 0 0 1rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.course-progress-sidebar h4::before {
    content: "📊";
    font-size: 1.2rem;
}

.progress-bar-large {
    background: #e0e6ed;
    border-radius: 15px;
    height: 12px;
    overflow: hidden;
    margin-bottom: 0.75rem;
    position: relative;
}

.progress-bar-large .progress-fill {
    background: linear-gradient(90deg, var(--primary-color), #8710d8);
    height: 100%;
    border-radius: 15px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Estados de lecciones */
.lesson-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--light-bg);
    transition: all 0.3s ease;
    position: relative;
}

.lesson-item:hover {
    background: var(--light-bg);
}

.lesson-item.completed {
    background: rgba(39, 174, 96, 0.05);
    border-left: 3px solid var(--success-color);
}

.lesson-item .icon-check-circle.completed {
    color: var(--success-color);
    font-size: 1.2rem;
}

.lesson-item .icon-lock {
    color: var(--text-muted);
    opacity: 0.6;
}

.completed-label {
    background: var(--success-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Modal de descripción expandida */
.description-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    animation: fadeIn 0.3s ease-out;
}

.description-modal-content {
    position: relative;
    margin: 5% auto;
    padding: 2rem;
    width: 80%;
    max-width: 800px;
    background: white;
    border-radius: 8px;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideInUp 0.4s ease-out;
}

.description-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
}

.description-modal-close:hover {
    color: var(--text-color);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from { 
        opacity: 0;
        transform: translateY(50px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mejoras responsive */
@media (max-width: 768px) {
    .course-description-header {
        max-width: 100%;
    }
    
    .course-progress-overlay {
        padding: 0.75rem;
    }
    
    .progress-text {
        font-size: 0.7rem;
    }
    
    .enrolled-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .btn-continue-course,
    .btn-enroll-course,
    .btn-login-required,
    .btn-view-content {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
}

/* Animaciones mejoradas */
.lesson-item.completed .icon-check-circle {
    animation: checkBounce 0.6s ease-out;
}

@keyframes checkBounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.progress-fill {
    animation: progressGrow 1s ease-out;
}

@keyframes progressGrow {
    from { width: 0; }
}

/* Estados de hover mejorados */
.btn-continue-course:hover,
.btn-enroll-course:hover,
.btn-login-required:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.course-progress-sidebar:hover .progress-fill {
    box-shadow: 0 0 20px rgba(164, 53, 240, 0.3);
}

/* Indicadores visuales mejorados */
.lesson-item .icon-play {
    color: var(--primary-color);
}

.lesson-item .icon-play:hover {
    transform: scale(1.1);
}

.section-header:hover {
    background: linear-gradient(90deg, var(--light-bg), rgba(164, 53, 240, 0.05));
}

/* Smoothing y performance */
.course-enhanced-container * {
    box-sizing: border-box;
}

.course-sidebar-floating {
    transform: translateZ(0);
    will-change: transform;
}

.progress-fill {
    will-change: width;
}

/* Accesibilidad mejorada */
.btn-continue-course:focus,
.btn-enroll-course:focus,
.btn-view-content:focus {
    outline: 3px solid rgba(164, 53, 240, 0.5);
    outline-offset: 2px;
}

.lesson-item:focus-within {
    background: var(--light-bg);
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
}

/* Estados de carga para los nuevos botones */
.btn-enroll-course.loading {
    position: relative;
    color: transparent;
}

.btn-enroll-course.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

/* Continuación de CSS - Parte 2 */

/* Mejoras de contraste */
.course-description-header p {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Tooltip para el progreso */
.progress-bar-large::before {
    content: attr(data-progress);
    position: absolute;
    top: -30px;
    left: var(--progress-position, 0%);
    transform: translateX(-50%);
    background: var(--dark-bg);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.progress-bar-large:hover::before {
    opacity: 1;
}

/* Notificaciones mejoradas para el nuevo flujo */
.enrollment-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
    z-index: 10001;
    max-width: 400px;
    width: 90%;
}

.enrollment-notification.success {
    border-top: 4px solid var(--success-color);
}

.enrollment-notification.error {
    border-top: 4px solid var(--error-color);
}

.enrollment-notification h3 {
    margin: 0 0 1rem;
    color: var(--text-color);
    font-size: 1.25rem;
}

.enrollment-notification p {
    margin: 0 0 1.5rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.enrollment-notification .btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.enrollment-notification .btn:hover {
    background: #8710d8;
}

/* Overlay para notificaciones */
.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: none;
}

.notification-overlay.show {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

/* Estados de suscripción */
.subscription-status {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
}

.subscription-status.active {
    background: linear-gradient(135deg, #11998e, #38ef7d);
}

.subscription-status.expired {
    background: linear-gradient(135deg, #fc4a1a, #f7b733);
}

.subscription-status h4 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

.subscription-status p {
    margin: 0;
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Mejoras para el currículum expandido */
.curriculum-section.expanded .section-lessons {
    max-height: none;
    overflow: visible;
}

.curriculum-section .section-lessons {
    max-height: 200px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.expand-toggle {
    background: none;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 1rem auto;
    display: block;
}

.expand-toggle:hover {
    background: var(--primary-color);
    color: white;
}

/* Indicadores de lección */
.lesson-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.lesson-indicator.free {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
}

.lesson-indicator.premium {
    background: rgba(164, 53, 240, 0.1);
    color: var(--primary-color);
}

.lesson-indicator.locked {
    background: rgba(106, 111, 115, 0.1);
    color: var(--text-muted);
}

/* Animaciones de estado */
.state-transition {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.lesson-item.unlocked {
    animation: unlockAnimation 0.6s ease-out;
}

@keyframes unlockAnimation {
    0% { 
        background: rgba(164, 53, 240, 0.1);
        transform: scale(1);
    }
    50% { 
        background: rgba(164, 53, 240, 0.2);
        transform: scale(1.02);
    }
    100% { 
        background: transparent;
        transform: scale(1);
    }
}

/* Drag and drop visual feedback */
.curriculum-section.dragging {
    opacity: 0.7;
    transform: rotate(2deg);
}

.curriculum-section.drop-target {
    border: 2px dashed var(--primary-color);
    background: rgba(164, 53, 240, 0.05);
}

/* Mejoras de tipografía */
.course-title {
    font-variation-settings: "wght" 700;
    letter-spacing: -0.02em;
}

.course-subtitle {
    font-variation-settings: "wght" 400;
    letter-spacing: -0.01em;
}

/* Estados de hover para elementos interactivos */
.interactive-element {
    transition: all 0.2s ease;
    cursor: pointer;
}

.interactive-element:hover {
    transform: translateY(-1px);
}

.interactive-element:active {
    transform: translateY(0);
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    .progress-fill,
    .lesson-item,
    .interactive-element,
    .btn-continue-course,
    .btn-enroll-course {
        transition: none;
        animation: none;
    }
    
    .progress-fill::after {
        animation: none;
    }
}

/* Alto contraste */
@media (prefers-contrast: high) {
    .progress-bar {
        border: 1px solid var(--text-color);
    }
    
    .progress-fill {
        background: var(--text-color);
    }
    
    .lesson-item {
        border: 1px solid var(--text-color);
        margin-bottom: 2px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --light-bg: #2d2f31;
        --text-color: #f7f9fa;
        --text-muted: #9ca3af;
        --border-color: #374151;
    }
    
    .course-preview-card {
        background: var(--dark-bg);
        border-color: var(--border-color);
    }
    
    .course-progress-sidebar {
        background: #1f2937;
    }
    
    .enrollment-notification {
        background: var(--dark-bg);
        color: var(--text-color);
    }
}

/* Print styles específicos */
@media print {
    .course-progress-overlay,
    .course-progress-sidebar,
    .cta-buttons,
    .share-links {
        display: none;
    }
    
    .course-preview-card {
        break-inside: avoid;
    }
    
    .lesson-item {
        break-inside: avoid;
    }
}

/* Mejoras de performance */
.course-enhanced-container {
    contain: layout style paint;
}

.course-sidebar-floating {
    contain: layout paint;
    transform: translateZ(0);
}

.progress-fill {
    contain: layout paint;
    transform: translateZ(0);
}

/* Utility classes adicionales */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-up {
    animation: slideInUp 0.6s ease-out;
}

.bounce-in {
    animation: bounceIn 0.8s ease-out;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Estados de loading específicos */
.course-content-loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.course-content-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
}

/* Skeleton loading para contenido */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 1em;
    margin: 0.5em 0;
    border-radius: 4px;
}

.skeleton-title {
    height: 2em;
    width: 70%;
    margin: 1em 0;
    border-radius: 6px;
}

.skeleton-button {
    height: 3em;
    width: 100%;
    margin: 1em 0;
    border-radius: 6px;
}


/*
===================================================================
=== 🌟 SOLUCIÓN DE LAYOUT DEFINITIVA - ELEGANTE Y ESTABLE 🌟 ===
===================================================================
*/

/* 1. Establecemos un fondo base sutil para toda la página.
   Esto hace que los elementos blancos resalten más. */
body {
    background-color: #2a2c2e !important;
}

/* 2. Definimos las columnas principales dentro del contenedor.
   El contenido de la izquierda ocupará el espacio restante al lado del sidebar. */
.course-info-left,
.course-content-left {
    width: calc(100% - 380px); /* Ancho del sidebar (340px) + un espacio (40px) */
    padding-right: 20px; /* Asegura que no se pegue al sidebar si la ventana es pequeña */
    box-sizing: border-box;
   
}


.course-content-left {
    flex: 1;
    margin-top: -40rem !important;
}

/* 3. Ajustamos el sidebar
   Nos aseguramos que tenga un ancho fijo y se mantenga pegajoso (sticky). */
.course-sidebar-floating {
    width: 340px;
    top: 2rem; /* Distancia desde la parte superior al hacer scroll */
}

/* 4. ELIMINAMOS EL ESPACIO EN BLANCO
   Usamos un margen negativo moderado y controlable para subir el contenido.
   ¡Puedes ajustar este valor (-6rem) si lo necesitas un poco más arriba o abajo! */
.course-main-content {
    margin-top: -6rem;
    position: relative; /* Ayuda a que se renderice correctamente */
    z-index: 10;
}

/* 5. MEJORAMOS EL DISEÑO Y CONTRASTE (La parte creativa) */

/* Caja "Lo que aprenderás" más limpia y profesional */
.what-you-learn-section {
    background: #ffffff; /* Fondo blanco para máxima legibilidad */
    border: 1px solid #e8eaf0;
    border-left: 4px solid #a435f0; /* Un acento con tu color primario */
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05); /* Sombra sutil para darle profundidad */
    color: #343a40; /* Texto más oscuro */
    border-radius: 8px; /* Bordes redondeados */
}

.what-you-learn-section h2 {
    color: #1c1d1f;
    border-bottom: 1px solid #f1f3f5;
    padding-bottom: 1rem;
}

/* Damos más jerarquía a los encabezados de las lecciones */
.section-header {
    background: #f8f9fa;
    border-top: 1px solid #e8eaf0;
    border-bottom: 1px solid #e8eaf0;
    margin-top: -1px; /* Corrige doble borde */
}

.section-header h3 {
    font-weight: 700;
    color: #212529;
}

/* Quitamos el ancho fijo del contenido principal para que se ajuste solo */
.course-main-content {
    max-width: 1200px;
}

/* Media Query para pantallas pequeñas, donde todo se apila */
@media (max-width: 1024px) {
    .course-info-left,
    .course-content-left {
        width: 100%;
        padding-right: 0;
    }
    .course-main-content {
        margin-top: 2rem; /* Reseteamos el margen en móvil */
    }
}

.learndash-wrapper .ld-course-status.ld-course-status-enrolled {
    display: none !important;
}

.ld-accordion, .ld-accordion__header  {
    display: none !important;
}

.instructor-section {
    display: none !important;
}

.ld-tab-bar__panel .ld-featured-image {
     display: none;
}

@media (max-width: 640px) {

.course-content-left {
    flex: 1;
    margin-top: 0rem !important;
}


}

.description-section {
 
display: none !important;
}