/* ==========================================================================
   Variabelen & Basisstijlen
   ========================================================================== */
:root {
  --jp-font-primary: "Verdana", "Arial", sans-serif;
  --jp-font-secondary: "Trebuchet MS", "Verdana", "Arial", sans-serif;
  --jp-color-text: #111;
  --jp-color-link: #093198;
  --jp-color-link-hover: #000000;
  --jp-color-red: #aa0000;
  --jp-color-brown: #574326;
  --jp-color-bg-body-start: #2a3f55; /* Voor gradient body */
  --jp-color-bg-body-end: #223344;   /* Voor gradient body */
  --jp-color-bg-page: #efefee;
  --jp-color-bg-page-grad-light: hsl(0, 0%, 94.5%); /* #f1f1f1 */
  --jp-color-bg-page-grad-dark: hsl(0, 0%, 93.5%); /* #ededed */
  --jp-color-bg-sidebar: #c4c4c4;
  --jp-sidebar-width: 240px;
  --jp-content-max-width: 57em;
  --jp-sidebar-header-height: 70px; /* Geschatte hoogte voor logo + hamburger */
  --jp-sidebar-header-height-small: 60px; /* Voor < 479px */
}

html {
  height: 100%;
  font-size: 100%;
  scroll-behavior: smooth;
  box-sizing: border-box;
}
*, *:before, *:after {
  box-sizing: inherit;
}

