body {
  font-family: Arial, sans-serif;
  background-color: #e9f5e9;
  color: #333;
  scroll-behavior: smooth;
}

.navbar {
  margin-bottom: 0;
  background: linear-gradient(45deg, #28a745, #4CAF50);
  border-bottom: 2px solid #1d7431;
  padding: 10px 20px;
  color: #d4edda;
  font-weight: bold;
}

.navbar .navbar-brand {
  display: flex;
  align-items: center;
  color: #fff;
  font-weight: bold;
  font-size: 1.5em;
}

.navbar .navbar-brand img {
  height: 50px;
  margin-right: 10px; /* Adjust spacing between the logo and text */
}

.navbar .nav-link {
  color: #fff;
  transition: color 0.3s ease-in-out;
}

.navbar .nav-link:hover {
  color: #d4edda;
}

.navbar .nav-item.active .nav-link {
  color: #ffffff;
  font-weight: bold;
}

.navbar-toggler {
  border: none;
}

.navbar-toggler-icon {
  background-image: url('data:image/svg+xml;charset=utf8,%3Csvg viewBox="0 0 30 30" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath stroke="rgba%28255, 255, 255, 0.5%29" stroke-width="2" linecap="round" linejoin="round" d="M4 7h22M4 15h22M4 23h22"/%3E%3C/svg%3E');
}

.main-image-container {
  position: relative;
}

.main-image-container img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.caption {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: rgba(0, 128, 0, 0.5);
  color: #fff;
  padding: 10px;
  font-size: 1.5em;
  border-radius: 5px;
  width: calc(100% - 40px); /* Make sure the caption is responsive */
}

.text-success i {
  color: #28a745;
}

.rectangle {
  background-color: #1aa53a;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 5px;
  transition: transform 0.3s, box-shadow 0.3s;
  color: #fff;
  text-align: center;
}

.rectangle:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(0, 128, 0, 0.2);
}

h2 {
  color: #28a745;
  position: relative;
}

h2::after {
  content: '';
  display: block;
  width: 50px;
  height: 5px;
  background-color: #28a745;
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 128, 0, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(0, 128, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 128, 0, 0);
  }
}

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

section {
  animation: slideIn 1s ease-in-out;
}

.carousel-caption h5 {
  background: rgba(0, 128, 0, 0.7);
  padding: 5px;
  border-radius: 5px;
}

.navbar .nav-item {
  position: relative;
}

.navbar .nav-item::before {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: #fff;
  transition: all 0.3s;
}

.navbar .nav-item:hover::before {
  width: 100%;
  left: 0;
}

.navbar .nav-link {
  position: relative;
  padding: 10px 15px;
}

.navbar .nav-link::before {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: #fff;
  transition: all 0.3s;
}

.navbar .nav-link:hover::before {
  width: 100%;
  left: 0;
}

/* Set consistent height for images */
.carousel-item img {
  width: 100%;
  height: 200px; /* Set a fixed height */
  object-fit: cover; /* Ensure images maintain their aspect ratio */
}

/* Mobile view styles */
@media (max-width: 768px) {
  .col-md-3 {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .carousel-caption {
    font-size: 0.8em;
    padding: 5px;
  }

  .navbar .nav-link {
    padding: 8px 10px;
  }

  .navbar .navbar-brand {
    font-size: 1.2em;
  }
  .img-fluid {
      max-width: 100%;
      height: auto;
    }
    .w-100 {
      width: 100%;
    }

  .caption {
    font-size: 1em;
  }
}
