/* =========================
   ROOT VARIABLES & RESET
   ========================= */
:root {
  --primary: #4e54c8;
  --primary-light: #8f94fb;
  --secondary: #ff6b6b;
  --accent: #ffd166;
  --success: #4CAF50;
  --warning: #ff9800;
  --text-dark: #333;
  --text-light: #666;
  --text-lighter: #888;
  --background: #f8f9fa;
  --card-bg: #ffffff;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
  --border-radius: 12px;
  --transition: all 0.3s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--background);
  color: var(--text-dark);
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
}

.dark-mode {
  --text-dark: #f5f5f5;
  --text-light: #e0e0e0;
  --text-lighter: #b0b0b0;
  --background: #121212;
  --card-bg: #1e1e1e;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* =========================
   TYPOGRAPHY
   ========================= */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.8rem;
}

p {
  margin-bottom: 1rem;
}

/* =========================
   LAYOUT & CONTAINERS
   ========================= */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }
}

/* =========================
   NAVIGATION
   ========================= */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--card-bg);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition);
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: rgba(78, 84, 200, 0.1);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-dark);
  cursor: pointer;
}

/* Responsive Menu */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    background: var(--card-bg);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 1rem;
    box-shadow: var(--shadow);
  }

  .nav-links.show {
    display: flex;
  }
}

/* =========================
   HERO SECTION
   ========================= */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  padding: 2rem;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-content h2 {
  font-size: 2.8rem;
  margin-bottom: 1.2rem;
  color: white;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.hero .btn {
  background: white;
  color: var(--primary);
  padding: 0.8rem 1.8rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  display: inline-block;
}

.hero .btn:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* Responsive Hero */
@media (max-width: 768px) {
  .hero-content h2 {
    font-size: 2.2rem;
  }
  
  .hero-content p {
    font-size: 1rem;
  }
}

/* =========================
   PAGE HEADERS
   ========================= */
.page-title {
  text-align: center;
  font-size: 2.4rem;
  margin-bottom: 1rem;
  color: var(--primary);
  position: relative;
  padding-bottom: 0.8rem;
}

.page-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(to right, var(--primary), var(--primary-light));
  border-radius: 2px;
}

.intro-text {
  text-align: center;
  margin-bottom: 2.5rem;
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* =========================
   LESSONS SECTION
   ========================= */
.lessons {
  margin-bottom: 3rem;
  padding: 2rem;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.lessons:hover {
  box-shadow: var(--shadow-hover);
}

.lessons h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(78, 84, 200, 0.1);
}

.lesson-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.lesson-card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.lesson-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.lesson-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
  color: var(--primary);
  font-family: 'Noto Sans Devanagari', sans-serif;
  line-height: 1.4;
}

.lesson-card p {
  margin: 0.3rem 0;
  color: var(--text-light);
  flex-grow: 1;
}

.lesson-card small {
  display: block;
  margin-bottom: 0.8rem;
  color: var(--text-lighter);
  font-style: italic;
}

.lesson-card button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.7rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: auto;
}

.lesson-card button:hover {
  background: var(--primary-light);
}

/* Animation for lesson cards */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lesson-card {
  animation: fadeIn 0.5s ease forwards;
}

/* Stagger animation for cards */
.lesson-card:nth-child(1) { animation-delay: 0.1s; }
.lesson-card:nth-child(2) { animation-delay: 0.2s; }
.lesson-card:nth-child(3) { animation-delay: 0.3s; }
.lesson-card:nth-child(4) { animation-delay: 0.4s; }
.lesson-card:nth-child(5) { animation-delay: 0.5s; }
.lesson-card:nth-child(6) { animation-delay: 0.6s; }

/* =========================
   GAMES & QUIZ STYLES
   ========================= */
.game-box, .quiz-container, #game-container {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  text-align: center;
  max-width: 600px;
  margin: 2rem auto;
  transition: var(--transition);
}

