/* Soft Modern Theme */
:root {
  /* Colors */
  --c-bg: #f8fafc;
  --c-surface: #ffffff;
  --c-text-main: #334155;
  --c-text-muted: #64748b;
  --c-primary: #818cf8; /* Soft indigo/purple */
  --c-primary-hover: #6366f1;
  --c-accent: #f472b6; /* Soft pink */
  --c-border: #e2e8f0;
  --c-focus: #fbbf24;

  /* Spacing Scale */
  --sp-4: 4px;
  --sp-8: 8px;
  --sp-16: 16px;
  --sp-24: 24px;
  --sp-40: 40px;
  --sp-64: 64px;

  /* Shadows & Radii */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 8px rgba(99, 102, 241, 0.04);
  --shadow-md: 0 8px 32px rgba(99, 102, 241, 0.08);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--c-text-main);
  background-color: var(--c-bg);
  line-height: 1.6;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6, .brand, nav a {
  overflow-wrap: anywhere;
  color: #1e293b;
  line-height: 1.2;
}

h1 { font-size: 2.5rem; margin-bottom: var(--sp-24); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 2rem; margin-bottom: var(--sp-24); margin-top: var(--sp-40); font-weight: 700; }
h3 { font-size: 1.5rem; margin-bottom: var(--sp-16); margin-top: var(--sp-24); font-weight: 600; }

p, ul, ol, table { margin-bottom: var(--sp-16); }
li { margin-bottom: var(--sp-8); margin-left: var(--sp-24); }
a { color: var(--c-primary); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--c-primary-hover); }

/* Accessibility */
:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 2px;
  border-radius: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--sp-24);
  min-width: 0;
}

main { flex: 1; padding: var(--sp-64) 0; }
section { margin-bottom: var(--sp-64); }

.grid {
  display: grid;
  gap: var(--sp-40);
  min-width: 0;
}
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

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

/* Header */
header {
  background-color: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  height: 64px;
  position: relative; /* Not sticky */
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.logo-area {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  font-weight: 700;
  font-size: 1.25rem;
  color: #1e293b;
}
.logo-area svg { width: 32px; height: 32px; }

.nav-links {
  display: flex;
  gap: var(--sp-24);
  align-items: center;
}
.nav-links a { color: var(--c-text-main); font-weight: 500; }
.nav-links a:hover { color: var(--c-primary); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-8) var(--sp-24);
  background-color: var(--c-primary);
  color: #ffffff;
  font-weight: 600;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
  text-decoration: none;
}
.btn:hover {
  background-color: var(--c-primary-hover);
  color: #ffffff;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: var(--sp-8);
}
.menu-toggle svg { width: 24px; height: 24px; fill: var(--c-text-main); }

@media (max-width: 767px) {
  header { height: 52px; }
  .menu-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--c-surface);
    flex-direction: column;
    padding: var(--sp-24);
    border-bottom: 1px solid var(--c-border);
    box-shadow: var(--shadow-sm);
  }
  .nav-links.is-visible {
    display: flex;
  }
  .nav-links .btn { width: 100%; }
}

/* Cards (Border Accent Style + Soft Modern) */
.card {
  background: var(--c-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border-top: 4px solid var(--c-accent);
  padding: var(--sp-24);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-width: 0;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(99, 102, 241, 0.12);
}
.card img {
  width: calc(100% + var(--sp-40) + var(--sp-8)); /* Counteract padding to bleed */
  margin: calc(var(--sp-24) * -1) calc(var(--sp-24) * -1) var(--sp-24) calc(var(--sp-24) * -1);
  height: 200px;
  object-fit: cover;
  border-radius: calc(var(--radius-md) - 4px) calc(var(--radius-md) - 4px) 0 0;
  max-width: none;
}
.card h3 { margin-top: 0; }
.card p { flex: 1; color: var(--c-text-muted); }
.card .read-more {
  margin-top: var(--sp-16);
  font-weight: 600;
  display: inline-block;
}

/* Home Specifics */
.hero {
  text-align: center;
  padding: var(--sp-64) 0;
  background: linear-gradient(135deg, #e0e7ff 0%, #fbcfe8 100%);
  border-radius: var(--radius-lg);
  margin-bottom: var(--sp-64);
}
.hero h1 { max-width: 800px; margin: 0 auto var(--sp-24); }
.hero p { max-width: 600px; margin: 0 auto var(--sp-24); font-size: 1.25rem; color: var(--c-text-main); }

.stat-block {
  background: var(--c-surface);
  padding: var(--sp-24);
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--c-primary);
}
.stat-value {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--c-primary);
  margin-bottom: var(--sp-12); /* 12px between stat and label as requested */
}
.stat-label {
  font-size: 1rem;
  font-weight: 500;
  color: var(--c-text-muted);
}

