/* ==========================================================================
   AgriVault - Next-Gen Sustainable AgTech & Farming Investment Theme
   ========================================================================== */

:root {
  --agri-primary: #059669;
  --agri-primary-dark: #047857;
  --agri-primary-light: #10b981;
  --agri-accent: #f59e0b;
  --agri-dark: #0f172a;
  --agri-light: #f8fafc;
  --agri-card-bg: rgba(255, 255, 255, 0.96);
  --agri-shadow: 0 10px 30px rgba(5, 150, 105, 0.08);
  --agri-shadow-hover: 0 20px 40px rgba(5, 150, 105, 0.2);
  --agri-transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  /* Legacy mapping for bootstrap compatibility */
  --zou-primary: var(--agri-primary);
  --zou-primary-dark: var(--agri-primary-dark);
  --zou-primary-light: var(--agri-primary-light);
  --zou-accent: var(--agri-accent);
  --zou-dark: var(--agri-dark);
  --zou-light: var(--agri-light);
  --zou-card-bg: var(--agri-card-bg);
  --zou-shadow: var(--agri-shadow);
  --zou-shadow-hover: var(--agri-shadow-hover);
  --zou-transition: var(--agri-transition);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  font-family: 'Chivo', system-ui, -apple-system, sans-serif;
  color: #334155;
  overflow-x: hidden;
  background-color: #ffffff;
}

/* -------------------------------------------------------------------------- */
/*                            Navbar Responsive Fixes                          */
/* -------------------------------------------------------------------------- */
.navbar {
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
  z-index: 1080 !important;
  transition: var(--zou-transition);
}

.navbar-brand span {
  font-weight: 700;
  letter-spacing: -0.5px;
}

.nav-link {
  position: relative;
  transition: color 0.2s ease;
  color: #232e3c !important;
  font-weight: 600;
}

.nav-link:hover,
.nav-link.active {
  color: var(--zou-primary) !important;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--zou-primary);
  transition: var(--zou-transition);
  transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 70%;
}

/* -------------------------------------------------------------------------- */
/*                           Buttons & UI Controls                             */
/* -------------------------------------------------------------------------- */
.btn-success {
  background-color: var(--zou-primary) !important;
  border-color: var(--zou-primary) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(25, 135, 84, 0.3);
  transition: var(--zou-transition);
}

.btn-success:hover {
  background-color: var(--zou-primary-dark) !important;
  border-color: var(--zou-primary-dark) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(25, 135, 84, 0.4);
}

.btn-outline-success {
  color: var(--zou-primary) !important;
  border-color: var(--zou-primary) !important;
  background: transparent !important;
  transition: var(--zou-transition);
}

.btn-outline-success:hover {
  background-color: var(--zou-primary) !important;
  color: #ffffff !important;
  transform: translateY(-2px);
}

/* -------------------------------------------------------------------------- */
/*                   Ultra-Premium Full Screen Hero Section                   */
/* -------------------------------------------------------------------------- */
.hero-section {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding-top: 6rem !important;
  padding-bottom: 3.5rem !important;
  background: radial-gradient(circle at 10% 20%, rgba(5, 150, 105, 0.09) 0%, rgba(248, 250, 252, 0.98) 60%),
              radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.07) 0%, rgba(241, 245, 249, 1) 100%);
  overflow: hidden;
}

/* Background Glowing Elements */
.hero-bg-glow-1 {
  position: absolute;
  top: -10%;
  left: -5%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(5, 150, 105, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
  animation: pulseGlow 8s ease-in-out infinite alternate;
}

.hero-bg-glow-2 {
  position: absolute;
  bottom: -15%;
  right: -5%;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.18) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(70px);
  animation: pulseGlow 10s ease-in-out 1s infinite alternate-reverse;
}

@keyframes pulseGlow {
  0% { transform: scale(0.9) translateY(0); opacity: 0.7; }
  100% { transform: scale(1.1) translateY(-20px); opacity: 1; }
}

