/* ====================================================================
   St. Maarten Agri-Portal — homepage styles
   Palette taken from the live site:
     --green      #1E2926  (dark background)
     --cream      #FFFBF4  (light sections)
     --olive      #6A6E49  (Farmers card)
     --terracotta #975F44  (Retailers card)
     --btn        #888D5E  (primary buttons)
     --gold       #D3D389  (accent / active nav)
   Fonts: Aboreto (display headings) + Golos Text (body/nav)
   ==================================================================== */

:root {
  --green: #2E5A39;
  --green-dark: #1F3E29;
  --footer: #285133;
  --cream: #FFFBF4;
  --olive: #6A6E49;
  --terracotta: #975F44;
  --btn: #888D5E;
  --btn-dark: #6A6E49;
  --gold: #D3D389;
  --text-light: #FFFBF4;
  --text-dark: #1E2926;
  --radius: 999px;
  --maxw: 1240px;
  --header-h: 112px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Golos Text", Arial, Helvetica, sans-serif;
  color: var(--text-dark);
  background: var(--green);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { text-decoration: none; color: inherit; }

h1, h2, h3 {
  font-family: "Aboreto", "Golos Text", serif;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}
.btn-outline {
  background: transparent;
  border-color: rgba(255, 251, 244, 0.7);
  color: var(--text-light);
}
.btn-outline:hover { background: var(--text-light); color: var(--green); }

.btn-pill {
  background: transparent;
  border-color: var(--text-light);
  color: var(--text-light);
}
.btn-pill:hover { background: var(--text-light); color: var(--green); }
.btn-pill-dark {
  background: var(--btn);
  border-color: var(--btn);
  color: #fff;
}
.btn-pill-dark:hover { background: var(--btn-dark); border-color: var(--btn-dark); }

.btn-white {
  background: #fff;
  color: var(--green);
  border-color: #fff;
  font-weight: 600;
}
.btn-white:hover { background: transparent; color: #fff; }

/* ==================================================================
   HEADER / TOP MENU
   ================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--green);
  border-bottom: 1px solid rgba(255, 251, 244, 0.06);
}
.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand-logo { height: 60px; width: auto; }

.primary-nav .nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem 1.4rem;
}
.primary-nav a {
  color: var(--text-light);
  font-size: 0.98rem;
  font-weight: 500;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.primary-nav a:hover { color: var(--gold); }
.primary-nav a.is-active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}
.btn-login {
  background: var(--btn);
  color: #fff !important;
  padding: 0.5rem 1.5rem !important;
  border-radius: var(--radius);
  border-bottom: none !important;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.btn-login:hover { background: var(--gold); color: var(--green) !important; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 6px;
  cursor: pointer;
}
.nav-toggle span {
  width: 26px;
  height: 3px;
  background: var(--text-light);
  border-radius: 2px;
  transition: 0.25s;
}

/* ==================================================================
   HERO
   ================================================================== */
.hero {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: center;
  background: var(--green) url('../assets/img/bg-5.jpg') center/cover no-repeat;
  overflow: hidden;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(30,41,38,0.92) 0%, rgba(30,41,38,0.55) 55%, rgba(30,41,38,0.35) 100%);
}
.hero-content {
  position: relative;
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}
.hero-title {
  color: rgba(255, 251, 244, 0.55);
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.hero-tagline {
  color: rgba(255, 251, 244, 0.75);
  max-width: 440px;
  font-size: 1.05rem;
  margin-bottom: 2.2rem;
}

/* ==================================================================
   SERVICE CARDS
   ================================================================== */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.card {
  padding: 3.5rem 2rem;
  text-align: center;
  color: var(--text-light);
}
.card-olive { background: var(--olive); }
.card-terracotta { background: var(--terracotta); }
.card-cream { background: var(--cream); color: var(--text-dark); }
.card-title {
  font-size: 1.9rem;
  margin-bottom: 1.5rem;
}
.card p {
  max-width: 320px;
  margin: 1.5rem auto 2rem;
  font-size: 1rem;
}
/* Hexagon image mask */
.hex {
  width: 210px;
  height: 240px;
  margin: 0 auto;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  overflow: hidden;
}
.hex img { width: 100%; height: 100%; object-fit: cover; }

/* ==================================================================
   PRODUCT CATEGORIES
   ================================================================== */
.categories {
  background: var(--green);
  padding: 4.5rem 1.5rem;
}
.categories-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.category {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.category::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(30,41,38,0) 40%, rgba(30,41,38,0.85) 100%);
  transition: background 0.25s;
}
.category:hover::after { background: linear-gradient(180deg, rgba(30,41,38,0.2) 0%, rgba(30,41,38,0.9) 100%); }
.category-label {
  position: relative;
  z-index: 2;
  color: #fff;
  font-family: "Aboreto", serif;
  font-size: 1.4rem;
  padding: 1.2rem;
  width: 100%;
  text-align: center;
}

/* ==================================================================
   RESEARCH
   ================================================================== */
.research {
  background: var(--cream);
  padding: 5rem 1.5rem;
}
.research-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.section-title { font-size: 2.6rem; margin-bottom: 0.5rem; }
.section-subtitle {
  font-family: "Golos Text", sans-serif;
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--olive);
  margin-bottom: 1.2rem;
}
.research-text p { max-width: 460px; margin-bottom: 2rem; }
.research-media {
  position: relative;
  min-height: 420px;
}
.research-img {
  position: absolute;
  border-radius: 6px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
  width: 60%;
}
.research-img-1 { top: 0; right: 0; z-index: 1; }
.research-img-2 { bottom: 0; left: 0; z-index: 2; }

/* ==================================================================
   FEATURE SPLIT
   ================================================================== */
.feature-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.feature {
  position: relative;
  min-height: 460px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
}
.feature-overlay {
  position: absolute;
  inset: 0;
  background: rgba(30, 41, 38, 0.35);
}
.feature-body {
  position: relative;
  z-index: 2;
  color: #fff;
  padding: 2rem 3rem;
  max-width: 520px;
}
.feature-title {
  font-size: clamp(2rem, 3.5vw, 3rem);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.feature-body p { margin-bottom: 1.6rem; font-weight: 500; }

/* ==================================================================
   WIDE BANNER
   ================================================================== */
.banner {
  position: relative;
  min-height: 420px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
}
.banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(30,41,38,0.5), rgba(30,41,38,0.15));
}
.banner-inner {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 3rem 1.5rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.banner-title {
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.2rem);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  max-width: 620px;
}
.banner-text p { color: rgba(255,255,255,0.9); max-width: 520px; font-weight: 500; }

/* ==================================================================
   FOOTER
   ================================================================== */
.site-footer {
  background: var(--footer);
  color: var(--text-light);
  padding: 2rem 1.5rem;
  border-top: 3px solid var(--olive);
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}
.footer-logo { height: 70px; margin: 0; flex: 0 0 auto; }
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0;
}
.footer-links a { font-weight: 600; }
.footer-links a:hover { color: var(--gold); }
.social {
  display: inline-flex;
  color: var(--text-light);
  margin-left: auto;
}
.social:hover { color: var(--gold); }

.footer-heading {
  font-size: 1.7rem;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.newsletter-form {
  display: flex;
  border: 1px solid rgba(255, 251, 244, 0.3);
  max-width: 560px;
  border-radius: 4px;
  overflow: hidden;
}
.newsletter-form input {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 1.1rem 1.2rem;
  color: var(--text-light);
  font-family: inherit;
  font-size: 1rem;
}
.newsletter-form input::placeholder { color: rgba(255, 251, 244, 0.5); }
.newsletter-form input:focus { outline: none; }
.btn-newsletter {
  background: var(--btn);
  color: #fff;
  border: 0;
  padding: 0 2rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-newsletter:hover { background: var(--gold); color: var(--green); }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--green-dark);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}
.to-top:hover { background: var(--btn); }

/* ==================================================================
   RESPONSIVE
   ================================================================== */
@media (max-width: 1080px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(320px, 82vw);
    background: var(--green-dark);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    padding: 5rem 1.5rem 2rem;
    overflow-y: auto;
    box-shadow: -8px 0 30px rgba(0,0,0,0.4);
  }
  .primary-nav.open { transform: translateX(0); }
  .primary-nav .nav-list { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0.25rem; }
  .primary-nav a { display: block; width: 100%; text-align: left; padding: 0.7rem 0; font-size: 1.05rem; }
  .nav-login { margin-top: 1rem; }
  .btn-login { display: inline-flex; }
  body.nav-open { overflow: hidden; }
}

@media (max-width: 860px) {
  .cards { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .research-inner { grid-template-columns: 1fr; }
  .research-media { min-height: 360px; margin-top: 1rem; }
  .feature-split { grid-template-columns: 1fr; }
  .banner-inner { flex-direction: column; align-items: flex-start; }
  .footer-inner { grid-template-columns: 1fr; gap: 2.5rem; }
}

@media (max-width: 480px) {
  .categories-grid { grid-template-columns: 1fr; }
  .hero { min-height: 520px; }
  .feature-body { padding: 2rem 1.5rem; }
  .newsletter-form { flex-direction: column; }
  .btn-newsletter { padding: 0.9rem; }
}

/* ==================================================================
   NAV DROPDOWN  (Agriculture Practices submenu)
   ================================================================== */
.has-submenu { position: relative; }
.submenu { list-style: none; margin: 0; padding: 0; }
.has-submenu > a::after {
  content: "\25BE"; /* ▾ */
  font-size: 0.7em;
  margin-left: 0.35rem;
  opacity: 0.85;
}

/* Desktop: hover dropdown */
@media (min-width: 1081px) {
  .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 250px;
    background: var(--green-dark);
    padding: 0.4rem 0;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
    z-index: 120;
  }
  .has-submenu:hover .submenu,
  .has-submenu:focus-within .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .submenu li a {
    display: block;
    padding: 0.6rem 1.2rem;
    white-space: nowrap;
    border-bottom: 0;
    font-weight: 500;
  }
  .submenu li a:hover { color: var(--gold); }
}

/* Mobile: show submenu indented under its parent */
@media (max-width: 1080px) {
  .submenu { padding-left: 1rem; margin-top: 0.15rem; }
  .submenu li a {
    display: block;
    width: 100%;
    padding: 0.55rem 0;
    font-size: 1rem;
    opacity: 0.92;
    border-bottom: 0;
  }
}
