* {
  box-sizing: border-box;
}

:root {
  --page-width: 520px;
  --content-width: 460px;
  --card-bg: #d9d9d9;
  --accent: #ffa522;
  --border: #111;
  --radius-card: 28px;
  --radius-control: 20px;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: #09123a;
  color: #050505;
  font-family: "Nunito Sans", Arial, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;

  background-image: url("images/achtergrond.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

a.button {
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.page {
  width: min(100%, var(--page-width));
  margin: 0 auto;
  padding: 50px 24px 80px;
}

.intro h1 {
  margin: 0;
  text-align: center;
  font-size: clamp(3.1rem, 9vw, 4.65rem);
  line-height: 1.16;
  font-weight: 400;
  letter-spacing: 0;
}

.intro p {
  margin: 25px 0 32px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #fff;
  text-align: center;
}

.card {
  background: rgba(28, 24, 64, 0.65);
  border-radius: 28px;
  padding: 29px 46px 62px;
  color: #fff;
}

.field label,
.people h2,
.avatars h2 {
  display: block;
  margin: 0 0 16px;
  font-size: 1rem;
  line-height: 1.15;
  font-weight: 400;
}

input[type="text"],
input[type="email"],
input[type="search"] {
  display: block;
  width: 100%;
  height: 46px;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: #f7f5f2;
  padding: 6px 14px;
  outline: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="search"]:focus {
  border-width: 3px;
}

.people-avatar-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 51px;
  margin-top: 38px;
}

#people-list {
  display: grid;
  gap: 11px;
}

.button {
  border: 2px solid var(--border);
  background: var(--accent);
  color: #000;
  cursor: pointer;
}

.button-small {
  width: 100%;
  min-height: 60px;
  margin-top: 13px;
  border-radius: 20px;
  font-size: 1.45rem;
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(2, 72px);
  gap: 12px;
}

.avatar {
  width: 72px;
  height: 72px;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: #fff;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
}

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

.avatar.selected {
  outline: 4px solid var(--accent);
  outline-offset: 2px;
}

.email-field {
  margin-top: 38px;
}

.optin {
  display: flex;
  align-items: center;
  gap: 17px;
  margin: 15px 15px 0;
  font-size: 0.8rem;
}


.optin input {
  appearance: none;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin: 0;
  border: 2px solid #fff;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  position: relative;
}

.optin input:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.optin input:checked::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #111;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.button-primary {
  display: block;
  width: 76%;
  min-height: 84px;
  margin: 48px auto 0;
  border-radius: 18px;
  font-size: 1.48rem;
  padding: 12px 20px;
}

.site-footer {
  margin-top: 32px;
  padding: 20px 0 10px;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
}

.site-footer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-footer a:hover {
  color: #fff;
}

/* Welkom op pagina gegevens.php */
.welcome {
  text-align: center;
  color: #fff;
  margin: 20px 0 28px;
}

.welcome h1 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 700;
}

.welcome p {
  margin: 0 auto;
  max-width: 420px;
  font-size: 0.82rem;
  line-height: 1.5;
}

@media (max-width: 620px) {
  .page {
    padding: 40px 20px 80px;
  }

  .intro h1 {
    font-size: clamp(2.7rem, 12vw, 4rem);
  }

  .intro p {
    font-size: 0.95rem;
  }

  .card {
    padding: 24px 22px 40px;
  }

  .field label,
  .people h2,
  .avatars h2 {
    font-size: 1rem;
  }

.people-avatar-grid {
  grid-template-columns: 1fr;
  gap: 28px;
}

.avatar-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.people,
.avatars,
#people-list {
  min-width: 0;
}

  input[type="text"],
  input[type="email"],
  input[type="search"] {
    height: 44px;
    border-radius: 16px;
  }

  .avatar {
    min-height: 100px;
    border-radius: 16px;
  }

  .avatar-grid {
    gap: 10px;
  }

  .button-small {
    min-height: 52px;
    font-size: 1rem;
  }

  .optin {
    margin-left: 0;
    font-size: 0.7rem;
  }

  .button-primary {
    width: 88%;
    min-height: 66px;
    font-size: 1.05rem;
  }
}

