:root {
  --c-bg: #f8fafc;
  --c-surface: #ffffff;
  --c-text-main: #0f172a;
  --c-text-muted: #475569;
  --c-accent: #6366f1;
  --c-accent-hover: #4f46e5;
  --c-accent-light: #e0e7ff;
  --c-border: #e2e8f0;
  --c-error: #ef4444;
  --c-error-bg: #fef2f2;
  --c-success: #10b981;
  
  --sp-4: 4px;
  --sp-8: 8px;
  --sp-12: 12px;
  --sp-16: 16px;
  --sp-24: 24px;
  --sp-40: 40px;
  --sp-64: 64px;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --shadow-micro: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-card: 0 10px 30px rgba(15, 23, 42, 0.06);
  --shadow-float: 0 20px 40px rgba(15, 23, 42, 0.08);

  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  background-color: var(--c-bg);
  color: var(--c-text-main);
  line-height: 1.6;
  scroll-behavior: smooth;
}

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

/* Accessibility */
:focus-visible {
  outline: 3px solid var(--c-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

h1, h2, h3, h4, .brand-name, .nav-links a {
  overflow-wrap: anywhere;
  color: var(--c-text-main);
}

h1 { font-size: 2.5rem; line-height: 1.2; margin-bottom: var(--sp-24); }
h2 { font-size: 1.75rem; line-height: 1.3; margin-top: var(--sp-40); margin-bottom: var(--sp-16); }
h3 { font-size: 1.25rem; margin-top: var(--sp-24); margin-bottom: var(--sp-12); }
p { margin-bottom: var(--sp-16); }
a { color: var(--c-accent); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--c-accent-hover); }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--sp-24);
}

/* Header */
.site-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
  height: 64px;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 100;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--c-text-main);
  text-decoration: none;
}

.brand svg {
  width: 24px;
  height: 24px;
  fill: var(--c-accent);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  gap: var(--sp-24);
}

.nav-links {
  display: flex;
  gap: var(--sp-24);
  list-style: none;
}

.nav-links a {
  color: var(--c-text-muted);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--c-accent);
}

.header-cta {
  display: flex;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--c-accent);
  color: #ffffff !important;
  padding: var(--sp-8) var(--sp-16);
  border-radius: var(--radius-sm);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  font-size: 0.95rem;
}

.btn:hover {
  background-color: var(--c-accent-hover);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-4);
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
  fill: var(--c-text-main);
}

/* Layout Core */
main {
  flex: 1;
  padding: var(--sp-64) 0;
}

.section {
  margin-bottom: var(--sp-64);
}

/* Hero Section */
.hero {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--sp-64) auto;
}

.hero p {
  font-size: 1.125rem;
  color: var(--c-text-muted);
  margin-bottom: var(--sp-24);
}

/* Card Style: Border Accent (Soft Modern) */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-24);
  min-width: 0;
}

.card {
  background: var(--c-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-micro);
  border-top: 4px solid var(--c-accent);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  min-width: 0;
}

.card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.card-img-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--c-border);
  overflow: hidden;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-content {
  padding: var(--sp-24);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-size: 1.25rem;
  margin-top: 0;
  margin-bottom: var(--sp-8);
}

.card-title a {
  color: var(--c-text-main);
}

.card-title a::before {
  content: "";
  position: absolute;
  inset: 0;
}

.card-desc {
  color: var(--c-text-muted);
  font-size: 0.95rem;
  margin-bottom: var(--sp-16);
  flex: 1;
}

.card-meta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--c-border);
  padding-top: var(--sp-16);
  margin-top: auto;
}

.card-link {
  font-weight: 600;
  color: var(--c-accent);
}

/* Sub-pages Content Layout */
.article-header {
  margin-bottom: var(--sp-40);
  text-align: center;
}

.article-hero-img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: var(--sp-40);
  box-shadow: var(--shadow-micro);
}

.content-body {
  max-width: 800px;
  margin: 0 auto;
  background: var(--c-surface);
  padding: var(--sp-40);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-micro);
}

.content-body h2, .content-body h3 {
  color: var(--c-text-main);
}

.content-body ul, .content-body ol {
  margin-bottom: var(--sp-16);
  padding-left: var(--sp-24);
}

.content-body li {
  margin-bottom: var(--sp-8);
}