.game-box:hover, .quiz-container:hover, #game-container:hover {
  box-shadow: var(--shadow-hover);
}

#word {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
  font-family: 'Noto Sans Devanagari', sans-serif;
  font-weight: bold;
}

#input, .game-box input, .quiz-container input {
  padding: 0.8rem 1.2rem;
  font-size: 1.1rem;
  border-radius: 8px;
  border: 2px solid #e0e0e0;
  width: 100%;
  margin-bottom: 1.5rem;
  text-align: center;
  transition: var(--transition);
}

#input:focus, .game-box input:focus, .quiz-container input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(78, 84, 200, 0.2);
}

.options {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.option-btn {
  padding: 0.8rem 1.2rem;
  border: none;
  border-radius: 8px;
  background: #f0f0f0;
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition);
}

.option-btn:hover {
  background: #e0e0e0;
}

.option-btn.correct {
  background: var(--success);
  color: white;
}

.option-btn.wrong {
  background: var(--secondary);
  color: white;
}

#feedback {
  margin: 1.2rem 0;
  font-weight: bold;
  font-size: 1.1rem;
}

#next-btn, .game-box button, .quiz-container button {
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}

#next-btn:hover, .game-box button:hover, .quiz-container button:hover {
  background: var(--primary-light);
}

#next-btn:disabled {
  background: #b0b0b0;
  cursor: not-allowed;
}

/* Progress box */
.progress-box {
  display: flex;
  justify-content: space-around;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(78, 84, 200, 0.1);
  border-radius: 8px;
  font-weight: 500;
}

/* =========================
   CULTURE & FOOD SECTIONS
   ========================= */
.culture-grid, .food-cards, .related-foods .food-cards, .related-festivals .food-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.culture-card, .food-card, .festival-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
}

.culture-card:hover, .food-card:hover, .festival-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.culture-card img, .food-card img, .festival-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.culture-card:hover img, .food-card:hover img, .festival-card:hover img {
  transform: scale(1.05);
}

.culture-card h3, .food-card h3, .festival-card h3 {
  font-size: 1.3rem;
  margin: 1rem;
  color: var(--primary);
}

.culture-card p, .food-card p, .festival-card p {
  margin: 0 1rem 1rem;
  color: var(--text-light);
}

/* Food detail page */
.food-detail {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin: 2rem auto;
  padding: 2rem;
  max-width: 1000px;
}

.food-detail .food-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--border-radius);
  margin-bottom: 1.5rem;
}

.food-detail h2 {
  margin-bottom: 1rem;
  color: var(--primary);
}


.rating {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff7db;
  color: #a76d00;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid #ffe6a7;
  font-weight: 600;
  margin-bottom: 1rem;
}

.rating .fa-star {
  color: #ffc107;
}