/* Live Pulse Indicator Dot */
.live-pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Gradient Headline Text */
.hero-gradient-title {
  background: linear-gradient(135deg, #0f172a 30%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-gradient-accent {
  background: linear-gradient(135deg, #059669 0%, #10b981 60%, #047857 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hero Full Screen Image Showcase Container */
.hero-img-showcase {
  position: relative;
  border-radius: 28px;
  padding: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(5, 150, 105, 0.3));
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.18), 0 15px 40px rgba(5, 150, 105, 0.2);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-img-showcase:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 40px 95px rgba(5, 150, 105, 0.28), 0 20px 50px rgba(15, 23, 42, 0.2);
}

.hero-img-showcase img {
  width: 100%;
  height: 100%;
  min-height: 480px;
  max-height: 580px;
  object-fit: cover;
  border-radius: 22px;
  display: block;
}

/* Floating Glass Badges */
.floating-hero-badge {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(5, 150, 105, 0.25) !important;
  border-radius: 20px !important;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.15) !important;
  z-index: 10;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: floatBadge 4.5s ease-in-out infinite alternate;
}

.floating-hero-badge:hover {
  transform: translateY(-4px) scale(1.03) !important;
  box-shadow: 0 25px 55px rgba(5, 150, 105, 0.25) !important;
}

.floating-hero-badge-2 {
  animation: floatBadge 4.5s ease-in-out 1.2s infinite alternate-reverse;
}

.floating-hero-badge-3 {
  animation: floatBadge 5s ease-in-out 2.2s infinite alternate;
}

@keyframes floatBadge {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-12px); }
}

@media (max-width: 991.98px) {
  .hero-section {
    min-height: auto !important;
    padding-top: 7.5rem !important;
  }
  .hero-img-showcase img {
    min-height: 320px;
    max-height: 440px;
  }
}

/* -------------------------------------------------------------------------- */
/*                              Hero Stats Bar                                */
/* -------------------------------------------------------------------------- */
.hero-stats-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(5, 150, 105, 0.18);
  border-radius: 18px;
  box-shadow: 0 12px 35px rgba(5, 150, 105, 0.1);
  padding: 1.5rem;
  margin-top: 1.5rem;
  transition: var(--agri-transition);
}

.hero-stats-card:hover {
  box-shadow: var(--agri-shadow-hover);
}

.stat-item {
  text-align: center;
  padding: 0.25rem 0.5rem;
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--agri-primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.725rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* -------------------------------------------------------------------------- */
/*                          Opportunities & Filters                           */
/* -------------------------------------------------------------------------- */
.filter-badge-group {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.filter-btn {
  border: 1.5px solid #e2e8f0;
  background: #fff;
  color: #4a5568;
  padding: 0.5rem 1.25rem;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--zou-transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--zou-primary);
  color: #fff;
  border-color: var(--zou-primary);
  box-shadow: 0 4px 12px rgba(25, 135, 84, 0.25);
}

/* Premium Opportunity Card Overhaul */
.card-span {
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
  border: 1px solid rgba(5, 150, 105, 0.12) !important;
  border-radius: 20px !important;
  background: #ffffff !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05) !important;
  overflow: hidden;
  position: relative;
}

.card-span:hover,
.card-span:focus,
.card-span.active {
  transform: translateY(-8px) !important;
  box-shadow: 0 22px 45px rgba(5, 150, 105, 0.18), 0 8px 20px rgba(15, 23, 42, 0.06) !important;
  border-color: rgba(5, 150, 105, 0.35) !important;
  background-color: #ffffff !important; /* Fix low contrast background hover bug */
}

.card-icon-box {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.12) 0%, rgba(16, 185, 129, 0.05) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border: 1px solid rgba(5, 150, 105, 0.15);
}

.card-span:hover .card-icon-box {
  transform: scale(1.08) rotate(-3deg);
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.2) 0%, rgba(16, 185, 129, 0.1) 100%);
  border-color: rgba(5, 150, 105, 0.3);
}

.card-span .icons {
  height: 34px;
  width: 34px;
  transition: transform 0.3s ease;
}

.opp-badge {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 0.4rem 0.85rem;
  border-radius: 30px;
}

.opp-title {
  color: #0f172a !important;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
}

.opp-desc {
  color: #334155 !important;
  font-size: 0.9rem !important;
  line-height: 1.55 !important;
  font-weight: 450 !important;
}

.opp-metrics-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 0.85rem 1rem;
}

