/* ============================================================
   HBI AGRO EXPORT – SHARED RESPONSIVE STYLESHEET
   ============================================================ */

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

:root {
  --green-dark:   #1a4a2e;
  --green-mid:    #2d6a3f;
  --green-accent: #4CAF50;
  --gold-btn:     #d4a843;
  --gold:         #c9a84c;
  --white:        #ffffff;
  --off-white:    #f7f8f5;
  --text-dark:    #1c1c1c;
  --text-muted:   #666;
  --border:       #e0e0e0;
}

body { font-family: 'Inter', sans-serif; color: var(--text-dark); background: var(--white); }

/* ── TOP BAR ── */
.topbar {
  background: var(--green-dark);
  color: var(--white);
  padding: 8px 40px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
  font-size: 13px;
}
.topbar a { color: var(--white); text-decoration: none; }
.topbar .socials { display: flex; gap: 8px; }
.topbar .socials a {
  width: 26px; height: 26px;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; transition: background .2s;
}
.topbar .socials a:hover { background: rgba(255,255,255,0.2); }

/* ── NAVBAR ── */
nav {
  background: var(--white);
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 200;
}
.logo {
  background: var(--green-dark);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-links { display: flex; list-style: none; }
.nav-links li a {
  display: block;
  padding: 22px 16px;
  text-decoration: none;
  color: var(--text-dark);
  font-size: 14px; font-weight: 500;
  position: relative; transition: color .2s;
  white-space: nowrap;
}
.nav-links li a:hover, .nav-links li a.active { color: var(--green-mid); }
.nav-links li a.active::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 6px; height: 6px; background: var(--green-accent); border-radius: 50%;
}
.nav-links li.has-dropdown { position: relative; }
.nav-links li.has-dropdown .dropdown {
  display: none; position: absolute; top: 100%; left: 0;
  background: var(--white); box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  min-width: 180px; z-index: 300;
}
.nav-links li.has-dropdown:hover .dropdown { display: block; }
.nav-links li.has-dropdown .dropdown a { padding: 12px 20px; display: block; font-size: 13px; border-bottom: 1px solid var(--border); }
.nav-links li.has-dropdown > a::after { content: ' ↓'; font-size: 10px; }

/* HAMBURGER */
.hamburger {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: 8px; flex-direction: column; gap: 5px;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--text-dark); border-radius: 2px;
  transition: all .3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* MOBILE NAV DRAWER */
.mobile-nav {
  display: flex;
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: var(--white);
  z-index: 190;
  flex-direction: column;
  padding: 80px 32px 40px;
  overflow-y: auto;
  visibility: hidden;
}
.mobile-nav.open { visibility: visible; }
.mobile-nav a {
  display: block;
  padding: 16px 0;
  text-decoration: none;
  color: var(--text-dark);
  font-size: 18px; font-weight: 500;
  border-bottom: 1px solid var(--border);
  transition: color .2s;
}
.mobile-nav a:hover { color: var(--green-mid); }
.mobile-nav .sub-link { padding-left: 20px; font-size: 15px; color: var(--text-muted); }
.mobile-nav .close-btn {
  position: absolute; top: 20px; right: 24px;
  background: none; border: none; font-size: 28px;
  cursor: pointer; color: var(--text-dark);
}

/* ── SECTION COMMON ── */
section { padding: 80px 40px; }
.container { max-width: 1100px; margin: 0 auto; }
.section-label {
  font-size: 11px; font-weight: 600; letter-spacing: 3px;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 36px; color: var(--green-dark);
  margin-bottom: 16px; line-height: 1.3;
}
.section-title span { color: var(--text-dark); }

/* ── PAGE HERO ── */
.page-hero { background: var(--green-dark); padding: 60px 40px; text-align: center; color: white; }
.page-hero h1 { font-family: 'Playfair Display', serif; font-size: 40px; margin-bottom: 12px; }
.breadcrumb { font-size: 13px; color: rgba(255,255,255,0.7); }
.breadcrumb a { color: var(--green-accent); text-decoration: none; }

