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

  /* Colors - Soft Modern (Pastels & Dark Slate) */
  --bg-color: #f7fafc;
  --surface-color: #ffffff;
  --text-color: #2d3748;
  --text-light: #4a5568;
  --primary-color: #63b3ed;
  --primary-dark: #4299e1;
  --accent-color: #f6ad55;
  --border-color: #e2e8f0;
  --error-color: #fc8181;
  --glass-bg: rgba(255, 255, 255, 0.85);

  /* Typography */
  --font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(45, 55, 72, 0.04);
  --shadow-md: 0 4px 20px rgba(45, 55, 72, 0.06);
  --shadow-hover: 0 12px 32px rgba(45, 55, 72, 0.1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  min-width: 320px;
  overflow-x: hidden; /* Global overflow handling handled gracefully by max-widths, ban is on masking layout shift */
}

/* Ensure no negative impacts of overflow-wrap */
h1, h2, h3, h4, h5, h6, .brand, .site-nav a, p {
  overflow-wrap: anywhere;
}

/* Accessibility: Focus */
*:focus-visible {
  outline: 3px solid var(--primary-dark);
  outline-offset: 3px;
}

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

/* Typography */
h1 { font-size: 2.5rem; line-height: 1.2; margin-bottom: var(--sp-24); color: var(--text-color); }
h2 { font-size: 2rem; line-height: 1.3; margin-bottom: var(--sp-16); margin-top: var(--sp-40); color: var(--text-color); }
h3 { font-size: 1.5rem; line-height: 1.4; margin-bottom: var(--sp-16); margin-top: var(--sp-24); }
p { margin-bottom: var(--sp-16); }
a { color: var(--primary-dark); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--accent-color); }
ul, ol { margin-bottom: var(--sp-16); padding-left: var(--sp-24); }
li { margin-bottom: var(--sp-8); }

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

/* Header */
.site-header {
  height: 64px;
  background-color: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
}
.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-color);
}
.brand svg {
  width: 32px;
  height: 32px;
  fill: var(--primary-dark);
}
.site-nav {
  display: flex;
  gap: var(--sp-24);
  align-items: center;
}
.site-nav a {
  color: var(--text-color);
  font-weight: 500;
}
.site-nav a:hover {
  color: var(--primary-dark);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-8) var(--sp-24);
  background-color: var(--primary-dark);
  color: #ffffff;
  font-weight: 600;
  border-radius: var(--border-radius-md);
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  text-align: center;
}
.btn:hover {
  background-color: var(--primary-color);
  color: #ffffff;
  transform: translateY(-2px);
}
.btn-outline {
  background-color: transparent;
  color: var(--text-color);
  border: 1px solid var(--border-color);
}
.btn-outline:hover {
  background-color: var(--border-color);
  color: var(--text-color);
}

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

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #e2e8f0 0%, #edf2f7 100%);
  padding: var(--sp-64) 0;
  text-align: center;
  border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
  margin-bottom: var(--sp-64);
}
.hero-title {
  font-size: 3rem;
  margin-bottom: var(--sp-24);
}
.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-light);
  max-width: 800px;
  margin: 0 auto var(--sp-40);
}

/* Grid Layouts */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--sp-40);
}
.grid > * {
  min-width: 0;
}

/* Cards (Glass Overlay Style) */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 400px;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--text-color);
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: var(--surface-color);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.card-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: var(--sp-24);
  z-index: 2;
  border-top: 1px solid rgba(255, 255, 255, 0.4);
}
.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--sp-8);
  color: var(--text-color);
}
.card-excerpt {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* Stats / Data Block (Soft Modern) */
.stat-block {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: var(--sp-24);
  background: var(--surface-color);
  padding: var(--sp-24);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
}
.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-dark);
}
.stat-label {
  font-size: 1rem;
  color: var(--text-light);
}

