/**
 * D.S. van Duin Beheer B.V. – layout & componenten
 */

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100000;
  padding: 0.5rem 1rem;
  background: var(--vdbv-navy, #000080);
  color: #fff;
  clip: auto;
  width: auto;
  height: auto;
  margin: 0;
}

.container {
  width: min(1100px, 92vw);
  margin-inline: auto;
  padding-inline: 1rem;
}

/* ——— Header ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--vdbv-line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: box-shadow 0.2s ease;
}

.site-header.is-scrolled {
  box-shadow: var(--shadow);
}

.site-header .header-inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.75rem 1rem;
}

.primary-nav {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex: 0 0 auto;
  margin-left: auto;
  min-width: 0;
}

/* Desktopmenu: wrapper zodat op mobiel de hele blok te verbergen is (WP voegt o.a. .menu toe op de ul) */
.primary-nav-desktop {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 auto;
  min-width: 0;
}

.site-brand .custom-logo-link,
.site-brand .custom-logo {
  display: block;
  line-height: 0;
}

.site-brand .custom-logo,
.site-brand .vdbv-theme-logo {
  max-height: 52px;
  width: auto;
  height: auto;
}

.site-title-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--vdbv-navy);
  text-decoration: none;
}

.primary-nav .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.primary-nav .nav-links a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--vdbv-text);
  text-decoration: none;
}

.primary-nav .nav-links a:hover,
.primary-nav .nav-links a:focus-visible {
  color: var(--vdbv-navy);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Hamburger (mobiel) — navy op lichte header */
.hamburger {
  display: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  min-width: 44px;
  min-height: 44px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
  display: block;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--vdbv-navy, #000080);
  border-radius: 3px;
  opacity: 1;
  transition: transform 0.25s ease-in-out, opacity 0.25s ease-in-out, width 0.25s;
}

.hamburger-inner {
  top: 50%;
  margin-top: -10.5px;
}

.hamburger-inner::before {
  content: "";
  top: 9px;
  left: 50%;
  transform: translateX(-50%);
}

.hamburger-inner::after {
  content: "";
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
}

#menu-toggle:checked ~ .site-header .hamburger {
  background: rgba(0, 0, 128, 0.1);
  border-radius: 50%;
}

#menu-toggle:checked ~ .site-header .hamburger-inner {
  opacity: 0;
  width: 0;
}

#menu-toggle:checked ~ .site-header .hamburger-inner::before {
  top: 50%;
  margin-top: -1.5px;
  transform: translateX(-50%) rotate(45deg);
  background: var(--vdbv-navy, #000080);
}

#menu-toggle:checked ~ .site-header .hamburger-inner::after {
  top: 50%;
  margin-top: -1.5px;
  transform: translateX(-50%) rotate(-45deg);
  background: var(--vdbv-navy, #000080);
}

.mobile-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 100vw);
  min-width: 280px;
  height: 100vh;
  height: 100dvh;
  background: var(--vdbv-navy, #000080);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.35);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 10050;
  overflow-y: auto;
  overflow-x: hidden;
  visibility: visible;
}

#menu-toggle:checked ~ .mobile-panel {
  transform: translateX(0);
  z-index: 10050;
}

.mobile-panel-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 1rem 1rem 1rem 1.5rem;
  background: var(--vdbv-navy, #000080);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 10020;
}

