/* Header */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header {
  background: var(--color-white);
  padding: 0 1.5rem;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.10);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin-inline: auto;
  height: 80px;
}

.logo img { height: 68px; width: auto; }

/* Pill nav */
.nav-pill {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px;
  background: #f3f4f6;
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.09);
  list-style: none;
}

.nav-item {
  display: block;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-secondary);
  white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease;
}

.nav-item:hover {
  background: rgba(0, 159, 227, 0.12);
  color: var(--color-dark);
}

.nav-item.active {
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: 600;
}

.nav-item.active:hover {
  background: var(--color-dark);
  color: var(--color-white);
}

.nav-item-cta {
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: 600;
  transition: background 0.25s ease;
}

.nav-item-cta:hover {
  background: var(--color-dark);
  color: var(--color-white);
}

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-dark);
}

/* Footer */
.site-footer {
  background: #f0f4f8;
  color: var(--color-secondary);
  padding: 3rem 1.5rem 0;
}

.footer-inner {
  max-width: var(--max-width);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  align-items: start;
  padding-bottom: 2.5rem;
}

.footer-logo img { height: 40px; margin-bottom: 1rem; }

.footer-logo p {
  font-size: 0.875rem;
  color: var(--color-secondary);
  max-width: 260px;
}

.footer-col h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.footer-col ul { display: flex; flex-direction: column; gap: 0.5rem; }

.footer-col a {
  font-size: 0.9rem;
  color: var(--color-secondary);
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--color-primary); }

.footer-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.footer-cta p {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  font-weight: 600;
}

.footer-cta-btn {
  display: inline-block;
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  transition: opacity 0.2s;
}

.footer-cta-btn:hover { opacity: 0.85; }

.footer-bottom {
  max-width: var(--max-width);
  margin-inline: auto;
  border-top: 1px solid rgba(0,0,0,0.1);
  padding: 1rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--color-secondary);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-legal {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-legal a {
  font-size: 0.8rem;
  color: var(--color-secondary);
  transition: color 0.2s;
}

.footer-institutions {
  border-top: 1px solid rgba(0,0,0,0.07);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-institutions img {
  height: auto;
  max-height: 58px;
  width: auto;
  max-width: 100%;
  display: block;
  filter: grayscale(100%);
  opacity: 0.55;
  transition: opacity 0.2s ease;
}

.footer-institutions img:hover {
  opacity: 1;
}

.footer-legal a:hover { color: var(--color-primary); }

/* Responsive — nav collapses at 1024px */
@media (max-width: 1024px) {
  .nav-toggle { display: flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    background: var(--color-white);
    padding: 1rem 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.07);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    z-index: 99;
  }

  .site-nav.open { display: block; }

  .nav-pill {
    flex-direction: column;
    align-items: stretch;
    border-radius: 12px;
    width: 100%;
    background: #f3f4f6;
  }

  .nav-item { width: 100%; }
}

/* Responsive — footer collapses at 768px */
@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-legal { gap: 1rem; }
}

/* Cookie consent banner */
#cookie-banner {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  max-width: 600px;
  margin-inline: auto;
  background: var(--color-dark);
  color: var(--color-white);
  padding: 1.25rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  z-index: 999;
  transition: opacity 0.3s;
}

#cookie-banner p { font-size: 0.875rem; margin: 0; }

#cookie-banner a { color: var(--color-primary); text-decoration: underline; }

.cookie-actions { display: flex; gap: 0.75rem; flex-shrink: 0; }

.cookie-actions button {
  padding: 0.5rem 1.25rem;
  border: none;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

#cookie-accept {
  background: var(--color-primary);
  color: var(--color-white);
}

#cookie-reject {
  background: rgba(255,255,255,0.15);
  color: var(--color-white);
}

#cookie-reject:hover { background: rgba(255,255,255,0.25); }

.cookie-banner--hidden { opacity: 0; pointer-events: none; }

@media (max-width: 480px) {
  #cookie-banner { flex-direction: column; align-items: flex-start; }
}