@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&family=Roboto:wght@400;700&family=Inter:wght@400;600;700&family=Outfit:wght@400;700&display=swap');

:root {
    --primary: #4EA146 !important;
    /* Verde Oficial Gesinne */
    --secondary: #0059a4 !important;
    /* Azul Técnico Gesinne - Updated to match official blue better */
    --accent-orange: #F39200;
    --bg-dark: #FFFFFF !important;
    --sidebar-bg: #FFFFFF !important;
    --glass: rgba(0, 0, 0, 0.04);
    --glass-border: #E5E7EB;
    --text-main: #1F2937 !important;
    --text-muted: #6B7280 !important;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --bg-gradient-start: #F9FAFB !important;
    --bg-gradient-end: #F3F4F6 !important;
    --header-bg: rgba(255, 255, 255, 0.98) !important;
}

/* Manual Subtitle Class */
.manual-subtitle {
    color: var(--secondary) !important;
    font-size: 1.1rem;
    margin-top: 15px;
    margin-bottom: 5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 5px;
}

/* Base theme is now light by default */

/* Force light theme always */
body {
    background-color: var(--bg-dark) !important;
    color: var(--text-main) !important;
}

.content-header {
    background: var(--header-bg) !important;
    border-bottom: 2px solid rgba(78, 161, 70, 0.1) !important;
    /* Subtle green border instead of grey */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.breadcrumb {
    color: #4b5563;
}

.btn-secondary {
    background: #FFFFFF;
    border-color: #E5E7EB;
    color: #374151;
}

.breadcrumb {
    color: #4b5563;
}

.welcome-text h1 {
    color: var(--secondary);
}

.catalog-hero {
    background: linear-gradient(135deg, #f0f7f0 0%, #f0f4f8 100%) !important;
    position: relative;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.catalog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('hero_final.png');
    background-size: 150% auto;
    /* Zoom in to cover the whole width with pattern */
    background-position: center;
    opacity: 0.25;
    /* Slightly more visible */
    mix-blend-mode: color-burn;
    /* Better for showing tech lines on light bg */
    pointer-events: none;
    display: block !important;
}

.catalog-hero {
    background: linear-gradient(135deg, #eef5ee 0%, #eef2f6 100%) !important;
    border: 1px solid rgba(78, 161, 70, 0.15);
}

.hero-title {
    color: #1a1a1a !important;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    position: relative;
    /* Ensure it stays above the ::before */
}

.hero-subtitle {
    color: #374151 !important;
    position: relative;
}

.course-card {
    background: #FFFFFF;
    border-color: #E5E7EB;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.course-card:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.course-tag {
    background: var(--primary);
    color: white;
}

.featured-tag {
    background: #ffcc00;
    color: #000;
}

.locked-tag {
    background: #E5E7EB;
    color: #9CA3AF;
}

.course-difficulty {
    background: rgba(0, 0, 0, 0.05);
    color: #4B5563;
}

.topic-tag {
    background: #F3F4F6;
    color: #6B7280;
}

.course-card:hover .topic-tag {
    background: rgba(78, 161, 70, 0.1);
    color: var(--primary);
}

.status-tag.in-progress {
    background: #ffcc00;
    color: #000;
}

.lock-overlay {
    background: rgba(255, 255, 255, 0.6);
    color: rgba(0, 0, 0, 0.2);
}

.hero-title,
.hero-subtitle,
.view-header h1,
.view-header p {
    color: var(--text-main) !important;
}

.search-container input {
    color: var(--text-main);
}

.hero-badge {
    background: rgba(78, 161, 70, 0.1);
    color: var(--primary);
}

.search-container i,
.search-container input::placeholder {
    color: var(--text-muted);
}

.course-card h3 {
    color: var(--text-main);
}

.course-card p {
    color: var(--text-muted);
}

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

/* Custom Scrollbar for a Premium Look */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
    transition: var(--transition);
}

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

body {
    font-family: 'Lato', 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow: hidden;
    height: 100vh;
}

/* Login Styling */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f3f4f6 url('hero_final.png') no-repeat center center;
    background-size: cover;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 2rem;
}

.login-hero-text {
    text-align: center;
    color: #ffffff;
    max-width: 850px;
    margin-bottom: 3rem;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
}

.login-hero-text h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.login-hero-text p {
    font-size: 1.1rem;
    line-height: 1.6;
    font-weight: 400;
}

.login-box {
    background: #ffffff;
    padding: 3rem;
    border-radius: 12px;
    border: none;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.login-logo {
    max-width: 180px;
    margin-bottom: 2rem;
}

.login-box h2 {
    color: #333333;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.input-group {
    text-align: left;
    margin-bottom: 1rem;
}

.input-group input {
    width: 100%;
    background: #ffffff;
    border: 1px solid #d1d5db;
    padding: 1rem;
    border-radius: 8px;
    color: #333333;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
    cursor: text;
    position: relative;
    z-index: 1001;
}

.input-group input:focus {
    border-color: var(--primary);
    background: rgba(78, 161, 70, 0.1);
    box-shadow: 0 0 0 2px rgba(78, 161, 70, 0.2);
}

.login-footer {
    margin-top: 2rem;
    font-size: 0.85rem;
}

.login-footer a {
    color: var(--primary);
    text-decoration: none;
}


/* Elegant Theme & Play Buttons */
.theme-toggle-btn,
.audio-control-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    cursor: pointer;
    font-size: 1.1rem;
}

.theme-toggle-btn.fixed-top-right {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10001;
    backdrop-filter: blur(10px);
    background: var(--glass);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.theme-toggle-btn:hover,
.audio-control-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

/* Form Groups & Inputs */
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-input {
    width: 100%;
    height: 45px;
    padding: 0 1rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-main);
    transition: var(--transition);
}

.form-input:focus {
    border-color: var(--primary);
    outline: none;
    background: rgba(255, 255, 255, 0.05);
}

/* Switch Component */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 3px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked+.slider {
    background-color: var(--primary);
}

input:focus+.slider {
    box-shadow: 0 0 1px var(--primary);
}

input:checked+.slider:before {
    -webkit-transform: translateX(24px);
    -ms-transform: translateX(24px);
    transform: translateX(24px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.profile-info-item {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

[data-theme="never-match"] .profile-info-item {
    background: rgba(255, 255, 255, 0.02);
}

.theme-toggle-btn:hover i {
    color: var(--primary);
    transform: rotate(15deg);
}

.theme-toggle-btn.fixed-top-right:hover {
    background: var(--glass);
    border-color: var(--primary);
}

.audio-control-btn.playing {
    color: var(--primary);
    border-color: var(--primary);
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% {
        box-shadow: 0 0 0 0 rgba(78, 161, 70, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(78, 161, 70, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(78, 161, 70, 0);
    }
}

h1,
h2,
h3 {
    font-family: 'Outfit', sans-serif;
}

/* App Layout */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sidebar Styling */
.sidebar {
    width: 320px;
    height: 100vh;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    flex-shrink: 0;
    position: sticky;
    top: 0;
}

.sidebar-scroll-area {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 2rem;
    min-height: 0;
}

/* Scrollbar styling for sidebar */
.sidebar-scroll-area::-webkit-scrollbar {
    width: 4px;
}

.sidebar-scroll-area::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

.sidebar-scroll-area::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.logo-container {
    padding: 0 1rem 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Centrado horizontal */
    text-align: center;
    gap: 0.8rem;
}

.brand-logo {
    width: 90%;
    max-width: 220px;
    height: auto;
    filter: brightness(1.1) contrast(1.1);
}

.academy-tag {
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 5px;
    color: var(--primary);
    font-weight: 700;
    opacity: 0.9;
}

.sidebar-section {
    padding: 1rem 0;
    border-bottom: 1px solid var(--glass-border);
}

.section-title {
    padding: 0 2rem 0.8rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
}

.main-nav ul,
.module-nav ul {
    list-style: none;
    padding: 0 1rem;
}

.nav-main-item,
.nav-item {
    padding: 0.8rem 1.2rem;
    margin-bottom: 0.4rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.nav-main-item:hover,
.nav-item:hover {
    background: var(--glass);
}

.nav-main-item.active {
    background: rgba(78, 161, 70, 0.15);
    color: var(--primary);
}

.nav-main-item .icon {
    font-size: 1.2rem;
}

.nav-item {
    padding: 1rem 1.5rem;
    margin-bottom: 0.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    position: relative;
}

.speaker-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    margin-left: auto;
    transition: var(--transition);
    z-index: 10;
}

.speaker-btn:hover {
    color: var(--primary);
    transform: scale(1.2);
}

.speaker-btn.active {
    color: var(--primary);
}

.nav-item:hover {
    background: var(--glass);
    border-color: var(--glass-border);
}

.nav-item.active {
    background: rgba(78, 161, 70, 0.1);
    border-color: rgba(78, 161, 70, 0.3);
}

.module-number {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
}

.active .module-number {
    color: var(--primary);
}

.module-title {
    font-size: 0.95rem;
    font-weight: 500;
}

/* Locked State for Sidebar */
.nav-item.locked,
.nav-test.locked {
    opacity: 0.4 !important;
    pointer-events: none !important;
    cursor: default !important;
    filter: grayscale(1);
}

.nav-item.locked:hover,
.nav-test.locked:hover {
    background: transparent !important;
    border-color: transparent !important;
}

.nav-test {
    display: none !important;
    /* Hidden by default */
    padding: 0.6rem 1.2rem 0.6rem 3.5rem;
    margin-bottom: 0.8rem;
    border-radius: 8px;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-muted);
    font-size: 0.85rem;
    border-left: 2px solid transparent;
}

/* Show only when the chapter is active */
.nav-item.active+.nav-test {
    display: flex !important;
    animation: fadeInSlide 0.4s ease forwards;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-test:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--secondary);
    border-left-color: var(--secondary);
}

.nav-test .test-icon {
    font-size: 1rem;
}

.user-progress {
    padding: 2rem;
    border-top: 1px solid var(--glass-border);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
    color: var(--text-muted);
}

.progress-bar-container {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #8bc34a);
    transition: width 1s ease;
}

/* Main Content Styling */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at top right, var(--bg-gradient-start), var(--bg-gradient-end));
    overflow-y: auto;
}

.content-header {
    height: 45px;
    /* Super compact */
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--header-bg);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.breadcrumb {
    font-size: 0.75rem;
    /* Smaller */
    color: var(--text-muted);
}

#current-breadcrumb {
    color: var(--text-main);
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

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

.btn-primary:hover {
    background: #438a3c;
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--glass);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

/* Catalog View Styling */
/* Catalog View Styling */
.catalog-area {
    padding: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    overflow-y: auto;
    height: 100vh;
}

/* Catalog Hero Section */
.catalog-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(78, 161, 70, 0.15) 0%, var(--bg-dark) 100%);
    border-radius: 30px;
    padding: 4rem;
    margin-bottom: 4rem;
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
    gap: 3rem;
}

