/* =====================================================================
   STYLE-BASE.CSS
   Styles shared ACROSS all/most pages:
   - Color variables, reset, body
   - Navbar (navbar.php is included on every page)
   - Floating AI Chat (also from navbar.php)
   - Footer Contact (contact.php is included in index/about/product/training)
   - .section / .section h2 (used by index.php AND product.php)
   - base .card (used by index.php AND is the base for .product-page .card)
   - .training-btn/.prev-btn/.next-btn (slider buttons, used by product.php
     AND training.php)
   Pages that ONLY need this file (no other page-specific file):
   login.php, accounts.php, admin_dashboard.php, publisher_dashboard.php,
   setup_accounts.php, seedlingdetail.php
   ===================================================================== */

/* ================= DESIGN TOKENS ================= */
:root {
  --forest-900: #16301F;  /* darkest green - headings, active/hover states */
  --forest-700: #2E5233;  /* brand green - buttons, header accents, CTA fills */
  --forest-500: #6FA46A;  /* medium green - nav active state, highlight blocks */
  --sage-200:   #DCEAD3;  /* light sage - card backgrounds, soft sections */
  --sage-100:   #F1F7ED;  /* near-white sage tint - subtle alt backgrounds */
  --white:      #FFFFFF;  /* pure white - cards/panels that need to pop */
  --amber:      #E8A33D;  /* warm accent - CTA highlights, badges */
  --amber-dark: #C9862B;  /* amber hover state */
  --ink:        #20291C;  /* primary text - replaces flat black */
  --ink-soft:   #5B6B54;  /* muted/secondary text - replaces #666/#888/#999 */
  --border-soft:#C9D6C0;  /* subtle borders in green-tinted contexts */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Times New Roman', serif;
  background-color: var(--white);
  overflow-x: hidden;
}

/* ================= NAVBAR ================= */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0px 40px;
  background: var(--sage-200);
  flex-wrap: wrap;
}

.navbar-logo {
  display: flex;
  align-items: center;
}

.navbar-logo img {
  height: 35px;
  width: auto;
}

.navbar a {
  text-decoration: none;
  margin: 0 10px;
  color: var(--ink);
  padding: 6px 12px;
  border-radius: 8px;
  transition: background 0.2s;
}

.navbar a:hover {
  background: rgba(22, 41, 28, 0.10);
}

.navbar a.nav-active {
  background: var(--forest-500);
  color: rgb(0, 0, 0);
  font-weight: bold;
  border-radius: 8px;
}

.nav-divider {
  display: inline-block;
  width: 1px;
  height: 22px;
  background: rgba(22, 41, 28, 0.25);
  margin: 0 8px;
  vertical-align: middle;
}

/* ================= SECTION (dipakai index.php & product.php) ================= */
.section {
  background-color: var(--white);
  padding: 60px 40px;
}

.section h2 {
  text-align: center;
  font-family: 'Times New Roman', serif;
  font-size: 40px;
  margin-bottom: 80px;
}

/* ================= CARD DASAR (dipakai index.php, jadi basis product.php) ================= */
.card {
  background: var(--sage-200);
  padding: 20px;
  border-radius: 20px;
  text-align: center;
  width: 250px;
  height: 320px;
  font-size: 20px;
  box-shadow: 0 6px 18px rgba(22, 48, 31, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 26px rgba(22, 48, 31, 0.14);
}

.card img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
}

/* ================= TOMBOL SLIDER (dipakai product.php & training.php) ================= */
.training-btn,
.prev-btn,
.next-btn {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 3px solid var(--forest-900);
  background: var(--white);
  font-size: 40px;
  cursor: pointer;
  transition: 0.3s;
}

.training-btn:hover,
.prev-btn:hover,
.next-btn:hover {
  background: var(--forest-900);
  color: var(--white);
}

/* ================= BOTTOM CONTACT (footer, from contact.php - included in
   index.php, about.php, product.php, training.php) ================= */
.contact {
  background: var(--white);
  padding: 30px 40px;
  font-family: 'Times New Roman', Times, serif;
  display: flex;
  justify-content: center;
}

