/* Mobiel: projectlijst als kaarten, header/knoppen stapelen, acties onder elkaar */
@media (max-width: 700px) {
  .admin-top { flex-direction: column; align-items: stretch; gap: 10px; }
  .admin-top .btn, .admin-top form { width: 100%; }
  .admin-card { padding: 8px; }
  .admin-card table, .admin-card thead, .admin-card tbody, .admin-card tr, .admin-card th, .admin-card td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }
  .admin-card thead { display: none; }
  .admin-card tr { margin-bottom: 18px; background: #fff; border-radius: 10px; box-shadow: 0 2px 10px #0077cc11; padding: 10px 8px; }
  .admin-card td { padding: 8px 0; border: none; font-size: 1rem; }
  .admin-card td.actions { display: flex; flex-direction: column; gap: 8px; }
  .admin-card td.type { margin-bottom: 6px; }
  .admin-card td:before {
    content: attr(data-label);
    display: block;
    font-size: 0.93em;
    color: #888;
    font-weight: 600;
    margin-bottom: 2px;
  }
  .admin-card a.btn, .admin-card button.btn { width: 100%; margin-bottom: 4px; }
}
/* ==== FONTS ==== */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/montserrat/montserrat-v30-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/montserrat/montserrat-v30-latin-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/montserrat/montserrat-v30-latin-700.woff2') format('woff2');
}

/* ==== GLOBAL LAYOUT FIXES ==== */
/* Voorkom horizontale overflow en zorg voor consistente box-sizing en responsive media */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}
*, *::before, *::after {
  box-sizing: border-box;
}

/* Zorg dat afbeeldingen/video's en thumbs niet buiten hun container groeien */
img, video, .media-thumb, .video-thumb, .media-item img, .media-item .video-thumb {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Kleine lightbox-aanpassing voor kleinere viewports */
@media (max-width: 640px) {
  #adminLightbox .close {
    right: 16px;
    top: 12px;
    font-size: 36px;
  }
}

/* ==== ALGEMEEN ==== */
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #f8f8fa;
  margin: 0;
  color: #222;
  max-width: 100%;
}
a {
  color: #e0582a;
  text-decoration: none;
}

/* ==== HEADER ==== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.logo {
  height: 28px;
}
.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 18px 24px 16px 24px;
  position: relative;
}
.main-nav {
  display: flex;
  gap: 36px;
  align-items: center;
}
.nav-link {
  color: #1a2b57;
  font-weight: 500;
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.18s;
}
.nav-link:hover {
  color: #e0582a;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #e0582a;
  color: #fff;
  font-weight: 500;
  font-size: 1rem;
  padding: 12px 28px;
  border-radius: 8px;
  box-shadow: 0 2px 10px 0 rgba(224, 88, 42, 0.08);
  border: none;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  text-decoration: none;
}
.btn:hover {
  background: #c7471d;
}
.btn-icon {
  font-size: 1.3em;
  margin-left: 7px;
}

/* ==== CONTACT KNOP FIX ==== */
.contact-btn {
  margin-left: 0;
}
.desktop-only.contact-btn {
  margin-left: auto;
}

/* ==== HAMBURGER ==== */
.hamburger {
  display: none !important;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  width: 35px;
  height: 35px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  position: absolute;
  right: 24px;
  top: 16px;
}
.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background: #1a2b57;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ==== KNOP WEERGAVE ==== */
.desktop-only {
  display: inline-flex;
}
.mobile-visible {
  display: none !important;
}

