/* ============================================
   HamaraSchool.com — Shared Stylesheet
   Mobile-first, design system variables
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

/* --- CSS Variables (Design System) --- */
:root {
  /* Educational Color Palette */
  --primary: #2563EB;           /* Trust Blue */
  --primary-dark: #1E40AF;      /* Deep Blue */
  --primary-light: #DBEAFE;     /* Light Blue */
  
  --secondary: #7C3AED;         /* Purple - Creativity */
  --secondary-dark: #6D28D9;    /* Deep Purple */
  --secondary-light: #EDE9FE;   /* Light Purple */
  
  --accent: #059669;            /* Education Green */
  --accent-dark: #047857;       /* Deep Green */
  --accent-light: #D1FAE5;      /* Light Green */
  
  --warning: #DC2626;           /* Vibrant Red */
  --success: #10B981;           /* Success Green */
  --info: #06B6D4;              /* Cyan Blue */
  
  --paper-bg: #FFFBF8;          /* Warm White */
  --paper-line: #E5E7EB;        /* Neutral Gray */
  --ink: #111827;               /* Dark Gray */
  --ink-soft: #6B7280;          /* Medium Gray */
  
  --card-radius: 12px;
  --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --card-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
  --header-height: 68px;
  --container-max: 1200px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper-bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

ul {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Baloo 2', cursive;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}

/* --- Utility Classes --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1rem;
}

.section {
  padding: 3rem 0;
}

.section {
  padding: 3.5rem 0;
}

.section-title {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--ink);
  position: relative;
  padding-bottom: 1rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
}

.section-subtitle {
  color: var(--ink-soft);
  font-size: 1rem;
  margin-bottom: 2rem;
  font-weight: 500;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  letter-spacing: 0.3px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
}

.btn-primary:visited,
.btn-primary:hover,
.btn-primary:focus-visible {
  color: #fff;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), #0f2460);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
  color: #fff;
}

.btn-secondary:visited,
.btn-secondary:hover,
.btn-secondary:focus-visible {
  color: #fff;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, var(--secondary-dark), #5b21b6);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.btn-youtube {
  background: linear-gradient(135deg, #FF0000, #cc0000);
  color: #fff;
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem;
}

.btn-youtube:visited,
.btn-youtube:hover,
.btn-youtube:focus-visible {
  color: #fff;
}

.btn-youtube:hover {
  background: linear-gradient(135deg, #cc0000, #990000);
}

/* --- Tags --- */
.tag {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: 'Inter', sans-serif;
}

.tag-free {
  background: linear-gradient(135deg, var(--accent-light), rgba(16, 185, 129, 0.1));
  color: var(--accent-dark);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.tag-price {
  background: linear-gradient(135deg, var(--primary-light), rgba(37, 99, 235, 0.1));
  color: var(--primary-dark);
  border: 1px solid rgba(37, 99, 235, 0.3);
}

.tag-new {
  background: linear-gradient(135deg, var(--warning), rgba(220, 38, 38, 0.1));
  color: var(--warning);
  border: 1px solid rgba(220, 38, 38, 0.3);
}

.tag-popular {
  background: linear-gradient(135deg, var(--secondary-light), rgba(124, 58, 237, 0.1));
  color: var(--secondary-dark);
  border: 1px solid rgba(124, 58, 237, 0.3);
}

/* --- Trust Badge Row (chapter posts) --- */
.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.85rem 0;
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.7rem;
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-dark);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.trust-badge .checkmark {
  color: var(--success);
  font-weight: 800;
}

/* --- Post Meta: Last Updated + Author Box (DRAFT — single post template v2) --- */
.post-meta-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.last-updated {
  display: block;
  font-size: 0.8rem;
  color: var(--ink-soft);
  font-weight: 500;
}

.author-box {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--ink-soft);
  font-style: italic;
}

.author-box strong {
  color: var(--ink);
  font-style: normal;
}

/* --- Chapter Post Paid PDF CTA (DRAFT — dedicated, does not reuse .membership-banner) --- */
.chapter-pdf-cta {
  background: linear-gradient(135deg, var(--ink) 0%, #1F2937 100%);
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.chapter-pdf-cta-info h2 {
  color: #fff;
  font-size: 1.35rem;
  line-height: 1.35;
  margin-bottom: 0.6rem;
}

.chapter-pdf-cta-info p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.92rem;
  line-height: 1.7;
  margin: 0;
}

.chapter-pdf-cta-action {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch;
}

.chapter-pdf-cta-price {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.chapter-pdf-cta-price .amount {
  font-family: 'Baloo 2', cursive;
  font-weight: 800;
  font-size: 2rem;
  color: #fff;
  line-height: 1;
}

.chapter-pdf-cta-price .note {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}

.chapter-pdf-cta-action .btn-primary {
  width: 100%;
  text-align: center;
}

@media (min-width: 768px) {
  .chapter-pdf-cta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 2.5rem;
    gap: 2rem;
  }

  .chapter-pdf-cta-action {
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    flex-shrink: 0;
  }

  .chapter-pdf-cta-action .btn-primary {
    width: auto;
  }
}

/* --- Share Buttons (DRAFT) --- */
.share-buttons {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.5rem 0 1.5rem;
}

.share-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.share-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  transition: transform var(--transition);
}

.share-btn:hover {
  transform: translateY(-2px);
}

.share-btn.whatsapp {
  background: #25D366;
}

.share-btn.facebook {
  background: #1877F2;
}

/* --- Ad Slots (DRAFT — placeholder only, fixed size to avoid layout shift) --- */
.ad-slot {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F3F4F6;
  border: 1px dashed #D1D5DB;
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 1.5rem auto;
}

.ad-slot--leaderboard {
  max-width: 728px;
  min-height: 90px;
}

.ad-slot--rectangle {
  max-width: 336px;
  min-height: 280px;
}

@media (max-width: 600px) {
  .ad-slot--leaderboard {
    min-height: 50px;
  }

  .ad-slot--rectangle {
    max-width: 100%;
    min-height: 250px;
  }
}

/* --- Video Lesson: lazy-load YouTube facade (DRAFT) --- */
.video-facade {
  position: relative;
  max-width: 640px;
  aspect-ratio: 16 / 9;
  border-radius: var(--card-radius);
  overflow: hidden;
  cursor: pointer;
  background: #000;
  margin-top: 0.5rem;
}

.video-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.92);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: transform var(--transition);
}

