@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── CSS Variables ── */
:root {
  --navy:   #13264A;
  --blue:   #3380C3;
  --green:  #416c39;
  --lime:   #8BC34A;
  --light:  #f4f7f0;
  --white:  #ffffff;
  --orange: #F47820;
  --text:   #1a1a1a;
  --muted:  #5a6472;
  --border: #dde3ec;
  --card-bg:#fafdf6;
  --row-hover: #f2f8ea;
  --tag-green-bg: #eaf4d9;
  --tag-green-fg: #2e6b1a;
  --tag-blue-bg:  #ddeaf7;
  --tag-blue-fg:  #1a4a7a;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(19,38,74,.10);
}

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  color: var(--text);
  background: var(--light);
  line-height: 1.6;
}
  .nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 3rem;
    background: rgba(254, 249, 246, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(249, 196, 196, 0.3);
  }

  .nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.2s;
  }

/* ── Typography ── */
h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--white);
  letter-spacing: -.01em;
}
h2 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  color: var(--navy);
  line-height: 1.25;
}
h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: .5rem;
}
p { color: var(--muted); line-height: 1.7; }
li { color: var(--muted); padding-bottom: .4rem; }

a { color: var(--orange); text-decoration: none; }
a:hover { color: #c45a10; }

/* ── Header ── */
header {
  background: linear-gradient(135deg, var(--navy) 0%, #1e3d6e 100%);
  padding: 1.5rem 2.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(19,38,74,.25);
}
.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 auto;
}
.logo-size {
  width: 5em;
  height: 5em;
  border-radius: 50%;
  object-fit: cover;
}
/* -- Nav Bar Home -- */
.home-nav-container {
    position: sticky;
    top: 125px; 
    background: var(--white);
    border-bottom: 1px solid var(--border);
    z-index: 90;
    padding: 0.75rem 0;
  }
  
  .home-nav-links {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 3rem;
    margin: 0 auto;
  }
  
  .home-nav-links a {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--navy);
    text-transform: uppercase;
    transition: color 0.2s;
  }
  
  .home-nav-links a:hover {
    color: var(--lime);
  }
/* ── Footer ── */
footer {
  background: var(--navy);
  padding: 1.5rem 2.5rem 5rem;
  margin-top: 80px;
}
#footer {
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: flex-end;
}
#footer a {
  color: rgba(255,255,255,.75);
  font-size: .9rem;
  font-weight: 500;
  transition: color .2s;
}
#footer a:hover { color: var(--lime); }

/* ── Breadcrumb ── */
.breadcrumb {
  margin: 0 auto;
  padding: 2rem 2.5rem 2rem;
  font-size: .875rem;
  color: var(--muted);
}
.breadcrumb a { color: var(--blue); }
.breadcrumb a:hover { color: var(--navy); }

/* ── Page Wrapper ── */
.page-wrap {
  margin: 0 auto;
  padding: 0 2.5rem 3rem;
}

/* ── Two-Columns ── */
.planting-shell,
.row {
  display: flex;
  align-items: flex-start;
  gap: 2.5rem;
  margin: 0 auto;
  padding: 0 2.5rem 3rem;
}

/* ── Sidebar ── */
.sidebar,
.column.left {
  width: 200px;
  min-width: 160px;
  flex-shrink: 0;
  position: sticky; 
  top: 120px;
  align-self: flex-start;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.25rem;
}
.sidebar nav,
.column.left nav {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  font-size: 1rem;
}
.sidebar nav a,
.column.left nav a {
  display: block;
  padding: .5rem .75rem;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 500;
  transition: background .15s, color .15s;
  white-space: normal;
  line-height: 1.4;
}
.sidebar nav a:hover,
.column.left nav a:hover {
  background: var(--tag-green-bg);
  color: var(--green);
}
.side-home{
    text-decoration: underline;
}
/* ── Content Area ── */
.content-area,
.column.right {
  flex: 1;
  min-width: 0;
  padding: 0;
}
.content-area section { margin-bottom: 3rem; }

/* ── Section Heading ── */
.section-heading {
  font-family: 'DM Serif Display', serif;
  font-size: 2rem;
  color: var(--navy);
  padding-bottom: .6rem;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.25rem;
}

/* ── Wrap Topics ── */
.wrap-topics {
  padding: .5rem 0;
}

/* ── Bullet lists ── */
.bullet-desc {
  padding-left: 1.5rem;
  margin-top: .5rem;
}
.nested-bullet {
  padding-left: 1rem;
  margin-top: 1rem;
}
.nested-bullet strong { color: var(--green); }

/* ── HOME: Hero strip ── */
.hero {
  background: var(--lime);
  color: var(--black);
  padding: 4rem 2.5rem 5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner {
  margin: 0 auto;
  position: relative;
}
.hero h2 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.8rem, 5vw, 3rem);
  color: var(--white);
  margin-bottom: .75rem;
}
.hero p { color: rgba(255,255,255,.75); font-size: 1.1rem; }

