/* 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;
  text-decoration: none;
  order: 1;
}

.navbar-brand:hover {
  color: white !important;
  text-decoration: none;
}

.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-brand {
    order: 1;
  }
  
  .navbar-collapse {
    background-color: transparent;
    border-radius: 0;
    padding: 0;
    margin-top: 0;
    order: 2;
    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);
  border-radius: 4px;
  font-weight: bold;
  color: white !important;
  cursor: default;
  pointer-events: none;
}

/* Iconic Image Section */
.iconic-image-section {
  text-align: center;
  margin-bottom: 2rem;
}

.iconic-image-section img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  object-position: center top;
  border-radius: 0px;
}

.iconic-image-caption {
  color: #333;
  background-color: transparent;
  padding: 1rem 0;
  margin-top: 0.5rem;
}

.iconic-image-caption h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.iconic-image-caption p {
  font-size: 1.2rem;
  color: #666;
}

/* Weather Section */
.weather-section {
  background-color: #e3f2fd;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.weather-info {
  font-size: 1.2rem;
  font-weight: bold;
  color: #333;
}

.weather-info img {
  width: 50px;
  height: 50px;
  filter: brightness(0.8);
}

/* Clean List Style */
.clean-list {
  list-style-type: none;
  padding-left: 0;
}

.clean-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
}

.clean-list li:last-child {
  border-bottom: none;
}

/* Nested List Style */
.nested-list {
  list-style-type: disc;
  padding-left: 1.5rem;
}

.nested-list li {
  padding: 0.3rem 0;
}

/* Image Alignment */
.culture-art img,
.cities-places img {
  display: block;
  margin: 1rem auto;
  max-width: 45%;
  height: auto;
  border-radius: 8px;
}

/* 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: auto;
  position: relative;
  bottom: 0;
  width: 100%;
}

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

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

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

/* Categories in Index Page */
.categories-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 0rem;
}

.category-link {
  display: block;
  text-align: center;
  padding: 1rem;
  margin: 0.5rem 0;
  background-color: #4a90e2;
  border: 2px solid #4a90e2;
  border-radius: 8px;
  text-decoration: none;
  color: white;
  font-size: 1.1rem;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.category-link:hover {
  background-color: white;
  color: #4a90e2;
}

/* Updated about-content styling */
.about-content {
  max-width: 800px; /* Limit width for better readability */
  margin: 0 auto; /* Center the content */
  padding: 2rem; /* Add padding for whitespace */
  background-color: var(--background-color); /* Use CSS variable for dark mode compatibility */
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.about-content p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-color); /* Use CSS variable for dark mode compatibility */
  margin-bottom: 1.5rem; /* Add space between paragraphs */
}


/* Fix imbuhan link color in light mode */
.about-content a[href*="imbuhan"] {
  color: #1a73e8; /* Blue color for light mode */
  text-decoration: none;
}

.about-content a[href*="imbuhan"]:hover {
  text-decoration: underline;
}

/* Ensure imbuhan link color in dark mode remains blue */
@media (prefers-color-scheme: dark) {
  .about-content a[href*="imbuhan"] {
    color: #4a90e2; /* Light blue for dark mode */
  }
}


/* Fix "Start Learning Now" button colors */
.about-content .btn-primary {
  background-color: #4a90e2; /* Lighter blue for light mode */
  border-color: #4a90e2;
  color: white; /* Always white text */
  padding: 0.75rem 1.5rem;
  font-size: 1.1rem;
  border-radius: 8px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.about-content .btn-primary:hover {
  background-color: #357abd; /* Darker blue for hover in light mode */
  border-color: #357abd;
  color: white; /* Ensure text stays white on hover */
}


/* NEWWW Center the button in the column */
.about-content .btn-primary {
  display: block; /* Make the button a block element */
  margin: 0 auto; /* Center horizontally */
  text-align: center; /* Center text inside the button */
  width: fit-content; /* Adjust width to fit content */
}



/* Dark mode adjustments for the button */
@media (prefers-color-scheme: dark) {
  .about-content .btn-primary {
    background-color: #1a73e8; /* Darker blue for dark mode */
    border-color: #1a73e8;
  }

  .about-content .btn-primary:hover {
    background-color: #1356a1; /* Even darker blue for hover in dark mode */
    border-color: #1356a1;
  }
}

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

/* Flashcards Styling */
.card {
  background-color: #fff;
  border: 2px solid #333;
  border-radius: 10px;
  margin-top: 2rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#translation-text {
  text-align: left;
  font-size: 1rem;
  line-height: 1.6;
  color: #555;
}

#translation-text strong {
  display: block;
  margin-top: 0.5rem;
  color: #333;
}



/* PHOTO START */

.credits-section {
  font-size: 0.8em;
  color: #666;
  margin-top: 2em;
  padding-top: 1em;
  border-top: 1px solid #eee;
}

.credits-section h2 {
  font-size: 1.2em;
  margin-bottom: 0.5em;
}

.credits-section ul {
  padding-left: 1em;
}

.credits-section a {
  color: #666;
  text-decoration: none;
}

.credits-section a:hover {
  text-decoration: underline;
}

/* PHOTO END */




/* Back Button in Flashcards */
.back-button {
  background-color: transparent;
  border: 2px solid white;
  color: white;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.back-button:hover {
  background-color: white;
  color: #4a90e2;
}

/* Glossary Styling */
.glossary-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin-top: 2rem;
}

.category-section {
  margin-bottom: 2rem;
}

.category-section h2 {
  font-size: 1.75rem;
  font-weight: bold;
  color: #4a90e2;
  margin-bottom: 1rem;
  border-bottom: 2px solid #4a90e2;
  padding-bottom: 0.5rem;
}

.category-section ul {
  list-style-type: none;
  padding: 0;
}

.category-section li {
  background-color: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.category-section li:hover {
  background-color: #e9ecef;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.category-section li strong {
  font-size: 1.25rem;
  color: #1a73e8;
  display: block;
  margin-bottom: 0.5rem;
}

.category-section li em {
  display: block;
  font-style: italic;
  color: #555;
  margin-bottom: 0.5rem;
}

.category-section li .example {
  display: block;
  color: #666;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

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

  p {
    color: #e0e0e0; /* Ensure <p> text is light gray */
  }

  .card {
    background-color: #1e1e1e;
    border-color: #444;
    color: #e0e0e0;
  }

  .weather-section {
    background-color: #2d2d2d;
    color: #e0e0e0;
  }

  .weather-info {
    color: #e0e0e0;
  }

  .weather-info img {
    filter: brightness(1.5) invert(0.1);
  }

  .clean-list li {
    border-bottom: 1px solid #444;
  }


  .header-banner {
    background-color: #1a73e8; /* Ensure header 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;
  }

  .category-link {
    background-color: #1a73e8;
    border-color: #1a73e8;
    color: #e0e0e0;
  }

  .category-link:hover {
    background-color: #e0e0e0;
    color: #1a73e8;
  }

  #translation-text {
    color: #e0e0e0;
  }

  #translation-text strong {
    color: #e0e0e0;
  }

  .glossary-container {
    background-color: #1e1e1e;
    border-color: #444;
    color: #e0e0e0;
  }

  .category-section h2 {
    color: #1a73e8;
    border-bottom-color: #1a73e8;
  }

  .category-section li {
    background-color: #2d2d2d;
    border-color: #444;
    color: #e0e0e0;
  }

  .category-section li:hover {
    background-color: #3d3d3d;
  }

  .category-section li strong {
    color: #1a73e8;
  }

  .category-section li em {
    color: #ccc;
  }

  .category-section li .example {
    color: #999;
  }
}
