/* ===== PROFESSIONELE UI VARIABELEN ===== */
:root {
  --primary: #273a5a;
  --primary-light: #3a5a8c;
  --secondary: #2f5592;
  --text: #2c3e50;
  --text-light: #7f8c8d;
  --bg: #ffffff;
  --card: #f8f9fa;
  --border: #e9ecef;
  --shadow: rgba(0, 0, 0, 0.08);
  --sidebar-width: 240px;
  --sidebar-collapsed-width: 60px;
  --header-height: 60px;
  --mobile-header-height: 55px;
}

/* ===== RESET ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== CORRECTE LAYOUT - FIXED ===== */
@media (min-width: 1024px) {
  body {
    display: flex;
    min-height: 100vh;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(160deg, var(--primary), var(--secondary));
    z-index: 1000;
    overflow-y: auto;
    transition: width 0.3s ease;
    box-shadow: 10px 0 15px rgba(0, 0, 0, 0.259);
    border-right: 1px solid #525b69;
  }

  .sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
  }

  .main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }

  body.sidebar-collapsed .main-content {
    margin-left: var(--sidebar-collapsed-width);
  }
}

/* ===== MOBILE LAYOUT ===== */
@media (max-width: 1023px) {
  .main-content {
    margin-left: 0 !important;
    width: 100%;
  }

  .sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    width: 85%;
    max-width: 300px;
    height: 100vh;
    background: linear-gradient(160deg, var(--primary), var(--secondary));
    z-index: 1000;
    transition: left 0.3s ease;
    box-shadow: 3px 0 15px rgba(0, 0, 0, 0.15);
  }

  .sidebar-open {
    left: 0;
  }
}

/* ===== HEADER MET LOGO LINKS ===== */
header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: 0 10px 10px rgba(0, 0, 0, 0.341);
  height: var(--header-height);
  min-height: var(--header-height);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  padding: 0 20px;
}

/* LOGO AAN LINKERKANT */
.logo {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 1rem;
  font-weight: 500;
  color: white;
  text-decoration: none;
  /* Verwijderd: margin-left: auto; - Logo staat nu links */
}

.logo span:first-child {
  font-size: 1rem;
}

/* MOBILE MENU KNOOP ALLEEN OP MOBILE ZICHTBAAR */
.mobile-menu-btn {
  display: none;
}

@media (max-width: 1023px) {
  .mobile-menu-btn {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 8px;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    /* Verwijderd: margin-right: auto; - Menu knop staat nu rechts */
  }

  .mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.2);
  }

  /* Logo blijft links op mobile */
  .logo {
    /* Verwijderd: margin-left: auto; - Logo blijft links */
  }
}

/* VERWIJDER ALLE NAVIGATIE ITEMS IN HEADER */
.nav-container {
  display: none !important;
}

.nav-menu,
.nav-item,
.nav-link {
  display: none !important;
}

/* ===== SIDEBAR HEADER ZONDER X ===== */
.sidebar-header {
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  height: var(--header-height);
  min-height: var(--header-height);
  backdrop-filter: blur(10px);
}

/* VERWIJDER DE X KNOOP OP DESKTOP */
@media (min-width: 1024px) {
  .sidebar-close {
    display: none !important;
  }
}

.sidebar.collapsed .sidebar-header {
  justify-content: center;
  padding: 15px 10px;
}

.sidebar.collapsed .logo span:last-child {
  display: none;
}

