/* =============================================
   M77 AG - MAIN STYLESHEET
   Professional Agricultural Business Design System
   Version 1.0
   ============================================= */

/* ============================================= 
   CSS VARIABLES - DESIGN TOKENS
   ============================================= */
:root {
  /* Brand Colors */
  --primary-black: #0a0a0a;
  --primary-gold: #d4af37;
  --primary-green: #2d5016;
  --accent-green: #4a7c28;
  --accent-brown: #6b4423;
  
  /* Neutral Colors */
  --white: #ffffff;
  --off-white: #f8f6f3;
  --light-gray: #e5e5e5;
  --medium-gray: #999999;
  --dark-gray: #333333;
  
  /* Semantic Colors */
  --success: #22c55e;
  --warning: #eab308;
  --error: #ef4444;
  --info: #3b82f6;
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Montserrat', 'Inter', sans-serif;
  --font-mono: 'SF Mono', 'Consolas', monospace;
  
  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  
  /* Spacing */
  --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: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-full: 9999px;
  
  /* 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);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
  
  /* Layout */
  --max-width: 1440px;
  --content-width: 1200px;
  --sidebar-width: 280px;
  --header-height: 80px;
}

/* ============================================= 
   RESET & BASE STYLES
   ============================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--dark-gray);
  background-color: var(--white);
  min-height: 100vh;
}

/* ============================================= 
   TYPOGRAPHY
   ============================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-md);
  color: var(--primary-black);
}

h1 {
  font-size: var(--text-5xl);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--text-4xl);
  letter-spacing: -0.01em;
}

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

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

h5 {
  font-size: var(--text-xl);
}

h6 {
  font-size: var(--text-lg);
}

p {
  margin-bottom: var(--space-md);
  line-height: 1.7;
}

a {
  color: var(--primary-green);
  text-decoration: none;
  transition: color var(--transition-base);
}

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

/* Override link colors for dark theme */
body a {
  color: rgba(255, 255, 255, 0.8);
}

body a:hover {
  color: var(--primary-gold);
}

strong {
  font-weight: 600;
}

/* ============================================= 
   LAYOUT COMPONENTS
   ============================================= */
.container {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container-fluid {
  width: 100%;
  padding: 0 var(--space-lg);
}

.section {
  padding: var(--space-3xl) 0;
}

.section-dark {
  background-color: var(--primary-black);
  color: var(--white);
}

.section-gray {
  background-color: var(--off-white);
}

/* ============================================= 
   NAVIGATION
   ============================================= */
.navbar {
  background-color: var(--primary-black);
  height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

.navbar-container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
}

.navbar-menu {
  display: flex;
  list-style: none;
  gap: var(--space-xl);
}

.navbar-link {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  position: relative;
}

.navbar-link:hover {
  color: var(--primary-gold);
  background-color: rgba(212, 175, 55, 0.1);
}

.navbar-link.active {
  color: var(--primary-gold);
}

/* ============================================= 
   BUTTONS
   ============================================= */
.btn {
  display: inline-block;
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--text-base);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  font-family: var(--font-primary);
}

.btn-primary {
  background-color: var(--primary-green);
  color: var(--white);
  border-color: var(--primary-green);
}

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

.btn-secondary {
  background-color: var(--primary-gold);
  color: var(--primary-black);
  border-color: var(--primary-gold);
}

.btn-secondary:hover {
  background-color: #b8941f;
  border-color: #b8941f;
  transform: translateY(-2px);
}

.btn-large {
  padding: var(--space-md) var(--space-xl);
  font-size: var(--text-lg);
}

/* ============================================= 
   CARDS
   ============================================= */
.card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-xl);
  transition: all var(--transition-base);
}

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

.card-header {
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 2px solid var(--light-gray);
}

.card-title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-sm);
}

/* ============================================= 
   FORMS
   ============================================= */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  margin-bottom: var(--space-sm);
  font-weight: 600;
  color: var(--dark-gray);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-base);
  font-family: var(--font-primary);
  border: 2px solid var(--light-gray);
  border-radius: var(--radius-md);
  background-color: var(--white);
  transition: all var(--transition-base);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(45, 80, 22, 0.1);
}

/* ============================================= 
   HERO SECTIONS
   ============================================= */
.hero {
  background-color: var(--primary-black);
  color: var(--white);
  padding: var(--space-3xl) 0;
  min-height: 500px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: var(--text-5xl);
  margin-bottom: var(--space-lg);
  color: var(--white);
}

.hero-subtitle {
  font-size: var(--text-xl);
  margin-bottom: var(--space-xl);
  opacity: 0.9;
}

/* ============================================= 
   GRID SYSTEM
   ============================================= */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ============================================= 
   UTILITY CLASSES
   ============================================= */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-3 { margin-top: var(--space-md); }
.mb-3 { margin-bottom: var(--space-md); }
.mt-5 { margin-top: var(--space-xl); }
.mb-5 { margin-bottom: var(--space-xl); }

/* ============================================= 
   RESPONSIVE DESIGN
   ============================================= */
@media screen and (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 767px) {
  .navbar-menu {
    display: none;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  h1 {
    font-size: var(--text-3xl);
  }
  
  .hero-title {
    font-size: var(--text-3xl);
  }
}