@media (max-width: 390px) {
  .avatar {
    min-height: auto;
  }
}


/* Logo laten bibberen 
.title-logo {
  display: block;
  width: 75%;
  height: auto;
  margin: 0 auto;

  animation: korte-bibber 4s infinite;
  transform-origin: center;
}

@keyframes korte-bibber {
  0%,
  84%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }

  86% {
    transform: translate(-2px, 1px) rotate(-0.5deg);
  }

  88% {
    transform: translate(2px, -1px) rotate(0.5deg);
  }

  90% {
    transform: translate(-2px, -1px) rotate(-0.4deg);
  }

  92% {
    transform: translate(2px, 1px) rotate(0.4deg);
  }

  94% {
    transform: translate(-1px, 0) rotate(-0.25deg);
  }

  96% {
    transform: translate(1px, 1px) rotate(0.25deg);
  }

  98% {
    transform: translate(0, 0) rotate(0deg);
  }
} */

/* Logo permanent zacht laten bibberen */

.title-logo {
  display: block;
  width: 75%;
  height: auto;
  margin: 0 auto;

  animation: permanent-bibber 0.18s infinite;
  transform-origin: center;
}

@keyframes permanent-bibber {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }

  25% {
    transform: translate(-1px, 1px) rotate(-0.25deg);
  }

  50% {
    transform: translate(1px, -1px) rotate(0.25deg);
  }

  75% {
    transform: translate(-1px, -1px) rotate(-0.2deg);
  }

  100% {
    transform: translate(1px, 1px) rotate(0.2deg);
  }
}

/* Foutmelding als niet alle gegevens ingevuld zijn */
#error-modal {
  display: none !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
}

#error-modal.is-open {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
}

#error-modal .error-modal-backdrop {
  position: absolute !important;
  inset: 0 !important;
  background: rgba(5, 8, 30, 0.82) !important;
}

#error-modal .error-modal-box {
  position: relative !important;
  z-index: 1 !important;

  width: calc(100% - 40px) !important;
  max-width: 340px !important;

  padding: 24px !important;

  background: #2f285c !important;
  color: #fff !important;

  border-radius: 24px !important;
  text-align: center !important;
  box-sizing: border-box !important;
}

#error-modal .error-modal-box h2,
#error-modal .error-modal-box p {
  color: #fff !important;
}

#error-modal .error-ghost {
  display: block !important;
  width: 140px !important;
  height: auto !important;
  margin: 0 auto 12px !important;
}

#error-modal .error-close {
  display: inline-block !important;
  width: auto !important;
  margin: 0 !important;
  padding: 12px 20px !important;

  background: var(--accent) !important;
  color: #000 !important;

  border: 2px solid #111 !important;
  border-radius: 14px !important;
}

