:root {
  color-scheme: light dark;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  background: #ffffff;
  color: #24292f;
  line-height: 1.6;
}

.top-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #0d1117;
  border-bottom: 0.5px solid #30363d;
  display: flex;
  justify-content: center;
  padding: 0;
  z-index: 1000;
}

.header-content-container {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 1440px;
  padding: 0 1.5rem;
  box-sizing: border-box;
}

.header-content-container .nav {
  margin-left: auto;
  display: flex;
  gap: 20px;
}

.header-content-container .main-nav {
  margin-left: 20px;
}

.top-header .logo {
  height: 32px;
}

.text-logo {
  font-size: 20px;
  font-weight: 600;
  color: #c9d1d9;
  margin-left: 10px;
}
.nav {
  display: flex;
  gap: 20px;
  margin-left: 20px;
}

.main-nav {
  display: flex;
  gap: 20px;
  margin-left: auto;
}

.main-nav a {
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s ease;
}

.main-nav a:hover {
  text-decoration: none;
  border-bottom: 2px solid #333;
  color: #58a6ff;
}

.main-nav a.active {
  border-bottom: 2px solid #58a6ff;
  color: #58a6ff;
}
.mobile-nav-toggle {
  /* Mobile menu toggle button */
  display: none;
  background: transparent;
  border: none;
  padding: 0.5rem;
}

.mobile-nav-toggle span {
  /* Hamburger menu lines */
  display: block;
  width: 22px;
  height: 2px;
  background-color: #c9d1d9;
  margin: 4px 0;
  transition: transform 0.3s ease;
}

.mobile-nav-menu {
  /* Mobile menu container */
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  background-color: #161b22;
  z-index: 1010;
  border-top: 1px solid #30363d;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.mobile-nav-menu.active {
  display: block;
}

/* MOBILE NAV MENU: fix underline and layout */
.mobile-nav-menu a {
  display: block;
  color: #c9d1d9;
  text-decoration: none;
  padding: 12px 20px;
  font-weight: 500;
  text-align: left;
  border-bottom: 1px solid #30363d;
}

.mobile-nav-menu a:last-child {
  border-bottom: none;
}

.mobile-nav-menu a:hover {
  background-color: #1f242c;
  color: #58a6ff;
}

.mobile-nav-menu a.active {
  background-color: #212830;
  border-left: 4px solid #58a6ff;
  color: #58a6ff;
  padding-left: 16px;
}

/* Footer Styles */
footer {
  background-color: #fff;
  color: #0d1117;
  padding: 1.2rem 0;
  margin-top: 3rem;
  text-align: center;
  border-top: 0.5px solid #c9d1d9;
  bottom: 0;
  width: 100%;
  position: fixed;
  z-index: 1000;
}

.footer-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.footer-container .copyright p {
  margin: 0;
  font-size: 0.6rem;
}

.footer-container .copyright a {
  color: #007bff; /* Link color */
  text-decoration: none;
}

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

.news-content-container {
  max-width: 1440px;
  margin: 2rem auto;
  padding: 1rem 2rem;
  box-sizing: border-box;
}

.news-content-container article h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.news-content-container article h2 {
  font-size: 1.8rem;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
  line-height: 1.3;
}

.news-content-container article p {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.news-content-container article blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-left: 4px solid #ccc;
  background-color: #f9f9f9;
  font-style: italic;
}

.news-content-container article ul,
.news-content-container article ol {
  padding-left: 2rem;
  margin-bottom: 1rem;
}

.news-content-container article li {
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
  line-height: 1.6;
}

.page-container {
  max-width: 1440px;
  margin: 3rem auto;
  padding: 0 1.5rem;
  padding-bottom: 2rem;
  box-sizing: border-box;
}

.page-container .section-header {
  font-size: 2rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.5rem;
}

.news-feed {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 0;
}