body {
  font-family: var(--jp-font-primary);
  margin: 0;
  background-color: var(--jp-color-bg-body-end);
  background-image: linear-gradient(to bottom, var(--jp-color-bg-body-start), var(--jp-color-bg-body-end) 200px);
  background-repeat: no-repeat;
  color: var(--jp-color-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.nav-open {
  overflow: hidden;
}

a { color: var(--jp-color-link); text-decoration: underline; }
a:hover { color: var(--jp-color-link-hover); }

:focus-visible {
  outline: 3px solid var(--jp-color-link);
  outline-offset: 2px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   Layout & Sidebar
   ========================================================================== */
.page-container {
  display: flex; 
  flex-direction: column; 
  flex-grow: 1;
  
  /* DEZE COMBINATIE IS GOUD WAARD: */
  width: 100%;          /* 1. Probeer altijd de volle breedte van het scherm te vullen... */
  max-width: 1280px;    /* 2. ...maar stop als je de 1280px bereikt. */
  
  margin: 0 auto;       /* Centreer het blok op het scherm */

  min-height: 100vh;    /* Sticky footer fix (hoogte) */

  background-color: var(--jp-color-bg-page);
    background-image: linear-gradient(
    to right,
    var(--jp-color-bg-page-grad-light),
    var(--jp-color-bg-page-grad-dark),
    var(--jp-color-bg-page-grad-light)
  );

  position: relative;
}

.main-layout { display: flex; flex-grow: 1; }

/* Sidebar (Desktop): Met achtergrondafbeelding */
.sidebar {
  flex: 0 0 var(--jp-sidebar-width);
  /* DESKTOP ACHTERGROND */
  background: var(--jp-color-bg-sidebar) url(https://www.janpronk.nl/pics/system/jp_background2.png) 0 0 no-repeat;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
 display: flex;
 flex-direction: column;
 align-items: center;
 padding: 10px;
}

.logo-link-sidebar img {
  display: block; border: 0; max-width: 100%; height: auto;
}

nav.main-navigation {
  margin: 0; padding: 0;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.menu-links-wrapper {
 flex-grow: 1;
}

/* Powered-by LOGICA */
.powered-by-desktop-footer {
  display: block;
  font-family: var(--jp-font-secondary);
  font-size: 0.65em;
  padding: 15px 10px; color: #a0a0a0; text-align: center;
  flex-shrink: 0;
  border-top: 1px solid #b0b0b0;
}
.powered-by a { color: #d6d6d6; text-decoration: none; }
.powered-by a:hover { color: #ffffff; text-decoration: underline; }

.powered-by-mobile-nav {
   display: none;
   padding: 15px 10px;
   text-align: center;
   font-size: 0.8em;
   color: #d6d6d6;
   border-top: 1px solid rgba(255,255,255,0.1);
   margin-top: auto;
   flex-shrink: 0;
   background-color: #333; /* Donkere achtergrond voor footer in wit menu */
}


/* ==========================================================================
   Hamburger Menu Knop
   ========================================================================== */
.hamburger-menu {
  display: none;
  padding: 8px; margin: 10px 0;
  background-color: rgba(255,255,255, 0.6);
  border: 1px solid #888; border-radius: 4px;
  cursor: pointer;
  position: relative; /* Nodig voor z-index */
  z-index: 1101; /* Zorg dat knop boven header is */
}
.hamburger-box { width: 28px; height: 20px; display: inline-block; position: relative; }
.hamburger-inner, .hamburger-inner::before, .hamburger-inner::after {
  width: 28px; height: 3px; background-color: var(--jp-color-brown);
  border-radius: 3px; position: absolute; transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;
}
.hamburger-inner { top: 50%; transform: translateY(-50%); margin-left: -1em; }
.hamburger-inner::before, .hamburger-inner::after { content: ""; display: block; }
.hamburger-inner::before { top: -8px; }
.hamburger-inner::after { bottom: -8px; }

.hamburger-menu[aria-expanded="true"] .hamburger-inner { transform: rotate(45deg); }
.hamburger-menu[aria-expanded="true"] .hamburger-inner::before { top: 0; opacity: 0; }
.hamburger-menu[aria-expanded="true"] .hamburger-inner::after { bottom: 0; transform: rotate(-90deg); }

/* ==========================================================================
  Hoofdinhoud & Artikelen
   ========================================================================== */
main.content-area {
  flex-grow: 1; display: flex; flex-direction: column;
  position: relative; overflow-x: hidden;
}

main.content-area::before {
  content: "Jan Pronk";
  position: absolute; top: 70px; left: 30px; font-size: 6em; font-weight: bold;
  color: rgba(0, 0, 0, 0.02); z-index: 0;
  pointer-events: none; user-select: none; white-space: nowrap;
}

.top-content-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 15px 5px 15px; flex-wrap: wrap; gap: 10px;
}
nav.breadcrumbs { flex-grow: 1; font-size: 0.85em; }
nav.breadcrumbs a { color: #b04040; }
.search-form-container input[type="text"] {
    font-size: 0.9em; border: 1px solid #606060; background: #ede8e0; padding: 3px 5px;
}
.search-form-container input[type="submit"] {
    font-size: 0.9em; padding: 3px 7px; cursor: pointer;
}

article.page-content { flex-grow: 1; }

header.page-header {
  padding: 5px 0 0 10px; margin: 0 15px;
  background: url(pics/system/jp_title.png) 0 0 no-repeat;
  position: relative; z-index: 1; min-height: 35px;
}
header.page-header h1 {
  font: normal normal 600 1.8em var(--jp-font-primary);
  color: var(--jp-color-brown); letter-spacing: -0.02em;
  line-height: 1.1; margin: 0; padding: 0;
}

.chapeau-container {
  padding: 0 0 0 10px; margin: 10px 15px 15px 15px;
  position: relative; z-index: 1;
}
.chapeau-container .chapeau, .chapeau-container h2 {
  font: italic normal 400 1.0em var(--jp-font-primary);
  color: var(--jp-color-brown); letter-spacing: -0.02em;
  line-height: 1.2; padding-left: 0.2em; margin: 0;
}

.entry-content {
  padding: 5px 25px 30px 25px;
  font-size: 0.85em;
  max-width: var(--jp-content-max-width);
  line-height: 1.5;
  position: relative; z-index: 1;
  margin-right: auto;
}
.entry-content img {
  border: solid #b0b0b0 0px; max-width: 100%; height: auto !important;
  margin: 0em 0.5em -0.25em 0em; object-fit: scale-down;
}
.entry-content img.pdf2 {
  border: 0 !important; width: auto; max-width: 24px; display: inline-block; vertical-align: bottom;
}
.entry-content table { font-size: 0.95em; margin: 1.5em auto; border-collapse: collapse; width: auto; max-width: 100%; }
.entry-content th, .entry-content td { border: 1px solid #ccc; padding: 0.4em 0.6em; text-align: left; }
.entry-content th { background-color: #f0f0f0; font-weight: bold; }
blockquote { border-left: 4px solid #d0d0d0; padding: 0.5em 1em; margin: 1em 0 1em 1em; font-style: italic; color: #555; }
h3 { color:var(--jp-color-red); font-size: 1.4em; margin: 1.5em 0 0.7em 0; }

/* ==========================================================================
   Navigatie Menu Items (Desktop)
   ========================================================================== */

.main-navigation .main-menu-list,
.main-navigation .submenu {
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-navigation li a {
  display: block;
  text-decoration: none;
  border-top: 1px solid #ffffff;
  padding-right: 0.5em;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.main-navigation li a:hover {
  text-decoration: underline;
  color: var(--jp-color-link-hover);
  background-color: rgba(0,0,0,0.05);
}
.main-navigation li.depth1 > a {
  font-size: 0.95em;
  color: var(--jp-color-brown);
  padding: 0.35em 0.5em 0.35em 0.5em;
  line-height: 1.2;
  letter-spacing: 0.02em;
}
.main-navigation li.depth1.selected > a,
.main-navigation li.depth1 > a.selected {
  color: var(--jp-color-link-hover);
  text-decoration: underline;
  font-weight: bold;
  background-color: rgba(0,0,0,0.03);
  font-size:0.9em;
  padding-left: 0.5em;
}
.main-navigation li.depth2 > a {
  font-size: 0.85em;
  color: var(--jp-color-link);
  padding: 0.3em 0.5em 0.3em 1.5em;
  line-height: 1.2;
}
.main-navigation li.depth2.selected > a,
.main-navigation li.depth2 > a.selected {
  color: var(--jp-color-link-hover);
  text-decoration: underline;
  font-weight: bold;
  background-color: rgba(0,0,0,0.03);
  font-size:0.8em;
  padding-left: 1.5em;
}
.main-navigation li.depth3 > a {
  font-size: 0.75em;
  color: var(--jp-color-link);
  font-weight: normal;
  padding: 0.3em 0.5em 0.3em 2.5em;
}
.main-navigation li.depth3.selected > a,
.main-navigation li.depth3 > a.selected {
   color: var(--jp-color-link-hover);
   text-decoration: underline;
   font-weight: bold;
   background-color: rgba(0,0,0,0.03);
   font-size:0.7em;
   padding-left: 2.5em;
}

/* ==========================================================================
   Tabs, Footer, Utilities, Code etc.
   ========================================================================== */
ul.tabs { list-style:none; margin:0 !important; padding:0; border-bottom:1px solid #999; height:26px; overflow: visible; position: relative; z-index: 2; }
ul.tabs li { float:left; text-indent:0; padding:0; margin:0 !important; list-style-image:none !important; position: relative; }
ul.tabs a { font-size:0.9em; letter-spacing: -0.05em; display:block; height: 25px; line-height:25px; text-align:center; text-decoration:none; padding:0px 10px; margin:0px; position:relative; top:1px; border: 1px solid #999; border-bottom: none; background-color: #ddd; color: var(--jp-color-text); margin-right: 2px; border-radius: 4px 4px 0 0;}
ul.tabs a:hover { background-color: #ccc; }
ul.tabs a.current, ul.tabs a.current:hover, ul.tabs li.current a { background-color: #fff; color:var(--jp-color-red) !important; position: relative; z-index: 3; border-bottom-color: #fff; cursor:default !important;}

.panes div, .panes .pane { display: none; padding:15px 10px; border:1px solid #999; font-size: 0.95em; background-color:#fff; position: relative; z-index: 1; border-top: none;}

/* Footer */
footer.site-footer {
  font-size: 0.7em; border-top: solid #b0b0b0 1px;
  margin: 0 15px 0 calc(var(--jp-sidebar-width) + 15px);
  padding: 15px 0; color: #b0b0b0; text-align: center; flex-shrink: 0;
}
footer.site-footer p { margin: 0; }

.Code1, .Code2 { border: 1px solid #000000; padding: 10px 15px; font-family: 'Courier New', Monospace; font-size: 0.85em; display: block; white-space: pre-wrap; word-wrap: break-word; margin: 1em 0; border-radius: 4px; line-height: 1.4; }
.Code1 { background-color: #e1e1e1; color: #000066; border-color: #ccc; }
.Code2 { background-color: #a8906c; color: #fff; border-color: #8b7355; }

input.hidden {
    opacity: 0;           /* Make it transparent */
    position: absolute;   /* Take it out of the document flow */
    top: 0;
    left: 0;
    height: 0;            /* Give it no size */
    width: 0;
    z-index: -1;          /* Put it behind everything else */
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
  :root {
    --jp-color-text: #000000;
    --jp-color-link: #000000;
  }
  html, body {
    background: #ffffff !important; color: var(--jp-color-text) !important;
    font-family: "Times New Roman", Times, serif; font-size: 11pt;
    margin: 1cm; height: auto; min-height: 0;
  }
   .page-container { max-width: none; background: none !important; box-shadow: none; border: none; }
   main.content-area::before { display: none !important; }
   .sr-only, .sidebar, .hamburger-menu,
   .top-content-bar .search-form-container, nav.main-navigation,
   .powered-by, ul.tabs, .panes, img.noprint-class,
   footer.site-footer .powered-by
  { display: none !important; }
   main.content-area { padding: 0; width: 100% !important; }
}

/* ==========================================================================
   Responsive Styles (MOBIEL)
   ========================================================================== */
@media (max-width: 767px) {
  /* Sidebar container op mobiel: alleen voor header, geen eigen achtergrond */
  .sidebar {
    flex-basis: auto !important;
    width: 100% !important;
    flex-grow: 0; flex-shrink: 0; min-width: 0;
    position: relative;
    z-index: 1100; /* Container voor header moet boven nav */
    background: none !important; /* Verwijder desktop achtergrond */
  }

  /* Header: Wit, netjes afgescheiden, logo klein */
  .sidebar-header {
      flex-direction: row;
      justify-content: space-between;
      align-items: center;
      width: 100%;
      padding: 5px 10px;
      min-height: var(--jp-sidebar-header-height);
      position: relative;
      z-index: 1100;
      background: #ffffff; /* Wit in plaats van grijs */
      border-bottom: 1px solid #ccc; /* Scheidingslijn */
  }
  
  /* Logo kleiner maken op mobiel */
  .logo-link-sidebar img {
    height: 50px;       /* Vaste hoogte, past in de balk */
    width: auto;        /* Breedte schaalt mee */
    max-width: 100%;
    object-fit: contain;
    margin: 0;
    display: block;
  }

  .hamburger-menu {
    display: block;
    margin: 0;
    cursor: pointer;
  }

   .powered-by-desktop-footer { display: none !important; }
   .powered-by-mobile-nav { display: block !important; }

  /* Navigatie (gesloten): standaard verborgen */
  nav.main-navigation {
    display: none;
    position: fixed;
    left: 0;
    width: 100vw;
    z-index: 1050;
    overflow-y: auto;
    flex-grow: 0;
    flex-direction: column;
  }
  
  /* Navigatie (open): Wit achtergrond, geen foto meer */
   nav.main-navigation.is-open {
      display: flex !important;
      top: var(--jp-sidebar-header-height); /* Start onder header */
      height: calc(100vh - var(--jp-sidebar-header-height));
      
      background-color: #ffffff; /* Wit achtergrond voor leesbaarheid */
      /* Oude foto verwijderd: background-image: ...; */
      border-top: 1px solid #eee;
   }

  /* Links binnen mobiele nav: Donkere tekst op wit */
  .main-navigation li a {
    padding: 12px 15px !important;
    border-top: none;
    border-bottom: 1px solid #f0f0f0; /* Lichte scheidingslijntjes */
    font-size: 1em;
    color: #333333; /* Donkergrijs voor leesbaarheid */
    background-color: #ffffff;
    text-decoration: none;
  }
  .main-navigation li a:hover {
      background-color: #f9f9f9;
      color: var(--jp-color-link-hover);
  }
  .main-navigation li.selected > a,
  .main-navigation li > a.selected {
    font-weight: bold;
    background-color: #f0f0f0;
  }
  
  .main-navigation .rss-feed-link {
    display: block;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
  }
  .main-navigation .rss-feed-link img {
      display: inline-block;
      vertical-align: middle;
      margin: 0;
  }

  .main-layout { flex-direction: column; }

  main.content-area::before {
    font-size: 2.8em; top: 30px; left: 10px;
  }
  .top-content-bar {
    flex-direction: column; align-items: stretch; padding: 10px;
  }
  nav.breadcrumbs { margin-bottom: 10px; font-size: 0.8em; }
  .search-form-container { margin-left: 0; width: 100%; }
  .search-form-container input[type="text"] {
    width: 100%; margin-bottom: 5px;
  }

  header.page-header {
    margin: 0 10px;
    background-size: contain;
    min-height: 40px;
    padding-top: 2px;
  }
  header.page-header h1 { font-size: 1.4em; line-height: 1.2;}
  .chapeau-container { margin: 5px 10px 10px 10px; }

  .entry-content {
    padding: 0 15px 20px 15px;
    font-size: 0.9em;
    max-width: none;
  }

  footer.site-footer {
    margin: 0 10px; padding: 15px 10px; font-size: 0.75em;
  }

  /* Tabs aanpassing voor mobiel */
  ul.tabs { height: auto; border-bottom: none; }
  ul.tabs li { float: none; width: 100%; }
  ul.tabs a, ul.tabs a.s, ul.tabs a.l, ul.tabs a.xl {
    width: 100% !important; text-align: left;
    padding: 10px 15px; background-image: none !important;
    background-color: #e9e9e9; color: var(--jp-color-text) !important;
    border-bottom: 1px solid #ccc;
    height: auto; line-height: 1.4; top: 0;
    border-radius: 0;
    margin-right: 0;
  }
  ul.tabs li:first-child a { border-radius: 4px 4px 0 0; }
  ul.tabs li:not(:first-child) a { border-top: none; }
  ul.tabs a.current, ul.tabs a.current:hover, ul.tabs li.current a {
    background-color: #fff !important; color: var(--jp-color-red) !important;
    border-bottom-color: #ccc;
  }
   .panes div, .panes .pane {
     border-top: 1px solid #999;
     border-left: 1px solid #999;
     border-right: 1px solid #999;
     border-bottom: 1px solid #999;
     border-radius: 0 0 4px 4px;
     margin-top: -1px;
  }

} /* Einde @media (max-width: 767px) */

@media (max-width: 479px) { /* Extra kleine schermen */
  .sidebar-header {
    min-height: var(--jp-sidebar-header-height-small);
  }

  nav.main-navigation.is-open {
    top: var(--jp-sidebar-header-height-small);
    height: calc(100vh - var(--jp-sidebar-header-height-small));
  }

  /* Logo nog iets kleiner op hele kleine schermen */
  .logo-link-sidebar img {
    height: 40px; 
  }
  main.content-area::before {
    font-size: 2em;
  }
  header.page-header h1 { font-size: 1.25em; }
}