/* =========================================================
   AgriMilani — modernized styles
   Palette:  #0f7444 primary green | #e1fadc soft bg
             #2e302d dark ink       | #ffffff surface
   Fonts:    Monument Extended (display), centurygothic (body),
             Abys-Regular (brand mark "AGRI")
   ========================================================= */

/* ---------- FONTS ---------- */
@font-face {
  font-family: 'Monument Extended';
  src: url('fonts/Monument Extended Regular 400.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'centurygothic';
  src: url('fonts/centurygothic.ttf') format('opentype');
  font-display: swap;
}
@font-face {
  font-family: 'Abys-Regular';
  src: url('fonts/Abys-Regular.otf') format('opentype');
  font-display: swap;
}

/* ---------- TOKENS ---------- */
:root {
  --green: #0f7444;
  --green-dark: #0b5a34;
  --green-soft: #e1fadc;
  --ink: #2e302d;
  --muted: #5a5f5a;
  --line: #d9e6d5;
  --surface: #ffffff;
  --surface-alt: #f3faef;
  --shadow-sm: 0 2px 6px rgba(15, 116, 68, 0.08);
  --shadow-md: 0 8px 24px rgba(15, 116, 68, 0.12);
  --radius: 10px;
  --nav-h: 96px;      /* top logo bar */
  --subnav-h: 46px;   /* section nav */
}

/* ---------- RESET ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  max-width: 100%;
}
body {
  background: var(--surface);
  color: var(--ink);
  font-family: 'centurygothic', 'Helvetica Neue', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); }

/* ---------- BRAND MARK ---------- */
.agri  { font-family: 'Abys-Regular'; color: var(--green); }
.milani { font-family: 'Monument Extended'; color: var(--ink); }

/* ---------- TOP NAV ---------- */
.nav {
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-h);
  padding: 8px 40px;
  padding-top: calc(8px + env(safe-area-inset-top));
  z-index: 100;
  border-bottom: 1px solid var(--line);
}

.logo-img {
  height: 78px;
  width: auto;
  object-fit: contain;
}

.menu-toggle {
  display: none;
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 26px;
  color: var(--green);
  cursor: pointer;
  border: none;
  background: transparent;
}

/* ---------- SECTION NAV ---------- */
.section-nav {
  background: var(--ink);
  position: fixed;
  top: var(--nav-h);
  left: 0;
  width: 100%;
  z-index: 99;
  border-top: 1px solid #3a3c39;
  border-bottom: 1px solid #3a3c39;
}

.section-nav-inner {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 32px;
  max-width: 1300px;
  margin: 0 auto;
  padding: 12px 24px;
}

.section-nav-inner li a {
  color: #e6f2e2;
  text-decoration: none;
  font-family: 'Monument Extended', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 2px;
  transition: color 0.2s;
}

.section-nav-inner li a:hover {
  color: #9edcb0;
}

/* Push body content below fixed navs */
main { padding-top: calc(var(--nav-h) + var(--subnav-h)); }

/* ---------- HERO / SLIDER ---------- */
#home {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.fullscreen-slider {
  position: relative;
  width: 100%;
}

.slider-container {
  width: 100%;
  position: relative;
  padding-bottom: 52%;   /* aspect ratio */
  overflow: hidden;
  background: #1a1a1a;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.slide.active {
  opacity: 1;
  z-index: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.6;                 /* ~40% transparency for a soft, faded feel */
}

/* Overlay content on hero */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.25) 0%,
    rgba(0, 0, 0, 0.10) 45%,
    rgba(0, 0, 0, 0.40) 100%
  );
  padding: 0 24px;
  pointer-events: none;
}

.hero-content {
  max-width: 780px;
  text-align: center;
  color: #ffffff;
  pointer-events: auto;
}

.hero-content h1 {
  font-family: 'Monument Extended', sans-serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.2;
  margin: 0 0 16px;
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.hero-content p {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: #f4f4f4;
  margin: 0 auto 26px;
  max-width: 620px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

/* Slider controls */
.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  font-size: 18px;
  transition: background 0.2s;
}
.slider-nav:hover { background: rgba(15, 116, 68, 0.75); }
.slider-nav.prev { left: 20px; }
.slider-nav.next { right: 20px; }

.slider-dots {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: all 0.3s ease;
}
.dot.active {
  background: #fff;
  transform: scale(1.25);
}

/* ---------- BUTTONS ---------- */
.cta-group {
  display: inline-flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 12px 26px;
  font-family: 'Monument Extended', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.25s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--green);
  color: #ffffff;
}
.btn-primary:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px);
}
.btn-secondary:hover {
  background: #ffffff;
  color: var(--ink);
  transform: translateY(-2px);
}

