/*
Theme Name: Fotoarchief Woensel
Theme URI: https://www.fotoarchiefwoensel.nl
Author: Joost van Heel
Author URI: https://www.fotoarchiefwoensel.nl
Description: Thema voor fotoarchiefwoensel.nl in de kleuren van het oude Woensel-wapen (blauw #1D3A6B, goud #D4A01F): banner bovenaan, vast linkermenu met widgets boven en onder het menu, witte achtergrond en footer, zwarte TablePress-paginanummers, fotoraster met bijschriften.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fotoarchiefwoensel
*/

:root {
  --blauw: #1d3a6b;         /* schildblauw (achtergrond menu, titels, links) */
  --goud: #d4a01f;          /* goud/oker van de jachthoorns (accenten) */
  --schaduw: #1d3a6b;       /* schaduwrand rond het menu */
  --wit: #ffffff;
  --tekst: #1a1a1a;
  --zijbalk: 300px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0 0 0 var(--zijbalk);
  background: var(--wit);
  color: var(--tekst);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
img, video, iframe { max-width: 100%; height: auto; }
a { color: var(--blauw); text-decoration: underline; text-underline-offset: 3px; }
a:hover, a:focus { color: #0f2347; text-decoration-thickness: 2px; }
.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal;
}
.skip-link:focus {
  clip: auto; clip-path: none; height: auto; width: auto; margin: 0; padding: 12px 18px;
  background: var(--wit); color: var(--blauw); z-index: 100000; top: 8px; left: 8px;
}

/* ===== Linkermenu (zijbalk) ===== */
.zijbalk {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--zijbalk);
  background: var(--blauw);
  color: var(--wit);
  overflow-y: auto; overflow-x: hidden;
  z-index: 1000;
  box-shadow: 4px 0 12px rgba(29, 58, 107, .45); /* schaduwrand #1d3a6b */
  /* dunne witte scrollbar rechts */
  scrollbar-width: thin;
  scrollbar-color: var(--wit) transparent;
}
.zijbalk::-webkit-scrollbar { width: 6px; }
.zijbalk::-webkit-scrollbar-track { background: transparent; }
.zijbalk::-webkit-scrollbar-thumb { background: var(--wit); border-radius: 3px; }
.zijbalk-inner { padding: 28px 26px 40px; }
.zijbalk a { color: var(--wit); text-decoration: none; }

/* Banner bovenaan de pagina */
.site-header { background: var(--wit); padding: 24px 48px 0; }
.site-branding .custom-logo-link { display: block; }
.site-branding img, .site-branding .custom-logo { display: block; width: 100%; max-width: 1029px; height: auto; }
.site-title { margin: 0; font-size: 36px; line-height: 1.2; font-weight: 700; font-style: italic; }
.site-title a { color: var(--blauw); text-decoration: none; }
.site-description { margin: 10px 0 0; font-size: 18px; color: var(--tekst); }
.zijbalk-inner { padding-top: 28px; }
.zijbalk-widgets-onder { margin: 26px 0 0; padding: 22px 0 0; border-top: 1px solid var(--goud); border-bottom: 0; }
.zijbalk-widgets iframe { width: 100%; border: 0; background: var(--wit); }
.zijbalk .hoofdmenu { margin-top: 0; }

/* Widgets boven het menu */
.zijbalk-widgets { margin-bottom: 26px; padding-bottom: 22px; border-bottom: 1px solid var(--goud); }
.zijbalk-widgets .widget { margin: 0 0 22px; font-size: 15px; line-height: 1.5; }
.zijbalk-widgets .widget:last-child { margin-bottom: 0; }
.zijbalk-widgets .widget-title {
  margin: 0 0 10px; padding: 0 0 6px;
  font-size: 13px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700;
  color: var(--goud); background: transparent; border-bottom: 1px solid var(--goud);
}
.zijbalk-widgets ul { list-style: none; margin: 0; padding: 0; }
.zijbalk-widgets li { margin: 0 0 6px; }
.zijbalk-widgets input[type="search"], .zijbalk-widgets input[type="text"], .zijbalk-widgets select {
  width: 100%; padding: 8px 10px; border: 1px solid var(--wit); border-radius: 0;
  background: var(--wit); color: var(--blauw); font: inherit;
}
.zijbalk-widgets input[type="submit"], .zijbalk-widgets button {
  margin-top: 6px; padding: 8px 14px; border: 1px solid var(--wit); background: transparent;
  color: var(--wit); font: inherit; cursor: pointer;
}
.zijbalk-widgets input[type="submit"]:hover, .zijbalk-widgets button:hover { background: var(--wit); color: var(--blauw); }