.catalog-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(78, 161, 70, 0.1) 0%, transparent 70%);
    z-index: 0;
}

.catalog-hero-content {
    flex: 1;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(78, 161, 70, 0.2);
    color: var(--primary);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(78, 161, 70, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 600px;
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    gap: 3rem;
}

.hero-stat-item {
    display: flex;
    flex-direction: column;
}

.hero-stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.hero-stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 0.5rem;
}

.catalog-hero-image {
    flex: 0.4;
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
}

.catalog-hero-image img {
    width: 100%;
    max-width: 400px;
    filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.5));
    border-radius: 20px;
}

.view-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
}

/* Course Cards Grid */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 3rem;
}

.course-card {
    background: var(--bg-dark);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    position: relative;
}

.course-card:hover {
    transform: translateY(-12px);
    border-color: var(--primary);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.course-card-header {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 3;
}

.course-tag {
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.featured-tag {
    background: #ffcc00;
    color: #000;
}

.locked-tag {
    background: #444;
    color: #ccc;
}

.course-difficulty {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.course-card-image {
    height: 240px;
    overflow: hidden;
    position: relative;
}

.course-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.course-card:hover .course-card-image img {
    transform: scale(1.1);
}

.course-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    display: flex;
    justify-content: flex-end;
}

.course-duration {
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.course-card-content {
    padding: 2.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.course-card-content h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    line-height: 1.2;
}

.course-card-content p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.course-features {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.course-feature {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: #ccc;
    font-weight: 600;
}

.course-feature i {
    color: var(--primary);
    font-size: 1rem;
}

.course-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 2.5rem;
}

.topic-tag {
    background: rgba(255, 255, 255, 0.05);
    color: #888;
    padding: 0.4rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.course-card:hover .topic-tag {
    background: rgba(78, 161, 70, 0.1);
    color: var(--primary);
}

.btn-course-start {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1.2rem;
    font-size: 1.1rem;
    font-weight: 800;
}

.course-card.locked {
    opacity: 0.9;
}

.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.3);
    z-index: 2;
}

.course-card.locked .course-card-content {
    opacity: 0.6;
}

.course-coming-soon {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    color: #666;
    border-radius: 12px;
    font-weight: 700;
}

.course-features.disabled i {
    color: #555;
}

/* Learning Area Adjustments */
.learning-area {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
    /* Scroll moved here for right-edge alignment */
}

.learning-container {
    padding: 0.2rem 1rem 5rem 1rem;
    /* Added bottom padding for breathing room */
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 45px);
    overflow-y: auto;
}

.video-container {
    width: 95%; 
    margin: 0 auto; 
    aspect-ratio: 16/9;
    max-height: calc(100vh - 180px);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.2); 
    background: #000; 
    padding: 0; 
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-container {
    position: relative;
    width: 100%;
    height: calc(100vh - 100px);
    /* Taller slides */
    min-height: 600px;
    margin: 0 auto;
    border-radius: 20px;
    overflow: visible;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    background: #ffffff; /* Fondo blanco para mayor visibilidad */
    display: flex;
}

.media-view {
    display: none;
    width: 100%;
    height: 100%;
    background: #000; /* Force black to prevent white gaps on rounded corners */
}

.media-view.active {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: #000; /* Cinematic consistency */
}

/* Tabs */
.media-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    /* Reduced from 1.5rem */
}

