/* ============================================================
   styles.css — businessgcse.com
   Option D: Soft Slate & Coral · Friendly & Approachable
   Fonts: Nunito (headings) + Plus Jakarta Sans (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600&display=swap');

/* ── Variables ── */
:root {
  --bg:       #f0f4f8;
  --bg2:      #e8eef5;
  --card:     #ffffff;
  --card2:    #f8fafc;
  --border:   #dde4ed;
  --border2:  #c8d4e0;
  --text:     #1e2d3d;
  --muted:    #7a90a6;
  --muted2:   #a0b4c4;
  --accent:   #e85d3a;
  --accent2:  #f07a5c;
  --accent-bg:#fdf0ec;
  --accent-border:#f4c5b5;
  --green:    #1a7a4a;
  --green-bg: #eaf7f0;
  --red:      #c0392b;
  --red-bg:   #fdf0ee;
  --amber:    #b85c00;
  --amber-bg: #fff7ed;
  --blue:     #1a5a9a;
  --blue-bg:  #eef4fd;
  --shadow-sm: 0 1px 4px rgba(30,45,61,.07);
  --shadow:    0 3px 12px rgba(30,45,61,.1);
  --shadow-lg: 0 8px 32px rgba(30,45,61,.12);
  --radius-sm: .5rem;
  --radius:    .85rem;
  --radius-lg: 1.25rem;
}

/* ── Reset ── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

/* ── Base ── */
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Subtle dot-grid texture (replaces starfield) ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, #c8d4e0 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: .45;
}

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
}
h1 { font-size: clamp(2rem,5vw,3rem); }
h2 { font-size: clamp(1.3rem,3vw,1.75rem); }
h3 { font-size: 1.15rem; }
p  { color: var(--muted); font-size: .95rem; line-height: 1.75; }
a  { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { color: var(--text); }

/* ── Layout ── */
.wrap {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.25rem 5rem;
}

/* ── Tag / badge ── */
.tag {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .1em;
  padding: .28rem .9rem;
  border-radius: 999px;
  text-transform: uppercase;
}

/* ── Cards ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.1rem;
  box-shadow: var(--shadow-sm);
}
.card h2 {
  font-size: 1.05rem;
  color: var(--accent);
  margin-bottom: .85rem;
}
.card2 {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--accent);
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: .92rem;
  padding: .65rem 1.75rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: background .2s, transform .12s;
  text-decoration: none;
}
.btn:hover { background: var(--accent2); text-decoration: none; color: #fff; }
.btn:active { transform: scale(.97); }
.btn.sec {
  background: transparent;
  border: 2px solid var(--border2);
  color: var(--muted);
}
.btn.sec:hover { border-color: var(--accent); color: var(--accent); }

/* ── Home button (fixed) ── */
.home-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 999px;
  padding: .55rem 1.1rem .55rem .85rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: .85rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: border-color .2s, color .2s, box-shadow .2s;
}
.home-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}

/* ── Nav cards (homepage) ── */
.nav-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  cursor: pointer;
  transition: box-shadow .2s, transform .15s, border-color .2s;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.nav-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.card-icon { font-size: 2rem; display: block; margin-bottom: .5rem; }
.card-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .3rem;
}
.card-title {
  font-family: 'Nunito', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: .5rem;
  line-height: 1.25;
}
.card-desc {
  font-size: .84rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: .85rem;
}
.card-footer {
  font-family: 'Nunito', sans-serif;
  font-size: .82rem;
  font-weight: 700;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: .35rem;
}
.chip {
  display: inline-block;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  border-radius: 999px;
  padding: .18rem .65rem;
  font-size: .72rem;
  font-weight: 700;
  margin: .1rem .1rem .1rem 0;
}
.topic-chips { margin-bottom: .85rem; }

/* ── Stats row (homepage) ── */
.stats-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 2rem 0;
}
.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  min-width: 110px;
}
.stat-num {
  font-family: 'Nunito', sans-serif;
  font-size: 2rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}
.stat-label {
  font-size: .72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-top: .3rem;
}

/* ── Tab navigation ── */
.tab-nav {
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .4rem;
  margin-bottom: 1.25rem;
  position: sticky;
  top: .5rem;
  z-index: 10;
  box-shadow: var(--shadow-sm);
}
.tab-btn {
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  padding: .45rem .9rem;
  font-family: 'Nunito', sans-serif;
  font-size: .82rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: background .18s, color .18s;
  white-space: nowrap;
}
.tab-btn:hover { background: var(--bg2); color: var(--text); }
.tab-btn.active {
  background: var(--accent);
  color: #fff;
}

/* ── Quiz options ── */
.quiz-opt {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--card2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: .85rem 1.1rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: .92rem;
  color: var(--text);
  cursor: pointer;
  transition: border-color .18s, background .18s;
  margin-bottom: .5rem;
}
.quiz-opt:hover { border-color: var(--accent); background: var(--accent-bg); }
.quiz-opt.correct { border-color: var(--green); background: var(--green-bg); color: var(--green); }
.quiz-opt.wrong   { border-color: var(--red);   background: var(--red-bg);   color: var(--red); }

/* ── Match game cards ── */
.match-card {
  background: var(--card2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: .85rem;
  font-size: .84rem;
  color: var(--text);
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .12s;
  text-align: center;
  line-height: 1.5;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.match-card:hover { border-color: var(--accent); transform: scale(1.02); }
.match-card.selected { border-color: var(--accent); background: var(--accent-bg); }
.match-card.matched  { border-color: var(--green); background: var(--green-bg); color: var(--green); }
.match-card.wrong    { border-color: var(--red);   background: var(--red-bg); }

/* ── Info / tip boxes ── */
.info-box {
  background: var(--blue-bg);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius-sm);
  padding: .85rem 1rem;
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.65;
  margin: .75rem 0;
}
.tip-box {
  background: var(--amber-bg);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius-sm);
  padding: .85rem 1rem;
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.65;
}

/* ── Tables ── */
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th {
  background: var(--accent);
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  padding: .65rem 1rem;
  text-align: left;
}
td {
  padding: .6rem 1rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
tr:last-child td { border-bottom: none; }
tr:nth-child(even) td { background: var(--card2); }

/* ── Footer ── */
.footer {
  text-align: center;
  color: var(--muted2);
  font-size: .8rem;
  padding: 2rem 0 1rem;
  line-height: 1.8;
}
.footer a { color: var(--muted); font-weight: 600; }
.footer a:hover { color: var(--accent); }

/* ── Feedback colours ── */
.correct-text { color: var(--green); font-weight: 700; }
.wrong-text   { color: var(--red);   font-weight: 700; }
.muted-text   { color: var(--muted); }
.accent-text  { color: var(--accent); font-weight: 700; }

/* ── Animations ── */
.fadeUp {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .5s ease, transform .5s ease;
}
.fadeUp.visible { opacity: 1; transform: none; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── Selection ── */
::selection { background: var(--accent-bg); color: var(--accent); }

/* ── Responsive ── */
@media (max-width: 600px) {
  .wrap { padding: 1.25rem 1rem 4rem; }
  .card { padding: 1.1rem; }
  h1 { font-size: 1.75rem; }
}
