:root {
  --background-color-rgb: 24, 26, 27;
  /* Dark mode background */
  --color-rgb: 209, 205, 199;
  /* Dark mode text color */
  --pico-accordion-close-summary-color: #3b82f6;
  /* FAQ collapsed summary color - override Pico default */
}

[data-theme="light"] {
  --background-color-rgb: 255, 255, 255;
  /* Light mode background */
  --color-rgb: 51, 51, 51;
  /* Light mode text color */
}

header nav li a svg {
  width: var(--font-size);
  height: var(--font-size);
  color: var(--contrast);
}

nav {
  justify-content: space-around;
  overflow: visible;
}

.nav-toggle {
  display: none;
}

.nav-toggle-label {
  display: none;
  cursor: pointer;
}

@media (max-width: 768px) {
  header.container-fluid {
    padding: 0;
  }

  nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    position: relative;
  }

  nav ul:first-of-type {
    margin: 0;
  }

  .nav-toggle-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    position: relative;
    z-index: 2;
    margin: 0;
    padding-top: 2px;
    /* Fine-tune alignment */
  }

  .hamburger,
  .hamburger::before,
  .hamburger::after {
    content: '';
    display: block;
    background: currentColor;
    height: 2px;
    width: 25px;
    position: absolute;
    transition: transform 0.3s;
  }

  .hamburger::before {
    transform: translateY(-7px);
  }

  .hamburger::after {
    transform: translateY(7px);
  }

  nav ul:nth-of-type(2) {
    display: none;
    position: fixed;
    top: 60px;
    /* Adjust this value based on your header height */
    left: 0;
    right: 0;
    background-color: rgba(var(--background-color-rgb), 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    width: 100%;
    padding: 1rem 0;
    margin: 0;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }

  .nav-toggle:checked~ul:nth-of-type(2) {
    display: block !important;
  }

  nav ul:nth-of-type(2) li {
    display: block;
    margin: 0;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid rgba(var(--color-rgb), 0.1);
  }

  nav ul:nth-of-type(2) li:last-child {
    border-bottom: none;
  }

  .nav-toggle:checked+.nav-toggle-label .hamburger {
    background: transparent;
  }

  .nav-toggle:checked+.nav-toggle-label .hamburger::before {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle:checked+.nav-toggle-label .hamburger::after {
    transform: rotate(-45deg) translate(5px, -5px);
  }
}

@media (max-width: 768px) {
  main.container {
    padding: 0 1rem;
  }

  article {
    width: 100% !important;
    margin: 0 !important;
  }
}

/* FAQ Styles */
.share-btn {
  margin-left: 10px;
  cursor: pointer;
  font-size: 0.8em;
}

details summary {
  cursor: pointer;
  padding: 0.5rem;
  transition: background-color 0.2s ease;
  color: #3b82f6;
}

details {
  margin-bottom: 0.5rem;
  background-color: rgba(255, 255, 255, 0.02);
  border-radius: 5px;
}

details:nth-of-type(even) {
  background-color: rgba(255, 255, 255, 0.08);
}

details[open] summary~* {
  display: block;
}

details[open] .faq-content {
  background-color: #2d3748;
  border-left: 5px solid #4a5568;
  padding: 1rem;
  margin-bottom: 1rem;
  margin-top: 0.5rem;
  border-radius: 0 5px 5px 0;
  /* Slight rounding to match */
}

details[open] .faq-content p {
  color: #c2c7d0;
  margin-bottom: 0.5rem;
}

details[open] .faq-content p:last-child {
  margin-bottom: 0;
}

/* Badge fix */
#id-Badge4 {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1001;
}

@media (max-width: 768px) {

  #id-Badge4,
  #id-Badge4 iframe {
    width: 80px !important;
    height: 80px !important;
    bottom: 70px;
  }
}