@import url("https://fonts.googleapis.com/css2?family=Sora:wght@300;400;700&family=Source+Sans+Pro:wght@300;400;700&display=swap");

:root {
  --color-primary: #009444;
  --color-primary-dark: #007a38;
  --color-primary-light: #e6f4ea;
  --color-text: #212529;
  --color-text-secondary: #6c757d;
  --color-background: #f8f9fa;
  --color-white: #ffffff;
  --font-heading: "Sora", sans-serif;
  --font-body: "Source Sans Pro", sans-serif;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.08);
  --radius: 8px;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-background);
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-text);
}

.text-primary-custom {
  color: var(--color-primary) !important;
}
.bg-primary-custom {
  background-color: var(--color-primary) !important;
}
.bg-light-custom {
  background-color: var(--color-primary-light) !important;
}

/* Navigation */
.navbar {
  background-color: var(--color-white);
  box-shadow: var(--shadow-sm);
  padding: 1rem 0;
}
.navbar-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-primary) !important;
  font-size: 1.5rem;
}
.nav-link {
  font-weight: 600;
  color: var(--color-text) !important;
  transition: color 0.3s ease;
}
.nav-link:hover,
.nav-link:focus {
  color: var(--color-primary) !important;
}
.dropdown-menu {
  border: none;
  box-shadow: var(--shadow-md);
  border-radius: var(--radius);
}
.dropdown-item:hover {
  background-color: var(--color-primary-light);
  color: var(--color-primary);
}

/* Navbar Logo Styles */
.navbar-logo {
  height: 50px;
  width: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.navbar-logo:hover {
  transform: scale(1.05);
}

.brand-text {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-primary);
  font-size: 1.5rem;
  letter-spacing: 0.5px;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
  .navbar-logo {
    height: 40px;
  }

  .brand-text {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .navbar-logo {
    height: 35px;
  }

  .brand-text {
    font-size: 1.1rem;
  }
}

/* Buttons */
.btn-primary-custom {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white) !important; /* Forces white text */
  font-weight: 600;
  border-radius: var(--radius);
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 148, 68, 0.3);
}

.btn-primary-custom:hover,
.btn-primary-custom:focus {
  background-color: #006830 !important; /* Darker green on hover */
  border-color: #006830 !important;
  color: var(--color-white) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 104, 48, 0.4);
}

/* Special override for navbar button to ensure white text */
.navbar .btn-primary-custom {
  color: var(--color-white) !important;
}

.navbar .btn-primary-custom:hover {
  background-color: #006830 !important;
  color: var(--color-white) !important;
}

/* Cards */
.card-custom {
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  background: var(--color-white);
}
.card-custom:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* Utility Bar */
.utility-bar {
  background-color: var(--color-primary-dark);
  color: var(--color-white);
  font-size: 0.875rem;
  padding: 0.5rem 0;
}
.utility-bar a {
  color: var(--color-white);
  text-decoration: none;
}

/* Footer */
footer {
  background-color: #1a1d20;
  color: #adb5bd;
  padding: 4rem 0 2rem;
}
footer h5 {
  color: var(--color-white);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}
footer a {
  color: #adb5bd;
  text-decoration: none;
  transition: color 0.3s;
}
footer a:hover {
  color: var(--color-primary);
}
/* =========================================
   Smooth Dropdown Animation (Desktop Only)
   ========================================= */
@media (min-width: 992px) {
  .navbar .dropdown-menu {
    display: block;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition:
      opacity 0.3s ease,
      transform 0.3s ease,
      visibility 0.3s;
    pointer-events: none; /* Prevents accidental clicks when hidden */
    margin-top: 0.5rem; /* Adds a tiny gap for visual separation */
  }

  /* Trigger animation on hover OR when Bootstrap adds the .show class (for mobile/click) */
  .navbar .nav-item.dropdown:hover .dropdown-menu,
  .navbar .dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  /* Keep parent link highlighted when dropdown is open/hovered */
  .navbar .nav-item.dropdown:hover > .nav-link,
  .navbar .nav-item.dropdown.show > .nav-link {
    color: var(--color-primary) !important;
  }
}
/* =========================================
   Bulletproof Desktop Hover Dropdowns
   ========================================= */
@media (min-width: 992px) {
  /* 1. Force dropdown to be in the layout but invisible, and remove the gap */
  .navbar .dropdown-menu {
    display: block !important; /* Overrides Bootstrap JS click-only behavior */
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition:
      opacity 0.25s ease,
      transform 0.25s ease,
      visibility 0.25s ease;
    margin-top: 0 !important; /* CRITICAL: Removes the invisible gap that breaks hover */
    padding-top: 0.5rem !important; /* Creates a safe "hover bridge" */
    pointer-events: none;
  }

  /* 2. Show dropdown when hovering the parent item OR the dropdown menu itself */
  .navbar .nav-item.dropdown:hover .dropdown-menu,
  .navbar .dropdown-menu:hover {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
  }

  /* 3. Keep the parent link highlighted while the dropdown is open */
  .navbar .nav-item.dropdown:hover > .nav-link,
  .navbar .nav-item.dropdown.show > .nav-link {
    color: var(--color-primary) !important;
  }
}
