@import url("https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap");

:root {
  --sidebar-width: 250px;
  --bg-color: #f9f9f9;
  --accent-color: #005f73;
  --text-color: #333;

  --color-primary: #2f4050;
  --color-secondary: #252c6a;
  --color-primary-dark: #293846;
  --color-title: #2563eb;
  --color-transparent: rgba(0, 0, 0, 0.4);
  --color-border: #dddddd;
  --color-muted: #a9a9a9;
  --border-radius: 5px;
  --box-shadow: 0 0.3rem 0.5rem #777777;
  --color-info: #17a2b8;
  --color-warning: #c58628;
  --color-error: #dc3545;
  --color-success: #28a745;
  --background-info: #f0feff;
  --background-warning: #fffcf2;
  --background-error: #fff5f5;
  --background-success: #f9fff0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Source Sans 3", sans-serif;
}

body {
  min-height: 100vh;
  background: var(--bg-color);
  color: var(--text-color);
}

aside {
  width: var(--sidebar-width);
  background: var(--color-primary);
  color: #fff;
  padding: 2rem 1rem;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
}

aside h2 {
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
}

aside nav a {
  display: block;
  color: #fff;
  text-decoration: none;
  margin-bottom: 1rem;
  font-size: 1rem;
  transition: background 0.2s;
}

aside nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  padding-left: 8px;
}

aside nav a.active {
  background-color: #007bff; /* Bootstrap primary blue */
  color: white;
  font-weight: 600;
  border-radius: 4px;
  padding-left: 12px;
  box-shadow: 0 2px 6px rgba(0, 123, 255, 0.5);
  transition: background-color 0.3s ease;
}

aside nav a.active:hover {
  background-color: #0056b3; /* Darker blue on hover */
  box-shadow: 0 4px 8px rgba(0, 86, 179, 0.6);
}

.logo-container {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  cursor: pointer;
}
.logo-container a,
.logo-container a:hover {
  background-color: transparent;
  padding-left: 0;
}
.kws-logo {
  width: 100px;
  max-width: 100%;
}

img {
  max-width: 100%;
}

main {
  margin-left: var(--sidebar-width);
  padding: 2rem;
  flex-grow: 1;
}

section {
  margin-bottom: 2rem;
}

section h2 {
  margin-top: 1rem;
  color: var(--color-primary);
}

section h3 {
  margin-top: 1.5rem;
  color: var(--color-secondary);
}

section h4 {
  margin-top: 1rem;
}

section h5 {
  margin-top: 1rem;
}

section p {
  line-height: 1.6;
}

th {
  padding: 0 5px;
  text-align: center;
}
td {
  padding: 0 5px;
}

/* === Registration Section Enhancements === */

section ol {
  margin-top: 1rem;
  margin-left: 1.5rem;
  padding-left: 1rem;
  list-style: decimal;
}

section ol li {
  margin-bottom: 1.2rem;
  line-height: 1.6;
}

section ul {
  margin-top: 0.5rem;
  margin-left: 1.5rem;
  list-style: disc;
  padding-left: 1rem;
}

section ul li {
  margin-bottom: 0.5rem;
}

section a {
  color: #0077cc;
  text-decoration: underline;
}

section a:hover {
  color: #005fa3;
}

section p {
  margin-top: 1rem;
  font-size: 1rem;
}

/* Highlighted box for alerts or tips */
section .tip {
  background: #e6f4ff;
  border-left: 4px solid #0077cc;
  padding: 1rem;
  margin-top: 1.5rem;
  border-radius: 4px;
  font-size: 0.95rem;
  color: #003f6b;
}

/* === Warning Box === */
section .warning {
  background: #fff4e5;
  border-left: 4px solid #d9534f;
  padding: 1rem;
  margin-top: 1.5rem;
  border-radius: 4px;
  font-size: 0.95rem;
  color: #721c24;
}

/* === Page navigation links === */
.page-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #ccc;
}

