/* ========================================================================== */
/*  Módulo: Ajustes de Layout (antes en `layout-fixes.css`)                    */
/* ========================================================================== */
/* Emergency Layout Fixes */

/* Ensure the main layout structure works correctly */
.d-flex.p-3.gap-3.overflow-auto.vh-100 {
    display: flex !important;
    padding: 1rem !important;
    gap: 1rem !important;
    overflow: auto !important;
    min-height: 100vh !important;
}

/* Sidebar fixes */
aside {
    flex-shrink: 0;
    width: 280px;
    max-width: 280px;
}

/* Main content area */
main {
    flex-grow: 1;
    min-width: 0;
}

/* Navigation fixes */
.bg-menu {
    background-color: #f8f9fa !important;
    border: 1px solid #dee2e6;
}

._layout {
    width: 100%;
    min-height: calc(100vh - 2rem);
}


/* Logo and user info */
.main-logo {
    width: 32px;
    height: 32px;
}

.name p {
    margin-bottom: 0.25rem;
}

/* Header fixes */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* QR Button fixes */
.btn-qr-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

/* User avatar */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Responsive sidebar */
@media (max-width: 768px) {
    aside {
        width: 250px;
    }
   
    aside {
        width: 100%;
        position: relative !important;
    }
    
    ._layout {
        min-height: auto;
    }
}

/* Override any problematic styles */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Modal Fixes */
.modal-header.bg-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.modal-header.bg-gradient .modal-title {
    color: white !important;
}

.modal-header.bg-gradient .btn-close {
    filter: invert(1) !important;
}

/* Modal titles inherit color from their header context */
.modal-title {
    color: inherit;
}

/* Modals with plain white/default header keep dark title */
.modal-header:not([style*="gradient"]):not(.bg-gradient):not(.bg-primary):not(.bg-danger):not(.bg-success):not(.bg-dark) .modal-title {
    color: #212529;
}

/* QR Button responsive text */
.btn-qr-download span {
    font-size: 0.875rem;
}

@media (max-width: 576px) {
    .btn-qr-download span {
        font-size: 0.8rem;
    }
    
    .btn-qr-download {
        padding: 0.4rem 0.8rem !important;
    }
}


/* ========================================================================== */
/*  Módulo: Detalle de Ciclo (antes en `cycle-detail.css`)                     */
/* ========================================================================== */
/* Cycle Detail - Modern & Professional Styles */

/* TED INNOVA Brand Colors */
:root {
    --ted-primary: #667eea;
    --ted-secondary: #764ba2;
    --ted-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --ted-light: #f8fafc;
    --ted-dark: #1f2937;
    --ted-gray: #6b7280;
    --ted-success: #10b981;
    --ted-warning: #f59e0b;
    --ted-danger: #ef4444;
    --shadow-soft: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-medium: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-large: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Hero Section Improvements */
.bg-course {
    background: var(--ted-gradient) !important;
    position: relative;
    overflow: hidden;
}

.bg-course::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="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="30" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    pointer-events: none;
}

.bg-course .card-title1 {
    font-size: clamp(1rem, 4vw, 2rem) !important;
    font-weight: 700 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bg-course .btn {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    transition: all 0.3s ease;
}

.bg-course .btn:hover {
    background-color: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Cycle Information Cards - Scoped to cycle pages */
.cycle-detail-page .cycle-info-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    height: 100%;
}

.cycle-detail-page .cycle-info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
    border-color: var(--ted-primary);
}

.cycle-detail-page .cycle-info-item {
    padding: 1rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.cycle-detail-page .cycle-info-item:last-child {
    border-bottom: none;
}

.cycle-detail-page .cycle-info-label {
    font-weight: 600;
    color: var(--ted-dark);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.cycle-detail-page .cycle-info-value {
    font-size: 1rem;
    color: var(--ted-gray);
    font-weight: 500;
}

/* Compact versions for better space utilization */
.cycle-detail-page .cycle-info-card-compact {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    height: 100%;
}

.cycle-detail-page .cycle-info-card-compact:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    border-color: var(--ted-primary);
}

.cycle-detail-page .cycle-info-item-compact {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.cycle-detail-page .cycle-info-item-compact:last-child {
    border-bottom: none;
}

.cycle-detail-page .cycle-info-label-compact {
    font-weight: 600;
    color: var(--ted-dark);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.125rem;
}

.cycle-detail-page .cycle-info-value-compact {
    font-size: 0.875rem;
    color: var(--ted-gray);
    font-weight: 500;
}

/* QR Container Enhancement - Scoped to cycle pages */
.cycle-detail-page .qr-container {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-large);
    border: 1px solid #e5e7eb;
    min-height: 400px;
    position: relative;
    overflow: hidden;
}

.cycle-detail-page .qr-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg at 50% 50%, var(--ted-primary), var(--ted-secondary), var(--ted-primary));
    animation: rotate 10s linear infinite;
    opacity: 0.1;
    z-index: 1;
}

/* Compact QR Container for better space usage */
.cycle-detail-page .qr-container-compact {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid #e5e7eb;
    position: relative;
    overflow: hidden;
    min-height: 220px;
}

.cycle-detail-page .qr-container-compact::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg at 50% 50%, var(--ted-primary), var(--ted-secondary), var(--ted-primary));
    animation: rotate 15s linear infinite;
    opacity: 0.05;
    z-index: 1;
}

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

.cycle-detail-page .qr-container > *,
.cycle-detail-page .qr-container-compact > * {
    position: relative;
    z-index: 2;
}

.cycle-detail-page #qr-canvas {
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    border: 4px solid white;
}

/* Attendance Section - Scoped to cycle pages */
.cycle-detail-page .attendance-section {
    margin-top: 2rem;
}

