/* =====================================================================
   POPZ - Instagram-blok (homepage)
   ===================================================================== */
.ig-section {
  --ig-yellow: #FEED02;
  --ig-card: 260px;
  --ig-gap: 22px;
  position: relative;
  padding: 120px 0 110px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 15% 20%, rgba(254, 237, 2, .16), transparent 32%),
    radial-gradient(circle at 85% 80%, rgba(8, 132, 212, .35), transparent 38%),
    linear-gradient(200deg, #2431b7 0%, #720b92 45%, #b2138b 75%, #fb3071 100%);
}

/* Grote omlijnde achtergrondtekst, zoals "Wij zijn" in de hero */
.ig-bg-word {
  position: absolute; left: 50%; top: 38px; transform: translateX(-50%);
  font-weight: 900; font-size: clamp(5rem, 17vw, 15rem); line-height: 1; letter-spacing: -4px;
  color: transparent; -webkit-text-stroke: 2px rgba(255, 255, 255, .13);
  white-space: nowrap; pointer-events: none; user-select: none;
}

/* ---- Kop ---- */
.ig-head { position: relative; z-index: 2; display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; flex-wrap: wrap; margin-bottom: 55px; }
.ig-handle {
  display: inline-block; padding: 7px 18px; border-radius: 50px; margin-bottom: 14px;
  background: rgba(255, 255, 255, .15); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .25);
  font-weight: 800; font-size: .85rem; letter-spacing: 1px;
}
.ig-title { margin: 0; font-weight: 900; font-size: clamp(2.8rem, 7vw, 5.2rem); line-height: .9; text-transform: uppercase; letter-spacing: -2px; }
.ig-title span { color: var(--ig-yellow); }
.ig-sub { margin: 16px 0 0; max-width: 520px; font-size: 1.05rem; line-height: 1.6; opacity: .9; }

.ig-follow {
  display: inline-flex; align-items: center; gap: 12px; padding: 16px 34px; border-radius: 100px;
  background: linear-gradient(45deg, #f9ce34 0%, #ee2a7b 45%, #6228d7 100%); background-size: 200% 200%;
  color: #fff; text-decoration: none; font-weight: 900; text-transform: uppercase; letter-spacing: 1px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .3), 0 0 0 4px rgba(255, 255, 255, .18);
  transition: transform .3s, box-shadow .3s; animation: ig-gradient 6s ease infinite;
}
.ig-follow i { font-size: 1.6rem; }
.ig-follow:hover { color: #fff; transform: translateY(-4px) scale(1.04); box-shadow: 0 20px 40px rgba(0, 0, 0, .35), 0 0 0 6px rgba(254, 237, 2, .5); }

/* ---- Bewegende rijen ---- */
.ig-marquee { position: relative; z-index: 2; display: grid; gap: var(--ig-gap); transform: rotate(-2deg); margin: 0 -40px; }
.ig-row { overflow: hidden; padding: 34px 0; margin: -20px 0; }
.ig-track {
  display: flex; gap: var(--ig-gap); width: max-content;
  animation: ig-scroll var(--ig-duration, 60s) linear infinite;
}
.ig-row.is-reverse .ig-track { animation-direction: reverse; }
.ig-row:hover .ig-track, .ig-row:focus-within .ig-track { animation-play-state: paused; }

/* ---- Kaarten ---- */
.ig-card {
  position: relative; flex: 0 0 var(--ig-card); width: var(--ig-card); aspect-ratio: 1 / 1;
  border-radius: 28px; overflow: hidden; display: block;
  border: 3px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .08);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .28);
  transform: rotate(var(--ig-tilt, 0deg)); transition: transform .45s cubic-bezier(.2, .9, .3, 1.3), border-color .3s, box-shadow .3s;
  opacity: 0; translate: 0 40px;
}
.ig-card:nth-child(4n+1) { --ig-tilt: -3deg; }
.ig-card:nth-child(4n+2) { --ig-tilt: 2deg; }
.ig-card:nth-child(4n+3) { --ig-tilt: -1deg; }
.ig-card:nth-child(4n)   { --ig-tilt: 3deg; }
.ig-section.is-in .ig-card { opacity: 1; translate: 0 0; transition: transform .45s cubic-bezier(.2, .9, .3, 1.3), border-color .3s, box-shadow .3s, opacity .7s ease var(--ig-delay, 0s), translate .7s cubic-bezier(.2, .9, .3, 1.2) var(--ig-delay, 0s); }

.ig-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease, filter .4s; }
.ig-card:hover, .ig-card:focus-visible { transform: rotate(0deg) scale(1.08); border-color: var(--ig-yellow); box-shadow: 0 24px 50px rgba(0, 0, 0, .4), 0 0 0 6px rgba(254, 237, 2, .25); z-index: 3; outline: none; }
.ig-card:hover img, .ig-card:focus-visible img { transform: scale(1.1); filter: saturate(1.2); }

