/* 🌐 Font & Reset */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  scroll-behavior: smooth;
}

/* 🌗 Theme & Dark Mode */
:root {
  --bg-color: #f9fafb;
  --text-color: #1f2937;
  --accent: #2563eb;
  --card-bg: #ffffff;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  transition: background-color 0.3s, color 0.3s;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body.dark-mode {
  --bg-color: #0f172a;
  --text-color: #f1f5f9;
  --accent: #3b82f6;
  --card-bg: #1e293b;
  background-color: var(--bg-color);
  color: var(--text-color);
}

/* 🧭 Header Layout */
.dlm-logo-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.5rem 1rem;
}

.header-left,
.header-center,
.header-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-left {
  justify-content: flex-start;
}

.header-center {
  flex-direction: column;
  text-align: center;
}

.header-right {
  justify-content: flex-end;
}

.dlm-logo {
  height: 32px;
  width: auto;
}

.dlm-heading {
  font-size: 1.25rem;
  margin: 0;
  white-space: nowrap;
}

.dlm-subheading {
  font-size: 0.95rem;
  opacity: 0.9;
  text-align: center;
}

/* 🌙 Theme Toggle Button */
.theme-toggle {
  height: 32px;
  width: auto;
  font-size: 0.95rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
}
.theme-toggle:hover {
  background-color: #ddd;
}

/* 🧭 Navigation */
.dlm-nav,
nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  background-color: #1e3a8a;
  padding: 0.75rem 1rem;
}

.dlm-nav a,
nav a {
  background-color: #2563eb;
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.dlm-nav a:hover,
nav a:hover {
  background-color: #1d4ed8;
}

/* 📘 Section Headings */
.subject-heading {
  font-size: 1.6rem;
  font-weight: 600;
  text-align: center;
  margin: 1.5rem 0 0.4rem;
  color: var(--text-color); /* Use high-contrast text color */
}

.subject-tagline-wrapper {
  text-align: center;
  display: flex;
  justify-content: center;
  margin-bottom: 1.2rem;
}

.subject-tagline {
  display: inline-block;
  font-size: 1.2rem;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.5px;
  color: var(--text-color); /* Use high-contrast text color */
  background: linear-gradient(to right, #eef2f3, #ffffff);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  animation: fadeInUp 1.2s ease-out;
  max-width: 90%;
}

body.dark-mode .subject-tagline {
  background: linear-gradient(to right, #2c3e50, #3a3a3a);
}

/* Animation Keyframes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 📦 Unit Grid */
.unit-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1rem auto;
  max-width: 800px;
}

.unit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  background-color: var(--card-bg);
  border-left: 5px solid var(--accent);
  padding: 0.5rem 0.25rem;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  margin-bottom: 1rem;
}

.unit-row span {
  flex: 1 1 180px;
  word-wrap: break-word;
}

/* 🧪 Quiz Buttons */
.unit-buttons,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin: 1rem 0;
}

.unit-buttons a,
.button-row a button {
  padding: 0.5rem 1rem;
  border-radius: 5px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background-color 0.3s ease;
}

/* 🎨 Button Colors */
.button-row a:nth-child(1) button { background-color: #007BFF; color: white; }
.button-row a:nth-child(2) button { background-color: #28A745; color: white; }
.button-row a:nth-child(3) button { background-color: #FFC107; color: black; }
.button-row a:nth-child(4) button { background-color: #cb34c4; color: white; }
.button-row a:nth-child(5) button { background-color: #6C757D; color: white; }

.btn-quiz {
  background-color: #14e969;
  color: white;
}

.btn-quiz:hover {
  background-color: #1d4ed8;
}

.btn-about {
  background-color: #4CAF50;
  color: white;
}

.btn-about:hover {
  background-color: #45a049;
}

.btn-lesson {
  background-color: #2b3ff3;
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  margin-left: 5px;
}

.btn-lesson:hover {
  background-color: #321fb0;
}

/* 📝 Language Toggle */
.toggle {
  text-align: right;
  margin: 1rem;
}

.toggle button {
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  background-color: #007BFF;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* 🧠 Quiz Cards */
.quiz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  padding: 2rem 0;
}

.quiz-card {
  background-color: var(--card-bg);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease;
}

.quiz-card:hover {
  transform: translateY(-4px);
}

.quiz-card h3 {
  margin-bottom: 0.5rem;
}

.quiz-card p {
  font-size: 0.9rem;
  color: var(--text-color);
}
/* 👣 Footer */
footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.9rem;
  border-top: 1px solid #ccc;
  background-color: #f0f0f0;
  color: #555;
}

footer p {
  font-size: 0.85rem;
}

footer a {
  color: #0066cc; /* Clear blue for light mode */
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* 🌙 Dark Mode Footer */
.dark-mode footer {
  background-color: #1e1e1e;
  color: #aaa;
}

.dark-mode footer a {
  color: #80bfff; /* Light blue for contrast in dark mode */
}


/* 🌐 Language Section Default */
#hindi {
  display: none;
}

/* 🖼️ Hero Banner */
.hero-banner {
  position: relative;
  text-align: center;
  margin: 1rem auto;
  padding: 0;
  overflow: hidden;
}

.banner-img {
  width: 100%;
  height: 40vh;
  object-fit: cover;
  display: block;
  border-radius: 10px;
}

.banner-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  background: rgba(0, 0, 0, 0.5);
  padding: 1rem 2rem;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  text-align: center;
  width: 90%;
  max-width: 600px;
}

.banner-text h1 {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.banner-text p {
  font-size: 1.0rem;
}

/* 📱 Responsive Styles for Small Screens */
@media (max-width: 600px) {
  /* Header */
  .dlm-logo-header {
    flex-direction: column;
    gap: 0.5rem;
  }
}