/* ==========================================================================
   PRO-GEN WEBSITE THEME - NAVY BLUE THEMA
   ========================================================================== */

:root {
  --pg-font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pg-font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --pg-white: #f7f9fc;
  --pg-bg: #e9eff7;
  --pg-bg-light: #f1f5fb;
  --pg-border: #102b5c;
  --pg-border-light: #3d5fa3;
  --pg-text: #233b5e;
  --pg-text-light: #4e6a93;
  --pg-accent: #3f68a3;
  --pg-accent-light: #6f92c2;
  --pg-hover: #dce6f8;
}

/* ==========================================================================
   BASIS STIJLEN - Reset en fundamentele elementen
   ========================================================================== */

html { 
  margin: 0; 
  padding: 0; 
  overflow-x: hidden; 
}

body {
  background: var(--pg-bg);
  color: var(--pg-text);
  margin: 0;
  line-height: 1.6;
  font-family: var(--pg-font-sans);
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   HEADER & NAVIGATIE - Bovenste gedeelte van de website
   ========================================================================== */

header {
  background: var(--pg-white);
  text-align: center;
  padding: 25px 0;
  border-bottom: 1px solid var(--pg-border);
}

header h1 {
  font-size: clamp(1.8rem, 2.5vw + 1rem, 2.6rem);
  margin: 0;
  font-weight: 700;
}

nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  background: var(--pg-white);
  border-bottom: 1px solid var(--pg-border);
}

.subnav { 
  display: flex;
  justify-content: center;
  background: var(--pg-bg-light);
  font-size: 0.95rem; 
  border-bottom: 1px solid var(--pg-border);
}

nav a, .subnav a {
  text-decoration: none;
  padding: 16px 24px;
  display: block;
  transition: all 0.2s ease;
}

.subnav a { 
  padding: 12px 18px; 
  color: var(--pg-text-light);
}

/* ==========================================================================
   INTERACTIEVE STATES - Hover en active states
   ========================================================================== */

nav a:hover, 
.subnav a:hover {
  background: var(--pg-hover);
  color: var(--pg-text);
}

nav a.active, 
.subnav a.active {
  background: var(--pg-hover);
  color: var(--pg-text);
  font-weight: 600;
}

/* ==========================================================================
   HOOFDCONTENT - Main content gebied
   ========================================================================== */

main {
  max-width: 900px;
  margin: 40px auto;
  background: var(--pg-white);
  padding: 40px;
  border: 1px solid var(--pg-border);
}

/* ==========================================================================
   CONTENT BLOKKEN - Gestructureerde content containers
   ========================================================================== */

.pg-block {
  background: var(--pg-bg-light);
  border-left: 1px solid var(--pg-accent);
  margin-bottom: 20px;
  padding: 20px;
}

/* KLEINERE .pg-subblock voor entiteit info - GECENTREERD */
.pg-subblock {
  background: var(--pg-bg-light);
  border: 1px solid var(--pg-border);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 10px auto 20px auto;
  /* max-width: 480px; */
  line-height: 1.5;
}

/* ==========================================================================
   TABELLEN - Data presentatie en agenda functionaliteit
   ========================================================================== */

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--pg-white);
  border: 1px solid var(--pg-border);
  font-variant-numeric: tabular-nums;
  margin: 1rem 0;
}

table thead th {
  background: var(--pg-hover);
  text-align: left;
  font-weight: 600;
  padding: 14px 16px;
  border-bottom: 1px solid var(--pg-border);
}

table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--pg-border-light);
}

table tbody tr:hover td { 
  background: var(--pg-hover); 
}

table.agenda thead th { 
  background: var(--pg-bg); 
}

table.agenda tbody tr:nth-child(even) { 
  background: var(--pg-bg-light); 
}

/* ==========================================================================
   LINKS & INTERACTIEVE ELEMENTEN
   ========================================================================== */

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

a:hover { 
  text-decoration-thickness: 2px; 
  font-weight: 500;
}

/* ==========================================================================
   TECHNISCHE & SPECIALE ELEMENTEN
   ========================================================================== */

code, pre, kbd, samp { 
  font-family: var(--pg-font-mono); 
}

.mt .wnd-type-image img,
.pg-card img, 
.pg-person img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--pg-border);
}

/* ==========================================================================
   ACCORDION COMPONENT - Voor lidmaatschap.html
   ========================================================================== */

.pg-acc details {
  background: var(--pg-bg-light);
  border: 1px solid var(--pg-border);
  border-left: 3px solid var(--pg-accent);
  border-radius: 6px;
  padding: .6rem .9rem;
  margin: .8rem 0;
}