/* Content Pages */
.content-wrapper {
  max-width: 800px;
  margin: 0 auto;
  background: var(--surface-color);
  padding: var(--sp-40);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--sp-64);
}
.content-wrapper img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius-md);
  margin: var(--sp-24) 0;
}
.content-wrapper table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--sp-24) 0;
  display: block;
  overflow-x: auto;
}
.content-wrapper th, .content-wrapper td {
  padding: var(--sp-16);
  border: 1px solid var(--border-color);
  text-align: left;
}
.content-wrapper th {
  background-color: var(--bg-color);
  font-weight: 600;
}

/* Contact Page Specifics */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-64);
}
.form-group {
  margin-bottom: var(--sp-24);
}
.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--sp-8);
}
.form-control {
  width: 100%;
  padding: var(--sp-16);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-family: inherit;
  font-size: 1rem;
  background-color: var(--bg-color);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-control:focus {
  border-color: var(--primary-dark);
  outline: none;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2);
}
.form-control.is-invalid {
  border-color: var(--error-color);
}
.invalid-feedback {
  display: none;
  color: var(--error-color);
  font-size: 0.875rem;
  margin-top: var(--sp-4);
}
.form-control.is-invalid + .invalid-feedback {
  display: block;
}

/* Styled Static Map Block */
.static-map-block {
  background: #e2e8f0;
  height: 400px;
  border-radius: var(--border-radius-lg);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}
.map-grid-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-image: 
    linear-gradient(#cbd5e0 2px, transparent 2px),
    linear-gradient(90deg, #cbd5e0 2px, transparent 2px);
  background-size: 40px 40px;
  opacity: 0.6;
}
.map-road-1 {
  position: absolute; top: 45%; left: -10%; width: 120%; height: 16px; background: #ffffff; transform: rotate(-8deg);
}
.map-road-2 {
  position: absolute; top: -10%; left: 35%; width: 16px; height: 120%; background: #ffffff; transform: rotate(12deg);
}
.map-marker-ui {
  position: relative;
  z-index: 5;
  background: var(--surface-color);
  padding: var(--sp-16) var(--sp-24);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  font-weight: 600;
  color: var(--text-color);
}
.map-marker-ui svg {
  fill: var(--error-color);
  width: 24px; height: 24px;
}

/* Footer */
.site-footer {
  background-color: var(--surface-color);
  border-top: 1px solid var(--border-color);
  padding: var(--sp-64) 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.25rem;
  margin-bottom: var(--sp-16);
}
.footer-col ul {
  list-style: none;
  padding: 0;
}
.footer-col li {
  margin-bottom: var(--sp-8);
}
.footer-col a {
  color: var(--text-light);
}
.footer-col a:hover {
  color: var(--primary-dark);
}
.footer-bottom {
  text-align: center;
  padding-top: var(--sp-24);
  border-top: 1px solid var(--border-color);
  color: var(--text-light);
  font-size: 0.875rem;
}

/* Cookie Banner */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--surface-color);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.1);
  padding: var(--sp-24);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: var(--sp-16);
  border-top-left-radius: var(--border-radius-lg);
  border-top-right-radius: var(--border-radius-lg);
}
#cookie-banner[hidden] {
  display: none;
}
.cookie-content p {
  margin-bottom: 0;
  font-size: 0.95rem;
}
.cookie-actions {
  display: flex;
  gap: var(--sp-16);
  flex-wrap: wrap;
}

/* Responsive Rules */
@media (max-width: 767px) {
  .site-header {
    height: 52px;
  }
  .menu-toggle {
    display: block;
  }
  .site-nav {
    display: none;
    position: absolute;
    top: 52px;
    left: 0;
    width: 100%;
    background-color: var(--surface-color);
    flex-direction: column;
    padding: var(--sp-24);
    box-shadow: var(--shadow-md);
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
  }
  .site-nav.is-open {
    display: flex;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 2rem;
  }
}

@media (max-width: 399px) {
  .container {
    padding: 0 var(--sp-16);
  }
  .card {
    height: 320px;
  }
  .cookie-actions {
    flex-direction: column;
  }
  .cookie-actions .btn {
    width: 100%;
  }
  .content-wrapper {
    padding: var(--sp-24) var(--sp-16);
  }
}