/* main.css */
/*=====================================
  Global Variables & Resets
=====================================*/
:root {
  /* Fallback defaults (Plant Zone) */
  --bg-page:       #ffffff; /* page background */
  --bg-panel:      #ffffff;
  --text-main:     #1f4f1f; /* paragraph & body text */
  --heading-color: #276e25; /* h1, h2, section titles */
  --header-bg:     linear-gradient(90deg, #ffffff 0%, #f7f7f7 100%);
  --accent:        #276e25; /* buttons, links, highlights */
    /* Zone-specific accents for the slide-out nav */
  --accent-healthzone: #d97706;
  --accent-plantzone:  #276e25;
  --accent-toolzone:   #1a73e8;
  --accent-light: #e4eee0;        /* soft variant of your primary accent */
  --accent-dark:  #b45309;        /* a deeper tone of accent—for hovers */
  --orange:       #d97706;        /* your Health / default orange */

}

/* Index (home page) (note logo’s orange (#ff972e) */
body.home-page {
  --text-main:     #222222;
  --heading-color: #111111; /* reuse green accent */
  --accent:        #000000; /* */
}

/* Plant Zone (forest green) */
body.plants-page {
  --bg-panel:      #fff;
  --text-main:     #1f4f1f; /* Dark Olive */
  --heading-color: #276e25; /* Forest Green */
  --header-bg:     linear-gradient(90deg, #e9fbe9 0%, #d4f5d4 100%);
  --accent:        #276e25;
}

/* Health Zone (warm orange) */
body.health-page {
  --bg-panel:      #fff;
  --text-main:     #593700; /* Dark Brown */
  --heading-color: #d97706; /* Warm Orange */
  --header-bg:     linear-gradient(90deg, #fff0d5 0%, #ffe5b7 100%);
  --accent:        #d97706;
}

/* Tools Zone (sky blue) */
body.tools-page {
  --bg-panel:      #fff;
  --text-main:     #0c3d78; /* Navy */
  --heading-color: #1a73e8; /* Sky Blue */
  --header-bg:     linear-gradient(90deg, #e5f2ff 0%, #c6e3ff 100%);
  --accent:        #1a73e8;
}

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

body {
  font-family: sans-serif;
  line-height: 1.5;
  background-color: var(--bg-page);
  color: var(--text-main);
}

.center-img {
  display: block;
  margin: 1rem auto;
  width: 100%;
  max-width: 700px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}
/* Utility: */
/* Float image to the left and wrap text on the rightt */
.wrap-left {
  float: left;
  margin: 0 1em 1em 0; /* top right bottom left */
}
/* Float image to the right and wrap text on the left */
.wrap-right {
  float: right;
  margin: 0 0 1em 1em;  /* top right bottom left */
}
/* Universal table styling */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
}
table th,
table td {
  padding: 0.75em 1em;
  text-align: left;
  border: 1px solid var(--accent);
}
table th {
  background-color: var(--header-bg);
  font-weight: 600;
}
table tbody tr:nth-child(odd) {
  background-color: rgba(0, 0, 0, 0.03);
}

@media (max-width: 600px) {
  .wrap-left,
  .wrap-right,
  .center-img {
    width: auto;            /* Respect inline width/max-width */
    max-width: 100%;        /* Never overflow the container */
    min-width: 180px;       /* Prevent image from shrinking too much */
    height: auto;
  }
}

/*=====================================
  Featured Articles Section
=====================================*/
.featured-articles {
  width: 100vw;
  position: relative;
  left: 50%; right: 50%;
  margin-left: -50vw; margin-right: -50vw;
  margin-bottom: 2.2em;
  background: var(--bg-panel);
  padding: 2.2em 0 2.4em;
  border-top: 1px solid var(--accent-light, #e4eee0);
  border-bottom: 1px solid var(--accent-light, #e4eee0);
}
.featured-articles h2 {
  text-align: center;
  margin-bottom: 1.5em;
  font-size: 1.55em;
  font-weight: 900;
  letter-spacing: 0.01em;
  color: var(--accent);
}
.featured-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2em;
  max-width: 1100px;
  margin: 0 auto;
}

/* Stack on mobile */
@media (max-width: 700px) {
  .featured-cards {
    grid-template-columns: 1fr;
  }
}

.featured-card {
  background: var(--bg-panel);
  border-radius: 1.2em;
  box-shadow: 0 1px 18px rgba(0,0,0,0.06);
  padding: 2em 1.5em;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  text-align: left;
  border-left: 1px solid var(--accent);
}
.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.featured-card h3 {
  font-size: 1.18rem;
  margin-bottom: 0.4em;
  font-weight: 800;
  color: var(--heading-color);
}
.featured-card h3 a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.17s;
}
.featured-card h3 a:hover {
  color: var(--accent-dark, var(--orange, #d97706));
}
.featured-card p {
  font-size: 1.04em;
  color: var(--text-main);
  margin: 0.3em 0 0.8em;
  font-weight: 500;
  opacity: 0.95;
}
.card-footer {
  margin-top: auto;
  text-align: center;
}
.read-more {
  display: inline-block;
  padding: 0.62em 2em;
  font-size: 1.09em;
  font-weight: 700;
  background: var(--accent);
  color: var(--bg-page);
  border: 2px solid var(--accent);
  border-radius: 2em;
  transition: background 0.17s, color 0.17s;
}
.read-more:hover,
.read-more:focus {
  background: var(--bg-page);
  color: var(--accent);
}

/*=====================================
  Quick Tools Section (Icon Grid)
=====================================*/
.tool-grid {
  margin: 1.5em 0 2.2em;
  text-align: center;
}
.tools-title {
  text-align: center;
  margin-bottom: 1.2em;
  font-size: 1.55em;
  font-weight: 900;
  letter-spacing: 0.01em;
  color: var(--accent);
}
@media (max-width: 600px) {
  .tools-title {
    font-size: 1.13rem;
    padding: 0.12em 0.6em;
  }
}

.quicktools-icon-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2em;
  margin-top: 0.7em;
}
@media (max-width: 700px) {
  .quicktools-icon-grid {
    grid-template-columns: 1fr;
  }
}
.quicktool {
  background: var(--bg-panel);
  border-radius: 0.6em;
  box-shadow: 0 2px 18px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1em 0.6em;
  min-height: 110px;
}
.qt-icon {
  font-size: 2em;
  margin-bottom: 0.2em;
}
.qt-title {
  display: inline-block;
  padding: 0.62em 2em;
  font-size: 1.09em;
  font-weight: 700;
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 2em;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background 0.17s, color 0.17s;
  cursor: pointer;
  margin: 0.18em 0;
}
.qt-title:hover,
.qt-title:focus {
  background: var(--accent);
  color: #fff;
}

/* PAR Simulator Form */
.par-sim-form {
  display: grid;
  gap: 1em;
  max-width: 400px;
  margin: 1em auto 2em;
}
.par-sim-form .form-group {
  display: flex;
  flex-direction: column;
}
.par-sim-form label {
  font-weight: 600;
  margin-bottom: 0.3em;
  color: var(--text-main);
}
.par-sim-form input {
  padding: 0.5em;
  border: 1px solid var(--accent-light, #ccc);
  border-radius: 4px;
  font-size: 1em;
}
.par-sim-form button {
  padding: 0.6em 1.2em;
  background: var(--accent);
  color: var(--bg-page);
  border: none;
  border-radius: 4px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.par-sim-form button:hover {
  background: var(--heading-color);
}
.ppfd-result {
  margin-top: 0.8em;
  font-size: 1.1em;
  text-align: center;
}
.ppfd-result.error {
  color: red;
}

#back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: none;
  background: var(--accent);       /* use your zone’s accent */
  color: #fff;
  padding: 0.6rem 0.8rem;
  border-radius: 0.4rem;
  text-decoration: none;
  font-size: 0.9rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  z-index: 1000;
  transition: opacity 0.3s, background 0.3s;
}

#back-to-top:hover {
  background: var(--accent-dark);  /* deeper tone on hover */
}