.tab-btn {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

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

/* Slides Viewer */
.slides-viewer {
    width: 100%;
    height: 100%;
    background: #fdfdfd;
    /* Lighter slide background */
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    overflow: visible;
}

.slide-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Changed from center to start top-down */
    align-items: center;
    text-align: left;
    animation: fadeIn 0.4s ease;
    overflow-y: auto;
    /* Allow internal scroll if content too tall */
    height: calc(100% - 60px);
    position: relative;
    padding: 0;
}

/* Add padding back for standard slides only */
.slide-content> :not(.gesinne-slide-wrapper) {
    padding-left: 3rem;
    padding-right: 3rem;
}

.slide-content>.slide-header {
    padding-top: 2rem;
}


.slide-header {
    width: 100%;
    border-bottom: 1px solid var(--primary);
    padding-bottom: 0.4rem;
    margin-bottom: 1rem;
}

.slide-title {
    font-size: 1.4rem;
    /* Reducido */
    color: var(--primary);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0.4rem;
}

.slide-body {
    width: 100%;
    font-size: 0.95rem;
    /* Reducido */
    line-height: 1.3;
    color: var(--text-main);
}

.slide-list li {
    margin-bottom: 0.3rem;
    padding-left: 1.6rem;
    position: relative;
    font-size: 0.9rem;
    /* Reducido */
}

.slide-list li::before {
    content: "✔";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.slide-layout-title {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-grow: 1;
    width: 100%;
}

.title-centered {
    font-size: 2rem !important;
    margin-bottom: 1rem;
}

.slide-subtitle {
    font-size: 1.2rem;
    opacity: 0.7;
    margin-bottom: 2rem;
}

.col-text {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.col-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.point-link {
    color: var(--text-main);
    text-decoration: none;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
    display: inline-block;
    cursor: pointer;
}

.point-link:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
    transform: translateX(5px);
}

.highlight-section {
    animation: highlightFade 2s ease;
}

@keyframes highlightFade {
    0% {
        background: rgba(78, 161, 70, 0.3);
        color: white;
        padding: 5px;
        border-radius: 5px;
    }

    100% {
        background: transparent;
        color: inherit;
        padding: 0;
    }
}

.slides-nav-center {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.btn-fullscreen {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.2rem;
}

.btn-fullscreen:hover {
    background: var(--primary);
    transform: scale(1.1);
}

/* Fix for Fullscreen API */
.slides-viewer:fullscreen {
    padding: 0;
    border-radius: 0;
    justify-content: space-between;
}

.slides-viewer:fullscreen .slide-content {
    padding: 5rem 10rem;
}

.slides-viewer:fullscreen .slide-title {
    font-size: 4rem;
}

.slides-viewer:fullscreen .slide-body,
.slides-viewer:fullscreen .slide-list li {
    font-size: 2.2rem;
}

.slides-viewer:fullscreen .slide-highlight-box p {
    font-size: 1.5rem;
}

.slide-layout-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: center;
    width: 100%;
    flex-grow: 1;
    min-height: 0;
    /* Permite que el grid se encoja */
}

.slide-visual {
    max-width: 100%;
    max-height: 180px;
    /* Reducido sustancialmente */
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}


.slide-list {
    list-style: none;
    margin-top: 0.5rem;
}

.slide-list li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.95rem;
}

.slide-list li::before {
    content: "✔";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.slide-quote {
    font-size: 1.4rem;
    font-style: italic;
    color: var(--text-muted);
    border-left: 3px solid var(--secondary);
    padding-left: 1.2rem;
    margin: 1rem 0;
}

.slide-highlight-box {
    background: rgba(46, 204, 113, 0.05);
    border: 1px solid rgba(46, 204, 113, 0.2);
    padding: 1.5rem;
    border-radius: 16px;
    margin: 2rem 0;
    width: 100%;
}

.note-label {
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 900;
    font-size: 0.7rem;
    display: block;
    margin-bottom: 0.3rem;
}

.slide-highlight-box p {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}




.slides-controls {
    height: 60px;
    background: var(--bg-dark);
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--glass-border);
    position: relative;
    z-index: 20;
}

.btn-slide {
    background: var(--primary);
    border: none;
    padding: 0.6rem 2rem;
    border-radius: 10px;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-slide:hover:not(:disabled) {
    background: var(--secondary);
    transform: translateY(-2px);
}

.btn-slide:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

#slide-number {
    font-size: 0.9rem;
    color: var(--text-muted);
}


.content-details {
    margin-top: 3rem;
}

.content-details h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.content-details p {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.key-points {
    background: var(--glass);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

.key-points h3 {
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.key-points ul {
    list-style: none;
}

.key-points li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
    font-size: 1.05rem;
}

.key-points li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary);
}

.manual-accordion {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.manual-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
    transition: var(--transition);
}

.manual-item.active {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(78, 161, 70, 0.4);
}

.manual-header {
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--primary);
    font-size: 1.1rem;
    user-select: none;
}

