/* ===========================================================================
   SOZO - theme refinements v2
   Layered on top of style.css: typography, perfectly aligned navigation,
   off-canvas mobile menu, refined cards and the AI assistant redesign.
   =========================================================================== */

:root {
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Plus Jakarta Sans", "Manrope", system-ui, sans-serif;
  --nav-h: 74px;
}

body { font-family: var(--font-body); font-size: 1rem; letter-spacing: -.005em; }
h1, h2, h3, h4, h5, .display-title { font-family: var(--font-display); }
.lead { font-weight: 500; }

/* ------------------------------------------------------------- top bar --- */
.topbar { padding: .5rem 0; }
.topbar .container { gap: 1rem; }
.topbar-right { display: flex; align-items: center; gap: .35rem; white-space: nowrap; }
.topbar-login { font-weight: 700; }
.topbar-login:hover { color: var(--yellow-400); }

/* ==========================================================================
   Navigation - single horizontal line on desktop, never wraps
   ========================================================================== */
.site-header { z-index: 1035; }
.navbar { padding: 0; }

.nav-shell {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: clamp(.5rem, 1.6vw, 1.5rem);
  min-height: var(--nav-h);
}

.navbar-brand { display: flex; align-items: center; margin: 0; padding: 0; flex: 0 0 auto; }
.navbar-brand img { display: block; height: 40px; width: auto; }

.nav-main { flex: 1 1 auto; min-width: 0; justify-content: center; }

.nav-line {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: clamp(.05rem, .5vw, .45rem);
  margin: 0;
  padding: 0;
  list-style: none;
  width: 100%;
  justify-content: center;
}
.nav-line > .nav-item { flex: 0 0 auto; }
.nav-line .nav-link {
  display: flex;
  align-items: center;
  gap: .3rem;
  white-space: nowrap;
  line-height: 1.2;
  padding: .55rem clamp(.4rem, .9vw, .8rem);
  font-size: clamp(.83rem, .92vw, .95rem);
  font-weight: 700;
  border-radius: 10px;
}
.nav-line .nav-link::after { left: .55rem; right: .55rem; bottom: .18rem; }
.nav-line .dropdown-toggle::after {
  margin-left: .15rem; border-top-width: .3em; opacity: .55;
  transition: transform .2s var(--ease);
}
.nav-line .dropdown.show .dropdown-toggle::after { transform: rotate(180deg); }
.nav-line .nav-link:focus-visible { outline-offset: -2px; }

/* dropdowns open on hover for pointer devices, click still works */
@media (hover: hover) and (min-width: 1200px) {
  .nav-line .dropdown:hover > .dropdown-menu { display: block; }
  .nav-line .dropdown > .dropdown-menu { margin-top: 0; }
}
.dropdown-menu { min-width: 230px; }

/* action cluster: vertically centred, evenly spaced */
.nav-actions {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex: 0 0 auto;
  margin-left: auto;
}
.nav-icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  height: 44px; min-width: 44px; padding: 0 .7rem;
  border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--green-900); font-weight: 700; font-size: .95rem;
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.nav-icon-btn:hover { background: var(--green-100); border-color: var(--green-500); color: var(--green-800); }
.lang-btn span { font-size: .8rem; letter-spacing: .04em; }
.btn-cta {
  height: 44px; display: inline-flex; align-items: center; gap: .45rem;
  padding: 0 1.15rem; font-size: .92rem; white-space: nowrap;
}
.btn-cta:hover { transform: translateY(-1px); }

/* expandable search bar */
.header-search-bar {
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.98);
  padding: .75rem 0;
  animation: dropIn .2s var(--ease);
}
.header-search { position: relative; display: flex; width: 100%; }
.header-search .form-control { height: 46px; border-radius: 999px 0 0 999px; border-right: 0; min-width: 0; flex: 1 1 auto; }
.header-search .btn-search { height: 46px; display: inline-flex; align-items: center; justify-content: center; }

@media (max-width: 1199.98px) {
  .nav-shell { min-height: 64px; }
  .navbar-brand img { height: 34px; }
}

