/* ============================================
   afslankarts.nl — Design System & Global Styles
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,wght@0,400;0,600;1,400&family=Manrope:wght@400;500;700&display=swap');

/* --- CSS Custom Properties --- */
:root {
  --color-primary:    #1A4A5A;
  --color-accent:     #D4854A;
  --color-bg:         #FBF9F5;
  --color-surface:    #F5F3EF;
  --color-card:       #FFFFFF;
  --color-text:       #2C2C2A;
  --color-text-muted: #5F5E5A;
  --color-border:     rgba(193,199,203,0.20);
  --shadow-card:      0 24px 48px rgba(26,74,90,0.06);
  --shadow-sm:        0 4px 12px rgba(26,74,90,0.04);
  --radius-card:      12px;
  --radius-btn:       8px;
  --radius-lg:        20px;
  --font-heading:     'Newsreader', Georgia, 'Times New Roman', serif;
  --font-body:        'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; }
ul { list-style: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.25;
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }
.text-muted { color: var(--color-text-muted); }

/* --- Container --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-btn);
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.25s ease;
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary {
  background: var(--color-accent);
  color: #fff;
}
.btn-primary:hover { background: #c47a42; transform: translateY(-1px); }
.btn-secondary {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.3);
}
.btn-secondary:hover { background: rgba(255,255,255,0.2); }
.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-border);
}
.btn-outline:hover { border-color: var(--color-primary); background: var(--color-surface); }
.btn-sm { padding: 10px 20px; font-size: 0.875rem; }

/* ============================================
   1. NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: all 0.3s ease;
}
.nav.scrolled {
  background: rgba(251,249,245,0.85);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 1px 0 var(--color-border);
  padding: 12px 0;
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-body);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.03em;
  transition: color 0.3s;
}
.nav.scrolled .nav-logo { color: var(--color-primary); }
.nav-logo span { color: var(--color-accent); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  transition: color 0.3s;
}
.nav.scrolled .nav-links a { color: var(--color-text-muted); }
.nav-links a:hover { color: #fff; }
.nav.scrolled .nav-links a:hover { color: var(--color-primary); }
.nav-cta {
  background: var(--color-accent) !important;
  color: #fff !important;
  padding: 10px 24px;
  border-radius: var(--radius-btn);
  font-weight: 700 !important;
  font-size: 0.875rem !important;
}
.nav-cta:hover { background: #c47a42 !important; }

/* Mobile hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  transition: all 0.3s;
  border-radius: 2px;
}
.nav.scrolled .nav-toggle span { background: var(--color-text); }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--color-card);
    flex-direction: column;
    padding: 80px 32px 32px;
    gap: 24px;
    transition: right 0.3s ease;
    box-shadow: -8px 0 32px rgba(0,0,0,0.1);
  }
  .nav-links.open { right: 0; }
  .nav-links a { color: var(--color-text) !important; font-size: 1.1rem; }
  .nav-cta { width: 100%; text-align: center; }
}

/* ============================================
   2. HERO
   ============================================ */
.hero {
  position: relative;
  background: radial-gradient(ellipse at 30% 50%, #1A4A5A 0%, #003341 100%);
  padding: 160px 0 100px;
  overflow: hidden;
  min-height: 600px;
  display: flex;
  align-items: center;
}
.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-text h1 {
  color: #fff;
  margin-bottom: 20px;
}
.hero-text p {
  color: rgba(255,255,255,0.75);
  font-size: 1.15rem;
  margin-bottom: 36px;
  max-width: 480px;
  line-height: 1.7;
}
.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Floating SVG shapes */
.hero-shape {
  position: absolute;
  opacity: 0.08;
  animation: float 8s ease-in-out infinite;
}
.hero-shape:nth-child(1) { top: 10%; right: 5%; animation-delay: 0s; }
.hero-shape:nth-child(2) { bottom: 15%; right: 20%; animation-delay: 2s; }
.hero-shape:nth-child(3) { top: 40%; right: 35%; animation-delay: 4s; }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

/* Hero SVG illustration */
.hero-illustration {
  width: 100%;
  max-width: 420px;
}

@media (max-width: 768px) {
  .hero { padding: 120px 0 60px; min-height: auto; }
  .hero-content { grid-template-columns: 1fr; text-align: center; }
  .hero-text p { margin-left: auto; margin-right: auto; }
  .hero-buttons { justify-content: center; }
  .hero-visual { display: none; }
}

/* ============================================
   3. TRUST BAR
   ============================================ */
.trust-bar {
  background: var(--color-surface);
  padding: 40px 0;
}
.trust-items {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
}
.trust-icon {
  width: 40px;
  height: 40px;
  background: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.trust-icon svg { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 2; }
.trust-item span {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-primary);
}

@media (max-width: 768px) {
  .trust-items { grid-template-columns: 1fr 1fr; gap: 20px; }
}
@media (max-width: 480px) {
  .trust-items { grid-template-columns: 1fr; }
}

/* ============================================
   4. HOW IT WORKS
   ============================================ */
.how-it-works {
  padding: 100px 0;
  background: var(--color-card);
}
.section-header {
  text-align: center;
  margin-bottom: 64px;
}
.section-header h2 { color: var(--color-primary); margin-bottom: 12px; }
.section-header p { color: var(--color-text-muted); max-width: 600px; margin: 0 auto; font-size: 1.05rem; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}
.step {
  text-align: center;
  padding: 40px 28px;
}
.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.step h3 { color: var(--color-primary); margin-bottom: 12px; }
.step p { color: var(--color-text-muted); font-size: 0.95rem; }

@media (max-width: 768px) {
  .steps { grid-template-columns: 1fr; gap: 16px; }
  .step { padding: 24px; }
}

/* ============================================
   5. PARTNERS / PROGRAMMA'S
   ============================================ */
.partners-section {
  padding: 100px 0;
  background: var(--color-surface);
}
.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  margin-top: 48px;
}
.partner-card {
  background: var(--color-card);
  border-radius: var(--radius-card);
  padding: 32px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}
.partner-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 32px 64px rgba(26,74,90,0.1);
}
.partner-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.partner-card h3 { color: var(--color-primary); font-size: 1.25rem; }
.partner-card .description { color: var(--color-text-muted); font-size: 0.9rem; line-height: 1.6; }
.partner-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
.partner-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.partner-rating {
  color: var(--color-accent);
  font-weight: 700;
}
.partner-stars { color: var(--color-accent); letter-spacing: 2px; }
.partner-locations { font-size: 0.8rem; color: var(--color-text-muted); }
.partner-card .btn { margin-top: auto; align-self: flex-start; }

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--color-surface) 25%, #ede9e3 50%, var(--color-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-card);
  min-height: 240px;
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@media (max-width: 480px) {
  .partners-grid { grid-template-columns: 1fr; }
}

