/* ==========================================================================
   KWTC De Toekomst Rekem — static rebuild
   Design tokens taken from the live site's computed styles.
   ========================================================================== */

:root {
  --blue: #2f77aa;
  --blue-dark: #26638e;
  --green: #61ce70;
  --text: #7a7a7a;
  --ink: #334155;
  --line: #eaeaea;
  --white: #fff;

  --container: 1140px;
  --header-h: 93px;

  --font: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
}

/* --- reset ---------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  /* the dropdown panels are absolutely positioned, so they would otherwise
     widen the document; clip instead of hidden to keep sticky/anchor behaviour */
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 12px;
  z-index: 200;
  padding: 10px 18px;
  color: #fff;
  background: var(--blue);
  border-radius: 0 0 5px 5px;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0;
}

/* --- header --------------------------------------------------------------- */

.site-header {
  position: relative;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: calc(var(--header-h) - 1px); /* + 1px bottom border = 93px */
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 0 0 auto;
  color: var(--ink);
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 73px;
  height: 36px;
}

.site-title {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
}

.header-spacer {
  flex: 1 1 auto;
}

/* --- primary navigation (desktop) ----------------------------------------- */

.site-nav > .menu {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav .menu > li {
  position: relative;
}

.site-nav .menu > li > a,
.site-nav .menu > li > .menu-parent {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 80px;
  padding: 0 16px;
  font-size: 16px;
  font-weight: 400;
  color: var(--ink);
  white-space: nowrap;
}

.site-nav .menu > li > a:hover,
.site-nav .menu > li > .menu-parent:hover,
.site-nav .menu > li.is-current > a {
  color: var(--blue);
  text-decoration: none;
}

.menu-parent .caret {
  width: 9px;
  height: 9px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.15s ease;
}

.sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 50;
  width: 240px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--white);
  box-shadow: 0 4px 10px -2px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.site-nav .menu > li:hover > .sub-menu,
.site-nav .menu > li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sub-menu li {
  position: relative;
}

.sub-menu a,
.sub-menu .menu-parent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 14px 16px;
  font-size: 16px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.sub-menu > li:last-child > a,
.sub-menu > li:last-child > .menu-parent {
  border-bottom: 0;
}

.sub-menu a:hover,
.sub-menu .menu-parent:hover {
  color: var(--blue);
  background: #f7f9fb;
  text-decoration: none;
}

/* third level opens to the side */
.sub-menu .sub-menu {
  top: 0;
  left: 100%;
}

/* the last two top-level menus sit near the right edge: open them inwards
   so neither they nor their third level run off the viewport */
.site-nav .menu > li:nth-last-child(-n + 2) > .sub-menu {
  left: auto;
  right: 0;
}

.site-nav .menu > li:nth-last-child(-n + 2) .sub-menu .sub-menu {
  left: auto;
  right: 100%;
}

.sub-menu .menu-parent .caret {
  transform: rotate(-45deg);
}

/* --- social icons --------------------------------------------------------- */

.social {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

/* solid rounded badges with a white glyph, matching the live header */
.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 5px;
  background: #1877f2;
  color: #fff;
}

.social a:hover {
  background: #0f5fd0;
}

.social a svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

/* --- mobile nav toggle ---------------------------------------------------- */

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  color: var(--blue);
}

.nav-toggle svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.nav-toggle .icon-close {
  display: none;
}

.nav-toggle[aria-expanded='true'] .icon-open {
  display: none;
}

.nav-toggle[aria-expanded='true'] .icon-close {
  display: block;
}

/* --- page sections -------------------------------------------------------- */

/* max-width is content box + gutters, so the content itself is exactly
   1140px wide on desktop — the same as the live site */
.container {
  max-width: calc(var(--container) + 40px);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 0 10px;
}

/* home hero */

.hero {
  background: var(--blue);
  padding: 0 55px;
}

/* Two equal columns, each 50% of the 1330px inner width, both top-aligned —
   this reproduces the live 665px / 665px split exactly. */
.hero-inner {
  display: flex;
  align-items: flex-start;
  max-width: 1330px;
  margin: 0 auto;
}

.hero-copy {
  flex: 0 0 50%;
  max-width: 50%;
  min-width: 0;
  padding: 66px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--white);
}

.hero-copy .rich,
.hero-copy .rich p {
  color: var(--white);
}

