/* ============================================
   AgriConnect — Reference Design CSS
   Modern green theme | Poppins typography
   Applied from reference website design
============================================ */

:root {
  --green-900: #0f3a1f;
  --green-800: #14532d;
  --green-700: #166534;
  --green-600: #16a34a;
  --green-500: #22c55e;
  --green-400: #4ade80;
  --green-50: #f0fdf4;
  --accent: #facc15;
  --dark: #0b1f15;
  --muted: #6b7280;
  --bg-soft: #f6faf6;
  --shadow-sm: 0 4px 16px rgba(20, 83, 45, 0.08);
  --shadow-md: 0 12px 32px rgba(20, 83, 45, 0.12);
  --shadow-lg: 0 24px 60px rgba(20, 83, 45, 0.18);
  --radius: 14px;
  --radius-lg: 22px;
}

/* ===== Global Styles ===== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', sans-serif;
  color: #1f2937;
  background: #ffffff;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 { font-weight: 700; color: var(--dark); }
h1 { font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.15; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
p { color: #4b5563; }

.text-accent { color: var(--accent) !important; }
.text-50 { color: rgba(255, 255, 255, 0.7); }

/* ===== Buttons ===== */
.btn-pill { border-radius: 50px; font-weight: 600; padding: 0.6rem 1.4rem; transition: all 0.3s ease; }
.btn-success {
  background: linear-gradient(135deg, var(--green-600), var(--green-700));
  border: none;
  box-shadow: 0 6px 18px rgba(22, 163, 74, 0.35);
}
.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(22, 163, 74, 0.45);
  background: linear-gradient(135deg, var(--green-700), var(--green-800));
  color: #fff;
}
.btn-outline-success { border: 2px solid var(--green-600); color: var(--green-700); font-weight: 600; }
.btn-outline-success:hover { background: var(--green-600); color: #fff; transform: translateY(-2px); }
.btn-light:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* ===== Navbar ===== */
.custom-navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  transition: all 0.35s ease;
  padding: 0.85rem 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.custom-navbar.scrolled {
  padding: 0.5rem 0;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}
.brand-name { font-weight: 800; font-size: 1.45rem; color: var(--green-800); text-decoration: none; }
.brand-logo {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--green-500), var(--green-700));
  color: #fff; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-right: 10px; font-size: 1.2rem;
  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.4);
}
.navbar-nav .nav-link {
  font-weight: 500; color: #374151; margin: 0 0.4rem; position: relative;
}
.navbar-nav .nav-link::after {
  content: ''; position: absolute; bottom: 0; left: 50%; width: 0; height: 2px;
  background: var(--green-600); transition: all 0.3s ease;
}
.navbar-nav .nav-link:hover { color: var(--green-700); }
.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after { width: 70%; left: 15%; }

/* ===== Hero ===== */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(15, 58, 31, 0.733), rgba(20, 83, 45, 0.36)),
              url('https://images.unsplash.com/photo-1500382017468-9049fed747ef?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
  color: #fff;
  padding: 120px 0 80px;
  overflow: hidden;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 50%, rgba(34, 197, 94, 0.25), transparent 60%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 2; animation: fadeInUp 0.9s ease; }
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.9rem;
  backdrop-filter: blur(8px);
  margin-bottom: 1.5rem;
}
.hero-title { color: #fff; margin-bottom: 1rem; font-weight: 800; }
.hero-subtitle { font-size: 1.2rem; color: rgba(255,255,255,0.9); max-width: 720px; margin: 0 auto 2rem; }
.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-scroll {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  animation: bounce 2s infinite;
}
.hero-scroll a { color: #fff; font-size: 1.6rem; opacity: 0.7; }

@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bounce { 0%,100%{transform:translateX(-50%) translateY(0);} 50%{transform:translateX(-50%) translateY(-10px);} }

/* ===== Sections ===== */
.section { padding: 90px 0; }
.section-head { max-width: 700px; margin: 0 auto 3rem; }
.section-head .eyebrow,
.eyebrow {
  display: inline-block;
  color: var(--green-700);
  background: var(--green-50);
  padding: 0.3rem 0.9rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

/* ===== Features ===== */
.features-section { background: var(--bg-soft); }
.feature-card {
  background: #fff;
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  height: 100%;
  transition: all 0.35s ease;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--green-500), var(--green-700));
  transform: scaleX(0); transform-origin: left; transition: transform 0.35s ease;
}
.feature-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); border-color: var(--green-50); }
.feature-card:hover::before { transform: scaleX(1); }
.feature-icon {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--green-50), #dcfce7);
  color: var(--green-700);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.2rem;
  transition: all 0.3s ease;
}
.feature-card:hover .feature-icon {
  background: linear-gradient(135deg, var(--green-600), var(--green-700));
  color: #fff;
  transform: rotate(-8deg) scale(1.05);
}
.feature-card h5 { margin-bottom: 0.6rem; }
.feature-card p { color: var(--muted); margin: 0; font-size: 0.95rem; }

