/* ==========================================================
   applepaycasinonederland.nl — hoofdstijlblad
   Licht grijze achtergrond, alles overig in zwart
   ========================================================== */

:root {
  --bg: #f2f3f5;          /* lichte achtergrond */
  --surface: #ffffff;     /* tabellen, auteursblok */
  --black: #000000;       /* header, footer, knoppen, tekst */
  --text: #000000;
  --muted: #5c5f66;       /* secundaire tekst */
  --line: #d9dbe0;        /* randen en scheidingslijnen */
  --white: #ffffff;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;

  --content: 820px;       /* breedte van de tekst */
  --wide: 1200px;         /* breedte van header en footer */
  --gutter: 20px;
  --header-h: 68px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg, video, iframe { max-width: 100%; }

a { color: inherit; }

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

/* ==========================================================
   HEADER
   ========================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--black);
  color: var(--white);
}

.header__inner {
  max-width: var(--wide);
  height: var(--header-h);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header__logo img {
  display: block;
  height: 36px;
  width: auto;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Knoppen in de header */
.hbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1.5px solid var(--white);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .02em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s, color .2s;
}

.hbtn--ghost { background: transparent; color: var(--white); }
.hbtn--ghost:hover { background: var(--white); color: var(--black); }

.hbtn--solid { background: var(--white); color: var(--black); }
.hbtn--solid:hover { background: transparent; color: var(--white); }

/* ==========================================================
   MAIN — alle contentstijlen, zonder extra wrappers
   ========================================================== */
main {
  flex: 1 0 auto;
  width: 100%;
  max-width: calc(var(--content) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 48px var(--gutter) 64px;
}

/* ---------- Koppen ---------- */
main h1,
main h2,
main h3,
main h4,
main h5,
main h6 {
  color: var(--black);
  line-height: 1.2;
  font-weight: 700;
  margin: 1.8em 0 .6em;
  overflow-wrap: break-word;
}

main h1 {
  font-size: clamp(30px, 5vw, 46px);
  letter-spacing: -.02em;
  margin-top: 0;
}
main h2 { font-size: clamp(24px, 3.6vw, 32px); letter-spacing: -.015em; }
main h3 { font-size: clamp(20px, 2.8vw, 24px); }
main h4 { font-size: 19px; }
main h5 { font-size: 17px; }
main h6 { font-size: 15px; color: var(--muted); }

/* ---------- Tekst ---------- */
main p {
  margin: 0 0 1.2em;
  overflow-wrap: break-word;
}

main strong, main b { font-weight: 700; }

main a {
  color: var(--black);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
main a:hover { text-decoration-thickness: 2px; }

main small { font-size: .85em; color: var(--muted); }

main mark { background: var(--black); color: var(--white); padding: 0 .25em; }

main hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 2.5em 0;
}

/* ---------- Lijsten ---------- */
main ul,
main ol {
  margin: 0 0 1.4em;
  padding-left: 1.4em;
}

main li { margin-bottom: .45em; }
main li::marker { color: var(--black); font-weight: 700; }

main ul ul,
main ol ol,
main ul ol,
main ol ul { margin: .45em 0 0; }

/* ---------- Citaat ---------- */
main blockquote {
  margin: 1.8em 0;
  padding: 4px 0 4px 22px;
  border-left: 4px solid var(--black);
  font-size: 1.08em;
}
main blockquote p:last-child { margin-bottom: 0; }

/* ---------- Code ---------- */
main code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9em;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .1em .4em;
}

main pre {
  max-width: 100%;
  overflow-x: auto;
  background: var(--black);
  color: var(--white);
  border-radius: 12px;
  padding: 18px 20px;
  margin: 0 0 1.4em;
}
main pre code { background: none; border: 0; padding: 0; color: inherit; }

/* ---------- Afbeeldingen ---------- */
main img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 2em auto;
  border-radius: 14px;
}

main figure {
  margin: 2em 0;
  max-width: 100%;
}
main figure img { margin: 0 auto; }

main figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

main video,
main iframe {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 14px;
  margin: 2em 0;
}
main iframe { aspect-ratio: 16 / 9; height: auto; }

/* ---------- Tabellen ---------- */
main table {
  width: 100%;
  margin: 2em 0;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.5;
}

main caption {
  caption-side: top;
  text-align: left;
  font-weight: 700;
  padding: 0 0 10px;
}

main th,
main td {
  padding: 13px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

main th {
  background: var(--black);
  color: var(--white);
  font-weight: 600;
  white-space: nowrap;
}

main tr:last-child td { border-bottom: 0; }
main tbody tr:nth-child(even) td { background: #f7f8fa; }

/* ---------- Knop in de content (gecentreerd) ---------- */
main .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  min-height: 56px;
  margin: 2.2em auto;
  padding: 0 44px;
  background: var(--black);
  color: var(--white);
  border: 2px solid var(--black);
  border-radius: 999px;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: background-color .2s, color .2s, transform .15s;
}
main .btn:hover {
  background: transparent;
  color: var(--black);
  text-decoration: none;
}
main .btn:active { transform: scale(.98); }

/* ---------- Auteursblok ---------- */
main .author {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 20px;
  align-items: start;
  margin: 3.5em 0 0;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--black);
  border-radius: 14px;
}

