/* TTC Nova — gedeeld stijlblad
   Gebaseerd op live site ttcnova.be (desktop 950px)
   ─────────────────────────────────────────────────
   Kleuren  : achtergrond #efefef, tekst #797979
   Font     : Rokkitt 18px
   Container: 950px gecentreerd
   Layout   : 740px hoofd + 210px zijbalk
   Nav      : 88px hoog, #797979 achtergrond, witte tekst
   ─────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Rokkitt:ital,wght@0,400;0,600;0,700;1,400&display=swap');

/* ── Reset & basis ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 18px; }

body {
  font-family: 'Rokkitt', 'Helvetica Neue', Helvetica, sans-serif;
  font-weight: 400;
  font-size: 18px;
  color: #797979;
  background: #efefef;
  line-height: 1.5;
  min-width: 950px;   /* desktop-first; mobile overschrijft dit */
}

a { color: #797979; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Links in paginainhoud zijn onderstreept (zoals op live site) */
#page-content a { text-decoration: underline; }
#page-content a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: 'Rokkitt', 'Helvetica Neue', Helvetica, sans-serif;
  color: #797979;
  line-height: 1.2;
  margin-bottom: 0.4em;
}
h1 { font-size: 18px; font-weight: 700; }
h2 { font-size: 24px; font-weight: 700; }
h3 { font-size: 18px; font-weight: 700; }
h4 { font-size: 16px; font-weight: 600; }

p { margin-bottom: 0.75em; }
p:last-child { margin-bottom: 0; }

/* Tekstuitlijning en lijstinspringing in paginainhoud */
#page-content p { text-align: justify; }
#page-content ul,
#page-content ol {
  padding-left: 1.8em;
  margin-bottom: 0.75em;
}
#page-content li { margin-bottom: 0.2em; }

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

/* Mobiele navigatiebalk: verborgen op desktop */
#mobile-nav-bar { display: none; }

/* ── Pagina-kolom — 950px gecentreerd ─────────────────────────── */
.page-wrap {
  width: 950px;
  margin: 0 auto;
  background: #efefef;
  /* Issue 3: banner boven menu — flex column met expliciete volgorde */
  display: flex;
  flex-direction: column;
}
#mobile-nav-bar { order: 0; }
#site-header    { order: 1; }
#site-nav       { order: 2; }
#content-wrap   { order: 3; }
#site-footer    { order: 4; }

/* ══════════════════════════════════════════════════════
   NAVIGATIE (desktop: horizontaal, 2 rijen × 44px)
══════════════════════════════════════════════════════ */
#site-nav {
  width: 950px;
  height: 88px;
  background: #efefef;    /* achtergrond container */
  position: relative;
  overflow: visible;
  z-index: 500;
}

/* Bovenste rij: hoofdmenu-items (44px hoog) */
#site-nav ul.menu1 {
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  height: 44px;
  background: transparent;
}

#site-nav ul.menu1 > li {
  position: relative;
}

#site-nav ul.menu1 > li > a,
#site-nav ul.menu1 > li > span.nav-label {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 15px;
  font-family: 'Rokkitt', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #797979;       /* inactief: grijs tekst op transparante achtergrond */
  background: transparent;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  border: none;
  outline: none;
}

#site-nav ul.menu1 > li > a:hover,
#site-nav ul.menu1 > li:hover > a,
#site-nav ul.menu1 > li > a:focus {
  background: #797979;  /* hover → #797979 achtergrond met witte tekst */
  color: #fff;
  text-decoration: none;
}

#site-nav ul.menu1 > li.active > a {
  background: #797979;  /* actief item: #797979 achtergrond met witte tekst */
  color: #fff;
  font-weight: 700;
}

/* Onderste rij: grijze balk (44px), sub-menu verschijnt hier */
#site-nav .sub-bar {
  position: absolute;
  top: 44px;
  left: 0;
  width: 950px;
  height: 44px;
  background: #797979;
}

/* Sub-bar navigatielijst (JS-gegenereerd) */
#site-nav .sub-bar .sub-menu-bar {
  list-style: none;
  display: flex;
  height: 44px;
  margin: 0;
  padding: 0;
}
#site-nav .sub-bar .sub-menu-bar li a {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 14px;
  color: #fff;
  font-family: 'Rokkitt', sans-serif;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
#site-nav .sub-bar .sub-menu-bar li a:hover,
#site-nav .sub-bar .sub-menu-bar li a.sub-active {
  background: #555;
  text-decoration: none;
}