.cycle-detail-page .attendance-header {
    background: var(--ted-gradient);
    color: white;
    padding: 1.5rem;
    border-radius: 16px 16px 0 0;
    margin-bottom: 0;
}

.cycle-detail-page .attendance-header-compact {
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    border: 1px solid #e5e7eb;
}

.cycle-detail-page .attendance-controls {
    background: white;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 16px 16px;
    box-shadow: var(--shadow-soft);
}

.cycle-detail-page .week-selector {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.cycle-detail-page .week-selector:focus {
    border-color: var(--ted-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Day Headers - Scoped to cycle pages */
.cycle-detail-page .day-header {
    background: var(--ted-gradient);
    color: white;
    padding: 0.75rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    margin-bottom: 0.75rem;
    position: relative;
    overflow: hidden;
    font-size: 0.875rem;
}

.cycle-detail-page .day-header.today {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Attendance Cards - Scoped to cycle pages */
.cycle-detail-page .attendance-day-container {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid #e5e7eb;
    min-height: 140px;
    transition: all 0.3s ease;
}

.cycle-detail-page .attendance-day-container:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.cycle-detail-page .attendance-card {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.cycle-detail-page .attendance-card:hover {
    transform: translateX(2px);
    box-shadow: var(--shadow-soft);
}

/* Morning Shift */
.shift-morning {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
}

.shift-morning .card-body {
    background: rgba(251, 191, 36, 0.1);
    border-left: 4px solid #fbbf24;
}

/* Afternoon Shift */
.shift-afternoon {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
}

.shift-afternoon .card-body {
    background: rgba(107, 114, 128, 0.1);
    border-left: 4px solid #6b7280;
}

/* No Attendance */
.cycle-detail-page .no-attendance {
    background: rgba(239, 68, 68, 0.1);
    border: 2px dashed #ef4444;
    color: #dc2626;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;
    border-radius: 8px;
    min-height: 80px;
}

.cycle-detail-page .no-attendance i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

/* Loading States */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--ted-primary);
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    border-color: var(--ted-primary);
    border-right-color: transparent;
}

/* Responsive Design - Scoped to cycle detail pages only */
.cycle-detail-page .col-xl-2-5 {
    flex: 0 0 auto;
    width: 20%;
}

@media (max-width: 1200px) {
    .cycle-detail-page .col-xl-2-5 {
        flex: 0 0 auto;
        width: 20%;
    }
}

@media (max-width: 992px) {
    .cycle-detail-page .col-xl-2-5 {
        width: 33.333333%;
    }
    
    .cycle-detail-page .qr-container {
        margin-top: 2rem;
        padding: 1.5rem;
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    .cycle-detail-page .col-xl-2-5 {
        width: 100%;
    }
    
    .cycle-detail-page .qr-container {
        padding: 1rem;
        min-height: 250px;
    }
    
    .cycle-detail-page .cycle-info-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .cycle-detail-page .attendance-day-container {
        padding: 1rem;
    }
    
    .cycle-detail-page .day-header {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
    
    .cycle-detail-page .qr-container {
        padding: 0.75rem;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles */
.btn:focus,
.form-select:focus {
    outline: 2px solid var(--ted-primary);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .qr-container {
        break-inside: avoid;
        box-shadow: none;
        border: 2px solid #000;
    }
    
    .bg-course {
        background: #000 !important;
        color: #fff !important;
    }
}


/* ========================================================================== */
/*  Módulo: Acceso QR (antes en `qr-access.css`)                              */
/* ========================================================================== */
/* Direct QR Download Button Styles */
.btn-qr-download {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.btn-qr-download:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.4);
    color: white;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.btn-qr-download:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
    color: white;
}

/* QR Dropdown Styles */
.qr-dropdown {
    min-width: 280px;
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
}

.qr-dropdown .dropdown-header {
    color: #6366f1;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.75rem 1rem 0.5rem;
    background: #f8fafc;
    margin: 0 0.5rem;
    border-radius: 0.5rem;
}

.qr-cycle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    margin: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s ease;
    text-decoration: none;
    color: #374151;
}

.qr-cycle-item:hover {
    background-color: #f3f4f6;
    color: #1f2937;
    text-decoration: none;
}

.qr-cycle-info h6 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: inherit;
}

.qr-cycle-info small {
    color: #6b7280;
    font-size: 0.75rem;
}

.qr-cycle-action {
    background: #10b981;
    color: white;
    border-radius: 0.375rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border: none;
    transition: background-color 0.2s ease;
}

.qr-cycle-action:hover {
    background: #059669;
}

.qr-no-cycles {
    padding: 1rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
}

/* Navigation Menu Attendance Item */
.nav-item.attendance-item .nav-link {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.nav-item.attendance-item .nav-link:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 8px rgba(240, 147, 251, 0.3);
}

.nav-item.attendance-item .nav-link i {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.375rem;
    border-radius: 0.375rem;
    margin-right: 0.5rem;
}

/* Tooltip Enhancements */
.tooltip-qr .tooltip-inner {
    background-color: #1f2937;
    color: white;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    max-width: 200px;
}

.tooltip-qr .tooltip-arrow {
    border-top-color: #1f2937;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .qr-dropdown {
        min-width: 260px;
    }
    
    .btn-qr-quick span {
        display: none !important;
    }
    
    .qr-cycle-item {
        padding: 0.5rem;
    }
    
    .qr-cycle-info h6 {
        font-size: 0.8125rem;
    }
}

/* User Avatar Improvements */
.user-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-initials {
    color: white;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

/* Animation for download button icon */
@keyframes download-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-2px);
    }
}

.btn-qr-download:hover .fa-download {
    animation: download-bounce 0.6s ease-in-out;
}

/* QR Info Modal Styles */
.qr-preview-box {
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}

.info-steps {
    padding-left: 0;
}

.step-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.step-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
    margin-right: 0.75rem;
    margin-top: 0.125rem;
}