main .author__avatar {
  width: 88px;
  height: 88px;
  margin: 0;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg);
}

main .author__label {
  margin: 0 0 2px;
  font-size: 14px;
  color: var(--muted);
}

main .author__name {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.3;
}

main .author__text {
  margin: 0;
  font-size: 16px;
}

/* ==========================================================
   FOOTER
   ========================================================== */
.footer {
  flex-shrink: 0;
  background: var(--black);
  color: #c7c9ce;
  font-size: 14px;
  line-height: 1.6;
}

.footer__inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 44px var(--gutter) 36px;
}

.footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 26px;
  border-bottom: 1px solid #2a2a2a;
}

.footer__logo img { display: block; height: 32px; width: auto; }

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer a {
  color: var(--white);
  text-decoration: none;
}
.footer a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Organisaties voor verantwoord spelen */
.footer__orgs {
  padding: 24px 0;
  border-bottom: 1px solid #2a2a2a;
}

.footer__orgs-title {
  margin: 0 0 12px;
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
}

.footer__orgs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__orgs-list a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid #3a3a3a;
  border-radius: 999px;
  transition: border-color .2s;
}
.footer__orgs-list a:hover { border-color: var(--white); text-decoration: none; }

.footer__text {
  margin: 24px 0 0;
  max-width: 900px;
}

.footer__age {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 2px solid var(--white);
  border-radius: 50%;
  color: var(--white);
  font-weight: 700;
  font-size: 13px;
}

/* ==========================================================
   PIJL NAAR BOVEN
   ========================================================== */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: var(--black);
  color: var(--white);
  border: 2px solid var(--white);
  border-radius: 50%;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .25s, transform .25s, visibility .25s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top svg { width: 20px; height: 20px; }

/* Pijl schuift omhoog zolang de popup open is */
body.popup-open .to-top { bottom: 124px; }

/* ==========================================================
   POPUP (onderaan, na 4 seconden)
   ========================================================== */
.popup {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 200;
  width: calc(100% - 32px);
  max-width: 620px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 14px 14px 18px;
  background: var(--black);
  color: var(--white);
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .35);
  transform: translate(-50%, calc(100% + 40px));
  visibility: hidden;
  transition: transform .45s cubic-bezier(.2, .8, .2, 1), visibility .45s;
}
.popup.is-open { transform: translate(-50%, 0); visibility: visible; }

.popup__logo {
  display: block;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 10px;
  object-fit: contain;
}

.popup__text {
  flex: 1;
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
}

.popup__btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  background: var(--white);
  color: var(--black);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.popup__btn:hover { background: #e4e5e8; }

.popup__close {
  position: absolute;
  top: -12px;
  right: -8px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: var(--white);
  color: var(--black);
  border: 2px solid var(--black);
  border-radius: 50%;
  cursor: pointer;
}
.popup__close svg { width: 14px; height: 14px; }

/* ==========================================================
   404-PAGINA
   ========================================================== */
main.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 72px;
  padding-bottom: 88px;
}

main.error-page .error-page__code {
  margin: 0;
  font-size: clamp(110px, 26vw, 220px);
  font-weight: 800;
  line-height: .9;
  letter-spacing: -.06em;
  color: var(--black);
}

main.error-page h1 { margin: 24px 0 12px; }
main.error-page p { max-width: 480px; color: var(--muted); }
main.error-page .btn { margin-top: 1.4em; }

/* ==========================================================
   MOBIEL
   ========================================================== */
@media (max-width: 768px) {
  body { font-size: 16px; }
  main { padding-top: 32px; padding-bottom: 48px; }

  /* Brede tabellen scrollen horizontaal, de pagina blijft staan */
  main table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
  }
  main th,
  main td { padding: 11px 13px; white-space: nowrap; }

  main pre { border-radius: 10px; }

  main .btn {
    width: 100%;
    padding: 0 24px;
    font-size: 17px;
  }

  main .author {
    grid-template-columns: 64px 1fr;
    gap: 14px;
    padding: 20px;
  }
  main .author__avatar { width: 64px; height: 64px; }
}

@media (max-width: 520px) {
  :root { --gutter: 16px; --header-h: 60px; }

  .header__logo img { height: 28px; }
  .header__actions { gap: 6px; }
  .hbtn { min-height: 36px; padding: 0 13px; font-size: 13px; }

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

  .popup {
    flex-wrap: wrap;
    bottom: 12px;
    padding: 14px;
    gap: 12px;
  }
  .popup__logo { width: 38px; height: 38px; }
  .popup__text { flex: 1 1 calc(100% - 60px); font-size: 14px; }
  .popup__btn { width: 100%; }
  .popup__close { top: -10px; right: -4px; }

  body.popup-open .to-top { bottom: 160px; }
  .to-top { right: 14px; bottom: 14px; width: 44px; height: 44px; }
}

@media (max-width: 360px) {
  .hbtn { padding: 0 10px; font-size: 12px; }
}

/* Minder beweging als de gebruiker dat wil */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