/* Keuze van de tocht */ 
  .tocht-keuze-titel {
    margin: 0 0 18px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
  }


  /*
    * Verticale carrousel
    */
  /* Zoekveld voor griezeltocht */
  .tocht-zoekveld {
    margin: 0 0 16px;
  }

  .tocht-zoekveld label {
    margin-bottom: 8px;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
  }

  .tocht-zoekveld input[type="search"] {
    width: 100%;
    height: 46px;
    border: 2px solid #111;
    border-radius: 14px;
    background: #f7f5f2;
    color: #1b1933;
    padding: 6px 14px;
    font-size: 0.9rem;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
  }

  .tocht-zoekveld input[type="search"]::placeholder {
    color: #77738b;
  }

  .tocht-zoekveld input[type="search"]:focus {
    border-color: var(--accent);
    border-width: 2px;
    box-shadow: 0 0 0 2px rgba(255, 165, 34, 0.2);
  }

  #geen-tochten-gevonden {
    margin: 8px 0 14px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.82rem;
    line-height: 1.4;
    text-align: center;
  }

  .tocht-carousel {
    display: flex;
    flex-direction: column;

    gap: 10px;

    height: 224px;

    overflow-y: auto;
    overflow-x: hidden;

    padding: 2px 4px 2px 2px;

    scroll-snap-type: y mandatory;
    overscroll-behavior: contain;

    -webkit-overflow-scrolling: touch;

    scrollbar-width: none;
  }


  .tocht-carousel::-webkit-scrollbar {
    display: none;
  }


  /*
    * Eén tocht
    */
  .tocht-card {
    flex: 0 0 68px;

    width: 100%;

    display: grid;
    grid-template-columns: 36px 1fr 24px;
    align-items: center;

    gap: 10px;

    padding: 10px 14px;

    scroll-snap-align: start;

    border: 2px solid transparent;
    border-radius: 16px;

    background: #f7f5f2;
    color: #1b1933;

    font-family: inherit;

    text-align: left;

    cursor: pointer;

    transition:
      border-color 0.15s ease,
      background 0.15s ease,
      transform 0.15s ease;
  }


  .tocht-card:active {
    transform: scale(0.985);
  }


  /*
    * Geselecteerde tocht
    */
  .tocht-card.selected {
    border-color: var(--accent);
    background: #fff3dd;
  }


  /*
    * Oranje bolletje links
    */
  .tocht-pin {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 32px;
    height: 32px;

    border-radius: 50%;

    background: var(--accent);
    color: #1b1933;

    font-size: 0.7rem;
  }


  /*
    * Naam afdeling
    */
  .tocht-naam {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
  }


  /*
    * Pijltje rechts
    */
  .tocht-pijl {
    color: #2f285c;

    font-size: 1.5rem;
    line-height: 1;

    text-align: right;
  }


  /*
    * Kleine scroll-hint
    */
  .scroll-hint {
    margin: 10px 0 0;

    color: rgba(255, 255, 255, 0.7);

    font-size: 0.72rem;
    text-align: center;
  }


  /*
    * Submitknop niet actief zolang
    * geen tocht gekozen werd
    */
  .tocht-submit:disabled {
    opacity: 0.4;
    cursor: default;
  }


  .tocht-submit:disabled:active {
    transform: none;
  }

  /* =========================
   AUDIOPLAYER
   ========================= */

.audio-card {
  padding: 24px;
}

.audio-player-ui {
  display: flex;
  align-items: center;
  gap: 18px;
}

.audio-play {
  display: flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 64px;

  width: 64px;
  height: 64px;

  border: 2px solid #111;
  border-radius: 50%;

  background: var(--accent);
  color: #111;

  font-family: inherit;
  font-size: 1.4rem;

  cursor: pointer;
}

.audio-play:active {
  transform: scale(0.96);
}

.audio-info {
  flex: 1;
  min-width: 0;
}

.audio-title {
  margin-bottom: 10px;

  color: #fff;

  font-size: 0.9rem;
  font-weight: 700;
}

.audio-progress {
  width: 100%;
  height: 6px;

  margin: 0;

  accent-color: var(--accent);

  cursor: pointer;
}

.audio-times {
  display: flex;
  justify-content: space-between;

  margin-top: 5px;

  color: rgba(255, 255, 255, 0.7);

  font-size: 0.7rem;
}

/* =========================
   KEUZES NA AUDIOFRAGMENT
   ========================= */

.keuze-fragment {
  margin-top: 24px;
}

.keuze-fragment h2 {
  margin: 0 0 16px;

  color: #fff;

  font-size: 1rem;
  font-weight: 700;
}

.fragment-keuzes {
  display: grid;
  gap: 12px;
}

.fragment-keuze {
  width: 100%;

  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  gap: 14px;

  padding: 12px 14px;

  border: 2px solid transparent;
  border-radius: 16px;

  background: #f7f5f2;
  color: #1b1933;

  font-family: inherit;
  text-align: left;

  cursor: pointer;

  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    transform 0.15s ease;
}

.fragment-keuze:active {
  transform: scale(0.985);
}

.fragment-keuze.selected {
  border-color: var(--accent);
  background: #fff3dd;
}

.keuze-icoon {
  display: block;

  width: 52px;
  height: 52px;

  object-fit: contain;
}

