/* ==========================================================================
   FarmKeeper Core Design System & Global Styles (2026 Standards)
   ========================================================================== */

:root {
  /* Colors */
  --green: #2C7A3D;
  --green-dark: #1b5e20;
  --green-light: #eaf3ec;
  --accent: #F4A300;
  --accent-hover: #d48b00;
  --text: #2c3e50;
  --text-muted: #606f7b;
  --bg: #F7F9F7;
  --white: #ffffff;
  --border-color: #e2e8f0;
  --input-border: #707070; /* WCAG 3:1 compliant for interactive UI components */

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08);

  /* Transitions */
  --transition-fast: all 0.2s ease-in-out;
  --transition-normal: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Base Elements
   ========================================================================== */

* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  margin: 0;
  padding: 0;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--green);
  margin: 0 0 12px 0;
  font-weight: 600;
  line-height: 1.25;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; margin-top: 1rem; }
h3 { font-size: 1.4rem; }

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

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

section {
  padding: 80px 0;
}

/* ==========================================================================
   Layout & Utility Containers
   ========================================================================== */

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

/* Blog Layout Wrapper */
.blog-container {
  max-width: 850px;
  margin: 0 auto;
  padding: 0 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

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

/* ==========================================================================
   Components
   ========================================================================== */

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid transparent;
  transition: var(--transition-fast);
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

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

.btn-primary:hover {
  background: var(--green-dark);
  color: var(--white);
  transform: translateY(-1px);
}

.btn-outline {
  border: 2px solid var(--green);
  color: var(--green);
  background: transparent;
}

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

.btn-outline-white {
  border: 2px solid var(--white);
  color: var(--white);
  background: transparent;
  box-shadow: none;
}

.btn-outline-white:hover {
  background: var(--white);
  color: var(--green-dark);
  transform: translateY(-1px);
}

/* Cards */
.card {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 28px;
  transition: var(--transition-normal);
  border: 1px solid rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(44, 122, 61, 0.1);
}

.card img {
  margin-bottom: 16px;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--green);
  margin-bottom: 8px;
  line-height: 1.3;
}

/* Badges / Pills */
.pill {
  display: inline-block;
  background: var(--green-light);
  color: var(--green-dark);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-right: 8px;
  margin-bottom: 8px;
  box-shadow: 0 1px 2px rgba(44, 122, 61, 0.05);
}

/* Helper Text */
.muted {
  color: var(--text-muted);
}

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

img {
  border-radius: 12px;
  max-width: 100%;
  height: auto;
  display: block;
}

/* Icons styling */
.k-icons {
  font-size: 42px;
  line-height: 1.1;
  margin-bottom: 12px;
}

/* ==========================================================================
   Header Navigation
   ========================================================================== */

header.container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 90px;
}

header .logo-container img {
  transition: var(--transition-fast);
}

header .logo-container img:hover {
  opacity: 0.9;
}

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

.menu a {
  color: var(--text);
  text-decoration: none;
  margin: 0 14px;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition-fast);
  display: inline-block;
}

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

.menu .cta {
  color: var(--white) !important;
  background: var(--green);
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.menu .cta:hover {
  background: var(--green-dark);
  color: var(--white) !important;
  transform: translateY(-1px);
}

/* Active Highlight Page in Navigation */
.menu .nav-highlight {
  color: var(--white) !important;
  background: var(--accent);
  padding: 8px 16px;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(244, 163, 0, 0.3);
  transition: var(--transition-fast);
}

.menu .nav-highlight:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  color: var(--white) !important;
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
  background: #0f3a1e;
  color: #dfe7e1;
  padding: 40px 0;
  font-size: 0.95rem;
}

footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer small {
  font-size: 0.9rem;
}

footer nav a {
  color: #dfe7e1;
  text-decoration: none;
  margin: 0 12px;
  transition: var(--transition-fast);
}

footer nav a:hover {
  color: var(--white);
}

/* ==========================================================================
   Tables (for specs / operating modes)
   ========================================================================== */

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

th, td {
  padding: 14px 18px;
  border-bottom: 1px solid #eef2ee;
  text-align: left;
}

