/* ==========================================================================
   Informatiedrager - Stylesheet
   ========================================================================== */

:root {
  --bg-page: #f7f6f2;
  --bg-surface: #ffffff;
  --bg-subtle: #eef2ec;
  --bg-accent-soft: #e3ece0;

  --text-main: #1c2826;
  --text-muted: #4a5d58;
  --text-on-primary: #ffffff;

  --primary: #1f5c4b;
  --primary-hover: #164437;

  --border-color: #d5ded9;
  --border-strong: #9fb3aa;

  --radius-sm: 0.5rem;
  --radius-md: 0.875rem;
  --radius-lg: 1.25rem;

  --shadow-sm: 0 1px 3px rgba(28, 40, 38, 0.07);
  --shadow-md: 0 6px 18px rgba(28, 40, 38, 0.08);
  --shadow-lg: 0 12px 32px rgba(28, 40, 38, 0.14);

  --max-width: 64rem;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: light;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-main);
  background-color: var(--bg-page);
  min-block-size: 100dvh;
  display: flex;
  flex-direction: column;
}

img {
  max-inline-size: 100%;
  block-size: auto;
  display: block;
}

a {
  color: var(--primary);
  text-underline-offset: 0.2em;
  word-break: break-word;
}

a:hover {
  color: var(--primary-hover);
}

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

/* ==========================================================================
   Responsive Site Navigation (Modern Web Guidance `navbar` pattern)
   ========================================================================== */

.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-block-end: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-inline-size: var(--max-width);
  margin-inline: auto;
  padding-block: 0.75rem;
  padding-inline: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Keep the row's natural width measurable */
.header-inner > * {
  flex-shrink: 0;
  white-space: nowrap;
}

.site-header.is-measuring,
.site-header.is-measuring * {
  transition: none !important;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.125rem;
  color: var(--text-main);
  text-decoration: none;
}

