/* blog.css */
/* Algemene reset */
html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* Stijlen voor het hele body */
body {
    font-family: Arial, sans-serif;
    background-image: linear-gradient(#205533, #5d906f);
}

/* Container voor de hoofdinhoud */
.container {
    width: 90%;
    max-width: 800px;
    margin: 20px auto;
    text-align: center;
    flex: 1; /* Zorgt ervoor dat de container de resterende hoogte opvult */
}

/* Titel */
h1 {
    color: #333;
    margin-bottom: 20px;
}

/* Post styling */
.post {
    background-color: #fff;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.post h2 {
    color: #333;
    font-size: 24px;
}

.post .date {
    color: #777;
    font-size: 14px;
    margin-bottom: 10px;
}

/* Thumbnail styling */
.thumbnails {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s;
}

.thumbnail:hover {
    transform: scale(1.05);
}

/* Overlay styling voor afbeeldingsweergave */
.overlay {
    display: none;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
}

.overlay-content {
    max-width: 80%;
    max-height: 80%;
    border-radius: 8px;
    object-fit: contain;
}

.closeOverlay, .prev, .next {
    position: absolute;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    user-select: none;
}

.closeOverlay {
    top: 20px;
    right: 20px;
    font-size: 30px;
}

.prev, .next {
    top: 50%;
    transform: translateY(-50%);
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}

/* Footer styling */
.footer {
    width: 100%;
    background-color: #205533;
    color: #fff;
    padding: 20px 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-sizing: border-box;
}

.footer-left, .footer-mid, .footer-right {
    flex: 1;
    text-align: center;
}

.footer-left p, .footer-mid p, .footer-right p {
    margin: 5px 0;
}

.footer img {
    max-width: 150px;
}

.footer a {
    color: #ddd;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.footer a:hover {
    color: #ffd700; /* Gouden hover-effect */
}

/* Scrollbar verbergen */
::-webkit-scrollbar {
    display: none;
}

/* ===== Verbeterde Pagination CSS (vervang je huidige pagination-blok) ===== */
:root {
  --pg-bg: #ffffff;
  --pg-fg: #205533;
  --pg-border: #cfd8d3;
  --pg-hover-bg: #205533;
  --pg-hover-fg: #ffffff;
  --pg-active-bg: #2b6d45;
  --pg-active-fg: #ffffff;
  --pg-disabled-fg: #9aa3a0;
  --pg-gap-fg: #8aa295;
  --pg-shadow: 0 2px 8px rgba(0,0,0,.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --pg-bg: #0f1a14;
    --pg-fg: #dbe7e1;
    --pg-border: #2c3a33;
    --pg-hover-bg: #2b6d45;
    --pg-hover-fg: #ffffff;
    --pg-active-bg: #3a8a5a;
    --pg-active-fg: #ffffff;
    --pg-disabled-fg: #70847c;
    --pg-gap-fg: #7ea08f;
    --pg-shadow: 0 2px 10px rgba(0,0,0,.25);
  }
}

.pagination {
  display: flex;
  gap: .4rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin: 1.25rem 0;
  padding: .5rem;
}

/* ===== Smooth fragment transitions voor AJAX wissels ===== */
#posts-wrapper {
  transition: opacity .25s ease, transform .25s ease;
  will-change: opacity, transform;
}
#posts-wrapper.is-leaving {
  opacity: 0;
  transform: translateY(6px);
}
#posts-wrapper.is-entering {
  opacity: 0; /* wordt direct daarna weer verwijderd om fade-in te triggeren */
}

/* ===== Subtiele top loading bar tijdens AJAX ===== */
body.is-loading::before {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #2b6d45, #5d906f, #2b6d45);
  background-size: 200% 100%;
  animation: blogLoading 1s linear infinite;
  z-index: 9999;
}

@keyframes blogLoading {
  0%   { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}

/* Respecteer reduced motion */
@media (prefers-reduced-motion: reduce) {
  #posts-wrapper { transition: none; }
  body.is-loading::before { animation: none; }
}

.pagination .page-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 2.25rem;   /* grotere klikvlakken */
  height: 2.25rem;
  padding: 0 .75rem;

  background: var(--pg-bg);
  color: var(--pg-fg);
  border: 1px solid var(--pg-border);
  border-radius: 999px;  /* pill shape */
  text-decoration: none;
  font-weight: 600;
  line-height: 1;
  box-shadow: var(--pg-shadow);
  transition:
    transform .15s ease,
    background-color .15s ease,
    color .15s ease,
    border-color .15s ease;
}

.pagination .page-link:hover {
  background: var(--pg-hover-bg);
  color: var(--pg-hover-fg);
  border-color: var(--pg-hover-bg);
  transform: translateY(-1px);
}

.pagination .page-link:focus-visible {
  outline: 3px solid rgba(43,109,69,.35);
  outline-offset: 2px;
}

.pagination .page-link.active,
.pagination .page-link[aria-current="page"] {
  background: var(--pg-active-bg);
  color: var(--pg-active-fg);
  border-color: var(--pg-active-bg);
  pointer-events: none;
  transform: none;
}

.pagination .page-link.disabled,
.pagination .page-link[aria-disabled="true"] {
  color: var(--pg-disabled-fg);
  border-color: var(--pg-border);
  background: var(--pg-bg);
  opacity: .7;
  pointer-events: none;
  box-shadow: none;
}

.pagination .gap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 .25rem;
  color: var(--pg-gap-fg);
}

/* Mobiel tweaks */
@media (max-width: 480px) {
  .pagination { gap: .3rem; }
  .pagination .page-link {
    min-width: 2rem;
    height: 2rem;
    padding: 0 .6rem;
    font-weight: 600;
    font-size: .95rem;
  }
}

/* Reduced motion respecteren */
@media (prefers-reduced-motion: reduce) {
  .pagination .page-link {
    transition: none;
  }
}
