/*
Theme Name: D-Tech Elektrotechniek
Theme URI: https://dtechelektrotechniek.nl/
Author: D-Tech
Description: Custom WordPress theme for D-Tech Elektrotechniek.
Version: 1.0.0
Text Domain: dtech
*/

:root {
  --bg: #080808;
  --bg-soft: #111111;
  --panel: #141414;
  --panel-2: #1a1a1a;
  --ink: #f8fbff;
  --muted: #b7b7b7;
  --line: #2a2a2a;
  --gold: #ff7a00;
  --gold-soft: rgba(255, 122, 0, 0.22);
  --blue-dark: #ff7a00;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Poppins", sans-serif;
  color: var(--ink);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
}

/* Remove WP/block-theme top offsets that can create a gap above hero on mobile Safari. */
.wp-site-blocks,
.wp-block-post-content,
.entry-content,
.site-main,
#page,
#content,
main#home {
  margin: 0 !important;
  padding: 0 !important;
}

:root :where(.wp-site-blocks) {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Force full-bleed layout when WP theme wraps page content in constrained containers. */
body.page-id-3 .entry-content,
body.page-id-3 .wp-block-post-content,
body.page-id-3 .site-main,
body.page-id-3 article.page {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.side-rail {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 92px;
  z-index: 70;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  padding: 1.2rem 0;
  background: transparent;
  border-right: 0;
}

.side-rail a {
  width: auto;
  height: auto;
  display: inline-block;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  border: 0;
  background: transparent;
  transition: all 0.25s ease;
  font-size: 1.8rem;
  font-weight: 300;
  line-height: 1;
  animation: railFloat 4.4s ease-in-out infinite;
  animation-delay: calc(var(--rail-index, 0) * 0.12s);
  will-change: transform, box-shadow, color;
  transform: translateY(var(--rail-shift, 0px));
  text-shadow: none;
}

.side-rail a:hover {
  color: #ff7a00;
  text-shadow: 0 0 6px rgba(255, 122, 0, 0.55);
  transform: translateY(var(--rail-shift, 0px)) scale(1.05);
}

.side-rail a.is-active {
  color: #ff7a00;
  text-shadow: 0 0 6px rgba(255, 122, 0, 0.6);
}

.side-rail a:nth-child(1) {
  color: #ff7a00;
}

.side-rail a:nth-child(9),
.side-rail a:nth-child(10) {
  color: #b8b8c1;
}

.rail-spacer {
  flex: 1;
}

.rail-mark {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  transform: skewX(-18deg);
}

.rail-mark span {
  display: block;
  width: 5px;
  background: #fff;
  border-radius: 1px;
}

.rail-mark span:nth-child(1) { height: 14px; opacity: 1; }
.rail-mark span:nth-child(2) { height: 16px; opacity: 0.86; }
.rail-mark span:nth-child(3) { height: 18px; opacity: 0.72; }
.rail-mark span:nth-child(4) { height: 20px; opacity: 0.58; }

@keyframes railFloat {
  0% { transform: translateY(calc(var(--rail-shift, 0px) + 0px)); }
  50% { transform: translateY(calc(var(--rail-shift, 0px) - 4px)); }
  100% { transform: translateY(calc(var(--rail-shift, 0px) + 0px)); }
}

.bg-orb {
  position: fixed;
  width: 42rem;
  height: 42rem;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  z-index: -1;
}

.orb-1 {
  top: -15rem;
  left: -18rem;
  background: rgba(255, 122, 0, 0.16);
}

.orb-2 {
  right: -18rem;
  bottom: -16rem;
  background: rgba(255, 122, 0, 0.12);
}

.container {
  width: min(1320px, 92vw);
  margin: 0 auto;
  max-width: 100%;
}

#page,
#content,
.site,
.site-main,
.entry-content,
.wp-site-blocks,
main#home {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  border-bottom: 0;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.site-header:hover {
  background: transparent;
  border-color: transparent;
}

.nav-wrap {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 108px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: "Oswald", sans-serif;
  text-decoration: none;
  position: relative;
  left: 0.7cm;
  top: 0.45rem;
}

.brand-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
  gap: 0.16rem;
  transition: opacity 0.35s ease;
}