/* ============================================
   6. LEAD FORM
   ============================================ */
.lead-section {
  padding: 100px 0;
  background: var(--color-primary);
}
.lead-section h2 {
  color: #fff;
  text-align: center;
  margin-bottom: 12px;
}
.lead-section .section-subtitle {
  color: rgba(255,255,255,0.7);
  text-align: center;
  margin-bottom: 48px;
  font-size: 1.05rem;
}
.lead-form {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  color: rgba(255,255,255,0.9);
  font-size: 0.875rem;
  font-weight: 500;
}
.form-group input,
.form-group select {
  padding: 14px 18px;
  border-radius: var(--radius-btn);
  border: 1.5px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 1rem;
  transition: border-color 0.2s, background 0.2s;
  outline: none;
}
.form-group input::placeholder { color: rgba(255,255,255,0.4); }
.form-group input:focus,
.form-group select:focus {
  border-color: var(--color-accent);
  background: rgba(255,255,255,0.12);
}
.form-group select { cursor: pointer; }
.form-group select option { color: var(--color-text); background: var(--color-card); }

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  line-height: 1.5;
}
.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--color-accent);
}
.form-checkbox a { color: var(--color-accent); text-decoration: underline; }

.form-error {
  color: #ff8a80;
  font-size: 0.8rem;
  display: none;
}
.form-group.error input,
.form-group.error select { border-color: #ff8a80; }
.form-group.error .form-error { display: block; }

.btn-submit {
  background: var(--color-accent);
  color: #fff;
  padding: 16px 32px;
  border-radius: var(--radius-btn);
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
}
.btn-submit:hover { background: #c47a42; }
.btn-submit:disabled { opacity: 0.7; cursor: not-allowed; }
.btn-submit .spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin: 0 auto;
}
.btn-submit.loading .btn-text { visibility: hidden; }
.btn-submit.loading .spinner { display: block; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

.form-success {
  display: none;
  text-align: center;
  padding: 40px;
  color: #fff;
}
.form-success h3 { font-size: 1.5rem; margin-bottom: 12px; }
.form-success p { color: rgba(255,255,255,0.8); }

/* ============================================
   7. ARTICLES
   ============================================ */
.articles-section {
  padding: 100px 0;
  background: var(--color-card);
}
.articles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 24px;
  margin-top: 48px;
}
.article-card {
  background: var(--color-surface);
  border-radius: var(--radius-card);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s;
}
.article-card:hover { transform: translateY(-2px); }
.article-card:first-child {
  grid-row: 1 / 3;
  padding: 48px;
}
.article-category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-accent);
}
.article-card h3 { color: var(--color-primary); }
.article-card h3 a:hover { color: var(--color-accent); }
.article-meta { font-size: 0.8rem; color: var(--color-text-muted); }
.article-link {
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.9rem;
  margin-top: auto;
}
.article-link:hover { color: var(--color-accent); }

