/* ==========================================================================
   NeoMath.in — Modern Educational Mathematics Stylesheet
   Classes: 8, 9, 10 (CBSE / NCERT Syllabus)
   Colors: Midnight Navy, Electric Cyan Accent, Violet Accent, Clean Light Reading Surfaces
   ========================================================================== */

:root {
  /* Dark Cosmic Theme Variables */
  --bg-dark: #070c18;
  --bg-navy: #0d1527;
  --bg-card: #131f37;
  --bg-card-hover: #192847;
  --border-dark: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 242, 254, 0.3);

  /* Accents */
  --cyan: #00f2fe;
  --cyan-bright: #38bdf8;
  --cyan-dark: #0284c7;
  --violet: #a855f7;
  --violet-bright: #c084fc;
  --violet-dark: #7e22ce;
  --emerald: #10b981;
  --amber: #f59e0b;

  /* Typography Colors */
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Light Reading Mode Variables (for notes, articles & formula sheets) */
  --surface-light: #ffffff;
  --surface-light-alt: #f8fafc;
  --text-light-dark: #0f172a;
  --text-light-muted: #475569;
  --border-light: #e2e8f0;

  /* Layout */
  --max-width: 1200px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(0, 242, 254, 0.2);
}

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

html {
  scroll-behavior: smooth;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(0, 242, 254, 0.07) 0%, transparent 40%),
    radial-gradient(circle at 85% 65%, rgba(168, 85, 247, 0.08) 0%, transparent 45%),
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
  background-position: 0 0, 0 0, 0 0, 0 0;
  color: var(--text-main);
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font: inherit;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(13, 21, 39, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-dark);
  transition: var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.logo-symbol {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #00f2fe 0%, #a855f7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #070c18;
  font-size: 1.25rem;
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
}

.brand-text {
  background: linear-gradient(90deg, #ffffff 0%, #d4f7fc 60%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tld {
  font-size: 0.85rem;
  color: var(--cyan);
  font-weight: 600;
  opacity: 0.9;
  -webkit-text-fill-color: var(--cyan);
}

/* Desktop Navigation */
.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0.4rem;
}

.nav-link {
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  transition: var(--transition);
}

.nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: var(--cyan);
  background: rgba(0, 242, 254, 0.08);
  font-weight: 600;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--cyan);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--cyan);
}

.nav-cta {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.15) 0%, rgba(168, 85, 247, 0.15) 100%);
  border: 1px solid rgba(0, 242, 254, 0.4);
  color: var(--cyan) !important;
  font-weight: 600;
  padding: 0.5rem 1rem !important;
  border-radius: var(--radius-full) !important;
}

.nav-cta:hover {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--violet) 100%);
  color: #070c18 !important;
  border-color: transparent;
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
}

/* Mobile Hamburger */
.mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-dark);
  color: var(--text-main);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
}

.mobile-toggle svg {
  width: 24px;
  height: 24px;
}

/* Mobile Drawer */
.mobile-drawer {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  background: rgba(13, 21, 39, 0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-dark);
  padding: 1.5rem;
  z-index: 999;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

.mobile-drawer.open {
  display: block;
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-nav-link.active {
  background: rgba(0, 242, 254, 0.1);
  color: var(--cyan);
  border-color: rgba(0, 242, 254, 0.3);
  font-weight: 600;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.hero-glow {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 350px;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.15) 0%, rgba(168, 85, 247, 0.1) 50%, transparent 80%);
  filter: blur(60px);
  z-index: -1;
  pointer-events: none;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.25);
  color: var(--cyan);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  color: #ffffff;
}

.text-gradient {
  background: linear-gradient(135deg, #00f2fe 0%, #38bdf8 40%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, #00f2fe 0%, #06b6d4 50%, #8b5cf6 100%);
  color: #070c18;
  box-shadow: 0 4px 20px rgba(0, 242, 254, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 242, 254, 0.5);
  color: #070c18;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
  padding: 1.5rem;
  background: rgba(19, 31, 55, 0.6);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-dark);
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.2rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Section Headers & Common Layout
   ========================================================================== */
.section {
  padding: 5rem 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 3.5rem;
}

.section-tag {
  color: var(--cyan);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 0.8rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1rem;
}

/* ==========================================================================
   Class Selector Cards (Home Page)
   ========================================================================== */
.class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.class-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.class-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--cyan) 0%, var(--violet) 100%);
  opacity: 0.6;
  transition: var(--transition);
}