.video-facade:hover .video-play-btn,
.video-facade:focus-visible .video-play-btn {
  transform: translate(-50%, -50%) scale(1.08);
}

.video-facade-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* --- Table of Contents (DRAFT — long chapters only) --- */
.post-toc {
  background: #fff;
  border: 1px solid var(--paper-line);
  border-radius: var(--card-radius);
  padding: 0.85rem 1rem;
  margin: 0.25rem 0 1.25rem;
}

.post-toc-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin-bottom: 0.55rem;
}

.post-toc ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
}

.post-toc a {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
}

.post-toc a:hover {
  background: var(--primary);
  color: #fff;
}

/* --- Affiliate / Sponsored Box (DRAFT — optional, per post) --- */
.affiliate-box {
  background: #F9FAFB;
  border: 1px dashed var(--paper-line);
  border-radius: var(--card-radius);
  padding: 1rem 1.25rem;
}

.affiliate-label {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  background: #EEF0F3;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  margin-bottom: 0.6rem;
}

.affiliate-box h3 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
  color: var(--ink);
}

.affiliate-box p {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin-bottom: 0.85rem;
}

/* --- Cards --- */
.card {
  background: #fff;
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: all var(--transition);
  border: 1px solid rgba(229, 231, 235, 0.5);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(37, 99, 235, 0.2);
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  border-bottom: 3px solid var(--primary);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 1rem;
  padding: 0 1rem;
}

.logo {
  font-family: 'Baloo 2', cursive;
  font-size: 1.85rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -0.5px;
}

.logo span {
  background: linear-gradient(135deg, var(--warning), var(--info));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Mobile menu toggle */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: rgba(37, 99, 235, 0.08);
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 10px;
  transition: all var(--transition);
}

.menu-toggle:hover {
  background: rgba(37, 99, 235, 0.15);
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: all var(--transition);
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* Navigation */
.main-nav {
  display: none;
  position: absolute;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: #fff;
  border-top: 2px solid var(--primary-light);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  max-height: calc(100vh - var(--header-height));
  overflow-y: auto;
}

.main-nav.open {
  display: block;
}

.nav-list {
  padding: 1rem 0;
}

.nav-list > li > a,
.nav-list > li > .nav-link-btn {
  display: block;
  padding: 0.85rem 1.5rem;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all var(--transition);
}

.nav-list > li > a:hover,
.nav-list > li > .nav-link-btn:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
  padding-left: 1.75rem;
}

.nav-list > li > a.active,
.nav-list > li > .nav-link-btn.active {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 700;
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-link-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  text-align: left;
}

.nav-link-btn .chevron {
  transition: transform var(--transition);
}

.nav-dropdown.open .nav-link-btn .chevron {
  transform: rotate(180deg);
}

.dropdown-menu {
  display: none;
  background: rgba(255, 251, 248, 0.98);
  padding: 0.5rem 0;
  border-top: 1px solid var(--primary-light);
}

.nav-dropdown.open .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 0.7rem 1.5rem 0.7rem 2.5rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
  transition: all var(--transition);
  border-left: 3px solid transparent;
}

.dropdown-menu a:hover {
  color: var(--primary);
  background: rgba(37, 99, 235, 0.05);
  border-left-color: var(--primary);
  padding-left: 2.75rem;
}

.dropdown-menu a.active {
  color: var(--primary-dark);
  background: rgba(37, 99, 235, 0.12);
  border-left-color: var(--primary);
  font-weight: 700;
}

.nav-youtube {
  padding: 1rem 1.5rem;
}

.nav-youtube .btn {
  width: 100%;
}

/* ============================================
   HERO SECTION (Educational Style)
   ============================================ */
.hero {
  position: relative;
  padding: 3rem 0 4rem;
  background: linear-gradient(135deg, var(--paper-bg) 0%, rgba(219, 234, 254, 0.4) 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 1rem;
  max-width: 680px;
  color: var(--ink);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 600px;
}

/* Search Box */
.search-box {
  position: relative;
  display: flex;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  overflow: visible;
  margin-bottom: 2.5rem;
  max-width: 600px;
  border: 2px solid transparent;
  transition: all var(--transition);
}

.search-box input {
  border-radius: 12px 0 0 12px;
}

.search-box button {
  border-radius: 0 12px 12px 0;
}

/* Search Results Dropdown */
.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
  border: 1px solid #E5E7EB;
  max-height: 340px;
  overflow-y: auto;
  z-index: 50;
  padding: 0.4rem;
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
}

.search-result-item:hover,
.search-result-item.active {
  background: #F3F4F6;
}

.search-result-title {
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.35;
  flex: 1;
}

.search-result-category {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(37, 99, 235, 0.08);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}

.search-results-empty {
  padding: 0.85rem 0.75rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
  text-align: center;
}

@media (max-width: 640px) {
  .search-results {
    max-height: 280px;
  }

  .search-result-title {
    font-size: 0.85rem;
  }

  .search-result-category {
    font-size: 0.68rem;
  }
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.2);
}

.search-box input {
  flex: 1;
  border: none;
  padding: 1rem 1.25rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--ink);
  background: transparent;
  outline: none;
}

.search-box input::placeholder {
  color: #D1D5DB;
}

.search-box button {
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all var(--transition);
  font-weight: 600;
}

.search-box button:hover {
  background: linear-gradient(135deg, var(--primary-dark), #0f2460);
}

/* Hero Stats */
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.stat-item {
  flex: 1 1 160px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(219, 234, 254, 0.3));
  backdrop-filter: blur(10px);
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  transition: all var(--transition);
}

.stat-item:hover {
  border-color: var(--primary);
  background: rgba(219, 234, 254, 0.5);
  transform: translateY(-2px);
}

.stat-item strong {
  display: block;
  font-family: 'Baloo 2', cursive;
  font-size: 1.35rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.25rem;
  letter-spacing: -0.5px;
}

.stat-item span {
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-weight: 500;
}

/* ============================================
   CLASS QUICK LINKS
   ============================================ */
