/* common.css */

/* Container for the whole page */
.page-container {
  min-height: 100vh;
  background-color: #f8f9fa;
  padding: 40px;
  font-family: Arial, sans-serif;
}

/* Go Back link/button */
.goback {
  margin-top: 20px;
  text-align: right; /* moves the button to the right */
}

/* Chapter headings */
.chapter {
  cursor: pointer;
  font-weight: bold;
  font-size: 1.1rem;
  color: #0056b3;
  margin: 10px 0;
  padding: 8px 12px;
  background: white;
  border-radius: 6px;
  border: 1px solid #ddd;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.chapter:hover {
  background-color: #e8f0ff;
  transform: translateX(4px);
}

/* Topics list */
.topics {
  display: none;
  margin-left: 25px;
  margin-top: 5px;
  background: #ffffff;
  border-left: 3px solid #007BFF;
  padding: 10px 15px;
  border-radius: 4px;
}

/* Topic items */
.topics li {
  list-style: none;
  margin: 6px 0;
  font-size: 0.95rem;
}

.topics li a {
  text-decoration: none;
  color: #333;
  transition: color 0.2s ease;
}

.topics li a:hover {
  color: #007BFF;
}

/* NCERT link */
.ncert-link {
  margin-left: 10px;
  font-size: 0.85rem;
  color: green;
  text-decoration: none;
  font-weight: 600;
}

.ncert-link:hover {
  text-decoration: underline;
  color: darkgreen;
}

/* =====================
   MOBILE RESPONSIVENESS
   ===================== */
@media (max-width: 768px) {
  .page-container {
    padding: 20px; /* less padding for small screens */
  }

  .goback {
    text-align: center; /* center button on mobile */
    margin-bottom: 15px;
  }

  .chapter {
    font-size: 1rem; /* slightly smaller text */
    padding: 10px;
  }

  .topics {
    margin-left: 15px; /* less indentation */
    padding: 8px 10px;
  }

  .topics li {
    font-size: 0.9rem;
  }

  .ncert-link {
    display: block; /* stack below topic link */
    margin: 4px 0 0 0;
  }
}

@media (max-width: 480px) {
  .chapter {
    font-size: 0.95rem;
    padding: 8px;
  }

  .topics {
    margin-left: 10px;
    padding: 6px 8px;
  }

  .topics li {
    font-size: 0.85rem;
  }
}
