/* ==========================================================================
   CornYieldCalc.com - Main Stylesheet
   Design: Emerald green agricultural theme with sidebar navigation
   ========================================================================== */

:root {
  /* Color Palette - based on UI design */
  --primary-green: #059669;
  --primary-green-hover: #047857;
  --primary-green-dark: #065f46;
  --primary-green-light: #d1fae5;
  --primary-green-lighter: #ecfdf5;
  --emerald-50: #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-200: #a7f3d0;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-700: #047857;

  --accent-yellow: #fbbf24;
  --accent-yellow-light: #fef3c7;
  --accent-orange: #f97316;
  --accent-red: #ef4444;

  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  --bg-cream: #fffbeb;
  --bg-sidebar: #eef2f5;
  --bg-page: #f8fafc;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --font-serif: 'Georgia', 'Times New Roman', serif;

  /* Spacing & Layout */
  --sidebar-width: 256px;
  --header-height: 64px;
  --content-max-width: 1280px;
  --border-radius-sm: 6px;
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --border-radius-xl: 16px;
  --border-radius-2xl: 20px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0,0,0,0.25);

  /* Transitions */
  --transition: all 0.2s ease;
  --transition-fast: all 0.15s ease;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

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

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

a:hover {
  color: var(--primary-green-hover);
  text-decoration: underline;
}

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

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

ul, ol {
  list-style: none;
}

/* ==========================================================================
   Layout Structure
   ========================================================================== */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--gray-200);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 30;
  transition: transform 0.3s ease;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }

.sidebar-header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--gray-200);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text-primary);
}

.sidebar-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--primary-green);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.sidebar-nav {
  padding: 16px 12px;
}

.sidebar-nav-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-500);
  padding: 8px 12px;
  margin-top: 8px;
}

.sidebar-nav a {
  display: block;
  padding: 8px 12px;
  color: var(--gray-600);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--border-radius-sm);
  transition: var(--transition-fast);
  text-decoration: none;
  margin-bottom: 2px;
}

.sidebar-nav a:hover {
  background: var(--gray-200);
  color: var(--text-primary);
  text-decoration: none;
}

.sidebar-nav a.active {
  background: var(--primary-green);
  color: white;
}

.sidebar-nav a i {
  width: 16px;
  margin-right: 8px;
  opacity: 0.7;
}

.sidebar-nav a.active i {
  opacity: 1;
}

.sidebar-badge {
  margin: 16px;
  background: var(--accent-red);
  color: white;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

/* Main Content Area */
.main-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Header */
.site-header {
  height: var(--header-height);
  background: white;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text-primary);
}

.header-brand-icon {
  width: 32px;
  height: 32px;
  background: var(--primary-green);
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.header-nav a {
  color: var(--gray-600);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition-fast);
}

.header-nav a:hover {
  color: var(--primary-green);
  text-decoration: none;
}

.header-nav a.active {
  color: var(--text-primary);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.menu-toggle {
  display: none;
  font-size: 22px;
  color: var(--gray-700);
  background: none;
  border: none;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

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

.btn-primary:hover {
  background: var(--primary-green-hover);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
  text-decoration: none;
}

.btn-secondary {
  background: white;
  color: var(--primary-green);
  border: 1px solid var(--emerald-200);
}

.btn-secondary:hover {
  background: var(--emerald-50);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
}

.btn-outline:hover {
  background: var(--gray-50);
  text-decoration: none;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* Page Content Container */
.page-content {
  flex: 1;
  padding: 32px 24px;
  max-width: var(--content-max-width);
  margin: 0 auto;
  width: 100%;
}

.page-content-narrow {
  max-width: 880px;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: var(--gray-500);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--primary-green);
}

.breadcrumbs .separator {
  color: var(--gray-300);
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

h1 { font-size: 2.25rem; margin: 0 0 16px; }
h2 { font-size: 1.875rem; margin: 32px 0 16px; }
h3 { font-size: 1.5rem; margin: 24px 0 12px; }
h4 { font-size: 1.25rem; margin: 20px 0 8px; }
h5 { font-size: 1.125rem; margin: 16px 0 8px; }
h6 { font-size: 1rem; margin: 12px 0 6px; }

p { margin-bottom: 16px; }

.text-muted { color: var(--gray-500); }
.text-small { font-size: 14px; }
.text-xs { font-size: 12px; }

.drop-cap::first-letter {
  float: left;
  font-size: 4rem;
  line-height: 0.85;
  padding: 4px 8px 0 0;
  color: var(--primary-green);
  font-weight: 700;
}

/* ==========================================================================
   Calculator Component
   ========================================================================== */
.calculator-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

.calculator-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.calculator-subtitle {
  color: var(--gray-500);
  font-size: 14px;
  margin-bottom: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

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

.form-group {
  margin-bottom: 4px;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-700);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.form-label i {
  color: var(--gray-400);
  cursor: help;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius);
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  background: white;
  transition: var(--transition-fast);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.form-control.emphasis {
  border: 2px solid var(--emerald-200);
}

.form-control.emphasis:focus {
  border-color: var(--primary-green);
}

.form-hint {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 6px;
  margin-left: 4px;
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23475569' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  appearance: none;
  padding-right: 36px;
}

/* Hide number input arrows */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] {
  -moz-appearance: textfield;
}

/* Result Card */
.result-card {
  background: linear-gradient(135deg, var(--emerald-50) 0%, #ccfbf1 100%);
  border: 1px solid var(--emerald-100);
  border-radius: var(--border-radius-2xl);
  padding: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.result-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  background: rgba(16, 185, 129, 0.15);
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  position: relative;
  z-index: 1;
}

.result-stat-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--primary-green-dark);
  margin-bottom: 4px;
}

.result-stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.02em;
}

.result-stat-note {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 6px;
}

.result-divider {
  border-right: 1px solid var(--emerald-200);
}

.result-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--emerald-100);
  position: relative;
  z-index: 1;
}