.class-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-light) transparent;
}

.class-scroll::-webkit-scrollbar {
  height: 6px;
}

.class-scroll::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 4px;
}

.class-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.class-card {
  flex: 0 0 auto;
  min-width: 110px;
  padding: 1.25rem 1rem;
  background: linear-gradient(135deg, #fff 0%, rgba(219, 234, 254, 0.3) 100%);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  transition: all var(--transition);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.class-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.class-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.2);
}

.class-card:hover::before {
  opacity: 0.05;
}

.class-card .class-num {
  font-family: 'Baloo 2', cursive;
  font-size: 1.75rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  position: relative;
  z-index: 1;
}

.class-card .class-label {
  font-size: 0.8rem;
  color: var(--ink-soft);
  font-weight: 500;
  position: relative;
  z-index: 1;
}

/* ============================================
   EXAM RESOURCES
   ============================================ */
.resource-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.resource-card {
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all var(--transition);
}

.resource-card:hover {
  transform: translateX(4px);
}

.resource-card h3 {
  font-size: 1.15rem;
  color: var(--ink);
}

.resource-card p {
  font-size: 0.9rem;
  color: var(--ink-soft);
  flex: 1;
  line-height: 1.6;
}

.resource-card .card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.resource-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary-light), rgba(37, 99, 235, 0.1));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  border: 1px solid rgba(37, 99, 235, 0.2);
}

/* ============================================
   FEATURED COURSES
   ============================================ */
.course-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.course-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.course-thumb {
  height: 160px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
  overflow: hidden;
}

.course-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.course-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 1rem;
}

.course-body h3 {
  font-size: 1.15rem;
  color: var(--ink);
  font-weight: 700;
}

.course-body p {
  font-size: 0.9rem;
  color: var(--ink-soft);
  flex: 1;
  line-height: 1.6;
}

.course-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--paper-line);
}

.course-price {
  font-family: 'Baloo 2', cursive;
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--warning), var(--info));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.course-price small {
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* ============================================
   MEMBERSHIP BANNER
   ============================================ */
.membership-banner {
  background: linear-gradient(135deg, var(--ink) 0%, #1F2937 100%);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.membership-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.2) 0%, transparent 70%);
  pointer-events: none;
  border-radius: 50%;
}

.membership-banner::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.15) 0%, transparent 70%);
  pointer-events: none;
  border-radius: 50%;
}

.membership-banner h2 {
  color: #fff;
  font-size: 1.75rem;
  position: relative;
  z-index: 1;
  line-height: 1.3;
}

.membership-banner p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  max-width: 520px;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

.membership-price {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--warning), var(--info));
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  font-family: 'Baloo 2', cursive;
  font-weight: 800;
  font-size: 1.65rem;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.membership-price small {
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.9;
}

.membership-banner .btn-primary {
  position: relative;
  z-index: 1;
}

/* ============================================
   YOUTUBE SECTION
   ============================================ */
.youtube-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.video-card {
  text-decoration: none;
  color: inherit;
}

.video-thumb {
  position: relative;
  height: 180px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: var(--card-radius) var(--card-radius) 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-btn {
  width: 56px;
  height: 56px;
  background: rgba(255, 0, 0, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.25rem;
  padding-left: 4px;
  transition: transform var(--transition);
}

.video-card:hover .play-btn {
  transform: scale(1.1);
}

.video-info {
  padding: 1rem 1.25rem;
}

.video-info h3 {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.video-info span {
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* ============================================
   POPULAR POSTS
   ============================================ */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.post-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: #fff;
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition);
}

.post-item:hover {
  transform: translateX(4px);
  color: inherit;
}

.post-num {
  font-family: 'Baloo 2', cursive;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--marigold);
  min-width: 36px;
}

.post-info h3 {
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
}

.post-info span {
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.popular-posts-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  background: #fff;
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
}

/* ============================================
   WHY HAMARASCHOOL
   ============================================ */
.trust-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.trust-card {
  padding: 1.5rem;
  text-align: center;
}

.trust-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  background: rgba(245, 166, 35, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.trust-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.trust-card p {
  font-size: 0.875rem;
  color: var(--ink-soft);
}

/* ============================================
   PLACEHOLDER PAGE
   ============================================ */
.page-placeholder {
  padding: 4rem 0;
  text-align: center;
}

.page-placeholder h1 {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.page-placeholder p {
  color: var(--ink-soft);
  font-size: 1rem;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.8);
  padding-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
}

.footer-brand .logo {
  color: #fff;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  font-size: 0.875rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-links a {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.9rem;
  transition: background var(--transition);
}

.social-links a:hover {
  background: var(--marigold);
  color: var(--ink);
}

.footer-col h4 {
  font-family: 'Baloo 2', cursive;
  color: #fff;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
}

.footer-col a:hover {
  color: var(--marigold);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.25rem 0;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   TABLET (768px+)
   ============================================ */
@media (min-width: 768px) {
  .section {
    padding: 4rem 0;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .hero {
    padding: 3.5rem 0 4rem;
  }

  .hero::after {
    left: 80px;
  }

  .hero-content {
    padding-left: 2.5rem;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero-desc {
    font-size: 1.05rem;
  }

  .resource-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .course-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .video-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .trust-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }

  .membership-banner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 2.5rem;
  }

  .youtube-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* ============================================
   DESKTOP (1024px+)
   ============================================ */
@media (min-width: 1024px) {
  .container {
    padding: 0 1.5rem;
  }

  .menu-toggle {
    display: none;
  }

  .main-nav {
    display: flex !important;
    position: static;
    background: none;
    border: none;
    box-shadow: none;
    max-height: none;
    overflow: visible;
    align-items: center;
  }

  .nav-list {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0;
  }

  .nav-list > li > a,
  .nav-list > li > .nav-link-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }

  .nav-list > li > a.active,
  .nav-list > li > .nav-link-btn.active {
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
  }

  .nav-link-btn {
    width: auto;
    gap: 0.35rem;
  }

  .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #fff;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    padding: 0.5rem 0;
    border: 1px solid var(--paper-line);
  }

  .dropdown-menu a {
    padding: 0.5rem 1rem;
  }

  .nav-dropdown:hover .dropdown-menu {
    display: block;
  }

  .nav-youtube {
    padding: 0;
    margin-left: 0.5rem;
  }

  .nav-youtube .btn {
    width: auto;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .class-scroll {
    flex-wrap: wrap;
    overflow-x: visible;
    justify-content: center;
  }

  .class-card {
    flex: 1 1 calc(12.5% - 0.75rem);
    min-width: 110px;
  }
}

/* ============================================
   CATEGORY PAGES (Grammar & Spoken English)
   ============================================ */

/* Breadcrumb Navigation */
.breadcrumb-nav {
  background: rgba(37, 99, 235, 0.03);
  padding: 1rem 0;
  border-bottom: 1px solid rgba(37, 99, 235, 0.1);
}

.breadcrumb-nav a,
.breadcrumb-nav .separator {
  color: var(--ink-soft);
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb-nav a {
  color: var(--primary);
  font-weight: 500;
}

.breadcrumb-nav a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.breadcrumb-nav .current {
  color: var(--ink);
  font-weight: 600;
}

/* Category Hero Section */
.category-hero {
  background: linear-gradient(135deg, var(--primary-light) 0%, rgba(219, 234, 254, 0.3) 100%);
  padding: 2.5rem 0;
  position: relative;
  overflow: hidden;
}

.category-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.category-hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -15%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.category-hero h1 {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  color: var(--ink);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 1;
}

.category-desc {
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 620px;
  position: relative;
  z-index: 1;
}

/* Filters Section */
.filters-section {
  padding: 2rem 0;
  background: #fff;
  border-bottom: 1px solid rgba(229, 231, 235, 0.5);
}

.filter-group {
  margin-bottom: 1.5rem;
}

.filter-group:last-child {
  margin-bottom: 0;
}

.filter-label {
  display: block;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

/* Class Filter Scroll */
.class-filter-scroll {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-light) transparent;
}

.class-filter-scroll::-webkit-scrollbar {
  height: 4px;
}

.class-filter-scroll::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 4px;
}

.filter-btn {
  flex: 0 0 auto;
  padding: 0.6rem 1rem;
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary);
  border: 2px solid transparent;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  font-size: 0.9rem;
}

.filter-btn:hover {
  background: rgba(37, 99, 235, 0.15);
  transform: translateY(-2px);
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-color: var(--primary);
}

/* Topic Filter Chips */
.topic-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.topic-filter-scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-light) transparent;
  padding-bottom: 0.35rem;
}