.food-detail h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.8rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.food-detail ul, .food-detail ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.food-detail li {
  margin-bottom: 0.5rem;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  background: var(--primary);
  color: white;
  padding: 0.7rem 1.2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.back-btn:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

/* =========================
   FAQ SECTION
   ========================= */
.faq-container {
  max-width: 800px;
  margin: 2rem auto;
}

.faq-item {
  margin-bottom: 1rem;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.faq-item:hover {
  box-shadow: var(--shadow-hover);
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 1.2rem;
  font-size: 1.1rem;
  font-weight: 600;
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question:hover {
  background: var(--primary-light);
}

.faq-question::after {
  content: '\f078';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  transition: transform 0.3s ease;
}

.faq-question.active::after {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  background: var(--card-bg);
  transition: max-height 0.4s ease;
}

.faq-answer.open {
  max-height: 500px;
}

.faq-answer-inner {
  padding: 1.2rem;
}

/* =========================
   PAGINATION
   ========================= */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin: 2rem 0;
}

.pagination button {
  padding: 0.7rem 1.2rem;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition);
}

.pagination button:hover {
  background: var(--primary-light);
}

.pagination button:disabled {
  background: #d0d0d0;
  cursor: not-allowed;
}

/* =========================
   SEARCH BOX
   ========================= */
.search-box {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 2rem 0;
  gap: 0.8rem;
}

.search-box input,
.search-box select {
  padding: 0.8rem 1.2rem;
  font-size: 1rem;
  border-radius: 8px;
  border: 2px solid #e0e0e0;
  transition: var(--transition);
}

.search-box input:focus,
.search-box select:focus {
  outline: none;
  border-color: var(--primary);
}

.search-box button {
  padding: 0.8rem 1.5rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}

.search-box button:hover {
  background: var(--primary-light);
}

/* =========================
   GRID SECTION (HOMEPAGE)
   ========================= */
.grid-section {
      padding: 3rem 2rem;
      background: var(--background);
    }

    .grid-container {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
      gap: 2rem;
      max-width: 1200px;
      margin: 0 auto;
      align-items: stretch; /* Ensure all items stretch to same height */
    }

    .grid-item {
      padding: 2rem;
      border-radius: var(--border-radius);
      text-align: center;
      transition: var(--transition);
      background: var(--card-bg);
      box-shadow: var(--shadow);
      display: flex;
      flex-direction: column;
      align-items: center;
      height: 100%; /* Ensure it takes full height of grid cell */
      min-height: 380px; /* Set a minimum height for consistency */
    }

    .grid-item:hover {
      transform: translateY(-8px);
      box-shadow: var(--shadow-hover);
    }

    /* Floating animation for grid items */
    @keyframes floatTilt {
      0% { transform: translateY(0) rotate(-1deg); }
      50% { transform: translateY(-8px) rotate(1deg); }
      100% { transform: translateY(0) rotate(-1deg); }
    }

    .grid-item img {
      width: 100px;
      height: 100px;
      object-fit: contain;
      margin-bottom: 1.5rem;
      transition: transform 0.3s ease;
      animation: floatTilt 3s ease-in-out infinite;
      flex-shrink: 0; /* Prevent image from shrinking */
    }

    .grid-item:hover img {
      transform: scale(1.1);
      animation: none;
    }

    .grid-item h3 {
      font-size: 1.4rem;
      margin-bottom: 1rem;
      display: flex;
      align-items: center;
      gap: 0.5rem;
      justify-content: center;
      flex-shrink: 0; /* Prevent heading from shrinking */
    }

    .grid-item p {
      margin-bottom: 1.5rem;
      flex-grow: 1; /* Allow paragraph to grow and fill available space */
      display: flex;
      align-items: center; /* Vertically center text */
    }

    .grid-item .btn {
      display: inline-block;
      padding: 0.7rem 1.5rem;
      border-radius: 8px;
      text-decoration: none;
      font-weight: 500;
      transition: var(--transition);
      color: white;
      flex-shrink: 0; /* Prevent button from shrinking */
      margin-top: auto; /* Push button to bottom */
    }

    /* Grid item colors */
    .lessons { 
      background: linear-gradient(145deg, #ebf4ff, #dbeafe);
    }

    .lessons h3, .lessons h3 i { 
      color: #3b82f6; 
    }

    .lessons p { 
      color: #3b82f6cc; 
    }

    .lessons .btn { 
      background: #3b82f6; 
    }

    .lessons .btn:hover { 
      background: #2563eb; 
      box-shadow: 0 0 12px rgba(59, 130, 246, 0.6); 
    }

    .games { 
      background: linear-gradient(145deg, #ecfdf5, #bbf7d0); 
    }

    .games h3, .games h3 i { 
      color: #22c55e; 
    }

    .games p { 
      color: #22c55ecc; 
    }

    .games .btn { 
      background: #22c55e; 
    }

    .games .btn:hover { 
      background: #16a34a; 
      box-shadow: 0 0 12px rgba(34, 197, 94, 0.6); 
    }

    .food { 
      background: linear-gradient(145deg, #fff7ed, #ffedd5); 
    }

    .food h3, .food h3 i { 
      color: #f97316; 
    }

    .food p { 
      color: #f97316cc; 
    }

    .food .btn { 
      background: #f97316; 
    }

    .food .btn:hover { 
      background: #ea580c; 
      box-shadow: 0 0 12px rgba(249, 115, 22, 0.6); 
    }

    .culture { 
      background: linear-gradient(145deg, #f5f3ff, #ede9fe); 
    }

    .culture h3, .culture h3 i { 
      color: #8b5cf6; 
    }

    .culture p { 
      color: #8b5cf6cc; 
    }

    .culture .btn { 
      background: #8b5cf6; 
    }

    .culture .btn:hover { 
      background: #7c3aed; 
      box-shadow: 0 0 12px rgba(139, 92, 246, 0.6); 
    }

    .quiz { 
      background: linear-gradient(145deg, #fdf2f8, #fce7f3); 
    }

    .quiz h3, .quiz h3 i { 
      color: #ec4899; 
    }

    .quiz p { 
      color: #ec4899cc; 
    }

    .quiz .btn { 
      background: #ec4899; 
    }

    .quiz .btn:hover { 
      background: #db2777; 
      box-shadow: 0 0 12px rgba(236, 72, 153, 0.6); 
    }


    /* =========================
   PLACE SECTION (NEW)
   ========================= */
.place { 
  background: linear-gradient(145deg, #e0f7fa, #b2ebf2); 
}

.place h3, .place h3 i { 
  color: #00bcd4; 
}

.place p { 
  color: #00bcd4cc; 
}

.place .btn { 
  background: #00bcd4; 
}

.place .btn:hover { 
  background: #0097a7; 
  box-shadow: 0 0 12px rgba(0, 188, 212, 0.6); 
}

/* Optional: Place card inside a grid */
.place-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.place-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.place-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
  color: #00bcd4;
}

.place-card p {
  margin: 0.3rem 0;
  color: #00bcd4cc;
  flex-grow: 1;
}

.place-card button {
  background: #00bcd4;
  color: white;
  border: none;
  padding: 0.7rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: auto;
}

.place-card button:hover {
  background: #0097a7;
}

/* =========================
   FOOTER
   ========================= */
.footer {
  background: linear-gradient(to right, #2c3e50, #4a5568);
  color: white;
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-about h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
  font-size: 1.4rem;
}

.footer-links h4, .footer-social h4 {
  margin-bottom: 1.2rem;
  font-size: 1.2rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 0.5rem;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.7rem;
}

.footer-links a {
  color: #e2e8f0;
  text-decoration: none;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-links a:hover {
  color: var(--accent);
  transform: translateX(5px);
}

.social-icons {
  display: flex;
  gap: 1rem;
  margin-top: 1.2rem;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  transition: var(--transition);
}

.social-icons a:hover {
  background: var(--primary);
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

/* =========================
   SCROLL TO TOP BUTTON
   ========================= */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow);
  z-index: 999;
  border: none;
}

.scroll-top.show {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  background: var(--primary-light);
  transform: translateY(-5px);
}

/* =========================
   PRINT STYLES
   ========================= */
@media print {
  .navbar, .footer, button, .menu-toggle, .scroll-top {
    display: none !important;
  }
  
  .lesson-card, .culture-card, .food-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
  
  body {
    background: white;
    color: black;
    font-size: 12pt;
  }
  
  .container {
    padding: 0;
  }
}

/* =========================
   DARK MODE TOGGLE
   ========================= */
.theme-toggle {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--card-bg);
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
  z-index: 999;
  border: none;
}

.theme-toggle:hover {
  transform: rotate(30deg);
}

/* =========================
   ACCESSIBILITY
   ========================= */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for accessibility */
button:focus,
input:focus,
select:focus,
a:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --primary: #0000ff;
    --text-dark: #000000;
    --text-light: #333333;
    --background: #ffffff;
    --card-bg: #ffffff;
  }
  
  .lesson-card, .culture-card, .food-card {
    border: 2px solid #000000;
  }
}

/* =========================
   RESPONSIVE ADJUSTMENTS
   ========================= */
@media (max-width: 1024px) {
  .grid-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .grid-container {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .lesson-grid, .culture-grid, .food-cards {
    grid-template-columns: 1fr;
  }
  
  .grid-item img {
    width: 80px;
    height: 80px;
  }
}

@media (max-width: 480px) {
  .grid-container {
    grid-template-columns: 1fr;
  }
  
  .grid-item img {
    width: 70px;
    height: 70px;
  }
  
  .page-title {
    font-size: 2rem;
  }
  
  .hero-content h2 {
    font-size: 2rem;
  }
}/* =========================
   ROOT VARIABLES & RESET
   ========================= */
:root {
  --primary: #4e54c8;
  --primary-light: #8f94fb;
  --secondary: #ff6b6b;
  --accent: #ffd166;
  --success: #4CAF50;
  --warning: #ff9800;
  --text-dark: #333;
  --text-light: #666;
  --text-lighter: #888;
  --background: #f8f9fa;
  --card-bg: #ffffff;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
  --border-radius: 12px;
  --transition: all 0.3s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--background);
  color: var(--text-dark);
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
}

.dark-mode {
  --text-dark: #f5f5f5;
  --text-light: #e0e0e0;
  --text-lighter: #b0b0b0;
  --background: #121212;
  --card-bg: #1e1e1e;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* =========================
   TYPOGRAPHY
   ========================= */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.8rem;
}

p {
  margin-bottom: 1rem;
}

/* =========================
   LAYOUT & CONTAINERS
   ========================= */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }
}

/* =========================
   NAVIGATION
   ========================= */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--card-bg);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition);
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: rgba(78, 84, 200, 0.1);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-dark);
  cursor: pointer;
}

