/* ==========================================================
   BASE
========================================================== */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  overflow-x: hidden;
  font-family: Arial, sans-serif;
  background-color: #f4f4f8;
  color: #1f2937;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; border-radius: 10px; }

:focus-visible { outline: 3px solid var(--brand-blue); outline-offset: 3px; }

/* ==========================================================
   DESIGN TOKENS
========================================================== */
:root {
  --brand-red: #e30613;
  --brand-red-dark: #b2050f;
  --brand-blue: #0a5fa3;
  --brand-blue-dark: #084c82;
  --bg: #f4f6f8;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 10px 30px rgba(0,0,0,.08);
  --shadow-sm: 0 4px 14px rgba(0,0,0,.08);
  --radius: 14px;
}

.muted { color: var(--muted); }

/* ==========================================================
   LAYOUT
========================================================== */
main { max-width: 1200px; margin: 30px auto; padding: 0 20px; }

.page-wrapper {
  max-width: 1200px;
  margin: 30px auto;
  padding: 30px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================
   HEADER / NAV
========================================================== */
.topbar {
  background: #fff;
  border-bottom: 2px solid var(--brand-red);
  padding: 10px 50px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,.05);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.logo { position: absolute; left: 0; }
.logo img { height: 80px; }

.main-nav ul {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 32px;
}

.main-nav a {
  text-decoration: none;
  font-weight: 900;
  color: #222;
}

.main-nav a:hover { color: var(--brand-red); }

/* ==========================================================
   HERO (LCP FIX)
========================================================== */
.hero--lcp{
  position: relative;
  height: 350px;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 40px;
}

.hero__img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

.hero-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.35); }

.hero-inner {
  position: absolute;
  inset: 0;
  z-index: 2;
  text-align: center;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
}

.hero-inner h1 { font-size: 2.8rem; margin: 0 0 10px; }
.hero-inner p { font-size: 1.2rem; margin: 0; max-width: 900px; }

/* ==========================================================
   BUTTONS / FORMS / FLASH
========================================================== */
.btn {
  display: inline-flex;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 900;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform .08s ease;
}

.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--brand-blue); color: #fff; }
.btn--primary:hover { background: var(--brand-blue-dark); }

/* Small button variant (voor tabellen zoals sollicitaties) */
.btn--sm{
  padding: 8px 12px;
  font-size: .9rem;
}

.btn--danger{
  background: var(--brand-red);
  color: #fff;
}
.btn--danger:hover{ background: var(--brand-red-dark); }

