:root {
  --police-blue: #0a2342;
  --police-blue-mid: #123a5c;
  --police-blue-light: #1e4970;
  --ice: #e8eef4;
  --white: #ffffff;
  --accent: #c9a227;
  --accent-hover: #ddb92e;
  --text: #1a1f26;
  --muted: #5c6570;
  --danger: #b91c1c;
  --success: #15803d;
  --shadow: 0 8px 32px rgba(10, 35, 66, 0.18);
  --radius: 12px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--ice);
  line-height: 1.6;
}

a {
  color: var(--police-blue-light);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

code {
  font-size: 0.9em;
  background: rgba(10, 35, 66, 0.08);
  padding: 0.12em 0.35em;
  border-radius: 4px;
}

/* Navbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, var(--police-blue) 0%, #0d2d4d 100%);
  box-shadow: var(--shadow);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--white);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--white);
  object-fit: contain;
  object-position: center;
  padding: 4px;
  box-sizing: border-box;
  display: block;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

@media (max-width: 720px) {
  .nav-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .nav-links {
    width: 100%;
    justify-content: flex-start;
  }
}

/* Hero */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-items: center;
  position: relative;
  color: var(--white);
  padding: 5rem 1.25rem 3rem;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../gallery/images/background.jpg");
  background-size: cover;
  background-position: center;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10, 35, 66, 0.92) 0%,
    rgba(10, 35, 66, 0.75) 45%,
    rgba(18, 58, 92, 0.55) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  width: 100%;
}

.hero-badge {
  display: inline-block;
  background: rgba(201, 162, 39, 0.2);
  border: 1px solid rgba(201, 162, 39, 0.5);
  color: #f5e6a8;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.12;
  margin: 0 0 1rem;
  font-weight: 800;
  max-width: 18ch;
}

.hero-lead {
  font-size: 1.1rem;
  max-width: 42ch;
  opacity: 0.95;
  margin: 0 0 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.35rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
}

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

.btn-primary {
  background: var(--accent);
  color: var(--police-blue);
  box-shadow: 0 4px 14px rgba(201, 162, 39, 0.35);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.55);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.btn-dark {
  background: var(--police-blue);
  color: var(--white);
}

.btn-dark:hover {
  background: var(--police-blue-mid);
}

/* Sections */
.section {
  padding: 4rem 1.25rem;
}

.section-alt {
  background: var(--white);
}

.section-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.section-head {
  margin-bottom: 2rem;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: var(--police-blue);
  margin: 0 0 0.5rem;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  max-width: 60ch;
}

/* Cards grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(10, 35, 66, 0.08);
}

.card h3 {
  margin: 0 0 0.75rem;
  color: var(--police-blue);
  font-size: 1.2rem;
}

.card p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.card .btn {
  width: 100%;
}

.icon-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.icon-box {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--police-blue-light), var(--police-blue));
  color: var(--white);
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* Trajectory cards */
.traject-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.traject-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(145deg, var(--police-blue-light), var(--police-blue));
}

.traject-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.traject-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 35, 66, 0.55), transparent 65%);
}

.traject-badge {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 30px;
  padding: 0 0.55rem;
  border-radius: 999px;
  background: rgba(10, 35, 66, 0.8);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.traject-content {
  padding: 1.1rem 1.25rem 0.8rem;
}

.traject-content h3 {
  margin: 0 0 0.65rem;
}

.traject-content p {
  margin: 0;
}

.traject-action {
  margin-top: auto;
  padding: 0 1.25rem 1.25rem;
}

.traject-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(10, 35, 66, 0.2);
}

/* Forms */
.forms-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 980px) {
  .forms-grid {
    grid-template-columns: 1fr 1fr;
  }
}

#formulier-politie,
#formulier-burger {
  scroll-margin-top: 96px;
}

.application-form {
  margin-top: 1rem;
  display: grid;
  gap: 0.75rem;
}

.application-form label {
  color: var(--police-blue);
  font-weight: 600;
  font-size: 0.95rem;
}

.application-form input,
.application-form select,
.application-form textarea {
  width: 100%;
  border: 1px solid rgba(10, 35, 66, 0.25);
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
  font: inherit;
  color: var(--text);
  background: var(--white);
}

.application-form textarea {
  resize: vertical;
  min-height: 90px;
}

.application-form input:focus-visible,
.application-form select:focus-visible,
.application-form textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.application-form input[readonly] {
  background: rgba(10, 35, 66, 0.04);
}

.application-form .btn {
  margin-top: 0.35rem;
}

.role-fields[hidden] {
  display: none;
}

.discord-id-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
  align-items: center;
}