.topic-filter-scroll::-webkit-scrollbar {
  height: 4px;
}

.topic-filter-scroll::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 4px;
}

.filter-chip {
  padding: 0.5rem 1rem;
  background: rgba(229, 231, 235, 0.6);
  color: var(--ink-soft);
  border: 1px solid rgba(107, 114, 128, 0.2);
  border-radius: 20px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.85rem;
}

.filter-chip:hover {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  border-color: var(--primary-light);
}

.filter-chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary-dark);
}

/* Grammar topic post list */
.grammar-post-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

/* Spoken English topic post list */
.spoken-post-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.grammar-card {
  padding: 1.1rem;
  border: 1px solid rgba(37, 99, 235, 0.18);
}

.spoken-card {
  padding: 1.1rem;
  border: 1px solid rgba(37, 99, 235, 0.18);
}

.grammar-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
}

.spoken-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
}

.grammar-card p {
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0.7rem;
}

.spoken-card p {
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0.7rem;
}

.grammar-card a {
  font-weight: 700;
  color: var(--primary-dark);
}

.spoken-card a {
  font-weight: 700;
  color: var(--primary-dark);
}

.grammar-card a:hover {
  color: var(--primary);
}

.spoken-card a:hover {
  color: var(--primary);
}

/* Inline Search Box */
.search-box-inline {
  display: flex;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  border: 2px solid rgba(229, 231, 235, 0.8);
  transition: all var(--transition);
  max-width: 400px;
}

.search-box-inline:focus-within {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.15);
}

.search-box-inline input {
  flex: 1;
  border: none;
  padding: 0.75rem 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  background: transparent;
  outline: none;
}

.search-box-inline input::placeholder {
  color: #D1D5DB;
}

.search-box-inline button {
  padding: 0.75rem 1rem;
  background: transparent;
  color: var(--primary);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: color var(--transition);
}

.search-box-inline button:hover {
  color: var(--primary-dark);
}

/* Post Grid */
.post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.post-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

.post-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.post-header h3 {
  font-size: 1.1rem;
  flex: 1;
  line-height: 1.4;
}

.post-excerpt {
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1;
}

.post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(229, 231, 235, 0.5);
  flex-wrap: wrap;
}

.topic-label {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  min-width: auto;
}

/* Center Section Utility */
.section-center {
  text-align: center;
}

.section-center .btn {
  min-width: 180px;
}

/* ============================================
   RESPONSIVE: POST GRID & FILTERS
   ============================================ */
@media (min-width: 768px) {
  .category-hero h1 {
    font-size: 2rem;
  }

  .category-desc {
    font-size: 1.05rem;
  }

  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .grammar-post-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .spoken-post-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-box-inline {
    max-width: 100%;
  }
}

