/* Grid container */
.fc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  grid-template-rows: max-content;
  gap: 1.5rem;
  padding-bottom: 60px;
}

.fc-grid.grid-program {
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
}

/* Grid container */
.fc-grid.kaboom-cult,
.fc-grid.kaboom-anime {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, calc(50% - 1.5em)));
  grid-auto-rows: auto;
}

.fc-grid.kaboom-cult.past,
.fc-grid.kaboom-anime.past {
  grid-template-columns: repeat(auto-fit, minmax(340px, calc(25% - 1.5em)));
}


@media only screen and (max-width: 800px) {
  .fc-grid.kaboom-cult,
  .fc-grid.kaboom-anime {
    grid-template-columns: repeat(auto-fill, minmax(340px, 100%));
  }
}

/* Card */
.fc-grid article {
  background: #f2f2f2;
}

.fc-grid .fc-image {
  aspect-ratio: 16 / 9;
  background: #000;              /* zwarte achtergrond */
  display: flex;                 /* centeren */
  align-items: center;           /* verticaal centreren */
  justify-content: center;       /* horizontaal centreren */
  overflow: hidden;
}

/* Afbeelding netjes binnen het kader */
.fc-grid .fc-image img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;           /* niets afsnijden */
  display: block;
  margin-bottom: 0 !important;
}

.fc-grid:not(.kaboom-cult):not(.kaboom-anime) article:hover .fc-image img {
  transform: scale(1.05);
}

/* Title: always reserve 2 lines */
#popup-content h3,
.fc-grid h3 {
  margin: 0 !important;
  font-size: 14px !important;
  line-height: 1.2em !important;
  margin-bottom: 10px !important;

  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fc-grid h4 {
  margin: 0 !important;
  font-size: 22px !important;
  line-height: 2.6em !important;
  margin-top: -20px !important;
  text-transform: capitalize;
}

/* Director: always reserve 1 line */
.fc-grid p {
  margin: 0 !important;
  line-height: 25px;
  color: #666;
}

/* Modal*/
/* Basis: poster klikbaar */
.fc-grid .fc-image {
  position: relative;
  cursor: pointer;
  outline: none;
}

/* Alleen play-overlay tonen als article een data-trailer heeft */
.fc-grid article[data-trailer] .fc-image::after {
  content: "▶";
  position: absolute;
  inset: 0;
  display: flex;
  font-size: 20px !important;
  color: #fff;
  background: rgba(0,0,0,0.6);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  justify-content: center;
  align-items: center;
  border-radius: 150px;
  left: calc(50% - 20px);
  top: calc(50% - 20px);
  width: 40px;
  height: 40px;
}

.fc-grid article[data-trailer] .fc-image::after,
.fc-grid article[data-trailer] .fc-image:focus::after {
  opacity: 1;
}

/* Geen trailer? Geen pointer */
.fc-grid article:not([data-trailer]) .fc-image {
  cursor: default;
}

/* Kaart klikbaar maken */
.fc-grid article[data-trailer] { cursor: pointer; }
.fc-grid article:focus { outline: 2px solid currentColor; outline-offset: 4px; }
.fc-grid article > div.content {
  margin: 5%;
}
/* Tekst moet selecteerbaar blijven */
.fc-grid h3,
.fc-grid p {
  cursor: text;
}

/* Poster container */
.fc-grid .fc-image {
  position: relative;
}

/* Play badge (altijd zichtbaar bij trailer) */
/*
.fc-grid .fc-play {
  position: absolute;
  left: 0.6rem;
  bottom: 0.6rem;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: rgba(0,0,0,0.55);
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 1;
  transform: translateZ(0);
}*/

/* SVG icoon via mask (werkt modern) */
.fc-grid .fc-play::before {
  content: "";
  width: 18px;
  height: 18px;
  background: #fff;

  /* triangle play icon */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Alleen tonen als er trailer is */
.fc-grid article:not([data-trailer]) .fc-play {
  display: none;
}

/* Hover/Focus extra feedback */
.fc-grid article[data-trailer]:hover .fc-play,
.fc-grid article[data-trailer]:focus .fc-play {
  background: rgba(0,0,0,0.7);
}

/* Modal (zoals eerder, met mobile bijna fullscreen) */
.fc-modal { position: fixed; inset: 0; display: none; z-index: 99999; }
.fc-modal.is-open { display: block; }
.fc-modal__overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.7); }