.result-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
  transition: var(--transition-fast);
  cursor: pointer;
}

.result-action-btn:hover {
  background: var(--gray-50);
  border-color: var(--primary-green);
  color: var(--primary-green);
}

/* Alert Card */
.alert-card {
  background: var(--bg-cream);
  border: 1px solid #fde68a;
  border-radius: var(--border-radius-lg);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.alert-card.success {
  background: var(--emerald-50);
  border-color: var(--emerald-200);
}

.alert-card.info {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.alert-card i {
  font-size: 18px;
  margin-top: 2px;
}

.alert-card.success i { color: var(--primary-green); }
.alert-card.info i { color: #3b82f6; }
.alert-card i { color: var(--accent-orange); }

.alert-card h4 {
  margin: 0 0 4px;
  font-size: 15px;
  color: var(--text-primary);
}

.alert-card p {
  margin: 0;
  font-size: 13px;
  color: var(--gray-600);
}

/* ==========================================================================
   Bar Chart
   ========================================================================== */
.bar-chart {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  margin-top: 16px;
}

.bar-chart-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 16px;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.bar-row:last-child {
  margin-bottom: 0;
}

.bar-label {
  width: 100px;
  text-align: right;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  flex-shrink: 0;
}

.bar-track {
  flex: 1;
  background: var(--gray-100);
  height: 32px;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  position: relative;
}

.bar-fill {
  height: 100%;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  font-size: 12px;
  font-weight: 700;
  color: white;
  transition: width 0.8s ease;
  min-width: 60px;
}

.bar-fill.gray { background: var(--gray-400); }
.bar-fill.blue { background: #3b82f6; }
.bar-fill.emerald { background: var(--primary-green); }
.bar-fill.slate { background: var(--gray-600); }
.bar-fill.amber { background: var(--accent-yellow); }

/* ==========================================================================
   Image Card (Hero side image)
   ========================================================================== */
.image-card {
  position: relative;
  border-radius: var(--border-radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-2xl);
  border: 1px solid rgba(255,255,255,0.5);
}

.image-card img {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

.image-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 60%);
}

.image-card-tag {
  position: absolute;
  top: 24px;
  left: 24px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  padding: 12px 16px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,0.5);
  max-width: 240px;
}

.image-card-tag-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.image-card-tag-icon {
  width: 24px;
  height: 24px;
  background: var(--primary-green);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 11px;
}

.image-card-tag-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.image-card-tag-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.image-card-stats {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-radius: var(--border-radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-2xl);
  border: 1px solid rgba(255,255,255,0.5);
}

.image-card-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.image-card-stat {
  text-align: center;
  padding: 0 12px;
}

.image-card-stat:not(:last-child) {
  border-right: 1px solid var(--gray-200);
}

.image-card-stat-value {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.image-card-stat-label {
  font-size: 11px;
  color: var(--gray-500);
  font-weight: 500;
  margin-top: 4px;
}

/* ==========================================================================
   Section Components
   ========================================================================== */
section {
  margin-bottom: 48px;
}

.section-title {
  font-size: 2.25rem;
  color: var(--primary-green);
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: -0.5px;
}

.section-lead {
  font-size: 1.125rem;
  color: var(--gray-600);
  margin-bottom: 24px;
  line-height: 1.6;
}

/* Feature Cards Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 32px;
}

.feature-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 20px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius-lg);
  transition: var(--transition);
}

.feature-card:hover {
  border-color: var(--primary-green);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.feature-icon {
  width: 44px;
  height: 44px;
  background: var(--emerald-50);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-green);
  font-size: 20px;
  flex-shrink: 0;
}

.feature-content h4 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.feature-content p {
  margin: 0;
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.4;
}

/* Stats Section */
.stats-section {
  background: linear-gradient(135deg, var(--emerald-50) 0%, var(--emerald-100) 100%);
  border-radius: var(--border-radius-2xl);
  padding: 48px;
  position: relative;
  overflow: hidden;
  margin: 48px 0;
}

.stats-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(5, 150, 105, 0.12) 0%, transparent 70%);
  border-radius: 50%;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  position: relative;
  z-index: 1;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary-green);
  display: block;
  margin-bottom: 8px;
  letter-spacing: -1px;
  line-height: 1;
}