@media (min-width: 1024px) {
  .category-hero h1 {
    font-size: 2.25rem;
  }

  .post-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .grammar-post-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .spoken-post-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .post-header {
    flex-direction: column;
  }

  .post-header h3 {
    margin-bottom: 0.5rem;
  }

  .filters-section {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .filter-group {
    margin-bottom: 0;
    flex: 1 1 auto;
    min-width: 250px;
  }

  .filter-group:last-child {
    flex: 1 1 100%;
    margin-top: 0.5rem;
  }
}

/* ============================================
   EXAM PATTERN CARD (UP Board / NCERT)
   ============================================ */
.exam-pattern-card {
  background: linear-gradient(135deg, #fff 0%, rgba(219, 234, 254, 0.25) 100%);
  border: 2px solid var(--primary-light);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  box-shadow: var(--card-shadow);
}

.exam-pattern-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.exam-pattern-header h2 {
  font-size: 1.4rem;
  color: var(--ink);
}

.exam-pattern-desc {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

/* Stat Blocks */
.exam-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.exam-stat-block {
  background: #fff;
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
}

.exam-stat-block strong {
  display: block;
  font-family: 'Baloo 2', cursive;
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.25rem;
}

.exam-stat-block span {
  font-size: 0.8rem;
  color: var(--ink-soft);
  font-weight: 500;
}

/* Exam Pattern Table */
.exam-pattern-table {
  overflow-x: auto;
  margin-bottom: 1.25rem;
}

.exam-pattern-table table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}

.exam-pattern-table th,
.exam-pattern-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

.exam-pattern-table th {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 700;
  font-family: 'Baloo 2', cursive;
}

.exam-pattern-table tbody tr:last-child td {
  border-bottom: none;
}

.exam-pattern-note {
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-style: italic;
  border-top: 1px dashed rgba(107, 114, 128, 0.3);
  padding-top: 1rem;
}

/* Info Note Card (Unverified data placeholder) */
.info-note-card {
  background: rgba(245, 166, 35, 0.08);
  border: 2px dashed var(--marigold, #F5A623);
  border-radius: 14px;
  padding: 1.5rem;
}

.info-note-card h3 {
  font-size: 1.1rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.info-note-card p {
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.7;
}

@media (min-width: 768px) {
  .exam-stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============================================
   EXAM PAPERS PAGE (NCERT CLASS 10/12)
   ============================================ */
.exam-toggle-section {
  padding-top: 2rem;
  padding-bottom: 1rem;
}

.exam-class-toggle {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.exam-toggle-btn {
  flex: 1 1 180px;
  border: 2px solid var(--primary-light);
  background: #fff;
  color: var(--primary-dark);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  font-family: 'Baloo 2', cursive;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}

.exam-toggle-btn:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.exam-toggle-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-color: var(--primary-dark);
}

.exam-panel {
  display: none;
}

.exam-panel.active {
  display: block;
}

.exam-subsection {
  padding-top: 2rem;
  padding-bottom: 0;
}

.exam-stats-grid-four {
  grid-template-columns: repeat(2, 1fr);
}

.paper-list {
  padding: 0.5rem 1rem;
}

.paper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0.25rem;
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

.paper-row:last-child {
  border-bottom: none;
}

.paper-row span {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
}

.guess-paper-card {
  padding: 1.5rem;
  border: 2px solid rgba(124, 58, 237, 0.25);
  background: linear-gradient(135deg, rgba(237, 233, 254, 0.35), #fff);
}

.guess-paper-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.guess-paper-top h2 {
  font-size: 1.25rem;
  color: var(--ink);
}

.guess-paper-card p {
  color: var(--ink-soft);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.guess-paper-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  .exam-stats-grid-four {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 767px) {
  .paper-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .paper-row .btn {
    width: 100%;
  }
}

/* ============================================
   SINGLE POST TEMPLATE
   ============================================ */
.single-layout-section {
  padding-top: 2rem;
}

.single-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.single-article {
  padding: 1.5rem;
}

.single-block {
  margin-bottom: 1.5rem;
}

.single-block:last-child {
  margin-bottom: 0;
}

.single-block h2 {
  font-size: 1.35rem;
  margin-bottom: 0.65rem;
}

.single-block p {
  color: var(--ink-soft);
  line-height: 1.75;
  font-size: 0.95rem;
}

.word-table-wrap {
  overflow-x: auto;
}

.word-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}

.word-table th,
.word-table td {
  padding: 0.75rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  font-size: 0.9rem;
}

.word-table th {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-family: 'Baloo 2', cursive;
}

.word-table tbody tr:last-child td {
  border-bottom: none;
}

.solved-example-box {
  border: 2px solid var(--ink);
  background: var(--paper-bg);
  border-radius: 8px;
  padding: 1.1rem 1.25rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-x: auto;
}

.solved-example-box strong {
  color: var(--ink);
}

.qa-list {
  display: grid;
  gap: 0.9rem;
}

.qa-item {
  border: 1px solid rgba(37, 99, 235, 0.15);
  background: rgba(219, 234, 254, 0.2);
  border-radius: 10px;
  padding: 0.9rem;
}

.qa-item h3 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.qa-item p {
  margin: 0;
}

.single-sidebar {
  display: grid;
  gap: 1rem;
}

.sidebar-card {
  padding: 1.1rem;
}

.sidebar-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.7rem;
}

.sidebar-card ul {
  display: grid;
  gap: 0.45rem;
}

.sidebar-card li {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.sidebar-card li span {
  color: var(--ink);
  font-weight: 600;
}

.sidebar-paid-card {
  border: 2px solid rgba(124, 58, 237, 0.25);
  background: linear-gradient(135deg, rgba(237, 233, 254, 0.35), #fff);
}

.sidebar-paid-card p {
  margin-bottom: 1rem;
}

.sidebar-link {
  display: block;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  color: var(--ink);
  font-size: 0.9rem;
  transition: all var(--transition);
}

.sidebar-link:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary-dark);
}

.chapter-video {
  padding: 1.25rem;
}

.chapter-video-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.chapter-video p {
  color: var(--ink-soft);
  margin-bottom: 1rem;
}

.video-embed-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
}

.video-embed-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Contact page form */
.contact-form-ui {
  display: grid;
  gap: 0.9rem;
}

.contact-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

.contact-field {
  display: grid;
  gap: 0.35rem;
}

.contact-field label {
  font-weight: 600;
  color: var(--ink);
  font-size: 0.9rem;
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  border: 1px solid rgba(107, 114, 128, 0.35);
  border-radius: 10px;
  padding: 0.72rem 0.85rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  color: var(--ink);
  background: #fff;
}

.contact-field input:focus,
.contact-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.contact-success-message {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #065f46;
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  font-weight: 600;
}

.contact-form-note {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

@media (min-width: 1024px) {
  .single-layout {
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    align-items: start;
  }

  .single-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 1rem);
  }

  .contact-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ============================================
   UP BOARD RAINBOW (CLASS 5-8)
   ============================================ */
.rainbow-class-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.class-panel {
  display: none;
}

.class-panel.active {
  display: block;
}

.rainbow-class-card {
  border: 2px solid rgba(37, 99, 235, 0.2);
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.45), #fff);
  color: var(--ink);
  border-radius: 12px;
  padding: 1.1rem 0.8rem;
  font-family: 'Baloo 2', cursive;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}

.rainbow-class-card:hover,
.rainbow-class-card.active {
  border-color: var(--primary);
  color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.15);
}

.rainbow-paid-card {
  padding: 1.25rem;
  border: 2px solid rgba(124, 58, 237, 0.2);
}

.rainbow-paid-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.rainbow-paid-head h2 {
  font-size: 1.35rem;
}

.rainbow-paid-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
}

.rainbow-feature-list {
  list-style: disc;
  padding-left: 1.1rem;
  margin-bottom: 1rem;
  color: var(--ink-soft);
}

.rainbow-feature-list li {
  margin-bottom: 0.25rem;
}

.rainbow-paid-actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.rainbow-quick-title {
  font-size: 0.9rem;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.rainbow-quick-links {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.rainbow-quick-links a {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary-dark);
  font-size: 0.82rem;
  border: 1px solid rgba(37, 99, 235, 0.15);
}

.bundle-saving {
  font-weight: 700;
  color: #fff;
}

.playlist-grid {
  grid-template-columns: 1fr;
}

.playlist-card {
  border: 1px solid rgba(255, 0, 0, 0.25);
}

.playlist-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  border-radius: 10px;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #7f1d1d, #dc2626);
  color: #fff;
  font-family: 'Baloo 2', cursive;
  font-size: 1.2rem;
}

.faq-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
}

