:root{
  /* Sizing / layout */
  --main-max: 980px;
  --radius: 18px;
  --puzzle-size: 800px;

  /* Colors */
  --bg: #071a3a;
  --red: #e30613;

  /* Text */
  --text: #ffffff;
  --muted: rgba(255,255,255,0.72);

  /* Panel color: 30% lighter than --bg (with fallback) */
  --panel-bg: rgba(255,255,255,0.18);
}

@supports (color: color-mix(in srgb, black 50%, white 50%)){
  :root{
    --panel-bg: color-mix(in srgb, var(--bg) 70%, white 30%);
  }
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }

body{
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  position: relative;
}

/* --------------------------------
   Background: bunting behind content
--------------------------------- */
body::before{
  content:"";
  position: fixed;
  top: -120px;
  left: 0;
  height: 580px;
  width: 100vw;
  background-image: url("../images/bunting.png");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% auto;
  opacity: 1;
  pointer-events: none;
  z-index: 0;
}

/* Disable the second bunting layer (was used to stitch left/right halves) */
body::after{ content: none; }
/* --------------------------------
   Foreground decoration: puzzles (in front of main)
--------------------------------- */
.bunting-layer{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

/* Ensure bunting-layer pseudo elements are disabled (bunting is on body::before/after) */
.bunting-layer::before{ content: none; }
.bunting-layer::after{ content: none; }

.bunting-layer .puzzle{
  position: absolute;
  top: 100px;
  width: var(--puzzle-size);
  height: var(--puzzle-size);
  background-repeat: no-repeat;
  background-size: contain;
  transform-origin: center;
}

.bunting-layer .puzzle-left{
  left: calc(50% - (min(var(--main-max), 92vw) / 2) + 260px - var(--puzzle-size));
  transform: rotate(-30deg);
  background-image: url("../images/puzzle-left.png");
}

.bunting-layer .puzzle-right{
  top: 200px;
  left: calc(50% + (min(var(--main-max), 92vw) / 2) - 260px);
  transform: rotate(30deg);
  /* (zoals je laatste CSS) */
  background-image: url("../images/puzzle_right.png");
}

@media (max-width: 1200px){
  .bunting-layer .puzzle{
    width: 320px;
    height: 320px;
  }
  .bunting-layer .puzzle-left{
    left: calc(50% - (min(var(--main-max), 92vw) / 2) - 16px - 320px);
  }
}
@media (max-width: 980px){
  /* Op mobiel is er te weinig ruimte 'naast' de main.
     Daarom maken we de puzzelstukken kleiner en laten we ze deels over de main vallen,
     zodat ze wél zichtbaar blijven. */
  .bunting-layer .puzzle{
    width: 220px;
    height: 220px;
    top: 120px;
  }
  .bunting-layer .puzzle-left{
    left: -30px;   /* deels buiten beeld, maar zichtbaar */
  }
  .bunting-layer .puzzle-right{
    left: auto;
    right: -30px;
    top: 170px;
  }
}

@media (max-width: 480px){
  .bunting-layer .puzzle{
    width: 180px;
    height: 180px;
    top: 110px;
  }
  .bunting-layer .puzzle-left{ left: -40px; }
  .bunting-layer .puzzle-right{ right: -40px; top: 160px; }
}
/* --------------------------------
   Page structure
--------------------------------- */
.page{
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header{
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 22px 16px 0;
  background: transparent;
  position: relative;
  z-index: 4;
}

.navbar{
  width: min(var(--main-max), 92vw);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;

  background: var(--bg);
  border-radius: var(--radius);
  padding: 12px 18px;

  border: none;
  box-shadow: none;

  position: relative;
  z-index: 5;

  margin-bottom: -30px;

  overflow: visible;
}

.brand{
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);

  /* Keep navbar height the same while allowing a larger logo */
  position: relative;
  height: 42px;          /* menu bar height anchor */
  padding-left: 110px;   /* 100px logo + ~10px spacing */
}
.brand img{
  width: 220px;
  height: 220px;
  object-fit: contain;

  /* Take logo out of document flow so it doesn't push the navbar taller */
  position: absolute;
  left: 0;
  top: 120%;
  transform: translateY(-50%);
}

nav{
  flex: 1;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

nav a{
  position: relative;
  text-decoration: none;
  color: #ffffff;
  padding: 10px 10px 16px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

nav a.active::after{
  content:"";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 6px;
  height: 6px;
  background: var(--red);
  border-radius: 6px;
}

main{
  width: min(var(--main-max), 92vw);
  margin: 0 auto;
  padding: 56px 18px 56px;
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: none;
  border: none;
}

.center{ text-align: center; }

/* --------------------------------
   Typography (ALL WHITE)
--------------------------------- */
h1{
  margin: 10px 0 14px;
  font-size: clamp(22px, 2.6vw, 34px);
  color: #ffffff;
}

.slogan{
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 700;
  letter-spacing: 0.4px;
  margin: 8px 0 18px;
  color: #ffffff;
}

p{
  line-height: 1.65;
  color: #ffffff;
  max-width: 70ch;
  margin: 0 auto 14px;
}

a{ color: rgba(255,255,255,0.92); }
a:hover{ color: #ffffff; }

/* --------------------------------
   Media / downloads
--------------------------------- */
.hero-img{
  width: min(980px, 100%);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  margin: 14px auto 0;
  display: block;
}

.download-lead{
  margin: 0 auto 12px;
  max-width: 70ch;
  color: #ffffff;
  font-weight: 600;
}

.download-top{
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.download-top a{
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  text-decoration: none;
  background: var(--red);
  color: #ffffff;
  font-weight: 800;
}
.download-top a:hover{
  filter: brightness(0.95);
}

/* --------------------------------
   Grid + cards
--------------------------------- */
.grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.card{
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
}
.card img{
  width: 100%;
  display: block;
}

/* Download grid images: keep layout consistent by cropping/zooming from center */
.grid .card img{
  height: 360px;          /* pas aan naar wens */
  object-fit: cover;
  object-position: top;
}
.card .meta{
  padding: 10px 12px;
  display:flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.card .meta span{
  color: var(--muted);
  font-size: 14px;
}
.card .meta a{
  text-decoration: none;
  font-weight: 700;
  color: #ffffff;
}
.card .meta a:hover{ text-decoration: underline; }

/* --------------------------------
   Forms (ALL WHITE)
--------------------------------- */
form{
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
}
label{
  display: block;
  font-weight: 700;
  margin: 12px 0 6px;
  color: #ffffff;
}
input, textarea, select{
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.18);
  padding: 12px 12px;
  font-size: 16px;
  font-family: inherit;
  background: rgba(0,0,0,0.20);
  color: #ffffff;
}
input::placeholder,
textarea::placeholder{
  color: rgba(255,255,255,0.55);
}
textarea{ min-height: 70px; resize: vertical; }

button, .btn{
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 999px;
  border: none;
  background: var(--red);
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}
button:hover{ filter: brightness(0.95); }

.notice{
  margin: 10px auto 0;
  max-width: 720px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

/* Messages */
.messages{
  margin-top: 22px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.message{
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: rgba(255,255,255,0.06);
}
.message small{ color: var(--muted); }

/* --------------------------------
   Footer (panel background, no border)
--------------------------------- */
footer{
  width: min(var(--main-max), 92vw);
  margin: 0 auto 26px;
  margin-top: -30px;
  padding: 22px 18px 26px;
  text-align: center;
  color: rgba(255,255,255,0.80);

  background: transparent;
  border-radius: var(--radius);
  border: none;
  box-shadow: none;

  position: relative;
  z-index: 1;
}

.footer-title{
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
}

.footer-inner{
  width: min(var(--main-max), 92vw);
  margin: 0 auto;
  padding-top: 8px;
}

.sponsor-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: center;
}

.sponsor-link{ display: block; }

.sponsor-grid img{
  width: 100%;
  max-width: 160px;
  height: auto;
  margin: 0 auto;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  display: block;
}
.sponsor-link:hover img{ filter: brightness(1.02); }

/* =========================================================
   BUNTING: 1 element renderen + onder 1024px boven alles tonen
   (zonder overige styling/kleuren/layout te wijzigen)
   ========================================================= */

/* 1) Forceer dat er maar 1 bunting-layer gerenderd wordt */
body::after{
  content: none !important;
}

/* 2) Maak body::before altijd full-width en achter alles */
body::before{
  left: 0 !important;
  right: auto !important;
  width: 100vw !important;

  /* jouw huidige setting (zoals je screenshot) */
  top: -120px !important;
  height: 580px !important;

  background-repeat: no-repeat !important;
  background-position: center top !important;
  background-size: 100% auto !important;

  z-index: 0 !important;
  pointer-events: none !important;
}

/* 3) <1024px: bunting als strip BOVEN header/menu/main,
      en content omlaag duwen met exact dezelfde hoogte */
@media (max-width: 1240px){
  :root{ --bunting-offset: 180px; } /* pas aan als je 'm hoger/lager wilt */

  body::before{
    top: 0 !important;
    height: var(--bunting-offset) !important; /* alleen de strip tonen */
  }

  /* Alles (header/menu/main) zakt mee omlaag */
  .page{
    padding-top: var(--bunting-offset) !important;
  }
}
/* >=1240px: NIET schalen, maar links/rechts buiten beeld laten vallen */
@media (min-width: 1240px){
  body::before{
    background-size: 2400px auto !important;  /* vaste schaal */
    background-position: center top !important; /* netjes centreren */
  }
}

/* <=1240px: huidig gedrag behouden (schalen is bij jou goed) */
@media (max-width: 1240px){
  body::before{
    background-size: 100% auto !important;
  }
}
/* ==============================================
   LOGO: onder 1024px boven menu, 80% formaat
   ============================================== */
@media (max-width: 1024px){
  /* Verberg het originele logo in de navigatiebalk */
  .brand img{
    display: block !important;
  }

 
}
@media (max-width: 1024px){
  .navbar{
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .brand{
    padding-left: 0;
    height: auto;
    justify-content: center;
  }

  .brand img{
    position: static;
    transform: none;
    width: 160px;     /* ~80% van 200px */
    height: auto;
    max-height: 160px;
    margin: 6px auto 0;
    display: block;
  }

  nav{ flex: 0 0 auto; }

  nav ul{
    flex-wrap: wrap;
    justify-content: center;
  }
}

* =========================================================
   <1200px: puzzelstukken koppelen aan onderzijde navbar
   ========================================================= */
@media (max-width: 1200px){

  /* Gebruik navbar als visueel anker */
  header{
    position: relative;
  }

  /* Beide puzzels exact dezelfde verticale positie */
  .bunting-layer .puzzle{
    top: calc(100% + 16px); /* 16px onder navbar */
  }@media (max-width: 1200px){
  .bunting-layer .puzzle{
    transform-origin: top center;
  }
}
}