/*
Theme Name: Boreyroth Agri Theme
Description: Farmer-first WordPress theme for AI Agriculture platform.
Version: 0.2.0
Author: Boreyroth Group, Inc.
*/

@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;700;800&display=swap");

:root {
  --bg: #f2efdf;
  --surface: #fffdf5;
  --surface-soft: #f8fcf9;
  --primary: #175c39;
  --primary-soft: #d9efdf;
  --accent: #bf7a2a;
  --text: #1f2a1f;
  --muted: #5b685d;
  --danger: #b6402f;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow: 0 14px 32px rgba(22, 36, 24, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Outfit", "Trebuchet MS", sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 214, 150, 0.35), transparent 32%),
    radial-gradient(circle at 88% 12%, rgba(128, 190, 150, 0.25), transparent 28%),
    var(--bg);
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(23, 92, 57, 0.94);
  color: #fff;
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
}

.brand {
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.nav-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 10px;
  min-width: 48px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  margin: 4px auto;
  border-radius: 999px;
}

.main-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.menu-item {
  margin: 0;
}

.main-nav a {
  text-decoration: none;
  color: #eff9f2;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.main-nav a:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.main-nav .current-menu-item > a,
.main-nav .current_page_item > a,
.main-nav .current-menu-ancestor > a {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.site-main {
  padding: 26px 0 46px;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}

.content-primary {
  display: grid;
  gap: 16px;
}

.content-primary > * {
  margin-top: 0;
}

.hero {
  padding: 26px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(120deg, rgba(23, 92, 57, 0.92), rgba(43, 130, 86, 0.86)),
    var(--primary);
  color: #f5fff7;
  box-shadow: var(--shadow);
}

.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.05;
}

.hero p {
  margin: 0 0 18px;
  max-width: 72ch;
  color: #e2f4e8;
}

.page-head {
  padding: 8px 2px 12px;
}

.page-head h1 {
  margin: 0 0 8px;
}

.page-head p {
  margin: 0;
  color: var(--muted);
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.action-card {
  display: block;
  background: var(--primary-soft);
  border: 1px solid #b6dbc3;
  color: #13472a;
  padding: 14px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 700;
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.action-card:hover {
  transform: translateY(-1px);
  background: #e4f4e8;
  box-shadow: 0 10px 20px rgba(23, 92, 57, 0.12);
}

.grid-two {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ai-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid #e0e4d6;
  padding: 16px;
  box-shadow: var(--shadow);
}

.stack-form,
.inline-form {
  display: grid;
  gap: 10px;
}

.inline-form {
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
}

.scenario-controls {
  border: 1px solid #d5e6da;
  border-radius: 10px;
  background: var(--surface-soft);
  padding: 12px;
  margin-top: 6px;
}

.scenario-controls legend {
  font-weight: 700;
  color: #244734;
  padding: 0 6px;
}

.scenario-value {
  font-size: 13px;
  color: #2f4f3b;
  margin-top: -4px;
  margin-bottom: 4px;
}

textarea,
input,
select,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #c8d4cb;
  border-radius: 10px;
  padding: 10px;
  background: #fff;
}

button {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

button:hover {
  filter: brightness(1.06);
}

.result-box {
  margin-top: 12px;
  padding: 12px;
  border-left: 4px solid var(--primary);
  background: #eef8f1;
  border-radius: 8px;
}

.investment-summary h3 {
  margin-top: 0;
}

.investment-summary h4 {
  margin: 10px 0 8px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.metric-grid div {
  background: var(--surface-soft);
  border: 1px solid #d5e6da;
  border-radius: 10px;
  padding: 10px;
}

.compare-bars {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  align-items: center;
  gap: 8px;
}

.bar-track {
  background: #dfece3;
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
}

.bar-invest {
  background: var(--accent);
}

.bar-income {
  background: var(--primary);
}

.bar-profit.is-positive {
  background: #2b8a5a;
}

.bar-profit.is-negative {
  background: var(--danger);
}

.export-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.scenario-chart {
  width: 100%;
  max-width: 420px;
  background: var(--surface-soft);
  border: 1px solid #d5e6da;
  border-radius: 10px;
  padding: 8px;
}

.scenario-history {
  margin-top: 14px;
}

.scenario-history-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.scenario-history-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.scenario-history-controls label {
  font-weight: 600;
}

.scenario-history-controls select {
  min-width: 130px;
}

#scenario-min-profit {
  width: 110px;
}

#scenario-max-risk {
  min-width: 120px;
}

.scenario-history-grid {
  margin-top: 10px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.scenario-history-card {
  background: var(--surface-soft);
  border: 1px solid #d5e6da;
  border-radius: 10px;
  padding: 10px;
}

.scenario-history-card h5 {
  margin: 0 0 8px;
}

.scenario-history-card p {
  margin: 3px 0;
}

.scenario-tags {
  color: #355c45;
  font-size: 12px;
}

.scenario-card-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.scenario-delete-btn {
  background: var(--danger);
}

.widget-area {
  display: grid;
  gap: 14px;
}

.sidebar-area {
  position: sticky;
  top: 92px;
}

.widget {
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid #e0e4d6;
  padding: 16px;
  box-shadow: var(--shadow);
}

.widget-title {
  margin: 0 0 10px;
  font-size: 18px;
}

.widget ul {
  margin: 0;
  padding-left: 18px;
}

.widget p:last-child,
.widget ul:last-child {
  margin-bottom: 0;
}

.editor-content {
  margin-top: 0;
}

.muted {
  color: var(--muted);
}

.site-footer {
  margin-top: 8px;
  background: #10281b;
  color: #d7e9dc;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 16px 0;
}

.footer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 18px;
  align-items: start;
}

.site-footer-nav {
  margin-top: 10px;
}

.site-footer .menu {
  gap: 10px;
}

.site-footer a {
  color: #eef7f1;
  text-decoration: none;
}

.footer-widget-area .widget {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.footer-widget-area .widget-title,
.footer-widget-area .widget,
.footer-widget-area a {
  color: #eef7f1;
}

.site-footer p {
  margin: 0;
  font-size: 14px;
}

@media (max-width: 820px) {
  .header-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .nav-toggle {
    display: inline-block;
  }

  .main-nav {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    background: rgba(10, 34, 21, 0.2);
    padding-top: 8px;
  }

  .main-nav.is-open {
    display: flex;
  }

  .menu {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .main-nav a {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
  }

  .quick-actions,
  .grid-two,
  .inline-form,
  .metric-grid,
  .scenario-history-grid,
  .content-layout,
  .footer-layout {
    grid-template-columns: 1fr;
  }

  .sidebar-area {
    position: static;
  }

  .hero {
    padding: 22px 18px;
  }

  .container {
    width: min(100%, calc(100% - 24px));
  }

  .scenario-history-controls {
    width: 100%;
  }

  .scenario-history-controls select,
  #scenario-min-profit,
  #scenario-max-risk,
  .scenario-history-controls button {
    width: 100%;
  }

  .export-actions button,
  .scenario-card-actions button {
    width: 100%;
  }

  .action-card {
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .bar-row {
    grid-template-columns: 70px 1fr;
  }

  .bar-row strong {
    grid-column: 1 / -1;
    justify-self: end;
  }
}
