/* General Styles */
body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f4f4f4;
}

h1, h2, h3 {
  font-weight: 600;
  color: #1a73e8;
}

p {
  font-size: 1.1rem;
  color: #555;
}

/* Skip to Main Content */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 999;
}

.skip-link:focus {
  position: static;
  width: auto;
  height: auto;
  padding: 0.5rem;
  background-color: #1a73e8;
  color: white;
  text-align: center;
  clip: auto;
}

/* Header Banner */
.header-banner {
  background-color: #4a90e2;
  padding: 1.25rem;
  color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar {
  background-color: #4a90e2 !important;
  padding: 0;
}

.navbar-toggler {
  border: 2px solid white;
  border-radius: 4px;
  padding: 0.5rem;
  background-color: transparent;
  margin-right: auto;
  margin-left: 0;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
  width: 1.5em;
  height: 1.5em;
}

.navbar-toggler:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.8);
}

/* General Styles */
body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f4f4f4;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 {
  font-weight: 600;
  color: #1a73e8;
}

p {
  font-size: 1.1rem;
  color: #555;
}

/* Skip to Main Content */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 999;
}

.skip-link:focus {
  position: static;
  width: auto;
  height: auto;
  padding: 0.5rem;
  background-color: #1a73e8;
  color: white;
  text-align: center;
  clip: auto;
}

/* Header Banner */
.header-banner {
  background-color: #4a90e2;
  padding: 1rem 0;
  color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar {
  background-color: #4a90e2 !important;
  padding: 0;
  width: 100%;
}

.navbar-brand {
  color: white !important;
  font-weight: bold;
  font-size: 1.25rem;
}

.navbar-toggler {
  border: 2px solid white;
  border-radius: 4px;
  padding: 0.5rem;
  background-color: transparent !important;
  margin-left: auto;
  order: 2;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
  width: 1.5em;
  height: 1.5em;
}

.navbar-toggler:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.8);
}

.navbar-toggler:focus {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

.navbar-collapse {
  background-color: #4a90e2;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 0.5rem;
  order: 3;
  flex-basis: 100%;
}

.navbar-nav {
  flex-direction: column;
  padding-left: 0;
}

/* Desktop navbar styles */
@media (min-width: 992px) {
  .navbar-toggler {
    display: none;
  }
  
  .navbar-collapse {
    background-color: transparent;
    border-radius: 0;
    padding: 0;
    margin-top: 0;
    order: 1;
    flex-basis: auto;
    flex-grow: 1;
    justify-content: center;
  }
  
  .navbar-nav {
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
  }
}

.nav-link {
  color: white !important;
  font-weight: bold;
  padding: 0.5rem 1rem;
  transition: background-color 0.3s ease;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.nav-link.current-page {
  background-color: rgba(255, 255, 255, 0.2) !important;
  border-radius: 4px !important;
  font-weight: bold !important;
  color: white !important;
  cursor: default !important;
  pointer-events: none !important;
}

/* Footer */
.footer {
  background-color: #4a90e2;
  color: white;
  padding: .3rem 0;
  text-align: center;
  font-size: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 2rem;
}

.footer p {
  color: white; /* Ensures the text is white */
}

.footer a {
  color: white;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* Mascot Styling */
.mascot-image {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #1a73e8;
  margin-bottom: 1rem;
}

/* Introduction Text */
.introduction-text {
  max-width: 800px;
  margin: 2rem auto;
  padding: 1rem;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.introduction-text h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

/* Language Sections */
.language-sections {
  max-width: 800px;
  margin: 0 auto;
}

.language-section {
  margin-bottom: 1rem;
}

.language-toggle {
  display: block;
  width: 100%;
  padding: 1rem;
  background-color: #4a90e2;
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 1.1rem;
  font-weight: bold;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.language-toggle:hover {
  background-color: #357abd;
}

.language-content {
  padding: 1rem;
  background-color: white;
  border-radius: 8px;
  margin-top: 0.5rem;
  display: none;
}



/* Center Images in Language Sections with Previous Dimensions */
.language-content img {
  display: block; /* Ensure the image behaves as a block element */
  margin: 0 auto; /* Center the image horizontally */
  max-width: 400px; /* Retain the previous max-width */
  width: 100%; /* Ensure the image is responsive */
  height: auto; /* Maintain aspect ratio */
  border-radius: 8px;
  margin-bottom: 1rem;
}

/* Context Section Styling */
.language-content p {
  font-size: 1rem;
  color: #555;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  padding: 0.5rem;
  background-color: #f9f9f9;
  border-left: 4px solid #1a73e8;
  border-radius: 4px;
}

.language-content p strong {
  color: #1a73e8;
  font-weight: 600;
}

.language-content ul {
  list-style-type: none;
  padding: 0;
}

.language-content li {
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.6;
}

.language-content li strong {
  display: block;
  font-size: 1.1rem;
  color: #1a73e8;
}

/* Styles for Sanskrit Word Entries */
.word {
  font-size: 1.2rem; /* Bigger font size */
  font-weight: bold; /* Bold */
  color: #1a73e8; /* Blue color */
}

.translation {
  font-weight: normal; /* Non-bold */
  color: #333; /* Default text color */
}

.root-word {
  font-weight: bold; /* Bold */
  color: #000; /* Black color */
  font-style: normal; /* Override italic if needed */
}

/* Dark Mode Styles */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #121212;
    color: #e0e0e0;
  }

  p.discover-text {
    color: #e0e0e0; /* Dark mode color */
  }

  .introduction-text, .language-content {
    background-color: #1e1e1e;
    color: #e0e0e0;
  }

  .introduction-text p {
    color: #e0e0e0; /* Fix for greyish text in dark mode */
  }


  .language-toggle {
    background-color: #1a73e8;
  }

  .language-toggle:hover {
    background-color: #1356a1;
  }

  .language-content p {
    background-color: #2a2a2a;
    color: #e0e0e0;
    border-left-color: #4a90e2;
  }

  .language-content p strong {
    color: #4a90e2;
  }

  .language-content li strong {
    color: #4a90e2;
  }

  /* Dark Mode Banner Fix */
  .header-banner {
    background-color: #1a73e8 !important; /* Ensure banner is blue in dark mode */
  }

  .navbar-collapse {
    background-color: #1a73e8;
  }

  .navbar {
    background-color: #1a73e8 !important;
  }

  .footer {
    background-color: #1a73e8;
    color: #e0e0e0;
    border-top-color: #444;
  }

  /* Dark mode adjustments for Sanskrit word entries */
  .word {
    color: #4a90e2; /* Blue color for dark mode */
  }

  .translation {
    color: #e0e0e0; /* Light text color for dark mode */
  }

  .root-word {
    color: #fff; /* White color for dark mode */
  }
}