/* =============================================
   TRADERZ HUB - LEARNING PAGES
   Unified CSS for Forex, Crypto, Stocks lessons
   ============================================= */

:root {
    --learn-primary: #d1b764;
    --learn-primary-light: #e6cc7a;
    --learn-dark: #0a0e17;
    --learn-card: rgba(22, 27, 34, 0.9);
    --learn-card-solid: #161b22;
    --learn-border: rgba(255, 255, 255, 0.08);
    --learn-text: #f0f6fc;
    --learn-text-muted: #8b949e;
    --learn-success: #3fb950;
    --learn-forex: #3b82f6;
    --learn-crypto: #f59e0b;
    --learn-stocks: #8b5cf6;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--learn-dark);
    background-image: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(139, 92, 246, 0.08), transparent),
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(209, 183, 100, 0.05), transparent);
    background-attachment: fixed;
    color: var(--learn-text);
    line-height: 1.7;
    min-height: 100vh;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 3rem;
    background: rgba(22, 27, 34, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--learn-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
}

.site-logo {
    height: 40px;
    transition: transform 0.3s ease;
}

.site-logo:hover {
    transform: scale(1.05);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.nav-link {
    padding: 0.6rem 1rem;
    color: var(--learn-text-muted);
    text-decoration: none;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--learn-text);
    background: rgba(255, 255, 255, 0.05);
}

.get-started-btn {
    padding: 0.6rem 1.25rem;
    background: linear-gradient(135deg, var(--learn-primary), #b89c4f);
    color: #0a0e17;
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.get-started-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(209, 183, 100, 0.3);
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 3rem;
}

/* Article Section */
.article-section {
    background: var(--learn-card);
    border: 1px solid var(--learn-border);
    border-radius: 24px;
    padding: 3rem 4rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.article-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--learn-primary), var(--learn-forex), var(--learn-crypto));
}

/* Back Link */
.back-to-hub {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--learn-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    padding: 0.5rem 1rem;
    background: rgba(209, 183, 100, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.back-to-hub:hover {
    background: rgba(209, 183, 100, 0.2);
    transform: translateX(-5px);
}

/* Progress Bar */
.lesson-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid var(--learn-border);
}

.progress-label {
    font-size: 0.85rem;
    color: var(--learn-text-muted);
    font-weight: 500;
}

.progress-bar-container {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--learn-primary), var(--learn-primary-light));
    border-radius: 10px;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--learn-primary);
    min-width: 50px;
    text-align: right;
}

/* Article Title */
.article-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--learn-text), var(--learn-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.3;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--learn-border);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--learn-text-muted);
}

.meta-item i {
    color: var(--learn-primary);
}

.meta-badge {
    padding: 0.3rem 0.75rem;
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 6px;
    text-transform: uppercase;
}

.meta-badge.forex { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.meta-badge.crypto { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.meta-badge.stocks { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }

/* Article Content */
.article-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

.article-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--learn-text);
    margin: 2.5rem 0 1rem;
    padding-left: 1rem;
    border-left: 3px solid var(--learn-primary);
}

.article-content h3:first-of-type {
    margin-top: 0;
}

.article-content p {
    margin-bottom: 1.25rem;
    color: var(--learn-text-muted);
}

.article-content strong, .article-content b {
    color: var(--learn-text);
    font-weight: 600;
}

/* Lists */
.article-content ul, .article-content ol {
    margin: 1.5rem 0;
    padding-left: 0;
    list-style: none;
}

.article-content li {
    position: relative;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    border-left: 2px solid var(--learn-primary);
}

.article-content li::before {
    content: '→';
    position: absolute;
    left: 1rem;
    color: var(--learn-primary);
    font-weight: 600;
}

.currency-list li {
    border-left-color: var(--learn-forex);
}

.currency-list li::before {
    content: '💱';
}

/* Info Boxes */
.info-box {
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 16px;
    border-left: 4px solid;
}

.info-box.tip {
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
}