.pg-acc details > summary {
  font-weight: bold;
  cursor: pointer;
  list-style: none;
}

.pg-acc details > summary::before {
  content: "▸";
  margin-right: .5rem;
  transition: transform .2s ease;
}

.pg-acc details[open] > summary::before { 
  transform: rotate(90deg); 
}

/* ==========================================================================
   FOOTER - Onderste gedeelte van de website
   ========================================================================== */

footer {
  text-align: center;
  font-size: 13px;
  color: var(--pg-text-light);
  padding: 14px;          /* 1 regelhoogte binnenruimte onderaan de footer*/
  margin: 14px;           /* 1 regelhoogte binnenruimte bovenaan de footer */
  border-top: 1px solid var(--pg-border);
  background: var(--pg-bg-light);
}

/* ==========================================================================
   RESPONSIVE DESIGN - Mobile en tablet aanpassingen
   ========================================================================== */

@media (max-width: 768px) {
  nav, .subnav { 
    flex-direction: column; 
    text-align: center; 
  }
  
  nav a { 
    padding: 14px; 
  }
  
  .subnav a { 
    padding: 10px 14px; 
  }
  
  main { 
    padding: 24px; 
    margin: 20px; 
  }
}

@media (max-width: 480px) {
  main { 
    margin: 10px; 
    padding: 18px;
  }
  
  body { 
    font-size: 15px; 
  }
}

/* Download knoppen*/
.pg-button-navy {
  display: inline-block;
  background: #3f5e86;
  color: #ffffff;
  padding: 12px 24px;
  margin: 10px 0 20px 0;
  border-radius: 5px;
  text-decoration: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
}

.pg-button-navy:hover {
  background: #2c4766;
  color: #cdd7e5;
}

/* Teller blok */
.visitor-counter {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  font-size: 0.85rem;
  color: var(--pg-text-light);
  background: #FAFBFD;
  border: 1px solid rgba(16, 43, 92, 0.40);
  border-radius: 4px;
  white-space: nowrap;
}

/* Mobiele optimalisatie voor de agenda-tabel */
@media (max-width: 600px) {
  table.agenda {
    table-layout: fixed;
    width: 100%;
  }

  table.agenda th,
  table.agenda td {
    word-wrap: break-word;
    white-space: normal;
    padding: 6px 4px;
  }

  table.agenda th:nth-child(1),
  table.agenda td:nth-child(1) {
    width: 22%;
  }

  table.agenda th:nth-child(2),
  table.agenda td:nth-child(2) {
    width: 42%;
  }

  table.agenda th:nth-child(3),
  table.agenda td:nth-child(3) {
    width: 18%;
  }

  table.agenda th:nth-child(4),
  table.agenda td:nth-child(4) {
    width: 18%;
  }
}

/* Aanpassing voor iPhone */
@media (max-width: 600px) {
  table.historiek th {
    font-size: 0.8rem;
  }
}

/* Intro-kader */
#intro {
  background: var(--pg-bg-light);
  border: 1px solid var(--pg-border);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 10px 0 20px 0;
}

#intro p {
  margin: 4px 0;
}

/* Mobiele optimalisatie voor de historiek-tabel */
@media (max-width: 600px) {
  table.historiek {
    table-layout: fixed;
    width: 100%;
  }

  table.historiek th,
  table.historiek td {
    white-space: normal;
    word-wrap: break-word;
    padding: 6px 4px;
    font-size: 0.85rem;
  }

  table.historiek th:nth-child(1),
  table.historiek td:nth-child(1) {
    width: 14%;
  }

  table.historiek th:nth-child(2),
  table.historiek td:nth-child(2) {
    width: 14%;
  }

  table.historiek th:nth-child(3),
  table.historiek td:nth-child(3) {
    width: 22%;
  }

  table.historiek th:nth-child(4),
  table.historiek td:nth-child(4) {
    width: 20%;
  }

  table.historiek th:nth-child(5),
  table.historiek td:nth-child(5) {
    width: 30%;
  }
}

/* ==========================================================================
   QR CODE STYLING
   ========================================================================== */

.pg-qr-container {
  border: 1px solid var(--pg-border);
  background: var(--pg-bg-light);
  border-radius: 8px;
  padding: 14px;
  margin: 20px auto;
  max-width: 400px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
}

.pg-qr-item {
  margin: 0;
  text-align: center;
}

.pg-qr-item img {
  width: 150px;
  height: 150px;
  display: block;
  margin: 0 auto;
  margin-bottom: 5px;
}