.opp-stat-label {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.opp-stat-val {
  font-size: 0.925rem;
  font-weight: 700;
  color: #0f172a;
}

.opp-roi-tag {
  color: #059669;
  font-weight: 800;
  font-size: 0.95rem;
}

.progress-thin-enhanced {
  height: 9px;
  border-radius: 6px;
  background-color: #e2e8f0;
  overflow: hidden;
}

.btn-invest-card {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  color: #ffffff !important;
  border: none !important;
  font-weight: 700 !important;
  font-size: 0.9rem !important;
  border-radius: 50px !important;
  padding: 0.7rem 1.25rem !important;
  box-shadow: 0 4px 15px rgba(5, 150, 105, 0.28) !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-invest-card:hover {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%) !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 22px rgba(5, 150, 105, 0.4) !important;
}

/* -------------------------------------------------------------------------- */
/*                          Investment Section Cards                          */
/* -------------------------------------------------------------------------- */
.invest-card {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  transition: var(--zou-transition);
}

.invest-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.bg-dark-gradient {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.35) 0%, rgba(15, 23, 42, 0.92) 100%);
}

.bg-light-gradient {
  background: linear-gradient(180deg, rgba(5, 150, 105, 0.5) 0%, rgba(4, 120, 87, 0.95) 100%);
}

.progress-thin {
  height: 8px;
  border-radius: 4px;
  background-color: #e2e8f0;
  overflow: hidden;
}

.progress-bar-zou {
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  border-radius: 4px;
  transition: width 1s ease-in-out;
}

/* -------------------------------------------------------------------------- */
/*                            CTA & Footer Overlap Fix                        */
/* -------------------------------------------------------------------------- */
/* Override negative margin on .cta from theme.css */
.cta {
  margin-bottom: 0 !important;
  position: relative;
  z-index: 2;
}

#contact {
  position: relative;
  z-index: 1;
}

#contact .row.pt-9 {
  padding-top: 3rem !important; /* Fixed padding overlap */
}

.cta-card-box {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(5, 150, 105, 0.28);
}

/* -------------------------------------------------------------------------- */
/*                             Testimonials Cards                             */
/* -------------------------------------------------------------------------- */
.testimonial-card {
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #ffffff;
  transition: var(--zou-transition);
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
}

.rating-stars {
  color: var(--zou-accent);
  margin-bottom: 0.5rem;
}

/* -------------------------------------------------------------------------- */
/*                           ROI Calculator Modal                             */
/* -------------------------------------------------------------------------- */
.calc-display-box {
  background: #f1f8f5;
  border: 1px solid rgba(25, 135, 84, 0.2);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
}

.calc-result-val {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--zou-primary);
}

.form-range::-webkit-slider-thumb {
  background: var(--zou-primary);
  box-shadow: 0 0 10px rgba(25, 135, 84, 0.4);
}

/* -------------------------------------------------------------------------- */
/*                            How It Works Tabs                               */
/* -------------------------------------------------------------------------- */
.theme-tab .nav-link {
  opacity: 0.75;
  transition: var(--zou-transition);
}

.theme-tab .nav-link.active {
  opacity: 1;
  transform: scale(1.06);
}

.nav-item-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-weight: 700;
  border: 2px solid rgba(255, 255, 255, 0.5);
  transition: var(--zou-transition);
}

.nav-link.active .nav-item-circle {
  background: #fff;
  color: var(--zou-primary);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

/* -------------------------------------------------------------------------- */
/*                          Toasts & Back to Top                              */
/* -------------------------------------------------------------------------- */
.toast-container-zou {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
}

.custom-toast {
  background: #ffffff;
  border-left: 4px solid var(--zou-primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideInRight 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.back-to-top {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--zou-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(25, 135, 84, 0.4);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--zou-transition);
  z-index: 999;
  border: none;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--zou-primary-dark);
  transform: translateY(-4px);
}

/* -------------------------------------------------------------------------- */
/*                            Mobile Responsiveness                           */
/* -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
  .hero-stats-card {
    padding: 1rem 0.5rem;
  }

  .stat-number {
    font-size: 1.35rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }

  .navbar-collapse {
    background: #ffffff;
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    margin-top: 0.75rem;
  }

  .cta-card-box {
    padding: 2.5rem 1.25rem !important;
  }
}
