/*
 * Special pages rendered by the theme instead of Elementor/Royal
 * (includes/elementor-fallback.php). The M35 story and ORGA page layout
 * styles live in main.css (.m35-story, .orga-layout); this file adds the
 * shared media grid and the "75 jaar" timeline. Values follow the Royal
 * widget settings on live.
 */

/* Media grid (Royal media grid: square 500x500 crops, 4px gutter) */
.ef-media-grid {
  display: grid;
  grid-template-columns: repeat(var(--ef-cols, 4), minmax(0, 1fr)) !important;
  gap: 4px;
}
.ef-media-item {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: 0;
  background: #111;
}
.ef-media-item > a {
  display: block;
  overflow: hidden;
}
.ef-media-item img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 300ms ease;
}
.ef-media-item > a:hover img { transform: scale(1.05); }
.ef-media-item figcaption {
  font-size: 0.95rem;
  line-height: 1.3;
  padding: 6px 0 0;
  background: #000;
}
.m35-story .m35-gallery { gap: 4px; }
.m35-story > p.ef-center { text-align: center; }
/* Body text: Light 29px/36px, as the Elementor text widgets on live */
.m35-story > p:not(.m35-full-visual) { font-size: 29px; line-height: 36px; }
/* Section headings: white, 56px, as the Elementor h1s on live */
.m35-story > h2.m35-section {
  color: #fff;
  font-family: "Gill Sans UltraBold", sans-serif;
  font-size: 56px;
  line-height: 1;
  text-transform: none;
  text-align: left;
  margin-top: 40px;
  margin-bottom: 16px;
}
/* Captions below a photo or grid: green, 16px, centred */
.m35-story > h2.m35-caption,
.m35-story > .m35-gallery + h2.m35-caption,
.m35-story > p.m35-full-visual + h2.m35-caption {
  color: #49e05f;
  font-family: "Gill Sans SemiBold", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  text-transform: none;
  text-align: center;
  margin-top: 10px;
  margin-bottom: 28px;
}
@media (max-width: 760px) {
  .m35-story > h2.m35-section { font-size: 36px; }
  .m35-story > p:not(.m35-full-visual) { font-size: 20px; line-height: 28px; }
}
.orga-voorbeelden-title { text-align: center; }
.orga-voorbeelden { max-width: 1580px; padding: 0 30px; }
/* Example titles: 15px white capitals, as Royal's title element (shown
   below the photo instead of only on hover, so they work on touch too). */
