@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

/* GP-Nova blog overrides — header styles and white background */
body {
  background: #ffffff !important;
}
:root {
  --gp-primary: #004b8d;
  --gp-accent: #00a3e0;
  --gp-text-light: #4b5563;
  --gp-bg-light: #f9fafb;
  --gp-white: #ffffff;
  --gp-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.gp-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1050;
  box-shadow: var(--gp-shadow);
  padding: 0.75rem 0;
  font-family: "DM Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}

.gp-header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.gp-logo-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.gp-logo-img {
  height: 45px;
  width: auto;
}

.gp-wd-logo {
  height: 55px;
  width: auto;
  border-left: 1px solid #ddd;
  padding-left: 1rem;
}

.nav-toggle {
  display: none;
  border: none;
  background: var(--gp-primary);
  color: var(--gp-white);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
}

.nav-toggle:focus-visible {
  outline: 3px solid var(--gp-accent);
  outline-offset: 2px;
}

#primary-nav {
  display: flex;
  gap: 2rem;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
  border: none;
  background: transparent;
}

.gp-nav-link {
  color: var(--gp-text-light);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.gp-nav-link:hover,
.gp-nav-link:focus-visible {
  color: var(--gp-primary);
}

.lang-toggle {
  display: flex;
  gap: 5px;
  background: var(--gp-bg-light);
  padding: 5px;
  border-radius: 20px;
  margin-left: 15px;
}

.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 10px;
  font-weight: bold;
  font-size: 0.8rem;
  border-radius: 15px;
  color: var(--gp-text-light);
}

.lang-btn.active {
  background: var(--gp-primary);
  color: var(--gp-white);
}

.gp-header-spacer {
  height: 90px;
}

/* Offset sticky sidebars below the fixed GP-Nova header */
.sidebar,
#quarto-sidebar,
.quarto-listing-category {
  top: 100px !important;
  max-height: calc(100vh - 100px);
}

/* Prevent headings from hiding behind the fixed header when scrolling via anchor */
h1, h2, h3, h4, h5, h6 {
  scroll-margin-top: 110px;
}

@media (max-width: 1024px) {
  .gp-header-spacer {
    height: 120px;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: inline-flex;
  }

  #primary-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.98);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 1rem 1.5rem 1.5rem;
    box-shadow: var(--gp-shadow);
  }

  #primary-nav.active {
    display: flex;
  }

  .lang-toggle {
    margin-left: auto;
  }
}
