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

:root {
  --teal: #0d9488;
  --teal-light: #ccfbf1;
  --purple: #7c3aed;
  --purple-light: #ede9fe;
  --green: #16a34a;
  --green-light: #dcfce7;
  --orange: #ea580c;
  --orange-light: #ffedd5;
  --blue: #2563eb;
  --blue-light: #dbeafe;
  --yellow: #ca8a04;
  --yellow-light: #fef9c3;
  --pink: #db2777;
  --pink-light: #fce7f3;
  --bg: #f0fdf4;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 24px rgba(0,0,0,0.07);
  --shadow-hover: 0 8px 32px rgba(0,0,0,0.13);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.7;
}

/* ===== HEADER ===== */
.header {
  background: linear-gradient(135deg, #064e3b 0%, #065f46 40%, #0d9488 100%);
  color: white;
  padding: 2.5rem 1.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.header::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 220px; height: 220px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}
.header::after {
  content: '';
  position: absolute;
  bottom: -40px; left: -40px;
  width: 160px; height: 160px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}
.header-inner { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; }
.header-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #a7f3d0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 1rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
}
.header-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}
.header-sub {
  font-size: 0.95rem;
  opacity: 0.8;
  margin-bottom: 1.5rem;
}
.progress-bar-wrap {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  max-width: 400px;
  margin: 0 auto;
}
.progress-bar-track {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,0.2);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6ee7b7, #34d399);
  border-radius: 999px;
  transition: width 0.5s ease;
}
.progress-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #a7f3d0;
  white-space: nowrap;
}

/* ===== TAB NAV ===== */
.tab-nav {
  display: flex;
  gap: 0.4rem;
  padding: 1rem 1rem 0;
  background: white;
  border-bottom: 2px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.tab-nav::-webkit-scrollbar { display: none; }
.tab-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.1rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: 'Nunito', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}
.tab-btn:hover { background: var(--teal-light); color: var(--teal); }
.tab-btn.active {
  color: var(--teal);
  border-bottom-color: var(--teal);
  background: var(--teal-light);
}

/* ===== MAIN CONTENT ===== */
.main-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

/* ===== TAB PANELS ===== */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ===== SECTION CARDS ===== */
.section-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: box-shadow 0.2s;
}
.section-card:hover { box-shadow: var(--shadow-hover); }