/* ==== RESPONSIVE HEADER & MENU ==== */
@media (max-width: 768px) {
  .header-container {
    flex-wrap: wrap;
    /* mobile-only: iets compacter padding zonder desktop te wijzigen */
    padding: 16px;
    gap: 12px;
  }
  .hamburger {
    display: flex !important;
    order: 2;
    /* mobile-only: grotere hit-area */
    width: 44px;
    height: 44px;
    right: 16px;
    top: 6px;
  }
  .main-nav {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    background: #f9f9f9;
    padding: 0px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    order: 3;
    border-top: 1px solid #ddd;
    border-radius: 0 0 12px 12px;
    gap: 0;
  }
  .main-nav .nav-link {
    width: 100%;
    font-size: 1.05rem;   /* mobile-only: iets groter leesbaar */
    padding: 14px 0;      /* grotere touch area */
    border-bottom: 1px solid #eee;
  }
  .desktop-only {
    display: none !important;
  }
  .nav-group {
    display: none;
    width: 100%;
  }
  .nav-group.active {
    display: block;
  }
  .nav-group .mobile-visible {
    display: flex !important;
    justify-content: center;
    padding-inline: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #ddd;
  }

  .nav-group .mobile-visible .btn {
    width: auto !important;
    max-width: 280px;
    padding: 14px 24px;
    font-size: 1.05rem;
    font-weight: 600;
    background-color: #e0582a;
    border-radius: 8px;
    box-shadow: none;
    transition: background-color 0.25s ease, transform 0.15s ease;
    text-align: center;
    white-space: nowrap;
  }

  .nav-group .mobile-visible .btn:hover {
    background-color: #d14c1d;
    transform: translateY(-1px);
  }

  .nav-group .mobile-visible .btn-icon {
    font-size: 1.2rem;
    margin-left: 10px;
  }
}

/* ==== EXTRA SMAL: kleine touch/spacing tweaks, desktop blijft gelijk ==== */
@media (max-width: 420px) {
  .header-container { padding: 12px; }
  .hamburger { right: 12px; top: 10px; }
  .nav-group .mobile-visible .btn { max-width: 100%; }
}

/* ==== FOOTER ==== */
footer {
  background: #fff;
  color: #222;
  font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
}
.footer-container {
  max-width: 1300px;
  margin: auto;
  padding: 15px;
  display: flex;
  align-items: flex-start;
  gap: 60px;
}
.footer-logo {
  flex: 1 1 300px;
}
.logo-large {
  display: block;
  height: 55px;
  margin-bottom: 12px;
}
.footer-company-name {
  font-size: .92rem;
  color: #a3a3a3;
}
.footer-col {
  flex: 1 1 200px;
}
.footer-col h4 {
  font-size: 1rem;
  color: #1a2b57;
  margin-bottom: 8px;
  font-weight: 600;
}
.footer-col ul,
.footer-col address {
  margin: 0;
  padding: 0;
  font-size: .97rem;
  color: #555;
}
.footer-col ul {
  list-style: none;
}
.footer-col ul li {
  margin-bottom: 8px;
}
.footer-email {
  color: #1a2b57;
  text-decoration: none;
}
.footer-email:hover {
  text-decoration: underline;
}
.footer-bottom {
  background: #1a2b57;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 20px;
}
.footer-bottom-link {
  color: #fff;
  font-size: .93rem;
  text-decoration: none;
  transition: opacity .2s;
}
.footer-bottom-link:hover {
  opacity: .8;
}
.footer-divider {
  color: #fff;
  opacity: .6;
}
.footer-social {
  margin-left: auto;
}
.footer-social img {
  height: 18px;
  filter: invert(1);
  transition: opacity .2s;
}
.footer-social img:hover {
  opacity: .7;
}

/* === FOOTER: mobile polish (≤ 700px) === */
@media (max-width: 700px) {
  footer { text-align: center; }

  .footer-container {
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 20px 16px;
  }

  .footer-logo {
    flex: 0 0 auto;
  }
  .logo-large {
    height: 48px;
    margin: 0 auto 10px auto;
  }

  .footer-col {
    width: 100%;
    max-width: 520px;
  }
  .footer-col h4 {
    margin: 0 0 6px 0;
    font-size: 1.05rem;
  }
  .footer-col ul {
    display: grid;
    grid-template-columns: 1fr 1fr;   /* 2 kolommen op mobiel */
    gap: 8px 16px;
    justify-items: center;
  }
  .footer-col ul li { margin: 0; }
  .footer-col ul li a {
    display: inline-block;
    padding: 8px 2px;                /* betere tap-targets */
  }

  .footer-col address {
    font-style: normal;
    line-height: 1.55;
  }
  .footer-email { display: inline-block; margin-top: 4px; }

  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    padding: 18px 16px;
    text-align: center;
  }
  .footer-divider { display: none; }  /* streepje weg op mobiel */

  .footer-bottom-link {
    display: inline-block;
    padding: 8px 6px;
  }

  .footer-social {
    margin: 6px 0 0 0;
  }
  .footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;       /* grotere hitbox */
    border-radius: 50%;
  }
  .footer-social a i {
    font-size: 20px;
  }
}