/* ── BUTTONS ── */
.btn-primary {
  display: inline-block; padding: 13px 36px;
  background: var(--green-dark); color: var(--white);
  text-decoration: none; font-size: 12px; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase; border-radius: 30px;
  transition: background .3s;
}
.btn-primary:hover { background: var(--green-mid); }
.btn-dark {
  display: inline-block; padding: 13px 36px;
  background: var(--text-dark); color: var(--white);
  text-decoration: none; font-size: 12px; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase; border-radius: 4px;
  transition: background .3s;
}
.btn-dark:hover { background: #333; }
.btn-gold {
  display: inline-block; padding: 14px 48px;
  background: var(--gold-btn); color: var(--white);
  text-decoration: none; font-size: 13px; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase; border-radius: 30px;
  transition: background .3s;
}
.btn-gold:hover { background: var(--gold); }
.btn-outline {
  display: inline-block; padding: 12px 32px;
  border: 2px solid var(--white); color: var(--white);
  text-decoration: none; font-size: 13px; font-weight: 500;
  letter-spacing: 1px; text-transform: uppercase;
  border-radius: 30px; transition: all .3s;
}
.btn-outline:hover { background: var(--white); color: var(--green-dark); }

/* ── CTA BANNER ── */
.cta-banner {
  background: var(--green-mid);
  padding: 80px 40px; text-align: center;
  position: relative; overflow: hidden;
}
.cta-dots {
  position: absolute; right: 40px; top: 50%; transform: translateY(-50%);
  display: grid; grid-template-columns: repeat(6, 8px); gap: 6px; opacity: 0.15;
}
.cta-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--white); display: block; }
.cta-label { font-size: 11px; letter-spacing: 4px; color: rgba(255,255,255,0.7); text-transform: uppercase; margin-bottom: 16px; }
.cta-banner h2 { font-family: 'Playfair Display', serif; font-size: 46px; color: var(--white); margin-bottom: 36px; line-height: 1.2; }