.manual-header:hover {
    background: rgba(255, 255, 255, 0.02);
}

.toggle-icon {
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--text-muted);
}

.manual-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    padding: 0 1.5rem;
}

.manual-item.active .manual-content {
    padding-bottom: 1.5rem;
}

.manual-content p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.manual-content ul {
    padding-left: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.manual-content li {
    margin-bottom: 0.5rem;
}

.highlight-quote {
    font-style: italic;
    font-size: 1.1rem;
    color: var(--secondary);
    border-left: 3px solid var(--secondary);
    padding-left: 1rem;
}

.resource-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    cursor: pointer;
    transition: var(--transition);
}

.card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(10px);
}

.card-icon {
    font-size: 2rem;
}

.card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.card p {
    font-size: 0.85rem;
    margin-bottom: 0;
}

/* Modal & Quiz Styling */
/* Modal & Quiz Styling - Rediseñado para Gesinne */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: #ffffff;
    width: 95%;
    max-width: 650px;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 2.5rem;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    animation: modalIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    color: #1a1a1a;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.modal-header h2 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--secondary);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-close:hover {
    background: var(--accent-orange);
    color: white;
    transform: rotate(90deg);
}

.question-count {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    display: block;
}

#question-text {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.6rem;
    line-height: 1.3;
    color: var(--secondary); /* Azul Gesinne */
    margin-bottom: 2.5rem;
}

.options-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option-btn {
    background: #ffffff !important;
    border: 2px solid #e2e8f0 !important;
    padding: 1.2rem 1.5rem;
    border-radius: 12px;
    color: #1f2937 !important; /* Gris casi negro muy legible */
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.option-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    transform: translateX(5px);
}

.option-btn.correct {
    background: rgba(78, 161, 70, 0.2);
    border: 2px solid var(--primary);
    color: #064e3b !important; /* Verde oscuro legible */
}

.option-btn.wrong {
    background: rgba(243, 146, 0, 0.2);
    border: 2px solid var(--accent-orange);
    color: #7c2d12 !important; /* Rojo Marrón intenso legible */
}

#result-area {
    text-align: center;
    padding: 1rem 0;
    animation: fadeIn 0.8s ease;
}

.result-icon {
    font-size: 6rem;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.2));
}

#result-area h2 {
    font-size: 2.2rem;
    margin-bottom: 1.2rem;
    color: var(--primary); /* Verde Gesinne */
    font-weight: 700;
}

/* Gesinne Corporate Slide Styles (Custom) */
.gesinne-slide-wrapper {
    width: 100%;
    min-height: 100%;
    /* Changed from height:100% to allow expansion */
    background-color: #ffffff;
    color: #333333;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Ensure it starts at the top */
    position: relative;
    padding: 20px 40px;
    /* Reduced from 40px 60px */
}

.gesinne-slide-wrapper * {
    font-family: 'Roboto', sans-serif;
}

.gesinne-logo-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.gesinne-logo-main {
    display: flex;
    align-items: center;
    font-family: 'Rajdhani', sans-serif;
    font-size: 38px;
    /* Reduced from 54px */
    font-weight: 700;
    line-height: 0.8;
    letter-spacing: -1px;
    text-transform: uppercase;
    color: #7a7a7a;
}

.gesinne-l-green {
    color: #67a52e;
}

.gesinne-char-i-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 1px;
    position: relative;
    top: -1px;
}

.gesinne-i-dot {
    width: 5px;
    height: 5px;
    background-color: #7a7a7a;
    margin-bottom: 3px;
}

.gesinne-i-body {
    width: 5px;
    height: 20px;
    background-color: #7a7a7a;
}

.gesinne-n-mirror {
    display: inline-block;
    transform: scaleX(-1);
    margin-left: 1px;
}

.gesinne-logo-tagline {
    font-family: 'Rajdhani', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #7a7a7a;
    text-transform: uppercase;
    letter-spacing: 6.3px;
    margin-top: 6px;
    width: 100%;
}

.gesinne-slide-header {
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gesinne-slide-content {
    flex: 1;
    padding: 0 60px 40px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.gesinne-title-h2 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 42px;
    color: #333333;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.gesinne-accent-line {
    width: 60px;
    height: 4px;
    background: #67a52e;
    margin-bottom: 30px;
}

.gesinne-bullet-list {
    list-style: none;
}

.gesinne-bullet-item {
    font-size: 24px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    font-weight: 500;
    color: #444;
}

.gesinne-bullet-item i {
    color: #67a52e;
    margin-right: 20px;
    font-size: 28px;
    width: 30px;
    text-align: center;
}

.gesinne-hero-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 44px;
    /* Reduced from 52px */
    font-weight: 700;
    color: #1a1a1a;
    margin: 20px 0 15px 0;
    text-transform: uppercase;
    line-height: 1.1;
    text-align: center;
}

.gesinne-big-quote {
    font-family: 'Rajdhani', sans-serif;
    font-size: 48px;
    /* Reduced from 60px */
    font-weight: 700;
    color: #333333;
    line-height: 1.1;
    text-align: center;
}

.gesinne-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.gesinne-card-icon {
    background: #f9f9f9;
    padding: 30px 15px;
    text-align: center;
    border-bottom: 4px solid #67a52e;
}

.gesinne-card-icon i {
    font-size: 40px;
    color: #67a52e;
    margin-bottom: 15px;
}

.gesinne-card-icon h3 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 20px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.gesinne-normativa-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.gesinne-n-col {
    padding: 30px;
    background: #f4f4f4;
    border-radius: 4px;
}

.gesinne-n-col.gesinne-active {
    background: #eff6e9;
    border: 1px solid #67a52e;
}