.card-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1.4rem;
  color: white;
}
.card-header.teal    { background: linear-gradient(135deg, #0d9488, #0f766e); }
.card-header.purple  { background: linear-gradient(135deg, #7c3aed, #6d28d9); }
.card-header.green   { background: linear-gradient(135deg, #16a34a, #15803d); }
.card-header.orange  { background: linear-gradient(135deg, #ea580c, #c2410c); }
.card-header.blue    { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.card-header.yellow  { background: linear-gradient(135deg, #ca8a04, #a16207); }
.card-header.pink    { background: linear-gradient(135deg, #db2777, #be185d); }

.card-icon { font-size: 1.5rem; }
.card-header h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}

.card-body { padding: 1.4rem; }
.card-body p { margin-bottom: 0.8rem; color: var(--text); }

/* ===== FEATURE GRID ===== */
.feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.8rem 0;
}
.feature-chip {
  background: var(--teal-light);
  color: var(--teal);
  border: 1px solid #99f6e4;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

/* ===== INFO BOXES ===== */
.info-box {
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  margin-bottom: 0.8rem;
  font-size: 0.92rem;
}
.info-box.blue   { background: var(--blue-light);   border-left: 4px solid var(--blue); }
.info-box.green  { background: var(--green-light);  border-left: 4px solid var(--green); }
.info-box.orange { background: var(--orange-light); border-left: 4px solid var(--orange); }
.info-box.teal   { background: var(--teal-light);   border-left: 4px solid var(--teal); }
.info-box strong { display: block; margin-bottom: 0.4rem; }
.info-box ul { padding-left: 1.2rem; }
.info-box ul li { margin-bottom: 0.2rem; }

/* ===== TWO COL ===== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}
@media (max-width: 540px) { .two-col { grid-template-columns: 1fr; } }

/* ===== RANGE CARDS ===== */
.range-cards { display: flex; flex-direction: column; gap: 0.6rem; margin: 0.8rem 0; }
.range-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: var(--purple-light);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  border: 1px solid #ddd6fe;
}
.range-num {
  width: 32px; height: 32px;
  background: var(--purple);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.range-info { display: flex; flex-direction: column; }
.range-info strong { font-size: 0.95rem; color: var(--purple); }
.range-info span { font-size: 0.82rem; color: var(--text-muted); }

/* ===== SOIL CARDS ===== */
.soil-card {
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.soil-card strong { font-size: 1rem; }
.soil-card span { font-size: 0.85rem; }
.soil-card.bhangar { background: #fef3c7; border: 1px solid #fde68a; color: #92400e; }
.soil-card.khadar  { background: var(--green-light); border: 1px solid #86efac; color: #14532d; }

/* ===== STAR BOX ===== */
.star-box {
  background: linear-gradient(135deg, #fef9c3, #fef3c7);
  border: 2px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  margin: 0.8rem 0;
}
.star-box h4 { font-size: 0.95rem; margin-bottom: 0.5rem; color: #92400e; }
.star-box ul { padding-left: 1.2rem; }
.star-box ul li { margin-bottom: 0.3rem; font-size: 0.92rem; }

/* ===== KEY CONCEPT ===== */
.key-concept {
  background: linear-gradient(135deg, #ede9fe, #ddd6fe);
  border-left: 4px solid var(--purple);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  font-size: 0.92rem;
  margin-top: 0.8rem;
}

/* ===== SUB HEADING ===== */
.sub-heading {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
  margin: 1rem 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.7;
}

/* ===== STYLED LIST ===== */
.styled-list { padding-left: 1.3rem; }
.styled-list li { margin-bottom: 0.4rem; font-size: 0.93rem; }

/* ===== DIVISIONS TAB ===== */
.divisions-intro {
  text-align: center;
  padding: 1.5rem 1rem 0.5rem;
}
.divisions-intro h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.divisions-intro p { color: var(--text-muted); font-size: 0.9rem; }

.divisions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.2rem;
}
@media (max-width: 580px) { .divisions-grid { grid-template-columns: 1fr; } }

.div-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.div-card:hover { box-shadow: var(--shadow-hover); }

.div-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.9rem 1.1rem;
  color: white;
  position: relative;
}
.div-header.mountains { background: linear-gradient(135deg, #4338ca, #6d28d9); }
.div-header.plains    { background: linear-gradient(135deg, #16a34a, #15803d); }
.div-header.plateau   { background: linear-gradient(135deg, #b45309, #92400e); }
.div-header.desert    { background: linear-gradient(135deg, #ca8a04, #a16207); }
.div-header.coastal   { background: linear-gradient(135deg, #0284c7, #0369a1); }
.div-header.islands   { background: linear-gradient(135deg, #0d9488, #0f766e); }

.div-icon { font-size: 1.3rem; }
.div-header h3 { font-size: 0.95rem; font-weight: 800; flex: 1; }
.div-arrow {
  font-size: 0.8rem;
  transition: transform 0.3s;
}
.div-card.open .div-arrow { transform: rotate(180deg); }

.div-body {
  display: none;
  padding: 0.8rem;
}
.div-card.open .div-body { display: block; }

.div-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.div-table tr:nth-child(even) { background: #f8fafc; }
.div-table td {
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.div-table td:first-child {
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
  width: 40%;
}

/* ===== Q&A TAB ===== */
.qa-intro {
  text-align: center;
  padding: 1.5rem 1rem 0.5rem;
}
.qa-intro h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.qa-intro p { color: var(--text-muted); font-size: 0.9rem; }

.qa-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.2rem;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: box-shadow 0.2s;
}
.qa-card:hover { box-shadow: var(--shadow-hover); }

.qa-question {
  padding: 1.1rem 1.3rem;
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  flex-wrap: wrap;
}
.q-num {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: white;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 0.15rem;
}
.qa-question p {
  flex: 1;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  min-width: 200px;
}
.show-ans-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--purple-light);
  color: var(--purple);
  border: 1px solid #ddd6fe;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.show-ans-btn:hover { background: var(--purple); color: white; }
.show-ans-btn.revealed { background: var(--green-light); color: var(--green); border-color: #86efac; }

.qa-answer {
  padding: 1.1rem 1.3rem;
  background: #f8fafc;
  border-top: 2px dashed var(--border);
  font-size: 0.92rem;
}
.qa-answer.hidden { display: none; }
.qa-answer p { margin-bottom: 0.6rem; }
.qa-answer ul { padding-left: 1.3rem; margin-bottom: 0.6rem; }
.qa-answer ul li { margin-bottom: 0.3rem; }
.qa-answer ul ul { margin-top: 0.2rem; }

.ans-label {
  display: inline-block;
  background: var(--green-light);
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.8rem;
  border: 1px solid #86efac;
}

.conclusion {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  border-left: 4px solid var(--green);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  font-weight: 700;
  font-size: 0.9rem;
  margin-top: 0.8rem;
  color: #14532d;
}

.tip-box {
  background: var(--yellow-light);
  border-left: 4px solid var(--yellow);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  font-size: 0.88rem;
  margin-top: 0.8rem;
}

/* ===== QUICK REVISION TAB ===== */
.glossary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
@media (max-width: 540px) { .glossary-grid { grid-template-columns: 1fr; } }

.gloss-item {
  background: var(--purple-light);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
  border: 1px solid #ddd6fe;
}
.gloss-term {
  display: block;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--purple);
  margin-bottom: 0.2rem;
}
.gloss-def {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.location-list { display: flex; flex-direction: column; gap: 0.6rem; }
.loc-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: var(--teal-light);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  border: 1px solid #99f6e4;
}
.loc-icon { font-size: 1.3rem; flex-shrink: 0; }
.loc-item div { display: flex; flex-direction: column; }
.loc-item strong { font-size: 0.92rem; color: var(--teal); }
.loc-item span { font-size: 0.82rem; color: var(--text-muted); }

.tips-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}
@media (max-width: 540px) { .tips-grid { grid-template-columns: 1fr; } }

.tip-card {
  background: var(--green-light);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  border: 1px solid #86efac;
}
.tip-marks {
  font-weight: 900;
  font-size: 0.85rem;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}
.tip-card p { font-size: 0.88rem; color: var(--text); margin: 0; }

.hot-topics {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.hot-item {
  background: var(--orange-light);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  font-size: 0.92rem;
  font-weight: 700;
  border: 1px solid #fed7aa;
  color: #7c2d12;
}

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  padding: 1.5rem 1rem;
  background: white;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.tab-panel.active { animation: fadeIn 0.3s ease; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }