:root {
  /* Soft Modern Palette */
  --color-bg: #fdfcfa;
  --color-surface: #ffffff;
  --color-primary: #8a9fc2;
  --color-primary-dark: #6e84a6;
  --color-accent: #d8cde3;
  --color-text-main: #2d3748;
  --color-text-muted: #718096;
  --color-border: #e2e8f0;
  
  /* Typography */
  --font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --radius-sm: 8px;
  --radius-md: 16px;
  --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.08);
  --shadow-hover: 0 12px 32px rgba(45, 55, 72, 0.12);
  
  /* Spacing Scale */
  --sp-4: 4px;
  --sp-8: 8px;
  --sp-12: 12px;
  --sp-16: 16px;
  --sp-24: 24px;
  --sp-40: 40px;
  --sp-64: 64px;
}

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

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  background-color: var(--color-bg);
  color: var(--color-text-main);
  line-height: 1.6;
  min-width: 280px;
  overflow-wrap: anywhere;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--sp-16);
  color: var(--color-text-main);
  line-height: 1.2;
  font-weight: 700;
  overflow-wrap: anywhere;
}

p {
  margin: 0 0 var(--sp-16);
}

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

a:hover, a:focus {
  color: var(--color-text-main);
}

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

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

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

/* Header */
.site-header {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  height: 64px;
  display: flex;
  align-items: center;
}

.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.125rem;
  color: var(--color-text-main);
  overflow-wrap: anywhere;
}

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: var(--sp-8);
  cursor: pointer;
  color: var(--color-text-main);
}

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

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

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

.site-nav a:hover {
  color: var(--color-text-main);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-12) var(--sp-24);
  background-color: var(--color-primary);
  color: #ffffff;
  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(--color-primary-dark);
  color: #ffffff;
  transform: translateY(-1px);
}

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

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

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

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: var(--sp-24);
}

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

/* Sections */
.section {
  padding: var(--sp-64) 0;
}

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

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

/* Glass Overlay Cards */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: var(--color-surface);
}

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

.card-img-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
}

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

.card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  padding: var(--sp-24);
  border-top: 1px solid rgba(255,255,255,0.4);
  transform: translateY(0);
  transition: padding 0.3s ease;
}

.card:hover .card-overlay {
  padding-bottom: var(--sp-40);
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: var(--sp-8);
  color: var(--color-text-main);
}

.card-meta {
  font-size: 0.875rem;
  color: var(--color-primary-dark);
  font-weight: 600;
  margin: 0;
}

/* Content Pages */
.page-header {
  padding: var(--sp-64) 0 var(--sp-40);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  text-align: center;
}

.page-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  max-width: 800px;
  margin: 0 auto;
}

.article-content {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--sp-64) var(--sp-24);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-top: var(--sp-40);
  margin-bottom: var(--sp-64);
}

.article-content h2 {
  margin-top: var(--sp-40);
  font-size: 1.75rem;
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: var(--sp-8);
}

.article-content h3 {
  margin-top: var(--sp-24);
  font-size: 1.25rem;
}

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

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

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--sp-24);
}

.table-wrapper {
  overflow-x: auto;
  margin-bottom: var(--sp-24);
}

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

th {
  background: var(--color-bg);
  font-weight: 600;
}

/* Footer */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--sp-64) 0 var(--sp-40);
  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: 1rem;
  margin-bottom: var(--sp-16);
}

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

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

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

.footer-col a:hover {
  color: var(--color-text-main);
}

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

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: var(--sp-24);
  left: var(--sp-24);
  right: var(--sp-24);
  max-width: 800px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  padding: var(--sp-24);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hover);
  border: 1px solid var(--color-border);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--sp-16);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.cookie-banner[hidden] {
  display: none;
  opacity: 0;
  transform: translateY(20px);
}

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

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

.cookie-actions button {
  padding: var(--sp-8) var(--sp-16);
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  font-weight: 600;
  transition: background-color 0.2s;
}

.btn-accept {
  background: var(--color-primary);
  color: #fff;
}

.btn-accept:hover {
  background: var(--color-primary-dark);
}

.btn-reject, .btn-pref {
  background: var(--color-bg);
  color: var(--color-text-main);
  border: 1px solid var(--color-border);
}

.btn-reject:hover, .btn-pref:hover {
  background: var(--color-border);
}

/* Contact Page Specific */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-64);
}

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

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

.form-control {
  width: 100%;
  padding: var(--sp-12);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  background: var(--color-bg);
  color: var(--color-text-main);
  transition: border-color 0.2s, box-shadow 0.2s;
}

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

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

.error-msg {
  display: none;
  color: #e53e3e;
  font-size: 0.875rem;
  margin-top: var(--sp-4);
}

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

.map-block {
  background: var(--color-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 300px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
}

/* Decorative background for map to mimic real map without external requests */
.map-bg {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(var(--color-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-border) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.5;
}

.map-marker {
  position: relative;
  z-index: 2;
  text-align: center;
  background: var(--color-surface);
  padding: var(--sp-12) var(--sp-16);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}

/* Supporting info section */
.info-section {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--sp-40);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

/* Media Queries */
@media (max-width: 767px) {
  .site-header {
    height: 52px;
  }
  
  .nav-toggle {
    display: block;
  }
  
  .site-nav, .header-cta {
    display: none;
  }
  
  .site-nav.is-visible {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    background: var(--color-surface);
    padding: var(--sp-24);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    z-index: 1000;
  }
  
  .contact-layout {
    grid-template-columns: 1fr;
    gap: var(--sp-40);
  }
  
  .hero {
    padding: var(--sp-40) 0;
  }
  
  .article-content {
    padding: var(--sp-40) var(--sp-16);
  }
}

@media (max-width: 399px) {
  :root {
    --sp-64: 40px;
    --sp-40: 24px;
    --sp-24: 16px;
  }
  
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .grid {
    grid-template-columns: 1fr;
  }
}

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