.sidebar-toggle {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  padding: 10px;
  width: 30px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s ease;
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

/* ===== SIDEBAR NAVIGATIE - CLEAN ===== */
.sidebar-nav {
  list-style: none;
  padding: 1px 0;
  margin: 0;
}

.sidebar-link {
  color: white;
  text-decoration: none;
  padding: 1px 25px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 2px 5px;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.sidebar.collapsed .sidebar-link span:last-child {
  display: none;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(3px);
}

.sidebar-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3000px;
  background: rgba(255, 255, 255, 0.6) 99;
  transform: scaleY(0);
  transition: transform 0.2s ease;
}

.sidebar-link:hover::before {
  transform: scaleY(1);
}

.sidebar-link span:first-child {
  font-size: 1.1rem;
  min-width: 20px;
  text-align: center;
}

/* ===== SIDEBAR SLUITKNOOP ALLEEN OP MOBILE ===== */
.sidebar-close {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 5px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 1024px) {
  .sidebar-close {
    display: none;
  }
}

/* ===== OVERLAY ===== */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
  backdrop-filter: blur(2px);
}

.overlay-active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ===== HOOFDINHOUD CONTAINER ===== */
.main-container {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 25px;
  width: 100%;
}

@media (max-width: 768px) {
  .main-container {
    padding: 20px 15px;
  }
}

/* ===== CALCULATOR STIJLEN ===== */
.calculator {
  background: var(--card);
  border-radius: 12px;
  padding: 30px;
  margin-top: 25px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 15px var(--shadow);
}

.calculator-title {
  color: var(--primary);
  margin-bottom: 10px;
  font-size: 1.8rem;
  text-align: center;
  font-weight: 700;
}

.calculator p {
  text-align: center;
  margin-bottom: 25px;
  color: var(--text-light);
  font-size: 1.05rem;
}

/* ===== CARDS ===== */
.choice-card,
.tool-card,
.feature-card {
  background: var(--card);
  border-radius: 12px;
  padding: 25px 20px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 15px var(--shadow);
  transition: all 0.3s ease;
}

.choice-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.choice-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px var(--shadow);
  border-color: var(--primary-light);
}

/* ===== KNOOPPEN ===== */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  min-height: 46px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: 0 4px 15px rgba(39, 58, 90, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(39, 58, 90, 0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

/* ===== RESULTATEN ===== */
.result {
  margin-top: 30px;
  padding: 30px;
  background: var(--card);
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 15px var(--shadow);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 25px 0;
}

.result-item {
  background: var(--card);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--border);
  text-align: center;
  transition: transform 0.3s ease;
}

.result-item.highlight {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
}

.result-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.result-item.highlight .result-value {
  color: white;
}

/* ===== CLEAN FOOTER MET COPYRIGHT ===== */
footer {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  text-align: center;
  padding: 30px 20px;
  margin-top: 50px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-copyright {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-top: 15px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 15px 0;
  flex-wrap: wrap;
}

.footer-links a {
  color: white;
  text-decoration: none;
  transition: opacity 0.2s;
}

.footer-links a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .calculator {
    padding: 20px;
    margin-top: 20px;
  }

  .btn {
    padding: 10px 20px;
    min-height: 42px;
  }
}

/* ===== ANIMATIES ===== */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.question,
.result,
.choice-card {
  animation: slideIn 0.4s ease-out;
}

/* ===== CRITICAL FIXES ===== */
:root {
  --mobile-header-height: 55px;
}

.header-container {
  height: var(--header-height);
  min-height: var(--header-height);
}

@media (max-width: 1023px) {
  .header-container {
    height: var(--mobile-header-height);
    min-height: var(--mobile-header-height);
  }
}

/* Verbeterde footer */
footer .footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  padding: 30px 20px;
  text-align: center;
}

/* Mobile accessibility improvements */
@media (max-width: 1023px) {
  .mobile-menu-btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
  }
}

/* HOME PAGE SPECIFIEKE STIJLEN */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="rgba(255,255,255,0.05)"><circle cx="50" cy="50" r="2"/></svg>')
    repeat;
  background-size: 50px 50px;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 30px;
  position: relative;
  z-index: 2;
}

.hero-text h1 {
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 30px;
  opacity: 0.9;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  margin-bottom: 40px;
}

.btn-large {
  padding: 16px 32px;
  font-size: 1.1rem;
  border-radius: 10px;
}

.hero-stats {
  display: flex;
  gap: 40px;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.8;
}

