body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background-color: #f5f8fa;
    color: #333;
    overflow-x: hidden;
}

header {
    background: linear-gradient(135deg, #0077cc, #005fa3);
    color: white;
    padding: 20px 20px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.nav-divider-box {
    background: var(--surface-0);
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-1);
    display: inline-block;
}

nav {
    background: transparent;
    /* text-align: center; */
    text-align: left;
    padding: 12px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

nav .nav-divider-box a {
  color: var(--text-0);
}

nav .nav-divider-box a:hover {
  background: rgba(0,0,0,0.05);
}

nav a {
    color: white;
    margin: 0 20px;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease-in-out;
}

nav a:hover {
    color: #ffcc00;
}

nav a.active {
    text-decoration: underline;
    font-weight: bold;
}

section {
    padding: 40px 20px;
    max-width: 1140px;
    margin: auto;
    background: #f3f7fb;
    margin-top: 20px;
    border-radius: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.08);
}

.section-divider {
  border: 1px solid rgba(0,0,0,0.1);
  padding: clamp(16px, 3vw, 24px);
  background: var(--surface-0);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  margin-bottom: 24px;
}

section h2 {
    color: #005fa3;
    margin-bottom: 15px;
}

#module-list {
    background: #ffffff;
    padding: 30px;
    border-radius: 20px;
    border: 1px solid #d0d7de;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transition: all 0.3s ease-in-out;
}

footer {
    background: #41d0e2;
    color: white;
    text-align: center;
    padding: 15px;
    margin-top: 30px;
}

#searchBox {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.module-card {
    background: #ffffff;
    border: 1px solid #cbd6e2;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.module-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.module-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #002244;
    font-size: 1.4rem;
}