.faq-item {
  padding: 0.9rem 1rem;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
}

.faq-item p {
  margin-top: 0.6rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.section-focus {
  outline: 2px solid var(--primary);
  border-radius: 8px;
}

@media (min-width: 768px) {
  .rainbow-class-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .faq-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .playlist-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .rainbow-class-grid {
    display: flex;
    overflow-x: auto;
    gap: 0.65rem;
    padding-bottom: 0.35rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-light) transparent;
  }

  .rainbow-class-grid::-webkit-scrollbar {
    height: 5px;
  }

  .rainbow-class-grid::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 999px;
  }

  .rainbow-class-card {
    flex: 0 0 auto;
    min-width: 118px;
    font-size: 1.02rem;
  }
}

/* ============================================
   NCERT PAGE (CLASS 9-12)
   ============================================ */
.ncert-hero {
  background: linear-gradient(135deg, #f6f9ff 0%, rgba(219, 234, 254, 0.55) 100%);
}

.ncert-class-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.ncert-class-card {
  border: 1px solid rgba(37, 99, 235, 0.25);
  background: #fff;
  color: var(--ink);
  border-radius: 12px;
  padding: 0.95rem 0.75rem;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}

.ncert-class-card:hover,
.ncert-class-card.active {
  border-color: var(--primary);
  color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.12);
}

.ncert-paid-card,
.ncert-grammar-card {
  padding: 1.35rem;
  border: 1px solid rgba(37, 99, 235, 0.18);
}

.ncert-paid-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.ncert-paid-head h2 {
  font-size: 1.35rem;
}

.ncert-paid-card h3,
.ncert-grammar-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
}

.ncert-feature-list {
  list-style: disc;
  padding-left: 1.15rem;
  margin-bottom: 1rem;
  color: var(--ink-soft);
}

.ncert-feature-list li {
  margin-bottom: 0.25rem;
}

.ncert-paid-actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.ncert-quick-title {
  font-size: 0.9rem;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.ncert-quick-links {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.ncert-quick-links a {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary-dark);
  font-size: 0.82rem;
  border: 1px solid rgba(37, 99, 235, 0.15);
}

.ncert-grammar-note {
  color: var(--ink-soft);
  margin-bottom: 0.9rem;
}

.ncert-bundle-saving {
  color: #fff;
}

.ncert-cta-card {
  background: rgba(37, 99, 235, 0.06);
  border: 1px dashed rgba(37, 99, 235, 0.4);
}

@media (max-width: 767px) {
  .ncert-class-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .ncert-class-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   HOMEPAGE v2 QUICK-ACCESS / LEARN / CLASS CARDS
   These are <a> elements with block-level children
   (h2/h3/p) and were never given an explicit display,
   so browsers default them to "inline" - an inline box
   around block children fragments into a separate,
   unstyled box per wrapped line instead of one solid
   card. That's the "box disappears on mobile" bug: more
   text wraps at narrow widths, so the fragmentation (and
   the missing background/border/shadow look) becomes
   obvious there, even though the same broken markup
   affects desktop too.
   ============================================ */
.v2-quick-grid,
.v2-learn-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 600px) {
  .v2-quick-grid,
  .v2-learn-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .v2-quick-grid,
  .v2-learn-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.v2-quick-card,
.v2-learn-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.25rem;
  text-decoration: none;
  color: var(--ink);
}

.v2-quick-card h2,
.v2-learn-card h3 {
  font-size: 1.05rem;
  margin: 0;
}

.v2-quick-card p,
.v2-learn-card p {
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

.v2-quick-card > span {
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.85rem;
}

.v2-class-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
}

@media (min-width: 600px) {
  .v2-class-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .v2-class-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.v2-class-card {
  display: block;
}

.v2-class-card .class-note {
  display: block;
  font-size: 0.75rem;
  color: var(--ink-soft);
  margin-top: 0.3rem;
  position: relative;
  z-index: 1;
}

.v2-class-card .class-action {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-top: 0.5rem;
  position: relative;
  z-index: 1;
}

/* ============================================
   RESOURCE HUB PAGES (up-board/, ncert/, courses/)
   Same root cause as the homepage v2 cards above:
   these "-v2" hub redesigns added new classes without
   ever writing their CSS, so <a>/<span> elements meant
   to look like cards or pill badges rendered as plain
   inline text instead.
   ============================================ */
.resource-class-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
}

@media (min-width: 600px) {
  .resource-class-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.resource-class-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.1rem;
  text-decoration: none;
  color: var(--ink);
}

.resource-class-card strong {
  font-size: 1.05rem;
}

.resource-class-card span {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.resource-class-card em {
  font-style: normal;
  font-weight: 700;
  color: var(--primary-dark);
  margin-top: 0.4rem;
  font-size: 0.85rem;
}

.resource-feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.resource-feature-item {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary-dark);
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}

.resource-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

/* .resource-video-grid had no CSS at all, so it defaulted to
   display:block - each video-card (already a proper block-level
   article) stacked full-width, which looked fine on mobile but
   showed as one giant oversized column on desktop instead of a
   grid. Matches the .video-grid breakpoint already used elsewhere. */
.resource-video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .resource-video-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.resource-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.why-grid-v2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 600px) {
  .why-grid-v2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.why-card-v2 {
  padding: 1.25rem;
}

.why-card-v2 h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.why-card-v2 p {
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
}

/* ============================================
   HOMEPAGE v2 — Popular Posts / Exam Prep / Tools
   Same missing-CSS pattern: these <article class="card">
   elements got background/border/shadow from the base
   .card rule but zero padding, so content sat flush
   against the box edges and adjacent cards touched with
   no gap - looked "broken" even though display was
   already block (article, not <a>, so no fragmentation).
   ============================================ */
.v2-popular-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 600px) {
  .v2-popular-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .v2-popular-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.v2-popular-card {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}

.v2-popular-card h3 {
  font-size: 1.02rem;
  margin: 0;
  line-height: 1.4;
}

.v2-popular-card p {
  color: var(--ink-soft);
  font-size: 0.88rem;
  margin: 0;
}

.v2-exam-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 600px) {
  .v2-exam-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.v2-exam-card {
  padding: 1.25rem;
}

.v2-exam-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
}

