/*
Theme Name: Freelancing Learning Hub
Theme URI: https://freelancing.gigz.pk
Author: Gigz
Author URI: https://gigz.pk
Description: A professional, modern, and clean learning platform theme for Freelancing training.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: excel-hub
*/

/* --- CSS VARIABLES --- */
:root {
    --primary: #062E21;
    --bg-light: #F4F5F4;
    --accent-1: #0E63C2;
    --accent-2: #6BCAE2;
    --accent-3: #C2E0EF;
    --highlight: #2CD5E2;
    --action: #008291;

    /* Legacy Mappings */
    --primary-dark: var(--primary);
    --primary-light: var(--accent-1);
    --accent-yellow: var(--highlight);
    --dark-bg: var(--primary);
    --dark-surface: var(--action);
    --accent-teal: var(--action);
    --accent-cyan: var(--accent-2);
    --accent-orange: var(--accent-1);
    --text-slate: #475569;
}

/* --- RESET & BASE --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background: var(--bg-light); color: #1e293b; line-height: 1.6; }
a { text-decoration: none; color: inherit; transition: 0.3s; }

/* --- LAYOUT --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.site-main { display: flex; flex-wrap: wrap; gap: 40px; padding: 40px 0; }
.content-area { flex: 1; min-width: 300px; background: #fff; padding: 40px; border-radius: 12px; shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1); }
.sidebar { width: 300px; }

/* --- HEADER --- */
.site-header { background: var(--primary-dark); color: #fff; padding: 15px 0; position: sticky; top: 0; z-index: 100; }
.header-flex { display: flex; justify-content: space-between; align-items: center; }
.logo { font-weight: 800; font-size: 1.5rem; display: flex; align-items: center; gap: 10px; }
.logo span { color: #fff; padding: 0; border-radius: 0; }
.logo a { color: #fff; }

.nav-container { display: flex; align-items: center; }
.nav-actions { display: flex; align-items: center; gap: 20px; margin-left: 30px; }
.auth-link { font-size: 0.9rem; opacity: 0.8; }

.mobile-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 10px; z-index: 1001; }
.mobile-toggle span { width: 25px; height: 2px; background: #fff; transition: 0.3s; }
.mobile-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.main-nav ul { display: flex; list-style: none; gap: 25px; }
.main-nav a:hover { color: var(--accent-yellow); }
.nav-link { font-size: 0.9rem; font-weight: 500; transition: 0.3s; }
.nav-link:hover { color: var(--highlight); }
.btn-cta { background: var(--accent-yellow); color: var(--primary-dark); padding: 10px 20px; border-radius: 50px; font-weight: 700; }

/* --- SIDEBAR NAVIGATION --- */
.course-nav { background: #fff; border-radius: 12px; border: 1px solid #e2e8f0; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.course-nav h3.nav-title { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: #94a3b8; padding: 20px 20px 10px; border-bottom: 1px solid #f8fafc; font-weight: 700; }
.course-nav ul { list-style: none; }

.topic-item { border-bottom: 1px solid #f1f5f9; transition: all 0.3s ease; position: relative; }
.topic-header { display: flex; align-items: center; justify-content: space-between; position: relative; }
.topic-header:hover { background: #f8fafc; }
.topic-info { flex: 1; display: flex; flex-direction: column; padding: 14px 20px; }
.topic-link { flex: 1; display: block; font-weight: 500; color: var(--text-slate); font-size: 0.95rem; line-height: 1.4; transition: all 0.2s ease; }
.topic-link:hover { color: var(--primary-light); }
.active-topic { color: var(--primary-light) !important; font-weight: 700; background: rgba(51, 110, 160, 0.05); }

.training-level { background: #fff; }
.training-level > .topic-header .topic-link { font-weight: 700; color: var(--primary-dark); font-size: 1rem; }

.chapter-level { background: #fcfcfd; }
.chapter-level .topic-info { padding-left: 35px; }
.chapter-level .topic-link { font-size: 0.9rem; font-weight: 600; color: #64748b; }

.lesson-level { background: #fff; border-bottom: 1px solid #f8fafc; }
.lesson-level .topic-info { padding-left: 50px; }
.lesson-level .topic-link { font-size: 0.85rem; color: #94a3b8; }
.lesson-level:hover { background: #f1f5f9; }

.topic-toggle { 
    width: 40px; height: 40px; border: none; background: transparent; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: transform 0.3s ease;
}
.topic-toggle::after { 
    content: ''; width: 6px; height: 6px; border-right: 2px solid #94a3b8; border-bottom: 2px solid #94a3b8; 
    transform: rotate(-45deg); transition: 0.3s;
}
.is-open > .topic-header .topic-toggle { transform: rotate(45deg); }
.is-open > .topic-header .topic-toggle::after { border-color: var(--primary-light); }

.sub-menu { 
    max-height: 0; 
    overflow: hidden; 
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
    background: #fff;
}
.is-open > .sub-menu { border-top: 1px solid #f1f5f9; }

/* --- LAZY LOADING --- */
.is-loading > .topic-header::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid var(--accent-3);
    border-top-color: var(--action);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 20px;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- AUTH PAGES --- */
.auth-page-wrapper {
    padding: 80px 0;
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    background: var(--bg-light);
}
.auth-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 80px;
    align-items: center;
}
.auth-info {
    color: var(--primary);
}
.auth-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 25px;
    letter-spacing: -0.04em;
}
.auth-desc {
    font-size: 1.2rem;
    color: var(--text-slate);
    margin-bottom: 40px;
    line-height: 1.6;
}
.auth-benefits {
    list-style: none;
    display: grid;
    gap: 30px;
}
.auth-benefits li {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.benefit-icon {
    width: 48px;
    height: 48px;
    background: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    flex-shrink: 0;
}
.auth-benefits strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--primary);
}
.auth-benefits p {
    font-size: 0.95rem;
    color: var(--text-slate);
}

@media (max-width: 1024px) {
    .auth-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    .auth-info {
        text-align: center;
    }
    .auth-benefits li {
        text-align: left;
    }
    .auth-title {
        font-size: 2.5rem;
    }
}

/* --- LOGIN FORM --- */
.login-container { 
    background: #fff; 
    padding: 40px; 
    border-radius: 24px; 
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.05), 0 10px 10px -5px rgba(0,0,0,0.02); 
    border: 1px solid rgba(255,255,255,0.8);
}
.login-container h2 { text-align: center; margin-bottom: 30px; color: var(--primary); font-weight: 800; }
.login-form label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.9rem; }
.login-form input[type="text"], .login-form input[type="password"], .login-form input[type="email"] { 
    width: 100%; padding: 12px 16px; border: 1px solid #e2e8f0; border-radius: 10px; margin-bottom: 20px; transition: 0.3s;
}
.login-form input:focus { outline: none; border-color: var(--accent-1); box-shadow: 0 0 0 3px rgba(14, 99, 194, 0.1); }
.login-form .submit-btn { 
    width: 100%; padding: 14px; background: var(--action); color: #fff; border: none; 
    border-radius: 12px; font-weight: 700; cursor: pointer; transition: 0.3s;
}
.login-form .submit-btn:hover { background: var(--highlight); color: var(--primary); transform: translateY(-2px); }
.login-links { margin-top: 20px; text-align: center; font-size: 0.85rem; }
.login-links a { color: var(--accent-1); margin: 0 10px; font-weight: 600; }

/* --- FOOTER --- */
.site-footer { background: var(--primary); color: #94a3b8; padding: 60px 0 30px; margin-top: 60px; border-top: 1px solid rgba(255,255,255,0.05); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; }
.footer-title { color: #fff; font-weight: 700; margin-bottom: 20px; }
.footer-bottom { border-top: 1px solid #1e293b; margin-top: 40px; padding-top: 20px; text-align: center; font-size: 0.8rem; }

/* --- HERO SECTION --- */
.hero-section { 
    background: var(--primary);
    background-image: 
        radial-gradient(at 0% 0%, rgba(0, 0, 0, 0.1) 0, transparent 50%), 
        radial-gradient(at 100% 0%, rgba(0, 0, 0, 0.05) 0, transparent 50%);
    color: #fff; 
    padding: 100px 0 160px; 
    position: relative;
    overflow: hidden;
}
.hero-section::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 100px;
    background: linear-gradient(to top, #f8fafc, transparent);
}
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; align-items: center; }
.hero-content { position: relative; z-index: 1; }
.hero-content h1 { font-size: 3.8rem; font-weight: 800; line-height: 1.1; margin-bottom: 25px; letter-spacing: -0.04em; text-align: left; }
.hero-content .highlight { color: var(--accent-yellow); position: relative; display: inline-block; }
.hero-content .highlight::after {
    content: ''; position: absolute; bottom: 10px; left: 0; width: 100%; height: 8px; 
    background: rgba(0, 0, 0, 0.1); z-index: -1;
}
.hero-content p { font-size: 1.25rem; opacity: 0.8; margin-bottom: 45px; line-height: 1.6; font-weight: 400; text-align: left; }

.hero-btns { display: flex; justify-content: flex-start; gap: 20px; margin-bottom: 60px; }
.btn-primary { 
    background: var(--action); color: #fff; padding: 18px 40px; 
    border-radius: 12px; font-weight: 700; font-size: 1.1rem; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.2);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3); background: var(--highlight); color: var(--primary); }
.btn-secondary { 
    background: rgba(255,255,255,0.05); color: #fff; padding: 18px 40px; 
    border-radius: 12px; font-weight: 700; font-size: 1.1rem; border: 1px solid rgba(255,255,255,0.1); transition: 0.3s;
    backdrop-filter: blur(10px);
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }

.hero-stats { display: flex; justify-content: flex-start; gap: 60px; }
.stat-item { display: flex; flex-direction: column; gap: 8px; }
.stat-num { font-size: 2rem; font-weight: 800; color: #fff; }
.stat-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--highlight); font-weight: 600; }

.hero-image { position: relative; z-index: 1; }
.image-wrapper { position: relative; border-radius: 24px; overflow: visible; box-shadow: 0 30px 60px -12px rgba(0,0,0,0.5); }
.image-wrapper img { width: 100%; height: auto; border-radius: 24px; display: block; border: 1px solid rgba(255,255,255,0.1); }

.floating-card {
    position: absolute; background: rgba(255,255,255,0.9); backdrop-filter: blur(10px);
    padding: 15px 20px; border-radius: 16px; display: flex; align-items: center; gap: 15px;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); border: 1px solid #fff; color: var(--primary-dark);
    animation: float 6s ease-in-out infinite;
}
.floating-card span { font-size: 1.5rem; }
.floating-card strong { display: block; font-size: 0.9rem; }
.floating-card small { font-size: 0.75rem; color: var(--text-slate); }

.card-1 { top: 20%; left: -40px; }
.card-2 { bottom: 20%; right: -40px; animation-delay: 3s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-content h1, .hero-content p, .hero-btns, .hero-stats { text-align: center; justify-content: center; }
    .hero-image { margin-top: 60px; max-width: 600px; margin-left: auto; margin-right: auto; }
}

/* --- LANDING SECTIONS --- */
.section-tag { display: inline-block; padding: 6px 16px; background: rgba(0, 0, 0, 0.05); color: var(--accent-1); border-radius: 100px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 15px; }
.section-title { font-size: 2.5rem; font-weight: 800; color: var(--primary-dark); margin-bottom: 15px; letter-spacing: -0.02em; }
.section-desc { font-size: 1.1rem; color: var(--text-slate); max-width: 600px; margin-bottom: 50px; }

.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin: -80px auto 100px; position: relative; z-index: 10; }
.feature-card { background: #fff; padding: 40px; border-radius: 24px; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.05), 0 10px 10px -5px rgba(0,0,0,0.02); border: 1px solid rgba(255,255,255,0.8); }
.feature-icon { width: 56px; height: 56px; background: #f1f5f9; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 25px; }
.feature-card h3 { font-size: 1.25rem; font-weight: 700; color: var(--primary-dark); margin-bottom: 12px; }
.feature-card p { color: var(--text-slate); font-size: 0.95rem; line-height: 1.6; }

.course-card { 
    background: #fff; border: 1px solid #e2e8f0; border-radius: 20px; padding: 32px; 
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); cursor: pointer; position: relative; overflow: hidden;
}
.course-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: var(--primary-light);
    transform: scaleX(0); transition: 0.4s; transform-origin: left;
}
.course-card:hover { border-color: transparent; transform: translateY(-8px); box-shadow: 0 25px 50px -12px rgba(0,0,0,0.08); }
.course-card:hover::before { transform: scaleX(1); }

/* --- COURSE NAVIGATION --- */
.course-navigation a:hover span:last-child { color: var(--primary-light) !important; }

/* --- QUIZ STYLES --- */
#quiz-container { min-height: 400px; }
.quiz-option:hover { border-color: var(--primary-light) !important; background: #f8fafc !important; }
.quiz-option:active { transform: scale(0.98); }

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-content h1 { font-size: 2.8rem; text-align: center; }
    .hero-content p { text-align: center; }
    .hero-btns, .hero-stats { justify-content: center; }
    .hero-image { margin-top: 40px; }
    .features-grid { grid-template-columns: 1fr; margin-top: -40px; }
}

@media (max-width: 768px) {
    .mobile-toggle { display: flex; }
    .main-nav { 
        position: fixed; top: 0; right: -100%; width: 80%; height: 100vh; 
        background: var(--primary); z-index: 1000; transition: 0.4s; 
        padding: 100px 40px; box-shadow: -10px 0 30px rgba(0,0,0,0.2);
        overflow-y: auto;
    }
    .main-nav.active { right: 0; }
    .nav-container { flex-direction: column; align-items: flex-start; gap: 40px; }
    .main-nav ul { flex-direction: column; gap: 20px; width: 100%; }
    .main-nav ul li { width: 100%; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 10px; }
    .nav-actions { flex-direction: column; align-items: flex-start; margin-left: 0; gap: 20px; width: 100%; }
    .btn-cta { width: 100%; text-align: center; }
    
    .hero-content h1 { font-size: 2rem; }
    .hero-content p { font-size: 1.1rem; }
    .hero-stats { gap: 20px; flex-wrap: wrap; }
    .stat-item { flex: 1; min-width: 100px; }
    
    .sidebar { width: 100%; order: 2; }
    .content-area { order: 1; width: 100%; padding: 20px; }
    
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-section { display: flex; flex-direction: column; align-items: center; }
    
    .featured-grid { grid-template-columns: 1fr !important; }
}