/* extra breathing room between the intro copy and the buttons, matching the
   widget spacing on the live hero */
.hero-copy .rich {
  margin-bottom: 25px;
}

.hero-media {
  flex: 0 0 50%;
  max-width: 50%;
  min-width: 0;
  padding: 67px 44px;
  text-align: center;
}

.hero-media img {
  width: 577px;
  max-width: 100%;
  height: auto;
  border-radius: 22px;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  color: var(--blue);
  text-align: center;
  background: var(--white);
  border-radius: 5px;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn:hover {
  color: var(--white);
  background: var(--blue-dark);
  text-decoration: none;
}

/* interior page content */

.page-body {
  padding: 40px 0 60px;
}

.page-body > .container > * + * {
  margin-top: 20px;
}

.page-title {
  margin: 0;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--blue);
}

.page-title.is-green,
.block-heading.is-green {
  color: var(--green);
}

.block-heading {
  margin: 0;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--blue);
}

/* rich text coming from the original pages */

.rich {
  font-size: inherit;
  color: var(--text);
}

/* 1.6em is the theme default on the live site; with 100+ paragraphs on the
   statuten/clubreglement pages this is worth several hundred pixels */
.rich p {
  margin: 0 0 1.6em;
}

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

.rich ul,
.rich ol {
  margin: 0 0 16px;
  padding-left: 20px;
}

.rich li {
  margin-bottom: 0;
  line-height: 1.65;
}

.rich strong,
.rich b {
  font-weight: 600;
  color: inherit;
}

/* headings inside imported content follow the live theme's scale */
.rich h1,
.rich h2,
.rich h3,
.rich h4,
.rich h5,
.rich h6 {
  margin: 0 0 20px;
  font-weight: 600;
  line-height: 1.3;
  color: #1e293b;
}

.rich h1 { font-size: 40px; }
.rich h2 { font-size: 30px; }
.rich h3 { font-size: 24px; }
.rich h4 { font-size: 20px; line-height: 1.2; }
.rich h5 { font-size: 18px; }
.rich h6 { font-size: 16px; }

.rich a {
  color: var(--blue);
  text-decoration: underline;
}

.rich img {
  height: auto;
}

.rich table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1em;
}

.rich th,
.rich td {
  padding: 6px 10px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.rich hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1.5em 0;
}

/* tables and wide content must scroll inside themselves, never the page */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.block-image {
  margin: 0;
}

.block-image.align-center {
  text-align: center;
}

.block-image.align-right {
  text-align: right;
}

.block-image figcaption {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text);
}

/* image-box: logo + title + description, as used on the MTB pages */

.image-box {
  text-align: center;
}

.image-box img {
  display: inline-block;
}

/* image beside the text (Elementor's position-left/right) */
.image-box--side {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  text-align: left;
}

.image-box--side .image-box-media {
  flex: 0 0 auto;
}

.image-box--side .image-box-media img {
  width: 100%;
}

.image-box--side .image-box-body {
  flex: 1 1 auto;
  min-width: 0;
}

.image-box--side .image-box-title,
.image-box--side .image-box-desc {
  margin-top: 0;
}

.image-box--right {
  flex-direction: row-reverse;
}

.image-box .image-box-title {
  margin: 11px 0 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--blue);
}

.image-box .image-box-desc {
  margin: 4px 0 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--text);
  white-space: pre-line; /* the live description keeps its manual line breaks */
}

/* Per-box size and colour, mirroring the live image boxes. Scoped under
   .image-box so they outrank the .image-box .image-box-title/desc defaults. */
.image-box .ib-fs-36 { font-size: 36px; line-height: 1.4; }
.image-box .ib-fs-24 { font-size: 24px; line-height: 1.3; }
.image-box .ib-fs-22 { font-size: 22px; line-height: 1.45; }
.image-box .ib-fs-16 { font-size: 16px; }

.image-box .ib-link { color: #046bd2; }
.image-box .ib-primary { color: var(--blue); }
.image-box .ib-text { color: var(--text); }

/* gallery */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  border-radius: 4px;
}

.gallery-item {
  display: block;
  border-radius: 4px;
  overflow: hidden;
}

.gallery-item:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.gallery-item img {
  transition: transform .2s ease;
}