.module-card a {
    display: inline-block;
    margin-top: 10px;
    text-decoration: none;
    color: white;
    background: linear-gradient(135deg, #4a90e2, #357abd);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.module-card a:hover {
    background: linear-gradient(135deg, #5aa0f2, #468bcd);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.2);
}


.back-home-btn {
    background: var(--grad-btn-accent);
    color: white;
    border: none;
    padding: 10px 22px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    letter-spacing: 0.5px;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}
.back-home-btn:hover {
    background: linear-gradient(135deg, #ff9966, #ff5e62);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}
.site-header {
  background: #fff;
  padding: 15px 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.site-nav {
  display: flex;
  gap: 12px;
  background: #fff;
  padding: 10px 14px;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(11, 46, 78, 0.08);
}

.site-nav .nav-link {
  color: var(--text-0);
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
}

.site-nav .nav-link:hover {
  color: teal;
}

.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 40px 20px;
}

.hero-content {
  flex: 1 1 300px;
  max-width: 500px;
}

.hero-title { color: var(--text-0); font-size: clamp(34px, 5.6vw, 56px); line-height: 1.05; margin: 0 0 14px; font-weight: 900; }

.hero-subtitle { color: var(--text-1); font-size: clamp(16px, 2.2vw, 20px); max-width: 52ch; }

.btn {
  display: inline-block;
  padding: 10px 20px;
  background: teal;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
}

.hero-art {
  flex: 1 1 300px;
  display: flex;
  gap: 20px;
  justify-content: center;
}

.device {
  background: #fff;
  border: 1px solid var(--bg-2);
  border-radius: 22px;
  box-shadow: 0 20px 40px rgba(11,46,78,0.12);
}
.device-left { transform: rotate(-8deg) translateY(8px); }
.device-right { transform: rotate(8deg) translateY(18px); }

.site-footer {
  text-align: center;
  padding: 20px;
  background: #41d0e2;
  margin-top: 40px;
  color: #fff;
}

/* ===== Start Page Light Theme Enhancements ===== */
:root {
  --bg-0: #ffffff;   /* white */
  --bg-1: #f7fbff;   /* very light blue */
  --bg-2: #e6f0fa;   /* pastel blue */
  --text-0: #0b2e4e; /* deep navy for headings/nav */
  --text-1: #446b8a; /* muted blue for body */
  --accent-0: #0077cc; /* primary blue (CTA) */
  --radius-lg: 20px;
  --radius-pill: 999px;
  --shadow-1: 0 6px 20px rgba(0,0,0,0.08);
  --sweep-top: -220px;
  --sweep-height: 70vh;
  --sweep-opacity: 0.85;
  --sweep-gradient: radial-gradient(140% 100% at 50% 10%, #41d0e2 0%, #5cb7e9 45%, #e6f0fa 60%, transparent 75%);
}

.container { max-width: 1140px; margin-inline: auto; padding-inline: 20px; }

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

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text-0); }
.logo { height: 44px; width: 44px; border-radius: 50%; object-fit: cover; display: block; }
.brand-text { font-weight: 700; font-size: 1rem; letter-spacing: .2px; }

.site-header { background: var(--bg-0); box-shadow: 0 1px 8px rgba(0,0,0,0.06); position: sticky; top: 0; z-index: 100; }
.site-nav { display: flex; gap: 24px; }
.site-nav .nav-link { color: var(--text-0); padding: 10px 6px; border-radius: 8px; }
.site-nav .nav-link:hover { background: var(--bg-2); }

.start-page main,
.about-page main,
.modules-page main,
.contact-page main {
  background: linear-gradient(180deg, var(--bg-1), var(--bg-0));
}

/* Full-page teal sweep background */
.start-page { position: relative; }
.about-page, .modules-page, .contact-page { position: relative; }

.start-page::before,
.about-page::before,
.modules-page::before,
.contact-page::before {
  content: "";
  position: absolute;
  top: var(--sweep-top);
  left: 50%;
  transform: translateX(-50%);
  width: 140vw;    /* extend beyond viewport to ensure full bleed */
  height: var(--sweep-height);
  background: var(--sweep-gradient);
  z-index: -3;
  pointer-events: none;
  opacity: var(--sweep-opacity);
  animation: fadeInSweep 1s ease forwards;
}

/* Full-width teal sweep across the top */
.hero::after { content: none; }

.hero-title { color: var(--text-0); font-weight: 800; letter-spacing: 0.2px; }
.hero-subtitle { color: var(--text-1); }

.btn-primary { background: linear-gradient(135deg, #00f0ff, #0066ff); box-shadow: 0 0 10px rgba(0, 240, 255, 0.7), 0 0 20px rgba(0, 102, 255, 0.6); color: #fff; border-radius: 12px; padding: 12px 22px; text-decoration: none; font-weight: 700; display: inline-block; margin-top: 18px; /* box-shadow: 0 8px 20px rgba(0, 119, 204, 0.25); replaced above */ }
.btn-primary:hover {
  background: linear-gradient(135deg, #33faff, #3399ff);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.85), 0 0 24px rgba(0, 102, 255, 0.75);
}
.btn-primary { border-radius: 999px; padding: 12px 26px; font-weight: 800; }

.device {
  background: #fff;
  border: 1px solid var(--bg-2);
  border-radius: 16px;
  box-shadow: var(--shadow-1);
}

/* --- Hero visual upgrades --- */
.hero {
  background: linear-gradient(180deg, var(--bg-1), var(--bg-0));
  border: 2px solid var(--bg-2);
  border-radius: 32px;
  box-shadow: 0 10px 28px rgba(11, 46, 78, 0.08);
  padding: clamp(48px, 6vw, 72px) 28px;
}

.hero-content {
  background: rgba(255,255,255,0.65);
  padding: 24px;
  border-radius: 16px;
  backdrop-filter: blur(4px);
}
.site-footer {
  position: relative;
  background: #419ae2;
  box-shadow: 0 0 12px rgba(200, 200, 200, 0.6), 0 0 24px rgba(200, 200, 200, 0.4);
  color: #fff;
}

/* --- Loading cursor states (page load + delayed clicks) --- */
html.is-loading,
html.is-loading body,
body.is-busy,
body.is-busy * {
  cursor: progress !important;
}

/* --- Busy overlay (optional visual loading indicator) --- */
.busy-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 9999;
}

.is-busy .busy-overlay { opacity: 1; pointer-events: all; }

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(0,0,0,0.15);
  border-top-color: var(--accent-0);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes fadeInSweep {
  from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
  to { opacity: 0.85; transform: translateX(-50%) translateY(0); }
}

@media (max-width: 900px) {
  .brand-text { display: none; }
  .hero { text-align: center; }
  .hero-art { margin-top: 28px; }
}

@media (max-width: 700px) {
  .site-nav { gap: 8px; padding: 8px 10px; }
  .hero::after {
    top: -120px;
    left: 0;
    right: 0;
    width: 100%;
    height: 50vh;
  }
  .hero-content { background: transparent; padding: 0; }
}
