/* ─── Maintenance banner ─── */
.maintenance-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 6px 16px; height: 31px;
  background: rgba(255, 184, 108, .15);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 184, 108, .3);
  font-size: .76rem; font-weight: 500; color: #c47a1e;
  letter-spacing: .01em;
}
.maintenance-banner svg { width: 14px; height: 14px; stroke: #c47a1e; fill: none; stroke-width: 1.8; flex-shrink: 0; }
body:has(.maintenance-banner) .navbar { top: 31px; }
body:has(.maintenance-banner) main { padding-top: calc(85px + 31px); }

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.required { color: var(--required); font-weight: 500; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.sr-only-focusable:focus { position: static; width: auto; height: auto; padding: 8px 16px; margin: 0; overflow: visible; clip: auto; white-space: normal; background: var(--ncp-primary); color: #fff; z-index: 99999; border-radius: 0 0 8px 8px; font-size: .85rem; text-decoration: none; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  padding-top: 85px;
}

/* ─── Text highlight ─── */
.highlight {
  background: linear-gradient(var(--ncp-secondary), var(--ncp-secondary));
  background-repeat: no-repeat;
  background-size: 100% 25%;
  background-position: 0 85%;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.highlight-light {
  background: linear-gradient(rgba(216, 225, 234, 0.47), rgba(216, 225, 234, 0.47));
  background-repeat: no-repeat;
  background-size: 100% 25%;
  background-position: 0 85%;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* ════════════════════════════════
   NAVBAR
════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-header);
  padding: 0 32px;
  height: 85px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-bottom: 1px solid var(--border-light);
  transition: box-shadow 0.3s;
}

.navbar.scrolled {
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.nav-logo-icon {
  display: none;
}
.nav-logo-icon:has(img) {
  display: block;
  width: 40px;
  height: 40px;
}
.nav-logo-icon img {
  width: 100%; height: 100%; object-fit: contain;
}
.nav-logo-name {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 600;
  color: var(--ncp-secondary);
  letter-spacing: -0.01em;
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 40px;
  list-style: none;
  flex: 1;
}
.nav-links a {
  display: block;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
.nav-links a:hover { color: var(--text-muted); }
.nav-links a.active { font-weight: 500; }

/* ─── Mega menu ─── */
.nav-mega-wrap {
  position: relative;
}
.nav-mega-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color var(--dur) var(--ease);
}
.nav-mega-trigger:hover { color: var(--text-muted); }
.nav-mega-trigger.active { font-weight: 500; }
.nav-mega-chevron {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s var(--ease);
}
.nav-mega-wrap.open .nav-mega-chevron {
  transform: rotate(180deg);
}

.nav-mega {
  position: absolute;
  top: calc(100% + 20px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  width: 420px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  z-index: 60;
}
.nav-mega-wrap.open .nav-mega {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-mega-panel {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 12px 40px rgba(28, 42, 58, 0.1), 0 0 0 1px rgba(28, 42, 58, 0.03);
  display: flex;
  flex-direction: column;
}

.nav-mega-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  text-decoration: none;
  transition: background 0.15s var(--ease);
}
.nav-mega-item:hover {
  background: rgba(28, 42, 58, 0.04);
}
.nav-mega-item.active {
  background: rgba(28, 42, 58, 0.03);
}

.nav-mega-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(28, 42, 58, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  transition: background 0.15s var(--ease);
}
.nav-mega-item:hover .nav-mega-icon {
  background: rgba(28, 42, 58, 0.1);
}
.nav-mega-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--ncp-primary);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-mega-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-mega-text strong {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.nav-mega-text span {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

.nav-mega-overlay {
  position: fixed;
  inset: 0;
  top: 85px;
  background: rgba(28, 42, 58, 0.04);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 49;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s;
}
.nav-mega-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Nav actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: 48px;
}

a.btn-nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: var(--ncp-primary);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn-nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(28, 42, 58, 0.2);
}
.btn-nav-cta.active { opacity: 0.7; pointer-events: none; }

.btn-ghost {
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: color var(--dur);
}
.btn-ghost:hover { color: var(--text); }
.btn-ghost.active { color: var(--text); font-weight: 500; pointer-events: none; }

.nav-sep {
  width: 1px; height: 20px;
  background: var(--border-light);
  margin: 0 4px;
}

/* ─── AVATAR & DROPDOWN ─── */
.nav-dropdown-wrap { position: relative; }

.nav-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--ncp-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 600;
  color: #fff;
  cursor: pointer;
  border: 2px solid var(--ncp-secondary);
  transition: transform var(--dur);
  font-family: var(--font-body);
}
.nav-avatar:hover { transform: scale(1.05); }

.nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
  padding: 8px;
  z-index: var(--z-dropdown);
}
.nav-dropdown.open { display: block; }

.nav-dropdown-header {
  padding: 8px 12px 10px;
  display: flex; flex-direction: column; gap: 2px;
}
.nav-dropdown-name { font-size: 0.84rem; font-weight: 600; color: var(--text); }
.nav-dropdown-email { font-size: 0.73rem; color: var(--text-muted); }
.nav-dropdown-divider { height: 1px; background: var(--border-light); margin: 4px 0; }

.nav-dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  font-size: 0.83rem; font-weight: 400;
  color: var(--text-muted);
  text-decoration: none;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.nav-dropdown-item svg {
  width: 15px; height: 15px;
  stroke: currentColor; fill: none; stroke-width: 1.8; flex-shrink: 0;
}
.nav-dropdown-item:hover { background: rgba(28, 42, 58, 0.05); color: var(--text); }
.nav-dropdown-item--admin { color: var(--ncp-primary); }
.nav-dropdown-item--admin:hover { background: rgba(28, 42, 58, 0.08); }
.nav-dropdown-item--logout:hover { background: rgba(220, 80, 80, 0.06); color: #c44; }

/* ─── BURGER ─── */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  background: none; border: none;
  cursor: pointer; padding: 4px;
  flex-shrink: 0;
}
.nav-burger span {
  display: block; width: 100%; height: 2px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
  transform-origin: center;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.25);
  z-index: 49;
}
.nav-mobile-overlay.active { display: block; }

