/* Dagboek — laad na styles.css (gebruikt :root-variabelen) */

/* Zelfde horizontale breedte als .content__row / .nav-wrap__inner (index.html) */
.dagboek-main {
  max-width: var(--content-width);
  margin-inline: auto;
  padding-bottom: clamp(1.25rem, 3vw, 2.5rem);
}

.dagboek-entry {
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
}

.dagboek-entry__date {
  margin: 0 0 0.35rem;
  padding: 0.4rem 0.7rem;
  background: linear-gradient(135deg, rgba(13, 116, 109, 0.38) 0%, rgba(15, 92, 86, 0.45) 100%);
  border: 1px solid rgba(6, 78, 59, 0.22);
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 0.88rem + 0.28vw, 1.08rem);
  font-weight: 700;
  color: #022c22;
  box-shadow: 0 1px 2px rgba(15, 77, 55, 0.08);
}

.dagboek-entry__card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(16, 100, 70, 0.12);
  padding: clamp(0.85rem, 0.55rem + 0.9vw, 1.2rem) clamp(1.1rem, 0.85rem + 1.2vw, 1.65rem);
  font-size: clamp(0.82rem, 0.78rem + 0.18vw, 0.92rem);
  line-height: 1.55;
}

.dagboek-entry__card p {
  margin: 0.55em 0;
}

.dagboek-entry__card p:first-child {
  margin-top: 0;
}

.dagboek-entry__card p:last-child {
  margin-bottom: 0;
}

.dagboek-photo-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem 0.65rem;
  margin: 0.75rem 0 0;
}

.dagboek-photo-row figure {
  margin: 0;
  min-width: 0;
}

.dagboek-photo-row .beginjaren-sidebar__link {
  display: block;
}

.dagboek-photo-row .beginjaren-sidebar__link img {
  width: 150px;
  height: 112px;
  max-width: 100%;
  object-fit: cover;
}

.dagboek-photo-row figcaption,
.content--beginjaren .beginjaren-sidebar__figure figcaption {
  font-family: var(--font-sans);
  font-size: clamp(0.62rem, 0.58rem + 0.12vw, 0.7rem);
  font-weight: 400;
  line-height: 1.28;
  letter-spacing: -0.03em;
  font-feature-settings: "kern" 1;
  color: #0f172a;
}

.dagboek-photo-row figcaption {
  margin-top: 0.4rem;
}

.dagboek-photo-placeholder {
  min-height: 112px;
}

/* 5 tegels per rij, volle breedte, vaste tussendoorafstand: dagboek + beginjaren (class photo-row--5) */
.dagboek-photo-row.photo-row--5,
.content--beginjaren .beginjaren-sidebar__photos.photo-row--5 {
  --photo-tile-w: 150px;
  --photo-col-gap: 0.7rem;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-flow: row;
  column-gap: var(--photo-col-gap);
  row-gap: 0.75rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  justify-items: center;
}

.dagboek-photo-row.photo-row--5 {
  margin: 0.75rem 0 0;
}

.content--beginjaren .beginjaren-sidebar__photos.photo-row--5 {
  margin-inline: 0;
}

.dagboek-photo-row.photo-row--5 > figure,
.content--beginjaren .beginjaren-sidebar__photos.photo-row--5 > .beginjaren-sidebar__figure {
  margin: 0;
  min-width: 0;
  width: var(--photo-tile-w);
  max-width: 100%;
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

.dagboek-photo-row.photo-row--5 .beginjaren-sidebar__link,
.content--beginjaren .beginjaren-sidebar__photos.photo-row--5 .beginjaren-sidebar__link {
  display: block;
  width: 150px;
  max-width: 100%;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
}

.dagboek-photo-row.photo-row--5 .beginjaren-sidebar__link img,
.content--beginjaren .beginjaren-sidebar__photos.photo-row--5 .beginjaren-sidebar__figure img {
  display: block;
  width: 150px;
  max-width: 100%;
  height: 112px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.content--beginjaren .beginjaren-sidebar__photos.photo-row--5 .beginjaren-sidebar__figure img {
  border: 1px solid rgba(16, 100, 70, 0.12);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.dagboek-photo-row.photo-row--5 figcaption,
.content--beginjaren .beginjaren-sidebar__photos.photo-row--5 figcaption {
  text-align: center;
  max-width: 150px;
  margin-top: 0.4rem;
  box-sizing: border-box;
}

.dagboek-photo-row.photo-row--5 .dagboek-photo-placeholder {
  width: 150px;
  max-width: 100%;
  min-height: 112px;
  height: 112px;
  box-sizing: border-box;
}

/* 4 tegels per rij (o.a. historie 2006) */
.dagboek-photo-row.photo-row--4 {
  --photo-tile-w: 150px;
  --photo-col-gap: 0.7rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: row;
  column-gap: var(--photo-col-gap);
  row-gap: 0.75rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  justify-items: center;
  margin: 0.75rem 0 0;
}

.dagboek-photo-row.photo-row--4 > figure {
  margin: 0;
  min-width: 0;
  width: var(--photo-tile-w);
  max-width: 100%;
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

.dagboek-photo-row.photo-row--4 .beginjaren-sidebar__link {
  display: block;
  width: 150px;
  max-width: 100%;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
}

.dagboek-photo-row.photo-row--4 .beginjaren-sidebar__link img {
  display: block;
  width: 150px;
  max-width: 100%;
  height: 112px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.dagboek-photo-row.photo-row--4 figcaption {
  text-align: center;
  max-width: 150px;
  margin-top: 0.4rem;
  box-sizing: border-box;
}

@media (max-width: 40rem) {
  .dagboek-photo-row.photo-row--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 22rem) {
  .dagboek-photo-row.photo-row--4 {
    grid-template-columns: 1fr;
  }
}


@media (max-width: 40rem) {
  .dagboek-photo-row.photo-row--5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 22rem) {
  .dagboek-photo-row.photo-row--5 {
    grid-template-columns: 1fr;
  }
}

/* Page wrapper */
.dagboek-page {
  padding-block: clamp(0.75rem, 1.5vw, 1.25rem);
}

.dagboek-photo-row .beginjaren-sidebar__link {
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.dagboek-photo-row .beginjaren-sidebar__link:hover {
  box-shadow: 0 4px 14px rgba(15, 77, 55, 0.18);
  transform: translateY(-1px);
}

.dagboek-photo-row .beginjaren-sidebar__link:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

.dagboek-photo-row .beginjaren-sidebar__link img {
  border: 1px solid rgba(16, 100, 70, 0.12);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}
