/* ============================================================
   Dakwerken Van Elshocht — Global Stylesheet
   ============================================================ */

:root {
  --color-bg: #ffffff;
  --color-bg-section: #f5f7fa;
  --color-nav: #1a3a5c;
  --color-nav-hover: #14304d;
  --color-accent: #2d6ea6;
  --color-text: #333333;
  --color-text-light: #666666;
  --color-border: #dde1e7;
  --color-footer-bg: #1a3a5c;
  --color-footer-text: #cdd8e8;
  --max-width: 1100px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); }
a:hover { color: var(--color-nav); }

/* ── Navigation ── */
nav {
  background: var(--color-nav);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  height: 64px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.nav-logo img {
  height: 40px;
  width: auto;
}
.nav-logo-text {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.2;
}
.nav-logo-text small {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--color-footer-text);
  letter-spacing: 0.02em;
}

/* Desktop nav links */
.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0;
  height: 100%;
}
.nav-links > li {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}
.nav-links > li > a,
.nav-links > li > span {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 0.85rem;
  color: #e8eef5;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  gap: 0.25rem;
  border-bottom: 3px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.nav-links > li > a:hover,
.nav-links > li > span:hover {
  background: rgba(255,255,255,0.1);
  border-bottom-color: var(--color-accent);
  color: #ffffff;
}
.nav-links > li > a.active {
  border-bottom-color: #ffffff;
  color: #ffffff;
}
/* Dropdown caret */
.nav-links > li.has-dropdown > span::after {
  content: "▾";
  font-size: 0.7rem;
  opacity: 0.75;
}

/* Dropdown menu */
.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-accent);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  min-width: 200px;
  z-index: 2000;
  list-style: none;
  padding: 0.4rem 0;
}
.nav-links > li:hover .dropdown,
.nav-links > li.open .dropdown {
  display: block;
}
.dropdown li a {
  display: block;
  padding: 0.5rem 1.1rem;
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.875rem;
  transition: background 0.12s, color 0.12s;
}
.dropdown li a:hover {
  background: var(--color-bg-section);
  color: var(--color-accent);
}

/* Hamburger button */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 40px;
  height: 40px;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.2s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.nav-mobile {
  display: none;
  background: var(--color-nav);
  border-top: 1px solid rgba(255,255,255,0.1);
}
.nav-mobile.open { display: block; }
.nav-mobile ul { list-style: none; }
.nav-mobile > ul > li > a,
.nav-mobile > ul > li > span {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  color: #e8eef5;
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  cursor: pointer;
}
.nav-mobile > ul > li > a:hover,
.nav-mobile > ul > li > span:hover { background: rgba(255,255,255,0.08); }
.nav-mobile > ul > li > span.open::after { transform: rotate(180deg); }
.nav-mobile > ul > li > span::after {
  content: "▾";
  font-size: 0.75rem;
  transition: transform 0.2s;
}
.nav-mobile .sub-menu { display: none; background: rgba(0,0,0,0.15); }
.nav-mobile .sub-menu.open { display: block; }
.nav-mobile .sub-menu li a {
  display: block;
  padding: 0.65rem 1.25rem 0.65rem 2.2rem;
  color: #cdd8e8;
  text-decoration: none;
  font-size: 0.875rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.nav-mobile .sub-menu li a:hover { background: rgba(255,255,255,0.07); color: #fff; }

/* ── Main content ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
}

h1 {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--color-nav);
  margin-bottom: 1.5rem;
  border-bottom: 3px solid var(--color-accent);
  padding-bottom: 0.6rem;
}
h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-nav);
  margin: 2rem 0 0.75rem;
}
h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-accent);
  margin: 1.5rem 0 0.5rem;
}
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
ul { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.25rem; }

/* ── Intro layout ── */
.intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
  margin-bottom: 2.5rem;
}
.intro img { border-radius: 6px; box-shadow: 0 2px 10px rgba(0,0,0,0.12); }

/* ── Gallery ── */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.gallery-item {
  cursor: pointer;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0,0,0,0.1);
  transition: transform 0.18s, box-shadow 0.18s;
}
.gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 16px rgba(0,0,0,0.18);
}
.gallery-item img { width: 100%; height: 160px; object-fit: cover; }
.gallery-item figcaption {
  padding: 0.4rem 0.6rem;
  font-size: 0.8rem;
  color: var(--color-text-light);
  background: var(--color-bg-section);
}

/* Gallery phase sections */
.phase {
  margin: 2rem 0;
  background: var(--color-bg-section);
  border-left: 4px solid var(--color-accent);
  border-radius: 0 6px 6px 0;
  padding: 1.25rem 1.5rem;
}
.phase h2 { margin-top: 0; }

/* Step list */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
}
.steps li {
  padding: 0.3rem 0 0.3rem 1.5rem;
  position: relative;
  margin: 0;
}
.steps li::before {
  content: "●";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-size: 0.55rem;
  top: 0.55rem;
}

/* Gallery items inside content-row: natural size, no crop */
.content-row .gallery-item img {
  height: auto;
  object-fit: unset;
}

/* Content + image side-by-side */
.content-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  margin: 1.5rem 0;
}
.content-row.reverse { direction: rtl; }
.content-row.reverse > * { direction: ltr; }
.content-row img { border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }

/* Partner logos */
.partner-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: var(--color-bg-section);
  border-radius: 6px;
}
.partner-logos img { height: 36px; width: auto; }

/* ── Hero ── */
.hero {
  width: 100%;
  margin-bottom: 2.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}
.hero img {
  width: 100%;
  height: auto;
}

/* ── Contact card ── */
.contact-card {
  background: var(--color-bg-section);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 2rem;
  max-width: 540px;
}
.contact-card h2 { margin-top: 0; }
.contact-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  align-items: baseline;
}
.contact-label {
  font-weight: 600;
  color: var(--color-nav);
  min-width: 80px;
  font-size: 0.875rem;
}
.contact-value { color: var(--color-text); }
.contact-value a { color: var(--color-accent); }
.contact-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 1rem 0;
}

/* ── Lightbox ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.lightbox.active { display: flex; }
.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.6);
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  font-size: 2.2rem;
  color: #ffffff;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  opacity: 0.85;
  transition: opacity 0.15s;
}
.lightbox-close:hover { opacity: 1; }

/* ── Footer ── */
footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  text-align: center;
  padding: 1.75rem 1.25rem;
  font-size: 0.875rem;
}
footer a { color: #7eb3e0; }
footer a:hover { color: #ffffff; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .intro { grid-template-columns: 1fr; }
  .content-row { grid-template-columns: 1fr; }
  .content-row.reverse { direction: ltr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  h1 { font-size: 1.5rem; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

@media (max-width: 480px) {
  .container { padding: 1.5rem 1rem 2rem; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery-item img { height: 120px; }
}