/* -------------------------------------------------------- mobile menu --- */
.mobile-nav { width: min(360px, 88vw); }
.mobile-nav .offcanvas-header { border-bottom: 1px solid var(--line); }
.mobile-nav-list { display: block; }
.mobile-nav-list .nav-link {
  display: block; padding: .75rem .25rem; font-size: 1rem;
  border-bottom: 1px solid var(--line);
}
.mobile-nav-list .nav-link::after { display: none; }
.mobile-nav-list .dropdown-menu {
  display: block; position: static !important; border: 0; box-shadow: none;
  padding: .2rem 0 .5rem .6rem; animation: none; transform: none !important;
}
.mobile-nav-list .dropdown-item { padding: .45rem .6rem; font-size: .92rem; color: var(--muted); }
.mobile-lang-label { font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.lang-pill {
  border: 1px solid var(--line); border-radius: 999px; padding: .35rem .9rem;
  font-size: .85rem; font-weight: 700; color: var(--green-800);
}
.lang-pill.active, .lang-pill:hover { background: var(--green-100); border-color: var(--green-500); }
.mobile-contact li { color: var(--muted); }
.mobile-contact a { color: var(--green-800); }

/* touch targets */
@media (max-width: 991.98px) {
  .btn, .nav-icon-btn { min-height: 44px; }
}

/* ------------------------------------------------------ polish & depth --- */
.feature-card, .product-card, .news-card { border-radius: 18px; }
.product-card:hover, .news-card:hover, .feature-card:hover { box-shadow: var(--shadow-lg); }
.section-head h2 { letter-spacing: -.025em; }
.btn:focus-visible { outline: 3px solid var(--yellow-500); outline-offset: 3px; }

/* media placeholders: reserve space, avoid layout shift */
.media-skeleton {
  background: linear-gradient(100deg, #eef4f0 30%, #f7fbf8 50%, #eef4f0 70%);
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ==========================================================================
   AI assistant (Farmer Assistant) - floating, modern, branded
   ========================================================================== */
.chat-widget { right: 20px; bottom: 20px; }

.chat-launcher {
  position: relative;
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .8rem 1.2rem .8rem .85rem;
  border: 0; border-radius: 999px; color: #fff; font-weight: 800;
  background: linear-gradient(120deg, var(--green-700), var(--green-500) 60%, var(--blue-500));
  box-shadow: 0 16px 36px rgba(15, 61, 34, .32);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.chat-launcher:hover { transform: translateY(-3px); box-shadow: 0 20px 44px rgba(15, 61, 34, .4); }
.chat-launcher .avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.2); font-size: 1.05rem;
}
.chat-launcher .chat-toggle-label { font-size: .9rem; }
.chat-launcher .pulse {
  position: absolute; inset: 0; border-radius: 999px;
  box-shadow: 0 0 0 0 rgba(39,160,90,.55); animation: chatPulse 2.6s infinite;
  pointer-events: none;
}
@keyframes chatPulse {
  0%   { box-shadow: 0 0 0 0 rgba(39,160,90,.5); }
  70%  { box-shadow: 0 0 0 18px rgba(39,160,90,0); }
  100% { box-shadow: 0 0 0 0 rgba(39,160,90,0); }
}
.chat-badge {
  position: absolute; top: -4px; right: -2px; min-width: 18px; height: 18px;
  border-radius: 999px; background: var(--yellow-500); color: #23200a;
  font-size: .7rem; font-weight: 800; display: grid; place-items: center; padding: 0 5px;
}
.chat-teaser {
  position: absolute; right: 0; bottom: calc(100% + 12px); width: min(260px, 78vw);
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-md); padding: .75rem .9rem; font-size: .86rem; color: var(--ink);
  animation: chatIn .3s var(--ease);
}
.chat-teaser button {
  position: absolute; top: 4px; right: 6px; border: 0; background: transparent;
  color: var(--muted); font-size: .8rem; line-height: 1;
}

.chat-panel {
  width: min(400px, calc(100vw - 24px));
  height: min(600px, 78vh);
  border-radius: 22px; border: 1px solid var(--line);
}
@media (max-width: 480px) {
  .chat-widget { right: 12px; bottom: 12px; left: 12px; }
  .chat-panel { width: 100%; height: min(78vh, 620px); }
  .chat-launcher { float: right; }
}
.chat-head {
  background: linear-gradient(120deg, var(--green-800), var(--green-600) 70%, var(--blue-700));
  padding: .9rem 1rem; gap: .7rem;
}
.chat-head .chat-avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.18); font-size: 1.15rem; flex: 0 0 auto;
}
.chat-head-meta { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.chat-head strong { font-size: .98rem; }
.chat-status { display: inline-flex; align-items: center; gap: .35rem; font-size: .74rem; opacity: .9; }
.chat-status i { width: 7px; height: 7px; border-radius: 50%; background: #7bec9f; display: inline-block; }
.chat-head-actions { display: flex; align-items: center; gap: .2rem; }
.chat-head-actions button { background: transparent; border: 0; color: #fff; padding: .3rem .4rem; border-radius: 8px; }
.chat-head-actions button:hover { background: rgba(255,255,255,.15); }
.chat-lang-select {
  background: rgba(255,255,255,.16); color: #fff; border: 0; border-radius: 8px;
  font-size: .74rem; padding: .2rem .35rem;
}
.chat-lang-select option { color: #14231a; }

.chat-log { padding: 1rem .9rem; gap: .55rem; scroll-behavior: smooth; }
.chat-msg { max-width: 88%; font-size: .9rem; box-shadow: 0 1px 3px rgba(15,61,34,.05); }
.chat-msg.bot { border-radius: 16px 16px 16px 5px; }
.chat-msg.user { border-radius: 16px 16px 5px 16px; }
.chat-msg a { text-decoration: underline; }
.chat-msg.user a { color: #fff; }
.chat-time { font-size: .68rem; color: var(--muted); align-self: flex-end; margin-top: -.35rem; }

/* rich cards */
.chat-cards { display: grid; gap: .5rem; align-self: stretch; }
.chat-card {
  display: flex; gap: .65rem; align-items: center; background: #fff;
  border: 1px solid var(--line); border-radius: 14px; padding: .5rem; text-decoration: none;
  transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.chat-card:hover { transform: translateY(-2px); border-color: var(--green-500); }
.chat-card img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; background: var(--green-100); }
.chat-card .cc-body { min-width: 0; }
.chat-card .cc-title { font-weight: 700; font-size: .86rem; color: var(--ink); display: block; }
.chat-card .cc-sub { font-size: .76rem; color: var(--muted); display: block; }
.chat-card .cc-tag {
  font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--blue-700);
}

/* quick replies + actions */
.chat-quick { padding: .5rem .75rem .25rem; gap: .4rem; }
.chat-quick button { font-size: .78rem; padding: .3rem .75rem; transition: background .2s var(--ease); }
.chat-actions { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 .75rem .4rem; }
.chat-actions a, .chat-actions button {
  display: inline-flex; align-items: center; gap: .3rem;
  border-radius: 999px; padding: .3rem .75rem; font-size: .78rem; font-weight: 700;
  background: var(--green-700); color: #fff; border: 0;
}
.chat-actions a:hover, .chat-actions button:hover { background: var(--green-800); color: #fff; }
.chat-actions .ghost { background: #fff; color: var(--green-700); border: 1px solid var(--green-500); }
.chat-actions .ghost:hover { background: var(--green-100); color: var(--green-800); }

/* lead capture form inside the chat */
.chat-lead { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: .8rem; display: grid; gap: .5rem; }
.chat-lead input, .chat-lead textarea { font-size: .85rem; border-radius: 10px; }
.chat-lead .btn { padding: .45rem .9rem; font-size: .85rem; }

.chat-form { padding: .7rem; gap: .45rem; align-items: flex-end; }
.chat-form textarea {
  resize: none; max-height: 110px; border-radius: 14px; font-size: .9rem; padding: .6rem .8rem;
}
.chat-form .btn { border-radius: 50%; width: 42px; height: 42px; padding: 0; display: grid; place-items: center; flex: 0 0 auto; }
.chat-foot-note { font-size: .68rem; color: var(--muted); text-align: center; padding: 0 .75rem .5rem; }

@media (prefers-reduced-motion: reduce) {
  .chat-launcher .pulse, .media-skeleton { animation: none; }
  .chat-log { scroll-behavior: auto; }
}

/* --------------------------------------------------------------- print --- */
@media print {
  .site-header, .topbar, .chat-widget, .back-to-top, .site-footer form { display: none !important; }
}

/* --------------------------------------------------- related content --- */
.related-block .section-head { margin-bottom: 1.5rem; }
.related-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface, #fff);
  border: 1px solid rgba(15, 42, 30, .08);
  border-radius: var(--radius-lg, 16px);
  box-shadow: 0 1px 2px rgba(16, 40, 28, .04);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.related-card:hover, .related-card:focus-within {
  transform: translateY(-4px);
  border-color: rgba(28, 122, 66, .35);
  box-shadow: 0 14px 32px rgba(16, 40, 28, .12);
}
.related-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #eef2ee; }
.related-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.related-card:hover .related-media img { transform: scale(1.05); }
.related-body { padding: 1rem 1.1rem 1.15rem; display: flex; flex-direction: column; gap: .45rem; }
.related-type {
  display: inline-flex; align-items: center; gap: .35rem; align-self: flex-start;
  font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--brand-700, #1c7a42);
  background: rgba(28, 122, 66, .1);
  padding: .2rem .55rem; border-radius: 999px;
}
.related-title { font-size: 1.02rem; line-height: 1.35; margin: 0; }
.related-title a { color: inherit; text-decoration: none; }
.related-title a:hover, .related-title a:focus-visible { text-decoration: underline; }
.related-desc { margin: 0; font-size: .88rem; color: var(--muted, #5c6b62); }
@media (prefers-reduced-motion: reduce) {
  .related-card, .related-media img { transition: none; }
  .related-card:hover { transform: none; }
}

/* ===========================================================================
   Seasonal promotion bar, floating WhatsApp button, testimonials carousel
   and the demo-plot locator map.
   =========================================================================== */
.promo-bar {
  position: sticky; top: 0; z-index: 1080;
  background: linear-gradient(100deg, #0f5c31, #1c7a42 55%, #f0a020);
  color: #fff; font-size: .92rem;
}
.promo-bar[hidden] { display: none; }
.promo-bar-inner {
  display: flex; align-items: center; flex-wrap: wrap; gap: .65rem;
  padding: .5rem 1rem; min-height: 44px;
}
.promo-chip {
  display: inline-flex; align-items: center; gap: .35rem;
  background: rgba(255, 255, 255, .18); border-radius: 999px;
  padding: .15rem .6rem; font-weight: 700; font-size: .74rem;
  letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
}
.promo-text { flex: 1 1 240px; margin: 0; font-weight: 600; }
.promo-deadline { font-size: .8rem; opacity: .95; white-space: nowrap; }
.promo-cta {
  color: #0f2a1e; background: #ffd166; border-radius: 999px;
  padding: .3rem .85rem; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.promo-cta:hover, .promo-cta:focus-visible { background: #fff; color: #0f2a1e; }
.promo-close {
  background: transparent; border: 0; color: #fff; line-height: 1;
  padding: .25rem .35rem; border-radius: 6px; opacity: .85;
}
.promo-close:hover { opacity: 1; background: rgba(255, 255, 255, .16); }
.promo-bar a:focus-visible, .promo-close:focus-visible {
  outline: 3px solid #facc15; outline-offset: 2px;
}
@media (max-width: 575.98px) {
  .promo-text { font-size: .84rem; flex-basis: 100%; }
}

/* --------------------------------------------------------- WhatsApp FAB -- */
.whatsapp-fab {
  position: fixed; left: 20px; bottom: 22px; z-index: 1050;
  display: inline-flex; align-items: center; gap: .5rem;
  background: #25d366; color: #06331a; text-decoration: none;
  border-radius: 999px; padding: .7rem .95rem; font-weight: 700;
  box-shadow: 0 12px 28px rgba(6, 51, 26, .28);
  transition: transform .2s ease, box-shadow .2s ease;
}
.whatsapp-fab i { font-size: 1.4rem; line-height: 1; }
.whatsapp-fab:hover, .whatsapp-fab:focus-visible { color: #06331a; transform: translateY(-3px); }
.whatsapp-fab:focus-visible { outline: 3px solid #facc15; outline-offset: 3px; }
.whatsapp-fab-label { font-size: .9rem; }
@media (max-width: 767.98px) {
  .whatsapp-fab { padding: .75rem; left: 14px; bottom: 16px; }
  .whatsapp-fab-label { display: none; }
}
@media (prefers-reduced-motion: reduce) { .whatsapp-fab { transition: none; } }

/* ------------------------------------------------------- testimonials ---- */
.testimonial-viewport { overflow: hidden; }
.testimonial-track {
  display: flex; gap: 1.25rem;
  transition: transform .5s ease;
}
.testimonial-card {
  flex: 0 0 100%; background: var(--surface, #fff);
  border: 1px solid rgba(15, 42, 30, .08); border-radius: 18px;
  padding: 1.5rem; display: flex; flex-direction: column; gap: .9rem;
  box-shadow: 0 8px 24px rgba(16, 40, 28, .06);
}
@media (min-width: 768px) { .testimonial-card { flex-basis: calc(50% - .625rem); } }
@media (min-width: 1200px) { .testimonial-card { flex-basis: calc(33.3333% - .834rem); } }
.testimonial-quote { font-size: 1rem; line-height: 1.6; margin: 0; color: #26382e; }
.testimonial-quote::before { content: '\201C'; font-size: 2rem; line-height: 0; color: #1c7a42; margin-right: .2rem; }
.testimonial-result {
  align-self: flex-start; background: rgba(28, 122, 66, .1); 
  color: #14653a; font-weight: 700; font-size: .8rem;
  border-radius: 999px; padding: .25rem .7rem;
}
.testimonial-person { display: flex; align-items: center; gap: .75rem; margin-top: auto; }
.testimonial-person img {
  width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none;
  border: 2px solid rgba(28, 122, 66, .25);
}
.testimonial-name { font-weight: 700; margin: 0; }
.testimonial-role { margin: 0; font-size: .82rem; color: var(--muted, #5c6b62); }
.testimonial-stars { color: #f0a020; font-size: .85rem; letter-spacing: .1em; }
.testimonial-controls { display: flex; align-items: center; justify-content: center; gap: .5rem; margin-top: 1.5rem; }
.testimonial-controls button {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(15, 42, 30, .15);
  background: #fff; color: #14653a;
}
.testimonial-controls button:hover { background: #14653a; color: #fff; }
.testimonial-controls button:focus-visible { outline: 3px solid #facc15; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .testimonial-track { transition: none; } }

/* -------------------------------------------------------- plot locator --- */
.plot-map { height: 460px; border-radius: 18px; overflow: hidden; z-index: 0; }
.plot-map-filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; margin-bottom: 1rem; }
.plot-map-filters .form-select, .plot-map-filters .form-control { min-width: 190px; }
.plot-locate-note { font-size: .85rem; color: var(--muted, #5c6b62); }
.plot-result-list { max-height: 460px; overflow-y: auto; display: flex; flex-direction: column; gap: .6rem; }
.plot-result {
  width: 100%; text-align: left; background: #fff; border: 1px solid rgba(15, 42, 30, .1);
  border-radius: 14px; padding: .8rem .9rem;
}
.plot-result:hover, .plot-result.active { border-color: #1c7a42; background: rgba(28, 122, 66, .06); }
.plot-result:focus-visible { outline: 3px solid #facc15; outline-offset: 2px; }
.plot-result h3 { font-size: .98rem; margin: 0 0 .2rem; }
.plot-result p { margin: 0; font-size: .82rem; color: var(--muted, #5c6b62); }