.gesinne-footer-note {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    font-size: 12px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Redefine slides-viewer to allow white slides if needed */
.gesinne-white-slide {
    background: white !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* --- COMPONENTES ESPECÍFICOS MÓDULO 5 --- */
.gesinne-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.gesinne-process-step {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 20px;
    border-left: 4px solid #67a52e;
    background: #f9f9f9;
    margin-bottom: 15px;
}

.gesinne-process-step i {
    font-size: 30px;
    color: #67a52e;
    width: 40px;
    text-align: center;
}

.gesinne-process-step h3 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 20px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.gesinne-process-step p {
    font-size: 14px;
    margin: 0;
}

.gesinne-vs-box {
    padding: 30px;
    border-radius: 8px;
    text-align: center;
}

.gesinne-vs-box.product {
    border: 2px solid #eee;
    color: #888;
}

.gesinne-vs-box.service {
    border: 2px solid #67a52e;
    background: #fcfcfc;
}

.gesinne-timeline-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin-top: 50px;
    width: 100%;
    padding: 0 40px;
}

.gesinne-timeline-line {
    position: absolute;
    top: 50%;
    left: 40px;
    right: 40px;
    height: 2px;
    background: #eee;
    z-index: 1;
}

.gesinne-timeline-point {
    width: 20px;
    height: 20px;
    background: white;
    border: 4px solid #67a52e;
    border-radius: 50%;
    position: relative;
    z-index: 2;
}

.gesinne-status-tag {
    font-family: 'Rajdhani';
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    display: inline-block;
}

/* --- COMPONENTES ESPECÍFICOS MÓDULO 6 --- */
.gesinne-case-card {
    padding: 25px;
    background: #f9f9f9;
    border-bottom: 4px solid #ddd;
    text-align: center;
    transition: all 0.3s ease;
}

.gesinne-case-card.active {
    border-color: #67a52e;
    background: #f0f7e9;
}

.gesinne-case-card i {
    font-size: 36px;
    margin-bottom: 15px;
    color: #7a7a7a;
}

.gesinne-case-card.active i {
    color: #67a52e;
}

.gesinne-quote-container {
    background: #f4f4f4;
    padding: 40px 60px;
    border-radius: 20px;
    position: relative;
    margin-top: 20px;
}

.gesinne-quote-icon {
    position: absolute;
    top: -25px;
    left: 40px;
    font-size: 50px;
    color: #67a52e;
    background: white;
    padding: 0 12px;
}

.gesinne-comparison-label {
    font-family: 'Rajdhani';
    font-weight: 700;
    padding: 5px 15px;
    border-radius: 4px;
    font-size: 14px;
    display: inline-block;
    margin-bottom: 15px;
}

/* --- COMPONENTES ESPECÍFICOS MÓDULO 7 --- */
.gesinne-summary-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
}

.gesinne-summary-item {
    background: #f8f9fa;
    padding: 20px;
    border-left: 5px solid #67a52e;
    font-family: 'Rajdhani';
    font-size: 22px;
    font-weight: 600;
    color: #444;
}

.gesinne-binary-box {
    display: flex;
    gap: 30px;
    width: 100%;
}

.gesinne-binary-col {
    flex: 1;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
}

.gesinne-box-norma {
    border: 2px solid #ddd;
}

.gesinne-box-optimo {
    background: #67a52e;
    color: white;
}

.gesinne-step-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #f0f7e9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px auto;
    border: 2px solid #67a52e;
}

.gesinne-step-num {
    font-family: 'Rajdhani';
    font-weight: 700;
    color: #67a52e;
    font-size: 20px;
}

.gesinne-final-quote {
    font-family: 'Rajdhani';
    font-size: 42px;
    font-weight: 700;
    line-height: 1.1;
    color: #1a1a1a;
    text-transform: uppercase;
    text-align: center;
}

/* --- ESTILOS DE TILES (CAPÍTULO 8) --- */
.gesinne-tiled-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.gesinne-tile {
    background: #f8f8f8;
    padding: 25px 15px;
    border-bottom: 3px solid #67a52e;
    text-align: center;
}

.gesinne-tile i {
    font-size: 32px;
    color: #67a52e;
    margin-bottom: 15px;
    display: block;
}

.gesinne-tile h3 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 18px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.gesinne-tile p {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

/* --- ADMIN PANEL STYLES --- */
.admin-area {
    /* padding: 3rem; REMOVED this causes double padding */
    flex-grow: 1;
    overflow: hidden;
    /* Changed from auto to hidden to let admin-layout handle it */
    position: absolute;
    /* Ensures it covers the screen if it's a section */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 50;
    /* Above everything else */
    background: #0d0d0d;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: var(--transition);
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-5px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: rgba(78, 161, 70, 0.1);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.stat-info h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-info p {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    font-family: 'Rajdhani', sans-serif;
}

.admin-table-container {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
}

.table-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.table-header-actions h3 {
    font-size: 1.4rem;
    color: var(--text-main);
    font-family: 'Rajdhani', sans-serif;
}

.admin-search {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    color: var(--text-main);
    width: 300px;
}

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

.admin-table th {
    text-align: left;
    padding: 1rem;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--glass-border);
}

.admin-table td {
    padding: 1.2rem 1rem;
    color: var(--text-main);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    vertical-align: middle;
}

.admin-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.status-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-badge.active {
    background: rgba(78, 161, 70, 0.2);
    color: var(--primary);
}

.status-badge.inactive {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

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

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

/* --- ADMIN LAYOUT (SIDEBAR + CONTENT) --- */
.admin-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
    width: 100%;
}

.admin-sidebar {
    width: 260px;
    min-width: 260px;
    /* Prevent crushing */
    flex-shrink: 0;
    /* Prevent shrinking */
    background: #111;
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    z-index: 10;
}

/* ... existing logo styles ... */

.admin-main {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    position: relative;
    overflow: hidden;
}

.admin-logo {
    display: flex;
    flex-direction: column;
    margin-bottom: 3rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-text {
    font-family: 'Rajdhani', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #374151;
}

.logo-sub {
    font-size: 0.8rem;
    letter-spacing: 4px;
    color: var(--primary);
    text-transform: uppercase;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.admin-nav-item {
    background: transparent;
    border: none;
    color: var(--text-muted);
    text-align: left;
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.admin-nav-item:hover,
.admin-nav-item.active {
    background: rgba(103, 165, 46, 0.1);
    color: var(--primary);
}

.admin-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-nav-item.logout {
    width: 100%;
    margin-top: 0.5rem;
}

.admin-nav-item.logout:hover {
    background: rgba(220, 53, 69, 0.15);
    color: #ff4d4d;
}

.admin-nav-item i {
    width: 20px;
    text-align: center;
}

.admin-nav-item.logout {
    color: #e57373;
}

.admin-nav-item.logout:hover {
    background: rgba(229, 115, 115, 0.1);
}

.admin-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: #F9FAFB;
    position: relative;
    overflow: hidden;
}

.admin-header {
    height: 80px;
    padding: 0 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #E5E7EB;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-header h2 {
    font-size: 1.5rem;
    margin: 0;
}

.admin-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-avatar-wrapper {
    position: relative;
    cursor: pointer;
}

.admin-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.admin-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 220px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    margin-top: 10px;
    display: none;
    z-index: 1000;
    animation: fadeInAdminDropdown 0.2s ease-out;
}

@keyframes fadeInAdminDropdown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-dropdown-menu.active {
    display: block;
}

.dropdown-header {
    padding: 10px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dropdown-header small {
    color: var(--text-secondary);
}

.admin-dropdown-menu hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin: 5px 0;
}

.admin-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: #374151;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.admin-dropdown-menu a:hover {
    background: rgba(103, 165, 46, 0.1);
    color: var(--primary);
}

.logout-link:hover {
    background: rgba(220, 53, 69, 0.1) !important;
    color: #ff4d4d !important;
}

.admin-tab-content {
    padding: 3rem;
    overflow-y: auto;
    height: calc(100vh - 80px);
}

/* --- MODULES GRID (CONTENT EDITOR) --- */
.admin-modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.admin-module-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: var(--transition);
    position: relative;
}

