/* ========================================
   CSS CUSTOM PROPERTIES (Variables)
   Color Palette: Corporate B2B Agricultural
   ======================================== */

:root {
  /* Primary Colors */
  --color-primary: #2d5016;           /* Dark green (main brand) */
  --color-primary-light: #3d6b1f;     /* Lighter green */
  --color-primary-dark: #1a3009;      /* Darker green */

  /* Accent Color */
  --color-accent: #8b6f47;            /* Ochre/brownish (earthy, warm) */
  --color-accent-light: #a08560;      /* Lighter ochre */
  --color-accent-dark: #6d5836;       /* Darker ochre */

  /* Alternative Accent (if needed) */
  --color-secondary: #1e3a5f;         /* Dark blue (professional) */

  /* Neutral Colors */
  --color-bg-light: #faf8f5;          /* Off-white/beige background */
  --color-bg-white: #ffffff;          /* Pure white */
  --color-bg-gray: #f5f3f0;           /* Light stone/gray */

  --color-text-primary: #1a1714;      /* Dark text */
  --color-text-secondary: #5a5551;    /* Medium gray text */
  --color-text-light: #7f7a75;        /* Light gray text */
  --color-border: #d4cec6;            /* Subtle borders */

  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-size-base: 16px;
  --font-size-sm: 14px;
  --font-size-lg: 18px;
  --font-size-xl: 20px;
  --font-size-2xl: 24px;
  --font-size-3xl: 30px;
  --font-size-4xl: 36px;
  --font-size-5xl: 48px;

  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

/* ========================================
   Tailwind CSS Custom Theme Override
   ======================================== */

@layer utilities {
  .accent-color {
    @apply text-[var(--color-accent)];
  }

  .bg-accent-color {
    @apply bg-[var(--color-accent)] text-white;
  }

  .border-accent-color {
    @apply border-[var(--color-accent)];
  }

  /* Custom container */
  .container {
    @apply px-4 md:px-8 lg:px-4;
  }
}

/* ========================================
   Global Styles
   ======================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  color: var(--color-text-primary);
  background-color: var(--color-bg-light);
  line-height: 1.6;
}

/* ========================================
   Typography
   ======================================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text-primary);
}

h1 {
  font-size: var(--font-size-5xl);
}

h2 {
  font-size: var(--font-size-4xl);
}

h3 {
  font-size: var(--font-size-3xl);
}

h4 {
  font-size: var(--font-size-2xl);
}

p {
  color: var(--color-text-secondary);
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--color-accent-dark);
}

/* ========================================
   Buttons
   ======================================== */

button {
  font-family: var(--font-family);
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: var(--color-accent);
  color: white;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--radius-md);
  font-weight: 600;
  border: none;
}

.btn-primary:hover {
  background-color: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: transparent;
  color: white;
  border: 2px solid white;
  padding: calc(var(--spacing-sm) - 2px) calc(var(--spacing-lg) - 2px);
  border-radius: var(--radius-md);
  font-weight: 600;
}

.btn-secondary:hover {
  background-color: white;
  color: var(--color-accent-dark);
  border-color: white;
}

/* ========================================
   Language & UI Elements
   ======================================== */

.lang-btn {
  background: none;
  border: 1px solid transparent;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

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

.lang-btn.lang-active {
  color: var(--color-accent);
  font-weight: 700;
  border: 1px solid var(--color-accent);
}

/* ========================================
   Forms
   ======================================== */

input,
textarea,
select {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-bg-white);
  color: var(--color-text-primary);
  transition: border-color 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(139, 111, 71, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* ========================================
   Responsive Design (Mobile-First)
   ======================================== */

/* Mobile: 320px - 640px */
@media (max-width: 640px) {
  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 24px;
  }

  h3 {
    font-size: 20px;
  }

  body {
    font-size: 14px;
  }

  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* Tablet: 641px - 1024px */
@media (min-width: 641px) and (max-width: 1024px) {
  h1 {
    font-size: 36px;
  }

  h2 {
    font-size: 32px;
  }

  h3 {
    font-size: 24px;
  }
}

/* Desktop: 1025px+ */
@media (min-width: 1025px) {
  .container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ========================================
   Accessibility & Utilities
   ======================================== */

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

.transition {
  transition: all 0.3s ease;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.animate-bounce {
  animation: bounce 2s infinite;
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
  body {
    background-color: white;
  }

  a {
    text-decoration: underline;
  }

  button,
  .no-print {
    display: none !important;
  }
}