.site-header .menu-button {
  anchor-name: --menu-button;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding-block: 0.5rem;
  padding-inline: 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background-color: var(--bg-surface);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.site-header .menu-button:hover {
  background-color: var(--bg-subtle);
}

.site-header .site-menu {
  position: fixed;
  inset: auto;
  inset-block-start: 4.25rem;
  inset-block-start: anchor(--menu-button bottom);
  inset-inline-end: 1rem;
  inline-size: min(85dvw, 22rem);
  max-inline-size: calc(100dvw - 2rem);
  block-size: fit-content;
  max-block-size: calc(100dvh - 5.5rem);
  margin-block-start: 0.5rem;
  padding: 0.75rem;
  list-style: none;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  box-shadow: var(--shadow-lg);
  overflow: auto;
}

.site-header .site-menu:not(:is(:popover-open, .\:popover-open)) {
  display: none;
}

.site-header .site-menu:is(:popover-open, .\:popover-open) {
  display: grid;
  gap: 0.35rem;
}

.site-menu a {
  display: inline-flex;
  align-items: center;
  padding-block: 0.5rem;
  padding-inline: 0.85rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-muted);
  border: 2px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.site-menu a:hover {
  background-color: var(--bg-subtle);
  color: var(--text-main);
}

.site-menu a[aria-current="page"] {
  background-color: var(--bg-accent-soft);
  color: var(--primary);
  border-color: var(--primary);
  font-weight: 700;
}

.site-header.is-wide .menu-button {
  display: none;
}

.site-header.is-wide .site-menu {
  position: static;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  inline-size: auto;
  max-inline-size: none;
  block-size: auto;
  max-block-size: none;
  overflow: visible;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.site-header.is-wide .site-menu::backdrop {
  display: none;
}

@media (forced-colors: active) {
  .site-menu a[aria-current="page"] {
    border-color: Highlight;
  }
}

/* ==========================================================================
   Main Container & Document Layout
   ========================================================================== */

main {
  flex: 1;
  max-inline-size: var(--max-width);
  inline-size: 100%;
  margin-inline: auto;
  padding-block: 2rem 4rem;
  padding-inline: 1.25rem;
}

.page-header {
  background: linear-gradient(135deg, #174639 0%, #246a56 100%);
  color: var(--text-on-primary);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  margin-block-end: 2rem;
  box-shadow: var(--shadow-md);
}

.page-header h1 {
  margin: 0;
  font-size: clamp(1.75rem, 3.5vw, 2.4rem);
  line-height: 1.2;
}

.page-header p {
  margin: 0.85rem 0 0;
  color: rgba(255, 255, 255, 0.94);
  font-size: 1.05rem;
}

.page-header a {
  color: #d1fae5;
}

.content-section {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 2rem);
  margin-block-end: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.content-section h2 {
  margin: 0 0 1rem;
  padding-block-end: 0.65rem;
  border-block-end: 2px solid var(--bg-subtle);
  font-size: clamp(1.35rem, 2.4vw, 1.65rem);
  color: var(--primary);
}

.content-section h3 {
  font-size: 1.125rem;
  color: var(--text-main);
  margin-block: 1.35rem 0.45rem;
}

.content-section h2 + h3 {
  margin-block-start: 0.25rem;
}

.content-section p {
  margin-block: 0 0.75rem;
}

.content-section p:last-child {
  margin-block-end: 0;
}

.content-section ul {
  margin-block: 0.25rem 0.85rem;
  padding-inline-start: 1.35rem;
}

.content-section li {
  margin-block-end: 0.35rem;
}

/* Document Images in exact document position */
.doc-image {
  margin-block: 1rem;
  background-color: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  display: inline-block;
  max-inline-size: 100%;
}

.doc-image img {
  max-block-size: 22rem;
  inline-size: auto;
  max-inline-size: 100%;
  object-fit: contain;
  border-radius: var(--radius-sm);
  cursor: zoom-in;
}

/* 3 images row (Verschillende soorten voeding) */
.food-row-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1rem;
  margin-block: 0.75rem 1rem;
}

.food-item {
  background-color: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.food-item img {
  block-size: 12rem;
  inline-size: 100%;
  object-fit: contain;
  background-color: #ffffff;
  border-radius: var(--radius-sm);
  padding: 0.4rem;
  cursor: zoom-in;
}

.food-item p {
  margin: 0.65rem 0 0;
  font-weight: 700;
}

/* ==========================================================================
   Responsive Data Table (Modern Web Guidance `responsive-table` pattern)
   ========================================================================== */

.table-wrapper {
  overflow: auto;
  max-inline-size: 100%;
  max-block-size: min(540px, 80vh);
  container-type: inline-size;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  margin-block: 0.75rem 1.25rem;
}

table {
  inline-size: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: start;
  font-size: 0.9375rem;
}

thead {
  position: sticky;
  inset-block-start: 0;
  z-index: 1;
  background-color: var(--primary);
  color: var(--text-on-primary);
}

th,
td {
  padding-block: 0.75rem;
  padding-inline: 0.9rem;
  border-block-end: 1px solid var(--border-color);
  vertical-align: top;
}

thead th {
  font-weight: 700;
}

tbody th {
  position: sticky;
  inset-inline-start: 0;
  background: var(--bg-page);
  color: var(--text-main);
  font-weight: 700;
  border-inline-end: 1px solid var(--border-color);
}

@container (width < 600px) {
  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  thead {
    /* MANDATORY: Hide column header from layout and screen readers */
    display: none;
  }

  tr {
    margin-block-end: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
  }

  tbody th {
    position: sticky;
    inset-block-start: 0;
    z-index: 2;
    background: var(--bg-accent-soft);
    color: var(--primary);
    border-inline-end: 0;
  }

  td:nth-child(2)::before { content: var(--label-2) ": "; font-weight: 700; }
  td:nth-child(3)::before { content: var(--label-3) ": "; font-weight: 700; }
  td:nth-child(4)::before { content: var(--label-4) ": "; font-weight: 700; }
  td:nth-child(5)::before { content: var(--label-5) ": "; font-weight: 700; }
  td:nth-child(6)::before { content: var(--label-6) ": "; font-weight: 700; }
  td:nth-child(7)::before { content: var(--label-7) ": "; font-weight: 700; }
  td:nth-child(8)::before { content: var(--label-8) ": "; font-weight: 700; }
}

/* ==========================================================================
   Image Lightbox Dialog
   ========================================================================== */

dialog.lightbox-dialog {
  max-inline-size: min(92dvw, 60rem);
  max-block-size: 90dvh;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  box-shadow: var(--shadow-lg);
}

dialog.lightbox-dialog::backdrop {
  background: rgba(15, 23, 21, 0.75);
  backdrop-filter: blur(4px);
}

.lightbox-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-block-end: 0.75rem;
}

.lightbox-close {
  padding-block: 0.4rem;
  padding-inline: 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-page);
  font-weight: 700;
  cursor: pointer;
}

.lightbox-img {
  max-inline-size: 100%;
  max-block-size: 75dvh;
  margin-inline: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background-color: #142420;
  color: #d5ded9;
  padding-block: 1.75rem;
  padding-inline: 1.25rem;
  margin-block-start: auto;
}

.footer-inner {
  max-inline-size: var(--max-width);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: #ecfdf5;
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-links a:hover {
  text-decoration: underline;
}