/* Sub-menu: verborgen tot hover op bovenliggende li */
#site-nav ul.menu1 > li .submenu {
  display: none;
  position: absolute;
  top: 44px;       /* verschijnt op onderste rij */
  left: 0;
  min-width: 160px;
  background: #6a6a6a;
  z-index: 600;
  list-style: none;
  padding: 0;
}

/* Geen dropdown bij hover op bovenniveau — subpagina's staan in de sub-bar */
#site-nav ul.menu1 > li:hover .submenu {
  display: none !important;
}

#site-nav ul.menu1 > li .submenu li a {
  display: block;
  padding: 10px 16px;
  font-family: 'Rokkitt', sans-serif;
  font-size: 16px;
  color: #fff;
  background: #6a6a6a;
  white-space: nowrap;
  border-bottom: 1px solid #797979;
}

#site-nav ul.menu1 > li .submenu li a:hover {
  background: #555;
  text-decoration: none;
}

/* Multimove-icoontje in de nav (bovenste rij, rechts) */
#site-nav .nav-icon {
  margin-left: auto;
  display: flex;
  align-items: center;
  padding: 0 8px;
}
#site-nav .nav-icon img {
  height: 40px;
  width: auto;
}
/* Nav-icon <a>: annuleer de basisstijl (height/padding) zodat de <a> het icoon strak omsluit */
#site-nav ul.menu1 > li.nav-icon > a {
  padding: 0;
  height: auto;
}
/* Geen hover/focus/active-highlight op het icoontje — erft anders de grijze stijl van menu-items */
#site-nav ul.menu1 > li.nav-icon > a,
#site-nav ul.menu1 > li.nav-icon:hover > a,
#site-nav ul.menu1 > li.nav-icon > a:hover,
#site-nav ul.menu1 > li.nav-icon > a:focus,
#site-nav ul.menu1 > li.nav-icon > a:active {
  background: transparent !important;
  outline: none;
  box-shadow: none;
}

/* ══════════════════════════════════════════════════════
   HEADER — logo-afbeelding
══════════════════════════════════════════════════════ */
#site-header {
  width: 950px;
  height: 158px;
  background-image: url('https://www.ttcnova.be/onewebmedia/nova_logo.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-color: #efefef;
  position: relative;
}

/* Clubnaam overlay — zelfde tekst als op de live site */
#site-header::before {
  content: 'TTC Nova vzw';
  position: absolute;
  left: 20px;
  top: 38px;
  font-family: 'Rokkitt', 'Helvetica Neue', Helvetica, sans-serif;
  font-size: 40px;
  font-weight: 700;
  color: #797979;
  line-height: 1;
  pointer-events: none;
}

#site-header::after {
  content: 'Tafeltennisclub in Opdorp - Buggenhout';
  position: absolute;
  left: 22px;
  top: 90px;
  font-family: 'Rokkitt', 'Helvetica Neue', Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #b5b5b5;
  line-height: 1;
  pointer-events: none;
}

/* Facebook-icoon in header (rechtsbovenin) */
.header-facebook {
  position: absolute;
  top: 10px;
  right: 10px;
  display: block;
  text-decoration: none !important;
  opacity: 0.85;
}
.header-facebook:hover { opacity: 1; }
.header-facebook img { display: block; }

/* ══════════════════════════════════════════════════════
   CONTENT-WRAPPER — hoofd (740px) + zijbalk (210px)
══════════════════════════════════════════════════════ */
#content-wrap {
  display: flex;
  width: 950px;
  align-items: flex-start;
}

/* ── Hoofd-content ────────────────────────────────────────────── */
#page-content {
  width: 740px;
  flex-shrink: 0;
  padding: 30px 40px 40px 40px;
  background: #efefef;
  border: 1px solid #efefef;
}

/* ── Nieuwsitems ──────────────────────────────────────────────── */
.news-item {
  display: flex;
  gap: 30px;
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid #d8d8d8;
  align-items: flex-start;
}
.news-item:last-of-type {
  border-bottom: none;
}

.news-text {
  width: 325px;
  flex-shrink: 0;
}

.news-text h3 {
  font-weight: 700;
  margin-bottom: 0.3em;
  text-align: justify;
  line-height: 1.2;
}

.news-text p {
  margin-bottom: 0.4em;
  line-height: 1.45;
}