@media (max-width: 768px) {
  .articles-grid { grid-template-columns: 1fr; }
  .article-card:first-child { grid-row: auto; padding: 32px; }
}

/* ============================================
   8. FOOTER
   ============================================ */
.footer {
  background: var(--color-primary);
  color: rgba(255,255,255,0.7);
  padding: 80px 0 40px;
}
.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand .nav-logo { margin-bottom: 16px; display: inline-block; color: #fff; font-family: var(--font-body); font-weight: 700; letter-spacing: -0.03em; }
.footer-brand p { font-size: 0.9rem; line-height: 1.7; max-width: 300px; }
.footer h4 {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
  font-family: var(--font-body);
}
.footer ul li { margin-bottom: 10px; }
.footer ul a {
  font-size: 0.9rem;
  transition: color 0.2s;
}
.footer ul a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.8rem;
}
.footer-disclaimer {
  font-size: 0.8rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.45);
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

@media (max-width: 768px) {
  .footer-content { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-content { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ============================================
   MOBILE OPTIMIZATIONS
   ============================================ */

/* Prevent horizontal scroll */
html, body { overflow-x: hidden; }

/* Better touch targets */
@media (max-width: 768px) {
  .btn { padding: 16px 28px; font-size: 1rem; min-height: 48px; }
  .btn-sm { padding: 12px 20px; min-height: 44px; }

  /* Container smaller padding on mobile */
  .container { padding: 0 16px; }

  /* Partner cards: single column earlier */
  .partners-grid { grid-template-columns: 1fr; }
  .partner-card { padding: 24px; }

  /* Lead form full width improvements */
  .lead-section { padding: 60px 0; }
  .lead-form { gap: 16px; }
  .form-group input,
  .form-group select { padding: 16px; font-size: 16px; /* prevents iOS zoom */ }
  .btn-submit { padding: 18px 32px; font-size: 1.05rem; min-height: 52px; }

  /* Section spacing */
  .how-it-works,
  .partners-section,
  .articles-section { padding: 60px 0; }
  .section-header { margin-bottom: 40px; }

  /* Hero buttons stack on small screens */
  .hero-buttons { flex-direction: column; width: 100%; }
  .hero-buttons .btn { width: 100%; justify-content: center; }

  /* Trust bar wrap better */
  .trust-item { flex-direction: column; text-align: center; gap: 8px; }
  .trust-item span { font-size: 0.85rem; }

  /* Footer more compact */
  .footer { padding: 48px 0 32px; }

  /* Tables scroll horizontally in article content */
  .article-content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
  .article-content table th,
  .article-content table td { white-space: normal; min-width: 120px; }
}

@media (max-width: 380px) {
  /* Very small screens */
  h1 { font-size: 1.7rem; }
  .hero { padding: 100px 0 50px; }
  .nav-logo { font-size: 1.25rem; }
  .stat-card .value { font-size: 1.5rem; }
}