.mobile-close {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem 0.6rem 0.75rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  background: var(--vdbv-accent, #2563eb);
  border-radius: 999px;
  min-height: 48px;
  color: #fff;
  text-decoration: none;
  border: none;
}

.mobile-close:hover,
.mobile-close:focus-visible {
  background: #1d4ed8;
  color: #fff;
  outline: none;
}

.mobile-close-text {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mobile-close-icon {
  position: relative;
  display: block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.mobile-close-icon::before,
.mobile-close-icon::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 22px;
  height: 2.5px;
  background: #fff;
  border-radius: 2px;
  transform: translateY(-50%) rotate(45deg);
}

.mobile-close-icon::after {
  transform: translateY(-50%) rotate(-45deg);
}

.mobile-panel-inner {
  padding: 1.25rem 1.5rem 2rem;
  position: relative;
  z-index: 1;
}

.mobile-links,
.mobile-panel .mobile-panel-inner > ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.mobile-panel li {
  display: block;
  margin: 0;
}

.mobile-panel .mobile-panel-inner a,
.mobile-links a,
.mobile-panel .menu-item a,
.mobile-panel ul li a {
  display: block;
  padding: 1rem 0;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.03em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  transition: background 0.2s;
  white-space: normal;
  word-wrap: break-word;
}

.mobile-panel .menu-item a:hover,
.mobile-panel ul li a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.mobile-panel .sub-menu {
  list-style: none;
  margin: 0;
  padding-left: 1.25rem;
}

.mobile-panel .sub-menu a {
  font-size: 0.95rem;
  color: #fff;
}

.menu-toggle-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mobile-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(15, 23, 42, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  cursor: pointer;
}

body:has(#menu-toggle:checked) {
  overflow: hidden;
}

@media (max-width: 900px) {
  /* Hele desktopmenu verbergen; ul kan door WP/plugins extra classes/keten hebben */
  .primary-nav-desktop {
    display: none !important;
  }

  .primary-nav .hamburger {
    display: flex !important;
  }

  .mobile-panel {
    display: block !important;
    visibility: visible !important;
  }

  #menu-toggle:checked ~ .mobile-backdrop {
    display: block;
    opacity: 1;
    pointer-events: auto;
    z-index: 10040;
  }

  #menu-toggle:checked ~ .mobile-panel {
    transform: translateX(0);
    z-index: 10050;
  }

  .site-header .header-inner {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .site-brand {
    position: relative;
    z-index: 1;
    text-align: left;
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc(100% - 3.25rem);
  }

  .site-brand .custom-logo-link,
  .site-brand .custom-logo {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .mobile-panel {
    width: 100%;
    min-width: 100%;
  }

  .mobile-panel-inner {
    padding: 1.5rem 1.25rem 2rem;
  }
}

@media (min-width: 901px) {
  .menu-toggle-input:checked ~ .mobile-backdrop {
    display: none !important;
  }

  .menu-toggle-input:checked ~ .mobile-panel {
    transform: translateX(100%) !important;
  }

  .mobile-panel {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none;
  }

  .mobile-backdrop {
    display: none !important;
  }

  .primary-nav .hamburger {
    display: none !important;
  }
}

/* ——— Hero ——— */
.hero {
  position: relative;
  min-height: min(78vh, 720px);
  display: flex;
  align-items: center;
  padding-block: 4rem 4.5rem;
  background-color: var(--vdbv-navy);
  background-size: cover;
  background-position: center;
}

.hero--has-image {
  color: #fff;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(0, 0, 128, 0.92) 0%,
    rgba(0, 0, 128, 0.55) 45%,
    rgba(37, 99, 235, 0.35) 100%
  );
  pointer-events: none;
}

.hero--has-image .hero__inner {
  position: relative;
  z-index: 1;
}

.hero:not(.hero--has-image) .hero__overlay {
  opacity: 0;
}

.hero:not(.hero--has-image) {
  background-image: linear-gradient(145deg, #000080 0%, #1e3a8a 55%, #2563eb 100%);
  color: #fff;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  max-width: 20ch;
}

.hero__subtitle {
  font-size: 1.05rem;
  max-width: 52ch;
  margin: 0 0 1.75rem;
  opacity: 0.95;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.35rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn--primary {
  background: var(--vdbv-accent);
  color: #fff;
  border-color: var(--vdbv-accent);
}

.btn--primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}

.btn--secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.85);
}

.hero:not(.hero--has-image) .btn--secondary,
.hero.hero--has-image .btn--secondary {
  color: #fff;
}

.btn--secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.section--contact .btn--primary {
  color: #fff;
}

/* ——— Sections ——— */
.section {
  padding-block: 4rem;
}

.section__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--vdbv-navy);
  margin: 0 0 1.5rem;
}

.section__prose {
  font-size: 1.05rem;
  max-width: 65ch;
}

.section__prose p {
  margin: 0;
}

/* Over ons met optionele foto */
.section--about {
  position: relative;
  background: var(--vdbv-surface);
  overflow: hidden;
}

.section--about.section--has-bg {
  background-size: cover;
  background-position: center;
  color: var(--vdbv-text);
}

.section__overlay {
  display: none;
}

.section--about.section--has-bg .section__overlay {
  display: block;
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(248, 250, 252, 0.97) 0%,
    rgba(248, 250, 252, 0.88) 50%,
    rgba(248, 250, 252, 0.75) 100%
  );
  pointer-events: none;
}

.section--about.section--has-bg .section__inner {
  position: relative;
  z-index: 1;
}

/* Diensten grid */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .service-grid {
    grid-template-columns: 1fr;
  }
}

.service-card {
  background: #fff;
  border: 1px solid var(--vdbv-line);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem;
  box-shadow: var(--shadow);
}

.service-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--vdbv-navy);
  margin: 0 0 0.75rem;
}

.service-card p {
  margin: 0;
  color: var(--vdbv-muted);
  font-size: 0.98rem;
}

/* Waarom */
.section--why {
  background: linear-gradient(180deg, #fff 0%, var(--vdbv-surface) 100%);
}

.why-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 800px) {
  .why-grid {
    grid-template-columns: 1fr;
  }
}