/* ===== About ===== */
.about-section { background: #fff; }
.about-image { position: relative; }
.about-image-inner {
  width: 100%; height: 420px; border-radius: var(--radius-lg);
  background: url('https://images.unsplash.com/photo-1625246333195-78d9c38ad449?auto=format&fit=crop&w=1200&q=80') center/cover no-repeat;
  box-shadow: var(--shadow-lg);
}
.about-badge {
  position: absolute; bottom: -20px; left: -20px;
  background: #fff; padding: 1rem 1.4rem; border-radius: 14px;
  display: flex; align-items: center; gap: 0.8rem;
  box-shadow: var(--shadow-md);
}
.about-badge i { font-size: 2rem; color: var(--accent); }
.about-badge strong { display: block; font-size: 0.9rem; color: var(--muted); font-weight: 500; }
.about-badge span { display: block; font-weight: 700; color: var(--dark); font-size: 1.1rem; }
.mv-card {
  background: var(--green-50); padding: 1.4rem; border-radius: var(--radius);
  border-left: 4px solid var(--green-600);
}
.mv-card i { font-size: 1.6rem; color: var(--green-700); margin-bottom: 0.6rem; }
.mv-card h6 { font-weight: 700; margin-bottom: 0.4rem; }
.mv-card p { margin: 0; font-size: 0.9rem; color: var(--muted); }

/* ===== Stats ===== */
.stats-section {
  background: linear-gradient(135deg, var(--green-700), var(--green-900));
  color: #fff;
  padding: 70px 0;
  position: relative;
  overflow: hidden;
}
.stats-section::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.6;
}
.stat-card { position: relative; z-index: 1; }
.stat-card i {
  font-size: 2.4rem; color: var(--accent); margin-bottom: 0.8rem;
  display: inline-block;
}
.stat-card h3 {
  color: #fff; font-size: 2.2rem; font-weight: 700; margin-bottom: 0.2rem;
}
.stat-card p { color: rgba(255,255,255,0.8); margin: 0; }

/* ===== CTA ===== */
.cta-section {
  background: linear-gradient(135deg, var(--green-600), var(--green-700));
  color: #fff;
  padding: 80px 0;
}
.cta-section h2 { color: #fff; margin-bottom: 1rem; }
.cta-section p { color: rgba(255,255,255,0.9); max-width: 600px; margin: 0 auto 2rem; }

/* ===== Footer ===== */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,0.8);
  padding: 60px 0 20px;
}
.footer a { color: rgba(255,255,255,0.8); text-decoration: none; transition: color 0.3s ease; }
.footer a:hover { color: var(--green-400); }
.footer h5 { color: #fff; margin-bottom: 1.2rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 3rem;
  padding-top: 1.5rem;
}