/* Responsive Menu */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    background: var(--card-bg);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 1rem;
    box-shadow: var(--shadow);
  }

  .nav-links.show {
    display: flex;
  }
}

/* =========================
   HERO SECTION
   ========================= */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  padding: 2rem;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-content h2 {
  font-size: 2.8rem;
  margin-bottom: 1.2rem;
  color: white;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.hero .btn {
  background: white;
  color: var(--primary);
  padding: 0.8rem 1.8rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  display: inline-block;
}

.hero .btn:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* Responsive Hero */
@media (max-width: 768px) {
  .hero-content h2 {
    font-size: 2.2rem;
  }
  
  .hero-content p {
    font-size: 1rem;
  }
}

/* =========================
   PAGE HEADERS
   ========================= */
.page-title {
  text-align: center;
  font-size: 2.4rem;
  margin-bottom: 1rem;
  color: var(--primary);
  position: relative;
  padding-bottom: 0.8rem;
}

.page-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(to right, var(--primary), var(--primary-light));
  border-radius: 2px;
}

.intro-text {
  text-align: center;
  margin-bottom: 2.5rem;
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* =========================
   LESSONS SECTION
   ========================= */
.lessons {
  margin-bottom: 3rem;
  padding: 2rem;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.lessons:hover {
  box-shadow: var(--shadow-hover);
}

.lessons h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(78, 84, 200, 0.1);
}

.lesson-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.lesson-card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.lesson-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.lesson-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
  color: var(--primary);
  font-family: 'Noto Sans Devanagari', sans-serif;
  line-height: 1.4;
}