.keuze-tekst {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.keuze-tekst strong {
  font-size: 0.9rem;
  font-weight: 700;
}

.keuze-tekst span {
  font-size: 0.82rem;
  line-height: 1.35;
}

.fragment-submit:disabled {
  opacity: 0.4;
  cursor: default;
}

/* afbeeldingen bij keuze */
/* =========================
   RESULTAAT KEUZE
   ========================= */

.keuze-resultaat {
  margin-top: 22px;
}

.team-resultaat {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 16px;
  align-items: center;

  padding: 18px 20px;

  background: rgba(28, 24, 64, 0.78);
  border-radius: 20px;

  color: #fff;
}

.team-avatar {
  width: 64px;
  height: 64px;

  object-fit: cover;
  border-radius: 50%;
}

.team-resultaat-inhoud {
  min-width: 0;
}

.team-resultaat-inhoud strong {
  display: block;

  margin-bottom: 10px;

  color: #fff;

  font-size: 1rem;
  font-weight: 700;
}

.gekozen-optie {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;

  color: #fff;

  font-size: 0.88rem;
  line-height: 1.4;
}

.gekozen-optie img {
  width: 42px;
  height: 42px;

  object-fit: contain;
}

/* =========================
   EINDSCHERM / BORD 7
   ========================= */

.eindblok,
.auteur-blok,
.marketing-blok {
  margin-top: 15px;
}

.eindblok h2,
.auteur-blok h2,
.marketing-blok h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
}

.eindblok p,
.auteur-blok p,
.marketing-blok p {
  margin: 0 0 18px;
  color: #fff;
  line-height: 1.5;
}

/* Team + avatar */
.eindteam {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.eindteam .team-avatar {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 14px;
}

/* Alle knoppen op het eindscherm */
.diploma-button,
.auteur-blok .button,
.marketing-submit {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  min-height: 58px;

  padding: 14px 20px;

  border: 2px solid #111;
  border-radius: 18px;

  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;

  cursor: pointer;
}

/* Hoofdknoppen */
.diploma-button,
.marketing-submit {
  background: var(--accent);
  color: #111;
}

/* Secundaire knop */
.auteur-blok .button-secondary {
  background: #f7f5f2;
  color: #1b1933;
}

/* Klik-effect */
.diploma-button:active,
.auteur-blok .button:active,
.marketing-submit:active {
  transform: scale(0.985);
}

/* Uitgeschakelde marketingknop */
.marketing-submit:disabled {
  opacity: 0.4;
  cursor: default;
}

.marketing-submit:disabled:active {
  transform: none;
}

/* Marketingcheckbox */
.marketing-optin {
  display: flex;
  align-items: flex-start;
  gap: 12px;

  margin-bottom: 18px;

  color: #fff;
  font-size: 0.85rem;
  line-height: 1.4;
}

.marketing-optin input {
  flex: 0 0 auto;
  margin-top: 3px;
}

/* Bevestiging na opt-in */
.marketing-bedankt {
  padding: 14px 16px;

  border-radius: 14px;

  background: rgba(255, 165, 34, 0.14);
  color: #fff;

  font-weight: 600;
  text-align: center;
}

/* Boekpromotie op diploma.php */

.boek-button {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  min-height: 58px;

  padding: 14px 20px;

  border: 2px solid #111;
  border-radius: 18px;

  background: var(--accent);
  color: #111;

  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;

  cursor: pointer;
}

.boek-button:active {
  transform: scale(0.985);
}

.boek-cover {
  display: block;
  width: 100%;
  max-width: 240px;
  height: auto;
  margin: 20px auto;
}

/* =========================
   DIPLOMAPAGINA
   ========================= */

.diploma-overzicht,
.boekpromo {
  margin-top: 22px;
}

.diploma-overzicht + .boekpromo {
  margin-top: 28px;
}

/* Compactere kaarten op het eindscherm en diplomapagina */

.eindblok,
.marketing-blok,
.diploma-overzicht,
.boekpromo {
  padding: 18px 20px 22px;
}