/* ===== Auth Pages (Login/Register) ===== */
.auth-body {
  background: linear-gradient(135deg, var(--green-900), var(--green-700));
  min-height: 100vh;
}
.auth-wrapper {
  position: relative;
  min-height: 100vh;
}
.auth-bg {
  position: absolute; 
  background: radial-gradient(circle at 30% 40%, rgba(34, 197, 94, 0.15), transparent 60%);
}
.auth-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: none;
}
.auth-visual {
  background: linear-gradient(135deg, var(--green-700), var(--green-900));
  color: #fff;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}
.auth-visual::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M40 40c0-22.1-17.9-40-40-40S-40 17.9-40 40s17.9 40 40 40 40-17.9 40-40zm0 0C40 62.1 62.1 80 85 80s40-17.9 40-40-17.9-40-40-40S40 17.9 40 40z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}
.auth-visual-content {
  position: relative; z-index: 1;
}
.auth-visual h3 {
  color: #fff;
  font-size: 1.8rem;
  margin-bottom: 1rem;
}
.auth-visual p {
  color: rgba(255,255,255,0.8);
  margin-bottom: 2rem;
}
.auth-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.auth-list li {
  padding: 0.6rem 0;
  color: rgba(255,255,255,0.9);
}
.auth-list li i {
  color: var(--green-400);
  margin-right: 0.8rem;
}
.auth-form-wrap {
  padding: 3rem;
}
.auth-form-wrap .form-label {
  font-weight: 500;
  color: var(--dark);
  margin-bottom: 0.5rem;
}
.input-group-custom {
  border-radius: var(--radius);
  overflow: hidden;
}
.input-group-custom .form-control {
  border: 2px solid #e5e7eb;
  border-left: none;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
}
.input-group-custom .form-control:focus {
  border-color: var(--green-600);
  box-shadow: none;
}
.input-group-custom .input-group-text {
  background: var(--green-50);
  border: 2px solid #e5e7eb;
  border-right: none;
  color: var(--green-700);
}
.input-group-custom .input-group-text i {
  font-size: 1.1rem;
}
.toggle-password {
  border: 2px solid #e5e7eb;
  border-left: none;
  background: #fff;
  color: var(--muted);
}
.toggle-password:hover {
  background: var(--green-50);
  color: var(--green-700);
}
.divider {
  text-align: center;
  margin: 1.5rem 0;
  position: relative;
}
.divider::before {
  content: ''; position: absolute; inset: 0;
  background: #e5e7eb;
  z-index: 1;
}
.divider span {
  background: #fff;
  padding: 0 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  position: relative;
  z-index: 2;
}

/* ===== Register Page Stepper ===== */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  gap: 0.5rem;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}
.step-circle {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #e5e7eb;
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.3s ease;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.step.active .step-circle {
  background: linear-gradient(135deg, var(--green-600), var(--green-700));
  color: #fff;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.4);
}
.step.completed .step-circle {
  background: var(--green-500);
  color: #fff;
}
.step-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
}
.step.active .step-label {
  color: var(--green-700);
  font-weight: 600;
}
.step-line {
  width: 60px; height: 3px;
  background: #e5e7eb;
  transition: all 0.3s ease;
}
.step-line.done {
  background: var(--green-500);
}
.progress-thin {
  height: 6px;
  background: #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}
.form-step {
  display: none;
  animation: fadeInUp 0.4s ease;
}
.form-step.active {
  display: block;
}

/* ===== Role Selection Cards ===== */
.role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}
.role-card {
  cursor: pointer;
  position: relative;
}
.role-card input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}
.role-inner {
  padding: 1.2rem;
  border: 2px solid #e5e7eb;
  border-radius: var(--radius);
  text-align: center;
  transition: all 0.3s ease;
  background: #fff;
}
.role-inner i {
  display: block;
  font-size: 1.8rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}
.role-inner span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  display: block;
}
.role-card input:checked + .role-inner {
  border-color: var(--green-600);
  background: var(--green-50);
}
.role-card input:checked + .role-inner i {
  color: var(--green-700);
  transform: scale(1.1);
}
.role-card input:checked + .role-inner span {
  color: var(--green-700);
  font-weight: 600;
}
.role-card:hover .role-inner {
  border-color: var(--green-400);
  transform: translateY(-2px);
}

/* ===== Responsive ===== */
@media (max-width: 991px) {
  .auth-visual {
    display: none;
  }
  .auth-form-wrap {
    padding: 2rem;
  }
}

@media (max-width: 767px) {
  .role-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .step-label {
    font-size: 0.65rem;
  }
  .step-line {
    width: 30px;
  }
  .hero-section {
    padding: 100px 0 60px;
  }
  .section {
    padding: 60px 0;
  }
}

@media (max-width: 575px) {
  .auth-form-wrap {
    padding: 1.5rem;
  }
  .role-grid {
    grid-template-columns: 1fr;
  }
}