.step-content {
    flex: 1;
}

.step-content strong {
    color: #374151;
    font-size: 0.875rem;
}

.step-content p {
    margin-bottom: 0;
    color: #6b7280;
    font-size: 0.8125rem;
    line-height: 1.4;
    margin-top: 0.25rem;
}

/* Cycle selection modal styles */
.cycle-selection-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cycle-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.cycle-option:hover {
    border-color: #6366f1;
    background-color: #f8fafc;
    transform: translateX(2px);
}

.cycle-option .cycle-info h6 {
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.cycle-option .cycle-info small {
    color: #6b7280;
}


/* ========================================================================== */
/*  Módulo: Profesores (antes en `teachers-clean.css`)                        */
/* ========================================================================== */
/* Modern Teachers Dashboard - Isolated Styles */
.teachers-page-container {
    width: 100%;
    max-width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Hero Section */
.teachers-page-container .teachers-hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2.5rem 2rem;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

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

.teachers-page-container .hero-icon {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.teachers-page-container .hero-title {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.teachers-page-container .hero-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
}

/* Main Section */
.teachers-page-container .teachers-main-section {
    padding: 0;
}

.teachers-page-container .section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.teachers-page-container .section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.teachers-page-container .section-subtitle {
    color: #64748b;
    font-size: 0.95rem;
    margin: 0;
}

.teachers-page-container .header-stats {
    display: flex;
    gap: 1rem;
}

.teachers-page-container .stat-item {
    text-align: center;
}

.teachers-page-container .stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #6366f1;
}

.teachers-page-container .stat-label {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Teachers Grid */
.teachers-page-container .teachers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

/* Teacher Card */
.teachers-page-container .teacher-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    position: relative;
}

.teachers-page-container .teacher-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 1rem 1rem 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.teachers-page-container .teacher-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

.teachers-page-container .teacher-card:hover::before {
    opacity: 1;
}

.teachers-page-container .teacher-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.teachers-page-container .teacher-avatar-container {
    position: relative;
    margin-right: 1rem;
    flex-shrink: 0;
}

.teachers-page-container .teacher-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #f1f5f9;
}

.teachers-page-container .certification-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    border: 2px solid white;
}

.teachers-page-container .teacher-info h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.teachers-page-container .teacher-specialty {
    color: #6366f1;
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.teachers-page-container .teacher-subjects {
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Loading Skeletons */
.teachers-page-container .teacher-card-skeleton {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.teachers-page-container .skeleton-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    flex-shrink: 0;
}

.teachers-page-container .skeleton-content {
    flex: 1;
}

.teachers-page-container .skeleton-name {
    height: 1.125rem;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
    width: 70%;
}

.teachers-page-container .skeleton-specialty {
    height: 0.875rem;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
    width: 50%;
}

.teachers-page-container .skeleton-description {
    height: 0.875rem;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 0.25rem;
    width: 85%;
}

/* Empty State */
.teachers-page-container .empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.teachers-page-container .empty-icon {
    font-size: 3rem;
    color: #94a3b8;
    margin-bottom: 1rem;
}

.teachers-page-container .empty-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.teachers-page-container .empty-description {
    color: #64748b;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.teachers-page-container .btn-retry {
    background: #6366f1;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.teachers-page-container .btn-retry:hover {
    background: #4f46e5;
    transform: translateY(-1px);
}

/* Animations */
@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .teachers-page-container .teachers-hero-section {
        padding: 2rem 1rem;
        margin-bottom: 1rem;
    }
    
    .teachers-page-container .hero-title {
        font-size: 1.75rem;
    }
    
    .teachers-page-container .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .teachers-page-container .teachers-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .teachers-page-container .section-header {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 1rem;
        gap: 0.5rem;
    }
    
    .teachers-page-container .teacher-card,
    .teachers-page-container .teacher-card-skeleton {
        padding: 1.25rem;
    }
    
    .teachers-page-container .section-title {
        font-size: 1.25rem;
    }
    
    .teachers-page-container .section-subtitle {
        font-size: 0.9rem;
    }
}


/* ========================================================================== */
/*  Módulo: Video Learning (antes en `video-learning.css`)                    */
/* ========================================================================== */
/* Modern Video Learning Interface Styles */

/* Hide any debug elements */
.debug-info {
    display: none !important;
}

/* CSS Variables for consistent theming */
:root {
    --primary-color: #3996ff;
    --primary-dark: #2b7ce9;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --bg-dark: #343a40;
    
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-muted: #868e96;
    
    --border-color: #dee2e6;
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --border-radius-sm: 8px;
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    
    --transition: all 0.3s ease;
    --transition-fast: all 0.15s ease;
    
    /* Layout variables */
    --video-max-height: 60vh;
    --content-list-height: 70vh;
    --sidebar-width: 380px;
}

/* Dark mode variables */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #1a1a1a;
        --bg-secondary: #2d2d2d;
        --bg-tertiary: #404040;
        --bg-dark: #0d1117;
        
        --text-primary: #ffffff;
        --text-secondary: #b0b0b0;
        --text-muted: #8b8b8b;
        
        --border-color: #404040;
    }
}

/* Main Layout */
.video-learning-container {
    display: grid;
    grid-template-columns: 1fr clamp(320px, 30vw, 400px);
    gap: clamp(0.5rem, 2vw, 1.5rem);
    min-height: 100vh;
    background: var(--bg-secondary);
    padding: clamp(0rem, 1.5vw, 1rem);
}