.ig-badge {
  position: absolute; top: 14px; right: 14px; z-index: 2; width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: .85rem;
  background: rgba(0, 0, 0, .45); backdrop-filter: blur(6px); color: #fff;
}
.ig-overlay {
  position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px;
  padding: 20px; color: #fff; text-align: left;
  background: linear-gradient(to top, rgba(36, 6, 64, .92) 0%, rgba(114, 11, 146, .55) 45%, rgba(0, 0, 0, 0) 75%);
  opacity: 0; transition: opacity .35s;
}
.ig-overlay > i { position: absolute; top: 16px; left: 18px; font-size: 1.6rem; color: var(--ig-yellow); }
.ig-caption { font-size: .82rem; font-weight: 600; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ig-date { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--ig-yellow); }
.ig-card:hover .ig-overlay, .ig-card:focus-visible .ig-overlay { opacity: 1; }

/* ---- Popup ---- */
.ig-lightbox { border: 0; padding: 0; background: transparent; max-width: min(980px, calc(100vw - 24px)); width: 100%; color: #fff; overflow: visible; }
.ig-lightbox::backdrop { background: rgba(18, 4, 40, .78); backdrop-filter: blur(8px); }
.ig-lightbox[open] { animation: ig-pop .35s cubic-bezier(.2, .9, .3, 1.25); }
.ig-lb-inner {
  position: relative; display: grid; grid-template-columns: 1.25fr 1fr; overflow: hidden; border-radius: 32px;
  background: linear-gradient(160deg, rgba(41, 50, 129, .97), rgba(131, 31, 143, .97) 60%, rgba(237, 11, 134, .97));
  border: 1px solid rgba(255, 255, 255, .25); box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.ig-lb-media { margin: 0; background: #000; aspect-ratio: 1 / 1; }
.ig-lb-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ig-lb-body { padding: 44px 34px 34px; display: flex; flex-direction: column; gap: 16px; max-height: min(80vh, 620px); overflow: auto; }
.ig-lb-user { font-weight: 900; letter-spacing: .5px; display: flex; align-items: center; gap: 10px; }
.ig-lb-user i { font-size: 1.5rem; color: var(--ig-yellow, #FEED02); }
.ig-lb-caption { margin: 0; white-space: pre-line; line-height: 1.6; font-size: .95rem; }
.ig-lb-date { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: #FEED02; }
.ig-lb-link {
  margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 26px; border-radius: 50px; background: #FEED02; color: #000; text-decoration: none;
  font-weight: 900; text-transform: uppercase; font-size: .85rem; transition: transform .25s;
}
.ig-lb-link:hover { color: #000; transform: scale(1.05); }
.ig-lb-close, .ig-lb-nav {
  position: absolute; z-index: 3; width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
  background: rgba(255, 255, 255, .92); color: #000; transition: transform .2s, background .2s;
}
.ig-lb-close:hover, .ig-lb-nav:hover { background: #FEED02; transform: scale(1.1); }
.ig-lb-close { top: 14px; right: 14px; }
.ig-lb-nav { top: 50%; margin-top: -23px; }
.ig-lb-prev { left: 14px; }
.ig-lb-next { right: calc(44.4% + 14px); }

/* ---- Animaties ---- */
@keyframes ig-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes ig-gradient { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes ig-pop { from { opacity: 0; transform: scale(.9) translateY(20px); } to { opacity: 1; transform: none; } }

/* Minder beweging gewenst: geen loop, gewoon horizontaal scrollen */
@media (prefers-reduced-motion: reduce) {
  .ig-marquee { transform: none; margin: 0; }
  .ig-row { overflow-x: auto; scrollbar-width: none; }
  .ig-track { animation: none; padding: 0 20px; }
  .ig-card[aria-hidden="true"] { display: none; }
  .ig-card, .ig-section.is-in .ig-card { opacity: 1; translate: none; transition: none; }
  .ig-follow { animation: none; }
}

/* ---- Tablet en telefoon ---- */
@media (max-width: 991px) {
  .ig-section { --ig-card: 210px; --ig-gap: 16px; padding: 90px 0 80px; }
  .ig-head { margin-bottom: 40px; }
}
@media (max-width: 767px) {
  .ig-lb-inner { grid-template-columns: 1fr; max-height: 90vh; overflow: auto; }
  .ig-lb-body { padding: 24px 22px 26px; max-height: none; }
  .ig-lb-next { right: 14px; }
  .ig-lb-nav { top: calc((100vw - 24px) / 2); }
}
@media (max-width: 575px) {
  .ig-section { --ig-card: 160px; --ig-gap: 12px; }
  .ig-card { border-radius: 20px; }
  .ig-head { flex-direction: column; align-items: flex-start; }
  .ig-follow { padding: 14px 26px; }
  .ig-overlay { display: none; }
}