body.intro-active .brand-stack {
  opacity: 0;
  pointer-events: none;
}

/* Keep normal hero text hidden while intro typing animation runs. */
body.intro-active .hero-copy {
  opacity: 0 !important;
  pointer-events: none;
}

.brand-name {
  font-family: "Montserrat", "Oswald", sans-serif;
  font-weight: 600;
  letter-spacing: 0.18em;
  font-size: 2rem;
  color: #d7d7d7;
  white-space: nowrap;
}

.brand-tagline {
  font-family: "Montserrat", "Poppins", sans-serif;
  font-size: 1.06rem;
  letter-spacing: 0.34em;
  color: #ff7a00;
  opacity: 0;
  transform: translateY(5px);
  transition: all 0.6s ease;
}

.brand-tagline.show {
  opacity: 0.9;
  transform: translateY(0);
}

.nav {
  display: none;
}

.nav a {
  color: #dedede;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
  position: relative;
  padding: 0.2rem 0;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.28rem;
  width: 100%;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s ease;
}

.nav a:hover::after,
.nav a.is-active::after {
  transform: scaleX(1);
}

main {
  padding: 0;
}

main#home {
  width: 100%;
  max-width: none;
  margin: 0;
}

main#home > section {
  width: 100%;
  max-width: none;
}

.hero {
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  display: grid;
  align-items: center;
  position: relative;
  isolation: isolate;
  margin: 0;
  padding: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.5) 60%, rgba(0, 0, 0, 0.8) 100%),
    radial-gradient(circle at 24% 20%, rgba(255, 122, 0, 0.22), transparent 38%),
    #050505;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  width: 100%;
  height: 100%;
  min-height: inherit;
}

.hero-logo-intro {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  background: transparent;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}