/* ── HOME: Button Grid ── */
.button-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: -2rem auto 0;
  padding: 0 2.5rem 3rem;
  position: relative;
  z-index: 1;
}
.button-grid > * {
    display: flex;
    flex-direction: column;
    min-height: 200px; 
}

.button-grid .pill {
    margin-top: auto; 
    margin-left: auto; 
        margin-bottom: 0rem; 
    margin-right: 0rem;
    width: fit-content;
    height: fit-content;
    transform: translateX(-3px);
}
.button {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow);
  border: 1.5px solid var(--border);
  color: var(--text);
  transition: transform .18s, box-shadow .18s, border-color .18s;
  text-decoration: none;
}
.button:hover {
  box-shadow: 0 8px 24px rgba(19,38,74,.15);
}
.button h2 {
  font-size: 1.05rem;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  color: var(--navy);
}
.button p { font-size: .875rem; color: var(--muted); }
.button-icon {
  font-size: 1.6rem;
  display: block;
  margin-bottom: .25rem;
}

/* ── HOME: Location + Contributors ── */
#location, #contributors {
  margin: 0 auto;
  padding: 2.5rem 2.5rem 0;
}
#location h2, #contributors h2 {
  margin-bottom: .75rem;
}
#location h3 {
  color: var(--muted);
  font-weight: 400;
  margin-bottom: 1rem;
}
iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: block;
  margin-top: .5rem;
}

/* Home Contributors */
.contributors-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1.25rem;
}
.contributor-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  background: var(--white);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow);
  border: 1.5px solid var(--border);
  min-width: 150px;
}
.circle-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--lime);
}
.contributor-name {
  font-size: .8rem;
  font-weight: 600;
  color: var(--navy);
  text-align: center;
}
/* ── Model Images ── */
.model-img img {
    border-radius: 50%;
    width: 100%;
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 1.5rem 0rem;
}
/* ── Crop Table ── */
.toolbar {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  margin-top: .75rem;
}
.search-wrap {
  position: relative;
  flex: 1;
  min-width: 180px;
}
.search-wrap svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  opacity: .4;
  pointer-events: none;
}
#cropSearch {
  width: 100%;
  padding: 9px 12px 9px 34px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .875rem;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  background: var(--white);
  transition: border-color .15s;
}
#cropSearch:focus { border-color: var(--lime); }
.filter-pills { display: flex; gap: .5rem; flex-wrap: wrap; }
.pill {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  font-family: 'DM Sans', sans-serif;
  font-size: .8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  color: var(--muted);
  background: var(--white);
}
.pill:hover { border-color: var(--lime); color: var(--green); }
.pill.active[data-filter="all"],
.pill.active[data-filter="Leafy Greens"] { background: var(--lime); border-color: var(--green); color: var(--white); }
.pill.active[data-filter="Vegetables"] { background: var(--blue); border-color: var(--navy); color: var(--white); }

.crop-table-wrap {
  overflow-x: auto;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
table.crop-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
  background: var(--white);
}
.crop-table thead tr {
  background: var(--navy);
  color: var(--white);
}
.crop-table th {
  padding: 11px 14px;
  text-align: left;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: .8rem;
  letter-spacing: .04em;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.crop-table th:hover { background: #1e3a6e; }
.crop-table th .sort-icon { opacity: .4; margin-left: 4px; }
.crop-table th.sorted .sort-icon { opacity: 1; }
.crop-table tbody tr { border-bottom: 1px solid var(--border); transition: background .1s; }
.crop-table tbody tr:last-child { border-bottom: none; }
.crop-table tbody tr:hover { background: var(--row-hover); }
.crop-table td { padding: 10px 14px; color: var(--text); vertical-align: middle; }
.crop-table td:first-child { font-weight: 600; color: var(--navy); }
.tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 500;
}
.tag-leafy-greens { background: var(--tag-green-bg); color: var(--tag-green-fg); }
.tag-vegetables   { background: var(--tag-blue-bg);  color: var(--tag-blue-fg); }
.no-results {
  text-align: center;
  padding: 40px;
  color: var(--muted);
  font-style: italic;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .planting-shell, .row {
    flex-direction: column;
    padding: 0 1.25rem 2rem;
  }
  .sidebar, .column.left {
    width: 100%;
    position: static;
  }
  .sidebar nav, .column.left nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .button-grid { grid-template-columns: 1fr 1fr; padding: 0 1.25rem 2rem; }
  .hero { padding: 2.5rem 1.25rem 4rem; }
  #location, #contributors { padding: 1.5rem 1.25rem 0; }
  .breadcrumb { padding: 1rem 1.25rem .5rem; }
}
@media (max-width: 480px) {
  .button-grid { grid-template-columns: 1fr; }
  header { padding: 1rem 1.25rem; }
  .logo-size { width: 40px; height: 40px; }
  h1 { font-size: 1.2rem; }
}