.hero-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.visual-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 25px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.visual-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.visual-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.visual-card p {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Tools Sectie */
.tools-section {
  padding: 80px 0;
  background: var(--bg);
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header h2 {
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 15px;
  font-weight: 700;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

.tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.tool-card {
  background: var(--card);
  padding: 40px 30px;
  border-radius: 16px;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: 0 8px 25px var(--shadow);
  transition: transform 0.3s ease;
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.tool-card:hover {
  transform: translateY(-5px);
}

.tool-card.highlight {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
}

.tool-card.highlight .tool-icon {
  background: rgba(255, 255, 255, 0.2);
}

.tool-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
  background: var(--bg);
  width: 90px;
  height: 90px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
}

.tool-card h3 {
  font-size: 1.6rem;
  margin-bottom: 15px;
  font-weight: 600;
}

.tool-card p {
  font-size: 1rem;
  margin-bottom: 20px;
  line-height: 1.6;
}

.tool-features {
  list-style: none;
  padding: 0;
  margin: 0 0 25px 0;
  text-align: left;
}

.tool-features li {
  padding: 6px 0;
  font-size: 0.95rem;
}

/* Features Sectie */
.features-section {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--card) 0%, var(--bg) 100%);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.feature-card {
  background: var(--bg);
  padding: 35px 25px;
  border-radius: 14px;
  text-align: center;
  border: 1px solid var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px var(--shadow);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: var(--primary);
  font-weight: 600;
}

.feature-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-light);
}

/* CTA Sectie */
.cta-section {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  text-align: center;
}

.cta-content h2 {
  font-size: 2.2rem;
  margin-bottom: 20px;
  font-weight: 700;
}

.cta-content p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  opacity: 0.9;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
}

/* Footer */
.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 30px;
}

.footer-section h3 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  font-weight: 600;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 8px;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-section a:hover {
  color: white;
}

.contact-info p {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 25px;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.footer-bottom a:hover {
  color: white;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
    padding: 50px 30px;
  }

  .hero-text h1 {
    font-size: 2.4rem;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding: 40px 0;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .hero-stats {
    justify-content: center;
    gap: 30px;
  }

  .hero-visual {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .visual-card {
    height: 150px;
    padding: 20px;
  }

  .card-icon {
    font-size: 2rem;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 480px) {
  .hero-text h1 {
    font-size: 1.7rem;
  }

  .section-header h2 {
    font-size: 1.8rem;
  }

  .tool-card {
    padding: 30px 20px;
  }

  .feature-card {
    padding: 25px 20px;
  }

  .cta-content h2 {
    font-size: 1.8rem;
  }

  .hero-content,
  .main-container {
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Animation classes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out;
}

/* ===== MOBILE MENU PERFORMANCE OPTIMIZATIONS ===== */
.mobile-menu-btn {
  /* Zorg voor directe touch respons */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* Optimaliseer sidebar animaties voor mobile */
@media (max-width: 1023px) {
  .sidebar {
    transition: left 0.2s ease; /* Kortere transitie voor snellere respons */
    will-change: left; /* Optimaliseer voor animaties */
  }

  .overlay {
    transition: opacity 0.2s ease;
    will-change: opacity;
  }

  /* Zorg dat de menu knop goed klikbaar is */
  .mobile-menu-btn {
    position: relative;
    z-index: 901; /* Hoger dan andere elementen */
    min-width: 44px; /* Minimum touch target size */
    min-height: 44px;
  }

  /* Voorkom dat andere elementen over de knop komen */
  header {
    z-index: 900;
    position: relative;
  }
}

/* ===== TOUCH OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) {
  /* Optimalisaties voor touch devices */
  .sidebar-link {
    min-height: 44px; /* Minimum touch target size */
    padding: 15px; /* Meer padding voor betere touch */
  }

  .btn {
    min-height: 44px;
    min-width: 44px;
  }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.sidebar,
.overlay {
  /* Optimaliseer voor animaties */
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000;
}