/* Content Pages */
.article-header {
  margin-bottom: var(--sp-40);
  padding-bottom: var(--sp-24);
  border-bottom: 1px solid var(--c-border);
}
.article-header img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-top: var(--sp-24);
}
.content-body { max-width: 800px; margin: 0 auto; }
.content-body h2 { color: var(--c-primary); }

/* Forms */
.form-group { margin-bottom: var(--sp-24); }
.form-group label { display: block; font-weight: 600; margin-bottom: var(--sp-8); }
.form-group input, .form-group textarea {
  width: 100%;
  padding: var(--sp-16);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  background: var(--c-surface);
  color: var(--c-text-main);
}
.form-group input:focus, .form-group textarea:focus {
  outline: 2px solid var(--c-primary);
  border-color: transparent;
}
.form-status { margin-top: var(--sp-16); padding: var(--sp-16); border-radius: var(--radius-sm); display: none; }
.form-status.is-visible { display: block; background: #dcfce7; color: #166534; }
.form-status.is-invalid { display: block; background: #fee2e2; color: #991b1b; }

/* Contact Specific */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-40); }
@media (max-width: 767px) { .contact-grid { grid-template-columns: 1fr; } }
.map-placeholder {
  background: linear-gradient(45deg, #e2e8f0, #cbd5e1);
  border-radius: var(--radius-md);
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text-muted);
  font-weight: 600;
  border: 1px solid var(--c-border);
}

/* Legal Tables */
table { width: 100%; border-collapse: collapse; }
th, td { padding: var(--sp-16); text-align: left; border-bottom: 1px solid var(--c-border); }
th { background: #f1f5f9; font-weight: 700; }

/* Footer */
footer {
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  padding: var(--sp-64) 0 var(--sp-40);
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--sp-40);
  margin-bottom: var(--sp-40);
}
@media (max-width: 767px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h4 { margin-bottom: var(--sp-16); }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: 0 0 var(--sp-8) 0; }
.footer-col a { color: var(--c-text-muted); }
.footer-col a:hover { color: var(--c-primary); }
.footer-bottom {
  text-align: center;
  padding-top: var(--sp-24);
  border-top: 1px solid var(--c-border);
  color: var(--c-text-muted);
  font-size: 0.875rem;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  padding: var(--sp-24);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.05);
  transform: translateY(100%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.4s ease, opacity 0.4s ease, visibility 0.4s;
  z-index: 1000;
}
.cookie-banner.is-visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}
.cookie-content {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-24);
}
.cookie-actions { display: flex; gap: var(--sp-16); flex-wrap: wrap; }
.cookie-btn-alt {
  background: transparent;
  border: 1px solid var(--c-border);
  color: var(--c-text-main);
}
.cookie-btn-alt:hover { background: var(--c-border); color: var(--c-text-main); }
@media (max-width: 767px) {
  .cookie-content { flex-direction: column; text-align: center; }
  .cookie-actions { justify-content: center; }
}

/* Micro-Breakpoint (Below 400px) */
@media (max-width: 399px) {
  :root {
    --sp-64: 48px;
    --sp-40: 32px;
    --sp-24: 16px;
  }
  .card img {
    width: calc(100% + var(--sp-24) + var(--sp-8));
    margin: calc(var(--sp-16) * -1) calc(var(--sp-16) * -1) var(--sp-16) calc(var(--sp-16) * -1);
  }
  .cookie-actions { flex-direction: column; width: 100%; }
  .cookie-actions button { width: 100%; }
}