/* ---------- SECTIONS ---------- */
.section {
  padding: 90px 60px;
}
.section.alt {
  background: var(--surface-alt);
}

.section h2 {
  font-family: 'Monument Extended', sans-serif;
  color: var(--green);
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  text-align: center;
  margin: 0 0 12px;
  letter-spacing: 0.02em;
}

.section h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--green);
  margin: 14px auto 30px;
  border-radius: 3px;
}

.section-intro,
.section-outro {
  text-align: center;
  color: var(--muted);
  margin-top: 24px;
  font-size: 0.97rem;
}
.section-intro { margin: -10px auto 30px; }

/* Prose block (About) */
.prose-block {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  line-height: 1.75;
  color: var(--ink);
}
.prose-block p + p { margin-top: 16px; }

/* ---------- LIVESTOCK GRID ---------- */
.livestock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
  max-width: 1100px;
  margin: 0 auto;
}

.livestock-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.livestock-media {
  width: 100%;
  height: 260px;
  overflow: hidden;
}
.livestock-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.livestock-card:hover .livestock-media img {
  transform: scale(1.05);
}

.livestock-body {
  padding: 22px 26px 28px;
  text-align: left;
}

.livestock-body h3 {
  font-family: 'Monument Extended', sans-serif;
  color: var(--green);
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.breed-line {
  color: var(--muted);
  margin: 0 0 10px;
  font-size: 0.95rem;
}
.breed-line strong { color: var(--ink); }

/* ---------- WHY US GRID ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 26px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-up:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.card i {
  color: var(--green);
  font-size: 28px;
  margin-bottom: 14px;
}
.card h3 {
  font-family: 'Monument Extended', sans-serif;
  color: var(--ink);
  font-size: 1.05rem;
  margin: 0 0 10px;
}
.card p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

/* ---------- CONTACT ---------- */
.container {
  max-width: 1100px;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 44px;
  box-shadow: var(--shadow-md);
  margin: 0 auto;
}

.container .content {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 30px;
}

.container .content .left-side {
  width: 30%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  padding-right: 20px;
}

.content .left-side::before {
  content: "";
  position: absolute;
  height: 80%;
  width: 1px;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: var(--line);
}

.content .left-side .details {
  margin: 10px 0;
  text-align: center;
  width: 100%;
}

.content .left-side .details i {
  font-size: 26px;
  color: var(--green);
  margin-bottom: 8px;
}

.content .left-side .details .topic {
  font-family: 'Monument Extended', sans-serif;
  font-size: 0.85rem;
  color: var(--ink);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.content .left-side .details .text-one {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.5;
}

.content .left-side .details a {
  color: var(--ink);
  text-decoration: none;
}
.content .left-side .details a:hover { text-decoration: underline; }

.container .content .right-side {
  width: 70%;
}

.content .right-side .topic-text {
  font-family: 'Monument Extended', sans-serif;
  font-size: 1.15rem;
  color: var(--green);
  margin-bottom: 16px;
  letter-spacing: 0.03em;
}

.right-side .input-box {
  width: 100%;
  margin: 10px 0;
}

.right-side .input-box input,
.right-side .input-box textarea {
  width: 100%;
  border: 1px solid var(--line);
  outline: none;
  font-size: 0.95rem;
  font-family: 'centurygothic', sans-serif;
  background: #ffffff;
  border-radius: 6px;
  padding: 14px 16px;
  color: var(--ink);
  resize: none;
  transition: border 0.2s, box-shadow 0.2s;
}
.right-side .input-box input:focus,
.right-side .input-box textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(15, 116, 68, 0.12);
}

.right-side .message-box textarea {
  min-height: 130px;
  padding-top: 12px;
}

.right-side .button {
  display: block;
  margin-top: 14px;
}

.green-button {
  background: var(--green);
  color: #ffffff;
  font-family: 'Monument Extended', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 12px 26px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.green-button:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

#formMessage {
  margin-top: 14px;
  font-size: 0.92rem;
  color: var(--green);
}

/* ---------- ORDER FORM ---------- */
.order-container {
  max-width: 900px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow-md);
}

