:root {
  --primary: #195193;
  --secondary: #1b990f;
  --accent: #eab308;
  --paper: #f7f3ec;
  --ink: #0c1224;
  --muted: #4b5563;
}

@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700&family=Inter:wght@400;600;700&display=swap');

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: linear-gradient(180deg, #0c1224 0%, #f7f3ec 38%, #f9f6f0 100%);
  color: var(--ink);
}

body.no-scroll {
  overflow: hidden;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* HEADER & NAV */
.site-header {
  background: var(--primary);
  border-bottom: 1px solid rgba(255,255,255,0.16);
  color: #eef2ff;
  position: relative;
  transition: background .25s ease, box-shadow .25s ease;
}
.header-overlay {
  background: linear-gradient(120deg, rgba(0,0,0,0.35), rgba(0,0,0,0.18));
  box-shadow: none;
}
.has-hero .site-header {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  background: transparent;
  box-shadow: none;
}

.header-flex {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 82px;
  padding: 12px 32px;
  z-index: 2;
  position: relative;
}
.logo img {
  height: 48px;
  width: 80px;
  background: #fff;
  border-radius: 12px;
  border: 3px solid rgba(255,255,255,0.28);
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  flex-shrink: 0;
}

.bedrijfsnaam {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-name {
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.28);
  color: #f8fafc;
  font-size: clamp(1.05rem, 2vw + 0.5rem, 1.65rem);
  line-height: 1.12;
  max-width: 420px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.site-header.no-logo .site-name {
  max-width: 580px;
  font-size: clamp(1.2rem, 2vw + 0.6rem, 1.8rem);
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-left: auto;
}

.main-nav a {
  text-decoration: none;
  color: #e2e8f0;
  padding: 10px 0;
  border-bottom: 2px solid transparent;
  font-weight: 600;
  font-size: 0.98rem;
}

.main-nav a:hover { color: #fff; }
.main-nav a.active {
  color: #fff;
  border-color: var(--secondary);
}

.nav-toggle {
  display: none !important;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  width: 48px;
  height: 48px;
  padding: 0;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  justify-self: end;
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 10px;
}

.loginbtn, .logoutbtn {
  background: rgba(255,255,255,0.12);
  color: #f8fafc;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 0.95rem;
  cursor: pointer;
  font-weight: 600;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.loginbtn:hover, .logoutbtn:hover { background: rgba(255,255,255,0.2); }
.logoutbtn { color: #f8fafc; }

.desktop-only { display: flex; }
.mobile-only { display: none; }

/* HERO */
.hero {
  position: relative;
  min-height: 86vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: var(--hero-img);
  background-size: cover;
  background-position: center;
  filter: brightness(0.55);
  transform: scale(1.03);
}
.hero-overlay-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 25% 30%, rgba(255,255,255,0.2), transparent 40%),
              linear-gradient(120deg, rgba(12,18,36,0.7) 0%, rgba(12,18,36,0.45) 60%, rgba(12,18,36,0.15));
}
.hero-content {
  position: relative;
  padding: 110px 32px 120px;
  z-index: 1;
}
.hero-title {
  margin: 0;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
  font-family: 'Merriweather', Georgia, serif;
}
.hero-subtitle {
  margin-top: 12px;
  font-size: 1.2rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
}
.hero-lead {
  max-width: 720px;
  font-size: 1.1rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.85);
  margin-top: 18px;
}
.hero-admin-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

/* LOGIN OVERLAY */
#login_overlay {
  display:none;
  position:fixed;
  left:0; top:0;
  width:100vw; height:100vh;
  z-index:1000;
  background:rgba(12,18,36,0.2);
  align-items:center; justify-content:center;
}
#login_overlay.active { display:flex; }
.loginblok {
  background:#fff;
  border-radius:14px;
  box-shadow:0 16px 48px rgba(12,18,36,0.22);
  padding:46px 36px 36px 36px;
  min-width:320px;
  max-width:95vw;
  display:flex;
  flex-direction:column;
  align-items:stretch;
}
.loginblok input, .loginblok textarea {
  width:100%;
  padding:12px;
  font-size:1.08em;
  margin-bottom:15px;
  border:1px solid #dbe4f6;
  border-radius:8px;
}
#login_overlay .loginblok button,
#addBlokOverlay .loginblok button {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color:#fff;
  border:none;
  border-radius:8px;
  padding:12px 32px;
  font-size:1.1em;
  cursor:pointer;
  box-shadow: 0 12px 26px rgba(14,165,233,0.26);
}
.loginblok .error { color:#b20000; margin-bottom:12px;}

/* BLOK OVERLAY SCROLL */
#addBlokOverlay .loginblok,
#freeImagesOverlay .loginblok {
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  padding: 32px 30px 32px;
}

