/* ============================================
   COURSE SIDEBAR NAVIGATION - PYTHON
   Бічна панель з усіма уроками курсу Python
   Класи: -python для унікальності
   Тема: Python синьо-жовта 🐍
   Версія з емодзі іконками
   ============================================ */

/* ==================== SIDEBAR TOGGLE BUTTON ==================== */
.course-nav-toggle-python {
    position: fixed;
    top: 100px;
    left: 20px;
    z-index: 1000;
    background: linear-gradient(135deg, #FFD43B, #F7CA18);
    color: #306998;
    border: 3px solid #306998;
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    font-family: 'Rubik', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 4px 4px 0 #306998;
    transition: all 0.2s ease;
}

.course-nav-toggle-python:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #306998;
}

.course-nav-toggle-python .toggle-icon-python {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.course-nav-toggle-python.active .toggle-icon-python {
    transform: rotate(180deg);
}

/* Badge з номером поточного уроку */
.course-nav-toggle-python .current-lesson-badge-python {
    background: #306998;
    color: #FFD43B;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 4px;
}

/* ==================== SIDEBAR OVERLAY ==================== */
.course-sidebar-overlay-python {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.course-sidebar-overlay-python.active {
    opacity: 1;
    visibility: visible;
}

/* ==================== SIDEBAR PANEL ==================== */
.course-sidebar-python {
    position: fixed;
    top: 0;
    left: 0;
    width: 380px;
    max-width: 90vw;
    height: 100vh;
    background: #1e3a5f;
    z-index: 1002;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.course-sidebar-python.active {
    transform: translateX(0);
}

/* ==================== SIDEBAR HEADER ==================== */
.sidebar-header-python {
    padding: 20px;
    background: linear-gradient(135deg, #FFD43B, #F7CA18);
    border-bottom: 3px solid #306998;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-title-python {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-title-python .course-icon-python {
    font-size: 2rem;
}

.sidebar-title-python h2 {
    color: #306998 !important;
    font-size: 1.4rem;
    margin: 0;
    font-weight: 800;
}

.sidebar-close-python {
    background: rgba(48, 105, 152, 0.2);
    border: none;
    color: #306998;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-weight: bold;
}

.sidebar-close-python:hover {
    background: rgba(48, 105, 152, 0.3);
    transform: scale(1.1);
}

/* ==================== CHAPTERS LIST ==================== */
.sidebar-chapters-python {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.sidebar-chapters-python::-webkit-scrollbar {
    width: 6px;
}

.sidebar-chapters-python::-webkit-scrollbar-track {
    background: #1e3a5f;
}

.sidebar-chapters-python::-webkit-scrollbar-thumb {
    background: #306998;
    border-radius: 3px;
}

.sidebar-chapters-python::-webkit-scrollbar-thumb:hover {
    background: #FFD43B;
}

/* ==================== CHAPTER ==================== */
.sidebar-chapter-python {
    margin: 5px 10px;
}

.chapter-header-python {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 15px;
    background: #254a73;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.chapter-header-python:hover {
    background: #2d5a8a;
    border-color: #306998;
}

.chapter-header-python.active {
    background: #2d5a8a;
    border-color: #FFD43B;
}

.chapter-info-python {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chapter-number-python {
    width: 32px;
    height: 32px;
    background: #FFD43B;
    color: #306998;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.chapter-title-python {
    color: #e8f1f8;
    font-weight: 600;
    font-size: 0.95rem;
}

.chapter-meta-python {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chapter-badge-python {
    background: rgba(255, 212, 59, 0.2);
    color: #FFD43B;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

.chapter-toggle-python {
    color: #5a8ab8;
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.chapter-header-python.active .chapter-toggle-python {
    transform: rotate(180deg);
    color: #FFD43B;
}

/* ==================== LESSONS LIST ==================== */
.chapter-lessons-python {
    display: none;
    padding: 8px 0 8px 20px;
}

.chapter-lessons-python.active {
    display: block;
}

/* ==================== LESSON ITEM ==================== */
.lesson-item-python {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    margin: 4px 0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border-left: 3px solid transparent;
    background: transparent;
}

.lesson-item-python:hover {
    background: #2d5a8a;
    border-left-color: #FFD43B;
}

/* Поточний урок */
.lesson-item-python.current {
    background: rgba(255, 212, 59, 0.15);
    border-left-color: #FFD43B;
    border: 2px solid #FFD43B;
}

.lesson-info-python {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ==================== LESSON ICON (емодзі) ==================== */
.lesson-icon-python {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    background: #254a73;
    border: 2px solid #306998;
    transition: all 0.2s ease;
}

.lesson-item-python:hover .lesson-icon-python {
    background: #2d5a8a;
    border-color: #FFD43B;
    transform: scale(1.1);
}

.lesson-item-python.current .lesson-icon-python {
    background: #FFD43B;
    border-color: #F7CA18;
    animation: pulse-icon-python 2s infinite;
}

@keyframes pulse-icon-python {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 212, 59, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(255, 212, 59, 0); }
}

/* ==================== LESSON TITLE ==================== */
.lesson-title-python {
    color: #c8dae8;
    font-size: 0.9rem;
    font-weight: 500;
}

.lesson-item-python:hover .lesson-title-python {
    color: #e8f1f8;
}

.lesson-item-python.current .lesson-title-python {
    color: white;
    font-weight: 600;
}

/* ==================== LESSON KD ==================== */
.lesson-xp-python {
    background: #306998;
    color: #FFD43B;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.lesson-item-python.current .lesson-xp-python {
    background: #FFD43B;
    color: #306998;
}

/* ==================== BONUS LESSONS ==================== */
.lesson-item-python.bonus .lesson-icon-python {
    background: linear-gradient(135deg, #FF9F00, #FFD93D);
    border-color: #FF9F00;
}

.lesson-item-python.bonus .lesson-xp-python {
    background: rgba(255, 159, 0, 0.2);
    color: #FFD93D;
}

/* ==================== PREMIUM LESSONS ==================== */
.lesson-item-python.premium-locked .lesson-xp-python::before {
    content: '👑 ';
}

@media (max-width: 768px) {
    .course-nav-toggle-python {
        display: none;
    }
}

/* =========================================================================
   DROPDOWN NAVIGATION
   ========================================================================= */
.main-menu {
    display: flex;
    gap: 40px;
    margin: 0 auto;
    align-items: center;
}
.nav-dropdown {
    position: relative;
}
.dropdown-trigger {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dropdown-trigger i {
    font-size: 14px;
    transition: transform 0.3s ease;
}
.nav-dropdown:hover .dropdown-trigger i {
    transform: rotate(180deg);
}
/* Dropdown контент - БІЛЬШИЙ */
.dropdown-content {
    position: absolute;
    top: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 340px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
}
/* Стрілочка зверху */
.dropdown-content::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid var(--white);
}
.nav-dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
/* Елементи dropdown - БІЛЬШІ */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    border-radius: 14px;
    text-decoration: none;
    color: var(--black);
    transition: all 0.2s ease;
}
.dropdown-item:hover {
    background: var(--gray-100, #f5f5f5);
}
.dropdown-item i {
    font-size: 26px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--gray-100, #f5f5f5);
    color: var(--black);
    transition: all 0.2s ease;
}
/* Кольори для іконок при hover */
.dropdown-item:hover i {
    background: var(--lime);
    color: var(--black);
}
.dropdown-item div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.dropdown-title {
    display: block;
    font-weight: 600;
    font-size: 18px;
}
.dropdown-desc {
    display: block;
    font-size: 14px;
    color: var(--gray-500, #6c757d);
}
/* Header actions group */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Точка-розділювач */
.nav-dot {
    color: var(--gray-400, #adb5bd);
    font-size: 10px;
    user-select: none;
}

/* =========================================================================
   RESPONSIVE - ховаємо dropdown на мобільних
   ========================================================================= */
@media (max-width: 1024px) {
    .nav-dropdown .dropdown-content {
        display: none;
    }

    .dropdown-trigger i {
        display: none;
    }

    .nav-dot {
        display: none;
    }
}

/* Ховаємо головне меню на мобільних */
@media (max-width: 768px) {
    .main-menu {
        display: none !important;
    }

    .cta-button {
        display: none !important;
    }

    .burger-menu {
        display: flex !important;
    }
}