.btn--ghost{
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn--ghost:hover{ background: #f7fafc; }

.form label,
.apply-form label,
.auth-form label,
.contact-form label {
  font-weight: 900;
  display: block;
  margin-bottom: 6px;
}

.form input,
.form textarea,
.apply-form input,
.apply-form textarea,
.auth-form input,
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.form input:focus,
.form textarea:focus,
.apply-form input:focus,
.apply-form textarea:focus,
.auth-form input:focus,
.contact-form input:focus,
.contact-form textarea:focus{
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 4px rgba(10,95,163,.14);
}

.flash { padding: 12px 14px; border-radius: 12px; font-weight: 900; margin-bottom: 16px; }
.flash--success { background: #ecfdf5; color: #065f46; }
.flash--error { background: #fef2f2; color: #991b1b; }

/* ==========================================================
   CARDS / CONTAINERS
========================================================== */
.containers,
.projects-grid,
.vacancies-grid,
.admin-cards,
.admin-projects-grid {
  display: grid;
  gap: 24px;
  margin-top: 20px;
}

.containers,
.projects-grid,
.vacancies-grid,
.admin-projects-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.container-card,
.project-card,
.vacancy-card,
.admin-card,
.admin-project-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.container-card:hover,
.project-card:hover,
.vacancy-card:hover,
.admin-card:hover,
.admin-project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.container-card img,
.project-card img,
.admin-project-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 12px;
}

.container-card h3,
.project-card h3,
.vacancy-card__top h3,
.admin-card__title,
.admin-project-card h3 {
  font-weight: 900;
  margin-bottom: 10px;
  color: var(--brand-blue);
}

.container-card a,
.project-card__actions a,
.apply-btn,
.admin-project-actions a {
  display: inline-block;
  text-decoration: none;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 700;
  transition: background-color 0.2s ease, transform .08s ease;
}

.container-card a:active,
.project-card__actions a:active,
.apply-btn:active,
.admin-project-actions a:active { transform: translateY(1px); }

.container-card a,
.apply-btn {
  background: var(--brand-red);
  color: #fff;
}

.container-card a:hover,
.apply-btn:hover {
  background: var(--brand-red-dark);
}

.project-card__actions a { background: var(--brand-blue); color: #fff; }
.project-card__actions a:hover { background: var(--brand-blue-dark); }

.admin-project-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
  flex-wrap: wrap;
}

.admin-project-actions a {
  padding: 8px 14px;
  background: var(--brand-blue);
  color: #fff;
  font-size: .9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s, transform 0.1s;
}
.admin-project-actions a:hover { background: var(--brand-blue-dark); transform: translateX(2px); }

/* ==========================================================
   ADMIN FORMS / EDIT PAGE (NIEUW: mooier bewerken)
========================================================== */
.admin-panel{
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.admin-form{
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.admin-form .form-row{
  display: grid;
  gap: 8px;
}

.admin-form .form-actions{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 6px;
}

.admin-edit-header{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.admin-edit-sub{
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.admin-media{
  display:grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 12px;
}

.admin-media__img{
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: #fff;
}
.admin-media__img img{
  display:block;
  width: 100%;
  height: auto;
  border-radius: 0;
}

.helper{
  font-size: .92rem;
  color: var(--muted);
  font-weight: 700;
}

/* ==========================================================
   ADMIN TABLE (voor sollicitaties e.d.)
========================================================== */
.table-wrap{
  overflow-x: auto;
  border-radius: 18px;
}

.table{
  width: 100%;
  border-collapse: collapse;
  min-width: 840px;
}

.table th{
  text-align:left;
  font-weight: 900;
  padding: 14px 14px;
  background: #f8fafc;
  border-bottom: 2px solid var(--border);
}

.table td{
  padding: 14px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.table tr:hover td{
  background: #fbfdff;
}

/* ==========================================================
   WERKEN BIJ / VACATURES
========================================================== */
.vacancy-card {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.vacancy-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.vacancy-meta { display: flex; gap: 10px; flex-wrap: wrap; }

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: .85rem;
  border: 1px solid var(--border);
  background: #fff;
}
.pill--muted { color: var(--muted); }

.apply-section { margin-top: 26px; border-top: 1px solid var(--border); padding-top: 22px; }

.apply-form {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

/* ==========================================================
   ADMIN PANEL
========================================================== */
.admin-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: flex-start;
}

.admin-sidebar {
  background: linear-gradient(180deg,#0b1220,#020617);
  border-radius: 18px;
  padding: 22px;
  color:#fff;
  box-shadow: 0 20px 40px rgba(0,0,0,.25);
  position: sticky;
  top: 110px;
  min-height: 420px;
}

.admin-brand {
  font-weight: 900;
  font-size: 1.1rem;
  margin-bottom: 18px;
  letter-spacing: .3px;
}

.admin-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  color:#fff;
  text-decoration:none;
  background: rgba(255,255,255,.08);
  margin-bottom: 10px;
  font-weight: 700;
  transition: background .15s ease, transform .1s ease;
}

.admin-nav:hover { background: rgba(255,255,255,.16); transform: translateX(3px); }
.admin-nav--active { background: rgba(10,95,163,.7); }

.admin-card__title { font-weight: 900; font-size: 1.05rem; margin-bottom: 6px; color: var(--brand-blue); }
.admin-card__desc { color: var(--muted); line-height: 1.5; }

.admin-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

/* ==========================================================
   AUTH PAGES
========================================================== */
.auth-page {
  min-height: calc(100vh - 180px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.auth-card {
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: 20px;
  padding: 36px;
  box-shadow: 0 20px 40px rgba(0,0,0,.12);
}

.auth-card h1 {
  margin-top:0;
  margin-bottom:8px;
  font-size:2rem;
  color: var(--brand-blue);
}

.auth-sub { margin-bottom:22px; color: var(--muted); font-size:1rem; }

.auth-form { display: grid; gap: 14px; }

.auth-form input { padding:14px; font-size:1rem; border-radius:14px; }

.auth-form input:focus {
  outline:none;
  border-color: var(--brand-blue);
  box-shadow:0 0 0 4px rgba(10,95,163,.15);
}

.auth-footer { margin-top: 18px; color: var(--muted); font-size: .95rem; }

.auth-footer a { color: var(--brand-blue); font-weight: 800; text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

/* ==========================================================
   CONTACT PAGE
========================================================== */
.contact-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 30px 20px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.contact-page h1 { font-size: 2rem; margin-bottom: 20px; color: var(--brand-blue); }

.contact-form { display: grid; gap: 14px; }

.contact-form button {
  padding: 12px 20px;
  border: none;
  border-radius: 999px;
  font-weight: 900;
  background: var(--brand-red);
  color: #fff;
  cursor: pointer;
}
.contact-form button:hover { background: var(--brand-red-dark); }

/* ==========================================================
   FOOTER
========================================================== */
.site-footer {
  background: #fff;
  border-top: 2px solid var(--brand-red);
  padding: 14px 20px;
}

.site-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.site-footer__copy { font-size:.95rem; color: var(--text); font-weight:700; }

.site-footer__right { display:flex; align-items:center; justify-content:flex-end; gap:12px; }

.footer-auth {
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:6px;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:14px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
  min-width:170px;
}

.footer-auth__name { font-weight:900; color: var(--text); line-height:1.1; }

.footer-auth__links { display:flex; gap:12px; flex-wrap:wrap; justify-content:flex-end; }

.footer-auth__link { font-weight:900; text-decoration:none; color: var(--brand-blue); }
.footer-auth__link:hover { text-decoration: underline; }

.footer-auth__link--logout { color: var(--brand-red); }

.footer-auth__link--login {
  display:inline-flex;
  align-items:center;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  box-shadow: var(--shadow-sm);
}

/* ==========================================================
   RESPONSIVE
========================================================== */
@media (max-width: 980px) {
  .header-container { flex-direction: column; gap:12px; }
  .logo { position: static; }
  .main-nav ul { flex-wrap: wrap; justify-content:center; gap:14px; }
  .site-footer__inner { flex-direction: column; align-items: flex-start; }
  .footer-auth { width:100%; align-items:flex-start; }
  .footer-auth__links { justify-content:flex-start; }
}

@media (max-width: 768px) {
  .hero-inner h1 { font-size: 2rem; }
  .hero-inner p { font-size: 1rem; }
}

@media (max-width: 600px) {
  .containers,
  .projects-grid,
  .vacancies-grid,
  .admin-cards,
  .admin-projects-grid { grid-template-columns: 1fr; }
}
