/*
 * Main stylesheet for ScienceSpark Maharashtra
 * Modern light theme design with responsive layout
 */

/* Base Styles and Variables */
:root {
  --primary-color: #4a6baf;
  --secondary-color: #5cb85c;
  --accent-color: #f0ad4e;
  --dark-color: #333333;
  --light-color: #f8f9fa;
  --text-color: #333333;
  --border-color: #e1e1e1;
  --shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--light-color);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

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

a:hover {
  color: #3a559c;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin-bottom: 1rem;
  font-weight: 600;
  line-height: 1.2;
}

h1 {
  font-size: 2.5rem;
  color: var(--primary-color);
}

h2 {
  font-size: 2rem;
  color: var(--primary-color);
}

h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: #3a559c;
  color: white;
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: white;
}

.btn-secondary:hover {
  background-color: #4a9d4a;
  color: white;
}

.btn-success {
  background-color: #28a745;
  color: white;
}

.btn-success:hover {
  background-color: #218838;
  color: white;
}

/* Header Styles */
.main-header {
  background-color: white;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo a {
  display: flex;
  align-items: center;
  color: var(--primary-color);
  font-size: 1.5rem;
  font-weight: 700;
}

.logo img {
  height: 40px;
  margin-right: 10px;
}

.main-nav .nav-menu {
  display: flex;
  list-style: none;
}

.main-nav .nav-menu li {
  position: relative;
}

.main-nav .nav-menu a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--dark-color);
  font-weight: 500;
}

.main-nav .nav-menu a:hover,
.main-nav .nav-menu a.active {
  color: var(--primary-color);
}

.dropdown-toggle {
  display: flex;
  align-items: center;
}

.dropdown-toggle i {
  margin-left: 5px;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: white;
  box-shadow: var(--shadow);
  border-radius: var(--border-radius);
  min-width: 150px;
  display: none;
  z-index: 1;
}

.dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-menu li {
  width: 100%;
}

.dropdown-menu a {
  padding: 0.75rem 1rem;
}

.menu-toggle {
  /* Removed display: none; to make it visible on all screen sizes */
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle .bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background-color: var(--dark-color);
  transition: var(--transition);
}