@media (hover: hover) {
  .gallery-item:hover img {
    transform: scale(1.04);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-item img {
    transition: none;
  }

  .gallery-item:hover img {
    transform: none;
  }
}

/* lightbox — built by js/site.js, hidden until a gallery item is opened */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, .9);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-figure {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.lightbox-figure img {
  max-width: 100%;
  /* leave room for the caption underneath */
  max-height: calc(100vh - 130px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-caption {
  color: var(--white);
  font-size: 14px;
}

.lightbox button {
  position: absolute;
  border: 0;
  border-radius: 4px;
  background: rgba(0, 0, 0, .55);
  color: var(--white);
  font-family: inherit;
  font-size: 26px;
  line-height: 1;
  padding: 12px 16px;
  cursor: pointer;
}

.lightbox button:hover,
.lightbox button:focus-visible {
  background: var(--blue);
}

.lightbox-close {
  top: 16px;
  right: 16px;
  font-size: 20px;
}

.lightbox-prev {
  left: 16px;
}

.lightbox-next {
  right: 16px;
}

/* row of images side by side, as on the MTB pages */

.image-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
}

.image-row > * {
  flex: 0 1 auto;
}

/* pdf embed */

/* 600x600 is the size the live embed renders at on desktop */
.pdf-embed {
  width: 600px;
  max-width: 100%;
  height: 600px;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.pdf-fallback {
  margin-top: 12px;
  font-size: 15px;
}

/* members-only notice */

.members-notice {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px;
  text-align: center;
  background: #f7f9fb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.members-notice h1 {
  margin: 0 0 12px;
  font-size: 26px;
  font-weight: 600;
  color: var(--blue);
}

.members-notice p {
  margin: 0 0 16px;
  color: var(--text);
}

.members-notice .btn {
  color: var(--white);
  background: var(--blue);
}

.members-notice .btn:hover {
  background: var(--blue-dark);
}

/* --- sponsors band -------------------------------------------------------- */

.sponsors {
  padding: 40px 20px;
}

/* Four equal columns inside the 1140px container, each logo centred in its
   column — matches the live band's positions to the pixel. */
.sponsors-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  max-width: var(--container);
  margin: 0 auto;
}

.sponsor {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.sponsor img {
  max-width: 100%;
  height: auto;
}

.sponsor-mesjeu img {
  width: 232px;
}

.sponsor-sportoase img {
  width: 249px;
}

.sponsor-telematic img {
  width: 265px;
}

.sponsor-baillien img {
  width: 197px;
}

.sponsor-title {
  margin: 6px 0 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--blue);
}

/* --- footer --------------------------------------------------------------- */

.site-footer-nav {
  background: var(--blue);
  padding: 25px 10%;
}

.site-footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* The live footer spaces its items unevenly (Elementor containers with
   hand-tuned margins). Reproduced as leading margins in % of the 1152px
   content box so the rhythm holds at other widths too. */
.site-footer-nav li {
  display: flex;
  justify-content: center;
}

.site-footer-nav li:nth-child(1) { margin-left: 1.9965%; }
.site-footer-nav li:nth-child(2) { margin-left: 2.9514%; }
.site-footer-nav li:nth-child(3) { margin-left: 4.7743%; }
.site-footer-nav li:nth-child(4) { margin-left: 1.4757%; flex: 0 0 17.3611%; }
.site-footer-nav li:nth-child(5) { margin-left: 1.9097%; }
.site-footer-nav li:nth-child(6) { margin-left: 5.9028%; }
.site-footer-nav li.copyright { margin-left: 6.7708%; }

.site-footer-nav a {
  display: inline-block;
  /* keeps "Breuls Euregio Classic 2026" wrapping onto two lines, as it does
     on the live site */
  max-width: 200px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--white);
  text-align: center;
}

.site-footer-nav .copyright {
  justify-content: flex-start;
}

.site-footer-nav .copyright a {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: #54595f;
  text-align: left;
}

.site-footer-bottom {
  padding: 16px 20px;
  text-align: center;
  font-size: 16px;
  color: var(--ink);
}

.site-footer-bottom a {
  color: var(--blue);
  text-decoration: underline;
}

/* ==========================================================================
   Responsive — the live site switches to the hamburger drawer at 921px
   ========================================================================== */

@media (max-width: 1200px) {
  .site-nav .menu > li > a,
  .site-nav .menu > li > .menu-parent {
    padding: 0 11px;
    font-size: 15px;
  }
}

@media (max-width: 921px) {
  .nav-toggle {
    display: inline-flex;
    order: 2;
  }

  .social {
    order: 3;
  }

  .header-spacer {
    display: none;
  }

  /* the live site scales body copy down slightly on phones */
  body {
    font-size: 14.592px;
  }

  .header-inner {
    flex-wrap: wrap; /* lets the drawer drop onto its own row */
    gap: 12px;
    padding: 12px 16px;
    min-height: 0;
  }

  /* capped so the title wraps onto two lines and the toggle + social icons
     still fit on the first row, exactly as on the live site */
  .brand {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 200px;
  }

  /* stays 20px and wraps onto two lines, as it does on the live site */
  .site-title {
    font-size: 20px;
  }

  .site-nav {
    order: 4;
    flex: 1 0 100%;
    display: none;
    max-height: 70vh;
    overflow-y: auto;
    border-top: 1px solid var(--line);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav > .menu {
    display: block;
  }

  .site-nav .menu > li > a,
  .site-nav .menu > li > .menu-parent {
    height: auto;
    padding: 14px 4px;
    font-size: 16px;
    border-bottom: 1px solid var(--line);
    justify-content: space-between;
    width: 100%;
  }

  /* collapsible submenus on touch */
  .sub-menu {
    position: static;
    width: auto;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    padding-left: 16px;
    transition: none;
  }

  .site-nav .menu > li:hover > .sub-menu,
  .site-nav .menu > li:focus-within > .sub-menu {
    display: none;
  }

  /* must outrank the :hover rule above — a tap also counts as a hover */
  .site-nav .menu li.is-expanded:hover > .sub-menu,
  .site-nav .menu li.is-expanded:focus-within > .sub-menu,
  .site-nav .menu li.is-expanded > .sub-menu {
    display: block;
  }

  .menu-parent[aria-expanded='true'] .caret {
    transform: translateY(2px) rotate(-135deg);
  }

  .sub-menu .sub-menu {
    left: auto;
  }

  .sub-menu .menu-parent .caret {
    transform: translateY(-2px) rotate(45deg);
  }

  /* hero stacks */
  .hero {
    padding: 0 11px;
  }

  .hero-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 33px 0 44px;
  }

  .hero-copy {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 5px;
    gap: 20px;
  }

  .hero-copy h1,
  .hero-copy h2 {
    font-size: 25px;
  }

  .hero-media {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 25px 5px 0;
  }

  .hero-media img {
    width: 100%;
  }

  .site-footer-nav {
    padding: 20px 16px;
  }

  .site-footer-nav ul {
    flex-direction: column;
    justify-content: center;
  }

  .site-footer-nav li,
  .site-footer-nav li:nth-child(1),
  .site-footer-nav li:nth-child(2),
  .site-footer-nav li:nth-child(3),
  .site-footer-nav li:nth-child(4),
  .site-footer-nav li:nth-child(5),
  .site-footer-nav li:nth-child(6),
  .site-footer-nav li.copyright {
    flex: 0 0 auto;
    width: 100%;
    margin-left: 0;
    justify-content: center;
    text-align: center;
  }

  .site-footer-nav a {
    max-width: none;
    padding: 4px 0;
  }

  .site-footer-nav .copyright a {
    text-align: center;
  }

  .sponsors-inner {
    flex-direction: column;
    gap: 28px;
  }

  .sponsor {
    flex: 0 0 auto;
    width: 100%;
  }

  .sponsor-mesjeu img,
  .sponsor-sportoase img,
  .sponsor-telematic img,
  .sponsor-baillien img {
    width: min(100%, 340px);
  }

  .page-body {
    padding: 28px 0 44px;
  }

  .container {
    padding: 0 16px; /* matches the live 358px content box at 390px wide */
  }

  .page-title,
  .block-heading {
    font-size: 25px;
  }

  .image-row {
    gap: 14px;
  }

  /* side-by-side image boxes stack on phones, as they do on the live site */
  .image-box--side {
    display: block;
    text-align: center;
  }

  .image-box--side .image-box-media {
    width: auto !important;
    margin-bottom: 11px;
  }
}

@media (max-width: 600px) {
  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .pdf-embed {
    height: 600px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