@media (max-width: 1200px) {
    .video-learning-container {
        grid-template-columns: 1fr;
        gap: clamp(0.5rem, 1.5vw, 1rem);
    }
}

/* Video Section */
.video-section {
    background: var(--bg-primary);
    border-radius: clamp(0.25rem, 1vw, var(--border-radius-lg));
    overflow: hidden;
    box-shadow: var(--shadow-md);
    height: fit-content;
}

@media (max-width: 768px) {
    .video-section {
        position: sticky;
        top: 0;
        z-index: 100;
        border-radius: 0;
        margin-bottom: 0;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    }
}

.video-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(0.75rem, 2vw, 1.5rem);
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.course-breadcrumb {
    display: flex;
    align-items: center;
    gap: clamp(0.25rem, 1vw, 0.5rem);
    font-size: clamp(0.75rem, 1.5vw, 0.9rem);
}

.breadcrumb-link {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: clamp(0.25rem, 1vw, 0.5rem);
    transition: var(--transition-fast);
}

.breadcrumb-link:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-divider {
    color: var(--text-muted);
}

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

.video-actions {
    display: flex;
    gap: clamp(0.25rem, 1vw, 0.5rem);
}

.action-btn {
    width: clamp(32px, 5vw, 40px);
    height: clamp(32px, 5vw, 40px);
    border: none;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(0.8rem, 1.5vw, 1rem);
}

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

/* Video Player */
.video-player-container {
    position: relative;
    background: #000;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: clamp(35vh, 55vh, 65vh);
}

@media (max-width: 768px) {
    .video-wrapper {
        max-height: clamp(180px, 30vh, 300px);
        aspect-ratio: 16 / 9;
    }
}

.video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Current Video Info */
.current-video-info {
    padding: clamp(0.75rem, 2.5vw, 2rem);
    border-bottom: 1px solid var(--border-color);
}

.video-details {
    margin-bottom: clamp(1rem, 2.5vw, 2rem);
}

.video-title {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 clamp(0.5rem, 1.5vw, 1rem) 0;
    line-height: 1.3;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: clamp(0.5rem, 1.5vw, 1rem);
}

.instructor-info {
    display: flex;
    align-items: center;
    gap: clamp(0.5rem, 1.5vw, 1rem);
}

.instructor-avatar {
    width: clamp(36px, 6vw, 48px);
    height: clamp(36px, 6vw, 48px);
    border-radius: 50%;
    object-fit: cover;
}

.instructor-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.instructor-label {
    font-size: clamp(0.7rem, 1.2vw, 0.8rem);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.instructor-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: clamp(0.85rem, 1.5vw, 1rem);
}

.video-progress {
    display: flex;
    align-items: center;
    gap: clamp(0.5rem, 1.5vw, 1rem);
}

.progress-label {
    font-size: clamp(0.7rem, 1.2vw, 0.8rem);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.progress-indicator {
    display: flex;
    align-items: center;
    gap: clamp(0.5rem, 1vw, 0.75rem);
}

.progress-bar-small {
    width: clamp(60px, 10vw, 80px);
    height: clamp(4px, 0.8vw, 6px);
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.1);
}

.progress-fill-small {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color), #20c997); /* Gradiente atractivo */
    width: 0%;
    transition: var(--transition);
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.3); /* Efecto 3D sutil */
}

.progress-text {
    font-size: clamp(0.7rem, 1.2vw, 0.8rem);
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 30px;
}

/* Video Action Buttons */
.video-action-buttons {
    display: flex;
    gap: clamp(0.5rem, 1.5vw, 1rem);
    flex-wrap: wrap;
}

.video-action-buttons .btn {
    display: flex;
    align-items: center;
    gap: clamp(0.25rem, 1vw, 0.5rem);
    padding: clamp(0.5rem, 1.5vw, 0.75rem) clamp(0.75rem, 2vw, 1.5rem);
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-secondary);
    border-radius: var(--border-radius-sm);
    font-size: clamp(0.75rem, 1.5vw, 0.9rem);
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition-fast);
    cursor: pointer;
}

.video-action-buttons .btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.video-action-buttons .btn.favorited {
    background: var(--danger-color);
    border-color: var(--danger-color);
    color: white;
}

/* Course Description */
.course-description {
    padding: clamp(0.75rem, 2.5vw, 2rem);
}

.description-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: clamp(0.5rem, 1.5vw, 1rem);
}

.description-header h3 {
    font-size: clamp(0.95rem, 2vw, 1.2rem);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.toggle-description {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: clamp(0.25rem, 1vw, 0.5rem);
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
}

.toggle-description:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.description-content {
    max-height: 60px;
    overflow: hidden;
    transition: var(--transition);
}

.description-content.expanded {
    max-height: none;
}

.description-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    font-size: clamp(0.8rem, 1.5vw, 0.95rem);
}

/* Course Sidebar */
.course-sidebar {
    background: var(--bg-primary);
    border-radius: clamp(0.25rem, 1vw, var(--border-radius-lg));
    box-shadow: var(--shadow-md);
    height: fit-content;
    overflow: hidden;
    position: sticky;
    top: clamp(0.5rem, 1.5vw, 1rem);
}

@media (max-width: 768px) {
    .course-sidebar {
        border-radius: 0;
        position: static;
        top: auto;
    }
}