.contact-container {
  background: var(--forest-500);
  border-radius: 18px;
  padding: 28px 32px;
  max-width: 1000px;
  width: 100%;
  display: flex;
  gap: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.contact-info {
  flex: 1;
  padding-right: 30px;
  border-right: 1.5px solid rgba(255, 255, 255, 0.35);
}

.contact-info h2 {
  font-size: 28px;
  font-family: 'Times New Roman', serif;
  color: var(--forest-900);
  margin: 0 0 10px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--forest-700);
  display: inline-block;
}

.contact-info p {
  font-size: 15px;
  margin-bottom: 10px;
  line-height: 1.5;
  color: var(--forest-900);
}

.contact-info i {
  font-size: 16px;
  margin-right: 8px;
  color: var(--forest-900);
}

.contact-info a {
  text-decoration: none;
  color: var(--forest-900);
}

.contact-info a:hover {
  text-decoration: underline;
}

.contact-map {
  flex: 1;
  padding-left: 30px;
  display: flex;
  flex-direction: column;
}

.map-label {
  font-family: 'Times New Roman', serif;
  font-size: 14px;
  font-weight: bold;
  color: var(--forest-900);
  margin: 0 0 10px;
}

.contact-map iframe {
  width: 100%;
  height: 220px;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

/* ================= FLOATING AI (from navbar.php - present on every page) ================= */
.ai-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--forest-700);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  box-shadow: 0 4px 15px rgba(22, 41, 28, 0.25);
  z-index: 9999;
  user-select: none;
  transition: box-shadow 0.3s;
}

.ai-float:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.ai-float img {
  width: 35px;
  height: 35px;
  object-fit: contain;
  pointer-events: none;
}

.ai-chatbox {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 320px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  z-index: 9998;
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Times New Roman', serif;
}

.ai-chatbox.open {
  display: flex;
}

.ai-chat-header {
  background: var(--forest-700);
  color: var(--white);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  font-weight: bold;
}

.ai-close {
  background: none;
  border: none;
  color: var(--white);
  font-size: 16px;
  cursor: pointer;
}

.ai-chat-messages {
  padding: 14px;
  height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--sage-100);
}

.ai-msg {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
}

.ai-msg.bot {
  background: var(--sage-100);
  color: var(--forest-900);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

.ai-msg.user {
  background: var(--forest-700);
  color: var(--white);
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

.ai-msg.loading {
  background: var(--sage-100);
  color: var(--ink-soft);
  align-self: flex-start;
  font-style: italic;
}

.ai-chat-input {
  display: flex;
  padding: 10px 12px;
  gap: 8px;
  border-top: 1px solid var(--border-soft);
  background: var(--white);
}

.ai-chat-input input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 20px;
  border: 1px solid var(--sage-200);
  font-size: 14px;
  font-family: 'Times New Roman', serif;
  outline: none;
}

.ai-chat-input input:focus {
  border-color: var(--forest-700);
}

.ai-chat-input button {
  background: var(--forest-700);
  color: var(--white);
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s;
}

.ai-chat-input button:hover {
  background: var(--forest-900);
}

/* ================= RESPONSIVE (shared section) ================= */
@media screen and (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px;
  }

  .navbar div {
    text-align: center;
  }

  .navbar a {
    display: inline-block;
    margin: 5px 10px;
    font-size: 16px;
  }

  .section {
    padding: 50px 20px;
  }

  .section h2 {
    font-size: 32px;
    margin-bottom: 40px;
  }

  .training-btn,
  .prev-btn,
  .next-btn {
    width: 45px;
    height: 45px;
    font-size: 20px;
  }

  .contact {
    padding: 20px 15px;
  }

  .contact-container {
    flex-direction: column;
    gap: 20px;
    padding: 20px;
  }

  .contact-info {
    padding-right: 0;
    border-right: none;
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.35);
    padding-bottom: 20px;
  }

  .contact-info h2 {
    font-size: 24px;
  }

  .contact-info p {
    font-size: 14px;
  }

  .contact-map {
    padding-left: 0;
    width: 100%;
  }

  .contact-map iframe {
    height: 200px;
  }
}