.class-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 242, 254, 0.4);
  box-shadow: 0 15px 35px -10px rgba(0, 242, 254, 0.2);
}

.class-card:hover::before {
  opacity: 1;
}

.class-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  width: fit-content;
}

.badge-c8 {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-c9 {
  background: rgba(0, 242, 254, 0.15);
  color: var(--cyan);
  border: 1px solid rgba(0, 242, 254, 0.3);
}

.badge-c10 {
  background: rgba(168, 85, 247, 0.15);
  color: var(--violet-bright);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.class-card-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.75rem;
}

.class-card-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.class-card-topics {
  list-style: none;
  margin-bottom: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.class-card-topics li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: #cbd5e1;
}

.class-card-topics li svg {
  color: var(--cyan);
  flex-shrink: 0;
}

.class-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ==========================================================================
   Chapter List Cards (Class 8, 9, 10 Pages)
   ========================================================================== */
.chapters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.chapter-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}

.chapter-card:hover {
  border-color: rgba(0, 242, 254, 0.3);
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

.chapter-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.chapter-num {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.7rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  color: var(--cyan);
  border: 1px solid rgba(0, 242, 254, 0.2);
}

.chapter-badge-type {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 500;
}

.chapter-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.chapter-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.4rem;
  flex-grow: 1;
}

.chapter-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   YouTube Videos Cards & Filter
   ========================================================================== */
.filter-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.filter-btn {
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.filter-btn.active {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.2) 0%, rgba(168, 85, 247, 0.2) 100%);
  border-color: var(--cyan);
  color: var(--cyan);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.video-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 242, 254, 0.35);
  box-shadow: 0 12px 30px -10px rgba(0, 242, 254, 0.2);
}

.video-thumbnail-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0d1527;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.video-card:hover .video-thumbnail-img {
  transform: scale(1.04);
}

.video-play-btn {
  position: absolute;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(0, 242, 254, 0.9);
  color: #070c18;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.5);
  transition: var(--transition);
}

.video-card:hover .video-play-btn {
  background: #ffffff;
  transform: scale(1.1);
}

.video-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.video-content {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.video-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.video-class-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.video-chapter-name {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.video-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.4;
  margin-bottom: 1rem;
  flex-grow: 1;
}

/* ==========================================================================
   Blogs & Articles
   ========================================================================== */
.blogs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-5px);
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow: 0 12px 30px -10px rgba(168, 85, 247, 0.2);
}

.blog-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.blog-category-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-full);
  background: rgba(168, 85, 247, 0.12);
  color: var(--violet-bright);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.blog-read-time {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.blog-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
  margin-bottom: 0.75rem;
}

.blog-excerpt {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 1.4rem;
  flex-grow: 1;
}

/* ==========================================================================
   E-Books Cards
   ========================================================================== */
.ebooks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.2rem;
}

.ebook-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
}

.ebook-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 242, 254, 0.4);
  box-shadow: 0 15px 35px -10px rgba(0, 242, 254, 0.25);
}

.ebook-cover-graphic {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0c4a6e 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.ebook-cover-graphic::after {
  content: 'NeoMath';
  position: absolute;
  right: -20px;
  bottom: 20px;
  font-size: 3.5rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.03);
  pointer-events: none;
}

.ebook-cover-badge {
  background: var(--cyan);
  color: #070c18;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  width: fit-content;
}

.ebook-cover-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
}

.ebook-cover-subtitle {
  font-size: 0.85rem;
  color: var(--cyan);
  font-weight: 600;
}

.ebook-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.ebook-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1.4rem;
  flex-grow: 1;
}

.ebook-specs {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 1.2rem;
}

/* ==========================================================================
   Clean Light Reading Surfaces (For Chapter Notes & Blog Post)
   Requested: "White and light surfaces for reading content"
   ========================================================================== */
.reading-wrapper {
  background: var(--surface-light);
  color: var(--text-light-dark);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  margin: 2rem auto 4rem;
  max-width: 960px;
}

