:root {
    /* Educational Color Theme - Trustworthy Blues & Clean Whites */
    --primary-color: #0d47a1; /* Deep Blue */
    --primary-light: #5472d3;
    --primary-dark: #002171;
    --secondary-color: #fca311; /* Accents */
    
    --bg-main: #f5f7fa; /* Very light blue/gray background */
    --bg-card: #ffffff;
    --bg-sidebar: #002171;
    
    --text-main: #333333;
    --text-muted: #6b7280;
    --text-light: #ffffff;
    
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    
    --radius-md: 12px;
    --radius-lg: 16px;
    
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Layout Core */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    z-index: 100;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    box-shadow: var(--shadow-lg);
}

.sidebar-header {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background-color: rgba(0,0,0,0.15);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.logo i {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.mobile-close-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.25rem;
    cursor: pointer;
}

.sidebar-menu-title {
    padding: 24px 24px 8px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.5);
    font-weight: 600;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border-left: 4px solid transparent;
}

.nav-item:hover {
    background-color: rgba(255,255,255,0.05);
    color: var(--text-light);
}

.nav-item.active {
    background-color: rgba(255,255,255,0.1);
    color: var(--text-light);
    border-left-color: var(--secondary-color);
    font-weight: 500;
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.sidebar-footer {
    padding: 24px;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
    text-align: center;
    background-color: rgba(0,0,0,0.1);
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-header {
    height: 80px;
    background-color: var(--bg-card);
    display: flex;
    align-items: center;
    padding: 0 32px;
    box-shadow: var(--shadow-sm);
    gap: 20px;
    position: sticky;
    top: 0;
    z-index: 50;
}

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

.header-title h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-dark);
}

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

.content-wrapper {
    flex: 1;
    padding: 32px;
    position: relative;
}

/* State Management */
.state-container {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.state-container.active {
    display: block;
}

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

/* Welcome State */
.welcome-card {
    max-width: 600px;
    margin: 40px auto;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 48px 32px;
    text-align: center;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.welcome-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: rgba(13, 71, 161, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 8px;
}

.welcome-card h2 {
    color: var(--primary-dark);
    font-size: 1.8rem;
}

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

.primary-btn {
    background-color: var(--primary-color);
    color: var(--text-light);
    border: none;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 6px rgba(13, 71, 161, 0.2);
}

.primary-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(13, 71, 161, 0.3);
}

/* Course Container Grid */
.course-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 1024px) {
    .course-container {
        grid-template-columns: 3fr 2fr;
    }
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.glass {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.video-header, .transcription-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(245, 247, 250, 0.5);
}

.video-header h2, .transcription-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background-color: #000;
}

.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.transcription-section {
    max-height: calc(100vh - 160px);
}

.transcription-content {
    padding: 24px;
    overflow-y: auto;
    font-size: 0.95rem;
    line-height: 1.8;
    color: #4b5563;
    flex: 1;
}

.transcription-content p {
    margin-bottom: 16px;
}

/* Transcripción Step Styling */
.step-item {
    background: #f8fafc;
    border-left: 3px solid var(--primary-color);
    padding: 12px 16px;
    margin-bottom: 12px;
    border-radius: 0 8px 8px 0;
}
.step-first {
    font-weight: bold;
    color: var(--primary-dark);
    font-size: 1.05rem;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
}

.btn-icon:hover {
    background-color: var(--bg-main);
    color: var(--primary-color);
}

/* Overlay */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 90;
    backdrop-filter: blur(3px);
}

/* Responsive Design */
@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

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

    .overlay.active {
        display: block;
    }
    
    .course-container {
        grid-template-columns: 1fr;
    }
    
    .transcription-section {
        max-height: 500px; /* limit height on mobile */
    }
}

@media (max-width: 480px) {
    .content-wrapper {
        padding: 16px;
    }
    
    .top-header {
        padding: 0 16px;
    }
    
    .welcome-card {
        padding: 32px 24px;
    }
}
.summary-wrapper {
    padding: 24px;
    border-top: 1px solid var(--border-color);
    background: #f8fafc;
}

.summary-wrapper h3 {
    font-size: 1.05rem;
    color: var(--primary-dark);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.summary-wrapper p {
    font-size: 0.95rem;
    color: #4b5563;
    line-height: 1.6;
}
.course-container.no-video {
    grid-template-columns: 1fr;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('IMG/IMG%20GENERAL.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    opacity: 0.08; /* Efecto fondo de agua suave */
    z-index: -1; /* Para que quede de fondo atrás de todo */
    pointer-events: none; /* Evita que bloquee los clics repeliendo el cursor */
}

/* Make sure the main content is somewhat transparent or looks good on top */
/* La clase .glass ya tiene transparencia, lo que es genial para los fondos de agua */