/* Menu met witte hoverlijn onder het item */
.hoofdmenu ul { list-style: none; margin: 0; padding: 0; }
.hoofdmenu li { margin: 0; }
.hoofdmenu a, .zijbalk-widgets li a {
  position: relative; display: inline-block; padding: 7px 0 8px;
  color: var(--wit); font-size: 17px; font-weight: 600; line-height: 1.3;
}
.hoofdmenu a::after, .zijbalk-widgets li a::after {
  content: ""; position: absolute; left: 0; bottom: 2px;
  width: 0; height: 2px; background: var(--goud);
  transition: width .25s ease;
}
.hoofdmenu a:hover::after, .hoofdmenu a:focus-visible::after,
.hoofdmenu .current-menu-item > a::after, .hoofdmenu .current-menu-ancestor > a::after,
.hoofdmenu .current_page_item > a::after,
.zijbalk-widgets li a:hover::after, .zijbalk-widgets li a:focus-visible::after { width: 100%; }
.hoofdmenu a:hover, .hoofdmenu a:focus { color: var(--wit); background: transparent; }
.hoofdmenu .sub-menu, .hoofdmenu .children { padding-left: 16px; }
.hoofdmenu .sub-menu a, .hoofdmenu .children a { font-size: 15px; font-weight: 400; }
.zijbalk a:focus-visible, .menu-toggle:focus-visible { outline: 2px solid var(--wit); outline-offset: 3px; }