.v2-exam-card ul {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.v2-exam-card li {
  margin-bottom: 0.3rem;
}

.v2-tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

@media (min-width: 600px) {
  .v2-tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .v2-tools-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.v2-tool-card {
  padding: 1.1rem;
  text-align: center;
}

.v2-tool-card h3 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.v2-tool-card span {
  color: var(--ink-soft);
  font-size: 0.85rem;
}

/* "Why HamaraSchool?" - .v2-benefit-grid wraps real, already-styled
   .trust-card articles, so it looked fine on mobile (single column
   is correct there anyway) but had zero CSS of its own, so it never
   became a grid - on desktop all 6 cards just stacked full-width in
   one giant column instead of the intended multi-column layout.
   Matches the existing .trust-grid breakpoint used elsewhere. */
.v2-benefit-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .v2-benefit-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================
   HOMEPAGE VISUAL UPGRADE (SCOPED)
   ============================================ */
.home-page {
  background:
    radial-gradient(circle at 12% 8%, rgba(37, 99, 235, 0.14), transparent 40%),
    radial-gradient(circle at 85% 16%, rgba(16, 185, 129, 0.11), transparent 38%),
    var(--paper-bg);
}

.home-page .home-hero {
  background: linear-gradient(135deg, #f7f9ff 0%, #e9f1ff 48%, #eefaf3 100%);
  border-bottom: 1px solid rgba(37, 99, 235, 0.14);
}

.home-page .home-hero .hero-desc {
  color: #3f4e68;
}

.home-page .home-hero .search-box {
  border: 1px solid rgba(37, 99, 235, 0.18);
  box-shadow: 0 14px 30px rgba(30, 64, 175, 0.12);
}

.home-page .home-class-section .class-card {
  background: linear-gradient(160deg, #ffffff 0%, #f2f8ff 100%);
  border: 1px solid rgba(37, 99, 235, 0.14);
}

.home-page .home-class-section .class-card:hover {
  box-shadow: 0 14px 26px rgba(37, 99, 235, 0.18);
}

.home-page .home-exam-banner {
  background: linear-gradient(135deg, rgba(14, 116, 144, 0.07), rgba(59, 130, 246, 0.1));
}

.home-page .home-exam-banner .exam-pattern-card {
  border: 1px solid rgba(37, 99, 235, 0.22);
  box-shadow: 0 16px 30px rgba(30, 64, 175, 0.1);
}

.home-page .home-featured-courses .course-card {
  border: 1px solid rgba(37, 99, 235, 0.18);
}

.home-page .home-featured-courses .course-thumb {
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 50%, #0369a1 100%);
}

.home-page .home-membership-section .membership-banner {
  box-shadow: 0 14px 34px rgba(2, 6, 23, 0.28);
}

.home-page .home-youtube-section {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(30, 64, 175, 0.08));
}

.home-page .home-youtube-section .video-card {
  border: 1px solid rgba(220, 38, 38, 0.16);
}

.home-page .home-why-section {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(37, 99, 235, 0.08));
}

.home-page .home-why-section .trust-card {
  border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Stronger visual pass for homepage preview */
.home-page .site-header {
  background: linear-gradient(90deg, #ffffff 0%, #f2f7ff 60%, #ecf8f1 100%);
  border-bottom: 3px solid #1e40af;
  box-shadow: 0 8px 26px rgba(30, 64, 175, 0.16);
}

.home-page .logo {
  font-size: 2rem;
}

.home-page .hero-content {
  position: relative;
}

.home-page .hero-content::after {
  content: '';
  position: absolute;
  right: 0;
  top: 10px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(30, 64, 175, 0.2), transparent 68%);
  pointer-events: none;
}

.home-page .home-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.4px;
}

.home-page .section-title::after {
  width: 86px;
  height: 5px;
}

.home-page .exam-pattern-card,
.home-page .course-card,
.home-page .trust-card,
.home-page .video-card,
.home-page .post-item {
  border-radius: 16px;
}

.home-page .home-featured-courses .course-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 34px rgba(30, 64, 175, 0.2);
}

.home-page .home-youtube-section .video-thumb {
  background: linear-gradient(135deg, #7f1d1d 0%, #1e3a8a 100%);
}

.home-page .btn-primary,
.home-page .btn-secondary {
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.22);
}

.home-page .btn-primary:hover,
.home-page .btn-secondary:hover {
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.28);
}

.home-page .class-card,
.home-page .course-card,
.home-page .video-card,
.home-page .trust-card,
.home-page .post-item,
.home-page .exam-pattern-card {
  position: relative;
  overflow: hidden;
}