.discord-id-row .btn {
  width: auto;
  white-space: nowrap;
  padding: 0.7rem 1rem;
  margin-top: 0;
  align-self: stretch;
  min-height: 44px;
}

@media (max-width: 600px) {
  .discord-id-row {
    grid-template-columns: 1fr;
  }

  .discord-id-row .btn {
    width: 100%;
  }
}

.oauth-card {
  max-width: 760px;
}

.form-status {
  margin: 0.25rem 0 0;
  padding: 0.75rem;
  border-radius: 8px;
  background: rgba(10, 35, 66, 0.06);
  color: var(--muted);
}

.form-status:empty {
  display: none;
}

.form-status.is-error {
  background: rgba(185, 28, 28, 0.08);
  color: var(--danger);
}

.form-status.is-success {
  background: rgba(21, 128, 61, 0.1);
  color: var(--success);
}

.oauth-note,
.oauth-help {
  margin: 0 0 1rem;
}

.oauth-help {
  margin-top: 1rem;
}

.oauth-status {
  margin: 1rem 0 0;
  padding: 0.75rem;
  border-radius: 8px;
  background: rgba(10, 35, 66, 0.06);
  color: var(--muted);
}

.oauth-status.is-error {
  background: rgba(185, 28, 28, 0.08);
  color: var(--danger);
}

.oauth-status.is-success {
  background: rgba(21, 128, 61, 0.1);
  color: var(--success);
}

/* About */
.about-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 800px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.stat {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(10, 35, 66, 0.1);
}

.stat:last-child {
  border-bottom: none;
}

.stat-num {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--police-blue);
}

/* FAQ */
#veelgestelde-vragen {
  scroll-margin-top: 88px;
}

.faq-list {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid rgba(10, 35, 66, 0.08);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  padding: 1rem 1.25rem;
  font-weight: 700;
  color: var(--police-blue);
  font-size: 1.05rem;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.faq-summary::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid var(--police-blue-light);
  border-bottom: 2px solid var(--police-blue-light);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-top: -0.2rem;
}

.faq-item[open] .faq-summary::after {
  transform: rotate(-135deg);
  margin-top: 0.15rem;
}

.faq-body {
  padding: 0 1.25rem 1.15rem;
  color: var(--muted);
  font-size: 0.95rem;
  border-top: 1px solid rgba(10, 35, 66, 0.06);
}

.faq-body p {
  margin: 0 0 0.65rem;
}

.faq-body p:last-child {
  margin-bottom: 0;
}

.faq-body a {
  color: var(--police-blue-light);
}

/* Gallery */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.filter-btn {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(10, 35, 66, 0.25);
  background: var(--white);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--police-blue);
  transition: background 0.2s, color 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--police-blue);
  color: var(--white);
  border-color: var(--police-blue);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow);
  border: 1px solid rgba(10, 35, 66, 0.08);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.gallery-open-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  position: relative;
  overflow: hidden;
}

.gallery-open-btn::after {
  content: "Klik om te vergroten";
  position: absolute;
  left: 50%;
  bottom: 0.7rem;
  transform: translate(-50%, 8px);
  background: rgba(10, 35, 66, 0.82);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  white-space: nowrap;
}

.gallery-open-btn img {
  transition: transform 0.24s ease, filter 0.24s ease;
}

.gallery-open-btn:hover img,
.gallery-open-btn:focus-visible img {
  transform: scale(1.04);
  filter: brightness(0.9);
}

.gallery-open-btn:hover::after,
.gallery-open-btn:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.gallery-caption {
  padding: 0.75rem 1rem;
}

.gallery-caption .theme {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  font-weight: 700;
}

.gallery-caption h4 {
  margin: 0.25rem 0 0;
  font-size: 1rem;
  color: var(--police-blue);
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
}

.gallery-lightbox.is-open {
  display: block;
}

.gallery-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 14, 24, 0.82);
}

.gallery-lightbox-dialog {
  position: relative;
  z-index: 1;
  max-width: min(92vw, 1040px);
  margin: 5vh auto;
  padding: 0.75rem;
}

.gallery-lightbox-image {
  width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: var(--shadow);
  background: #0b1320;
}

.gallery-lightbox-caption {
  color: var(--white);
  margin: 0.65rem 0 0;
  text-align: center;
}

.gallery-lightbox-close {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(10, 35, 66, 0.72);
  color: var(--white);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.6);
  border-radius: var(--radius);
}

.empty-state code {
  word-break: break-all;
}

/* Footer */
.site-footer {
  background: var(--police-blue);
  color: rgba(255, 255, 255, 0.85);
  padding: 2rem 1.25rem;
  margin-top: 0;
}

.site-footer a {
  color: #a8c4e0;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
}