.sidebar-header {
    padding: clamp(1rem, 2.5vw, 2rem);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.course-progress-overview {
    display: flex;
    align-items: center;
    gap: clamp(0.75rem, 2vw, 1.5rem);
}

.progress-circle {
    position: relative;
    flex-shrink: 0;
}

.progress-ring {
    transform: rotate(-90deg);
    width: clamp(50px, 8vw, 60px);
    height: clamp(50px, 8vw, 60px);
}

.progress-ring-bg {
    fill: none;
    stroke: rgba(255,255,255,0.3);
    stroke-width: 3;
}

.progress-ring-fill {
    fill: none;
    stroke: white;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 157.08; /* 2 * π * 25 */
    stroke-dashoffset: 157.08;
    transition: stroke-dashoffset 0.5s ease;
}

.progress-percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(0.7rem, 1.2vw, 0.8rem);
    font-weight: 700;
}

.course-stats h4 {
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    font-weight: 600;
    margin: 0 0 clamp(0.25rem, 1vw, 0.5rem) 0;
    line-height: 1.3;
}

.course-metrics {
    font-size: clamp(0.75rem, 1.5vw, 0.9rem);
    opacity: 0.9;
    margin: 0;
}

/* Content Filters */
.content-filters {
    padding: clamp(0.75rem, 2vw, 1.5rem);
    border-bottom: 1px solid var(--border-color);
}

.search-container {
    position: relative;
    margin-bottom: clamp(0.5rem, 1.5vw, 1rem);
}

.search-input {
    width: 100%;
    padding: clamp(0.5rem, 1.5vw, 0.75rem) clamp(0.75rem, 2vw, 1rem) clamp(0.5rem, 1.5vw, 0.75rem) clamp(2rem, 4vw, 2.5rem);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(57, 150, 255, 0.1);
}

.search-icon {
    position: absolute;
    left: clamp(0.5rem, 1.5vw, 0.75rem);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: clamp(0.8rem, 1.5vw, 1rem);
}

.filter-buttons {
    display: flex;
    gap: clamp(0.25rem, 1vw, 0.5rem);
}

.filter-btn {
    flex: 1;
    padding: clamp(0.5rem, 1.5vw, 0.75rem) clamp(0.5rem, 1.5vw, 1rem);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: var(--border-radius-sm);
    font-size: clamp(0.7rem, 1.3vw, 0.8rem);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0.25rem, 0.8vw, 0.5rem);
}

.filter-btn:hover {
    background: var(--bg-tertiary);
}

.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Course Content */
.course-content-list {
    max-height: clamp(40vh, 60vh, 70vh);
    overflow-y: auto;
    padding-bottom: clamp(0.5rem, 1.5vw, 1rem);
}

.course-content-list {
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: var(--text-muted) var(--bg-secondary); /* Firefox */
    scroll-behavior: smooth; /* Smooth scrolling */
}

.course-content-list::-webkit-scrollbar {
    width: clamp(6px, 1vw, 8px);
}

.course-content-list::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

.course-content-list::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
    border: 2px solid var(--bg-secondary); /* Padding visual */
}

.course-content-list::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

.course-modules {
    padding: 0;
}

.course-module {
    border-bottom: 1px solid var(--border-color);
}

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

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(0.75rem, 2vw, 1.5rem);
    cursor: pointer;
    transition: var(--transition-fast);
    background: var(--bg-primary);
}

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

.module-info h4 {
    font-size: clamp(0.85rem, 1.6vw, 1rem);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
}

.module-count {
    font-size: clamp(0.7rem, 1.3vw, 0.8rem);
    color: var(--text-muted);
}

.module-toggle i {
    color: var(--text-secondary);
    transition: var(--transition-fast);
    font-size: clamp(0.8rem, 1.5vw, 1rem);
}

.course-module.active .module-toggle i {
    transform: rotate(180deg);
}

.module-content {
    background: var(--bg-secondary);
}

.content-item {
    display: flex;
    align-items: center;
    gap: clamp(0.5rem, 1.2vw, 0.75rem);
    padding: clamp(0.5rem, 1.5vw, 0.75rem) clamp(0.75rem, 1.5vw, 1rem);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition-fast);
    cursor: pointer;
    min-height: clamp(50px, 8vw, 60px);
    will-change: background-color, transform;
    position: relative;
}

.content-item:hover {
    background: var(--bg-tertiary);
    transform: translateX(2px);
}

.content-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: transparent;
    transition: var(--transition-fast);
}

.content-item:hover::before {
    background: var(--primary-color);
}

.content-item.active {
    background: rgba(57, 150, 255, 0.1);
    border-left: 3px solid var(--primary-color);
}

.item-icon {
    flex-shrink: 0;
}