.page-nav a {
  color: #0077cc;
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.page-nav a:hover:not(.disabled) {
  background-color: #e6f0ff;
}

.page-nav a.disabled,
.page-nav a[aria-disabled="true"] {
  color: #999;
  pointer-events: none;
  cursor: default;
}

/* Performance levels styles */
.performance-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.performance-item {
  border-left: 5px solid;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 4px;
  background: #f9f9f9;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.performance-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.performance-content {
  max-width: 800px;
}

.performance-tag {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.performance-msg {
  margin: 0.2rem 0 0.5rem;
  font-style: italic;
  color: #444;
}

.performance-info {
  font-size: 0.9rem;
  color: #666;
}

/* Colors for each style */
.novice {
  border-color: yellowgreen;
  background-color: #f0f9f0;
}

.average {
  border-color: darkgreen;
  background-color: #e8f4e8;
}

.regular {
  border-color: darkblue;
  background-color: #e6eaf8;
}

.top {
  border-color: gold;
  background-color: #fff8dc;
}

.expert {
  border-color: orange;
  background-color: #fff4e6;
}

.bolt-icon {
  color: orange;
  font-weight: bold;
  margin-right: 0.25rem;
}
.play-icon {
  color: #1e90ff;
  font-weight: bold;
  margin-right: 0.25rem;
}
.heart-icon {
  color: crimson;
  cursor: pointer;
}
.star-icon {
  color: gold;
  margin-right: 0.1rem;
}

.back-to-main {
  display: inline-block;
  margin: 1rem 0;
  padding: 0.5rem 1rem;
  background-color: #004080;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.back-to-main:hover {
  background-color: #0066cc;
}

/* Default: Hide hamburger on large screens */
.hamburger {
  display: none;
  position: fixed; /* keep it fixed on the screen */
  top: 1rem;
  left: 1rem;
  z-index: 1001; /* above most elements but below sidebar */
  background: var(--color-primary); /* match your sidebar color */
  color: white;
  border: none;
  font-size: 1.2rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
}

/* FAQ Item */
.faq-item {
  background-color: #f9f9f9; /* Light background for readability */
  border: 1px solid #ddd; /* Light gray border */
  border-radius: 6px; /* Rounded corners */
  padding: 20px; /* Space inside the box */
  margin-bottom: 20px; /* Space between FAQ items */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05); /* Subtle shadow for depth */
  font-family: Arial, sans-serif; /* Clean readable font */
  color: #333; /* Dark gray text */
}

.faq-item h3 {
  margin-top: 0;
  font-size: 1.3rem;
  color: #0056b3; /* A nice blue for questions */
}

.faq-item p {
  line-height: 1.6;
  margin-bottom: 10px;
}

.faq-item ul {
  margin-left: 20px;
  margin-bottom: 10px;
  list-style-type: disc;
  color: #555;
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font-size: 1.2rem;
  font-weight: bold;
  padding: 0;
  cursor: pointer;
  color: #0056b3;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question .arrow {
  transition: transform 0.2s ease;
}

.faq-question[aria-expanded="true"] .arrow {
  transform: rotate(180deg);
}

.faq-answer {
  margin-top: 1rem;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.formulas-cover {
  max-width: 900px;
}

ol.content {
  margin: 0;
  margin-bottom: 15px;
}

ol.content li {
  margin: 0;
  margin-bottom: 10px;
  line-height: 1em;
  display: block;
}

ol.content {
  counter-reset: item;
  list-style-type: none; /* hide default numbers */
  padding-left: 1.5em;
}

ol.content li::before {
  counter-increment: item;
  content: counters(item, ".") " "; /* show hierarchical numbering */
}

.formula {
  background-color: #f4f8ff; /* soft blue background */
  border-left: 4px solid #3b82f6; /* blue accent bar */
  padding: 8px 12px;
  margin-top: 0.5rem;
  font-family: "Courier New", monospace; /* math/code style font */
  display: inline-block; /* fit content width */
  border-radius: 6px;
  overflow: auto;
}

.formula sup,
.formula sub,
.formula math,
.formula mtext,
.formula mn,
.formula mo,
.formula mi {
  font-family: "Courier New", monospace; /* math/code style font */
}

@media (max-width: 768px) {
  header,
  h1,
  h2,
  section h2,
  section h3 {
    margin-left: 3rem; /* same as hamburger width */
  }

  main {
    padding-left: 3rem; /* make room for the hamburger */
  }

  aside {
    position: relative;
    width: 100%;
    height: auto;
    padding: 1rem;
  }

  aside nav a {
    display: inline-block;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.4rem 0.7rem;
    font-size: 0.9rem;
    border-radius: 3px;
    background: var(--color-primary-dark);
  }

  aside nav a.active {
    font-weight: bold;
    background-color: var(--color-title);
    color: #fff;
    box-shadow: none;
  }

  main {
    margin-left: 0;
    padding: 1rem;
  }

  .page-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .page-nav a {
    display: block;
    margin-bottom: 0.5rem;
    text-align: center;
  }

  .performance-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .performance-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
  }

  .back-to-main {
    width: 100%;
    text-align: center;
  }

  .hamburger {
    display: block;
    background: var(--color-title);
  }

  aside {
    display: none;
  }

  body.show-sidebar aside {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--color-primary);
    z-index: 1000;
    width: 80%;
    max-width: 280px;
    box-shadow: var(--box-shadow);
    padding: 2rem 1rem;
  }

  main {
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 0.95rem;
  }

  section h2 {
    font-size: 1.3rem;
  }

  section h3 {
    font-size: 1.1rem;
  }

  .performance-tag {
    font-size: 1.1rem;
  }

  .performance-msg {
    font-size: 0.9rem;
  }

  .performance-info {
    font-size: 0.85rem;
  }

  .page-nav {
    padding-top: 0.5rem;
  }

  .page-nav a {
    font-size: 0.9rem;
  }

  .tip,
  .warning {
    font-size: 0.9rem;
    padding: 0.75rem;
  }
}