.admin-module-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.module-meta {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.module-card-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.module-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
    border-top: 1px solid #E5E7EB;
    padding-top: 1rem;
}

/* --- EDITOR PANEL OVERLAY --- */
.editor-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 500px;
    height: 100%;
    background: #FFFFFF;
    border-left: 1px solid #E5E7EB;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
    z-index: 100;
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

.editor-header {
    height: 80px;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.editor-body {
    padding: 2rem;
    overflow-y: auto;
    flex-grow: 1;
}

.btn-close-editor {
    background: none;
    border: none;
    color: #374151;
    font-size: 1.5rem;
    cursor: pointer;
}

/* === GAMIFICATION & BADGES === */
.badge-item {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: var(--transition);
    position: relative;
}

.badge-item.locked {
    opacity: 0.4;
    filter: grayscale(100%);
}

.badge-item.earned {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(78, 161, 70, 0.3);
}

.badge-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.badge-name {
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.badge-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.badge-points {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
}

/* === TOAST NOTIFICATIONS === */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border: 1px solid var(--primary);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 20000;
    transform: translateX(450px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast-notification {
    background: #FFFFFF;
    color: #1F2937;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.toast-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.toast-content {
    flex-grow: 1;
}

.toast-title {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--sidebar-bg);
    margin-top: auto;
    z-index: 100;
}

.theme-toggle-btn {
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--secondary);
    background: rgba(0, 0, 0, 0.03);
}

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

.toast-message {
    color: var(--text-main);
    font-size: 0.95rem;
}

.toast-desc {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

/* === PROGRESS STATS === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.stat-box {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Rajdhani', sans-serif;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* === SEARCH BAR === */
.search-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 0.5rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    width: 300px;
}

.search-container input {
    background: none;
    border: none;
    color: var(--text-main);
    width: 100%;
    outline: none;
}

/* === ANALYTICS DASHBOARD === */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.analytics-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
}

.analytics-bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    height: 150px;
    margin-top: 1.5rem;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.bar-item {
    flex: 1;
    background: var(--primary);
    border-radius: 4px 4px 0 0;
    position: relative;
    min-height: 5px;
    transition: height 1s ease-out;
}

.bar-item:hover {
    background: var(--secondary);
}

.bar-label {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    white-space: nowrap;
    color: var(--text-muted);
}

/* === PRESENTATION MODE === */
body.presentation-mode .admin-sidebar,
body.presentation-mode .view-header,
body.presentation-mode .sidebar,
body.presentation-mode .user-progress {
    display: none !important;
}

body.presentation-mode .main-content {
    margin: 0 !important;
    padding: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

body.presentation-mode .learning-view {
    width: 100%;
    height: 100%;
    padding: 2rem;
}

body.presentation-mode .slide-content {
    max-width: 90vw;
    height: 70vh !important;
}

/* === ACCESSIBILITY: HIGH CONTRAST === */





/* === AI TUTOR WIDGET === */
.ai-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

.ai-badge-btn {
    background: linear-gradient(135deg, var(--primary) 0%, #3e8138 100%);
    color: #000;
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.ai-badge-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(78, 161, 70, 0.4);
}

.ai-spark {
    animation: sparkle 2s infinite;
}

@keyframes sparkle {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.ai-chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: #1a1a1a;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.ai-chat-header {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.btn-close-ai {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.ai-messages {
    flex-grow: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ai-msg {
    padding: 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    max-width: 85%;
    line-height: 1.4;
}

.ai-msg.bot {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.ai-msg.user {
    background: var(--primary);
    color: #000;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
    font-weight: 600;
}

.ai-input-area {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    gap: 10px;
}

.ai-input-area input {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 0.8rem;
    color: #fff;
    outline: none;
}

.ai-input-area button {
    background: var(--primary);
    border: none;
    width: 45px;
    border-radius: 10px;
    cursor: pointer;
    color: #000;
}

/* === FORUM STYLES === */
.forum-container {
    padding: 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.forum-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.queries-list {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.query-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
}

.query-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

.query-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.query-answer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 10px;
}

.admin-badge {
    background: var(--primary);
    color: #000;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 800;
    text-transform: uppercase;
}

/* === CHECKPOINT STYLES === */
.checkpoint-slide {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    border: 2px solid var(--primary);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
}

.checkpoint-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

.option-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    color: #fff;
}

.option-btn:hover {
    border-color: var(--primary);
    background: rgba(78, 161, 70, 0.1);
}

.option-btn.correct {
    background: var(--primary) !important;
    color: #000 !important;
}

.option-btn.wrong {
    background: #ff4444 !important;
    color: #fff !important;
}

/* === AUDIO LESSON ACTIVE === */
#btn-audio-lesson.playing {
    background: var(--primary);
    color: #000;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(78, 161, 70, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(78, 161, 70, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(78, 161, 70, 0);
    }
}

/* Placeholder visibility */
input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

input,
textarea {
    color: #000000 !important;
    /* Ensure black text in light mode for all inputs */
}

/* FIXED PRESENTATION MODE */
body.presentation-mode .media-tabs,
body.presentation-mode .content-header,
body.presentation-mode .content-details,
body.presentation-mode #slide-script-area {
    display: none !important;
}

body.presentation-mode #learning-view {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 10000 !important;
    background: #000 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 2rem !important;
}

body.presentation-mode .learning-container {
    width: 100% !important;
    height: 100% !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

body.presentation-mode .media-container {
    width: 100% !important;
    aspect-ratio: 16/9 !important;
    height: auto !important;
    max-height: 90vh !important;
    margin: 0 !important;
    border-radius: 12px !important;
}

body.presentation-mode #slides-view.active {
    display: flex !important;
    width: 100% !important;
    height: 100% !important;
}