.fc-modal__dialog {
  position: relative;
  width: min(900px, calc(100% - 2rem));
  margin: 6vh auto 0;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

@media (max-width: 640px) {
  .fc-modal__dialog {
	 width: calc(100% - 1rem);
	 margin: 2.5vh auto 0;
	 border-radius: 10px;
  }
}

.fc-modal__close {
  position: absolute;
  top: 0.25rem;
  right: 0.5rem;
  z-index: 2;
  font-size: 2rem;
  line-height: 1;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.fc-modal__content { aspect-ratio: 16 / 9; background: #000; }
.fc-modal__content iframe,
.fc-modal__content video {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.fc-grid .fc-image { outline: none; }
.fc-grid .fc-image:focus::after { opacity: 1; }

.fc-grid ul.meta {
  margin: 0;
  line-height: 1.4em;
  font-weight: bold;
}

.fc-grid ul.meta,
.fc-grid p {
  /*
  font-size: 13px;
  line-height: 1.4em;*/
}

.fc-grid p {
  padding-top: 10px;
}

.fc-grid ul.meta li {
  list-style: none;
}

/* Container die jij al toevoegt */
.fc-pagination {
  margin: 1.5rem 0;
}

/* WordPress output van paginate_links(type=list) */
.fc-pagination .page-numbers {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center; /* of: flex-start */
}

.fc-pagination .page-numbers li {
  margin: 0; /* reset default margins */
  padding: 0;
  list-style: none;
}

/* Links + current */
.fc-pagination .page-numbers a,
.fc-pagination .page-numbers span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 .75rem;
  border: 1px solid #ddd;
  border-radius: .5rem;
  text-decoration: none;
  line-height: 1;
}

/* Hover */
.fc-pagination .page-numbers a:hover {
  border-color: #bbb;
}

/* Huidige pagina */
.fc-pagination .page-numbers .current {
  font-weight: 600;
  border-color: #999;
}

/* Disabled (soms geeft WP prev/next als span terug) */
.fc-pagination .page-numbers .dots,
.fc-pagination .page-numbers .disabled {
  opacity: .6;
}

.cult-wrap{
  max-width: 980px;
  margin: 0 auto;
 }

.cult-grid{
  list-style: none;
  padding: 0;
  margin: 0;

  column-count: 2;
  column-gap: 14px;
}

/* mobiel: 1 kolom */
@media (max-width: 1350px){
  .cult-grid{
   column-count: 1;
  }
}

/* nodig zodat kaarten niet breken over kolommen */
.cult-grid > li{
  break-inside: avoid;
  margin-bottom: 14px;
}

.cult-grid .card{
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(17,24,39,.06);
  padding: 14px 14px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
 }

 .cult-grid .card > div {
  min-width: 0;
 }

 .cult-grid time{
  font-weight: 650;
  letter-spacing: .1px;
  line-height: 1.2;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
 }

 .cult-grid .location{
  color: #6b7280;
  font-size: 0.95rem;
  line-height: 1.25;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
 }

 .cult-grid .btn{
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  text-decoration: none;
  font-weight: 650;
  border: 1px solid rgba(0,0,0,.06);
  transition: transform .06s ease, background .15s ease, box-shadow .15s ease;
  box-shadow: 0 8px 18px rgba(17,24,39,.14);
 }

 .cult-grid .btn:hover{
  background: #0b1220;
  transform: translateY(-1px);
 }

 .cult-grid .btn:active{
  transform: translateY(0px);
  box-shadow: 0 6px 14px rgba(17,24,39,.12);
 }

 .cult-grid .btn:focus-visible{
  outline: 3px solid rgba(59,130,246,.45);
  outline-offset: 3px;
 }
/*REMOVE
a.button {
  background-color: #000;
  border-radius: 50px;
  padding:  5px 10px;
  color: #fff;
  margin-bottom: 5px;
  display: inline-block;
}
span.button{
  font-size: 22px;
  text-decoration: none !important;
}
.kaboom-anime a.button{
  text-align: center;
}
.kaboom-cult table,
.kaboom-anime table {
  border: 0 !important;
  background-color: transparent !important;
  width: auto !important;
}
.kaboom-cult table tr,
.kaboom-anime table tr {background-color: transparent !important}

.kaboom-cult table td,
.kaboom-anime table td {
  padding: 0 !important;
  border: 0 !important;
}
.kaboom-cult td.loc,
.kaboom-anime td.loc {
  font-weight: bold;
  text-align: left;
}
.kaboom-cult td.dt,
.kaboom-anime td.dt {
  padding: 0 10px !important;
}
*/

#popup-close,
a.button:hover{
  color: #eee;
  background-color: #333;
}

.year-toggle {
  display: block;
  padding: 12px 14px;
  margin: 10px 0 6px;
  border-radius: 10px;
  text-decoration: none;
  color: #0b63b6;
  background: #f2f6ff;
  border: 1px solid #d7e6ff;
  cursor: pointer;
}
.year-toggle h3 {margin-bottom:0 !important}
.year-toggle:hover {
  background: #eaf2ff;
}

.year-toggle.is-active {
  color: #083b6d;
  background: #dbeaff;
  border-color: #b8d6ff;
  font-weight: 600;
}

/* Panel animatie met dynamic max-height via JS */
.year-panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease;
  border-left: 3px solid #b8d6ff;
  padding: 0 14px; /* wordt effectief pas zichtbaar met content */
  margin: 0 0 6px;
}

/** Industry */
table.industry {
  margin: 0;
  padding: 0;
  background-color:#fcfcfc !important
}
table.industry td {
  border: 0;
  border-width: 0 !important;
}
table.industry tr:nth-child(2n+1) {
  background-color: #eee !important;
}

table.industry time {
  font-weight: bold;
}
table.industry a.title {
  text-decoration: underline;
}
table.industry td.i{width: 40px}
table.industry tr[data-text]{cursor:pointer}

#popup-overlay {
 position: fixed;
 inset: 0;
 background: rgba(0,0,0,0.6);
 display: none;
 z-index: 999;
}

#popup {
 position: fixed;
 top: 50%;
 left: 50%;
 transform: translate(-50%, -50%);
 background: #fff;
 max-width: 500px;
 width: 90%;
 padding: 25px;
 box-shadow: 0 10px 30px rgba(0,0,0,0.3);
 display: none;
 z-index: 2000;
 border-radius: 6px;
 opacity: 0;
 transform: translate(-50%, -50%) scale(0.95);
 transition: opacity 0.2s ease, transform 0.2s ease;
 max-height: 95vh;
 overflow-y: scroll;
}

#popup label {
  font-weight: bold;
  display: inline-block;
  width: 80px;
}

#popup-close {
 position: absolute;
 top: 10px;
 right: 12px;
 background: #000;
 border: none;
 font-size: 22px;
 cursor: pointer;
 color: #fff;
 padding: 0;
 width: 1.2em;
 height: 1.2em;
}
#popup-close:hover {
  color: #eee;
  background-color: #333;
}

#popup.is-open {
 opacity: 1;
 transform: translate(-50%, -50%) scale(1);
}

/* Scroll blokkeren als popup open is */
body.no-scroll {
 overflow: hidden;
 padding-right: var(--scrollbar-comp, 0px);
}

/* iOS fix: body vastzetten */
body.no-scroll {
 position: fixed;
 width: 100%;
 left: 0;
}

#popup-overlay {
 touch-action: none;
}
