:root {
  --radius: 0.625rem;
  /* Color palette matched to SAHFTA logo */
  --background: oklch(0.98 0.004 150);
  --foreground: oklch(0.15 0.015 250);
  --card: oklch(0.97 0.008 150);
  --card-foreground: oklch(0.15 0.015 250);
  --popover: oklch(0.97 0.008 150);
  --popover-foreground: oklch(0.15 0.015 250);

  /* Primary - Deep forest green (logo outer ring) */
  --primary: oklch(0.30 0.14 152);
  --primary-foreground: oklch(0.98 0.01 140);
  --btn-primary-text: oklch(0.72 0.13 70); /* Warm gold for primary button text */

  /* Secondary - Antique gold (logo laurels & border) */
  --secondary: oklch(0.72 0.13 70);
  --secondary-foreground: oklch(0.15 0.015 250);

  /* Accent - Flag Blue (used sparingly) */
  --accent: oklch(0.45 0.16 240);
  --accent-foreground: oklch(0.98 0.01 140);

  /* Muted colors */
  --muted: oklch(0.94 0.015 150);
  --muted-foreground: oklch(0.45 0.01 220);

  /* Destructive - Flag Red (errors only) */
  --destructive: oklch(0.55 0.22 15);
  --border: oklch(0.88 0.02 150);
  --input: oklch(0.92 0.02 150);
  --ring: oklch(0.30 0.14 152);
  
  /* Chart colors */
  --chart-1: oklch(0.30 0.14 152); /* Green */
  --chart-2: oklch(0.72 0.13 70);  /* Gold */
  --chart-3: oklch(0.45 0.16 240); /* Blue */
  --chart-4: oklch(0.55 0.22 15);  /* Red */
  --chart-5: oklch(0.15 0.01 250); /* Black */

  /* Sidebar colors */
  --sidebar: oklch(0.96 0.008 150);
  --sidebar-foreground: oklch(0.15 0.015 250);
  --sidebar-primary: oklch(0.30 0.14 152);
  --sidebar-primary-foreground: oklch(0.98 0.01 140);
  --sidebar-accent: oklch(0.94 0.015 150);
  --sidebar-accent-foreground: oklch(0.15 0.015 250);
  --sidebar-border: oklch(0.88 0.02 150);
  --sidebar-ring: oklch(0.30 0.14 152);
}

.dark {
  /* Dark theme with Green and Gold */
  --background: oklch(0.10 0.01 145);
  --foreground: oklch(0.95 0.01 140);
  --card: oklch(0.15 0.02 145);
  --card-foreground: oklch(0.95 0.01 140);
  --popover: oklch(0.15 0.02 145);
  --popover-foreground: oklch(0.95 0.01 140);
  --primary: oklch(0.75 0.15 45);
  --primary-foreground: oklch(0.10 0.01 145);
  --btn-primary-text: oklch(0.15 0.015 250); /* Dark text for primary button in dark mode */
  --secondary: oklch(0.25 0.02 145);
  --secondary-foreground: oklch(0.95 0.01 140);
  --muted: oklch(0.18 0.02 145);
  --muted-foreground: oklch(0.65 0.01 220);
  --accent: oklch(0.45 0.18 240);
  --accent-foreground: oklch(0.95 0.01 140);
  --destructive: oklch(0.65 0.22 15);
  --border: oklch(0.25 0.02 145);
  --input: oklch(0.20 0.02 145);
  --ring: oklch(0.75 0.15 45);
  --chart-1: oklch(0.45 0.18 145);
  --chart-2: oklch(0.85 0.15 45);
  --chart-3: oklch(0.55 0.18 240);
  --chart-4: oklch(0.75 0.22 15);
  --chart-5: oklch(0.85 0.01 250);
  --sidebar: oklch(0.15 0.02 145);
  --sidebar-foreground: oklch(0.95 0.01 140);
  --sidebar-primary: oklch(0.75 0.15 45);
  --sidebar-primary-foreground: oklch(0.10 0.01 145);
  --sidebar-accent: oklch(0.18 0.02 145);
  --sidebar-accent-foreground: oklch(0.95 0.01 140);
  --sidebar-border: oklch(0.25 0.02 145);
  --sidebar-ring: oklch(0.75 0.15 45);
}

body {
    border-color: hsl(var(--border));
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
}

/* Gradient backgrounds for hero sections */
.gradient-south-africa {
  background: linear-gradient(135deg,
    oklch(0.30 0.14 152) 0%,
    oklch(0.72 0.13 70) 25%,
    oklch(0.45 0.16 240) 50%,
    oklch(0.55 0.22 15) 75%,
    oklch(0.15 0.01 250) 100%);
}