.lesson-card p {
  margin: 0.3rem 0;
  color: var(--text-light);
  flex-grow: 1;
}

.lesson-card small {
  display: block;
  margin-bottom: 0.8rem;
  color: var(--text-lighter);
  font-style: italic;
}

.lesson-card button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.7rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: auto;
}

.lesson-card button:hover {
  background: var(--primary-light);
}

/* Animation for lesson cards */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lesson-card {
  animation: fadeIn 0.5s ease forwards;
}

/* Stagger animation for cards */
.lesson-card:nth-child(1) { animation-delay: 0.1s; }
.lesson-card:nth-child(2) { animation-delay: 0.2s; }
.lesson-card:nth-child(3) { animation-delay: 0.3s; }
.lesson-card:nth-child(4) { animation-delay: 0.4s; }
.lesson-card:nth-child(5) { animation-delay: 0.5s; }
.lesson-card:nth-child(6) { animation-delay: 0.6s; }

/* =========================
   GAMES & QUIZ STYLES
   ========================= */
.game-box, .quiz-container, #game-container {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  text-align: center;
  max-width: 600px;
  margin: 2rem auto;
  transition: var(--transition);
}

.game-box:hover, .quiz-container:hover, #game-container:hover {
  box-shadow: var(--shadow-hover);
}