/* ===== Inhoud ===== */
.pagina { min-height: 100vh; display: flex; flex-direction: column; background: var(--wit); }
.inhoud { flex: 1 0 auto; width: 100%; max-width: 1200px; padding: 24px 48px 40px; background: var(--wit); }
.artikel { margin: 0 0 48px; }
.artikel-titel { margin: 0 0 10px; font-size: 32px; line-height: 1.25; color: var(--blauw); }
.artikel-titel a { color: inherit; text-decoration: none; }
.artikel-titel a:hover { text-decoration: underline; }
.artikel-meta { margin: 0 0 16px; font-size: 14px; color: var(--tekst); }
.artikel-inhoud::after { content: ""; display: block; clear: both; }
.wp-block-image img, .alignleft, .alignright, .aligncenter { max-width: 100%; height: auto; }
.alignleft { float: left; margin: 0 24px 12px 0; }
.alignright { float: right; margin: 0 0 12px 24px; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption-text, figcaption { font-size: 14px; }
.pagination, .navigation.posts-navigation { margin: 30px 0; }
.pagination .page-numbers { display: inline-block; margin-right: 6px; padding: 4px 10px; border: 1px solid var(--blauw); text-decoration: none; }
.pagination .page-numbers.current { background: var(--blauw); color: var(--wit); }
.zoekformulier { display: flex; gap: 8px; max-width: 480px; }
.zoekformulier input[type="search"] { flex: 1; padding: 8px 10px; border: 1px solid var(--blauw); font: inherit; }
.zoekformulier input[type="submit"] { padding: 8px 16px; border: 0; background: var(--blauw); color: var(--wit); font: inherit; cursor: pointer; }

/* ===== TablePress ===== */
.tablepress { width: 100%; margin-bottom: 1em; border-collapse: collapse; }
.tablepress thead th { background: var(--blauw); color: var(--wit); border: 1px solid var(--blauw); border-bottom: 3px solid var(--goud); }
.tablepress tbody td { border: 1px solid #e6e6e6; background: var(--wit); }
.tablepress tbody tr:hover td { background: #fbf4df; }
/* Paginanummers (DataTables 1.x en 2.x) altijd zwart */
.dataTables_wrapper .dataTables_paginate,
.dataTables_wrapper .dataTables_paginate a,
.dataTables_wrapper .dataTables_paginate .paginate_button,
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .ellipsis,
.dt-container .dt-paging,
.dt-container .dt-paging .dt-paging-button,
.dt-container .dt-paging .dt-paging-button.current,
.dt-container .dt-paging .dt-paging-button:hover,
.dt-container .dt-paging .dt-paging-button.disabled,
.dt-container .dt-paging .ellipsis,
.dt-container .dt-paging button { color: #000 !important; }
.dataTables_wrapper .dataTables_paginate .paginate_button,
.dt-container .dt-paging .dt-paging-button {
  background: transparent !important; border: 1px solid transparent !important; border-radius: 0; box-shadow: none !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dt-container .dt-paging .dt-paging-button.current { border-bottom: 2px solid #000 !important; font-weight: 700; }
.dataTables_wrapper .dataTables_paginate .paginate_button:hover,
.dt-container .dt-paging .dt-paging-button:hover { border-color: #000 !important; }
.dataTables_wrapper .dataTables_info, .dt-container .dt-info { color: #000; }

/* ===== Footer (wit) ===== */
.site-footer {
  flex-shrink: 0; background: var(--wit); color: var(--blauw);
  border-top: 3px solid var(--goud); padding: 22px 48px; text-align: center; font-size: 15px;
}
.site-footer a { color: var(--blauw); }
.naar-boven {
  position: fixed; right: 18px; bottom: 76px; width: 40px; height: 40px; line-height: 40px;
  text-align: center; background: var(--goud); color: var(--blauw); text-decoration: none; font-size: 20px; font-weight: 700; z-index: 900;
}
.naar-boven:hover, .naar-boven:focus { background: var(--wit); color: var(--blauw); outline: 2px solid var(--goud); }
/* Fotoraster met bijschriften (galerij) */
.wp-block-gallery, .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px 20px; margin: 0 0 30px; padding: 0; list-style: none; }
.gallery .gallery-item, .wp-block-gallery .wp-block-image, .wp-block-gallery figure { margin: 0; width: auto !important; max-width: none; }
.gallery .gallery-icon img, .wp-block-gallery img { display: block; width: 100%; height: 220px; object-fit: cover; }
.gallery-caption, .wp-block-gallery figcaption {
  position: static !important; background: transparent !important; color: var(--tekst) !important;
  margin: 6px 0 0; padding: 0; font-size: 15px; line-height: 1.4; text-align: left;
}
.artikel-inhoud h1:first-child { margin-top: 0; }
.site-footer .copyright { margin: 0; }

/* ===== Reacties ===== */
.reacties { margin-top: 40px; }
.reacties ol { list-style: none; padding-left: 0; }
.reacties .comment-body { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--goud); }

/* ===== Mobiel ===== */
.menu-toggle { display: none; }
@media (max-width: 900px) {
  body { margin-left: 0; }
  .menu-toggle {
    display: block; position: fixed; top: 10px; left: 10px; z-index: 1100;
    padding: 9px 16px; border: 1px solid var(--wit); background: var(--blauw); color: var(--wit);
    font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1; cursor: pointer;
  }
  .zijbalk { transform: translateX(-100%); transition: transform .3s ease; width: min(86vw, 320px); }
  body.menu-open .zijbalk { transform: translateX(0); }
  .zijbalk-inner { padding-top: 64px; }
  .site-header { padding: 64px 20px 0; }
  .inhoud { padding: 20px 20px 30px; }
  .site-footer { padding: 18px 20px; }
  .artikel-titel { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .zijbalk, .hoofdmenu a::after, .zijbalk-widgets li a::after { transition: none; }
}
