/* HerpenOnline.nl - modern responsive stylesheet (same look, new foundation) */

@font-face {
  font-family: "herpenonline";
  src: url("fonts/herpenonline.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

/* ---------- design tokens: the colours of the existing site ---------- */
:root {
  --purple: #6341a4;            /* brand purple */
  --purple-logo: #7451ba;
  --purple-mid: #6d4daa;
  --purple-dark: #5a389c;
  --purple-light: #9974d5;
  --purple-night: #230067;
  --header-bg: rgb(99 65 164 / .9);
  --aside-bg: rgb(153 116 213 / .9);
  --paper: rgb(255 255 255 / .9);
  --ink: #000;
  --footer-bg: #111;
  --white: #fff;

  --page-max: 1200px;
  --aside-w: 300px;
  --gap: clamp(1rem, 2vw, 1.5rem);
  --font: Arial, "Helvetica Neue", Helvetica, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font: 1rem/1.55 var(--font);
  color: var(--ink);
  background: var(--purple);
}

/* fixed background photo without background-attachment (smooth on phones) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--purple) url("img/bg.jpg") center / cover no-repeat;
}

img { max-width: 100%; height: auto; }
a { color: var(--purple); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--purple-night); outline-offset: 2px; }
.site-header :focus-visible, .site-footer :focus-visible, .aside :focus-visible {
  outline-color: #fff;
}

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: #fff; color: var(--purple); padding: .5rem 1rem;
}
.skip:focus { top: 1rem; }

/* ---------- icon font ---------- */
[class^="icon-"], [class*=" icon-"] {
  font-family: "herpenonline" !important;
  font-style: normal; font-weight: normal; font-variant: normal;
  text-transform: none; line-height: 1; speak: none;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
.icon-fax:before { content: "\e91e"; }
.icon-rolodex:before { content: "\e916"; }
.icon-factory:before { content: "\e911"; }
.icon-joker-mask:before { content: "\e912"; }
.icon-bowling-pin-ball:before { content: "\e914"; }
.icon-soccer-court:before { content: "\e913"; }
.icon-envelope:before { content: "\e90f"; }
.icon-home:before { content: "\e909"; }
.icon-office:before { content: "\e915"; }
.icon-newspaper:before { content: "\e90a"; }
.icon-phone:before { content: "\e90b"; }
.icon-location:before { content: "\e91f"; }
.icon-menu:before { content: "\e90e"; }
.icon-earth:before { content: "\e919"; }
.icon-link:before { content: "\e91a"; }
.icon-arrow-right:before { content: "\e910"; }
.icon-arrow-left:before { content: "\e91b"; }
.icon-mail:before { content: "\e90c"; }
.icon-facebook:before { content: "\e91c"; }
.icon-facebook2:before { content: "\e90d"; }
.icon-twitter:before { content: "\e91d"; }
.icon-herpen-online-logo .path1:before { content: "\e903"; color: var(--purple-logo); }
.icon-herpen-online-logo .path2:before { content: "\e904"; margin-left: -2.06640625em; color: #9974d6; }
.icon-herpen-online-logo .path3:before { content: "\e905"; margin-left: -2.06640625em; color: #fff; }

/* ---------- header ---------- */
.site-header {
  background: var(--header-bg);
  margin-block: 10px;
  position: relative;
  z-index: 20;
}
.site-header__inner {
  max-width: 768px;
  margin-inline: auto;
  padding: 10px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.logo {
  display: block;
  font-size: clamp(5rem, 24vw, 7.1rem);
  line-height: 1;
  padding-block: .1em 0;
  text-decoration: none;
}
.top-banner {
  width: 100%;
  max-width: 728px;
  line-height: 0;
  margin-top: 10px;
  text-align: center;
}
.top-banner img { width: 100%; max-width: 728px; aspect-ratio: 728 / 90; object-fit: contain; }

.menu-btn {
  align-self: flex-start;
  margin: 12px 0 12px 16px;
  padding: .35rem .6rem;
  font: inherit;
  font-size: 1.5rem;
  color: #fff;
  background: transparent;
  border: 2px solid rgb(255 255 255 / .6);
  border-radius: 4px;
  cursor: pointer;
}
.menu-btn i { margin-right: .35rem; }
.menu-btn[aria-expanded="true"] { background: var(--purple-logo); }

/* navigation (mobile first: collapsed list, stacked) */
.nav { width: 100%; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.js .nav:not(.is-open) { display: none; }
.nav a {
  display: block;
  color: #fff;
  padding: .85rem 1rem;
  font-weight: bold;
  text-transform: uppercase;
  font-size: .85rem;
  letter-spacing: .02em;
  text-decoration: none;
}
.nav a:hover, .nav a:focus-visible { background: var(--purple-light); }
.nav li > ul a { padding-left: 2rem; font-weight: normal; background: var(--purple-logo); }
.nav li + li { border-top: 1px solid rgb(255 255 255 / .15); }
.nav [aria-current="page"] { box-shadow: inset 4px 0 0 #fff; }

/* ---------- page frame ---------- */
.page {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto 10px;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 10px rgb(0 0 0 / .5);
}
.page > article { flex: 1 1 0; min-width: 0; background: var(--paper); }
.page > .aside { flex: 0 0 auto; }

/* hero / page title (the "kop") */
.kop { position: relative; min-height: 120px; background: var(--purple); line-height: 0; }
.kop .hero img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  display: block;
}
.kop h1 {
  position: absolute;
  left: 0; bottom: clamp(.75rem, 3vw, 1.25rem);
  margin: 0 clamp(.75rem, 3vw, 1.25rem) 0 clamp(.75rem, 3vw, 1.25rem);
  max-width: calc(100% - 1.5rem);
  padding: clamp(.6rem, 2.2vw, 1.25rem) clamp(.9rem, 3vw, 1.9rem);
  background: rgb(99 65 164 / .85);
  color: #fff;
  font-size: clamp(1.15rem, 4.2vw + .2rem, 2.1rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.kop h1 i { margin-right: .2em; }
.kop h1.small {
  left: 0; bottom: 0; margin: 0;
  background: var(--purple);
  font-size: clamp(1.15rem, 3.4vw, 2.1rem);
}
.kop:has(h1.small) .hero { min-height: 120px; }
.kop:has(h1.small) { min-height: 120px; }

/* text blocks */
.text { margin: 1.25rem 1rem; }
.text > :first-child { margin-top: 0; }
.text p, .contain p { margin: 0 0 1rem; }
.text h2, .text h3, .contain h2 { color: var(--purple); line-height: 1.25; }
.text img { margin-block: .5rem; border-radius: 2px; }
.text a, .contain a { text-decoration: underline; text-underline-offset: 2px; }
.text table, .contain table { max-width: 100%; display: block; overflow-x: auto; border-collapse: collapse; }
.text td, .contain td { padding: .25rem .6rem; vertical-align: top; }
.text ul, .text ol, .contain ul, .contain ol { padding-left: 1.4rem; }
.text::after, .contain::after { content: ""; display: table; clear: both; }
.text iframe, .contain iframe { width: 100%; height: 300px; border: 0; }

/* date block (the "time" tile) */
.date-tile {
  flex: 0 0 67px;
  width: 67px; height: 67px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: 1fr auto;
  background: var(--purple);
  color: #fff;
  font-weight: bold;
  line-height: 1;
}
.date-tile .day { grid-column: 1; grid-row: 1; align-self: end; text-align: center; font-size: 2.1rem; padding-top: .3rem; }
.date-tile .year { grid-column: 1; grid-row: 2; text-align: center; font-size: .75rem; padding-bottom: .3rem; }
.date-tile .month {
  grid-column: 2; grid-row: 1 / 3;
  writing-mode: vertical-rl; transform: rotate(180deg);
  text-transform: uppercase; font-size: .95rem; text-align: center;
  padding: .4rem .35rem;
}

/* news cards */
.news-list { display: grid; gap: 16px; padding: 16px; margin: 0; list-style: none; }
.news-card {
  display: grid;
  grid-template-columns: 67px 1fr;
  align-items: stretch;
  background: #fff;
  color: var(--ink);
  border-bottom: 10px solid var(--purple);
  text-decoration: none !important;
  min-height: 90px;
  transition: background-color .15s;
}
.news-card:hover, .news-card:focus-visible { background: #efe9f9; }
.news-card .date-tile { align-self: start; }
.news-card h2 { margin: 0; padding: .6rem 1rem; color: var(--purple); font-size: 1.05rem; line-height: 1.3; align-self: center; }
.news-card .thumb { display: none; }
@media (min-width: 640px) {
  .news-list--full .news-card { grid-template-columns: 67px 1fr 200px; min-height: 150px; }
  .news-list--full .news-card h2 { font-size: 1.25rem; }
  .news-list--full .thumb { display: block; width: 200px; height: 150px; object-fit: cover; align-self: end; }
}
.news-list--compact .news-card { border-bottom-width: 5px; }
.news-list--compact .news-card h2 { font-size: .95rem; }
.news-list--compact .thumb { display: none; }
@media (min-width: 420px) {
  .news-list--compact .news-card { grid-template-columns: 67px 1fr 100px; }
  .news-list--compact .thumb { display: block; width: 100px; height: 75px; object-fit: cover; align-self: end; }
  .news-list--compact .news-card { min-height: 75px; }
}

/* year bar / button bar */
.years {
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-wrap: wrap; justify-content: space-around;
  background: var(--header-bg);
  font-weight: bold;
  font-size: clamp(1.05rem, 3vw, 1.5rem);
}
.years a { display: block; padding: .6rem .9rem; color: #fff; text-decoration: none; }
.years a:hover, .years a:focus-visible, .years a[aria-current] { background: var(--purple-light); }
.years i { margin-right: .3em; font-size: .9em; }

/* news detail */
.news-detail { display: flex; gap: 1rem; margin: 16px; padding: 1rem; background: rgb(255 255 255 / .55); }
.news-detail .side { flex: 0 0 67px; display: flex; flex-direction: column; gap: 1rem; }
.news-detail .contain { flex: 1; min-width: 0; }
.news-detail .contain h2:first-child { margin-top: 0; }
.news-detail .article-img { float: right; margin: 0 0 1rem 1rem; max-width: min(50%, 360px); }
.back-btn {
  display: block; width: 67px; height: 67px; line-height: 67px;
  background: var(--purple); color: #fff; text-align: center;
  font-size: 2rem; font-weight: bold; text-decoration: none !important;
}
.back-btn:hover, .back-btn:focus-visible { background: var(--purple-light); color: var(--purple-night); }

/* organisation list (striped purple list) */
.organisatie { margin: 0; padding: 0; list-style: none; background: var(--purple-mid); font-weight: bold; }
.organisatie li:nth-child(odd) { background: var(--purple-dark); }
.organisatie a {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem 1.25rem .7rem clamp(1rem, 4vw, 2.5rem);
  color: #fff; text-decoration: none;
}
.organisatie a:hover, .organisatie a:focus-visible { background: var(--purple-light); color: var(--purple-night); }
.organisatie i { flex: none; }

/* organisation detail */
.org { display: grid; gap: 1rem; }
.org .naw-col { padding: 0 1rem 1rem; }
.org .logo-img { max-width: 300px; margin: 0 0 1rem; }
.naw { margin: 0; padding: 0; list-style: none; font-weight: bold; }
.naw a { display: flex; gap: 1rem; align-items: flex-start; padding: .7rem .75rem; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.naw a:hover, .naw a:focus-visible { background: var(--purple); color: #fff; }
.naw i { flex: none; font-size: 1.15rem; width: 1.3rem; }
@media (min-width: 768px) {
  .org { grid-template-columns: 1fr 1fr; }
  .org .naw-col { padding: 1.25rem 1.25rem 1rem 0; }
  .org .text { margin-top: 1.25rem; }
}

/* home */
.home-grid { display: grid; gap: 0; }
.home-grid h1 { color: var(--purple); font-size: 1.15rem; margin: 1.25rem 1rem 0; }
.home-text { padding: 0 1rem 1.5rem; }
.home-text h2 { color: var(--purple); font-size: 1.1rem; margin-top: 1.25rem; }
.home-text img { float: right; margin: 0 0 .75rem .75rem; max-width: 100%; }
.home-text::after { content: ""; display: table; clear: both; }
@media (min-width: 1024px) {
  .home-grid { grid-template-columns: 1fr 1fr; }
  .home-text { padding: 0 1.25rem 1.5rem 0; margin-top: 1rem; }
}

/* ---------- aside ---------- */
.aside {
  background: var(--aside-bg);
  text-align: center;
  padding: 1rem;
}
.aside .banner-mid { display: block; width: 100%; max-width: 300px; margin: 0 auto 1rem; line-height: 0; }
.aside .banner-mid img { width: 100%; aspect-ratio: 3 / 2; object-fit: contain; background: #fff; }
.aside h2 { margin: 0 0 .75rem; color: #fff; font-size: 1.1rem; text-align: left; }
.agenda { list-style: none; margin: 0; padding: 0; text-align: left; color: #fff; display: grid; gap: 1rem; }
.agenda li { background: var(--header-bg); padding: 1rem; }
.agenda a { color: #fff; display: block; text-decoration: none; }
.agenda a:hover h3 { text-decoration: underline; }
.agenda-when { display: flex; justify-content: space-between; gap: .5rem; font-weight: bold; font-size: .9rem; flex-wrap: wrap; }
.agenda-item { display: grid; grid-template-columns: 1fr auto; column-gap: .75rem; align-items: start; }
.agenda-when { grid-column: 1 / -1; }
.agenda img { grid-column: 2; grid-row: 2 / span 2; width: 75px; height: 75px; object-fit: cover; margin-top: .5rem; }
.agenda h3 { grid-column: 1; margin: .5rem 0 0; font-size: 1.05rem; hyphens: auto; overflow-wrap: anywhere; }
.agenda p { grid-column: 1; margin: .25rem 0 0; font-size: .9rem; }
.agenda-item:not(:has(img)) h3, .agenda-item:not(:has(img)) p { grid-column: 1 / -1; }

@media (min-width: 640px) and (max-width: 1023.98px) {
  .aside .agenda { grid-template-columns: 1fr 1fr; }
}

/* ---------- footer ---------- */
.site-footer { background: var(--footer-bg); padding: 1.25rem 1rem; }
.site-footer ul {
  max-width: var(--page-max); margin: 0 auto; padding: 0; list-style: none;
  display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1.5rem;
}
.site-footer a { display: block; padding: .6rem .25rem; color: #fff; font-size: 1rem; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer i { margin-right: .4rem; }

/* ---------- tablet / desktop ---------- */
@media (min-width: 1024px) {
  .site-header__inner {
    max-width: var(--page-max);
    height: 141px;
    padding: 16px 16px 0;
    display: grid;
    grid-template-columns: 248px 1fr;
    grid-template-rows: 90px 1fr;
    column-gap: 0;
    align-items: start;
    justify-items: end;
  }
  .site-header { min-height: 150px; }
  .logo { grid-row: 1 / 3; grid-column: 1; justify-self: center; font-size: 7.1rem; padding: 0; }
  .top-banner { grid-column: 2; grid-row: 1; margin: 0; width: 728px; }
  .menu-btn { display: none; }
  .js .nav:not(.is-open), .nav { display: block; }
  .nav { grid-column: 2; grid-row: 2; width: 728px; margin-top: 10px; }
  .nav > ul { display: flex; flex-flow: row wrap; justify-content: flex-end; }
  .nav > ul > li { position: relative; flex: 1 0 auto; text-align: center; min-width: 100px; border: 0; }
  .nav > ul > li.home { min-width: 0; }
  .nav a { padding: .65rem .3rem .5rem; font-size: .75rem; }
  .nav > ul > li:hover { background: var(--purple-logo); }
  .nav li > ul {
    position: absolute; right: 0; left: 0; top: 100%;
    display: none; z-index: 50; background: var(--purple-logo);
    box-shadow: 0 6px 12px rgb(0 0 0 / .3);
  }
  .nav li:hover > ul, .nav li:focus-within > ul { display: block; }
  .nav li > ul a { padding: .6rem .5rem; font-weight: bold; }
  .nav li + li { border-top: 0; }
  .nav [aria-current="page"] { box-shadow: inset 0 -3px 0 #fff; }

  .page { flex-direction: row; }
  .page > .aside { flex: 0 0 var(--aside-w); padding: 0; align-self: stretch; }
  .aside .banner-mid { margin: 0 0 1rem; max-width: none; }
  .aside h2 { padding-inline: 1rem; }
  .agenda { padding-inline: 0; }
  .agenda li { margin-inline: 0; }
  .aside-inner { padding: 0; }
  .text { margin: 3.5rem 2.5rem; }
  .news-list { padding: 16px 16px 16px 16px; }
}

@media (min-width: 1024px) and (max-width: 1100px) { .nav a { font-size: .7rem; } }

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

@media print {
  body::before, .site-header, .aside, .site-footer, .years { display: none; }
  .page { box-shadow: none; }
}

/* cards without a thumbnail keep two columns */
.news-list--full .news-card.no-thumb,
.news-list--compact .news-card.no-thumb { grid-template-columns: 67px 1fr; }

/* "Home" label: visible in the mobile menu, icon only on desktop */
.nav .home a i { margin-right: .5rem; }
@media (min-width: 1024px) {
  .nav .home a i { margin-right: 0; }
  .nav .home-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