/* ── FOOTER ── */
footer { background: var(--white); padding: 60px 40px 30px; border-top: 1px solid var(--border); }
.footer-inner { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 48px; margin-bottom: 40px; }
.footer-brand .logo-footer { background: var(--green-dark); display: inline-block; padding: 12px 16px; margin-bottom: 20px; }
.footer-brand p { font-size: 13px; color: var(--text-muted); line-height: 1.8; }
.footer-col h4 { font-size: 15px; font-weight: 600; margin-bottom: 16px; color: var(--text-dark); }
.footer-col h4::after { content: ''; display: block; width: 28px; height: 3px; background: var(--green-accent); margin-top: 6px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { font-size: 13px; color: var(--text-muted); text-decoration: none; transition: color .2s; }
.footer-col ul li a:hover { color: var(--green-dark); }
.footer-contact p { font-size: 13px; color: var(--text-muted); line-height: 1.8; margin-bottom: 6px; }
.footer-contact strong { color: var(--text-dark); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 20px; text-align: center; font-size: 12px; color: var(--text-muted); }
.footer-bottom a { color: var(--green-mid); text-decoration: none; }

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* Tablet (max 1024px) */
@media (max-width: 1024px) {
  nav { padding: 0 24px; }
  section { padding: 70px 32px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-brand { grid-column: 1 / -1; }
  .cta-dots { display: none; }
}

/* Mobile (max 768px) */
@media (max-width: 768px) {
  .topbar { padding: 8px 20px; font-size: 12px; }
  .topbar .call-text { display: none; }
  nav { padding: 0 20px; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  section { padding: 56px 20px; }
  .page-hero { padding: 48px 20px; }
  .page-hero h1 { font-size: 28px; }
  .section-title { font-size: 26px; }
  .cta-banner { padding: 60px 20px; }
  .cta-banner h2 { font-size: 28px; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  footer { padding: 48px 20px 24px; }
}

/* Small mobile (max 480px) */
@media (max-width: 480px) {
  .topbar { justify-content: center; }
  .section-title { font-size: 22px; }
  .btn-gold, .btn-primary, .btn-outline { padding: 12px 28px; font-size: 12px; }
}

/* ============================================================
   SHADOWS & ANIMATIONS
   ============================================================ */

/* ── Scroll-reveal base state ── */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.65s cubic-bezier(0.16,1,0.3,1),
              transform 0.65s cubic-bezier(0.16,1,0.3,1);
}
.reveal.reveal-left  { transform: translateX(-40px); }
.reveal.reveal-right { transform: translateX(40px); }
.reveal.reveal-scale { transform: scale(0.92); }
.reveal.visible {
  opacity: 1;
  transform: translate(0,0) scale(1);
}

/* Staggered children */
.stagger > * { opacity: 0; transform: translateY(28px); transition: opacity 0.55s cubic-bezier(0.16,1,0.3,1), transform 0.55s cubic-bezier(0.16,1,0.3,1); }
.stagger.visible > *:nth-child(1) { opacity:1; transform:none; transition-delay: 0.05s; }
.stagger.visible > *:nth-child(2) { opacity:1; transform:none; transition-delay: 0.15s; }
.stagger.visible > *:nth-child(3) { opacity:1; transform:none; transition-delay: 0.25s; }
.stagger.visible > *:nth-child(4) { opacity:1; transform:none; transition-delay: 0.35s; }
.stagger.visible > *:nth-child(5) { opacity:1; transform:none; transition-delay: 0.45s; }
.stagger.visible > *:nth-child(6) { opacity:1; transform:none; transition-delay: 0.55s; }

/* ── Nav shadow on scroll ── */
nav { transition: box-shadow 0.3s ease; }
nav.scrolled { box-shadow: 0 4px 28px rgba(0,0,0,0.14); }

/* ── Navbar link hover underline sweep ── */
.nav-links li a::before {
  content: '';
  position: absolute; bottom: 14px; left: 16px; right: 16px;
  height: 2px; background: var(--green-accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-links li a:hover::before { transform: scaleX(1); }

/* ── Button press + glow ── */
.btn-gold, .btn-primary, .btn-outline, .btn-dark {
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.25s ease;
}
.btn-gold:hover   { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(212,168,67,0.45); }
.btn-primary:hover{ transform: translateY(-2px); box-shadow: 0 8px 24px rgba(26,74,46,0.35); }
.btn-outline:hover{ transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,255,255,0.25); }
.btn-dark:hover   { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.25); }
.btn-gold:active, .btn-primary:active, .btn-dark:active { transform: translateY(0); box-shadow: none; }

/* ── Card lift shadows ── */
.card-shadow {
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.card-shadow:hover {
  box-shadow: 0 16px 48px rgba(0,0,0,0.13);
  transform: translateY(-5px);
}

/* ── Page hero text entrance ── */
.page-hero h1, .page-hero p {
  animation: heroFadeUp 0.7s cubic-bezier(0.16,1,0.3,1) both;
}
.page-hero p { animation-delay: 0.15s; }
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Hero slide content entrance ── */
.slide.active .slide-content h1 {
  animation: slideFadeUp 0.75s cubic-bezier(0.16,1,0.3,1) 0.2s both;
}
.slide.active .slide-content p {
  animation: slideFadeUp 0.75s cubic-bezier(0.16,1,0.3,1) 0.38s both;
}
.slide.active .slide-content a {
  animation: slideFadeUp 0.75s cubic-bezier(0.16,1,0.3,1) 0.52s both;
}
@keyframes slideFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Logo pulse on load ── */
.logo { animation: logoPop 0.6s cubic-bezier(0.34,1.56,0.64,1) 0.1s both; }
@keyframes logoPop {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── Topbar slide down ── */
.topbar { animation: topbarIn 0.5s ease both; }
@keyframes topbarIn {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ── Section label pop ── */
.section-label {
  display: inline-block;
  transition: letter-spacing 0.3s ease;
}

/* ── Footer link hover arrow nudge ── */
.footer-col ul li a { position: relative; padding-left: 0; transition: color .2s, padding-left .2s; }
.footer-col ul li a:hover { color: var(--green-dark); padding-left: 6px; }

/* ── Info card icon spin-in ── */
.info-card-icon {
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s ease;
}
.info-card:hover .info-card-icon {
  transform: rotate(8deg) scale(1.1);
  box-shadow: 0 4px 16px rgba(45,106,63,0.2);
}

/* ── Green accent underline on section titles ── */
.section-title::after {
  content: '';
  display: block;
  width: 0;
  height: 3px;
  background: var(--green-accent);
  margin-top: 10px;
  transition: width 0.5s cubic-bezier(0.16,1,0.3,1) 0.2s;
  border-radius: 2px;
}
.reveal.visible .section-title::after,
.section-title.underline-anim::after { width: 52px; }

/* ── Shimmer on product cards ── */
.product-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.12) 50%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.product-card:hover::after { opacity: 1; }

/* ── Blog card image zoom ── */
.blog-card img { transition: transform 0.5s cubic-bezier(0.16,1,0.3,1); }
.blog-card:hover img { transform: scale(1.05); }

/* ── Mobile nav entrance ── */
.mobile-nav {
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1);
}
.mobile-nav.open {
  display: flex;
  transform: translateX(0);
}

/* ── CTA banner subtle pulse on dots ── */
.cta-dots span {
  animation: dotPulse 3s ease-in-out infinite;
}
.cta-dots span:nth-child(odd)  { animation-delay: 0.3s; }
.cta-dots span:nth-child(3n)   { animation-delay: 0.6s; }
@keyframes dotPulse {
  0%, 100% { opacity: 0.15; transform: scale(1); }
  50%       { opacity: 0.35; transform: scale(1.3); }
}

/* ── Reduce motion for accessibility ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .stagger > * { opacity: 1; transform: none; }
}
