/* BPO Training Demo — Global Styles */
/* SupportDDS Training Academy */

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #1B3A5C;
  --primary-light: #2A5580;
  --secondary: #0D9488;
  --secondary-light: #14B8A6;
  --accent: #D4A843;
  --accent-light: #E8C874;
  --bg: #F8F9FA;
  --bg-dark: #0F172A;
  --text: #1E293B;
  --text-light: #64748B;
  --text-on-dark: #E2E8F0;
  --success: #16A34A;
  --warning: #F59E0B;
  --error: #DC2626;
  --border: #E2E8F0;
  --card-bg: #FFFFFF;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 720px;
  --max-width-wide: 1200px;
  --nav-height: 64px;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--secondary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary); }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.3; color: var(--primary); }
h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 1.75rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
h4 { font-size: 1.1rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; }

.text-light { color: var(--text-light); }
.text-accent { color: var(--accent); }
.text-secondary { color: var(--secondary); }

code, .code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: #F1F5F9;
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--primary);
}

/* ===== NAV ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
}

.nav__brand i { color: var(--accent); }

.nav__links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav__links a {
  color: var(--text-on-dark);
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.nav__links a:hover, .nav__links a.active { opacity: 1; color: var(--accent); }

.nav__toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 8px;
}

body { padding-top: var(--nav-height); }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: var(--bg-dark);
}

.hero__bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: 0.35;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  padding: 3rem 1.5rem;
  color: white;
}

.hero__badge {
  display: inline-block;
  background: var(--accent);
  color: var(--bg-dark);
  padding: 0.35rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

.hero h1 { color: white; font-size: 2.75rem; margin-bottom: 1rem; }
.hero p { color: rgba(255,255,255,0.85); font-size: 1.15rem; max-width: 550px; margin: 0 auto 1.5rem; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn--primary { background: var(--secondary); color: white; }
.btn--primary:hover { background: var(--secondary-light); color: white; }

.btn--accent { background: var(--accent); color: var(--bg-dark); }
.btn--accent:hover { background: var(--accent-light); color: var(--bg-dark); }

.btn--outline { background: transparent; border: 2px solid var(--border); color: var(--text); }
.btn--outline:hover { border-color: var(--secondary); color: var(--secondary); }

.btn--sm { padding: 0.5rem 1rem; font-size: 0.85rem; }
.btn--lg { padding: 1rem 2rem; font-size: 1.05rem; }

/* ===== SECTIONS ===== */
.section {
  padding: 4rem 1.5rem;
  max-width: var(--max-width-wide);
  margin: 0 auto;
}

.section--narrow { max-width: var(--max-width); }

.section--dark {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  max-width: none;
}

.section--dark h2,
.section--dark h3 { color: white; }

.section--alt { background: white; max-width: none; }

/* ===== CARDS ===== */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.card__img { width: 100%; height: 200px; object-fit: cover; }
.card__body { padding: 1.25rem; }
.card__title { font-size: 1.1rem; margin-bottom: 0.5rem; }
.card__text { color: var(--text-light); font-size: 0.9rem; margin-bottom: 0.75rem; }

/* Module card specific */
.module-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  border-left: 4px solid transparent;
}

.module-card:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
  border-left-color: var(--secondary);
  color: inherit;
}