/* ════════════════════════════════
   FOOTER
════════════════════════════════ */
.footer {
  position: relative;
  z-index: 1;
  padding: 64px 32px 0;
  background: var(--bg-dark);
  color: var(--text-inverted);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 64px;
  margin-bottom: 64px;
}

.footer-brand { max-width: 448px; }

.footer-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
  margin-bottom: 8px;
}
.footer-logo-icon { display: none; }
.footer-logo-icon:has(img) {
  display: block; width: 36px; height: 36px;
}
.footer-logo-icon img {
  width: 100%; height: 100%; object-fit: contain;
}
.footer-logo-name {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 600;
  color: var(--ncp-secondary);
}
.footer-brand-subtitle {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 400;
  color: #fff;
  margin-bottom: 16px;
}

.footer-tagline {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
  line-height: 1.6;
  max-width: 342px;
}

.footer-columns {
  display: flex;
  gap: 96px;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--ncp-secondary);
  margin-bottom: 16px;
}
.footer-col ul {
  list-style: none;
  display: flex; flex-direction: column; gap: 12px;
}
.footer-col ul a {
  font-size: 16px;
  color: #fff;
  text-decoration: none;
  font-weight: 400;
  transition: opacity var(--dur);
}
.footer-col ul a:hover { opacity: 0.7; }
.footer-col ul a.active { pointer-events: none; }

.footer-divider {
  height: 1px;
  background: var(--border-dark);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 0;
}
.footer-copy {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
}

.social-links { display: flex; gap: 12px; }
.social-btn {
  width: 36px; height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--dur), transform var(--dur);
}
.social-btn:hover { background: rgba(255, 255, 255, 0.2); transform: translateY(-2px); }
.social-btn svg { width: 16px; height: 16px; fill: rgba(255, 255, 255, 0.7); }
.social-btn:hover svg { fill: #fff; }
.social-btn img { width: 18px; height: 18px; object-fit: contain; filter: brightness(0) invert(1) opacity(0.7); transition: filter var(--dur); }
.social-btn:hover img { filter: brightness(0) invert(1) opacity(1); }

/* ════════════════════════════════
   RESPONSIVE
════════════════════════════════ */
@media (max-width: 768px) {
  .navbar { padding: 0 20px; height: 70px; }
  main { padding-top: 70px; }

  .nav-burger { display: flex; }

  .nav-links {
    display: none;
    position: fixed;
    top: 70px;
    left: 0; right: 0;
    bottom: 0;
    background: #fff;
    z-index: var(--z-header);
    padding: 16px 20px 20px;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 4px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }
  .nav-links.open { display: flex; }

  .nav-actions {
    display: none;
    padding: 8px 0 0;
    margin-left: 0;
    justify-content: flex-start;
  }
  .nav-actions.open { display: flex; }

  .nav-links a { padding: 10px 14px; font-size: 16px; }
  .nav-mega-trigger { padding: 10px 14px; font-size: 16px; width: 100%; justify-content: space-between; }
  .nav-mega {
    position: static;
    transform: none;
    width: 100%;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    display: none;
  }
  .nav-mega-wrap.open .nav-mega {
    display: block;
    transform: none;
  }
  .nav-mega-panel {
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0 0 0 16px;
    background: transparent;
  }
  .nav-mega-item { padding: 8px 12px; }
  .nav-mega-overlay { display: none; }
  .nav-sep { display: none; }

  /* Footer responsive */
  .footer { padding: 40px 20px 0; }
  .footer-top { flex-direction: column; gap: 40px; }
  .footer-columns { flex-direction: column; gap: 32px; }
  .footer-tagline { max-width: 100%; }
}

/* ─── LOADING BUTTON STATE ─── */
.btn--loading { cursor: wait !important; opacity: 0.75; }
.btn-icon-spin.spinning {
  display: inline-block !important;
  animation: spin 0.75s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ─── INLINE FORM ERRORS ─── */
.form-errors { list-style: none; margin: 4px 0 0; padding: 0; }
.form-errors li { font-size: 0.78rem; color: #e55; margin-top: 2px; }
.input--error { border-color: #e55 !important; box-shadow: 0 0 0 3px rgba(220,80,80,.12) !important; }