.pg-qr-item p {
  margin: 0;
  font-size: 0.9em;
  font-weight: bold;
}

/* Kleinere QR codes op mobile */
@media (max-width: 480px) {
  .pg-qr-container {
    flex-direction: column;
    gap: 12px;
    padding: 10px;
    max-width: 320px;
  }
  
  .pg-qr-item img {
    width: 100px;
    height: 100px;
  }
  
  .pg-qr-item p {
    font-size: 0.8em;
  }
}

/* ==========================================================================
   CARD LAYOUT - Voor bestuursleden en team presentatie
   ========================================================================== */

.pg-cards { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); 
  gap: 30px;  /* MEER RUIMTE TUSSEN CARDS */
  margin: 30px 0;
}

.pg-card { 
  background: var(--pg-bg-light); 
  border-radius: 10px; 
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 20px; 
  text-align: center; 
  border: 1px solid var(--pg-border-light);  /* NORMAAL BORDER */
}

.pg-card img { 
  width: 110px; 
  height: 110px; 
  object-fit: cover; 
  border-radius: 50%; 
  border: 2px solid var(--pg-border-light); 
  margin-bottom: 12px; 
}

.pg-card h4 { 
  margin: 5px 0 2px; 
  font-size: 1.2em; 
  color: var(--pg-text);
}

.pg-role { 
  color: var(--pg-text); 
  font-weight: bold; 
  margin-bottom: 8px; 
}

.pg-card p {
  margin: 8px 0;
  line-height: 1.4;
}

/* Responsive design voor cards */
@media (max-width: 768px) {
  .pg-cards {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  
  .pg-card {
    padding: 18px;
  }
}

/* FIX VOOR SMALLE KADERS OP MOBILE */
@media (max-width: 480px) {
  main { 
    margin: 10px; 
    padding: 18px; 
    max-width: none; /* VOEG DIT TOE */
    width: auto;     /* VOEG DIT TOE */
  }
  
  body { 
    font-size: 15px; 
  }
  
  /* ZORG DAT SUBBLOCKS NIET TE SMAL WORDEN */
  .pg-subblock {
    max-width: none;
    margin: 10px 0 20px 0;
  }
  
  /* ZORG DAT CARDS NIET TE SMAL WORDEN */
  .pg-cards {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .pg-card {
    min-width: 0; /* ZORG DAT CARDS KUNNEN KRIMMEN */
  }
}

/* EXTRA FIX VOOR KLEINE SCHERMEN */
@media (max-width: 360px) {
  main {
    margin: 5px;
    padding: 15px;
  }
  
  .pg-card {
    padding: 15px;
  }
  
  .pg-subblock {
    padding: 12px;
  }
}

/* FORCEER ALTIJD VERTICALE SCROLLBAR - FIX VOOR SCHUIVEN SCHERM */
html {
  overflow-y: scroll !important;
  height: 100%;
}

body {
  min-height: 100vh;
  scrollbar-gutter: stable both-edges;
}

/* OPTIONEEL: Zorg voor consistente scrollbar across browsers */
::-webkit-scrollbar {
  width: 16px;
}

::-webkit-scrollbar-track {
  background: var(--pg-bg-light);
}

::-webkit-scrollbar-thumb {
  background: var(--pg-border-light);
  border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--pg-accent);
}

/* Extra software voor PG */

.pg-subblock .pg-program-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-weight: bold !important;
    color: var(--pg-border) !important;
    margin-bottom: 6px !important;
    width: 100%;
}

.pg-subblock .pg-program-header div {
    margin: 2px 0 !important;
    font-weight: bold !important;
}

/* Kleiner lettertype in de tabellen */
.kleiner-tekst {
  font-size: 0.8em; /* Of een andere gewenste grootte */
}

