:root {
  --bg-color: #F7F9FC;
  --surface-color: #FFFFFF;
  --text-main: #2D3748;
  --text-muted: #4A5568;
  --primary-color: #4C51BF;
  --primary-hover: #434190;
  --border-color: #E2E8F0;
  --shadow-sm: 0 4px 12px rgba(45, 55, 72, 0.04);
  --shadow-md: 0 8px 24px rgba(45, 55, 72, 0.08);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 40px;
  --space-6: 64px;
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --nav-height-desk: 64px;
  --nav-height-mob: 52px;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* Global horizontal scroll lock is forbidden for layout masking, but html/body base reset is standard. I will remove it to strictly comply with "The ban is on using overflow-x: hidden to mask layout overflow" */
}

html, body {
  min-height: 100vh;
  width: 100%;
}

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

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

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

:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 4px;
  border-radius: var(--space-1);
}

h1, h2, h3, h4, .brand-name, .nav-link {
  overflow-wrap: anywhere;
  color: var(--text-main);
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: var(--space-4); }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); margin-bottom: var(--space-4); margin-top: var(--space-6); }
h3 { font-size: 1.25rem; margin-bottom: var(--space-3); margin-top: var(--space-5); }
p { margin-bottom: var(--space-3); }

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

.content-narrow {
  max-width: 800px;
  margin: 0 auto;
}

.section {
  padding: var(--space-6) 0;
}

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

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

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-main);
}

.brand-icon {
  width: 24px;
  height: 24px;
  fill: var(--primary-color);
}

.nav-menu {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  list-style: none;
}

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

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  background-color: var(--primary-color);
  color: var(--surface-color);
  border-radius: var(--radius-sm);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  text-align: center;
}

.btn:hover {
  background-color: var(--primary-hover);
  color: var(--surface-color);
  transform: translateY(-1px);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: var(--surface-color);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-1);
}

.mobile-toggle svg {
  width: 24px;
  height: 24px;
  stroke: var(--text-main);
  stroke-width: 2;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--surface-color) 0%, var(--bg-color) 100%);
  padding: calc(var(--space-6) * 1.5) 0;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.hero-title {
  max-width: 800px;
  margin: 0 auto var(--space-4);
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto var(--space-5);
}

/* Horizontal Split Card */
.card-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.card {
  display: flex;
  background-color: var(--surface-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s ease;
  overflow: hidden;
  min-width: 0;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-media-wrap {
  flex: 0 0 40%;
  min-width: 0;
}

.card-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 250px;
}

.card-body {
  flex: 1;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.card-tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.card-title {
  font-size: 1.5rem;
  margin-bottom: var(--space-2);
  margin-top: 0;
}

.card-excerpt {
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.card-footer {
  margin-top: auto;
}

/* Article Styling */
.article-header {
  margin-bottom: var(--space-6);
}

.article-meta {
  display: flex;
  gap: var(--space-3);
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: var(--space-4);
}

.article-hero-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.article-content ul, .article-content ol {
  margin-bottom: var(--space-4);
  padding-left: var(--space-4);
}

.article-content li {
  margin-bottom: var(--space-2);
}

.stat-block {
  background-color: var(--surface-color);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: var(--space-5);
  margin: var(--space-5) 0;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Forms */
.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: 500;
}

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

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(76, 81, 191, 0.2);
}

.form-control.is-invalid {
  border-color: #E53E3E;
}

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

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

.form-success {
  display: none;
  background-color: #C6F6D5;
  color: #22543D;
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-4);
}

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

/* Tables for legal pages */
.table-wrapper {
  overflow-x: auto;
  margin-bottom: var(--space-4);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--surface-color);
  min-width: 600px;
}

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

th {
  background-color: #EDF2F7;
  font-weight: 600;
}

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

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

.footer-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.footer-links {
  list-style: none;
}

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

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

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

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: var(--space-4);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: var(--space-4);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.4s ease;
  display: flex;
  justify-content: center;
}

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

.cookie-content {
  max-width: 1200px;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.cookie-text {
  flex: 1 1 300px;
  font-size: 0.875rem;
}

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

/* Static Map Block */
.static-map {
  width: 100%;
  height: 300px;
  background-color: #E2E8F0;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.static-map-img {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.6;
}

.map-pin {
  position: relative;
  z-index: 2;
  width: 40px;
  height: 40px;
  fill: #E53E3E;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}

/* Responsive */
@media (max-width: 768px) {
  .site-header {
    height: var(--nav-height-mob);
  }
  
  .header-cta {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--surface-color);
    flex-direction: column;
    padding: var(--space-4);
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid var(--border-color);
  }

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

  .card {
    flex-direction: column;
  }

  .card-media-wrap {
    flex: none;
    height: 200px;
  }
  
  .card-media {
    min-height: auto;
  }

  .stat-block {
    flex-direction: column;
    gap: var(--space-4);
  }
}

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

  .card-body {
    padding: var(--space-3);
  }
}

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