.play-btn,
.material-btn {
    width: clamp(36px, 6vw, 44px);
    height: clamp(36px, 6vw, 44px);
    border: none;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    transition: var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.play-btn:hover,
.material-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.material-btn {
    background: var(--secondary-color);
}

.material-btn:hover {
    background: #5a6268;
}

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

.item-title {
    font-size: clamp(0.8rem, 1.5vw, 0.95rem);
    font-weight: 500;
    color: var(--text-primary);
    margin: 0 0 0.125rem 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}

.content-item.active .item-title {
    color: var(--primary-color);
    font-weight: 600;
}

.item-meta {
    font-size: clamp(0.7rem, 1.3vw, 0.8rem);
    color: var(--text-secondary);
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: clamp(0.25rem, 0.8vw, 0.5rem);
}

.item-status,
.item-actions {
    flex-shrink: 0;
}

.progress-indicator i.completed {
    color: var(--success-color);
    font-size: clamp(0.9rem, 1.6vw, 1.1rem);
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.progress-indicator i.pending {
    color: var(--text-secondary);
    font-size: clamp(0.9rem, 1.6vw, 1.1rem);
}

.action-btn.download-btn {
    width: clamp(28px, 5vw, 32px);
    height: clamp(28px, 5vw, 32px);
    font-size: clamp(0.7rem, 1.2vw, 0.8rem);
}

/* Video Navigation Controls */
.video-navigation-controls {
    display: flex;
    align-items: center;
    gap: clamp(0.5rem, 1.5vw, 1rem);
    padding: clamp(0.5rem, 1.5vw, 1rem) 0;
    margin: clamp(0.5rem, 1.5vw, 1rem) 0;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-secondary);
}

.video-navigation-progress {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: clamp(0.25rem, 0.8vw, 0.5rem);
    align-items: center;
}

.current-lesson-info {
    font-size: clamp(0.7rem, 1.3vw, 0.85rem);
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

.lesson-progress-bar {
    width: 100%;
    max-width: clamp(120px, 25vw, 200px);
    height: clamp(4px, 0.8vw, 6px);
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.lesson-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #2b7ce9);
    width: 0%;
    transition: var(--transition);
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.3);
}

.nav-btn {
    padding: clamp(0.4rem, 1vw, 0.5rem) clamp(0.6rem, 1.5vw, 1rem);
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0.25rem, 0.6vw, 0.4rem);
    min-width: clamp(80px, 12vw, 100px);
    font-size: clamp(0.75rem, 1.4vw, 0.9rem);
    box-shadow: var(--shadow-sm);
}

