/* Modern Green & White Design System - Cargill Dashboard */

:root {
  /* Color Palette */
  --primary: #198754;
  --primary-light: #27ae60;
  --primary-dark: #146c43;
  --primary-transparent: rgba(25, 135, 84, 0.08);
  --accent: #e9f7f0;
  --text-dark: #2d3436;
  --text-medium: #636e72;
  --text-light: #b2bec3;
  --white: #ffffff;
  --off-white: #f8f9fa;
  --light-gray: #f1f3f5;
  --shadow-color: rgba(45, 52, 54, 0.08);
  --success: #27ae60;
  --warning: #f39c12;
  --danger: #e74c3c;
  --info: #3498db;

  /* Typography */
  --font-main: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  --font-secondary: "Poppins", sans-serif;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-xxl: 3rem;

  /* Borders */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-circle: 50%;
}

/* ======== GLOBAL STYLES ======== */
body {
  font-family: var(--font-main);
  color: var(--text-dark);
  background-color: var(--white);
  overflow-x: hidden;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* ======== TYPOGRAPHY ======== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-secondary);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: var(--space-md);
  line-height: 1.3;
}

.display-3,
.display-4,
.display-5 {
  font-weight: 800;
  letter-spacing: -0.02em;
}

.lead {
  font-weight: 400;
  font-size: 1.15rem;
  color: var(--text-medium);
}

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

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

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

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

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

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: var(--primary);
  border-color: var(--primary);
}

/* ======== LAYOUT & CONTAINERS ======== */
.section {
  padding: 100px 0;
  position: relative;
  transition: all 0.5s ease-in-out;
}

.section.bg-light {
  background-color: var(--off-white);
}

.section.bg-white {
  background-color: var(--white);
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 15px;
}

/* ======== CARD STYLES ======== */
.card {
  border: none;
  border-radius: var(--radius-lg);
  background-color: var(--white);
  box-shadow: 0 10px 30px var(--shadow-color);
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.card.bg-light {
  background-color: var(--off-white);
}

.card-body {
  padding: var(--space-xl);
}

/* Card with green accent border */
.card-accent {
  border-top: 4px solid var(--primary);
}

/* 3D Cards with hover effect */
.card-3d {
  perspective: 1000px;
  transform-style: preserve-3d;
}

.card-3d:hover {
  transform: rotateX(5deg) rotateY(5deg) translateY(-5px);
  box-shadow: -20px 20px 30px rgba(0, 0, 0, 0.05),
    0 10px 20px rgba(0, 0, 0, 0.08);
}

/* ======== BUTTONS ======== */
.btn {
  font-weight: 600;
  padding: 0.65rem 1.75rem;
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
}

.btn-lg {
  padding: 0.85rem 2.25rem;
  font-size: 0.95rem;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

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

.btn-success:hover,
.btn-success:focus {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

/* Gradient button */
.btn-gradient {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border: none;
  color: white;
}

.btn-gradient:hover {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
}

/* Floating action button */
.floating-btn {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-circle);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary);
  color: white;
  box-shadow: 0 5px 15px rgba(25, 135, 84, 0.3);
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 99;
  transition: all 0.3s ease;
}

.floating-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(25, 135, 84, 0.4);
}

/* ======== HERO SECTION ======== */
.hero-section {
  position: relative;
  background: linear-gradient(135deg, #f8fcfa 0%, #e9f7f0 100%);
  overflow: hidden;
  padding: 120px 0;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23198754' fill-opacity='0.05'%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");
  z-index: 1;
}

.hero-section .container {
  position: relative;
  z-index: 2;
}

/* ======== ANIMATION CLASSES ======== */
/* Floating animation */
.float-animation {
  animation: float 5s ease-in-out infinite;
}

.slow-float {
  animation: float 7s ease-in-out infinite;
}

.very-slow-float {
  animation: float 9s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* Pulse animation */
.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(25, 135, 84, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(25, 135, 84, 0);
  }
}

/* Ripple animation */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
}

.ripple:active::after {
  animation: ripple 0.6s linear;
}

@keyframes ripple {
  0% {
    width: 0;
    height: 0;
    opacity: 0.5;
  }
  100% {
    width: 200%;
    height: 200%;
    opacity: 0;
  }
}

/* Typing animation */
.typing {
  overflow: hidden;
  border-right: 0.15em solid var(--primary);
  white-space: nowrap;
  letter-spacing: 0.15em;
  animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink-caret {
  from,
  to {
    border-color: transparent;
  }
  50% {
    border-color: var(--primary);
  }
}

/* ======== CUSTOM ELEMENTS ======== */
/* Background patterns */
.bg-pattern {
  position: relative;
  background-color: var(--white);
}

.bg-pattern::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23198754' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
  opacity: 0.8;
  z-index: 0;
}

.bg-pattern .container {
  position: relative;
  z-index: 1;
}

