/* Color Palette and System Variables */
/* Color Palette and System Variables */
:root {
  --primary-blue: #0044cc;
  --dark-blue: #002244;
  --accent-light: #e2e8f0;
  --text-dark: #1a202c;
  --text-light: #ffffff;
  --bg-light: #f4f7f6;
  --bg-main: #ffffff;
  --border-color: #cbd5e0;
  --card-bg: #ffffff;
  --preloader-bg: #ffffff;
  --preloader-text: #718096;
  --transition: all 0.3s ease-in-out;
}

/* Dark Theme Overrides */
[data-theme="dark"] {
  --primary-blue: #38bdf8;
  --dark-blue: #0f172a;
  --text-dark: #f8fafc;
  --bg-light: #1e293b;
  --bg-main: #0f172a;
  --border-color: #334155;
  --card-bg: #1e293b;
  --preloader-bg: #0f172a;
  --preloader-text: #94a3b8;
}

/* --- Preserved Preloader Animation Styles --- */
#preloader-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--preloader-bg);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease, visibility 0.5s ease, background-color 0.3s ease;
}

.preloader-text {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--preloader-text);
  font-weight: 600;
}

body {
  color: var(--text-dark);
  line-height: 1.6;
  background-color: var(--bg-main);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.card, 
.drawer-links li a {
  background: var(--card-bg) !important;
  color: var(--text-dark) !important;
  border-color: var(--border-color) !important;
}

/* Theme Switcher Footer Styling */
.theme-switch-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

.theme-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-light);
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.theme-btn:hover,
.theme-btn.active {
  background-color: var(--primary-blue);
  color: #ffffff;
  border-color: var(--primary-blue);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* --- Preserved Preloader Animation Styles --- */
#preloader-container.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-logo {
  width: 110px;
  height: 110px;
  object-fit: contain;
  margin-bottom: 25px;
  animation: logoHeartbeat 1.4s ease-in-out infinite;
}

@keyframes logoHeartbeat {
  0%, 100% { transform: scale(1); }
  14%, 42% { transform: scale(1.12); }
}

.progress-meter-container {
  width: 250px;
  height: 16px;
  background-color: #e2e8f0;
  border-radius: 50px;
  padding: 3px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.progress-meter-bar {
  height: 100%;
  width: 0%;
  background-color: var(--primary-blue);
  border-radius: 50px;
  transition: width 0.1s linear, background-color 0.4s ease;
}

.progress-meter-bar.fully-complete {
  background-color: var(--dark-blue) !important;
}

/* --- Header & Navigation --- */
header {
  position: sticky;
  top: 0;
  background-color: var(--dark-blue);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  z-index: 1000;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.8rem 1.5rem;
}

.brand-logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo {
  height: 38px;
  width: auto;
}

.brand-name {
  color: var(--text-light);
  font-weight: 700;
  font-size: 1.2rem;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 18px;
}

.nav-links a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
}

.nav-links a:hover {
  color: #63b3ed;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background-color: var(--text-light);
  border-radius: 2px;
}

/* --- Section Structural Framework --- */
.scroll-section {
  padding: 80px 20px;
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.scroll-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.bg-light {
  background-color: var(--bg-light);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

h2 {
  font-size: 2rem;
  color: var(--primary-blue);
  margin-bottom: 12px;
  position: relative;
  display: inline-block;
}

h2::after {
  content: '';
  display: block;
  width: 50%;
  height: 3px;
  background-color: var(--primary-blue);
  margin: 6px auto 0;
  border-radius: 2px;
}

/* --- Hero Section --- */
.hero {
  background: linear-gradient(rgba(0, 34, 68, 0.9), rgba(0, 68, 204, 0.8)), url('hero-bg.jpg') center/cover no-repeat;
  color: var(--text-light);
  text-align: center;
  padding: 120px 20px 90px;
}

.hero-logo {
  width: 90px;
  height: auto;
  margin-bottom: 15px;
}

.hero-content h1 {
  font-size: 2.8rem;
  margin-bottom: 15px;
}

.hero-content p {
  font-size: 1.15rem;
  max-width: 700px;
  margin: 0 auto 25px;
  opacity: 0.92;
}

.btn {
  display: inline-block;
  background-color: var(--primary-blue);
  color: var(--text-light);
  padding: 12px 28px;
  text-decoration: none;
  border-radius: 25px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn:hover {
  background-color: #002244;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: 6px;
  margin-top: 10px;
}

/* --- Navigation TOC List --- */
.drawer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 600px;
  margin: 25px auto 0;
  text-align: left;
}

.drawer-links li a {
  display: block;
  padding: 14px 18px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-weight: 600;
  color: var(--dark-blue);
  text-decoration: none;
  transition: var(--transition);
}

.drawer-links li a:hover {
  background-color: var(--primary-blue);
  color: #ffffff;
  padding-left: 24px;
}

/* --- Card Grids Architecture --- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}

.card {
  background: #ffffff;
  padding: 24px;
  border-radius: 10px;
  border-left: 4px solid var(--primary-blue);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  text-align: left;
}

.support-card {
  text-align: center;
  border-left: none;
  border-top: 4px solid var(--primary-blue);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.ecosystem-card {
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s;
}

.ecosystem-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 68, 204, 0.12);
}

.card-img-box {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.card-img-box img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

/* --- Spotlights & Ad Media --- */
.spotlight-box {
  display: flex;
  align-items: center;
  gap: 35px;
  text-align: left;
}

.spotlight-img {
  width: 130px;
  height: 130px;
  object-fit: contain;
  background: #ffffff;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.spotlight-details h2::after {
  display: none;
}

.ad-media-container {
  width: 100%;
  max-width: 850px;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  background-color: #000;
}

.ad-media-content {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
  display: block;
}

.hidden {
  display: none !important;
}

.margin-top-xs { margin-top: 6px; }
.margin-top-sm { margin-top: 12px; }
.margin-top-md { margin-top: 25px; }

/* --- Footer --- */
footer {
  background-color: var(--dark-blue);
  color: var(--text-light);
  padding: 25px 20px;
  border-top: 4px solid var(--primary-blue);
}

footer a {
  color: #63b3ed;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--dark-blue);
    flex-direction: column;
    align-items: center;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease-in-out;
  }

  .nav-links.active {
    max-height: 380px;
  }

  .nav-links li {
    width: 100%;
    text-align: center;
  }

  .nav-links a {
    display: block;
    padding: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .spotlight-box {
    flex-direction: column;
    text-align: center;
  }

  .spotlight-img {
    margin: 0 auto;
  }
}

/* Theme Toggle Button */
/* --- Theme Toggle Button Styling --- */
.theme-toggle-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-light);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.theme-toggle-btn:hover {
  color: #63b3ed;
  border-color: #63b3ed;
}

/* Centralize Toggle Link in Mobile Menu */
@media (max-width: 768px) {
  .nav-links li.theme-toggle-li {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
}