:root {
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bg-color: #f8fafc;
  --surface-color: #ffffff;
  --text-main: #1e293b;
  --text-muted: #475569;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --accent: #10b981;
  --error: #ef4444;
  --focus-ring: rgba(59, 130, 246, 0.5);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
  --radius-md: 12px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-24: 24px;
  --space-40: 40px;
  --space-64: 64px;

  --header-height-desktop: 64px;
  --header-height-mobile: 52px;
}

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

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6, .brand-name, .nav-link {
  margin-top: 0;
  margin-bottom: var(--space-16);
  color: var(--text-main);
  overflow-wrap: anywhere;
}

h1 { font-size: 2.5rem; line-height: 1.2; letter-spacing: -0.02em; }
h2 { font-size: 2rem; line-height: 1.3; letter-spacing: -0.01em; }
h3 { font-size: 1.5rem; line-height: 1.4; }
h4 { font-size: 1.25rem; line-height: 1.4; }

p {
  margin-top: 0;
  margin-bottom: var(--space-16);
  color: var(--text-muted);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-hover);
}

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-24);
}

th, td {
  text-align: left;
  padding: var(--space-12);
  border-bottom: 1px solid #e2e8f0;
}

th {
  color: var(--text-main);
  font-weight: 600;
}

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

.main-content {
  flex: 1;
  padding: var(--space-64) 0;
}

/* Header */
.site-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  height: var(--header-height-desktop);
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

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

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

.brand svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

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

.nav-link {
  margin: 0;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-link:hover {
  color: var(--primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-16);
  background-color: var(--primary);
  color: #ffffff;
  font-weight: 600;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn:hover {
  background-color: var(--primary-hover);
  color: #ffffff;
}

.btn-secondary {
  background-color: var(--surface-color);
  color: var(--text-main);
  border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
  background-color: #f1f5f9;
  color: var(--text-main);
}

.nav-toggle {
  display: none;
  padding: var(--space-8);
  background: transparent;
  color: var(--text-main);
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #e0f2fe 0%, #d1fae5 100%);
  border-radius: var(--radius-lg);
  padding: var(--space-64) var(--space-24);
  text-align: center;
  margin-bottom: var(--space-64);
  box-shadow: var(--shadow-sm);
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: var(--space-16);
}

.hero p {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto var(--space-24);
}

/* Grid & Cards (Border Accent Style) */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-24);
}

.grid-child {
  min-width: 0;
}

.card {
  background: var(--surface-color);
  border-radius: var(--radius-md);
  padding: var(--space-24);
  box-shadow: var(--shadow-sm);
  border-left: 6px solid var(--accent);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.card-img-wrap {
  margin: calc(var(--space-24) * -1) calc(var(--space-24) * -1) var(--space-16) calc(var(--space-24) * -1);
  border-radius: 0 var(--radius-md) 0 0;
  overflow: hidden;
}

.card-img-wrap img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.card h3 {
  margin-bottom: var(--space-8);
  font-size: 1.25rem;
}

.card p {
  flex: 1;
  margin-bottom: var(--space-24);
  font-size: 0.95rem;
}

.card-cta {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: auto;
}

.card-cta svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.card:hover .card-cta svg {
  transform: translateX(4px);
}

/* Section */
.section {
  margin-bottom: var(--space-64);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-40);
}

/* Article Content */
.article-header {
  margin-bottom: var(--space-40);
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.article-hero-img {
  width: 100%;
  border-radius: var(--radius-lg);
  aspect-ratio: 21/9;
  object-fit: cover;
  margin-bottom: var(--space-40);
  box-shadow: var(--shadow-md);
}

.article-body {
  max-width: 800px;
  margin: 0 auto;
  background: var(--surface-color);
  padding: var(--space-40);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.article-body h2 {
  margin-top: var(--space-40);
  padding-bottom: var(--space-8);
  border-bottom: 1px solid #e2e8f0;
}

.article-body h3 {
  margin-top: var(--space-24);
}

.article-body ul, .article-body ol {
  margin-bottom: var(--space-16);
  padding-left: var(--space-24);
  color: var(--text-muted);
}

.article-body li {
  margin-bottom: var(--space-8);
}

/* Contact Form */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-40);
  max-width: 1000px;
  margin: 0 auto;
}

.contact-info {
  background: var(--surface-color);
  padding: var(--space-24);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border-left: 6px solid var(--primary);
}

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

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

.form-control {
  width: 100%;
  padding: var(--space-12);
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  background-color: var(--surface-color);
  color: var(--text-main);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.form-control.is-invalid {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25);
}

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

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

.form-success {
  display: none;
  padding: var(--space-16);
  background-color: var(--accent-light);
  color: #065f46;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-24);
  border-left: 4px solid var(--accent);
}

.form-success.is-visible {
  display: block;
}

.map-block {
  width: 100%;
  height: 250px;
  background: #e2e8f0;
  border-radius: var(--radius-md);
  margin-top: var(--space-24);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.map-block svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
}

.map-pin {
  position: absolute;
  color: var(--error);
  width: 32px;
  height: 32px;
}

/* Stats block inside article/card */
.stat-block {
  display: flex;
  align-items: baseline;
  gap: var(--space-12);
  margin-bottom: var(--space-16);
  background: #f1f5f9;
  padding: var(--space-12) var(--space-16);
  border-radius: var(--radius-md);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

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

.footer-col h4 {
  font-size: 1.125rem;
  margin-bottom: var(--space-16);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: var(--space-8);
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-24);
  border-top: 1px solid #e2e8f0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: var(--space-24);
  left: var(--space-24);
  right: var(--space-24);
  max-width: 600px;
  margin: 0 auto;
  background: var(--surface-color);
  padding: var(--space-24);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  border-left: 6px solid var(--primary);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-text p {
  margin: 0;
  font-size: 0.875rem;
}

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

.cookie-actions .btn {
  font-size: 0.875rem;
  padding: var(--space-8) var(--space-12);
}

/* Responsive */
@media (max-width: 768px) {
  .site-header {
    height: var(--header-height-mobile);
  }
  
  .nav-toggle {
    display: block;
  }
  
  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-height-mobile);
    left: 0;
    right: 0;
    background: var(--surface-color);
    flex-direction: column;
    padding: var(--space-24);
    box-shadow: var(--shadow-md);
    border-top: 1px solid #e2e8f0;
    z-index: 1000;
  }
  
  .site-nav.is-visible {
    display: flex;
  }
  
  .header-cta {
    display: none;
  }
  
  .site-nav .header-cta {
    display: inline-flex;
    margin-top: var(--space-16);
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .article-body {
    padding: var(--space-24);
    border-radius: 0;
  }
  
  /* Remove offset frames for smaller screens if applied */
  .card-img-wrap {
    margin: 0 0 var(--space-16) 0;
    border-radius: var(--radius-md);
  }
}

@media (max-width: 399px) {
  .container {
    padding: 0 var(--space-16);
  }
  
  .hero {
    padding: var(--space-40) var(--space-16);
  }
  
  .cookie-actions {
    flex-direction: column;
  }
  
  .cookie-actions .btn {
    width: 100%;
  }
}

/* Motion Preferences */
@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;
  }
}