/* Download knop (blauw) */
.pg-button-blue {
    display: inline-block;
    background-color: var(--pg-accent, #3f5e86); /* PRO-GEN blauw */
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.2s;
}

.pg-button-blue:hover {
    background-color: #2d4562;
}

/* ==========================================================================
   MOBIELE OPTIMALISATIE UTILITIES TABEL (iPhone + Android) - FIX VOOR 'EÉN SCHERM'
   ========================================================================== */
@media (max-width: 768px) {
  
  /* BELANGRIJK: Zorg dat de container GEEN scrollbar toont */
  .table-responsive {
      overflow-x: hidden !important; 
      display: block !important;
      width: 100%;
  }

  /* BELANGRIJK: Dwing de tabel om de breedte van de container aan te nemen en layout te fixen */
  .table-responsive table {
      width: 100% !important; 
      table-layout: fixed !important; /* Dwingt de breedte te respecteren */
  }

  /* Zorg dat alle inhoud afbreekt en de tekstgrootte klein is */
  .table-responsive table td, 
  .table-responsive table th {
      white-space: normal !important; /* Tekst mag afbreken */
      word-break: break-word !important; /* Dwingt afbreking van lange woorden/links */
      font-size: 0.7em; /* Maak het lettertype kleiner op mobiel */
      padding: 6px; /* Kleinere padding */
  }

  /* Instellingen voor specifieke kolommen om de ruimte te verdelen */
  /* Gebaseerd op de 5 kolommen: Nr, Programma, Omschrijving, Actie, Auteur */
  
  /* Kolom 1 (Nr.) */
  .table-responsive table td:nth-child(1), 
  .table-responsive table th:nth-child(1) {
      width: 5%; 
  }

  /* Kolom 2 (Programma) */
  .table-responsive table td:nth-child(2), 
  .table-responsive table th:nth-child(2) {
      width: 18%; 
  }

  /* Kolom 3 (Omschrijving) */
  .table-responsive table td:nth-child(3), 
  .table-responsive table th:nth-child(3) {
      width: 45%; 
  }

  /* Kolom 4 (Actie - De kolom met lange links, zoals Programma 32) */
  .table-responsive table td:nth-child(4), 
  .table-responsive table th:nth-child(4) {
      width: 17%; 
  }
  
  /* Kolom 5 (Auteur) */
  .table-responsive table td:nth-child(5), 
  .table-responsive table th:nth-child(5) {
      width: 15%; 
  }
  
  /* Fix voor de links in de 'Actie' kolom (Programma 32) */
  .table-responsive table tbody tr td:nth-child(4) a {
      display: block; /* Maakt de link een blok-element */
      word-break: break-all; /* Extra agressieve afbreking voor de linktekst */
      font-size: 0.8em; 
      line-height: 1.1; 
  }
}

/* ==========================================================================
   MOBIELE OPTIMALISATIE PG-COLOR SKINS TABEL (5 Kolommen)
   ========================================================================== */
@media (max-width: 768px) {
    
    /* Zorg dat de wrapper de overflow verbergt om de schuifbalk te verwijderen */
    .pg-color-table-wrapper {
        overflow-x: hidden !important; 
        width: 100%;
    }

    /* Dwing de tabel om de breedte van de container aan te nemen en layout te fixen */
    .pg-color-table {
        width: 100% !important; 
        table-layout: fixed !important; 
    }

    /* Zorg dat alle tekst in de cellen afbreekt en kleiner is */
    .pg-color-table td, 
    .pg-color-table th {
        white-space: normal !important;
        word-break: break-word !important;
        font-size: 0.75em; 
        padding: 6px 3px; 
        text-align: center;
    }
    
    .pg-color-table th {
        text-align: center;
    }

    /* Kolombreedtes: 5% | 35% | 20% | 20% | 20% = 100% */
    
    /* Kolom 1: # */
    .pg-color-table td:nth-child(1), 
    .pg-color-table th:nth-child(1) {
        width: 5%; 
    }

    /* Kolom 2: Skin (Naam + Voorbeeld link) */
    .pg-color-table td:nth-child(2), 
    .pg-color-table th:nth-child(2) {
        width: 35%; 
    }
    
    /* Kolom 3, 4, 5: Kopieer 1, 2, 3 */
    .pg-color-table td:nth-child(3), 
    .pg-color-table th:nth-child(3),
    .pg-color-table td:nth-child(4), 
    .pg-color-table th:nth-child(4),
    .pg-color-table td:nth-child(5), 
    .pg-color-table th:nth-child(5) {
        width: 20%; 
    }
    
    /* Forceer afbreking van lange linktekst zoals de voorbeeld-URL's */
    .pg-color-table a {
        word-break: break-all;
        font-size: 0.9em; 
        line-height: 1.1;
    }
}

/* 
   Nieuwsflash-badges
   - Actief: rood
   - Inactief: licht en niet klikbaar
*/
.nieuwsflash-badge {
  display: inline-block;
  padding: 2px 6px;
  font-size: 0.75em;
  font-weight: 600;
  color: #fff;
  background-color: #cc3333;
  border-radius: 3px;
  line-height: 1;
}

.nieuwsflash-badge:hover {
  background-color: #a94442;
}

/* Inactieve badges */
.nieuwsflash-badge.inactief {
  background-color: #f0caca;
  color: #a94442;
  cursor: default;
}

/* Rechts uitlijnen van blok */
.nf-rechts {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