.stat-label {
  font-size: 13px;
  color: var(--gray-600);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */
.faq-section {
  margin: 48px 0;
}

.faq-header {
  text-align: center;
  margin-bottom: 32px;
}

.faq-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.faq-subtitle {
  color: var(--gray-600);
  font-size: 16px;
}

.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.faq-item:hover {
  border-color: var(--primary-green);
  box-shadow: var(--shadow);
}

.faq-item.active {
  border-color: var(--primary-green);
}

.faq-question {
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 15px;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}

.faq-question::after {
  content: '+';
  font-size: 24px;
  color: var(--primary-green);
  font-weight: 300;
  transition: transform 0.3s;
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item.active .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 22px;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 22px 20px;
}

.faq-answer p {
  color: var(--gray-600);
  line-height: 1.7;
  font-size: 15px;
  margin: 0;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--gray-900);
  color: #cbd5e0;
  padding: 60px 24px 30px;
  margin-top: 80px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand h3 {
  color: white;
  font-size: 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.8;
  margin-bottom: 16px;
}

.footer-newsletter {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.footer-newsletter input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  border-radius: var(--border-radius);
  color: white;
  font-size: 14px;
  outline: none;
}

.footer-newsletter input::placeholder {
  color: rgba(255,255,255,0.4);
}

.footer-newsletter button {
  background: var(--primary-green);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition);
}

.footer-newsletter button:hover {
  background: var(--primary-green-hover);
}

.footer-column h4 {
  color: white;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
  font-weight: 600;
}

.footer-column ul li {
  margin-bottom: 12px;
}

.footer-column a {
  color: #cbd5e0;
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
}

.footer-column a:hover {
  color: var(--primary-green);
  text-decoration: none;
}

.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  flex-wrap: wrap;
  gap: 16px;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: var(--transition);
}

.social-link:hover {
  background: var(--primary-green);
  transform: translateY(-2px);
  text-decoration: none;
  color: white;
}

/* ==========================================================================
   Content Article Styles
   ========================================================================== */
.article-content {
  font-size: 16px;
  line-height: 1.75;
  color: var(--gray-700);
}

.article-content p {
  margin-bottom: 18px;
}

.article-content h2 {
  font-size: 1.75rem;
  margin-top: 40px;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.article-content h3 {
  font-size: 1.375rem;
  margin-top: 28px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.article-content ul, .article-content ol {
  margin: 16px 0 16px 24px;
}

.article-content ul li, .article-content ol li {
  margin-bottom: 8px;
  list-style: disc;
}

.article-content ol li {
  list-style: decimal;
}

.article-content strong {
  color: var(--text-primary);
  font-weight: 700;
}

.article-content a {
  color: var(--primary-green);
  text-decoration: underline;
}

.article-content blockquote {
  border-left: 4px solid var(--primary-green);
  padding: 12px 20px;
  background: var(--emerald-50);
  margin: 20px 0;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  font-style: italic;
  color: var(--gray-700);
}

.article-content code {
  background: var(--gray-100);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
  font-family: 'Monaco', 'Menlo', monospace;
  color: var(--primary-green-dark);
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: white;
  box-shadow: var(--shadow-sm);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.article-content table th {
  background: var(--primary-green);
  color: white;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
}

.article-content table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-200);
  font-size: 14px;
}

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

.article-content table tr:nth-child(even) {
  background: var(--gray-50);
}

/* Table of Contents */
.toc {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius-lg);
  padding: 20px 24px;
  margin: 24px 0;
}