.hero-logo-card {
  width: min(92vw, 760px);
  padding: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-logo-main,
.hero-logo-sub {
  margin: 0;
  font-family: "Montserrat", "Oswald", sans-serif;
  line-height: 1;
}

.hero-logo-main {
  color: #e8e8e8;
  font-size: clamp(2rem, 8.2vw, 4rem);
  letter-spacing: 0.16em;
  font-weight: 600;
  min-height: 1em;
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.hero-logo-sub {
  margin-top: 0.55rem;
  color: #ff7a00;
  font-size: clamp(1rem, 3.2vw, 2rem);
  letter-spacing: 0.34em;
  font-weight: 500;
  min-height: 1em;
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.hero-logo-card {
  animation:
    logoIntroIn 0.9s ease-out both,
    logoIntroPulse 1.8s ease-in-out 0.9s infinite;
}

.hero-logo-intro.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@keyframes logoIntroIn {
  from {
    transform: scale(0.86);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes logoIntroPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
}


.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.32));
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  min-height: 100%;
  max-width: none !important;
  display: block;
  object-fit: cover;
  object-position: center;
  background: #000;
  border-radius: 0 !important;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.hero-fallback {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  min-height: 100%;
  max-width: none !important;
  display: block;
  object-position: center;
  border-radius: 0 !important;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero-media.show-video .hero-video,
.hero-media.show-video .hero-fallback {
  opacity: 1;
}

.hero-video-cta {
  position: absolute;
  left: 50%;
  bottom: 2.5rem;
  transform: translateX(-50%);
  z-index: 4;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.72rem 1.2rem;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.hero-video-cta.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  text-align: center;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  padding: 0 1.5rem;
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: #ff7a00;
  text-transform: uppercase;
  letter-spacing: 0.17em;
  font-size: 0.72rem;
}

h1,
h2,
h3 {
  margin: 0 0 0.9rem;
  line-height: 1.08;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-family: "Oswald", sans-serif;
  font-weight: 400;
}

h1 {
  font-size: clamp(2.35rem, 6vw, 5.15rem);
  max-width: 16ch;
}

.lead {
  color: var(--muted);
  max-width: 58ch;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.6rem;
  flex-wrap: wrap;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(1.38rem, 3.65vw, 4.1rem);
  line-height: 1.02;
  letter-spacing: 0.02em;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  max-width: none;
  white-space: nowrap;
}

.hero-subtitle {
  margin: 0.8rem 0 0;
  color: #ff7a00;
  font-family: "Oswald", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: clamp(0.72rem, 0.98vw, 1.08rem);
  max-width: none;
  white-space: nowrap;
}

.hero-copy {
  transform: translate(-0.6cm, -0.75cm);
}

.section-catalog {
  min-height: 100svh;
  padding: 0;
  display: block;
  background: #080808;
}

.catalog-bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(180deg, rgba(5, 5, 5, 0.78), rgba(5, 5, 5, 0.78)),
    url("assets/images/man-electrical-technician-working-switchboard-with-fuses.jpg") center/cover no-repeat;
}

.catalog-intro {
  position: absolute;
  top: 5.6rem;
  left: max(110px, 6vw);
  right: 6vw;
  z-index: 3;
  margin: 0;
  max-width: 980px;
}

.catalog-intro .section-title {
  margin-bottom: 0.55rem;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  min-height: 100svh;
  border-top: 0;
  border-bottom: 0;
}

.catalog-card {
  position: relative;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}

.catalog-card:last-child {
  border-right: 0;
}

.catalog-card video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.22;
  transition: opacity 0.35s ease, transform 0.45s ease, filter 0.35s ease;
  filter: saturate(0.85) brightness(0.7);
}

.catalog-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 8, 8, 0.35), rgba(8, 8, 8, 0.75));
  pointer-events: none;
}

.catalog-card.is-hover video,
.catalog-card:hover video {
  opacity: 0.92;
  transform: scale(1.04);
  filter: saturate(1) brightness(0.95);
}

.catalog-overlay {
  position: absolute;
  inset: auto 1rem 1.2rem 1rem;
  z-index: 2;
}

.catalog-overlay span {
  display: block;
  color: #ff7a00;
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.1em;
  font-size: 0.92rem;
  margin-bottom: 0.45rem;
}

.catalog-overlay h3 {
  margin: 0;
  font-size: clamp(1.55rem, 2.8vw, 3.15rem);
  line-height: 0.97;
  max-width: 9ch;
  color: #f8f8f8;
  transition: transform 0.3s ease, color 0.3s ease;
}

.catalog-card.is-hover .catalog-overlay h3,
.catalog-card:hover .catalog-overlay h3 {
  transform: translateY(-4px);
  color: #f8fbff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  border: 1px solid var(--line);
  padding: 0.72rem 1.1rem;
  transition: all 0.28s ease;
}

.btn-primary {
  background: #ff7a00;
  color: #f8fbff;
  border-color: #ff7a00;
}

.btn-primary:hover {
  background: #e06b00;
  border-color: #e06b00;
}

.btn-ghost {
  color: #efefef;
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: #fff3dc;
}

.section {
  min-height: 100svh;
  display: grid;
  align-items: center;
  position: relative;
  isolation: isolate;
  padding: 6.8rem 0 4.6rem;
  border-top: 0;
  border-bottom: 0;
  background: #090909;
}

.section-soft {
  background: #0a0a0a;
}

.section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(6, 6, 6, 0.86), rgba(6, 6, 6, 0.72) 40%, rgba(6, 6, 6, 0.86)),
    linear-gradient(180deg, rgba(6, 6, 6, 0.58), rgba(6, 6, 6, 0.78));
}

.section::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background-size: cover;
  background-position: center;
  filter: saturate(0.92) brightness(0.92);
}