.stat-block {
  background: var(--c-accent-light);
  padding: var(--sp-24);
  border-radius: var(--radius-md);
  margin: var(--sp-24) 0;
  display: flex;
  align-items: baseline;
  gap: var(--sp-12);
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--c-accent);
}

.stat-label {
  font-size: 1.1rem;
  color: var(--c-text-main);
  font-weight: 500;
}

/* Feature/Supporting Section */
.supporting-section {
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  padding: var(--sp-64) var(--sp-40);
  box-shadow: var(--shadow-micro);
  margin-top: var(--sp-64);
}

.supporting-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--sp-40);
  margin-top: var(--sp-40);
}

.support-item h3 {
  margin-top: 0;
  color: var(--c-accent);
}

/* Footer */
.site-footer {
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  padding: var(--sp-64) 0 var(--sp-24) 0;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-40);
  margin-bottom: var(--sp-40);
}

.footer-col h4 {
  font-size: 1.1rem;
  margin-bottom: var(--sp-16);
  color: var(--c-text-main);
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: var(--sp-8);
}

.footer-col a, .footer-col p {
  color: var(--c-text-muted);
  font-size: 0.95rem;
}

.footer-bottom {
  border-top: 1px solid var(--c-border);
  padding-top: var(--sp-24);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-16);
  color: var(--c-text-muted);
  font-size: 0.85rem;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--c-surface);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
  padding: var(--sp-24);
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.4s ease;
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}

.cookie-banner.is-visible {
  transform: translateY(0);
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-24);
}

.cookie-text {
  flex: 1;
  min-width: 280px;
}

.cookie-text p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--c-text-muted);
}

.cookie-actions {
  display: flex;
  gap: var(--sp-8);
  flex-wrap: wrap;
}

.btn-secondary {
  background: var(--c-border);
  color: var(--c-text-main) !important;
}
.btn-secondary:hover {
  background: #cbd5e1;
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--c-border);
  color: var(--c-text-main) !important;
}
.btn-outline:hover {
  border-color: var(--c-accent);
  color: var(--c-accent) !important;
}

/* Forms */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-40);
}

.form-group {
  margin-bottom: var(--sp-24);
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--sp-8);
  color: var(--c-text-main);
}

.form-control {
  width: 100%;
  padding: var(--sp-12) var(--sp-16);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  background: var(--c-surface);
  color: var(--c-text-main);
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px var(--c-accent-light);
}

.form-control.is-invalid {
  border-color: var(--c-error);
  background-color: var(--c-error-bg);
}

.error-message {
  display: none;
  color: var(--c-error);
  font-size: 0.85rem;
  margin-top: var(--sp-4);
}

.form-control.is-invalid + .error-message {
  display: block;
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.contact-info {
  background: var(--c-surface);
  padding: var(--sp-40);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-micro);
  border-top: 4px solid var(--c-accent);
}

/* Styled Map Block */
.static-map {
  width: 100%;
  height: 200px;
  background: #e2e8f0;
  border-radius: var(--radius-md);
  margin-top: var(--sp-24);
  position: relative;
  background-image: radial-gradient(#cbd5e1 2px, transparent 2px);
  background-size: 20px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.map-pin {
  width: 32px;
  height: 32px;
  background-color: var(--c-accent);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  position: relative;
  box-shadow: var(--shadow-card);
}
.map-pin::after {
  content: "";
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Tables (Cookie Policy) */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-bottom: var(--sp-24);
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}
th, td {
  padding: var(--sp-12) var(--sp-16);
  border: 1px solid var(--c-border);
  text-align: left;
}
th {
  background: var(--c-bg);
  font-weight: 600;
}

/* Responsive Overrides */
@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .site-header {
    height: 52px;
  }
  
  .nav-wrapper {
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border);
    padding: var(--sp-16) var(--sp-24);
    box-shadow: var(--shadow-card);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-16);
  }

  .nav-wrapper.is-visible {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    gap: var(--sp-16);
  }

  .menu-toggle {
    display: block;
  }

  .header-cta {
    display: none;
  }
  
  .nav-wrapper .header-cta {
    display: flex;
    margin-top: var(--sp-8);
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }

  .content-body {
    padding: var(--sp-24);
  }
  
  .supporting-section {
    padding: var(--sp-40) var(--sp-24);
  }
}

@media (max-width: 400px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .card-img-wrapper {
    aspect-ratio: 4/3;
  }
  h1 { font-size: 1.75rem; }
  .stat-block {
    flex-direction: column;
    gap: var(--sp-4);
  }
}