.info-box.warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: #f59e0b;
}

.info-box.note {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
}

.info-box-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--learn-text);
}

/* Video Container */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    margin: 2rem 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Key Concepts */
.key-concepts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.concept-card {
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--learn-border);
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.concept-card:hover {
    transform: translateY(-3px);
    border-color: rgba(209, 183, 100, 0.3);
}

.concept-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.concept-title {
    font-weight: 600;
    color: var(--learn-text);
    margin-bottom: 0.25rem;
}

.concept-desc {
    font-size: 0.85rem;
    color: var(--learn-text-muted);
}

/* Navigation Buttons */
.lesson-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--learn-border);
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-btn.prev {
    background: rgba(255, 255, 255, 0.05);
    color: var(--learn-text-muted);
    border: 1px solid var(--learn-border);
}

.nav-btn.prev:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--learn-text);
}

.nav-btn.next, .next-lesson-btn {
    background: linear-gradient(135deg, var(--learn-primary), #b89c4f);
    color: #0a0e17;
    box-shadow: 0 4px 15px rgba(209, 183, 100, 0.25);
}

.nav-btn.next:hover, .next-lesson-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(209, 183, 100, 0.35);
}

.next-lesson-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    margin-top: 2rem;
}

/* Mark Complete */
.complete-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.complete-btn:hover {
    background: rgba(16, 185, 129, 0.25);
}

.complete-btn.completed {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

/* Login Prompt */
.login-prompt {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 12px;
    margin-bottom: 2rem;
}

.login-prompt i {
    color: #fbbf24;
    font-size: 1.25rem;
}

.login-prompt p {
    flex: 1;
    margin: 0;
    color: var(--learn-text-muted);
    font-size: 0.9rem;
}

.login-prompt a {
    color: var(--learn-primary);
    font-weight: 600;
    text-decoration: none;
}

.login-prompt a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    margin-top: 4rem;
    padding: 3rem;
    background: rgba(22, 27, 34, 0.5);
    border-top: 1px solid var(--learn-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 2rem;
}

.branding p {
    font-size: 0.85rem;
    color: var(--learn-text-muted);
    line-height: 1.7;
    max-width: 300px;
    margin-top: 1rem;
}

.footer-column h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--learn-text);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--learn-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--learn-primary);
}

.social-icons {
    display: flex;
    gap: 0.75rem;
}

.social-icons a {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--learn-text-muted);
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background: rgba(209, 183, 100, 0.1);
    color: var(--learn-primary);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--learn-border);
}

.copyright p {
    font-size: 0.85rem;
    color: var(--learn-text-muted);
}

/* Tables */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    overflow: hidden;
}

.article-content th, .article-content td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--learn-border);
}

.article-content th {
    background: rgba(209, 183, 100, 0.1);
    color: var(--learn-primary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.article-content td {
    color: var(--learn-text-muted);
}

.article-content tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem 1.5rem;
    }
    
    .main-nav {
        display: none;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .article-section {
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    .article-title {
        font-size: 1.75rem;
    }
    
    .article-meta {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .lesson-navigation {
        flex-direction: column;
    }
    
    .nav-btn {
        width: 100%;
        justify-content: center;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .branding p {
        max-width: 100%;
    }
    
    .social-icons {
        justify-content: center;
    }
}

/* Code blocks */
.article-content code {
    padding: 0.2rem 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9em;
    color: var(--learn-primary);
}

/* Blockquotes */
.article-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: rgba(209, 183, 100, 0.05);
    border-left: 4px solid var(--learn-primary);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: var(--learn-text);
}

/* Images */
.article-content img {
    max-width: 100%;
    border-radius: 12px;
    margin: 1.5rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Emoji support */
.emoji {
    font-size: 1.2em;
    vertical-align: middle;
}

/* Disclaimer */
.disclaimer {
    font-size: 0.85rem;
    color: var(--learn-text-muted);
    line-height: 1.7;
}