.module-card__num {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.module-card__content { flex: 1; }
.module-card__title { font-size: 1rem; margin-bottom: 0.25rem; color: var(--primary); }
.module-card__desc { font-size: 0.85rem; color: var(--text-light); margin: 0; }
.module-card__meta { font-size: 0.8rem; color: var(--text-light); margin-top: 0.5rem; display: flex; gap: 1rem; align-items: center; }

/* ===== GRID ===== */
.grid { display: grid; gap: 1.5rem; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ===== STATS BAR ===== */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 3rem;
  padding: 2rem 1.5rem;
  background: var(--primary);
  color: white;
  text-align: center;
  flex-wrap: wrap;
}

.stat__value { font-size: 2rem; font-weight: 800; color: var(--accent); display: block; }
.stat__label { font-size: 0.85rem; opacity: 0.8; }

/* ===== CHECKLIST TABLE ===== */
.checklist {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.checklist th {
  background: var(--primary);
  color: white;
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
}

.checklist td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.checklist tr:hover { background: #F1F5F9; }

.checklist .field-num {
  width: 40px;
  text-align: center;
  font-weight: 700;
  color: var(--secondary);
}

/* ===== CALLOUT ===== */
.callout {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin: 1.5rem 0;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.callout--info { background: #EFF6FF; border-left: 4px solid #3B82F6; }
.callout--warning { background: #FFFBEB; border-left: 4px solid var(--warning); }
.callout--success { background: #F0FDF4; border-left: 4px solid var(--success); }
.callout--error { background: #FEF2F2; border-left: 4px solid var(--error); }
.callout i { margin-top: 2px; flex-shrink: 0; }
.callout p { margin: 0; font-size: 0.9rem; }

/* ===== PROGRESS BAR ===== */
.progress {
  background: var(--border);
  border-radius: 20px;
  height: 8px;
  overflow: hidden;
  margin: 0.5rem 0;
}

.progress__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--secondary), var(--secondary-light));
  border-radius: 20px;
  transition: width 0.5s ease;
}

/* ===== LESSON NAV (bottom) ===== */
.lesson-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 0;
  margin-top: 3rem;
  border-top: 1px solid var(--border);
}

.lesson-nav a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

/* Gated next-section link — locked until quiz is completed */
.lesson-nav a.gated {
  opacity: 0.35;
  pointer-events: none;
  position: relative;
}

.lesson-nav a.gated::after {
  content: 'Complete the check above to continue';
  position: absolute;
  bottom: -1.5rem;
  right: 0;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-light);
  white-space: nowrap;
}

.lesson-nav a.gated.unlocked {
  opacity: 1;
  pointer-events: auto;
}

.lesson-nav a.gated.unlocked::after {
  display: none;
}

/* ===== FLASHCARD ===== */
.flashcard-deck {
  perspective: 1000px;
  max-width: 500px;
  margin: 2rem auto;
}

.flashcard {
  position: relative;
  width: 100%;
  aspect-ratio: 3/2;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.6s;
}

.flashcard.flipped { transform: rotateY(180deg); }

.flashcard__face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  border-radius: var(--radius-lg);
  backface-visibility: hidden;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.flashcard__front {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
}

.flashcard__front h3 { color: white; font-size: 1.5rem; }

.flashcard__back {
  background: white;
  transform: rotateY(180deg);
  border: 2px solid var(--secondary);
}

.flashcard__back h3 { font-size: 1.3rem; }
.flashcard__back p { color: var(--text-light); font-size: 0.9rem; margin-top: 0.5rem; }

.flashcard-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  align-items: center;
}

.flashcard-counter {
  font-weight: 600;
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ===== QUIZ ===== */
.quiz-question {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.quiz-question__text { font-weight: 600; margin-bottom: 1rem; }

.quiz-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: white;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.95rem;
}

.quiz-option:hover { border-color: var(--secondary); background: #F0FDFA; }
.quiz-option.correct { border-color: var(--success); background: #F0FDF4; }
.quiz-option.incorrect { border-color: var(--error); background: #FEF2F2; }
.quiz-option.selected { border-color: var(--secondary); background: #F0FDFA; }

.quiz-feedback {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-top: 0.75rem;
  font-size: 0.9rem;
  display: none;
}

.quiz-feedback.show { display: block; }
.quiz-feedback.correct { background: #F0FDF4; color: #166534; }
.quiz-feedback.incorrect { background: #FEF2F2; color: #991B1B; }

/* ===== DECISION TREE ===== */
.decision-tree {
  max-width: 600px;
  margin: 2rem auto;
}

.dt-step {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  text-align: center;
  display: none;
}

.dt-step.active { display: block; animation: fadeIn 0.3s ease; }

.dt-step__scenario {
  background: #F1F5F9;
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  text-align: left;
}

.dt-step__question {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.dt-option {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: white;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
  font-size: 0.95rem;
}

.dt-option:hover { border-color: var(--secondary); background: #F0FDFA; }

.dt-result {
  padding: 1.25rem;
  border-radius: var(--radius);
  margin-top: 1rem;
}

.dt-result.correct { background: #F0FDF4; border: 2px solid var(--success); }
.dt-result.incorrect { background: #FEF2F2; border: 2px solid var(--error); }

/* ===== FILL IN THE BLANK ===== */
.fib-sentence {
  font-size: 1.1rem;
  line-height: 2;
  margin-bottom: 1.5rem;
}

.fib-blank {
  display: inline-block;
  min-width: 150px;
  border-bottom: 2px solid var(--primary);
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  text-align: center;
  outline: none;
  transition: border-color 0.2s;
}

.fib-blank:focus { border-color: var(--secondary); }
.fib-blank.correct { border-color: var(--success); background: #F0FDF4; }
.fib-blank.incorrect { border-color: var(--error); background: #FEF2F2; }

/* ===== CODED VISUAL MOCKUP ===== */
.mockup-window {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin: 1.5rem 0;
}

.mockup-window__titlebar {
  background: #1E293B;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mockup-window__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.mockup-window__dot--red { background: #EF4444; }
.mockup-window__dot--yellow { background: #EAB308; }
.mockup-window__dot--green { background: #22C55E; }

.mockup-window__title {
  color: #94A3B8;
  font-size: 0.8rem;
  margin-left: 0.5rem;
}

.mockup-window__content {
  background: #F8FAFC;
  padding: 1.5rem;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.85rem;
}

.footer a { color: var(--accent); }
.footer a:hover { color: var(--accent-light); }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.fade-in { animation: fadeIn 0.4s ease-out; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.35rem; }
  .hero h1 { font-size: 2rem; }
  .hero { min-height: 50vh; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .stats-bar { gap: 1.5rem; }
  .stat__value { font-size: 1.5rem; }
  .section { padding: 2.5rem 1rem; }

  .nav__links { display: none; }
  .nav__toggle { display: block; }
  .nav__links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--primary);
    padding: 1rem;
    gap: 0.75rem;
  }

  .module-card { flex-direction: column; }
  .lesson-nav { flex-direction: column; gap: 1rem; }
}

@media (max-width: 480px) {
  .hero__content { padding: 2rem 1rem; }
  .flashcard { aspect-ratio: 4/3; }
}