@media (max-width: 768px) {
  .reading-wrapper {
    padding: 2rem 1.25rem;
  }
}

.reading-header {
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 1.75rem;
  margin-bottom: 2.5rem;
}

.reading-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-light-muted);
  margin-bottom: 1rem;
}

.reading-breadcrumbs a {
  color: var(--cyan-dark);
  font-weight: 600;
}

.reading-breadcrumbs a:hover {
  text-decoration: underline;
}

.reading-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  color: var(--text-light-dark);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.reading-subtitle {
  font-size: 1.1rem;
  color: var(--text-light-muted);
  line-height: 1.5;
}

/* Mathematics Content Typography */
.content-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-light-dark);
  margin: 2.2rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.content-body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1e293b;
  margin: 1.75rem 0 0.75rem;
}

.content-body p {
  color: #334155;
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.content-body ul, .content-body ol {
  margin: 1rem 0 1.5rem 1.75rem;
  color: #334155;
}

.content-body li {
  margin-bottom: 0.5rem;
  font-size: 1.02rem;
  line-height: 1.6;
}

/* Mathematical Formula Cards */
.math-box {
  background: #f1f5f9;
  border-left: 4px solid #0284c7;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.math-box-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #0369a1;
  margin-bottom: 0.5rem;
}

.formula-display {
  font-family: 'Cambria Math', 'STIX Two Math', 'Latin Modern Math', Georgia, serif;
  font-size: 1.35rem;
  color: #0f172a;
  text-align: center;
  padding: 0.75rem 0;
  overflow-x: auto;
}

.formula-badge {
  display: inline-block;
  background: #e0f2fe;
  color: #0369a1;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.95rem;
  font-weight: 600;
}

/* Solved Example Box */
.example-box {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 1.75rem 0;
}

.example-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.example-tag {
  font-size: 0.82rem;
  font-weight: 700;
  color: #4338ca;
  background: #e0e7ff;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
}

.example-question {
  font-weight: 600;
  font-size: 1.05rem;
  color: #0f172a;
  margin-bottom: 1rem;
}

.example-solution {
  border-top: 1px dashed var(--border-light);
  padding-top: 1rem;
}

.solution-step {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.98rem;
  color: #334155;
}

.step-badge {
  background: #0284c7;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Chapter Resource Panel */
.chapter-resources {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 2.5rem 0;
}

.resource-card {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
}

.resource-card:hover {
  background: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.resource-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-red {
  background: #fee2e2;
  color: #dc2626;
}

.icon-blue {
  background: #e0f2fe;
  color: #0284c7;
}

.icon-purple {
  background: #f3e8ff;
  color: #7e22ce;
}

.resource-text h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.15rem;
}

.resource-text p {
  font-size: 0.82rem;
  color: #64748b;
  margin: 0;
}

/* ==========================================================================
   Contact Page & Form
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
}

@media (max-width: 860px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.contact-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}

.contact-method {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.contact-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  background: rgba(0, 242, 254, 0.1);
  color: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-detail h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.25rem;
}

.contact-detail p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.google-form-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  position: relative;
}

.form-embed-placeholder {
  background: rgba(255, 255, 255, 0.03);
  border: 2px dashed rgba(0, 242, 254, 0.3);
  border-radius: var(--radius-md);
  padding: 2.5rem 1.5rem;
  text-align: center;
  margin-top: 1.5rem;
}

/* Form Controls */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.4rem;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(13, 21, 39, 0.8);
  border: 1px solid var(--border-dark);
  color: #ffffff;
  transition: var(--transition);
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.25);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  margin-top: auto;
  background: #050811;
  border-top: 1px solid var(--border-dark);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3.5rem;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 550px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 1rem 0 1.5rem;
  max-width: 320px;
}

.footer-col h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1.2rem;
  letter-spacing: -0.01em;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--cyan);
  transform: translateX(3px);
  display: inline-block;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ==========================================================================
   Responsive Utilities
   ========================================================================== */
@media (max-width: 860px) {
  .nav-menu {
    display: none;
  }
  .mobile-toggle {
    display: flex;
  }
  .hero-section {
    padding: 3.5rem 0 2.5rem;
  }
}
