/* ===== COURSES PAGE STYLES ===== */

:root {
    --primary-color: #6c5ce7;
    --secondary-color: #00b894;
    --accent-color: #fd79a8;
    --dark-color: #2d3436;
    --light-color: #ddd;
    --white-color: #ffffff;
    --gradient-primary: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    --gradient-secondary: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
    --gradient-accent: linear-gradient(135deg, #fd79a8 0%, #fdcb6e 100%);
    --shadow-light: 0 5px 15px rgba(0,0,0,0.1);
    --shadow-medium: 0 10px 30px rgba(0,0,0,0.15);
    --shadow-heavy: 0 20px 60px rgba(0,0,0,0.2);
    --border-radius: 15px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    overflow-x: hidden;
}

/* ===== PRELOADER ===== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: var(--transition);
}

.preloader-content {
    text-align: center;
    color: white;
}

.logo-container {
    margin-bottom: 2rem;
}

.logo-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.progress-bar {
    width: 200px;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    margin: 0 auto 1rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: white;
    border-radius: 2px;
    animation: progressAnimation 2s ease-in-out;
}

@keyframes progressAnimation {
    0% { width: 0%; }
    100% { width: 100%; }
}

.loading-text {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
}

/* ===== NAVIGATION ===== */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
    padding: 1rem 0;
}

.navbar-brand .brand-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    font-weight: 500;
    color: var(--dark-color) !important;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    border-radius: 25px;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    background: var(--gradient-primary);
    color: white !important;
    transform: translateY(-2px);
}

/* ===== HERO SECTION ===== */
.hero-section {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.1);
    z-index: -1;
}

.hero-content {
    text-align: center;
    color: white;
    padding: 2rem 0;
}

.hero-title {
    font-family: 'Poppins', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.gradient-text {
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== SEARCH CONTAINER ===== */
.search-container {
    margin-top: 2rem;
}

.search-box {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border-radius: 50px;
    padding: 0.5rem;
    box-shadow: var(--shadow-medium);
    display: flex;
    align-items: center;
}

.search-icon {
    color: var(--primary-color);
    margin-left: 1rem;
    font-size: 1.2rem;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 1rem;
    font-size: 1rem;
    background: transparent;
    color: var(--dark-color);
}

.search-input::placeholder {
    color: #999;
}

.search-btn {
    background: var(--gradient-primary);
    border: none;
    border-radius: 50px;
    padding: 1rem 1.5rem;
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.search-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-medium);
}

/* ===== COURSES SECTION ===== */
.courses-section {
    padding: 4rem 0;
}

/* ===== TREE SIDEBAR ===== */
.tree-sidebar {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    padding: 0;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar-header {
    background: var(--gradient-primary);
    color: white;
    padding: 1.5rem;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.sidebar-header h3 {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.2rem;
}

.tree-container {
    padding: 1rem;
    max-height: 70vh;
    overflow-y: auto;
}

/* ===== TREE VIEW ===== */
.tree-view {
    font-family: 'Open Sans', sans-serif;
}

.tree-item {
    margin-bottom: 0.5rem;
}

.tree-node {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    border: 2px solid transparent;
}

.tree-node:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transform: translateX(5px);
    border-color: var(--primary-color);
}

.tree-node.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-medium);
}

.tree-node.category {
    font-weight: 600;
    background: linear-gradient(135deg, #f1f3f4 0%, #e8eaed 100%);
    margin-bottom: 0.5rem;
}

.tree-node.category:hover {
    background: var(--gradient-secondary);
    color: white;
}

.tree-icon {
    margin-right: 0.75rem;
    font-size: 1rem;
    width: 20px;
    text-align: center;
    transition: var(--transition);
}

.tree-node:hover .tree-icon {
    transform: scale(1.1);
}

.tree-text {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.4;
}

.tree-children {
    margin-left: 1.5rem;
    border-left: 2px solid #e9ecef;
    padding-left: 1rem;
    margin-top: 0.5rem;
}

.tree-children .tree-node {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
}

.expand-icon {
    margin-left: auto;
    transition: var(--transition);
    font-size: 0.8rem;
}

.tree-node.expanded .expand-icon {
    transform: rotate(90deg);
}

/* ===== COURSE DETAILS PANEL ===== */
.course-details-panel {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    min-height: 70vh;
}

.panel-header {
    background: var(--gradient-secondary);
    color: white;
    padding: 2rem;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.panel-header h2 {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.8rem;
}

.breadcrumb-nav {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.course-content {
    padding: 2rem;
}

/* ===== WELCOME CONTENT ===== */
.welcome-content {
    text-align: center;
    padding: 2rem 0;
}

.welcome-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.welcome-content h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.welcome-content p {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-color);
}

.stat-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.stat-info h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.stat-info p {
    color: #666;
    margin: 0;
    font-weight: 500;
}

/* ===== COURSE DETAIL CONTENT ===== */
.course-detail {
    animation: fadeInUp 0.5s ease-out;
}

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

.course-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.meta-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    border: 2px solid transparent;
    transition: var(--transition);
}

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

.meta-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.meta-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.meta-value {
    color: #666;
    font-size: 0.9rem;
}

.course-description {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
    margin-bottom: 2rem;
}

.course-description h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

/* ===== FOOTER ===== */
.footer-section {
    background: var(--dark-color);
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-brand h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    margin-left: 1rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--secondary-color);
}

.footer-divider {
    border-color: #495057;
    margin: 1.5rem 0;
}

.copyright {
    margin: 0;
    opacity: 0.8;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .tree-sidebar {
        margin-bottom: 2rem;
        position: static;
    }
    
    .tree-container {
        max-height: 50vh;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .course-meta {
        grid-template-columns: 1fr;
    }
    
    .search-box {
        margin: 0 1rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .panel-header {
        padding: 1.5rem;
    }
    
    .panel-header h2 {
        font-size: 1.5rem;
    }
    
    .course-content {
        padding: 1.5rem;
    }
}