.order-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.order-form .input-box {
  width: 100%;
  margin: 10px 0;
  display: flex;
  flex-direction: column;
}

.order-form .input-box label {
  font-family: 'Monument Extended', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 6px;
}

.order-form .input-box input,
.order-form .input-box select,
.order-form .input-box textarea {
  width: 100%;
  border: 1px solid var(--line);
  outline: none;
  font-size: 0.95rem;
  font-family: 'centurygothic', sans-serif;
  background: #ffffff;
  border-radius: 6px;
  padding: 12px 14px;
  color: var(--ink);
  transition: border 0.2s, box-shadow 0.2s;
}

.order-form .input-box select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%230f7444' d='M6 8L0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.order-form .input-box textarea {
  min-height: 110px;
  resize: vertical;
}

.order-form .input-box input:focus,
.order-form .input-box select:focus,
.order-form .input-box textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(15, 116, 68, 0.12);
}

.order-form .button {
  margin-top: 12px;
}

#orderMessage {
  margin-top: 14px;
  font-size: 0.92rem;
  color: var(--green);
}

/* ---------- TRUST BAR ---------- */
.trust-bar {
  background: var(--green);
  color: #ffffff;
  padding: 12px 24px;
}
.trust-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 14px;
  max-width: 1300px;
  margin: 0 auto;
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.trust-title {
  font-family: 'Monument Extended', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.trust-divider { opacity: 0.5; }

/* ---------- FOOTER ---------- */
footer {
  padding: 22px;
  text-align: center;
  background: var(--ink);
  color: #d9d9d9;
  font-size: 0.85rem;
}

/* ---------- ANIMATIONS ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in.show {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- HONEYPOT (anti-spam) ----------
   Positioned off-screen instead of display:none so bots still see it,
   but sighted users and screen readers ignore it (aria-hidden). */
.hp-field {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* ---------- CLOUDFLARE TURNSTILE ---------- */
.turnstile-wrap {
  margin: 14px 0 4px;
  min-height: 0;
  display: flex;
  justify-content: flex-start;
}
.turnstile-wrap:empty { display: none; }
.turnstile-wrap iframe { max-width: 100%; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .container .content {
    flex-direction: column-reverse;
    gap: 30px;
  }
  .container .content .left-side,
  .container .content .right-side {
    width: 100%;
    padding: 0;
  }
  .content .left-side {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  .content .left-side::before { display: none; }
  .content .left-side .details {
    flex: 1 1 200px;
  }
  .container { padding: 30px 22px; }

  .order-form .form-row { grid-template-columns: 1fr; gap: 0; }
  .order-container { padding: 28px 22px; }
}

@media (max-width: 768px) {
  :root {
    --nav-h: 78px;
    --subnav-h: 0px;   /* nav hidden on mobile — drawer instead */
  }

  body { font-size: 16px; }

  .logo-img { height: 60px; }

  .menu-toggle { display: block; }

  /* Turn the section nav into a mobile drawer */
  .section-nav {
    top: var(--nav-h);
    background: var(--surface);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    height: auto;
    transform: translateY(-120%);
    transition: transform 0.3s ease;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  }
  .section-nav.active {
    transform: translateY(0);
  }
  .section-nav-inner {
    flex-direction: column;
    gap: 0;
    padding: 6px 0;
  }
  .section-nav-inner li {
    width: 100%;
    text-align: center;
    border-bottom: 1px solid var(--line);
  }
  .section-nav-inner li:last-child { border-bottom: 0; }
  .section-nav-inner li a {
    display: block;
    padding: 14px 16px;
    color: var(--green);
  }

  main { padding-top: var(--nav-h); }

  .slider-container { padding-bottom: 75%; }

  .slider-nav {
    width: 38px;
    height: 38px;
    font-size: 15px;
  }
  .slider-nav.prev { left: 10px; }
  .slider-nav.next { right: 10px; }

  .section { padding: 60px 22px; }

  .livestock-media { height: 220px; }

  .trust-bar-inner {
    flex-direction: column;
    white-space: normal;
    gap: 6px;
    font-size: 0.75rem;
  }
  .trust-divider { display: none; }
}

@media (max-width: 480px) {
  .hero-content h1 { font-size: 1.5rem; }
  .hero-content p  { font-size: 0.95rem; }
  .btn-primary, .btn-secondary { padding: 10px 20px; font-size: 0.78rem; }
}
