:root {
  --primary: #2E7D32;
  --primary-dark: #1B5E20;
  --primary-light: #E8F5E9;
  --accent: #FF8F00;
  --primary-hover: #66BB6A;
  --primary-bg: #F1F8E9;
  --text-dark: #1a1a2e;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  --footer-bg: #1a1a2e;
  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.10);
  --shadow-xl: 0 20px 48px rgba(0,0,0,0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html {
  scroll-behavior: smooth;
}

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

body {
  font-family: var(--font-sans);
  color: var(--text-dark);
  background-color: #fafafa;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Typography ── */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 { font-size: 2.75rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── Animations ── */

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

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

.fade-in         { animation: fadeIn 0.6s ease both; }
.slide-up        { animation: slideUp 0.6s ease both; }
.slide-in-left   { animation: slideInLeft 0.6s ease both; }
.slide-in-right  { animation: slideInRight 0.6s ease both; }

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ── Links ── */

a {
  color: var(--primary);
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
}

/* ── Hero Section ── */

.hero-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, #004d40 100%);
  color: var(--white);
  padding: 100px 0 90px;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 60%, rgba(102, 187, 106, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 30%, rgba(200, 230, 201, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(46, 125, 50, 0.15) 0%, transparent 40%);
  pointer-events: none;
}

.hero-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(255,255,255,0.03) 1px, transparent 1px),
    radial-gradient(circle at 70% 20%, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-decoration {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.08;
  background: var(--white);
}

.hero-decoration-1 {
  width: 300px;
  height: 300px;
  top: -80px;
  right: -60px;
}

.hero-decoration-2 {
  width: 180px;
  height: 180px;
  bottom: 40px;
  left: -40px;
}

.hero-decoration-3 {
  width: 120px;
  height: 120px;
  top: 40px;
  left: 30%;
  background: rgba(255,255,255,0.05);
}

.hero-section h1 {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
}

.hero-section p {
  font-size: 1.15rem;
  opacity: 0.9;
  max-width: 540px;
  line-height: 1.7;
  color: rgba(255,255,255,0.85);
}

.hero-section .btn-light {
  color: var(--primary);
  font-weight: 600;
  padding: 14px 36px;
  border-radius: 50px;
  border: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.hero-section .btn-light:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.hero-section .btn-outline-light {
  border-width: 2px;
  padding: 12px 32px;
  border-radius: 50px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.hero-section .btn-outline-light:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* ── Section Spacing ── */

.section-padding {
  padding: 80px 0;
}

.section-title {
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  display: block;
  width: 50px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
  margin-top: 8px;
}

.section-title.text-center::after {
  margin-left: auto;
  margin-right: auto;
}

.section-subtitle {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* ── Buttons ── */

.btn {
  font-family: var(--font-sans);
  font-weight: 600;
  padding: 10px 28px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(46,125,50,0.2);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(46,125,50,0.3);
}

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline-primary:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(46,125,50,0.2);
}

.btn-lg {
  padding: 14px 36px;
  border-radius: var(--radius-md);
  font-size: 1.05rem;
}

/* ── Cards ── */

.card {
  border: none;
  border-radius: var(--radius-lg);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

/* ── Feature Cards ── */

.feature-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  transition: transform var(--transition-base), background var(--transition-base);
}

.card:hover .feature-icon {
  transform: scale(1.1);
  background: var(--primary);
  color: var(--white);
}

.feature-card .card-title {
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.feature-card .card-text {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ── Disease Cards ── */

.card-disease {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.card-disease .card-img-top {
  height: 200px;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.card-disease:hover .card-img-top {
  transform: scale(1.05);
}

.card-disease .card-body {
  padding: 1.25rem;
}

.card-disease .card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-dark);
}

/* ── Severity Badges ── */

.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 50px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge-severity-low {
  background-color: #E8F5E9;
  color: #2E7D32;
}

.badge-severity-medium {
  background-color: #FFF8E1;
  color: #F57F17;
}

.badge-severity-high {
  background-color: #FFEBEE;
  color: #C62828;
}

.bg-primary {
  background-color: var(--primary) !important;
}

/* ── Tip Cards ── */

.card-tip {
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
}

.card-tip .card-title {
  font-weight: 700;
  color: var(--primary-dark);
}

/* ── Stat Cards ── */

.card-stat {
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.card-stat:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-stat .stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.5rem;
  background: var(--primary-light);
  color: var(--primary);
}

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

.card-stat .stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

/* ── Steps / How It Works ── */

.step {
  position: relative;
}

.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 44px;
  left: 22px;
  width: 2px;
  height: calc(100% - 44px);
  background: linear-gradient(to bottom, var(--primary-light), transparent);
}

.step-number {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  flex-shrink: 0;
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--primary);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.step:hover .step-number {
  background: var(--primary);
  color: var(--white);
}

.step-content h5 {
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.step-content p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* ── Disease Detail ── */

.breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: 1rem;
}

.breadcrumb-item a {
  color: var(--primary);
  text-decoration: none;
}

.breadcrumb-item.active {
  color: var(--text-muted);
}

.detail-section {
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--primary);
  padding: 1.5rem;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  transition: box-shadow var(--transition-fast);
}

.detail-section:hover {
  box-shadow: var(--shadow-md);
}

.detail-section h5 {
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.75rem;
}

.detail-section p {
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ── Forms ── */

.form-control {
  border: 2px solid #E5E7EB;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 1rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  background: var(--white);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(46,125,50,0.12);
  outline: none;
}

.form-control::placeholder {
  color: var(--text-light);
}

.form-select {
  border: 2px solid #E5E7EB;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 1rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(46,125,50,0.12);
  outline: none;
}

.form-label {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.4rem;
}

.form-floating label {
  color: var(--text-light);
}

/* ── Footer ── */

footer {
  background-color: var(--footer-bg) !important;
  position: relative;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
}

footer h5, footer h6 {
  color: var(--white);
  font-weight: 700;
  margin-bottom: 1rem;
}

footer a {
  color: #9ca3af;
  transition: color var(--transition-fast);
  text-decoration: none;
  position: relative;
}

footer a:not(.btn):not(.social-icon)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--primary-hover);
  transition: width var(--transition-fast);
}

footer a:not(.btn):not(.social-icon):hover::after {
  width: 100%;
}

footer .hover-light:hover {
  color: var(--white) !important;
}

footer .text-secondary {
  color: #9ca3af !important;
}

footer .social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: #9ca3af;
  transition: all var(--transition-fast);
  text-decoration: none;
}

footer .social-icon:hover {
  background: var(--primary);
  color: var(--white) !important;
  transform: translateY(-2px);
}

.footer-divider {
  border-color: rgba(255,255,255,0.08);
  margin: 2rem 0;
}

/* ── Alerts ── */

.alert-success {
  background-color: var(--primary-light);
  border-color: var(--primary-hover);
  color: var(--primary-dark);
  border-radius: var(--radius-md);
}

/* ── Pagination ── */

.pagination .page-item.active .page-link {
  background-color: var(--primary);
  border-color: var(--primary);
}

.pagination .page-link {
  color: var(--primary);
  border-radius: var(--radius-sm);
  margin: 0 2px;
  transition: all var(--transition-fast);
}

.pagination .page-link:hover {
  background-color: var(--primary-light);
  color: var(--primary-dark);
}

/* ── Navbar active state ── */

.navbar-dark .navbar-nav .nav-link.active {
  color: #fff;
  background: rgba(255,255,255,0.12);
  border-radius: 6px;
}

/* ── Utilities ── */

.text-primary { color: var(--primary) !important; }
.bg-light-green { background-color: var(--primary-light); }
.border-primary { border-color: var(--primary) !important; }

.shadow-hover {
  transition: box-shadow var(--transition-fast);
}

.shadow-hover:hover {
  box-shadow: var(--shadow-lg);
}

/* ── Responsive ── */

@media (max-width: 991.98px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.85rem; }
  .section-padding { padding: 60px 0; }
  .hero-section { padding: 70px 0 60px; }
}

@media (max-width: 767.98px) {
  .hero-section {
    padding: 48px 0 40px;
  }
  .hero-section h1 {
    font-size: 2rem;
  }
  .hero-section p {
    font-size: 1rem;
  }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.65rem; }
  .section-padding { padding: 48px 0; }
  .card-disease .card-img-top {
    height: 160px;
  }
  .card-stat {
    padding: 1.5rem 1rem;
  }
  .card-stat .stat-number {
    font-size: 1.75rem;
  }
  .step:not(:last-child)::after {
    display: none;
  }
  .detail-section {
    padding: 1.25rem;
  }
  .hero-decoration-1,
  .hero-decoration-2,
  .hero-decoration-3 {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .hero-section h1 { font-size: 1.75rem; }
  .section-title { font-size: 1.5rem; }
}