.news-card {
  display: flex;
  background: #fff;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  padding: 1rem;
  transition: box-shadow 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.news-card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.news-card-media-block {
  align-self: center; /* Ensures image block centers itself vertically */
}

.news-card-image {
  flex-shrink: 0;
  margin-right: 1rem;
  width: 250px;
  height: auto;
  overflow: hidden;
  border-radius: 4px;
  max-width: 100%;
  box-sizing: border-box;
}

.news-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-card-image img {
  transition: transform 0.3s ease;
}

.news-card:hover .news-card-image img {
  transform: scale(1.05);
}

.news-card-content {
  padding: 0;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.news-source {
  font-size: 0.75rem;
  margin-bottom: 0.25rem;
  display: flex;
  justify-content: flex-start;
  gap: 0.5rem;
}

.news-category {
  font-weight: 600;
}

.news-card h3 {
  font-size: 1rem;
  margin-top: 0;
  margin-bottom: 0.25rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-card p {
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

.news-card .read-time {
  font-size: 0.7rem;
  margin-top: 0.1rem;
}

.read-more-link {
  font-weight: 400;
  font-size: 0.8rem;
  margin-top: 0.5rem;
  color: #0b5ed7;
  text-decoration: none;
}

.read-more-link:hover {
  text-decoration: underline;
}

.news-content-container article h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.news-content-container article h2 {
  font-size: 1.8rem;
  margin-top: 2rem;
  margin-bottom: 0.8rem;
  line-height: 1.3;
}

.news-content-container article p {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.news-content-container article blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-left: 4px solid #ccc;
  background-color: #f9f9f9;
  font-style: italic;
}

.news-content-container article ul,
.news-content-container article ol {
  padding-left: 2rem;
  margin-bottom: 1rem;
}

.news-content-container article li {
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
  line-height: 1.6;
}

.hero-section {
  background-color: #fff;
  padding: 2rem 1rem;
  text-align: center;
  overflow-x: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  box-sizing: border-box;
}

.hero-flex-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2.5rem;
  max-width: 1440px;
  margin: 0 auto;
}

.hero-text {
  flex: 3;
  text-align: left;
}

.hero-text h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  border-bottom: none;
  color: #24292f;
}

.hero-text h4 {
  font-size: 1.3rem;
  font-weight: 400;
  margin-top: 0;
  margin-bottom: 1rem;
  color: #24292f;
}

.hero-text p {
  font-size: 1rem;
  margin-bottom: 2rem;
  line-height: 1.6;
  color: #24292f;
}

.hero-buttons {
  display: flex;
}

.hero-buttons .btn-white-outline {
  background-color: transparent;
  color: #000;
  border: 2px solid #000;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.hero-buttons .btn-white-outline:hover {
  background-color: #000;
  color: #f9f9f9;
}

.hero-buttons .btn-white-outline .icon-arrow {
  margin-left: 8px;
  width: 12px;
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3E%3Cpath d='M12.293 7.293a1 1 0 0 1 0 1.414l-4 4a1 1 0 0 1-1.414-1.414L10.172 8 6.879 4.707a1 1 0 0 1 1.414-1.414l4 4z'/%3E%3C/svg%3E"); /* Light mode default */
  background-repeat: no-repeat;
  background-size: contain;
  transition: filter 0.3s ease, background-image 0.3s ease;
}

.hero-buttons .btn-white-outline:hover .icon-arrow {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23f9f9f9'%3E%3Cpath d='M12.293 7.293a1 1 0 0 1 0 1.414l-4 4a1 1 0 0 1-1.414-1.414L10.172 8 6.879 4.707a1 1 0 0 1 1.414-1.414l4 4z'/%3E%3C/svg%3E"); /* Light mode hover */
}

.hero-video {
  flex: 7;
  position: relative;
  aspect-ratio: 16 / 9;
}

.hero-video iframe {
  width: 100%;
  height: 100%;
  border-radius: 0.5rem;
  display: block;
  border: none;
}

.page-intro {
  font-size: 1.1rem;
  color: #586069;
  margin-top: 1rem;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
  }

  .mobile-nav-toggle {
    display: block;
  }

  .header-content-container {
    padding: 0 16px;
  }

  .text-logo {
    display: none;
  }
  .hero-section {
    padding: 1.5rem 0;
  }

  .hero-flex-container {
    padding: 0 1rem;
    box-sizing: border-box;
  }

  .hero-text {
    padding-bottom: 1rem;
    text-align: left;
    width: 100%;
    max-width: 100%;
  }

  .hero-text h2 {
    font-size: 1.5rem;
  }
  .hero-text h4 {
    font-size: 1rem;
  }
  .hero-text p {
    font-size: 0.875rem;
  }
  .hero-video iframe {
    height: auto;
    min-height: 200px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .news-card {
    flex-direction: column;
    padding: 0.75rem;
  }

  .news-card-media-block {
    margin-right: 0;
    margin-bottom: 0.75rem;
    margin-top: 0.5rem;
  }

  .news-card-image {
    width: 100%;
    max-width: 100%;
    margin-right: 0;
    margin-bottom: 0.75rem;
    box-sizing: border-box;
  }

  .news-card-image img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
  }

  .news-card-content {
    padding-left: 0;
  }

  .news-card h3 {
    white-space: normal;
  }

  .news-card p {
    white-space: normal;
  }
}

@media (max-width: 992px) {
  .hero-flex-container {
    flex-direction: column;
    align-items: center;
  }

  .hero-text,
  .hero-video {
    flex-basis: auto;
    width: 100%;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  .hero-text {
    max-width: 100%;
    margin-bottom: 2rem;
    text-align: center;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-text h2 {
    font-size: 1.5rem;
  }

  .hero-text h4 {
    font-size: 1rem;
    font-weight: 500;
  }

  .hero-text p {
    font-size: 0.875rem;
    text-align: justify;
  }
}

@media (prefers-color-scheme: dark) {
  body {
    background: #0d1117;
    color: #c9d1d9;
  }

  .top-header {
    background: #0d1117;
    border-bottom: 0.5px solid #30363d;
  }

  .main-nav a {
    color: #fff;
  }

  .main-nav a:hover {
    border-bottom: 2px solid #333;
    color: #58a6ff;
  }

  .main-nav a.active {
    border-bottom: 2px solid #58a6ff;
    color: #58a6ff;
  }

  .text-logo {
    color: #c9d1d9;
  }

  .mobile-nav-toggle span {
    background-color: #c9d1d9;
  }

  .mobile-nav-menu {
    background-color: #0d1117;
    border-top: 1px solid #30363d;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  }

  .mobile-nav-menu a {
    color: #c9d1d9;
    border-bottom: 1px solid #30363d;
  }

  .mobile-nav-menu a:hover {
    background-color: #1f242c;
  }

  .main-nav a.active {
    border-bottom-color: #58a6ff;
  }
  .hero-section {
    background-color: #0d1117 !important;
  }

  .hero-text h2,
  .hero-text h4,
  .hero-text p {
    color: #c9d1d9 !important;
  }

  .hero-buttons .btn-white-outline {
    color: #c9d1d9;
    border: 2px solid #c9d1d9;
  }

  .hero-buttons .btn-white-outline .icon-arrow {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23c9d1d9'%3E%3Cpath d='M12.293 7.293a1 1 0 0 1 0 1.414l-4 4a1 1 0 0 1-1.414-1.414L10.172 8 6.879 4.707a1 1 0 0 1 1.414-1.414l4 4z'/%3E%3C/svg%3E");
  }

  .hero-buttons .btn-white-outline:hover {
    background-color: #c9d1d9;
    color: #0d1117;
  }

  .hero-buttons .btn-white-outline:hover .icon-arrow {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230d1117'%3E%3Cpath d='M12.293 7.293a1 1 0 0 1 0 1.414l-4 4a1 1 0 0 1-1.414-1.414L10.172 8 6.879 4.707a1 1 0 0 1 1.414-1.414l4 4z'/%3E%3C/svg%3E");
  }

  .news-content-container article blockquote {
    border-left-color: #555;
    background-color: #1a1a1a;
    color: #ccc;
  }

  .news-content-container article code {
    background: #2a2a2a;
    color: #eee;
  }

  .page-container .section-header {
    border-bottom-color: #30363d;
    color: #c9d1d9;
  }

  .page-container .section-header {
    border-bottom-color: #30363d;
    color: #c9d1d9;
  }

  .news-card {
    background-color: transparent;
    border-bottom-color: #30363d;
    color: #c9d1d9;
  }

  .news-card:hover {
    background-color: #161b22;
  }

  .news-source,
  .news-card .read-time {
    color: #8b949e;
  }

  .news-card h3 {
    color: #c9d1d9;
  }

  .news-card p {
    color: #adb5bd;
  }

  .news-card-image {
    background-color: #30363d;
  }

  .news-content-container article blockquote {
    border-left-color: #555;
    background-color: #1a1a1a;
    color: #ccc;
  }

  .news-content-container article code {
    background: #2a2a2a;
    color: #eee;
  }
  .mobile-toggle {
    background: #0d1117;
    border-color: #30363d;
    color: #c9d1d9;
  }

  footer {
    background-color: #0d1117;
    color: #c9d1d9;
    padding: 1.2rem 0;
    margin-top: 3rem;
    text-align: center;
    border-top: 0.5px solid #30363d;
    bottom: 0;
    width: 100%;
    position: fixed;
    z-index: 1000;
  }

  .page-intro {
    color: #adb5bd;
  }
}

/* === Pagination Controls === */
.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
  padding-bottom: 2rem;
}

.pagination-button {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  margin: 0 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.2s ease;
}

.pagination-button:hover:not(:disabled) {
  background-color: #0056b3;
}

.pagination-button:disabled {
  background-color: #cccccc;
  color: #666666;
  cursor: not-allowed;
}

.page-indicator {
  font-size: 0.9rem;
  color: #586069;
  margin: 0 1rem;
}

@media (prefers-color-scheme: dark) {
  .pagination-button {
    background-color: #58a6ff;
    color: #0d1117;
    border-radius: 25px;
  }

  .pagination-button:hover:not(:disabled) {
    background-color: #2188ff;
  }

  .pagination-button:disabled {
    background-color: #30363d;
    color: #8b949e;
  }

  .page-indicator {
    color: #adb5bd;
  }
}

/* === User Guide Styles === */
.userguide-container {
  display: flex;
  min-height: calc(100vh - 60px);
  margin-top: 0;
}

.highlight {
  color: #58a6ff; /* Change to your desired color */
  font-weight: bold; /* Optional: make it bold */
  padding: 2px; /* Optional: add some padding */
  border-radius: 3px; /* Optional: round the corners */
}