#word {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
  font-family: 'Noto Sans Devanagari', sans-serif;
  font-weight: bold;
}

#input, .game-box input, .quiz-container input {
  padding: 0.8rem 1.2rem;
  font-size: 1.1rem;
  border-radius: 8px;
  border: 2px solid #e0e0e0;
  width: 100%;
  margin-bottom: 1.5rem;
  text-align: center;
  transition: var(--transition);
}

#input:focus, .game-box input:focus, .quiz-container input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(78, 84, 200, 0.2);
}

.options {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.option-btn {
  padding: 0.8rem 1.2rem;
  border: none;
  border-radius: 8px;
  background: #f0f0f0;
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition);
}

.option-btn:hover {
  background: #e0e0e0;
}

.option-btn.correct {
  background: var(--success);
  color: white;
}

.option-btn.wrong {
  background: var(--secondary);
  color: white;
}

#feedback {
  margin: 1.2rem 0;
  font-weight: bold;
  font-size: 1.1rem;
}

#next-btn, .game-box button, .quiz-container button {
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}

#next-btn:hover, .game-box button:hover, .quiz-container button:hover {
  background: var(--primary-light);
}

#next-btn:disabled {
  background: #b0b0b0;
  cursor: not-allowed;
}

/* Progress box */
.progress-box {
  display: flex;
  justify-content: space-around;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(78, 84, 200, 0.1);
  border-radius: 8px;
  font-weight: 500;
}

/* =========================
   CULTURE & FOOD SECTIONS
   ========================= */


/* =========================
   FAQ SECTION
   ========================= */
.faq-container {
  max-width: 800px;
  margin: 2rem auto;
}

.faq-item {
  margin-bottom: 1rem;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.faq-item:hover {
  box-shadow: var(--shadow-hover);
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 1.2rem;
  font-size: 1.1rem;
  font-weight: 600;
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question:hover {
  background: var(--primary-light);
}

.faq-question::after {
  content: '\f078';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  transition: transform 0.3s ease;
}

.faq-question.active::after {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  background: var(--card-bg);
  transition: max-height 0.4s ease;
}

.faq-answer.open {
  max-height: 500px;
}

.faq-answer-inner {
  padding: 1.2rem;
}

/* =========================
   PAGINATION
   ========================= */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin: 2rem 0;
}

.pagination button {
  padding: 0.7rem 1.2rem;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition);
}

.pagination button:hover {
  background: var(--primary-light);
}

.pagination button:disabled {
  background: #d0d0d0;
  cursor: not-allowed;
}

/* =========================
   SEARCH BOX
   ========================= */
.search-box {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 2rem 0;
  gap: 0.8rem;
}

.search-box input,
.search-box select {
  padding: 0.8rem 1.2rem;
  font-size: 1rem;
  border-radius: 8px;
  border: 2px solid #e0e0e0;
  transition: var(--transition);
}

.search-box input:focus,
.search-box select:focus {
  outline: none;
  border-color: var(--primary);
}

.search-box button {
  padding: 0.8rem 1.5rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}

.search-box button:hover {
  background: var(--primary-light);
}

/* =========================
   GRID SECTION (HOMEPAGE)
   ========================= */