#addBlokOverlay .loginblok .overlay-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 6px;
}

#addBlokOverlay .loginblok .overlay-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
  background: #fff;
  justify-content: flex-start;
}

.editveld.wysiwyg {
  min-height: 160px;
  max-height: 320px;
  overflow-y: auto;
}


/* MAIN */
main.container {
  padding: 20px 18px 32px;
  scroll-margin-top: 120px;
}

.page-title {
  margin: 18px 0 8px;
  font-size: 1.8rem;
  font-family: 'Merriweather', Georgia, serif;
  color: var(--primary);
}

.blok {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-left: 4px solid var(--primary);
  border-radius: 12px;
  margin: 20px 0 0 0;
  padding: 22px 20px;
  position: relative;
}

.blok-content {
  display: block;
  gap: 12px;
  padding-bottom: 44px;
}

.blok h2 {
  margin: 0;
  font-size: 1.2rem;
  font-family: 'Merriweather', Georgia, serif;
  color: var(--ink);
}

.blok-tekst {
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--muted);
  text-align: justify;
}

.media {
  width: 42%;
  float: right;
  margin: 4px 0 14px 18px;
}
.blok:nth-of-type(2n) .media {
  float: left;
  margin: 4px 18px 14px 0;
}
.media figure {
  margin: 0;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  background: #f9fafb;
}
.media img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.blok::after {
  content: "";
  display: block;
  clear: both;
}

.bewerk-knoppen {
  display: flex;
  gap: 8px;
}

.edit-btn, .save-btn, .add-blok-btn {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(14,165,233,0.25);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.edit-btn:hover, .save-btn:hover, .add-blok-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(2,132,199,0.35);
  background: linear-gradient(135deg, #0284c7, #0369a1);
}
.del-btn {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(239,68,68,0.25);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.del-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(220,38,38,0.35);
  background: linear-gradient(135deg, #dc2626, #b91c1c);
}
.cancel-btn {
  background: #e2e8f0;
  color: #0f172a;
  border: none;
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(148,163,184,0.25);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.cancel-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(148,163,184,0.35);
  background: #cbd5e1;
}
.add-blok-btn { margin-top: 18px; }

.editveld, .edittitel, .editimg {
  width:100%;
  font-size:1.05em;
  margin-top:7px;
  padding:10px;
  border-radius:7px;
  border:1px solid #e2e8f0;
}
.edittitel {font-weight:bold;}
.edit-toolbar {
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 4px;
}
.edit-btn.small {
  padding: 4px 8px !important;
  border-radius: 10px;
  font-size: 0.78rem !important;
  font-weight: 600;
  line-height: 1;
  min-width: 34px;
  max-width: 64px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  text-transform: none;
}
.edit-toolbar input[type=color] {
  width:42px;
  height:32px;
  padding:0;
  border:1px solid #e2e8f0;
  border-radius:10px;
  background:#fff;
  cursor:pointer;
}

/* FOOTER */
.footer {
  border-top: 1px solid #e0e4ec;
  padding: 25px 0;
  margin-top: 40px;
  background: #f9fafc;
  font-size: 0.95rem;
  text-align: center;
}
.footer-inner.footer-centered {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.footer-line { margin-bottom: 6px; }
.footer-line-main a { color: #111; text-decoration: underline; }
.footer-nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 10px 0 16px;
}
.footer-nav-link {
  text-decoration: none;
  color: #111;
}
.footer-nav-link:hover { text-decoration: underline; }
.footer-nav-link.active {
  font-weight: bold;
  text-decoration: underline;
  color: #111;
}
.footer-logo-centered {
  height: 60px;
  object-fit: contain;
  margin-top: 12px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .header-flex { position: relative; }
  .nav-toggle { display: flex !important; }
  .main-nav {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--primary);
    padding: 10px 16px;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.22);
    display: none;
    flex-direction: column;
    z-index: 1000;
  }
  .main-nav a { display: block; margin: 6px 0; }
  .main-nav.is-open { display: flex; }

  .desktop-only { display: none; }
  .mobile-only { display: block; }

  .media { width: 100%; float: none; margin: 10px 0; }
  .blok:nth-of-type(2n) .media { float: none; margin: 10px 0; }
  .hero-content { padding: 120px 20px 90px; }
  .header-flex { padding: 12px 18px; }
  .site-name { max-width: 70vw; }
  .site-header.no-logo .site-name { max-width: 80vw; }
}