/* Footer Styles */
.main-footer {
  background-color: var(--dark-color);
  color: white;
  padding: 3rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-logo img {
  height: 50px;
  margin-bottom: 1rem;
}

.footer-logo p {
  font-size: 0.9rem;
  opacity: 0.8;
}

.footer-links h3,
.footer-grades h3,
.footer-contact h3 {
  color: white;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.footer-links ul,
.footer-grades ul {
  list-style: none;
}

.footer-links a,
.footer-grades a {
  color: rgba(255, 255, 255, 0.8);
  display: block;
  padding: 0.3rem 0;
}

.footer-links a:hover,
.footer-grades a:hover {
  color: white;
}

.footer-contact p {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.footer-contact i {
  margin-right: 10px;
}

.social-icons {
  display: flex;
  gap: 15px;
  margin-top: 1rem;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  transition: var(--transition);
}

.social-icons a:hover {
  background-color: var(--primary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Home Page Styles */
.hero-section {
  background: linear-gradient(135deg, #4a6baf 0%, #5cb85c 100%);
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.hero-content h1 {
  font-size: 3rem;
  color: white;
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto 2rem;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.hero-buttons .btn {
  padding: 0.75rem 2rem;
  font-size: 1.1rem;
}

/* Grade Selection Section */
.grade-selection {
  padding: 4rem 0;
  background-color: white;
}

.grade-selection h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.grades-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.grade-card {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}

.grade-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.grade-header {
  background-color: var(--primary-color);
  color: white;
  padding: 1.5rem;
  text-align: center;
}

.grade-header h3 {
  margin: 0;
  font-size: 1.8rem;
}

.grade-body {
  padding: 1.5rem;
}

.grade-body p {
  margin-bottom: 1.5rem;
}

.grade-body .btn {
  width: 100%;
}

/* Features Section */
.features-section {
  padding: 4rem 0;
  background-color: var(--light-color);
}

.features-section h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.feature-card h3 {
  margin-bottom: 1rem;
}

/* Grade Page Styles */
.grade-hero {
  background: linear-gradient(135deg, #4a6baf 0%, #5cb85c 100%);
  color: white;
  padding: 3rem 0;
  text-align: center;
}

.grade-hero h1 {
  color: white;
  margin-bottom: 1rem;
}

.chapter-list {
  padding: 3rem 0;
  background-color: white;
}

.chapters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.chapter-card {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  position: relative;
  transition: var(--transition);
}

.chapter-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.chapter-number {
  position: absolute;
  top: -15px;
  left: -15px;
  width: 40px;
  height: 40px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.chapter-card h3 {
  margin-bottom: 1.5rem;
  padding-left: 1rem;
}

.learning-modes {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mode-link {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.mode-link i {
  margin-right: 0.5rem;
}

.mode-link.learn {
  background-color: rgba(74, 107, 175, 0.1);
  color: var(--primary-color);
}

.mode-link.learn:hover {
  background-color: var(--primary-color);
  color: white;
}

.mode-link.qa {
  background-color: rgba(92, 184, 92, 0.1);
  color: var(--secondary-color);
}

.mode-link.qa:hover {
  background-color: var(--secondary-color);
  color: white;
}

.mode-link.quiz {
  background-color: rgba(240, 173, 78, 0.1);
  color: var(--accent-color);
}

.mode-link.quiz:hover {
  background-color: var(--accent-color);
  color: white;
}

.grade-features {
  padding: 3rem 0;
  background-color: var(--light-color);
}

.grade-navigation {
  padding: 3rem 0;
  background-color: white;
  text-align: center;
}

.grade-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.grade-button {
  padding: 0.75rem 1.5rem;
  background-color: white;
  border: 2px solid var(--primary-color);
  border-radius: var(--border-radius);
  color: var(--primary-color);
  font-weight: 500;
  transition: var(--transition);
}

.grade-button:hover,
.grade-button.active {
  background-color: var(--primary-color);
  color: white;
}

/* Chapter Page Styles */
.chapter-hero {
  background: linear-gradient(135deg, #4a6baf 0%, #5cb85c 100%);
  color: white;
  padding: 2rem 0;
}

.breadcrumbs {
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.8);
}

.breadcrumbs a {
  color: rgba(255, 255, 255, 0.8);
}

.breadcrumbs a:hover {
  color: white;
}

.chapter-hero h1 {
  color: white;
  margin-bottom: 0.5rem;
}

.mode-navigation {
  background-color: white;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.mode-tabs {
  display: flex;
  overflow-x: auto;
}

.mode-tab {
  padding: 1rem 1.5rem;
  color: var(--dark-color);
  font-weight: 500;
  border-bottom: 3px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}

.mode-tab:hover {
  color: var(--primary-color);
}

.mode-tab.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.mode-tab i {
  margin-right: 0.5rem;
}

.chapter-content {
  padding: 2rem 0;
  background-color: white;
}

.learning-mode-content,
.qa-mode-content,
.quiz-mode-content {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 2rem;
}

.chapter-summary,
.qa-section {
  margin-top: 1.5rem;
}

.content-placeholder {
  background-color: var(--light-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: center;
  margin-top: 1.5rem;
}

.quiz-intro {
  text-align: center;
  margin-bottom: 2rem;
}

.quiz-intro .btn {
  margin-top: 1rem;
}

#quiz-progress {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.quiz-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
}

.score-display {
  text-align: center;
  margin: 2rem 0;
}

.score-display p {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.progress-bar {
  height: 20px;
  background-color: var(--light-color);
  border-radius: 10px;
  overflow: hidden;
}

#score-bar {
  height: 100%;
  background-color: var(--secondary-color);
  transition: width 0.5s ease;
}

#retake-quiz {
  display: block;
  margin: 2rem auto 0;
}

.chapter-navigation {
  padding: 2rem 0;
  background-color: var(--light-color);
}

.nav-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-button {
  padding: 0.75rem 1.5rem;
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.nav-button:hover {
  background-color: var(--primary-color);
  color: white;
}

.nav-button.prev i,
.nav-button.next i {
  margin: 0 0.5rem;
}

.related-chapters {
  padding: 3rem 0;
  background-color: white;
}

.related-chapters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

.related-chapter-card {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  transition: var(--transition);
}

.related-chapter-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* AdSense Styles */
.ad-banner {
  margin: 2rem auto;
  text-align: center;
  min-height: 90px;
  background-color: #f0f0f0;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-sidebar {
  position: fixed;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  width: 160px;
  z-index: 900;
}

.ad-unit {
  min-height: 600px;
  background-color: #f0f0f0;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* About Page Styles */
.about-section {
  padding: 4rem 0;
  background-color: white;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-image img {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

/* Contact Page Styles */
.contact-section {
  padding: 4rem 0;
  background-color: white;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-form {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-family: inherit;
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

.contact-info {
  background-color: var(--primary-color);
  color: white;
  border-radius: var(--border-radius);
  padding: 2rem;
}

.contact-info h3 {
  color: white;
  margin-bottom: 1.5rem;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.contact-info-item i {
  margin-right: 1rem;
  font-size: 1.2rem;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .about-content,
  .contact-content {
    grid-template-columns: 1fr;
  }

  .ad-sidebar {
    display: none;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block; /* Ensure it's displayed on smaller screens */
  }

  .main-nav .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 80%;
    height: calc(100vh - 70px);
    background-color: white;
    flex-direction: column;
    box-shadow: var(--shadow);
    transition: var(--transition);
    z-index: 1000;
  }

  .main-nav .nav-menu.active {
    left: 0;
  }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    display: none;
    width: 100%;
  }

  .dropdown.active .dropdown-menu {
    display: block;
  }

  .nav-buttons {
    flex-direction: column;
    gap: 1rem;
  }

  .hero-buttons {
    flex-direction: column;
  }
}

@media (max-width: 576px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .hero-content h1 {
    font-size: 2.2rem;
  }

  .mode-tabs {
    flex-direction: column;
  }

  .mode-tab {
    text-align: center;
  }
}