.grid-section {
  padding: 3rem 2rem;
  background: var(--background);
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.grid-item {
  padding: 2rem;
  border-radius: var(--border-radius);
  text-align: center;
  transition: var(--transition);
  background: var(--card-bg);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.grid-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

/* Floating animation for grid items */
@keyframes floatTilt {
  0% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-8px) rotate(1deg); }
  100% { transform: translateY(0) rotate(-1deg); }
}

.grid-item img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease;
  animation: floatTilt 3s ease-in-out infinite;
}

.grid-item:hover img {
  transform: scale(1.1);
  animation: none;
}

.grid-item h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
}

.grid-item p {
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.grid-item .btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  color: white;
}

/* Grid item colors */
.lessons { 
  background: linear-gradient(145deg, #ebf4ff, #dbeafe);
}

.lessons h3, .lessons h3 i { 
  color: #3b82f6; 
}

.lessons p { 
  color: #3b82f6cc; 
}

.lessons .btn { 
  background: #3b82f6; 
}

.lessons .btn:hover { 
  background: #2563eb; 
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.6); 
}

.games { 
  background: linear-gradient(145deg, #ecfdf5, #bbf7d0); 
}

.games h3, .games h3 i { 
  color: #22c55e; 
}

.games p { 
  color: #22c55ecc; 
}

.games .btn { 
  background: #22c55e; 
}

.games .btn:hover { 
  background: #16a34a; 
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.6); 
}

.food { 
  background: linear-gradient(145deg, #fff7ed, #ffedd5); 
}

.food h3, .food h3 i { 
  color: #f97316; 
}

.food p { 
  color: #f97316cc; 
}

.food .btn { 
  background: #f97316; 
}

.food .btn:hover { 
  background: #ea580c; 
  box-shadow: 0 0 12px rgba(249, 115, 22, 0.6); 
}

.culture { 
  background: linear-gradient(145deg, #f5f3ff, #ede9fe); 
}

.culture h3, .culture h3 i { 
  color: #8b5cf6; 
}

.culture p { 
  color: #8b5cf6cc; 
}

.culture .btn { 
  background: #8b5cf6; 
}

.culture .btn:hover { 
  background: #7c3aed; 
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.6); 
}

.quiz { 
  background: linear-gradient(145deg, #fdf2f8, #fce7f3); 
}

.quiz h3, .quiz h3 i { 
  color: #ec4899; 
}

.quiz p { 
  color: #ec4899cc; 
}

.quiz .btn { 
  background: #ec4899; 
}

.quiz .btn:hover { 
  background: #db2777; 
  box-shadow: 0 0 12px rgba(236, 72, 153, 0.6); 
}

/* =========================
   FOOTER
   ========================= */
.footer {
  background: linear-gradient(to right, #2c3e50, #4a5568);
  color: white;
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-about h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
  font-size: 1.4rem;
}

.footer-links h4, .footer-social h4 {
  margin-bottom: 1.2rem;
  font-size: 1.2rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 0.5rem;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.7rem;
}

.footer-links a {
  color: #e2e8f0;
  text-decoration: none;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-links a:hover {
  color: var(--accent);
  transform: translateX(5px);
}

.social-icons {
  display: flex;
  gap: 1rem;
  margin-top: 1.2rem;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  transition: var(--transition);
}

.social-icons a:hover {
  background: var(--primary);
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

/* =========================
   SCROLL TO TOP BUTTON
   ========================= */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow);
  z-index: 999;
  border: none;
}

.scroll-top.show {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  background: var(--primary-light);
  transform: translateY(-5px);
}

/* =========================
   PRINT STYLES
   ========================= */
@media print {
  .navbar, .footer, button, .menu-toggle, .scroll-top {
    display: none !important;
  }
  
  .lesson-card, .culture-card, .food-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
  
  body {
    background: white;
    color: black;
    font-size: 12pt;
  }
  
  .container {
    padding: 0;
  }
}

/* =========================
   DARK MODE TOGGLE
   ========================= */
.theme-toggle {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--card-bg);
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
  z-index: 999;
  border: none;
}

.theme-toggle:hover {
  transform: rotate(30deg);
}

/* =========================
   ACCESSIBILITY
   ========================= */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for accessibility */
button:focus,
input:focus,
select:focus,
a:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --primary: #0000ff;
    --text-dark: #000000;
    --text-light: #333333;
    --background: #ffffff;
    --card-bg: #ffffff;
  }
  
  .lesson-card, .culture-card, .food-card {
    border: 2px solid #000000;
  }
}

