/* CSS file for header */

header {
  background-color: var(--bg-header);
  width: 100%;
  height: 60px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid var(--border-color);
}

.logo {
  font-family: 'Changa', sans-serif;
  font-size: 1.6rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 2px;
}

nav ol {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

nav ol li a {
  font-family: 'Changa', sans-serif;
  font-size: 1rem;
  color: var(--text-primary);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 4px;
  transition: color 0.3s ease, background-color 0.3s ease;
}

nav ol li a:hover {
  color: var(--accent);
  background-color: rgba(179, 55, 113, 0.1);
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-family: 'Changa', sans-serif;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.toggle-checkbox {
  display: none;
}

.toggle-switch {
  width: 44px;
  height: 22px;
  background-color: #555;
  border-radius: 22px;
  position: relative;
  transition: background-color 0.3s ease;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background-color: var(--text-primary);
  border-radius: 50%;
  transition: left 0.3s ease;
}

.toggle-checkbox:checked + .toggle-switch {
  background-color: var(--accent);
}

.toggle-checkbox:checked + .toggle-switch::after {
  left: 25px;
}

.header-spacer {
  height: 60px;
}

/* css for responsive design of tablet devices */

@media (max-width: 768px) {
  header {
    padding: 0 20px;
    height: auto;
    flex-wrap: wrap;
    padding: 10px 20px;
    gap: 12px;
    justify-content: center;
  }

  .logo {
    font-size: 1.3rem;
    flex-basis: 100%;
    text-align: center;
  }

  nav ol {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    flex-basis: 100%;
  }

  nav ol li a {
    font-size: 0.85rem;
    padding: 6px 12px;
  }

  .toggle-label {
    flex-basis: 100%;
    justify-content: center;
    gap: 8px;
  }

  .header-spacer {
    height: 150px;
  }
}

/* css for responsive design of mobile devices */
@media (max-width: 480px) {
  header {
    padding: 8px 12px;
    gap: 8px;
  }

  .logo {
    font-size: 1.1rem;
    letter-spacing: 1px;
    flex-basis: 100%;
    text-align: center;
    margin-bottom: 4px;
  }

  nav ol {
    gap: 4px;
    justify-content: center;
    flex-basis: 100%;
  }

  nav ol li {
    flex: 0 1 auto;
  }

  nav ol li a {
    font-size: 0.75rem;
    padding: 5px 8px;
  }

  .toggle-label {
    flex-basis: 100%;
    justify-content: center;
    font-size: 0.75rem;
    gap: 4px;
  }

  .toggle-switch {
    width: 36px;
    height: 18px;
  }

  .toggle-switch::after {
    width: 14px;
    height: 14px;
  }

  .toggle-checkbox:checked + .toggle-switch::after {
    left: 20px;
  }

  .header-spacer {
    height: 180px;
  }
}