body.presentation-mode .slides-viewer {
    height: 100% !important;
}

body.presentation-mode .slide-content {
    flex-grow: 1 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 2rem !important;
}

/* Light Mode Input Fixes */
input::placeholder,
textarea::placeholder {
    color: #999 !important;
}

select {
    background: #fff !important;
    color: #333 !important;
    border: 1px solid #ccc !important;
}

.input-group input {
    background: #fff !important;
    border: 1px solid #ccc !important;
    color: #333 !important;
}

/* AUDIO BUTTON UI */
.btn-speech {
    background: rgba(78, 161, 70, 0.1);
    border: 1px solid var(--primary);
    color: var(--primary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 10px;
    transition: var(--transition);
    vertical-align: middle;
}

.btn-speech:hover {
    background: var(--primary);
    color: #000;
}

.btn-speech.playing {
    animation: pulse-green 1.5s infinite;
}

@keyframes pulse-green {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(78, 161, 70, 0.4);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(78, 161, 70, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(78, 161, 70, 0);
    }
}

/* ADMIN FORUM STYLING */
.admin-forum-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.admin-query-card {
    background: var(--sidebar-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: var(--transition);
}

.admin-query-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.q-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.8rem;
}

.q-module {
    color: var(--primary);
    font-weight: 700;
}

.q-user {
    color: var(--text-muted);
}

.q-body strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.q-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
}

.q-status {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
}

.q-status.unanswered {
    background: rgba(243, 146, 0, 0.1);
    color: var(--accent-orange);
}

.q-status.answered {
    background: rgba(78, 161, 70, 0.1);
    color: var(--primary);
}

.admin-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem;
    color: var(--text-muted);
    font-size: 1.2rem;
    background: var(--glass);
    border-radius: 20px;
}

/* PRESENTATION FLOATING CONTROLS */
.presentation-controls {
    display: none;
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    gap: 1.5rem;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    opacity: 0.3;
}

.presentation-controls:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.8);
}

body.presentation-mode .presentation-controls {
    display: flex;
}

.pres-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.pres-btn:hover {
    background: var(--primary);
    transform: scale(1.1);
}

.pres-btn.exit {
    font-size: 1.4rem;
    margin-left: 0.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0;
    padding-left: 1.5rem;
}

/* RANKING & PODIUM */
.ranking-container {
    max-width: 900px;
    margin: 2rem auto;
}

.ranking-podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 2rem;
    margin-bottom: 4rem;
    padding-top: 2rem;
}

.podium-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: var(--transition);
}

.podium-item:hover {
    transform: scale(1.05);
}

.podium-avatar {
    width: 80px;
    height: 80px;
    background: var(--glass);
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1rem;
    position: relative;
}

.podium-crown {
    position: absolute;
    top: -25px;
    font-size: 2rem;
}

