:root {
  --primary: #a78bfa;
  --primary-dark: #8b5cf6;
  --primary-light: #f3f0ff;
  --bg-body: #fafafa;
  --bg-surface: #ffffff;
  --text-primary: #171717;
  --text-secondary: #525252;
  --border: #e5e5e5;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(255, 255, 255, 0.4);
}

/* ==========================================================================
   Base & Resets
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease, background-color 0.2s ease;
}

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

ul, ol {
  list-style: none;
}

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

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  line-height: 1.3;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  text-align: center;
}

.button-primary {
  background-color: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
}

.button-primary:hover,
.button-primary:focus {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

.button-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.button-secondary:hover,
.button-secondary:focus {
  border-color: var(--text-secondary);
  background-color: var(--bg-surface);
}

.button-text {
  color: var(--text-secondary);
  padding: 0.625rem;
}

.button-text:hover,
.button-text:focus {
  color: var(--text-primary);
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
}

.header-brand .brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.brand-logo {
  width: 2rem;
  height: 2rem;
  color: var(--primary);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 1.5rem;
  height: 1.25rem;
  z-index: 60;
}

.hamburger-line {
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.site-nav {
  display: none;
}

.header-cta {
  display: none;
}

/* Mobile Nav Active State */
.site-nav.is-active {
  display: block;
  position: absolute;
  top: 4.5rem;
  left: 0;
  width: 100%;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

.site-nav.is-active .nav-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.site-nav.is-active a {
  display: block;
  font-size: 1.1rem;
  font-weight: 500;
}

@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }
  
  .site-nav {
    display: block;
  }
  
  .nav-list {
    display: flex;
    gap: 1.5rem;
    align-items: center;
  }
  
  .nav-list a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
  }
  
  .nav-list a:hover,
  .nav-list a[aria-current="page"] {
    color: var(--primary-dark);
  }
  
  .header-cta {
    display: block;
  }
}

/* ==========================================================================
   Home Page - Hero Section
   ========================================================================== */
.hero-section {
  padding: 5rem 0 4rem;
  text-align: center;
}

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

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ==========================================================================
   Home Page - Guides Section (Cards)
   ========================================================================== */
.guides-section {
  padding: 4rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.glass-card {
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.glass-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}

.glass-card-content {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.card-title a::before {
  content: '';
  position: absolute;
  inset: 0;
}

.card-excerpt {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.card-cta {
  font-weight: 600;
  color: var(--primary);
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.glass-card:hover .card-cta {
  color: var(--primary-dark);
}

/* ==========================================================================
   Home Page - Support Section
   ========================================================================== */
.support-section {
  padding: 4rem 0;
}

.support-box {
  background-color: var(--primary-light);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2rem;
}

.support-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.support-desc {
  color: var(--text-secondary);
  max-width: 600px;
}

@media (min-width: 768px) {
  .support-box {
    flex-direction: row;
    text-align: left;
    justify-content: space-between;
    padding: 4rem;
  }
}

/* ==========================================================================
   Content Pages (Articles, Policies)
   ========================================================================== */
.content-page {
  padding: 4rem 0;
  max-width: 800px;
}

.page-header {
  margin-bottom: 3rem;
  text-align: center;
}

.page-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.page-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
}

.page-hero-image {
  margin-bottom: 3rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-surface);
}

.page-hero-image img {
  width: 100%;
  height: auto;
  max-height: 450px;
  object-fit: cover;
}

.image-caption {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: center;
  padding: 1rem;
}

.prose {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.prose h2 {
  font-size: 1.75rem;
  color: var(--text-primary);
  margin-top: 3rem;
  margin-bottom: 1.25rem;
  font-weight: 700;
}

.prose p {
  margin-bottom: 1.5rem;
}

.prose ul, .prose ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.5rem;
  list-style-type: disc;
}

.prose strong {
  color: var(--text-primary);
}

/* ==========================================================================
   Article Components (Stats Block, Tables)
   ========================================================================== */
.stats-block {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin: 3rem 0;
  padding: 2.5rem 2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table-wrapper {
  overflow-x: auto;
  margin: 2.5rem 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-surface);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th, .data-table td {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.data-table th {
  background-color: var(--bg-body);
  font-weight: 600;
  color: var(--text-primary);
}

.data-table tr:last-child td {
  border-bottom: none;
}

/* ==========================================================================
   Contact Page
   ========================================================================== */
.contact-section {
  padding: 4rem 0;
}

.contact-header {
  text-align: center;
  margin-bottom: 4rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  max-width: 1000px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr 1.2fr;
  }
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.info-block h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.info-block p {
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.info-block a {
  color: var(--primary-dark);
  font-weight: 500;
}

.info-block a:hover {
  text-decoration: underline;
}

.static-map-block {
  background-color: var(--primary-light);
  height: 220px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--primary-dark);
  font-weight: 600;
  border: 1px solid var(--primary);
  margin-top: 1rem;
}

.map-pin {
  width: 24px;
  height: 24px;
  background-color: var(--primary-dark);
  border-radius: 50%;
  margin-bottom: 0.75rem;
  position: relative;
}

.map-pin::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 6px;
  border-width: 12px 6px 0 6px;
  border-style: solid;
  border-color: var(--primary-dark) transparent transparent transparent;
}

.contact-form-wrapper {
  background: var(--bg-surface);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.form-group input, 
.form-group select, 
.form-group textarea {
  width: 100%;
  padding: 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--bg-body);
  color: var(--text-primary);
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2);
  background: var(--bg-surface);
}

.error-msg {
  color: #ef4444;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  display: none;
}

.error-msg:not([hidden]) {
  display: block;
}

.form-submit {
  margin-bottom: 1rem;
}

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

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

.brand-name-footer {
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.company-details, .company-email {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.company-email a {
  color: var(--primary-dark);
}

.company-email a:hover {
  text-decoration: underline;
}

.footer-heading {
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ==========================================================================
   Cookie Banner
   ========================================================================== */
.cookie-banner {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

.cookie-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.cookie-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .cookie-banner {
    bottom: 2rem;
    left: 2rem;
    right: auto;
    max-width: 450px;
  }
}