/* Neocosive Training — Styles */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --accent: #06b6d4;
  --success: #22c55e;
  --error: #ef4444;
  --warning: #f59e0b;
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
body.rtl { direction: rtl; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* Navbar */
.navbar { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.nav-container { max-width: 1100px; margin: 0 auto; padding: .75rem 1.5rem; display: flex; align-items: center; justify-content: space-between; }
.nav-brand { text-decoration: none; display: flex; align-items: center; gap: .5rem; color: var(--text); font-weight: 700; font-size: 1.1rem; }
.brand-icon { font-size: 1.4rem; }
.nav-links { display: flex; align-items: center; gap: 1rem; }
.nav-links a { text-decoration: none; color: var(--text-light); font-size: .9rem; transition: color .2s; }
.nav-links a:hover { color: var(--primary); }
.nav-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; }
.user-badge { background: var(--primary); color: white; padding: .25rem .75rem; border-radius: 20px; font-size: .8rem; }
.lang-switcher { display: flex; gap: .25rem; }
.lang-flag { font-size: 1.2rem; text-decoration: none; opacity: .5; transition: opacity .2s; }
.lang-flag.active, .lang-flag:hover { opacity: 1; }

/* Buttons */
.btn { display: inline-block; padding: .6rem 1.5rem; background: var(--primary); color: white; text-decoration: none; border-radius: var(--radius); font-weight: 600; font-size: .9rem; border: none; cursor: pointer; transition: all .2s; }
.btn:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-sm { padding: .35rem 1rem; font-size: .85rem; }
.btn-large { padding: .8rem 2.5rem; font-size: 1.1rem; }
.btn-primary { background: var(--primary); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-success { background: var(--success); }
.btn-full { width: 100%; text-align: center; }

/* Hero */
.hero { background: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%); color: white; padding: 5rem 1.5rem; text-align: center; }
.hero h1 { font-size: 2.5rem; font-weight: 700; margin-bottom: 1rem; }
.hero-sub { font-size: 1.2rem; opacity: .9; margin-bottom: 2rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.hero .btn { background: white; color: var(--primary); }
.hero .btn:hover { background: #f1f5f9; }

/* Features */
.features { padding: 4rem 0; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2rem; }
.feature-card { background: var(--bg-card); padding: 2rem; border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; }
.feature-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.feature-card h3 { margin-bottom: .5rem; }
.feature-card p { color: var(--text-light); font-size: .9rem; }

/* Modules */
.modules-preview { padding: 3rem 0; background: #f1f5f9; }
.modules-preview h2 { text-align: center; margin-bottom: 2rem; }
.modules-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.module-card-mini { background: var(--bg-card); padding: 1.5rem; border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: var(--text); text-align: center; transition: all .2s; display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.module-card-mini:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.module-emoji { font-size: 2rem; }
.module-title-mini { font-weight: 600; font-size: .9rem; }
.module-lessons-count { color: var(--text-light); font-size: .8rem; }

/* Module list page */
.page-header { background: linear-gradient(135deg, #4f46e5, #06b6d4); color: white; padding: 3rem 1.5rem; }
.page-header h1 { font-size: 2rem; }
.page-header p { opacity: .85; }

.modules-list { display: flex; flex-direction: column; gap: 1.5rem; padding: 2rem 0; }
.module-card { background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; overflow: hidden; }
.module-card-icon { font-size: 3rem; padding: 2rem; display: flex; align-items: center; background: #f1f5f9; }
.module-card-body { padding: 1.5rem; flex: 1; }
.module-card-body h2 { font-size: 1.3rem; margin-bottom: .5rem; }
.module-desc { color: var(--text-light); margin-bottom: 1rem; font-size: .9rem; }
.module-meta { display: flex; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.meta-item { font-size: .85rem; color: var(--text-light); }

/* Badges */
.badge { padding: .2rem .6rem; border-radius: 20px; font-size: .75rem; font-weight: 600; }
.badge-pro { background: #fef3c7; color: #92400e; }
.badge-free { background: #dcfce7; color: #166534; }
.badge-sf { background: #ede9fe; color: #5b21b6; }

.paths-panel { padding: 2rem 0 0; }
.paths-header { margin-bottom: 1rem; }
.paths-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.path-card { background: linear-gradient(180deg, #fff, #f8fafc); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow); }
.path-card h3 { margin-bottom: .5rem; }
.path-card p { color: var(--text-light); font-size: .9rem; margin-bottom: .75rem; }
.path-meta { font-size: .8rem; font-weight: 700; color: var(--primary-dark); margin-bottom: .75rem; }
.path-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.path-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .35rem .6rem; border-radius: 999px; background: #eef2ff; color: #3730a3; text-decoration: none; font-size: .78rem; }
.path-chip:hover { background: #dbeafe; }

.lesson-enhancements-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 2rem; }
.enhancement-card { background: #f8fafc; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem; }
.enhancement-card h2 { margin-top: 0; }
.enhancement-list { margin: .75rem 0 0 1.1rem; }
.enhancement-list li { margin-bottom: .45rem; }
.enhancement-note { color: var(--text-light); font-size: .88rem; margin-top: .75rem; }
.lesson-diagram { width: 100%; max-height: 320px; object-fit: contain; border-radius: 10px; background: white; border: 1px solid var(--border); }
.case-box { background: white; border: 1px solid var(--border); border-radius: 10px; padding: 1rem; }
.case-box summary { cursor: pointer; font-weight: 600; margin-bottom: .75rem; }
.interactive-case { display: flex; flex-direction: column; gap: .75rem; margin-top: 1rem; }
.case-option { display: flex; align-items: center; gap: .75rem; width: 100%; text-align: left; border: 1px solid var(--border); background: #fff; border-radius: 12px; padding: .9rem 1rem; cursor: pointer; font: inherit; }
.case-option:hover { border-color: #94a3b8; background: #f8fafc; }
.case-option-index { width: 28px; height: 28px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: #e2e8f0; color: #0f172a; font-weight: 700; flex-shrink: 0; }
.case-option.correct { border-color: #22c55e; background: #f0fdf4; }
.case-option.incorrect { border-color: #ef4444; background: #fef2f2; }
.case-feedback { border-radius: 12px; padding: .9rem 1rem; border: 1px solid var(--border); background: #fff; }
.case-feedback.correct { border-color: #22c55e; background: #f0fdf4; }
.case-feedback.incorrect { border-color: #ef4444; background: #fef2f2; }
.case-feedback p { margin: .4rem 0 0; }
.video-card { background: linear-gradient(180deg, #fff7ed, #fff); }

/* Lessons */
.lessons-list { display: flex; flex-direction: column; gap: 1rem; padding: 2rem 0; }
.lesson-card { background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; align-items: center; padding: 1rem 1.5rem; gap: 1rem; }
.lesson-card.completed { border-left: 4px solid var(--success); }
.lesson-number { width: 40px; height: 40px; background: var(--primary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.lesson-body { flex: 1; }
.lesson-body h3 { font-size: 1rem; margin-bottom: .25rem; }
.lesson-body p { color: var(--text-light); font-size: .85rem; }
.lesson-action { display: flex; align-items: center; gap: .5rem; }

/* Lesson content */
.lesson-page { padding: 2rem 0; }
.lesson-content { background: var(--bg-card); padding: 2.5rem; border-radius: var(--radius); box-shadow: var(--shadow); margin: 1.5rem 0; line-height: 1.8; }
.lesson-content h1 { font-size: 1.8rem; margin-bottom: 1.5rem; color: var(--primary-dark); }
.lesson-content h2 { font-size: 1.4rem; margin: 2rem 0 1rem; color: var(--text); border-bottom: 2px solid var(--border); padding-bottom: .5rem; }
.lesson-content h3 { font-size: 1.15rem; margin: 1.5rem 0 .75rem; }
.lesson-content p { margin-bottom: 1rem; }
.lesson-content ul, .lesson-content ol { margin: 1rem 0 1rem 2rem; }
.lesson-content li { margin-bottom: .5rem; }
.lesson-content blockquote { border-left: 4px solid var(--primary); padding: 1rem 1.5rem; background: #f1f5f9; margin: 1rem 0; border-radius: 0 var(--radius) var(--radius) 0; }
.lesson-content table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.lesson-content th, .lesson-content td { padding: .75rem; border: 1px solid var(--border); text-align: left; }
.lesson-content th { background: #f1f5f9; font-weight: 600; }

.pro-section { background: #fffbeb; border: 2px solid #fcd34d; border-radius: var(--radius); padding: 2rem; margin-top: 2rem; }
.pro-teaser { background: #f1f5f9; border: 2px dashed var(--border); border-radius: var(--radius); padding: 2rem; text-align: center; margin-top: 2rem; }
.video-placeholder { background: #1e293b; color: white; padding: 3rem; border-radius: var(--radius); text-align: center; margin-top: 2rem; font-size: 1.1rem; }

.lesson-nav-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.lesson-nav-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 2rem; gap: 1rem; }
.back-link { text-decoration: none; color: var(--primary); font-weight: 500; }

/* Quiz */
.quiz-page { padding: 2rem 0; }
.quiz-form { max-width: 700px; margin: 2rem auto; }
.quiz-question { background: var(--bg-card); padding: 2rem; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1.5rem; }
.quiz-question h3 { color: var(--text-light); font-size: .9rem; margin-bottom: .75rem; }
.question-text { font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; }
.options { display: flex; flex-direction: column; gap: .5rem; }
.option-label { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; background: #f8fafc; border-radius: 8px; cursor: pointer; transition: background .2s; }
.option-label:hover { background: #e2e8f0; }
.option-label input { accent-color: var(--primary); }

.quiz-results { max-width: 700px; margin: 2rem auto; }
.quiz-score { text-align: center; padding: 2rem; background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 2rem; }
.quiz-score h2 { font-size: 2.5rem; }
.correction { padding: 1rem; margin-bottom: .75rem; border-radius: 8px; }
.correction.correct { background: #dcfce7; }
.correction.incorrect { background: #fef2f2; }
.text-success { color: var(--success); }
.text-error { color: var(--error); }

/* Quiz CTA */
.quiz-cta { background: var(--bg-card); padding: 2.5rem; border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; margin: 2rem 0; }

/* Auth */
.auth-page { display: flex; justify-content: center; align-items: center; min-height: 60vh; padding: 2rem; }
.auth-card { background: var(--bg-card); padding: 2.5rem; border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; max-width: 420px; }
.auth-card h1 { text-align: center; margin-bottom: 1.5rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: .35rem; font-weight: 500; font-size: .9rem; }
.form-group input, .form-group select { width: 100%; padding: .65rem 1rem; border: 1px solid var(--border); border-radius: 8px; font-size: .95rem; font-family: inherit; }
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.auth-switch { text-align: center; margin-top: 1rem; font-size: .9rem; color: var(--text-light); }
.alert { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; }
.alert-error { background: #fef2f2; color: var(--error); border: 1px solid #fecaca; }

/* Progress */
.progress-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.5rem; margin: 2rem 0; }
.stat-card { background: var(--bg-card); padding: 2rem; border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; }
.stat-number { font-size: 2.5rem; font-weight: 700; color: var(--primary); }
.stat-label { color: var(--text-light); font-size: .9rem; }
.empty-state { text-align: center; padding: 4rem 2rem; }
.results-table { width: 100%; border-collapse: collapse; background: var(--bg-card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.results-table th, .results-table td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
.results-table th { background: #f1f5f9; font-weight: 600; }

/* Ad slots (free plan only) */
.ad-slot { margin: 1.5rem 0; background: #fff7ed; border: 1px dashed #fdba74; border-radius: var(--radius); overflow: hidden; }
.ad-slot .ad-label { background: #ffedd5; color: #9a3412; font-size: .72rem; padding: .25rem .75rem; display: flex; justify-content: space-between; align-items: center; }
.ad-slot .ad-label a { color: #c2410c; font-weight: 600; text-decoration: none; }
.ad-slot .ad-label a:hover { text-decoration: underline; }
.ad-slot .ad-inner { padding: 1rem; }
.ad-placeholder { display: flex; flex-direction: column; align-items: center; gap: .35rem; text-align: center; color: #9a3412; }
.ad-placeholder .ad-emoji { font-size: 1.75rem; }
.ad-placeholder p { font-size: .85rem; color: #7c2d12; margin: 0; }
.ad-placeholder .btn { background: #f97316; margin-top: .5rem; }
.ad-placeholder .btn:hover { background: #ea580c; }
.ad-banner { min-height: 90px; }
.ad-inline { min-height: 120px; }
.ad-sidebar { min-height: 250px; }
.ad-sticky { position: sticky; bottom: 0; z-index: 50; margin: 0; border-radius: 0; border-left: none; border-right: none; border-bottom: none; }
.ad-sticky .ad-inner { padding: .5rem 1rem; }
.ad-sticky .ad-placeholder { flex-direction: row; gap: .75rem; text-align: left; }
.ad-sticky .ad-placeholder p { display: none; }

/* Premium / Pricing */
.tier-title { font-size: 1.6rem; margin-bottom: .25rem; }
.tier-sub { color: var(--text-light); margin-bottom: 1.25rem; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.pricing-grid-single { grid-template-columns: minmax(260px, 420px); }
.price-card { background: var(--bg-card); padding: 2rem 1.75rem; border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; position: relative; }
.price-card-featured { border: 2px solid var(--primary); box-shadow: 0 10px 25px -3px rgba(99,102,241,.25); transform: translateY(-4px); }
.price-tag { position: absolute; top: -12px; right: 16px; background: var(--primary); color: white; padding: .25rem .75rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.price-card h3 { margin: .5rem 0; font-size: 1.15rem; }
.price-amount { font-size: 2rem; font-weight: 800; color: var(--primary-dark); margin: .25rem 0; }
.price-amount small { font-size: .95rem; font-weight: 500; color: var(--text-light); }
.price-sub { color: var(--text-light); font-size: .88rem; margin-bottom: 1rem; }
.price-card ul { list-style: none; padding: 0; margin: 1rem 0 1.5rem; flex: 1; }
.price-card ul li { padding: .3rem 0; font-size: .88rem; }
.small-note { text-align: center; color: var(--text-light); font-size: .85rem; margin: 1.5rem 0 2rem; }

.pricing-compare { margin: 2.5rem 0; }
.pricing-compare h3 { margin-bottom: 1rem; }
.compare-table { width: 100%; border-collapse: collapse; background: var(--bg-card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.compare-table th, .compare-table td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); font-size: .9rem; }
.compare-table th { background: #f1f5f9; font-weight: 600; }
.compare-table .row-featured { background: #eef2ff; font-weight: 500; }

.premium-banner { background: linear-gradient(135deg, #6366f1, #06b6d4); color: white; padding: 2rem; border-radius: var(--radius); text-align: center; margin: 2rem 0; }
.premium-banner h3 { font-size: 1.4rem; margin-bottom: .5rem; }
.premium-banner p { opacity: .9; margin-bottom: 1rem; }
.premium-banner .btn { background: white; color: var(--primary); }

.lesson-card.locked { opacity: .7; background: #f8fafc; }
.lesson-card.locked .lesson-number { background: #94a3b8; }

.nav-premium { font-weight: 600; color: var(--primary-dark) !important; }
.badge-premium { background: linear-gradient(135deg, #f59e0b, #ef4444) !important; }
.badge-pro.user-badge { background: linear-gradient(135deg, #6366f1, #06b6d4) !important; }

/* Footer */
.footer { background: #1e293b; color: #94a3b8; padding: 2rem 1.5rem; text-align: center; margin-top: 3rem; }
.footer-sub { font-size: .85rem; margin-top: .5rem; }

/* Mobile */
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: white; padding: 1rem; border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .hero h1 { font-size: 1.8rem; }
  .hero-sub { font-size: 1rem; }
  .module-card { flex-direction: column; }
  .module-card-icon { padding: 1.5rem; text-align: center; }
  .lesson-nav-bottom { flex-direction: column; }
  .lesson-enhancements-grid { grid-template-columns: 1fr; }
}