.why-item {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--vdbv-line);
}

.why-item__icon {
  display: flex;
  color: var(--vdbv-accent);
  margin-bottom: 0.75rem;
}

.why-svg {
  display: block;
}

.why-item__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--vdbv-navy);
  margin: 0 0 0.35rem;
}

.why-item p {
  margin: 0;
  color: var(--vdbv-muted);
  font-size: 0.95rem;
}

/* Contact */
.section--contact {
  border-top: 1px solid var(--vdbv-line);
  padding-bottom: 5rem;
}

.contact__address {
  font-weight: 600;
  color: var(--vdbv-text);
  margin: 0 0 1.25rem;
}

.contact__notice {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  max-width: 50ch;
}

.contact__notice--ok {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.contact__notice--error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.contact-form {
  max-width: 520px;
}

.contact-form__field {
  margin: 0 0 1rem;
}

.contact-form__field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: var(--vdbv-text);
}

.contact-form__field input,
.contact-form__field textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--vdbv-line);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
}

.contact-form__field input:focus-visible,
.contact-form__field textarea:focus-visible {
  outline: 2px solid var(--vdbv-accent);
  outline-offset: 1px;
}

.contact-form__hp {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

.contact-form__submit {
  margin: 1.25rem 0 0;
}

/* Contact Form 7 — zelfde visuele taal als native formulier */
.contact-form--cf7 {
  max-width: 520px;
}

.contact-form--cf7 .wpcf7 {
  margin: 0;
}

.contact-form--cf7 .wpcf7-form p {
  margin: 0 0 1rem;
}

.contact-form--cf7 .wpcf7-form label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: var(--vdbv-text);
}

.contact-form--cf7 .wpcf7-form input[type="text"],
.contact-form--cf7 .wpcf7-form input[type="email"],
.contact-form--cf7 .wpcf7-form input[type="tel"],
.contact-form--cf7 .wpcf7-form input[type="url"],
.contact-form--cf7 .wpcf7-form input[type="number"],
.contact-form--cf7 .wpcf7-form select,
.contact-form--cf7 .wpcf7-form textarea {
  width: 100%;
  max-width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--vdbv-line);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  box-sizing: border-box;
}

.contact-form--cf7 .wpcf7-form textarea {
  min-height: 8rem;
}

.contact-form--cf7 .wpcf7-form input:focus-visible,
.contact-form--cf7 .wpcf7-form select:focus-visible,
.contact-form--cf7 .wpcf7-form textarea:focus-visible {
  outline: 2px solid var(--vdbv-accent);
  outline-offset: 1px;
}

.contact-form--cf7 .wpcf7-form input.wpcf7-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  padding: 0.65rem 1.35rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius);
  cursor: pointer;
  border: 2px solid var(--vdbv-accent);
  background: var(--vdbv-accent);
  color: #fff;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.contact-form--cf7 .wpcf7-form input.wpcf7-submit:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.contact-form--cf7 .wpcf7-not-valid-tip {
  font-size: 0.85rem;
  margin-top: 0.25rem;
  color: #991b1b;
}

.contact-form--cf7 .wpcf7-response-output {
  margin: 1rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
}

.contact-form--cf7 .wpcf7-mail-sent-ok {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.contact-form--cf7 .wpcf7-validation-errors,
.contact-form--cf7 .wpcf7-mail-sent-ng {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Footer */
.site-footer {
  margin-top: auto;
  padding-block: 2rem 2.5rem;
  background: var(--vdbv-navy);
  color: rgba(255, 255, 255, 0.88);
}

.footer-copy {
  margin: 0;
  font-size: 0.9rem;
  text-align: center;
}

.footer-sep {
  margin: 0 0.5rem;
  opacity: 0.6;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.92);
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: #fff;
}

.site-footer .footer-link {
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
}

.site-footer .footer-link:hover,
.site-footer .footer-link:focus-visible {
  color: #fff;
  border-bottom-color: var(--vdbv-accent-soft, #dbeafe);
  outline: 2px solid transparent;
  outline-offset: 2px;
}

/* One-page main */
.one-page .site-main {
  padding: 0;
}

/* ——— Responsive (mobiel) ——— */
@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding-block: 3rem 3.5rem;
  }

  .hero__title {
    max-width: none;
  }

  .section {
    padding-block: 3rem;
  }

  .footer-copy {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.35rem 0.5rem;
    line-height: 1.5;
    padding-inline: 0.5rem;
  }

  .footer-sep {
    margin: 0 0.25rem;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(100%, 100vw);
    padding-inline: 1rem;
  }

  .hero__cta {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__cta .btn {
    width: 100%;
    text-align: center;
  }
}