#page-content .news-date,
#page-content .news-text > p:last-child {
  font-size: 14px;
  text-align: right;
  color: #797979;
  margin-bottom: 0;
  margin-top: 0.3em;
}

.news-photo {
  flex: none;
  width: 280px;
  height: 220px;
  background: #d8d8d8;
  overflow: hidden;
}

.news-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Slideshow: alle slides gestapeld, fade in/out via opacity */
.news-slideshow {
  position: relative;
}
.news-slideshow a {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
  display: block;   /* altijd zichtbaar in DOM, JS beheert opacity */
}
.news-slideshow a:first-child {
  opacity: 1;
}
.news-slideshow img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* 2-kolommen slideshow: schuivend venster van 2 foto's naast elkaar (JS beheert left + opacity) */
.news-photos--grid2 {
  position: relative;
  background: #efefef; /* match paginaachtergrond zodat tussenruimte niet opvalt */
}
.news-photos--grid2 a {
  position: absolute;
  top: 0;
  left: 0; /* standaard; JS zet left op juist moment */
  width: calc(50% - 2px);
  height: 100%;
  opacity: 0;
  transition: opacity 0.7s ease;
  display: block;
  overflow: hidden;
}
.news-photos--grid2 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* PK-pagina fotogalerij: zelfde aanpak als .news-slideshow */
.pk-photo-slideshow {
  position: relative;
  width: 100%;
  height: 420px;
  overflow: hidden;
  margin: 1.5em 0;
  background: #222;
}
.pk-photo-slideshow a {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
  display: block;
}
.pk-photo-slideshow a:first-child {
  opacity: 1;
}
.pk-photo-slideshow img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
/* Meer-nieuws link */
.meer-nieuws {
  margin-top: 10px;
  font-size: 16px;
}

/* ── Zijbalk (sidebar) ────────────────────────────────────────── */
#sidebar {
  width: 210px;
  flex-shrink: 0;
  padding: 10px 5px 20px 5px;
  background: #efefef;
}

/* Trooper-advertentie */
.sidebar-trooper {
  display: block;
  width: 200px;
  margin-bottom: 16px;
}
.sidebar-trooper img {
  width: 200px;
  height: auto;
  display: block;
}

/* Sponsors */
.sidebar-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #797979;
  margin-bottom: 8px;
  margin-top: 4px;
}

.sponsor-carousel {
  width: 200px;
  height: 200px;
  overflow: hidden;
  position: relative;
  margin-bottom: 16px;
}

.sponsor-carousel-inner {
  display: flex;
  flex-direction: column;
  transition: transform 0.6s ease;
}

.sponsor-slide {
  width: 200px;
  height: 200px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #efefef;
}

.sponsor-slide img {
  max-width: 180px;
  max-height: 180px;
  object-fit: contain;
  display: block;
}

/* ── Sponsor grid (sponsors.html main content) ────────────────────────── */
.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin: 24px 0;
  align-items: center;
}

.sponsor-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: #efefef;
  min-height: 120px;
}

.sponsor-item img {
  max-width: 100%;
  max-height: 150px;
  object-fit: contain;
  display: block;
}

/* Facebook */
.sidebar-facebook {
  margin-bottom: 12px;
}
.sidebar-facebook a {
  display: inline-block;
}
.sidebar-facebook img {
  width: 32px;
  height: 32px;
}

/* Gezond / Ethisch / Fair play / UiTPAS badges */
.sidebar-badges {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar-badges a {
  display: block;
}
.sidebar-badges img {
  max-width: 200px;
  height: auto;
  display: block;
}

/* Kalender */
.sidebar-calendar {
  margin-top: 4px;
}
.sidebar-calendar iframe {
  border: none;
  display: block;
}

/* ══════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════ */
#site-footer {
  width: 950px;
  background: #efefef;
  border-top: 1px solid #d8d8d8;
  padding: 20px 40px;
  font-size: 14px;
  color: #797979;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

#site-footer h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 0.5em;
}

#site-footer ul {
  list-style: none;
  margin-bottom: 1em;
}

#site-footer li { margin-bottom: 3px; }
#site-footer a { color: #797979; }
#site-footer a:hover { text-decoration: underline; }

.footer-copy {
  width: 100%;
  font-size: 13px;
  margin-top: 8px;
  margin-bottom: 0;
  color: #797979;
}