#diensten::after {
  background-image: url("assets/images/male-electrician-working-electrical-panel-male-electrician-overalls.jpg");
}

#collecties::after {
  background-image: url("assets/images/man-electrical-technician-working-switchboard-with-fuses-installation-connection-electrical-equipment-close-up.jpg");
}

#collecties {
  min-height: auto;
  padding-top: 4.8rem;
  padding-bottom: 3.2rem;
}

#collecties .container {
  max-width: 1080px;
}

#over-ons::after {
  background-image: url("assets/images/WhatsApp Image 2026-02-26 at 21.43.52.jpeg");
}

#proces::after {
  background-image: url("assets/images/man-electrical-technician-working-switchboard-with-fuses.jpg");
}

.section > .container {
  position: relative;
  z-index: 1;
}

#diensten {
  padding-top: 8.2rem;
}

.section-title {
  font-size: clamp(2.2rem, 4.3vw, 5rem);
  margin-bottom: 1.25rem;
  color: #ffffff;
  text-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.card {
  background: transparent;
  border: 0;
  padding: 0.2rem 0;
  min-height: 0;
  transition: transform 0.3s ease;
}

.card h3 {
  font-size: 1.42rem;
  color: #f7f7f7;
  margin-bottom: 0.5rem;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.card p {
  color: #d3d3d3;
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.58;
  max-width: 34ch;
}

.card:hover {
  transform: translateY(-3px);
}

.split {
  display: grid;
  grid-template-columns: 1.16fr 1fr;
  gap: 1.15rem;
}

.split p {
  color: #e0e0e0;
  max-width: 62ch;
}

.about-highlight {
  margin-top: 1rem;
  font-weight: 600;
  color: #ffffff;
}

.about-subtitle {
  margin: 1.4rem 0 0.45rem;
  font-family: "Montserrat", sans-serif;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #f2f2f2;
}

.about-certifications {
  margin: 0.45rem 0 1rem;
  padding-left: 1.25rem;
  color: #e0e0e0;
}

.about-certifications li {
  margin-bottom: 0.35rem;
  line-height: 1.55;
}

.stats {
  display: grid;
  gap: 0.8rem;
}

.stats article {
  border: 1px solid rgba(255, 122, 0, 0.4);
  background: linear-gradient(180deg, #181818, #121212);
  padding: 1rem;
}

.stats span {
  display: inline-block;
  font-family: "Oswald", sans-serif;
  color: var(--gold);
  font-size: 2.35rem;
  line-height: 1;
  margin-bottom: 0.28rem;
}

.stats p {
  margin: 0;
  color: #d2d2d2;
}

.about-media {
  min-height: 400px;
}

.about-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 190px;
  gap: 0.8rem;
}

.gallery-item {
  min-height: 0;
  height: 100%;
  border: 0;
  overflow: hidden;
  background: #0b0b0b;
}

.gallery-item.tall {
  grid-column: span 2;
  grid-row: span 2;
  min-height: 0;
}

.gallery-item.wide {
  grid-column: span 2;
  grid-row: span 1;
  min-height: 0;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.82) saturate(0.9);
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.055);
}

.before-after {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.before-after article {
  border: 0;
  overflow: hidden;
  background: rgba(10, 10, 10, 0.75);
}

.before-after img {
  width: 100%;
  height: clamp(240px, 34vw, 420px);
  object-fit: cover;
}

.before-after h3 {
  margin: 0;
  padding: 0.8rem 1rem;
  border-top: 0;
  color: #f2f2f2;
}

.timeline {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.75rem;
}

.timeline li {
  border: 0;
  background: linear-gradient(180deg, rgba(18, 18, 18, 0.82), rgba(10, 10, 10, 0.8));
  padding: 0.95rem 1rem;
  color: #ececec;
}

.timeline strong {
  color: #ff7a00;
}

.contact {
  min-height: 100svh;
  position: relative;
  isolation: isolate;
}

.contact-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.contact-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 5, 5, 0.8), rgba(5, 5, 5, 0.55), rgba(5, 5, 5, 0.8));
}