.gradient-hero {
  background: linear-gradient(135deg,
    oklch(0.30 0.14 152) 0%,
    oklch(0.22 0.11 155) 50%,
    oklch(0.14 0.08 158) 100%);
}

.gradient-card {
  background: linear-gradient(135deg,
    oklch(0.97 0.008 150) 0%,
    oklch(0.95 0.012 155) 100%);
}

.dark .gradient-card {
  background: linear-gradient(135deg,
    oklch(0.15 0.02 152) 0%,
    oklch(0.18 0.02 155) 100%);
}

/* Text shadows for better readability */
.text-shadow {
  text-shadow: 0 2px 4px oklch(0 0 0 / 0.1);
}

.text-shadow-lg {
  text-shadow: 0 4px 8px oklch(0 0 0 / 0.15);
}

/* Enhanced button styles */
.btn-primary {
  background: linear-gradient(135deg, oklch(0.30 0.14 152) 0%, oklch(0.38 0.16 148) 100%);
  color: var(--btn-primary-text);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, oklch(0.38 0.16 148) 0%, oklch(0.45 0.18 145) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px oklch(0.30 0.14 152 / 0.3);
}

.btn-secondary {
  background: linear-gradient(135deg, oklch(0.72 0.13 70) 0%, oklch(0.78 0.14 65) 100%);
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, oklch(0.78 0.14 65) 0%, oklch(0.84 0.15 60) 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px oklch(0.72 0.13 70 / 0.3);
}

/* Card hover effects */
.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px oklch(0 0 0 / 0.1);
}

/* Animated background patterns */
.pattern-dots {
  background-image: radial-gradient(circle, oklch(0.72 0.13 70 / 0.08) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* Status colors */
.status-gold {
  color: oklch(0.72 0.13 70);
  background: linear-gradient(135deg, oklch(0.72 0.13 70 / 0.1) 0%, oklch(0.72 0.13 70 / 0.05) 100%);
}

.status-silver {
  color: oklch(0.65 0.01 220);
  background: linear-gradient(135deg, oklch(0.65 0.01 220 / 0.1) 0%, oklch(0.65 0.01 220 / 0.05) 100%);
}

.status-bronze {
  color: oklch(0.60 0.14 50);
  background: linear-gradient(135deg, oklch(0.60 0.14 50 / 0.1) 0%, oklch(0.60 0.14 50 / 0.05) 100%);
}

/* Gold accent border — use on section transitions */
.border-gold {
  border-color: oklch(0.72 0.13 70 / 0.3);
}

/* Document content — styles WYSIWYG-generated HTML */
.document-content h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: oklch(0.22 0.11 155);
  margin: 1.5rem 0 0.75rem;
  line-height: 1.3;
}

.document-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: oklch(0.25 0.12 153);
  margin: 1.25rem 0 0.625rem;
  line-height: 1.35;
}

.document-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: oklch(0.30 0.14 152);
  margin: 1rem 0 0.5rem;
  line-height: 1.4;
}

.document-content h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: oklch(0.35 0.12 150);
  margin: 0.875rem 0 0.5rem;
  line-height: 1.4;
}

.document-content p {
  margin: 0.625rem 0;
  line-height: 1.7;
  color: #374151;
}

.document-content ul {
  list-style-type: disc;
  padding-left: 1.75rem;
  margin: 0.625rem 0;
}

.document-content ol {
  list-style-type: decimal;
  padding-left: 1.75rem;
  margin: 0.625rem 0;
}

.document-content li {
  margin: 0.25rem 0;
  line-height: 1.6;
  color: #374151;
}

.document-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.875rem;
}

.document-content table th {
  background: oklch(0.22 0.11 155);
  color: white;
  padding: 0.625rem 0.75rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.document-content table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #e5e7eb;
  color: #374151;
}

.document-content table tr:hover td {
  background: oklch(0.97 0.008 150);
}

.document-content a {
  color: oklch(0.30 0.14 152);
  text-decoration: underline;
  transition: color 0.2s ease;
}

.document-content a:hover {
  color: oklch(0.72 0.13 70);
}

.document-content blockquote {
  border-left: 4px solid oklch(0.72 0.13 70);
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  background: oklch(0.97 0.008 150);
  color: #4b5563;
  font-style: italic;
}

.document-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.375rem;
  margin: 0.75rem 0;
}

.document-content hr {
  border: none;
  border-top: 2px solid oklch(0.72 0.13 70 / 0.3);
  margin: 1.5rem 0;
}

/* South African flag gradient */
.flag-gradient {
  background: linear-gradient(90deg,
    oklch(0.55 0.22 15) 0%,
    oklch(0.15 0.01 250) 25%,
    oklch(0.72 0.13 70) 50%,
    oklch(0.15 0.01 250) 75%,
    oklch(0.30 0.14 152) 100%);
}