/* ══════════════════════════════════════════════════════
   GENERIEKE INHOUDS-STIJLEN (voor andere pagina's)
══════════════════════════════════════════════════════ */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1em;
  font-size: 16px;
}
th {
  background: #d8d8d8;
  text-align: left;
  padding: 6px 10px;
  font-weight: 700;
}
td {
  padding: 6px 10px;
  border-bottom: 1px solid #e4e4e4;
}

/* Frenoy-widget gebied */
.tabtjs-wrap { margin-bottom: 2em; }
.tabtjs-wrap h3 {
  font-weight: 700;
  margin-bottom: 0.5em;
  border-bottom: 1px solid #d8d8d8;
  padding-bottom: 0.3em;
}

/* Kalender-pagina embed */
.calendar-wrap { margin: 20px 0; }
.calendar-wrap iframe { border: none; width: 100%; }

/* Sociale-media knoppen */
.social-links { margin-top: 8px; display: flex; gap: 8px; }
.social-links a img { width: 32px; height: 32px; }

/* ══════════════════════════════════════════════════════
   RESPONSIEF — mobiel (max 650px)
   one.com genereert geen mobiele versie automatisch
   voor statische HTML, dus we doen het hier zelf.
══════════════════════════════════════════════════════ */
@media (max-width: 950px) {
  body { min-width: initial; }

  .page-wrap,
  #site-header,
  #site-nav,
  #content-wrap,
  #site-footer {
    width: 100%;
  }

  #site-nav ul.menu1 {
    flex-wrap: wrap;
    height: auto;
    overflow: hidden;
  }

  #site-nav .sub-bar {
    display: none;
  }
}

@media (max-width: 650px) {
  /* Mobiel: hamburger-nav; verberg het horizontale menu */
  #site-nav ul.menu1 {
    display: none;
  }

  #site-nav.mobile-open ul.menu1 {
    display: flex;
    flex-direction: column;
    height: auto;
    overflow: visible;   /* reset overflow: hidden uit het 950px-breakpoint */
    background: #797979;
  }

  #site-nav ul.menu1 > li > a {
    padding: 12px 16px;
    border-bottom: 1px solid #6a6a6a;
    width: 100%;
  }

  #site-nav ul.menu1 > li .submenu {
    position: static;
    display: none;
    background: #555;
  }

  #site-nav ul.menu1 > li.sub-open .submenu {
    display: block !important;  /* override: li:hover .submenu { display: none !important } */
  }

  /* Mobiel menu: tekst altijd wit op grijze achtergrond (was #797979 op #797979 = onzichtbaar) */
  #site-nav.mobile-open ul.menu1 > li > a,
  #site-nav.mobile-open ul.menu1 > li > span.nav-label {
    color: #fff;
  }
  #site-nav.mobile-open ul.menu1 > li > a:hover {
    background: #6a6a6a;
    color: #fff;
  }

  /* Nav-icon (Multimove-afbeelding) verbergen in mobiel klapmenu
     — staat al als tekstlink in de lijst */
  #site-nav ul.menu1 > li.nav-icon {
    display: none;
  }

  /* Hamburger-knop (alleen mobiel zichtbaar) */
  #mobile-nav-bar {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    height: 49px;
    background: #efefef;
    border-bottom: 1px solid #d8d8d8;
    padding: 0 12px;
  }

  #mobile-page-label {
    font-size: 14px;
    color: #797979;
    font-family: 'Rokkitt', sans-serif;
  }

  #mobile-menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  #mobile-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #797979;
  }

  /* Layout: alles stapelen */
  #content-wrap {
    flex-direction: column;
  }

  #page-content {
    width: 100%;
    padding: 20px 16px 30px;
    overflow-x: auto;   /* voorkomt dat brede tabellen buiten beeld lopen */
  }

  .news-item {
    flex-direction: column;
  }

  .news-text {
    width: 100%;
  }

  .news-photo {
    flex: none;        /* voorkom vreemde groeibehavior in kolomrichting */
    width: 100%;
    max-width: 100%;
    min-height: 200px;
  }

  #sidebar {
    width: 100%;
    padding: 20px 16px;
  }

  .sponsor-carousel,
  .sidebar-trooper img {
    width: 100%;
    max-width: 300px;
  }

  .sidebar-calendar iframe {
    width: 100% !important;  /* overschrijft het vaste 200px attribuut in de HTML */
    min-height: 300px;
  }

  #site-footer {
    flex-direction: column;
    padding: 20px 16px;
    gap: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