.toc-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc ul li {
  margin-bottom: 6px;
}

.toc a {
  color: var(--gray-700);
  text-decoration: none;
  font-size: 14px;
  display: block;
  padding: 4px 0;
}

.toc a:hover {
  color: var(--primary-green);
  text-decoration: none;
}

/* Info Cards / Callouts */
.callout {
  background: var(--emerald-50);
  border-left: 4px solid var(--primary-green);
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.callout-title {
  font-weight: 700;
  color: var(--primary-green-dark);
  margin-bottom: 6px;
  font-size: 15px;
}

.callout p {
  margin: 0;
  color: var(--gray-700);
  font-size: 14px;
}

/* Related Articles / Internal Links */
.related-section {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius-xl);
  padding: 32px;
  margin: 40px 0;
}

.related-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.related-card {
  display: block;
  padding: 16px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius);
  transition: var(--transition);
  text-decoration: none;
  color: var(--text-primary);
}

.related-card:hover {
  background: white;
  border-color: var(--primary-green);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  text-decoration: none;
}

.related-card-icon {
  width: 32px;
  height: 32px;
  background: var(--emerald-50);
  color: var(--primary-green);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  font-size: 14px;
}

.related-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.related-card-desc {
  font-size: 12px;
  color: var(--gray-500);
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
  border-radius: var(--border-radius-2xl);
  padding: 48px;
  color: white;
  text-align: center;
  margin: 48px 0;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
}

.cta-section h2 {
  color: white;
  font-size: 2rem;
  margin-bottom: 12px;
  position: relative;
}

.cta-section p {
  font-size: 1.125rem;
  opacity: 0.95;
  margin-bottom: 24px;
  position: relative;
}

.cta-section .btn {
  background: white;
  color: var(--primary-green);
  position: relative;
}

.cta-section .btn:hover {
  background: var(--gray-100);
  color: var(--primary-green-dark);
}

/* Scroll to top button */
.scroll-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  background: var(--primary-green);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4);
  transition: var(--transition);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  background: var(--primary-green-hover);
  transform: translateY(-3px);
}

/* Mobile Menu Overlay */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 40;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 32px;
  margin-bottom: 48px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin: 0;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--gray-600);
  line-height: 1.6;
  margin: 0;
}

.hero-badges {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--emerald-50);
  color: var(--primary-green-dark);
  border: 1px solid var(--emerald-200);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

/* Two Column Layout */
.two-col {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 32px;
}

.two-col-sticky {
  position: sticky;
  top: 84px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    transform: translateX(-100%);
    box-shadow: var(--shadow-2xl);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .header-nav {
    display: none;
  }

  .hero-section,
  .two-col {
    grid-template-columns: 1fr;
  }

  .two-col-sticky {
    position: static;
  }

  .image-card img {
    height: 360px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 768px) {
  .page-content {
    padding: 20px 16px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .form-grid,
  .form-grid-3,
  .form-grid-4 {
    grid-template-columns: 1fr;
  }

  .result-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .result-divider {
    border-right: none;
    border-bottom: 1px solid var(--emerald-200);
    padding-bottom: 20px;
  }

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

  .result-stat-value {
    font-size: 2rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .stats-section {
    padding: 32px 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .image-card-stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .image-card-stat:not(:last-child) {
    border-right: none;
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 12px;
  }

  .image-card img {
    height: 280px;
  }

  .calculator-card {
    padding: 20px;
  }

  .cta-section {
    padding: 32px 20px;
  }
}

@media (max-width: 480px) {
  .header-actions .btn-primary span.btn-text {
    display: none;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* Print Styles */
@media print {
  .sidebar, .site-header, .site-footer, .scroll-top, .result-actions {
    display: none;
  }

  body {
    background: white;
  }

  .page-content {
    max-width: 100%;
  }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0 !important; }
.mt-8 { margin-top: 32px; }
.mt-16 { margin-top: 64px; }
.mb-0 { margin-bottom: 0 !important; }
.mb-8 { margin-bottom: 32px; }
.hidden { display: none; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