.podium-name {
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.podium-points {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 800;
}

.podium-step {
    width: 100px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 900;
    color: var(--glass-border);
}

.first .podium-step {
    height: 120px;
    border-color: gold;
    color: gold;
    background: rgba(255, 215, 0, 0.05);
}

.second .podium-step {
    height: 90px;
    border-color: silver;
    color: silver;
}

.third .podium-step {
    height: 60px;
    border-color: #cd7f32;
    color: #cd7f32;
}

.ranking-list {
    background: var(--glass);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.ranking-row {
    display: grid;
    grid-template-columns: 80px 1fr 120px;
    padding: 1.2rem 2rem;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
}

.ranking-row:last-child {
    border-bottom: none;
}

.ranking-rank {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--text-muted);
}

.ranking-user {
    font-weight: 600;
}

.ranking-pts {
    text-align: right;
    font-weight: 800;
    color: var(--primary);
}

/* AUTOPILOT BUTTON */
.autopilot-btn {
    margin-left: auto;
    background: rgba(78, 161, 70, 0.1);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: var(--transition);
}

.autopilot-btn:hover {
    background: var(--primary);
    color: #000;
}

.autopilot-btn.active {
    background: var(--primary);
    color: #000;
    animation: pulse-green 2s infinite;
}

/* VISUAL EDITOR */
.editor-workspace {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    height: 600px;
}

.editor-sidebar-slides {
    width: 250px;
    background: var(--glass);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.editor-slides-nav {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.editor-slide-item {
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    border: 1px solid transparent;
}

.editor-slide-item.active {
    border-color: var(--primary);
    background: rgba(78, 161, 70, 0.1);
}

.editor-canvas {
    flex-grow: 1;
    background: var(--glass);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.canvas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.canvas-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* --- NEW ELITE MODAL STYLES --- */
.modal {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal .editor-panel {
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal[style*="display: flex"] .editor-panel {
    transform: scale(1);
    opacity: 1;
}

.btn-full {
    width: 100%;
    margin-top: 10px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-group input,
.input-group textarea,
.input-group select {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.input-group input:focus {
    border-color: var(--primary);
    outline: none;
    background: rgba(255, 255, 255, 0.08);
}

/* --- HOME DASHBOARD STYLES --- */
.welcome-hero {
    background: linear-gradient(90deg, #1a1e1a 0%, #0d0d0d 100%);
    border-radius: 24px;
    padding: 3rem;
    margin-bottom: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.welcome-hero::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 300px;
    height: 100%;
    background: radial-gradient(circle, rgba(78, 161, 70, 0.1) 0%, transparent 70%);
}

.welcome-text h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, #fff 0%, #aaa 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.welcome-text p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin-top: 2rem;
}

.dash-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 2.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.dash-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(78, 161, 70, 0.3);
    transform: translateY(-5px);
}

.dash-card.main-stats {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(78, 161, 70, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-left: 4px solid var(--primary);
}

.dash-card-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.stats-overview {
    display: flex;
    justify-content: space-between;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    gap: 2rem;
}

.stat-item {
    flex: 1;
    background: rgba(255, 255, 255, 0.02);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(78, 161, 70, 0.08);
    border-color: rgba(78, 161, 70, 0.2);
}

.stat-val {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(78, 161, 70, 0.3);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.level-progress-container {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 16px;
}

.level-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.level-info #dash-level-name {
    color: var(--primary);
}

.level-bar-bg {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.level-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #a2ff50);
    border-radius: 50px;
    box-shadow: 0 0 15px rgba(78, 161, 70, 0.4);
}

.module-teaser {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.module-teaser img {
    width: 160px;
    height: 100px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.cont-info h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.cont-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.achievement-widget .dash-badges-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 1rem;
}

.dash-badge-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.dash-badge-icon:hover {
    background: rgba(78, 161, 70, 0.1);
    border-color: var(--primary);
    transform: scale(1.1);
}

.cont-info h4 {
    margin-bottom: 5px;
}

.cont-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.dash-badges-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.dash-badge-icon {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- PREMIUM PODIUM STYLES --- */
.ranking-podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 1rem;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.podium-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease;
}

.podium-item:hover {
    transform: translateY(-10px);
}

.podium-avatar {
    width: 60px;
    height: 60px;
    background: #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border: 3px solid transparent;
    margin-bottom: 10px;
    position: relative;
}

.podium-crown {
    position: absolute;
    top: -20px;
    font-size: 1.5rem;
    transform: rotate(-10deg);
}

.podium-name {
    font-weight: 700;
    font-size: 0.9rem;
}

.podium-points {
    font-size: 0.8rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.podium-step {
    width: 80px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    font-size: 2rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.1);
    border-radius: 10px 10px 0 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent);
}

.first .podium-step {
    height: 120px;
    background: linear-gradient(180deg, rgba(255, 215, 0, 0.2), transparent);
    color: gold;
}

.second .podium-step {
    height: 90px;
    background: linear-gradient(180deg, rgba(192, 192, 192, 0.2), transparent);
    color: silver;
}

.third .podium-step {
    height: 70px;
    background: linear-gradient(180deg, rgba(205, 127, 50, 0.2), transparent);
    color: #cd7f32;
}

.first .podium-avatar {
    border-color: gold;
    width: 80px;
    height: 80px;
    font-size: 2rem;
}

.second .podium-avatar {
    border-color: silver;
}

.third .podium-avatar {
    border-color: #cd7f32;
}

/* Global Transitions */
section {
    animation: fadeIn 0.5s ease-out forwards;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* --- ADMIN ANALYTICS ENHANCEMENTS --- */
.analytics-charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
}

.chart-box h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.mock-chart {
    height: 150px;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-bar {
    flex: 1;
    background: var(--primary);
    border-radius: 4px 4px 0 0;
    transition: height 1s ease;
    position: relative;
}

.chart-bar:hover {
    filter: brightness(1.2);
}

.chart-bar::after {
    content: attr(data-value);
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* --- MANUAL INTRO V2 STYLES --- */
.manual-intro-v2 {
    padding: 1rem 0;
}

.intro-header {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    background: rgba(78, 161, 70, 0.05);
    padding: 1.5rem;
    border-radius: 16px;
    border-left: 4px solid var(--primary);
    margin-bottom: 2.5rem;
}

.intro-header i {
    font-size: 1.5rem;
    color: var(--primary);
    margin-top: 0.2rem;
}

.intro-header p {
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0;
    color: var(--text-main);
}

.objectives-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.objectives-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.obj-card {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.obj-card:hover {
    background: rgba(78, 161, 70, 0.08);
    border-color: rgba(78, 161, 70, 0.2);
    transform: translateY(-3px);
}

.obj-icon {
    width: 45px;
    height: 45px;
    background: rgba(78, 161, 70, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.obj-text {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.obj-text strong {
    font-size: 1rem;
    color: var(--text-main);
}

.obj-text span {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.manual-footer-note {
    background: #1a1a1a;
    padding: 1.2rem 1.5rem;
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.manual-footer-note p {
    font-size: 0.9rem;
    margin: 0;
    color: var(--text-muted);
    font-style: italic;
}

/* --- DOCUMENTS VIEW STYLES --- */
.docs-grid {
    padding: 1rem 0;
}

.doc-card {
    display: flex;
    flex-direction: row !important;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem !important;
    transition: all 0.3s ease;
    border: 1px solid var(--glass-border);
}

.doc-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
}

.doc-icon {
    font-size: 3rem;
    color: var(--primary);
    background: rgba(103, 165, 46, 0.1);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.doc-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.doc-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.doc-actions {
    display: flex;
    gap: 10px;
}

.btn-full {
    width: 100%;
}

/* Ensure slides start from the very top with internal scroll */
.slide-content::-webkit-scrollbar {
    width: 6px;
}

.slide-content::-webkit-scrollbar-track {
    background: transparent;
}

.slide-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

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

/* --- RESPONSIVE OPTIMIZATION --- */
@media screen and (max-width: 1024px) {
    .sidebar {
        width: 250px;
    }
}

@media screen and (max-width: 768px) {
    .app-container {
        flex-direction: column;
        overflow-x: hidden;
    }

    .sidebar {
        display: none !important; /* Escondido por defecto en móvil */
        width: 100% !important;
        max-width: 100% !important;
        height: 100vh !important;
        position: fixed !important;
        z-index: 999999 !important; /* MÁXIMO Z-INDEX */
        top: 0;
        left: 0;
        background: white !important;
        flex-direction: column;
        overflow-y: auto !important;
    }

    .sidebar.mobile-active {
        display: flex !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

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

    .sidebar-overlay.active {
        display: block;
    }

    .main-content {
        width: 100% !important;
        height: 100vh !important;
    }

    .catalog-grid, .docs-grid {
        grid-template-columns: 1fr !important;
    }

    .login-hero-text h1 {
        font-size: 2rem;
    }

    .modal-content {
        padding: 1.5rem;
        width: 98%;
        margin: 10px;
    }

    .slide-viewer {
        height: auto !important;
        min-height: 400px;
    }
}

/* Botón de Menú para Móviles */
.mobile-nav-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 10005; /* Por encima de todo */
    background: var(--primary);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(78, 161, 70, 0.4);
    transition: all 0.3s ease;
    border: 2px solid rgba(255,255,255,0.2);
    pointer-events: auto !important;
}

.menu-close-btn {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    background: #e74c3c;
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10010;
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.3);
}

.menu-close-btn i {
    font-size: 1.2rem;
}

body.menu-open {
    overflow: hidden;
}

.mobile-nav-toggle i {
    font-size: 1.4rem;
}

.mobile-nav-toggle:active {
    transform: scale(0.9);
}

@media screen and (max-width: 768px) {
    .mobile-nav-toggle {
        display: flex;
    }
    .menu-close-btn {
        display: flex;
    }
}