/* =========================
   RESPONSIVE ADJUSTMENTS
   ========================= */
@media (max-width: 1024px) {
  .grid-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .grid-container {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .lesson-grid, .culture-grid, .food-cards {
    grid-template-columns: 1fr;
  }
  
  .grid-item img {
    width: 80px;
    height: 80px;
  }
}

@media (max-width: 480px) {
  .grid-container {
    grid-template-columns: 1fr;
  }
  
  .grid-item img {
    width: 70px;
    height: 70px;
  }
  
  .page-title {
    font-size: 2rem;
  }
  
  .hero-content h2 {
    font-size: 2rem;
  }
}


/* =========================
   NEPALI FACTS STYLES
   ========================= */
.nepali-facts { 
  background: linear-gradient(145deg, #fff9db, #ffe7a5); 
}

.nepali-facts h3, .nepali-facts h3 i { 
  color: #f59f00; 
}

.nepali-facts p { 
  color: #f59f00cc; 
}

.nepali-facts .btn { 
  background: #f59f00; 
}

.nepali-facts .btn:hover { 
  background: #e67700; 
  box-shadow: 0 0 12px rgba(245, 159, 0, 0.6); 
}

/* Facts card styling for facts.html page */
.fact-card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.fact-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.fact-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
  color: #f59f00;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fact-card p {
  margin: 0.3rem 0;
  color: var(--text-light);
  flex-grow: 1;
}

.fact-card .fact-number {
  position: absolute;
  top: 0;
  right: 0;
  background: #f59f00;
  color: white;
  padding: 0.5rem 0.8rem;
  font-weight: bold;
  border-bottom-left-radius: 8px;
}

.fact-card .fact-category {
  display: inline-block;
  background: rgba(245, 159, 0, 0.1);
  color: #f59f00;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  margin-bottom: 0.8rem;
}

/* Facts page specific styles */
.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.facts-filter {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.facts-filter button {
  padding: 0.7rem 1.2rem;
  border: none;
  border-radius: 8px;
  background: #f0f0f0;
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
}

.facts-filter button:hover, .facts-filter button.active {
  background: #f59f00;
  color: white;
}

.fact-of-the-day {
  background: linear-gradient(135deg, #fff9db, #ffe7a5);
  padding: 2rem;
  border-radius: var(--border-radius);
  margin: 2rem 0;
  text-align: center;
  border-left: 4px solid #f59f00;
}

.fact-of-the-day h3 {
  color: #f59f00;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.grid-item.nepali-news {
  /* Inherits from .grid-item to maintain overall grid styling */
}

/* Specific styling for the news icon */
.grid-item.nepali-news h2 i {
  color: var(--primary-color); /* Or a specific color you want for news icon */
}

/* Optional: Add a custom background for the news card for visual distinction */
.grid-item.nepali-news {
  background: linear-gradient(135deg, #d8f3e6, #b2ead1); /* Example light green gradient */
 /* A green border to match the theme */
}

/* Optional: Adjust button color to match the card theme */
.grid-item.nepali-news .btn {
  background-color: #4CAF50;
}

.grid-item.nepali-news .btn:hover {
  background-color: #388e3c;
}

/* If you have a separate facts-grid CSS, you might want to add similar styling there */
.facts-grid .facts-filter button.news-filter:hover, .facts-grid .facts-filter button.news-filter.active {
  background: #4CAF50;
  color: white;
}