.orga-voorbeelden .ef-media-item h2 {
  font-family: "Gill Sans UltraBold", sans-serif;
  font-size: 15px;
  line-height: 1.3;
  color: #fff;
  text-transform: uppercase;
  margin: 8px 0 0;
  text-align: center;
}
.orga-voorbeelden .ef-media-item { background: none; }
.orga-voorbeelden .ef-media-item h2 a { color: inherit; text-decoration: none; }
.orga-voorbeelden .ef-media-item h2 a:hover { color: #49e05f; }
/* Calculator column: no box, scrolls with the page (as on live) */
.orga-layout .orga-layout-sidebar {
  border: 0;
  border-radius: 0;
  position: static;
  padding: 2rem 0 0;
}

@media (max-width: 1024px) {
  .m35-story .ef-media-grid,
  .orga-voorbeelden.ef-media-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (max-width: 760px) {
  .m35-story .ef-media-grid,
  .orga-voorbeelden.ef-media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .orga-voorbeelden { padding: 0 16px; }
  .orga-page-title { font-size: 26px; padding: 0 16px; overflow-wrap: break-word; }
  .orga-layout { padding: 0 16px; }
}

/* Plain flow (75 jaar page body) */
.ef-flow .ef-center,
.ef-flow h2 { text-align: center; }
.ef-flow > h2 {
  color: #49e05f;
  font-family: "Gill Sans UltraBold", sans-serif;
  font-size: 40px;
  line-height: 1;
  text-transform: uppercase;
  margin: 60px 0 40px;
}
.ef-flow > p {
  font-family: "Gill Sans Light", sans-serif;
  font-size: 34px;
  line-height: 43px;
}
@media (max-width: 767px) {
  .ef-flow > h2 { font-size: 30px; }
  .ef-flow > p { font-size: 24px; line-height: 31px; }
}
.ef-video {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 30px 0 60px;
}
.ef-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Timeline (Royal posts timeline, both-sided) */
.ef-timeline {
  --ef-line: 8px;
  --ef-dot: 36px;
  position: relative;
  margin: 0 auto 60px;
  padding: 10px 0;
}
.ef-timeline-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: var(--ef-line);
  margin-left: calc(var(--ef-line) / -2);
  background: #313131;
}
.ef-timeline-fill {
  width: 100%;
  height: 0;
  background: #49e05f;
}
.ef-timeline-year {
  position: relative;
  text-align: center;
  margin: 30px 0;
}
.ef-timeline-year span {
  display: inline-block;
  min-width: 70px;
  height: 35px;
  line-height: 35px;
  padding: 0 8px;
  border-radius: 5px;
  background: #49e05f;
  color: #000;
  font-family: "Gill Sans SemiBold", sans-serif;
  font-size: 16px;
}
.ef-timeline-entry {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--ef-dot) minmax(0, 1fr);
  column-gap: 30px;
  align-items: start;
  margin: 0 0 40px;
}
.ef-timeline-dot {
  grid-column: 2;
  grid-row: 1;
  width: var(--ef-dot);
  height: var(--ef-dot);
  margin-top: 4px;
  border-radius: 50%;
  background: #313131;
  position: relative;
  z-index: 1;
  transition: background-color 200ms ease;
}
.ef-timeline-entry.is-reached .ef-timeline-dot { background: #49e05f; }
.ef-timeline-label {
  grid-row: 1;
  margin: 0 !important;
  padding: 10px 0;
  font-size: 24px;
  line-height: 1.25;
}
.ef-timeline-date {
  display: block;
  color: #49e05f;
  font-family: "Gill Sans UltraBold", sans-serif;
  font-size: 27.2px;
}
.ef-timeline-sub {
  display: block;
  color: #fff;
  font-family: "Gill Sans Light", sans-serif;
  font-size: 25.6px;
  line-height: 32px;
}
.ef-timeline-card {
  grid-row: 1;
  position: relative;
  background: #333;
  border-radius: 4px;
  padding: 20px;
  color: #fff;
}
.ef-timeline-card::before {
  content: "";
  position: absolute;
  top: 16px;
  border: 13px solid transparent;
}
.ef-timeline-left .ef-timeline-card { grid-column: 1; }
.ef-timeline-left .ef-timeline-label { grid-column: 3; text-align: left; }
.ef-timeline-left .ef-timeline-card::before { left: 100%; border-left-color: #333; }
.ef-timeline-right .ef-timeline-card { grid-column: 3; }
.ef-timeline-right .ef-timeline-label { grid-column: 1; text-align: right; }
.ef-timeline-right .ef-timeline-card::before { right: 100%; border-right-color: #333; }
.ef-timeline-media { margin: 0 0 15px; }
.ef-timeline-media img {
  display: block;
  width: 100%;
  height: auto;
}
.ef-timeline-text { padding: 5px 5px 7px; }
.ef-timeline-text p {
  margin: 0 !important;
  font-size: 22.4px;
  line-height: 1.4;
}

@media (max-width: 767px) {
  .ef-timeline-line { left: 15px; }
  .ef-timeline-year { text-align: left; }
  .ef-timeline-year span { min-width: 36px; height: 24px; line-height: 24px; font-size: 13px; padding: 0 4px; }
  .ef-timeline-entry {
    grid-template-columns: 30px minmax(0, 1fr);
    column-gap: 22px;
  }
  .ef-timeline-dot { grid-column: 1; width: 30px; height: 30px; }
  .ef-timeline-left .ef-timeline-label,
  .ef-timeline-right .ef-timeline-label { grid-column: 2; grid-row: 1; text-align: left; padding: 0 0 10px; font-size: 20px; }
  .ef-timeline-left .ef-timeline-card,
  .ef-timeline-right .ef-timeline-card { grid-column: 2; grid-row: 2; padding: 10px; }
  .ef-timeline-dot { grid-row: 1; }
  .ef-timeline-left .ef-timeline-card::before,
  .ef-timeline-right .ef-timeline-card::before { left: auto; right: 100%; border-left-color: transparent; border-right-color: #333; border-width: 10px; }
  .ef-timeline-text { padding: 0 5px; }
  .ef-timeline-text p { font-size: 18px; }
}