/* Extra small tweaks (≤ 380px) */
@media (max-width: 380px) {
  .footer-col ul {
    grid-template-columns: 1fr;      /* 1 kolom op hele kleine schermen */
    gap: 6px;
  }
}

/* ==== ADMIN PAGES ==== */
.admin-container { max-width: 980px; margin: 0 auto; padding: 18px; }
.admin-top { display:flex; align-items:center; justify-content:space-between; gap:24px; margin: 24px 0; }
.admin-logo { height:54px; width:auto; display:block; filter:drop-shadow(0 2px 8px #0077cc22); }
.admin-back { display:inline-block; color:#0077cc; background:#eef6fb; padding:12px 28px; border-radius:8px; text-decoration:none; font-weight:700; box-shadow:0 2px 12px #0077cc22; font-size:1.13rem; transition:.2s; }
.admin-card { display:flex; gap:32px; align-items:stretch; justify-content:center; background:#fff; padding:12px; border-radius:16px; box-shadow:0 4px 24px #0077cc18; max-width:900px; margin:0 auto 32px auto; }
.admin-col { display:flex; flex-direction:column; gap:8px; }
.admin-form-card { background:linear-gradient(180deg,#ffffff,#f6fbff); padding:20px; border-radius:12px; box-shadow:0 6px 26px #0077cc10; }
.admin-form label { font-weight:700; font-size:0.98rem; color:#123; margin-bottom:4px; display:block; }
.admin-form input[type="text"], .admin-form input[type="date"], .admin-form input[type="url"], .admin-form select, .admin-form textarea { width:100%; padding:10px; border-radius:8px; border:1px solid #d6e6f3; font-size:1rem; transition:.15s; box-sizing:border-box; }

/* Login / form controls */
.form-control {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #d6e6f3;
  font-size: 0.98rem;
  box-sizing: border-box;
  background: #fff;
  height: 40px;
}
.form-control:focus {
  outline: none;
  border-color: #a1c6e8;
  box-shadow: 0 3px 10px rgba(12,83,153,0.05);
}

.alert-danger {
  background: #feece9;
  color: #b91c1c;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.login-card { max-width: 420px; margin: 36px auto; width: 100%; }
.admin-title { margin: 0 0 10px 0; font-size: 1rem; color: #123; font-weight: 700; }

/* Login viewport: center the card vertically */
.login-viewport {
  min-height: calc(100vh - 40px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.login-card {
  background: linear-gradient(180deg, #ffffff, #f6fbff);
  padding: 14px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(7,50,92,0.06);
  border: 1px solid rgba(2,40,80,0.04);
}

.login-logo { height: 36px; display:block; margin: 0 auto 10px auto; }
.login-sub { color:#445; font-size:0.9rem; text-align:center; margin-bottom:8px; }

/* Make submit more prominent on small screens */
.login-card .btn { width: 100%; padding: 10px 16px; height: 40px; display:inline-flex; align-items:center; justify-content:center; }
@media (max-width:640px) {
  .login-card .btn { width: 100%; }
}
.admin-form input[type="file"] { display:block; padding:6px 8px; }
.admin-form hr { margin:8px 0; border:0; border-top:1px solid #e6eef6; }
.admin-form .actions { display:flex; gap:10px; align-items:center; margin-top:6px; }
.btn-primary { background:linear-gradient(90deg,#0077cc 40%,#00659a 100%); color:#fff; padding:10px 18px; border:none; border-radius:8px; font-size:1rem; font-weight:800; box-shadow:0 6px 20px #0077cc22; cursor:pointer; transition:.18s; text-decoration:none; display:inline-flex; align-items:center; }
.btn-primary:hover { transform: translateY(-2px); box-shadow:0 12px 36px #0077cc22; }
.admin-media-col { flex:1 1 220px; min-width:160px; max-width:100%; background:#f7fafd; padding:12px; border-radius:12px; box-shadow:0 2px 12px #0077cc11; display:flex; flex-direction:column; justify-content:flex-start; align-items:center; }
.admin-media-col h2 { font-size:1.04rem; margin-bottom:10px; font-weight:700; color:#1a2a3a; text-align:left; width:100%; }
.media-item { border:1.5px solid #e0e0e0; padding:18px 12px 16px 12px; width:220px; text-align:center; background:#fff; border-radius:14px; box-shadow:0 4px 18px #0077cc22; transition:.2s; position:relative; display:flex; flex-direction:column; align-items:center; }
.media-item img, .media-item .video-thumb { width:180px; max-height:120px; border-radius:10px; box-shadow:0 4px 18px #0077cc22; background:#ffeaea; cursor:pointer; transition:.2s; }
.media-item img:hover, .media-item .video-thumb:hover { transform:scale(1.04); box-shadow:0 8px 32px #0077cc33; }
.media-item .label { margin-bottom:8px; color:#0077cc; font-size:15px; font-weight:600; }
.media-item .file-info { margin-bottom:10px; color:#444; font-size:13px; word-break:break-all; }
.media-item .delete-link { color:#b00; font-size:13px; font-weight:700; position:absolute; bottom:10px; left:0; right:0; text-decoration:none; }

@media (max-width: 820px) {
  .admin-card { flex-direction:column; padding:20px; max-width:100%; }
  .admin-media-col { max-width:100%; width:100%; }
}

/* Page wrapper for admin screens */
.admin-page { background: linear-gradient(120deg,#f5f8fa 60%,#eaf2f8 100%); min-height: 100vh; }

/* Admin tables */
.admin-card table { width:100%; border-collapse:collapse; background:transparent; }
.admin-card thead tr { background:#f5f8fa; }
.admin-card th, .admin-card td { padding:14px 10px; text-align:left; font-size:1rem; color:#3a4a5a; font-weight:600; }
.admin-card tbody tr { border-bottom:1px solid #eef2f5; transition:.2s; }
.admin-card tbody td { font-weight:500; color:#1a2a3a; font-size:1.05rem; }
.admin-card td.type { color:#0077cc; text-transform:capitalize; font-weight:500; }
.admin-card td.actions a { margin-right:12px; font-weight:600; }

/* Form & inputs */
.admin-form h1 { margin:0; font-size:1.04rem; font-weight:700; color:#102634; }
.admin-form label { font-weight:700; font-size:0.98rem; color:#123; display:block; margin-bottom:6px; }
.admin-form .sub-label { font-weight:600; color:#234; margin-bottom:4px; }
.admin-form input, .admin-form select, .admin-form textarea { transition:.15s; }
.admin-form input:focus, .admin-form select:focus, .admin-form textarea:focus { box-shadow:0 6px 20px #0077cc22; border-color:#0077cc; outline: none; }
.admin-form hr { margin:8px 0; border:0; border-top:1px solid #e6eef6; }

/* Media thumbnails */
.media-item { border:1.5px solid #e0e0e0; padding:18px 12px 16px 12px; width:220px; text-align:center; background:#fff; border-radius:14px; box-shadow:0 4px 18px #0077cc22; transition:.2s; position:relative; display:flex; flex-direction:column; align-items:center; }
.media-thumb, .video-thumb { width:180px; max-height:120px; border-radius:10px; box-shadow:0 4px 18px #0077cc22; background:#ffeaea; cursor:pointer; transition:.2s; display:block; }
.media-thumb:hover, .video-thumb:hover { transform:scale(1.04); box-shadow:0 8px 32px #0077cc33; }
.media-missing { width:180px; height:120px; display:flex; align-items:center; justify-content:center; background:#ffeaea; color:#b00; border-radius:10px; margin:0 auto 12px; }
.media-label { margin-bottom:8px; color:#0077cc; font-size:15px; font-weight:600; }
.media-file-info { margin-bottom:10px; color:#444; font-size:13px; word-break:break-all; }
.media-delete { color:#b00; font-size:13px; font-weight:700; position:absolute; bottom:10px; left:0; right:0; text-decoration:none; }

/* Lightbox adjustments (keeps inline fallback but nicer default) */
#adminLightbox { display:none; position:fixed; z-index:9999; top:0; left:0; width:100vw; height:100vh; background:rgba(0,0,0,0.85); align-items:center; justify-content:center; }
#adminLightbox .close { position:absolute; top:32px; right:48px; font-size:44px; color:#fff; cursor:pointer; font-family:sans-serif; z-index:10001; }
#adminLightboxContent { max-width:90vw; max-height:80vh; z-index:10000; }

/* Media list helper */
.media-list { display:flex; flex-direction:column; gap:24px; align-items:center; width:100%; }
.media-heading { font-size:1.04rem; margin-bottom:10px; font-weight:700; color:#1a2a3a; text-align:left; width:100%; }
.media-empty { color:#bbb; text-align:center; margin-top:20px; font-size:0.95rem; }

/* ==========================
   Responsive tweaks for admin
   ========================== */
@media (max-width: 1024px) {
  .admin-container { padding: 14px;  max-width:100%; }
  .admin-top { gap:12px; margin:18px 0;  max-width:100%;}
  .admin-logo { display: none;}
  .admin-card { max-width: 100%; padding:14px; }
  .admin-form-card { padding:14px;  max-width:100%;}
  .admin-card table th, .admin-card table td { padding:10px 8px; font-size:0.98rem; max-width:100%;}
}

@media (max-width: 820px) {
  .admin-top { flex-direction:column; align-items:flex-start; gap:10px; max-width:100%;}
  .admin-top .btn, .admin-top form { width:100%; max-width:100%;}
  .admin-top { align-items:stretch; max-width:100%;}
  .admin-card { flex-direction:column; gap:16px; padding:16px; max-width:100%;}
  .admin-media-col { width:100%; max-width:100%; max-width:100%;}
  .media-item { width:100%; max-width:100%; max-width:100%;}
  .admin-card table { display:block; width:100%; overflow:auto; max-width:100%;}
  .admin-card thead { display:none; }
  .admin-card tbody tr { display:block; margin-bottom:12px; border:1px solid #eef2f5; padding:10px; border-radius:8px; max-width:100%;}
  .admin-card tbody td { display:flex; justify-content:space-between; padding:6px 0; font-size:0.98rem; max-width:100%;}
  .admin-card td.actions { display:flex; gap:8px; justify-content:flex-end; max-width:100%;}
}

@media (max-width: 640px) {
  .admin-container { padding:12px; max-width:100%;}
  .admin-logo { height:40px; max-width:100%;}
  .admin-back { padding:10px 16px; max-width:100%;}
  .btn, .btn-primary { width:100%; box-sizing:border-box; max-width:100%;}
  .admin-form label { font-size:0.95rem; max-width:100%;}
  .admin-form input, .admin-form select, .admin-form textarea, .form-control { font-size:0.96rem; height:42px; max-width:100%;}
  .admin-card { padding:12px; max-width:100%;}
  .media-item img, .media-item .video-thumb { width:100%; max-height:240px; max-width:100%;}
}

@media (max-width: 420px) {
  .admin-top { gap:8px; max-width:100%;}
  .admin-title { font-size:0.98rem; max-width:100%;}
  .admin-card tbody td { font-size:0.95rem; max-width:100%;}
  .login-card { margin:18px 8px; max-width:100%;}
}