th {
  background: var(--green-light);
  color: var(--green-dark);
  font-weight: 600;
  font-family: var(--font-heading);
}

tr:last-child td {
  border-bottom: none;
}

tbody tr {
  background: var(--white);
  transition: var(--transition-fast);
}

tbody tr:hover {
  background: #fafdfb;
}

/* ==========================================================================
   Comparison Table Specific Layout
   ========================================================================== */

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 30px 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.comparison-table th, .comparison-table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid #eaeaea;
}

.comparison-table th {
  background-color: var(--green);
  color: var(--white);
  font-weight: bold;
  font-size: 1rem;
}

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

.comparison-table tr:nth-child(even) {
  background-color: #fcfdfc;
}

/* Column highlight for FarmKeeper */
.comparison-table td:nth-child(2) {
  background-color: #f0f7f2;
  font-weight: bold;
  color: var(--green);
}

/* ==========================================================================
   Article Wrapper (for blog entries and comparisons)
   ========================================================================== */

.article-wrapper {
  max-width: 900px;
  margin: -40px auto 0;
  background: var(--white);
  padding: 50px;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  position: relative;
  z-index: 10;
}

.article-wrapper h2 {
  margin-top: 40px;
  font-size: 1.6rem;
  border-bottom: 2px solid var(--bg);
  padding-bottom: 8px;
  color: var(--green);
}

.article-wrapper p {
  margin-bottom: 20px;
  font-size: 1.0625rem;
}

.article-wrapper ul {
  margin-bottom: 20px;
  font-size: 1.0625rem;
  line-height: 1.8;
  padding-left: 20px;
}

.article-wrapper li {
  margin-bottom: 10px;
}

.highlight-box {
  background: #fff9e6;
  border-left: 4px solid var(--accent);
  padding: 18px 24px;
  margin: 24px 0;
  border-radius: 0 8px 8px 0;
}

/* ==========================================================================
   Accordion / Semantic FAQ Elements
   ========================================================================== */

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-details {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 14px;
  background: var(--white);
  transition: var(--transition-fast);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.faq-details:hover {
  border-color: rgba(44, 122, 61, 0.3);
}

.faq-details summary {
  font-family: var(--font-heading);
  color: var(--green);
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  outline: none;
  padding: 18px 24px;
  position: relative;
  user-select: none;
  transition: var(--transition-fast);
}

.faq-details summary::-webkit-details-marker {
  display: none;
}

.faq-details summary::after {
  content: '+';
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  transition: var(--transition-fast);
  color: var(--green);
}

.faq-details[open] {
  border-color: var(--green);
}

.faq-details[open] summary {
  border-bottom: 1px solid var(--border-color);
  background: var(--bg);
}

.faq-details[open] summary::after {
  content: '\2212'; /* Minus */
}

.faq-content {
  padding: 18px 24px;
  background: var(--white);
}

.faq-content p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   Contact & Lead Forms
   ========================================================================== */

.contact-form {
  background: var(--white);
  padding: 40px;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0, 0, 0, 0.02);
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 1.5px solid var(--input-border);
  border-radius: 6px;
  box-sizing: border-box;
  font-family: var(--font-body);
  font-size: 16px;
  background: var(--white);
  color: var(--text);
  transition: var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(44, 122, 61, 0.1);
}

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

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 900px) {
  /* Layout adjustments */
  section {
    padding: 50px 0;
  }

  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  /* Header adjustments */
  header.container {
    flex-direction: column;
    height: auto;
    padding: 20px 24px;
    gap: 18px;
  }

  .menu {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 16px;
    width: 100%;
  }

  .menu a {
    margin: 0;
    font-size: 0.95rem;
  }

  .menu .cta {
    width: 100%;
    text-align: center;
    padding: 10px 18px;
  }

  /* Typography adjustments */
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  h3 { font-size: 1.25rem; }

  /* Buttons */
  .btn {
    width: 100%;
    margin-left: 0 !important;
    margin-top: 8px;
  }

  .btn:first-child {
    margin-top: 0;
  }

  /* Footer */
  footer .container {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  footer nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 12px;
  }

  footer nav a {
    margin: 0;
  }

  .article-wrapper {
    padding: 30px 20px;
  }
}