.home-page .class-card::after,
.home-page .course-card::after,
.home-page .video-card::after,
.home-page .trust-card::after,
.home-page .post-item::after,
.home-page .exam-pattern-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.5) 45%, transparent 75%);
  transform: translateX(-120%);
  transition: transform 0.7s ease;
  pointer-events: none;
}

.home-page .class-card:hover::after,
.home-page .course-card:hover::after,
.home-page .video-card:hover::after,
.home-page .trust-card:hover::after,
.home-page .post-item:hover::after,
.home-page .exam-pattern-card:hover::after {
  transform: translateX(120%);
}

.home-page .home-class-section .class-card {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.home-page .home-class-section .class-card .class-num {
  font-size: 2rem;
}

.home-page .home-class-section .class-card .class-label {
  font-weight: 600;
  color: #4b5563;
}

.home-page .home-featured-courses .course-card {
  border: 1px solid rgba(37, 99, 235, 0.22);
  box-shadow: 0 14px 28px rgba(30, 64, 175, 0.12);
}

.home-page .home-featured-courses .course-body h3 {
  font-size: 1.2rem;
  line-height: 1.35;
}

.home-page .home-featured-courses .course-body p {
  color: #445069;
}

.home-page .home-featured-courses .course-footer {
  border-top: 1px solid rgba(37, 99, 235, 0.16);
}

.home-page .home-featured-courses .course-price {
  font-size: 1.2rem;
}

.home-page .home-exam-banner .exam-pattern-card {
  background: linear-gradient(145deg, #ffffff 0%, #edf5ff 100%);
}

.home-page .home-exam-banner .section-title {
  margin-bottom: 0.8rem;
}

.home-page .home-exam-banner .section-subtitle {
  margin-bottom: 1.1rem;
}

.home-page .home-youtube-section .video-card {
  box-shadow: 0 12px 26px rgba(127, 29, 29, 0.12);
}

.home-page .home-youtube-section .video-info h3 {
  font-size: 1rem;
  line-height: 1.45;
}

.home-page .post-item {
  border: 1px solid rgba(37, 99, 235, 0.14);
  box-shadow: 0 10px 22px rgba(30, 64, 175, 0.08);
}

.home-page .post-item:hover {
  transform: translateX(6px);
  box-shadow: 0 14px 28px rgba(30, 64, 175, 0.12);
}

.home-page .home-why-section .trust-card {
  box-shadow: 0 12px 24px rgba(5, 150, 105, 0.11);
}

.home-page .home-why-section .trust-icon {
  width: 62px;
  height: 62px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(37, 99, 235, 0.2));
}

@media (min-width: 1024px) {
  .home-page .course-grid,
  .home-page .video-grid,
  .home-page .trust-grid {
    gap: 1.6rem;
  }
}

/* ============================================
   COURSES PAGE
   ============================================ */
.courses-products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.standalone-course-card {
  padding: 1.25rem;
  border: 1px solid rgba(37, 99, 235, 0.16);
}

.course-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
}

.course-card-head h3 {
  font-size: 1.25rem;
}

.course-feature-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.course-feature-list {
  list-style: disc;
  padding-left: 1.1rem;
  margin-bottom: 1rem;
  color: var(--ink-soft);
}

.course-feature-list li {
  margin-bottom: 0.28rem;
}

.course-buy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.course-price-note {
  font-weight: 700;
  color: var(--primary-dark);
}

.ebook-tier-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.ebook-tier-card {
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 10px;
  padding: 0.9rem;
  background: rgba(237, 233, 254, 0.25);
}

.ebook-tier-card h4 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.pointer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.pointer-card {
  padding: 1.1rem;
  border: 1px solid rgba(16, 185, 129, 0.25);
  background: rgba(16, 185, 129, 0.06);
}

.pointer-card h3 {
  font-size: 1.05rem;
  margin-top: 0.6rem;
  margin-bottom: 0.45rem;
}

.pointer-card p {
  color: var(--ink-soft);
  margin-bottom: 0.75rem;
  line-height: 1.65;
}

@media (min-width: 768px) {
  .ebook-tier-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pointer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .courses-products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .courses-products-grid .standalone-course-card:nth-child(3) {
    grid-column: 1 / -1;
  }
}

/* ============================================
   UP BOARD CLASS PAGES
   ============================================ */
.class-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.class-switch-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 2px solid rgba(37, 99, 235, 0.22);
  border-radius: 10px;
  padding: 0.7rem 0.75rem;
  color: var(--primary-dark);
  background: #fff;
  font-weight: 700;
  transition: all var(--transition);
}

.class-switch-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(30, 64, 175, 0.12);
}

.class-switch-link.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border-color: var(--primary-dark);
}

.chapter-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.chapter-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 0.95rem;
  text-decoration: none;
  color: var(--ink);
}

.chapter-row:hover {
  color: var(--ink);
  transform: translateX(3px);
}

.chapter-index {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.12);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.85rem;
}

.chapter-name {
  font-weight: 600;
  line-height: 1.45;
}

.chapter-cta {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-dark);
  border: 1px solid rgba(37, 99, 235, 0.28);
  border-radius: 999px;
  padding: 0.32rem 0.65rem;
  background: rgba(37, 99, 235, 0.06);
}

.playlist-single-card,
.important-q-card {
  padding: 1.2rem;
}

.important-q-list {
  list-style: disc;
  padding-left: 1.2rem;
  color: var(--ink-soft);
  margin-bottom: 0.9rem;
}

.important-q-list li {
  margin-bottom: 0.3rem;
}

.book-group {
  margin-bottom: 1.25rem;
}

.book-group:last-child {
  margin-bottom: 0;
}

.book-group-title {
  font-size: 1.12rem;
  margin-bottom: 0.7rem;
  color: var(--ink);
  border-left: 4px solid var(--primary);
  padding-left: 0.55rem;
}

/* Grammar paid section */
.grammar-paid-card {
  border: 1px solid rgba(37, 99, 235, 0.22);
}

.grammar-paid-card .course-thumb {
  background: linear-gradient(135deg, #1e3a8a, #0f766e);
  font-family: 'Baloo 2', cursive;
  color: #fff;
  letter-spacing: 1px;
}

.grammar-paid-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.grammar-paid-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.85rem;
}

@media (min-width: 768px) {
  .class-switcher {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
