:root {
  --font-base: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --color-brand: #4a607d;
  --color-brand-hover: #374a63;
  --color-brand-light: #e8eef5;
  --color-accent: #f2e3e9;
  --color-accent-dark: #d6b3be;
  --color-text-main: #2b3036;
  --color-text-muted: #5b626b;
  --color-bg: #fafafc;
  --color-surface: #ffffff;
  --color-border: #eef1f6;
  --color-focus: #4a607d;
  --shadow-sm: 0 4px 16px rgba(43, 48, 54, 0.04);
  --shadow-md: 0 12px 32px rgba(43, 48, 54, 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;
  --header-height-desk: 64px;
  --header-height-mob: 52px;
}

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

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

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

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

h1 { font-size: 2.5rem; margin-bottom: var(--space-4); }
h2 { font-size: 2rem; margin-bottom: var(--space-4); }
h3 { font-size: 1.5rem; margin-bottom: var(--space-3); }
h4 { font-size: 1.25rem; margin-bottom: var(--space-3); }

p { margin-bottom: var(--space-3); }
a { color: var(--color-brand); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--color-brand-hover); }

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

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

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

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

/* Header */
.site-header {
  height: var(--header-height-desk);
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  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(--color-brand);
}

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

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

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px var(--space-4);
  border-radius: var(--radius-sm);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

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

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

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

.btn-accent:hover {
  background-color: var(--color-accent-dark);
  color: var(--color-text-main);
}

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

.btn-outline:hover {
  background-color: var(--color-brand-light);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  color: var(--color-text-main);
}

.mobile-overlay {
  display: none;
  position: absolute;
  top: var(--header-height-mob);
  left: 0;
  right: 0;
  background-color: var(--color-surface);
  box-shadow: var(--shadow-md);
  padding: var(--space-4);
  flex-direction: column;
  gap: var(--space-4);
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}

.mobile-overlay.is-visible {
  display: flex;
}

/* Main Content Spacing */
main {
  flex: 1;
  padding: var(--space-6) 0;
}

.section {
  margin-bottom: var(--space-6);
}

.section:last-child {
  margin-bottom: 0;
}

.page-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--space-6);
}

.page-header p {
  color: var(--color-text-muted);
  font-size: 1.125rem;
}

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

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

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

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

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

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

.card-tags {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}

.tag {
  background-color: var(--color-accent);
  color: var(--color-brand-hover);
  padding: 4px var(--space-2);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
}

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

.card-desc {
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  flex-grow: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.stat-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.stat-value {
  font-weight: 700;
  color: var(--color-text-main);
}

/* Article Content Formatting */
.article-content {
  max-width: 800px;
  margin: 0 auto;
  background-color: var(--color-surface);
  padding: var(--space-5);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.article-content h2 { margin-top: var(--space-5); }
.article-content img { border-radius: var(--radius-md); margin: var(--space-4) 0; }

.content-table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-bottom: var(--space-4);
}

.content-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

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

.content-table th {
  background-color: var(--color-brand-light);
  font-weight: 600;
}

/* Contact Block */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  background-color: var(--color-surface);
  padding: var(--space-5);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

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

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

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

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

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

.error-message {
  display: none;
  color: #d9534f;
  font-size: 0.875rem;
  margin-top: 4px;
}

.error-message.is-visible {
  display: block;
}

.static-map {
  width: 100%;
  height: 300px;
  background: var(--color-brand-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--color-brand);
  text-align: center;
  padding: var(--space-4);
}

.static-map svg {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-2);
  fill: var(--color-brand);
}

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

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

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

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

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

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

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

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

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--color-border);
  padding: var(--space-4);
  box-shadow: var(--shadow-md);
  transform: translateY(100%);
  transition: transform 0.4s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

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

.cookie-content p {
  margin-bottom: 0;
}

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

/* Responsive */
@media (max-width: 767px) {
  .site-header {
    height: var(--header-height-mob);
  }
  
  .nav-desktop, .header-cta {
    display: none;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .card-horizontal {
    flex-direction: column;
  }
  
  .card-media {
    flex: none;
    height: 240px;
  }
  
  .card-media img {
    position: relative;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .article-content {
    padding: var(--space-4);
  }
}

@media (max-width: 399px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  
  .card-meta {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .stat-block {
    width: 100%;
    justify-content: space-between;
  }
  
  .cookie-actions {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
}

@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;
  }
}