.contact-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-box {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.2rem;
  border: 0;
  background: transparent;
  backdrop-filter: none;
  padding: 1.7rem;
}

.contact-box p {
  color: #ececec;
}

.contact-meta p {
  margin: 0 0 0.55rem;
}

.coming-soon {
  min-height: 100svh;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.coming-soon::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.52)),
    url("assets/images/man-electrical-technician-working-switchboard-with-fuses.jpg") center/cover no-repeat;
  filter: blur(2px);
  transform: scale(1.04);
  z-index: -3;
}

.coming-soon-layer {
  position: absolute;
  inset: 0;
  background: rgba(14, 14, 14, 0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: -2;
}

.coming-soon-content {
  text-align: center;
}

.coming-soon-content h2 {
  margin: 0;
  color: #f1f1f1;
  font-size: clamp(2.2rem, 9vw, 7rem);
  letter-spacing: 0.16em;
  text-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.site-footer {
  border-top: 0;
  background: linear-gradient(180deg, #090909, #050505);
}

.footer-wrap {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-wrap p {
  margin: 0;
  color: #9c9c9c;
  font-size: 0.82rem;
}

.footer-wrap a {
  text-decoration: none;
  color: #ff7a00;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(42px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .split,
  .contact-box {
    grid-template-columns: 1fr;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 220px;
  }

  .gallery-item,
  .gallery-item.tall,
  .gallery-item.wide {
    grid-column: auto;
    grid-row: auto;
    min-height: 220px;
  }

  .before-after {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 100svh;
  }

  .section {
    min-height: auto;
    padding: 5rem 0 3.2rem;
  }

  .section-title {
    font-size: clamp(1.9rem, 6vw, 3rem);
  }

  .section-catalog {
    min-height: auto;
    padding: 5.4rem 0 0;
  }

  .catalog-intro {
    position: static;
    max-width: none;
    margin: 0 auto 1rem;
    padding: 0 4vw;
  }

  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: auto;
  }

  .catalog-card {
    min-height: 260px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  }

  .catalog-card:nth-child(2n) {
    border-right: 0;
  }
}

@media (max-width: 767px) {
  html,
  body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
  }

  .wp-site-blocks,
  .wp-block-post-content,
  #page,
  #content,
  .site,
  .site-main,
  .entry-content,
  main#home,
  main#home > section,
  .section,
  .container {
    width: 100% !important;
    max-width: 100vw !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow-x: clip !important;
  }

  .bg-orb {
    display: none;
  }

  .site-header {
    inset: 0 0 auto 0;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .nav-wrap {
    min-height: 64px;
    padding: 0 1rem;
    justify-content: center;
  }

  .brand {
    left: 0;
    top: 0;
  }

  .brand-stack {
    display: inline-flex;
  }

  .brand span.brand-stack {
    display: inline-flex;
  }

  .brand span.brand-name {
    display: inline;
  }

  .brand-name {
    font-size: 1.2rem;
    letter-spacing: 0.08em;
  }

  .brand-tagline {
    display: none;
  }

  .hero {
    position: relative;
    top: 0;
    width: 100%;
    height: 100svh;
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    overflow: hidden;
    margin: 0 !important;
    padding: 0 !important;
  }

  .hero-media {
    overflow: hidden;
  }

  .hero-media,
  .hero-video,
  .hero-fallback {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    max-width: none !important;
    object-fit: cover;
    object-position: 50% 45%;
    transform: none !important;
  }

  .hero-grid {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    min-height: 100%;
    padding: 0 1rem;
  }

  .hero-copy {
    transform: none !important;
    width: 100%;
    max-width: 30rem;
    margin: 0 auto;
    text-align: center;
    padding-top: 0;
  }

  .hero-copy h1 {
    font-size: clamp(1.55rem, 8vw, 2.35rem);
    line-height: 1.1;
    white-space: normal;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-subtitle {
    font-size: clamp(0.78rem, 3.6vw, 1rem);
    white-space: normal;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-logo-main,
  .hero-logo-sub {
    max-width: 92vw;
    overflow-wrap: anywhere;
  }

  .hero-logo-sub {
    letter-spacing: 0.2em;
  }

  .side-rail,
  .nav {
    display: none;
  }

  .cards,
  .gallery,
  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .gallery-item,
  .gallery-item.tall,
  .gallery-item.wide {
    grid-column: auto;
    min-height: 180px;
  }

  .section {
    padding: 4rem 0 2.6rem;
  }

  #diensten {
    padding-top: 5rem;
  }

  .catalog-card {
    border-right: 0;
    min-height: 220px;
  }
}

@supports (-webkit-touch-callout: none) {
  @media (max-width: 767px) {
    html {
      height: -webkit-fill-available;
    }

    body {
      min-height: -webkit-fill-available;
    }

    .site-header {
      background: transparent !important;
    }

    .hero,
    .hero-grid,
    .hero-media,
    .hero-video,
    .hero-fallback {
      height: 100svh;
      min-height: 100svh;
    }
  }
}

/* Standalone Contact + References pages */
.contact-page-main,
.references-page-main {
  width: 100%;
  margin: 0;
  padding: 0;
}

.contact-page-hero::after {
  background-image:
    linear-gradient(120deg, rgba(8, 8, 8, 0.8), rgba(8, 8, 8, 0.68)),
    url("assets/images/male-electrician-working-electrical-panel-male-electrician-overalls.jpg");
}

.references-hero::after {
  background-image:
    linear-gradient(120deg, rgba(8, 8, 8, 0.8), rgba(8, 8, 8, 0.68)),
    url("assets/images/man-electrical-technician-working-switchboard-with-fuses.jpg");
}

.contact-detail-grid,
.references-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.contact-links-box {
  text-align: left;
  max-width: 860px;
}

.contact-links-box p {
  color: #d7d7d7;
}

.contact-page-actions {
  margin-top: 1.15rem;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.contact-page-template .nav-wrap,
.references-page-template .nav-wrap {
  justify-content: flex-start;
  gap: 0.9rem;
  padding-left: 1rem;
}

.contact-page-template .brand,
.references-page-template .brand {
  left: 0;
}

.contact-page-template .nav,
.references-page-template .nav {
  display: flex;
  gap: 0.6rem;
}

.contact-page-template .nav a,
.references-page-template .nav a {
  border: 1px solid var(--line);
  padding: 0.6rem 0.95rem;
  background: rgba(12, 12, 12, 0.7);
  font-size: 0.72rem;
}

.contact-page-template .nav a::after,
.references-page-template .nav a::after {
  display: none;
}

@media (max-width: 980px) {
  .contact-detail-grid,
  .references-grid {
    grid-template-columns: 1fr;
  }

  .contact-page-actions {
    align-items: flex-start;
    justify-content: flex-start;
  }
}

@media (max-width: 767px) {
  .side-rail {
    display: flex;
    width: 56px;
    top: 64px;
    padding: 0.9rem 0;
    gap: 0.75rem;
    opacity: 0;
    transform: translateX(-12px);
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
  }

  .side-rail a {
    font-size: 1.2rem;
  }

  body.mobile-rail-visible .side-rail {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
  }

  .contact-page-template .nav,
  .references-page-template .nav {
    display: flex !important;
    flex-wrap: wrap;
    gap: 0.45rem;
  }

  .contact-page-template .nav-wrap,
  .references-page-template .nav-wrap {
    justify-content: flex-start;
    gap: 0.6rem;
    padding: 0.5rem 0.8rem;
  }

  .contact-page-template .brand-name,
  .references-page-template .brand-name {
    font-size: 1.02rem;
  }
}
