/*
Theme Name: opfri-service
Author: STUDIO/MD
Description: Een klassiek WordPress-thema voor Opfri Service.
Version: 1.0.8
Requires at least: 5.8
Requires PHP: 7.4
Text Domain: opfri-service
*/

body.admin-bar #page > header.sticky { top: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar #page > header.sticky { top: 46px; }
}

.entry-content {
  color: #5b403a;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

:where(.entry-content) p { margin: 0 0 1rem; }
:where(.entry-content) h1,
:where(.entry-content) h2,
:where(.entry-content) h3,
:where(.entry-content) h4,
:where(.entry-content) h5,
:where(.entry-content) h6 {
  color: #181c23;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 2rem 0 0.75rem;
}
:where(.entry-content) h1 { font-size: 40px; line-height: 1.2; }
:where(.entry-content) h2 { font-size: 20px; line-height: 1.4; letter-spacing: 0; font-weight: 600; }
:where(.entry-content) h3 { font-size: 18px; line-height: 1.55; letter-spacing: 0; font-weight: 600; }
:where(.entry-content) h4 { font-size: 16px; line-height: 1.5; letter-spacing: 0; }
:where(.entry-content) h5 { font-size: 14px; line-height: 1.45; letter-spacing: 0; }
:where(.entry-content) h6 { font-size: 12px; line-height: 1.35; letter-spacing: 0.04em; }

.entry-content ul,
.entry-content ol {
  margin: 1rem 0;
  padding-inline-start: 1.5rem;
}
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { padding-inline-start: 0.15rem; }
.entry-content li + li { margin-top: 0.5rem; }
.entry-content li > ul,
.entry-content li > ol { margin-block: 0.5rem; }
.entry-content a { color: #b22300; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.18em; transition: text-decoration-color 0.15s ease; }
.entry-content a:hover { text-decoration-color: currentColor; }
.entry-content strong,
.entry-content b { color: #181c23; font-weight: 700; }
.entry-content blockquote { margin: 1.5rem 0; padding: 0.75rem 1rem; border-left: 2px solid #b22300; color: #5b403a; }
.entry-content blockquote > :last-child { margin-bottom: 0; }
.entry-content hr { margin: 2rem 0; border: 0; border-top: 1px solid #dfe2ec; }
.entry-content table { width: 100%; margin: 1.5rem 0; border-collapse: collapse; text-align: left; }
.entry-content th,
.entry-content td { padding: 0.75rem; border: 1px solid #dfe2ec; }
.entry-content th { color: #181c23; background: #f1f3fd; font-weight: 700; }
.entry-content figure { margin: 1.5rem 0; }
.entry-content img,
.entry-content video,
.entry-content iframe { max-width: 100%; }
.entry-content img,
.entry-content video { height: auto; }
.entry-content figcaption { margin-top: 0.5rem; color: #8f7069; font-size: 14px; line-height: 1.45; }
.entry-content pre { overflow-x: auto; margin: 1.5rem 0; padding: 1rem; border-radius: 0.5rem; background: #181c23; color: #f9f9ff; }
.entry-content code { padding: 0.1em 0.3em; border-radius: 0.25rem; background: #f1f3fd; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.9em; }
.entry-content pre code { padding: 0; background: transparent; color: inherit; font-size: inherit; }
.entry-content > :first-child { margin-top: 0; }
.entry-content > :last-child { margin-bottom: 0; }

@media (max-width: 640px) {
  :where(.entry-content) h1 { font-size: 30px; line-height: 1.27; }
  .entry-content th,
  .entry-content td { padding: 0.5rem; }
}

.opfri-project-slider-controls {
  display: flex;
  flex: 0 0 auto;
  gap: 0.75rem;
}

.opfri-project-slider-controls button {
  display: inline-flex;
  width: 2.75rem;
  height: 2.75rem;
  align-items: center;
  justify-content: center;
  border: 1px solid #dfe2ec;
  border-radius: 0.75rem;
  background: #fff;
  color: #181c23;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.opfri-project-slider-controls button:hover {
  border-color: #e84a27;
  background: #fff7f4;
}

.opfri-project-slider-controls button:focus-visible,
.opfri-project-slider:focus-visible {
  outline: 3px solid #e84a27;
  outline-offset: 3px;
}

.opfri-project-slider {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  padding: 0.25rem 0 1rem;
  scroll-padding-inline: 0.25rem;
  scroll-snap-type: x mandatory;
  scrollbar-color: #dfe2ec transparent;
  scrollbar-width: thin;
}

.opfri-project-slider > .opfri-project-slide {
  flex: 0 0 min(86%, 27rem);
  scroll-snap-align: start;
}

@media (min-width: 640px) {
  .opfri-project-slider > .opfri-project-slide {
    flex-basis: calc(50% - 1rem);
  }
}

.opfri-service-detail-content > :first-child {
  margin-top: 0;
}
.opfri-service-detail-content > :last-child {
  margin-bottom: 0;
}
.opfri-service-detail-content h3 {
  margin: 1.75rem 0 .75rem;
  color: #202a35;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
}
.opfri-service-detail-content p {
  margin: 0 0 1rem;
}
.opfri-service-detail-content a:not(.opfri-button) {
  color: #e84a27;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: .15em;
}

.opfri-realisatie-gallery__grid {
  grid-auto-flow: row;
}

.opfri-realisatie-gallery__item {
  min-height: 0;
  aspect-ratio: 16 / 9;
}

.opfri-realisatie-gallery__more {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(24 28 35 / .68);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.02em;
  pointer-events: none;
}

.opfri-hero-image-slider__slide {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.opfri-hero-image-slider__slide[hidden] {
  display: none !important;
}
.opfri-hero-image-slider__gradient {
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to top, rgb(15 23 42 / .48), transparent 38%);
}
.opfri-hero-image-slider__arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  display: flex;
  width: 2.75rem;
  height: 2.75rem;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  border: 1px solid rgb(255 255 255 / .5);
  border-radius: 9999px;
  background: rgb(15 23 42 / .5);
  color: #fff;
  cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
}
.opfri-hero-image-slider__arrow:hover {
  transform: translateY(-50%) scale(1.05);
  background: rgb(15 23 42 / .78);
}
.opfri-hero-image-slider__arrow.is-previous {
  left: 1rem;
}
.opfri-hero-image-slider__arrow.is-next {
  right: 1rem;
}
.opfri-hero-image-slider__arrow .material-symbols-outlined {
  font-size: 1.5rem;
}
.opfri-hero-image-slider__dots {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 1rem;
  left: 0;
  display: flex;
  justify-content: center;
  gap: .5rem;
}
.opfri-hero-image-slider__dots button {
  width: .55rem;
  height: .55rem;
  padding: 0;
  border: 1px solid #fff;
  border-radius: 9999px;
  background: rgb(255 255 255 / .55);
  cursor: pointer;
}
.opfri-hero-image-slider__dots button[aria-current="true"] {
  width: 1.5rem;
  background: #fff;
}
.opfri-hero-image-slider__arrow:focus-visible,
.opfri-hero-image-slider__dots button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

@media (min-width: 640px) {
  .opfri-realisatie-gallery__grid {
    grid-auto-rows: 12rem;
    grid-auto-flow: dense;
  }
  .opfri-realisatie-gallery__item {
    aspect-ratio: auto;
  }
  .opfri-realisatie-gallery__item:nth-child(1) {
    grid-column: span 2;
  }
}

@media (min-width: 1024px) {
  .opfri-realisatie-gallery__grid {
    grid-auto-rows: 11rem;
  }
  .opfri-realisatie-gallery__item:nth-child(1) {
    grid-row: span 2;
  }
  .opfri-realisatie-gallery__item:nth-child(4) {
    grid-row: span 2;
  }
  .opfri-realisatie-gallery__item:nth-child(5) {
    grid-column: span 2;
    grid-row: span 2;
  }
}

@media (min-width: 1024px) {
  .opfri-project-slider > .opfri-project-slide {
    flex-basis: calc(33.333% - 1.34rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .opfri-project-slider {
    scroll-behavior: auto;
  }
}

/* Mobile primary navigation */
.opfri-mobile-nav-toggle {
  display: none;
}
.opfri-mobile-nav {
  display: none !important;
}
@media (max-width: 1023.98px) {
  .opfri-mobile-nav-toggle {
    display: inline-flex;
    width: 2.75rem;
    height: 2.75rem;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border: 1px solid rgb(226 232 240 / .9);
    border-radius: .75rem;
    background: #fff;
    color: #181c23;
    cursor: pointer;
  }
  .opfri-mobile-nav-toggle .material-symbols-outlined {
    font-size: 24px;
  }
  .opfri-mobile-nav[hidden] {
    display: none !important;
  }
  .opfri-mobile-nav:not([hidden]) {
    display: flex !important;
    flex-direction: column;
    gap: .25rem;
    max-height: calc(100vh - 7rem);
    overflow-y: auto;
    padding: .5rem 1.5rem 1rem;
    border-top: 1px solid rgb(226 232 240 / .8);
    background: rgb(255 255 255 / .98);
  }
  .opfri-mobile-nav__cta {
    margin-top: .5rem;
    padding-top: 1rem;
    border-top: 1px solid rgb(226 232 240 / .8);
  }
  .opfri-mobile-nav > .opfri-mobile-nav__cta > a,
  .opfri-mobile-nav > .opfri-mobile-nav__cta > a:hover {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
  }
  .opfri-mobile-nav > a,
  .opfri-mobile-nav > div > a,
  .opfri-mobile-nav > .relative > a {
    display: flex;
    width: 100%;
    min-height: 2.75rem;
    align-items: center;
    justify-content: space-between;
    padding: .65rem .75rem;
    border-radius: .65rem;
    color: #334155;
    font-size: 15px;
    text-decoration: none;
  }
  .opfri-mobile-nav > a:hover,
  .opfri-mobile-nav > div > a:hover,
  .opfri-mobile-nav > .relative > a:hover {
    background: #f8fafc;
    color: #0f172a;
  }
  .opfri-mobile-nav .absolute.top-full.left-0 {
    position: static;
    display: block;
    width: auto;
    padding: 0 0 .25rem .75rem;
  }
  .opfri-mobile-nav .absolute.top-full.left-0 > div {
    gap: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .opfri-mobile-nav .absolute.top-full.left-0 a {
    display: flex;
    min-height: 2.5rem;
    align-items: center;
    padding: .5rem .75rem;
    border-radius: .5rem;
    color: #475569;
    font-size: 14px;
    text-decoration: none;
  }
  .opfri-mobile-nav .absolute.top-full.left-0 a:hover {
    background: #f8fafc;
    color: #0f172a;
  }
}


/* Keep the project-card image flush with the full image frame. */
#projects-grid .project-card > div:first-child > div:first-child {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
#projects-grid .project-card > div:first-child > div:first-child > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

/* Detail-page project cards: ensure the image fills its 16:9 frame. */
.opfri-detail-project-image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.opfri-detail-project-image__img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

/* Click-to-enlarge controls for the realisation gallery. */
.opfri-gallery-trigger {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: zoom-in;
}
.opfri-realisatie-gallery .opfri-gallery-trigger {
  inset: 0 !important;
}
.opfri-gallery-trigger:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -5px;
}
.opfri-realisatie-gallery .opfri-gallery-trigger__image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  margin: 0;
}
.opfri-gallery-trigger__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(45 49 56 / .6), transparent 65%);
  pointer-events: none;
}
.opfri-gallery-trigger__gradient.is-thumbnail {
  background: linear-gradient(to top, rgb(45 49 56 / .7), transparent 65%);
}
.opfri-gallery-trigger__caption {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  color: #fff;
  pointer-events: none;
}
.opfri-gallery-trigger__caption.is-thumbnail {
  right: .75rem;
  bottom: .75rem;
  left: .75rem;
}
.opfri-gallery-lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 4.5rem 4rem 2rem;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: #fff;
}
.opfri-gallery-lightbox::backdrop {
  background: rgb(10 14 20 / .92);
  backdrop-filter: blur(5px);
}
.opfri-gallery-lightbox__figure {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 0;
}
.opfri-gallery-lightbox__figure img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 9rem);
  object-fit: contain;
  border-radius: .5rem;
}
.opfri-gallery-lightbox__figure figcaption {
  max-width: 80ch;
  color: #fff;
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
}
.opfri-gallery-lightbox__figure figcaption[hidden] {
  display: none;
}
.opfri-gallery-lightbox__close,
.opfri-gallery-lightbox__nav {
  position: fixed;
  z-index: 2;
  display: flex;
  width: 3rem;
  height: 3rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgb(255 255 255 / .3);
  border-radius: 9999px;
  background: rgb(24 28 35 / .72);
  color: #fff;
  cursor: pointer;
  transition: background-color .2s ease;
}
.opfri-gallery-lightbox__close:hover,
.opfri-gallery-lightbox__nav:hover {
  background: #b22300;
}
.opfri-gallery-lightbox__close {
  top: 1.25rem;
  right: 1.25rem;
}
.opfri-gallery-lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
}
.opfri-gallery-lightbox__nav.is-previous {
  left: 1rem;
}
.opfri-gallery-lightbox__nav.is-next {
  right: 1rem;
}
.opfri-gallery-lightbox__close .material-symbols-outlined,
.opfri-gallery-lightbox__nav .material-symbols-outlined {
  font-size: 24px;
}
.opfri-gallery-lightbox button[hidden] {
  display: none;
}
@media (max-width: 640px) {
  .opfri-gallery-lightbox {
    padding: 4rem 1rem 1rem;
  }
  .opfri-gallery-lightbox__figure img {
    max-height: calc(100vh - 7rem);
  }
  .opfri-gallery-lightbox__nav.is-previous {
    left: .5rem;
  }
  .opfri-gallery-lightbox__nav.is-next {
    right: .5rem;
  }
}

.opfri-footer-legal-menu {
  column-gap: 1.5rem;
  row-gap: .5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.opfri-footer-legal-bar {
  gap: .75rem;
  padding-top: 2rem;
}
.opfri-footer-credit {
  margin: 0;
}
@media (min-width: 640px) {
  .opfri-footer-legal-bar { gap: 1.5rem; }
}

.opfri-small-page > section {
  padding-top: 4rem;
  padding-bottom: .5rem;
}
.opfri-404-title { margin-bottom: 1.5rem; }
.opfri-404-description { margin-top: 0; }
.opfri-small-page > section h1 {
  margin-bottom: .25rem;
}
.opfri-small-page > .opfri-small-page__content {
  padding-top: 1.5rem;
  padding-bottom: 4rem;
}
@media (min-width: 768px) {
  .opfri-small-page > section { padding-top: 5rem; }
  .opfri-small-page > .opfri-small-page__content {
    padding-top: 1.75rem;
    padding-bottom: 5rem;
  }
}