/* Animated background */
.bg-animated {
  position: relative;
  overflow: hidden;
}

.bg-animated::before {
  content: "";
  position: absolute;
  top: -10%;
  left: -10%;
  width: 120%;
  height: 120%;
  background: linear-gradient(
    135deg,
    rgba(39, 174, 96, 0.03) 0%,
    rgba(25, 135, 84, 0.01) 100%
  );
  z-index: 0;
  transform-origin: top left;
  animation: rotateBg 50s linear infinite;
}

@keyframes rotateBg {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.bg-animated .container {
  position: relative;
  z-index: 1;
}

/* Badge designs */
.badge {
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.35em 0.8em;
  border-radius: var(--radius-md);
}

.badge-pill {
  border-radius: 50rem;
}

.badge-success {
  background-color: rgba(25, 135, 84, 0.15);
  color: var(--primary);
}

.badge-warning {
  background-color: rgba(243, 156, 18, 0.15);
  color: var(--warning);
}

.badge-danger {
  background-color: rgba(231, 76, 60, 0.15);
  color: var(--danger);
}

.badge-info {
  background-color: rgba(52, 152, 219, 0.15);
  color: var(--info);
}

/* Progress bars */
.progress {
  height: 0.8rem;
  background-color: var(--light-gray);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.progress-bar {
  background-color: var(--primary);
  transition: width 1s ease-in-out;
}

/* Timeline styles */
.timeline-point {
  width: 16px;
  height: 16px;
  border-radius: var(--radius-circle);
  margin-right: 15px;
  margin-top: 8px;
  flex-shrink: 0;
  box-shadow: 0 0 0 5px rgba(25, 135, 84, 0.1);
  border: 2px solid var(--white);
  background-color: var(--primary);
}

.timeline-item {
  position: relative;
}

.timeline-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 24px;
  bottom: -20px;
  width: 2px;
  background-color: rgba(25, 135, 84, 0.15);
}

/* Stats counters */
.counter-value {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0;
  line-height: 1.2;
}

.counter-label {
  font-size: 1rem;
  color: var(--text-medium);
  font-weight: 500;
}

/* KPI Badge Styles */
.kpi-badge {
  position: relative;
  padding-left: 35px;
  padding-right: 10px;
  padding-top: 12px;
  padding-bottom: 12px;
  margin-bottom: 15px;
  background-color: var(--off-white);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  cursor: pointer;
  display: block;
  font-weight: 500;
}

.kpi-badge.disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.kpi-badge:before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background-color: var(--primary);
  transition: all 0.3s ease;
  box-shadow: 0 0 0 5px rgba(25, 135, 84, 0.1);
}

.kpi-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.kpi-badge.warning:before {
  background-color: var(--warning);
  box-shadow: 0 0 0 5px rgba(243, 156, 18, 0.1);
}

.kpi-badge.danger:before {
  background-color: var(--danger);
  box-shadow: 0 0 0 5px rgba(231, 76, 60, 0.1);
}

/* Navigation styling */
.navbar {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  padding: 1rem 0;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary) !important;
}

.navbar-dark .navbar-nav .nav-link {
  color: var(--white);
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover {
  color: rgba(255, 255, 255, 0.85);
}

/* Section navigation dots */
.section-nav {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.section-nav a {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
}

.section-nav a::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 12px;
  height: 12px;
  background-color: var(--primary);
  border-radius: 50%;
  transition: all 0.3s ease;
  z-index: -1;
  opacity: 0.5;
}

.section-nav a.active {
  background-color: var(--primary);
  transform: scale(1.2);
}

.section-nav a.active::before {
  transform: translate(-50%, -50%) scale(2);
  opacity: 0.2;
}

.section-nav a:hover {
  background-color: var(--primary-light);
  transform: scale(1.2);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--light-gray);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 6px;
  border: 3px solid var(--light-gray);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Card transitions */
.bg-transition {
  transition: all 0.3s ease;
  background: linear-gradient(135deg, var(--white) 0%, var(--accent) 300%);
  background-size: 200% 200%;
  background-position: 0% 0%;
}

.bg-transition:hover {
  background-position: 100% 100%;
  box-shadow: 0 15px 30px rgba(25, 135, 84, 0.1);
}

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: none;
  z-index: 999;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary);
  color: white;
  text-align: center;
  line-height: 50px;
  font-size: 1.25rem;
  box-shadow: 0 5px 15px rgba(25, 135, 84, 0.3);
  transition: all 0.3s ease;
}

.back-to-top:hover {
  background-color: var(--primary-dark);
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(25, 135, 84, 0.4);
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
  .section {
    padding: 60px 0;
  }

  .counter-value {
    font-size: 2.5rem;
  }

  .card-body {
    padding: var(--space-lg);
  }

  .section-nav {
    display: none;
  }

  .timeline-item:not(:last-child)::after {
    left: 7px;
  }
}