.nav-btn:hover:not(:disabled) {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .video-learning-container {
        padding: 0;
        gap: 0;
        grid-template-columns: 1fr;
        min-height: 100vh;
    }
    
    .video-wrapper {
        max-height: clamp(180px, 28vh, 280px);
        aspect-ratio: 16/9;
    }
    
    .course-content-list {
        max-height: clamp(35vh, 45vh, 55vh);
    }
    
    .video-header {
        padding: clamp(0.5rem, 2vw, 0.75rem) clamp(0.5rem, 2vw, 1rem);
        flex-direction: row;
        gap: clamp(0.25rem, 1.5vw, 0.75rem);
        align-items: center;
        flex-wrap: wrap;
    }
    
    .course-breadcrumb {
        font-size: clamp(0.7rem, 2vw, 0.85rem);
        flex: 1;
        min-width: 0;
    }
    
    .video-actions {
        flex-shrink: 0;
        gap: clamp(0.25rem, 1vw, 0.4rem);
    }
    
    .action-btn {
        width: clamp(30px, 7vw, 36px);
        height: clamp(30px, 7vw, 36px);
        font-size: clamp(0.75rem, 2vw, 0.9rem);
    }
    
    .current-video-info {
        padding: clamp(0.5rem, 2vw, 1rem);
    }
    
    .video-details {
        margin-bottom: clamp(0.5rem, 1.5vw, 0.75rem);
    }
    
    .video-title {
        font-size: clamp(0.95rem, 3vw, 1.25rem);
        line-height: 1.2;
        margin-bottom: clamp(0.4rem, 1.5vw, 0.75rem);
    }
    
    .instructor-info {
        gap: clamp(0.4rem, 1.5vw, 0.75rem);
    }
    
    .instructor-avatar {
        width: clamp(32px, 7vw, 40px);
        height: clamp(32px, 7vw, 40px);
    }
    
    .video-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: clamp(0.4rem, 1.5vw, 0.75rem);
    }
    
    .video-action-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: clamp(0.4rem, 1.5vw, 0.75rem);
        width: 100%;
    }
    
    .video-action-buttons .btn {
        padding: clamp(0.5rem, 2vw, 0.75rem) clamp(0.6rem, 2vw, 1rem);
        font-size: clamp(0.75rem, 2vw, 0.85rem);
        justify-content: center;
    }
    
    .video-action-buttons .btn i {
        font-size: clamp(0.8rem, 2vw, 1rem);
    }
    
    .course-description {
        padding: clamp(0.5rem, 2vw, 1rem);
    }
    
    .description-header h3 {
        font-size: clamp(0.85rem, 2.5vw, 1rem);
    }
    
    .description-content p {
        font-size: clamp(0.75rem, 2vw, 0.85rem);
        line-height: 1.5;
    }
    
    .sidebar-header {
        padding: clamp(0.6rem, 2vw, 1rem);
    }
    
    .course-progress-overview {
        flex-direction: row;
        text-align: left;
        gap: clamp(0.5rem, 2vw, 1rem);
        align-items: center;
    }
    
    .progress-ring {
        width: clamp(45px, 10vw, 55px);
        height: clamp(45px, 10vw, 55px);
    }
    
    .progress-percentage {
        font-size: clamp(0.65rem, 1.5vw, 0.75rem);
    }
    
    .course-stats h4 {
        font-size: clamp(0.85rem, 2.5vw, 1rem);
        margin-bottom: clamp(0.15rem, 0.8vw, 0.25rem);
    }
    
    .course-metrics {
        font-size: clamp(0.7rem, 2vw, 0.85rem);
    }
    
    .content-filters {
        padding: clamp(0.5rem, 2vw, 1rem);
    }
    
    .search-container {
        margin-bottom: clamp(0.4rem, 1.5vw, 0.75rem);
    }
    
    .search-input {
        font-size: 16px; /* Evitar zoom en iOS */
        padding: clamp(0.5rem, 2vw, 0.65rem) clamp(0.75rem, 2vw, 1rem) clamp(0.5rem, 2vw, 0.65rem) clamp(2rem, 5vw, 2.5rem);
    }
    
    .filter-buttons {
        gap: clamp(0.25rem, 1vw, 0.5rem);
        overflow-x: auto;
        padding-bottom: 0.25rem;
        -webkit-overflow-scrolling: touch;
    }
    
    .filter-btn {
        flex-shrink: 0;
        min-width: clamp(70px, 18vw, 80px);
        font-size: clamp(0.65rem, 1.8vw, 0.75rem);
        padding: clamp(0.4rem, 1.5vw, 0.5rem) clamp(0.5rem, 1.5vw, 0.75rem);
    }
    
    .filter-btn i {
        font-size: clamp(0.7rem, 1.8vw, 0.85rem);
    }
    
    .module-header {
        padding: clamp(0.6rem, 2vw, 1rem);
    }
    
    .module-info h4 {
        font-size: clamp(0.8rem, 2.2vw, 0.9rem);
    }
    
    .module-count {
        font-size: clamp(0.65rem, 1.8vw, 0.75rem);
    }
    
    .content-item {
        padding: clamp(0.5rem, 1.8vw, 0.75rem) clamp(0.6rem, 2vw, 0.75rem);
        min-height: clamp(48px, 10vw, 56px);
        gap: clamp(0.4rem, 1.5vw, 0.6rem);
    }
    
    .play-btn,
    .material-btn {
        width: clamp(32px, 8vw, 40px);
        height: clamp(32px, 8vw, 40px);
        font-size: clamp(0.75rem, 2vw, 0.9rem);
    }
    
    .item-title {
        font-size: clamp(0.75rem, 2.2vw, 0.9rem);
    }
    
    .item-meta {
        font-size: clamp(0.65rem, 1.8vw, 0.75rem);
    }
    
    .progress-indicator i {
        font-size: clamp(0.8rem, 2vw, 1rem);
    }
    
    .action-btn.download-btn {
        width: clamp(26px, 6vw, 30px);
        height: clamp(26px, 6vw, 30px);
        font-size: clamp(0.65rem, 1.5vw, 0.75rem);
    }
    
    .video-navigation-controls {
        padding: clamp(0.4rem, 1.5vw, 0.75rem);
        gap: clamp(0.4rem, 1.5vw, 0.75rem);
        flex-wrap: wrap;
        justify-content: center;
        margin: clamp(0.4rem, 1.5vw, 0.75rem) 0;
    }
    
    .video-navigation-progress {
        order: -1;
        width: 100%;
        margin-bottom: clamp(0.25rem, 1vw, 0.5rem);
    }
    
    .current-lesson-info {
        font-size: clamp(0.65rem, 1.8vw, 0.75rem);
    }
    
    .lesson-progress-bar {
        max-width: clamp(100px, 35vw, 150px);
        height: clamp(3px, 1vw, 4px);
    }
    
    .nav-btn {
        padding: clamp(0.5rem, 2vw, 0.75rem) clamp(0.6rem, 2vw, 1rem);
        font-size: clamp(0.75rem, 2vw, 0.9rem);
        min-width: clamp(90px, 22vw, 100px);
        gap: clamp(0.2rem, 1vw, 0.4rem);
    }
    
    .nav-btn i {
        font-size: clamp(0.7rem, 1.8vw, 0.85rem);
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .video-learning-container {
        padding: 0;
    }
    
    .video-section,
    .course-sidebar {
        border-radius: 0;
        margin: 0;
    }
    
    .video-header {
        padding: clamp(0.4rem, 1.5vw, 0.6rem) clamp(0.5rem, 2vw, 0.75rem);
    }
    
    .course-breadcrumb {
        font-size: clamp(0.65rem, 2.5vw, 0.75rem);
    }
    
    .breadcrumb-link i {
        font-size: clamp(0.7rem, 2vw, 0.8rem);
    }
    
    .video-actions {
        gap: clamp(0.2rem, 1vw, 0.3rem);
    }
    
    .action-btn {
        width: clamp(28px, 8vw, 32px);
        height: clamp(28px, 8vw, 32px);
        font-size: clamp(0.7rem, 2vw, 0.8rem);
    }
    
    .current-video-info {
        padding: clamp(0.4rem, 2vw, 0.75rem);
    }
    
    .video-details {
        margin-bottom: clamp(0.4rem, 2vw, 0.75rem);
    }
    
    .video-title {
        font-size: clamp(0.9rem, 3.5vw, 1.1rem);
        line-height: 1.2;
        margin-bottom: clamp(0.3rem, 1.5vw, 0.5rem);
    }
    
    .instructor-info {
        gap: clamp(0.3rem, 1.5vw, 0.5rem);
    }
    
    .instructor-avatar {
        width: clamp(28px, 8vw, 36px);
        height: clamp(28px, 8vw, 36px);
    }
    
    .instructor-label,
    .progress-label {
        font-size: clamp(0.6rem, 1.8vw, 0.7rem);
    }
    
    .instructor-name {
        font-size: clamp(0.75rem, 2.5vw, 0.85rem);
    }
    
    .video-meta {
        gap: clamp(0.3rem, 1.5vw, 0.5rem);
    }
    
    .progress-bar-small {
        width: clamp(50px, 15vw, 60px);
        height: clamp(3px, 1vw, 4px);
    }
    
    .progress-text {
        font-size: clamp(0.65rem, 2vw, 0.75rem);
    }
    
    .video-action-buttons {
        gap: clamp(0.3rem, 1.5vw, 0.5rem);
    }
    
    .video-action-buttons .btn {
        padding: clamp(0.4rem, 2vw, 0.6rem) clamp(0.5rem, 2vw, 0.8rem);
        font-size: clamp(0.7rem, 2.2vw, 0.8rem);
        gap: clamp(0.2rem, 1vw, 0.3rem);
    }
    
    .video-action-buttons .btn i {
        font-size: clamp(0.75rem, 2.2vw, 0.9rem);
    }
    
    .video-action-buttons .btn span {
        font-size: clamp(0.7rem, 2.2vw, 0.8rem);
    }
    
    .course-description {
        padding: clamp(0.4rem, 2vw, 0.75rem);
    }
    
    .description-header {
        margin-bottom: clamp(0.3rem, 1.5vw, 0.5rem);
    }
    
    .description-header h3 {
        font-size: clamp(0.8rem, 2.8vw, 0.95rem);
    }
    
    .toggle-description {
        padding: clamp(0.2rem, 1vw, 0.3rem);
    }
    
    .description-content p {
        font-size: clamp(0.7rem, 2.2vw, 0.8rem);
        line-height: 1.4;
    }
    
    .sidebar-header {
        padding: clamp(0.5rem, 2vw, 0.75rem);
    }
    
    .course-progress-overview {
        gap: clamp(0.4rem, 2vw, 0.75rem);
    }
    
    .progress-ring {
        width: clamp(40px, 12vw, 50px);
        height: clamp(40px, 12vw, 50px);
    }
    
    .progress-percentage {
        font-size: clamp(0.6rem, 2vw, 0.7rem);
    }
    
    .course-stats h4 {
        font-size: clamp(0.8rem, 3vw, 0.95rem);
        margin-bottom: clamp(0.1rem, 1vw, 0.2rem);
    }
    
    .course-metrics {
        font-size: clamp(0.65rem, 2.2vw, 0.75rem);
    }
    
    .content-filters {
        padding: clamp(0.4rem, 2vw, 0.75rem);
    }
    
    .search-container {
        margin-bottom: clamp(0.3rem, 1.5vw, 0.5rem);
    }
    
    .search-input {
        padding: clamp(0.45rem, 2vw, 0.6rem) clamp(0.6rem, 2vw, 0.8rem) clamp(0.45rem, 2vw, 0.6rem) clamp(1.8rem, 6vw, 2.2rem);
        font-size: 16px;
    }
    
    .search-icon {
        left: clamp(0.4rem, 1.5vw, 0.6rem);
        font-size: clamp(0.75rem, 2vw, 0.85rem);
    }
    
    .filter-buttons {
        gap: clamp(0.2rem, 1vw, 0.35rem);
    }
    
    .filter-btn {
        min-width: clamp(65px, 20vw, 75px);
        font-size: clamp(0.6rem, 2vw, 0.7rem);
        padding: clamp(0.35rem, 1.5vw, 0.45rem) clamp(0.4rem, 1.5vw, 0.6rem);
        gap: clamp(0.15rem, 0.8vw, 0.25rem);
    }
    
    .filter-btn i {
        font-size: clamp(0.65rem, 2vw, 0.75rem);
    }
    
    .module-header {
        padding: clamp(0.5rem, 2vw, 0.75rem);
    }
    
    .module-info h4 {
        font-size: clamp(0.75rem, 2.5vw, 0.85rem);
        margin-bottom: clamp(0.1rem, 0.8vw, 0.15rem);
    }
    
    .module-count {
        font-size: clamp(0.6rem, 2vw, 0.7rem);
    }
    
    .module-toggle i {
        font-size: clamp(0.7rem, 2vw, 0.85rem);
    }
    
    .content-item {
        padding: clamp(0.45rem, 2vw, 0.65rem) clamp(0.5rem, 2vw, 0.75rem);
        min-height: clamp(44px, 12vw, 52px);
        gap: clamp(0.3rem, 1.5vw, 0.5rem);
    }
    
    .play-btn,
    .material-btn {
        width: clamp(30px, 9vw, 36px);
        height: clamp(30px, 9vw, 36px);
        font-size: clamp(0.7rem, 2.2vw, 0.85rem);
    }
    
    .item-title {
        font-size: clamp(0.7rem, 2.5vw, 0.85rem);
        margin-bottom: clamp(0.05rem, 0.5vw, 0.1rem);
    }
    
    .item-meta {
        font-size: clamp(0.6rem, 2vw, 0.7rem);
        gap: clamp(0.2rem, 1vw, 0.35rem);
    }
    
    .progress-indicator i {
        font-size: clamp(0.75rem, 2.2vw, 0.9rem);
    }
    
    .action-btn.download-btn {
        width: clamp(24px, 7vw, 28px);
        height: clamp(24px, 7vw, 28px);
        font-size: clamp(0.6rem, 1.8vw, 0.7rem);
    }
    
    .video-navigation-controls {
        padding: clamp(0.35rem, 1.5vw, 0.5rem);
        gap: clamp(0.3rem, 1.5vw, 0.5rem);
        margin: clamp(0.3rem, 1.5vw, 0.5rem) 0;
    }
    
    .video-navigation-progress {
        margin-bottom: clamp(0.2rem, 1vw, 0.3rem);
    }
    
    .current-lesson-info {
        font-size: clamp(0.6rem, 2vw, 0.7rem);
    }
    
    .lesson-progress-bar {
        max-width: clamp(90px, 40vw, 130px);
        height: clamp(3px, 1.2vw, 4px);
    }
    
    .nav-btn {
        padding: clamp(0.4rem, 2vw, 0.6rem) clamp(0.5rem, 2vw, 0.8rem);
        font-size: clamp(0.7rem, 2.2vw, 0.85rem);
        min-width: clamp(40px, 12vw, 50px);
        gap: clamp(0.15rem, 1vw, 0.3rem);
    }
    
    .nav-btn span {
        display: none;
    }
    
    .nav-btn i {
        font-size: clamp(0.65rem, 2vw, 0.8rem);
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
button:focus-visible,
.content-item:focus-visible,
.filter-btn:focus-visible,
input:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --text-muted: #000000;
    }
}
