/* ===== CSS Variables ===== */
:root {
  /* Primary Color Palette */
  --primary-color: #2D5016;
  --secondary-color: #F5F1E8;
  --background-color: #FEFEFE;
  --footer-bg-color: #1A3010;
  --button-color: #8B4513;
  
  /* Section Background Colors */
  --section-bg-primary: #FEFEFE;
  --section-bg-secondary: #F5F1E8;
  --section-bg-tertiary: #E8F0E3;
  
  /* Neutral Colors */
  --text-primary: #2D2D2D;
  --text-secondary: #6B6B6B;
  --text-light: #9B9B9B;
  --border-light: #E5E5E5;
  --border-medium: #D4D4D4;
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-secondary: 'Source Sans Pro', sans-serif;
  
  /* Spacing Scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  
  /* Shadows */
  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-strong: 0 10px 25px rgba(0, 0, 0, 0.15);
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

/* ===== Reset and Base Styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background-color: var(--background-color);
  color: var(--text-primary);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: var(--space-md);
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2rem;
  font-weight: 600;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.125rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
  line-height: 1.7;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--button-color);
}

a:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* ===== Lists ===== */
ul, ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-lg);
}

li {
  margin-bottom: var(--space-xs);
  color: var(--text-secondary);
}

/* ===== Full-width Container Overrides ===== */
.container,
.container-fluid,
.max-w-7xl,
.max-w-6xl,
.max-w-5xl,
.max-w-4xl,
.max-w-3xl,
.max-w-2xl,
.max-w-xl,
.max-w-lg,
.max-w-md,
.max-w-sm,
.max-w-xs {
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* ===== Section Backgrounds ===== */
.section-bg-primary {
  background-color: var(--section-bg-primary);
}

.section-bg-secondary {
  background-color: var(--section-bg-secondary);
}

.section-bg-tertiary {
  background-color: var(--section-bg-tertiary);
}

/* ===== Header Styles ===== */
.header {
  background-color: var(--section-bg-primary);
  border-bottom: 1px solid var(--border-light);
  padding: var(--space-lg) 0;
}

.header-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

.header-brand:hover {
  color: var(--button-color);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-link:hover {
  background-color: var(--section-bg-secondary);
  color: var(--primary-color);
}

.nav-link.active {
  color: var(--primary-color);
  background-color: var(--section-bg-secondary);
}

/* ===== Button Styles ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) var(--space-lg);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  min-height: 44px;
}

.btn-primary {
  background-color: var(--button-color);
  color: white;
  border-color: var(--button-color);
}

.btn-primary:hover {
  background-color: #7A3D12;
  border-color: #7A3D12;
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-medium);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-secondary:hover {
  background-color: var(--primary-color);
  color: white;
}

.btn-outline {
  background-color: transparent;
  color: var(--text-secondary);
  border-color: var(--border-medium);
}

.btn-outline:hover {
  background-color: var(--section-bg-secondary);
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-lg {
  padding: var(--space-md) var(--space-xl);
  font-size: 1rem;
  min-height: 52px;
}

.btn-sm {
  padding: var(--space-xs) var(--space-md);
  font-size: 0.8125rem;
  min-height: 36px;
}

/* ===== Card Styles ===== */
.card {
  background-color: var(--section-bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-subtle);
}

.card:hover {
  box-shadow: var(--shadow-medium);
  border-color: var(--border-medium);
}

.card-header {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-light);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.card-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

.card-body {
  margin-bottom: var(--space-lg);
}

.card-footer {
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ===== Form Styles ===== */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  font-size: 0.875rem;
}

.form-control {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  font-size: 0.875rem;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  background-color: var(--section-bg-primary);
  color: var(--text-primary);
  transition: all var(--transition-fast);
  min-height: 44px;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(45, 80, 22, 0.1);
}

.form-control::placeholder {
  color: var(--text-light);
}

.form-control:disabled {
  background-color: var(--section-bg-secondary);
  color: var(--text-light);
  cursor: not-allowed;
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.form-check-input {
  width: 18px;
  height: 18px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  margin: 0;
  cursor: pointer;
}

.form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.form-check-label {
  margin-bottom: 0;
  cursor: pointer;
  font-size: 0.875rem;
}

/* ===== Table Styles ===== */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-lg);
  background-color: var(--section-bg-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
}

.table th,
.table td {
  padding: var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.table th {
  background-color: var(--section-bg-secondary);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table td {
  color: var(--text-secondary);
}

.table tbody tr:hover {
  background-color: var(--section-bg-secondary);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

/* ===== Hero Section ===== */
.hero {
  background: linear-gradient(135deg, var(--section-bg-secondary) 0%, var(--section-bg-primary) 100%);
  padding: var(--space-3xl) 0;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: var(--space-lg);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-2xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Grid System ===== */
.grid {
  display: grid;
  gap: var(--space-xl);
}

.grid-cols-1 {
  grid-template-columns: 1fr;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid-cols-12 {
  grid-template-columns: repeat(12, 1fr);
}

/* ===== Flex Utilities ===== */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-sm {
  gap: var(--space-sm);
}

.gap-md {
  gap: var(--space-md);
}

.gap-lg {
  gap: var(--space-lg);
}

.gap-xl {
  gap: var(--space-xl);
}

/* ===== Spacing Utilities ===== */
.p-sm {
  padding: var(--space-sm);
}

.p-md {
  padding: var(--space-md);
}

.p-lg {
  padding: var(--space-lg);
}

.p-xl {
  padding: var(--space-xl);
}

.p-2xl {
  padding: var(--space-2xl);
}

.p-3xl {
  padding: var(--space-3xl);
}

.m-sm {
  margin: var(--space-sm);
}

.m-md {
  margin: var(--space-md);
}

.m-lg {
  margin: var(--space-lg);
}

.m-xl {
  margin: var(--space-xl);
}

.mb-sm {
  margin-bottom: var(--space-sm);
}

.mb-md {
  margin-bottom: var(--space-md);
}

.mb-lg {
  margin-bottom: var(--space-lg);
}

.mb-xl {
  margin-bottom: var(--space-xl);
}

.mt-sm {
  margin-top: var(--space-sm);
}

.mt-md {
  margin-top: var(--space-md);
}

.mt-lg {
  margin-top: var(--space-lg);
}

.mt-xl {
  margin-top: var(--space-xl);
}

/* ===== Text Utilities ===== */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.text-primary {
  color: var(--primary-color);
}

.text-secondary {
  color: var(--text-secondary);
}

.text-muted {
  color: var(--text-light);
}

.font-bold {
  font-weight: 700;
}

.font-semibold {
  font-weight: 600;
}

.font-medium {
  font-weight: 500;
}

/* ===== Alert Styles ===== */
.alert {
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-lg);
  border: 1px solid;
}

.alert-success {
  background-color: #D4EDDA;
  border-color: #C3E6CB;
  color: #155724;
}

.alert-info {
  background-color: #D1ECF1;
  border-color: #BEE5EB;
  color: #0C5460;
}

.alert-warning {
  background-color: #FFF3CD;
  border-color: #FFEAA7;
  color: #856404;
}

.alert-danger {
  background-color: #F8D7DA;
  border-color: #F5C6CB;
  color: #721C24;
}

/* ===== Badge Styles ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-xs) var(--space-sm);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-primary {
  background-color: var(--primary-color);
  color: white;
}

.badge-secondary {
  background-color: var(--section-bg-secondary);
  color: var(--text-primary);
}

.badge-outline {
  background-color: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-medium);
}

/* ===== Footer Styles ===== */
.footer {
  background-color: var(--footer-bg-color);
  color: #A8B8A8;
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer a {
  color: #A8B8A8;
  transition: color var(--transition-fast);
}

.footer a:hover {
  color: white;
}

.footer-section-title {
  color: white;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--space-lg);
}

.footer-link {
  display: block;
  padding: var(--space-xs) 0;
  color: #A8B8A8;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: white;
}

.footer-bottom {
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(168, 184, 168, 0.3);
  text-align: center;
  font-size: 0.875rem;
  color: #8F9F8F;
}

/* ===== Utility Classes ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.w-full {
  width: 100%;
}

.h-full {
  height: 100%;
}

.min-h-screen {
  min-height: 100vh;
}

.max-w-md {
  max-width: 28rem;
}

.max-w-lg {
  max-width: 32rem;
}

.max-w-xl {
  max-width: 36rem;
}

.max-w-2xl {
  max-width: 42rem;
}

.max-w-3xl {
  max-width: 48rem;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

/* ===== Focus Styles for Accessibility ===== */
*:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

button:focus,
.btn:focus {
  outline-offset: 2px;
}

/* ===== Loading States ===== */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-light);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
  
  .grid-cols-4,
  .grid-cols-3,
  .grid-cols-2 {
    grid-template-columns: 1fr;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .nav {
    flex-direction: column;
    gap: var(--space-md);
  }
  
  .card {
    padding: var(--space-lg);
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
  
  .table {
    font-size: 0.875rem;
  }
  
  .table th,
  .table td {
    padding: var(--space-sm);
  }
}

@media (max-width: 480px) {
  .container {
    padding-left: var(--space-md) !important;
    padding-right: var(--space-md) !important;
  }
  
  .hero {
    padding: var(--space-2xl) 0;
  }
  
  .hero-title {
    font-size: 1.75rem;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  .card {
    padding: var(--space-md);
  }
}

/* ===== Dark Mode Support (Optional) ===== */
@media (prefers-color-scheme: dark) {
  :root {
    --text-primary: #F5F5F5;
    --text-secondary: #CCCCCC;
    --text-light: #999999;
    --border-light: #333333;
    --border-medium: #444444;
  }
}

/* ===== Print Styles ===== */
@media print {
  .btn,
  .nav,
  .footer {
    display: none !important;
  }
  
  .card {
    border: 1px solid #000;
    box-shadow: none;
  }
  
  body {
    background: white;
    color: black;
  }
}


/* Cookie Banner Additional Styles for Tailwind */
.cookie-banner-hover-effect:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

@media (prefers-reduced-motion: reduce) {
    .cookie-banner-hover-effect:hover {
        transform: none;
    }
}