@import url("https://fonts.googleapis.com/css2?family=Caveat:wght@400..700&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");

body {
  font-size: 16px;
  font-family: "Inter", sans-serif;
  transition: background 0.3s, color 0.3s;
}

.table td,
.table th {
  vertical-align: middle;
}

.bg-cc {
  background-color: #d0f0c8;
}

.numbg {
  width: 40px;
}

.rating-box {
  background: #ecf9e6;
}

.rating-btn {
  background: transparent;
  border: none;
  font-size: 2rem;
  color: #bdbdbd;
  transition: all 0.3s ease;
}

.rating-btn:hover {
  transform: scale(1.2);
  cursor: pointer;
}

.active-1 {
  color: #81c784;
}
.active-2 {
  color: #66bb6a;
}
.active-3 {
  color: #4caf50;
}
.active-4 {
  color: #43a047;
}
.active-5 {
  color: #2e7d32;
}

.counter-card {
  background: linear-gradient(135deg, #4b9eb7 0%, #2b467c 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  color: white;
  transition: transform 0.3s ease;
}

.aside-card {
  transition: transform 0.3s ease;
}

.counter-card:hover,
.aside-card:hover {
  transform: translateY(-5px);
}

.counter-number {
  font-weight: bold;
  color: #fff;
  transition: all 0.5s ease;
}

.counter-icon {
  transition: all 0.5s ease;
}

.pulse {
  animation: pulseAnimation 2s infinite;
}

/* modl */

.donation-card {
  transition: all 0.3s ease;
  border: 2px solid transparent;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
}
.donation-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  border-color: #28a745;
}
.donation-card.selected {
  transform: translateY(-5px);
  border-color: #28a745;
  background-color: #e5fde9;
}
.donation-icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: #28a745;
}

.donation-type {
  cursor: pointer;
  padding: 10px 15px;
  border-radius: 8px;
  margin-bottom: 10px;
  transition: all 0.3s;
  border: 1px solid #eafce8;
}
.donation-type.active {
  background-color: #28a745;
  color: white;
  border-color: #28a745;
}
.donation-type:hover:not(.active) {
  background-color: #e9ecef;
}
.btn-donate {
  background-color: #28a745;
  border: none;
  padding: 10px 25px;
  font-weight: 600;
  transition: all 0.3s;
}
.btn-donate:hover {
  background-color: #218838;
  transform: scale(1.05);
}
.carbon-impact {
  font-size: 0.9rem;
  color: #6c757d;
  margin-top: 5px;
}
.carbon-summary {
  background-color: #e8f5e9;
  border-left: 4px solid #28a745;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.modal-header,
.modal-footer {
  background-color: var(--primary-green);
}

.carbon-alert-modal {
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.5s ease-in-out;
  max-width: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
  height: 0;
}
.carbon-alert-modal.show {
  opacity: 1;
  transform: translateY(0);
  height: auto;
}
.alert-carbon-content-modal {
  background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
  color: white;
  padding: 15px 20px;
  border-radius: 10px;
  position: relative;
}
.alert-close-modal {
  position: absolute;
  top: 10px;
  right: 15px;
  color: white;
  opacity: 0.8;
  cursor: pointer;
  transition: opacity 0.3s;
}
.alert-close-modal:hover {
  opacity: 1;
}
.progress-bar-alert-modal {
  height: 5px;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.3);
  position: absolute;
  bottom: 0;
  left: 0;
}
.progress-bar-alert-inner-modal {
  height: 100%;
  width: 100%;
  background-color: white;
  animation: progressBarModal 5s linear forwards;
}

/* box box */

.form-control,
.form-select {
  border-radius: 8px;
  border: 2px solid #dee2e6;
  transition: all 0.3s;
}
.form-control:focus,
.form-select:focus {
  border-color: #28a745;
  box-shadow: 0 0 0 0.25rem rgba(40, 167, 69, 0.25);
}

.result-box {
  background-color: #e8f5e9;
  border-radius: 10px;
  padding: 20px;
  margin-top: 25px;
  border-left: 4px solid #28a745;
}
.info-box {
  background-color: #e3f2fd;
  border-radius: 10px;
  padding: 15px;
  margin-top: 20px;
  border-left: 4px solid #2196f3;
}
#selectedDonation {
  background-color: #e6f7e6;
  border-left: 4px solid #198754;
}
/* tree overview */
.tree-details {
  background-color: #fff8e1;
  border-radius: 10px;
  padding: 15px;
  margin-top: 20px;
  border-left: 4px solid #ffc107;
  transition: all 0.5s ease;
  min-height: 300px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.tree-info-content {
  transition: all 0.5s ease;
}
.tree-image-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: all 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(250, 172, 3, 0.9);
}
.tree-image {
  max-width: 150%;
  max-height: 150%;
  object-fit: fill;
}
.hover-instruction {
  position: absolute;
  bottom: 0px;
  right: 10px;
  font-size: 0.8rem;
  color: #6c757d;
  opacity: 0.7;
  transition: opactity 0.5s ease;
}
.hover-instruction.hidden {
  opacity: 0;
  pointer-events: none;
}
.tree-details:hover .tree-info-content {
  opacity: 0;
  transform: translateY(-20px);
}
.tree-details:hover .tree-image-container {
  opacity: 1;
}
.hover-instruction {
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-size: 0.8rem;
  color: #6c757d;
  opacity: 0.7;
}

@keyframes progressBarModal {
  0% {
    width: 100%;
  }
  100% {
    width: 0%;
  }
}

@keyframes pulseAnimation {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0.8;
  }
}

/* footer */
#footer {
  margin-top: 5rem;
  background: linear-gradient(to bottom, #27ae60, #1e7d47);
  color: white;
  padding: 3rem 0 1rem;
  position: relative;
  overflow: hidden;
}

#footer::before {
  content: "";
  position: absolute;
  top: -50px;
  left: 0;
  width: 100%;
  height: 60px;
  background-color: #d5f5e3;
  clip-path: polygon(0 0, 100% 0, 100% 20%, 50% 100%, 0 20%);
}

.footer-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  position: relative;
  display: inline-block;
  cursor: pointer;
  transition: all 0.3s ease;
}

.footer-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 40px;
  height: 3px;
  background-color: #2ecc71;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.footer-title:hover {
  color: #e8f6ef;
  transform: translateY(-2px);
}

.footer-title:hover::after {
  width: 100%;
  background-color: #e8f6ef;
}

.footer-input {
  border: none;
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  transition: all 0.3s ease;
}

.footer-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.5);
}

.footer-btn {
  border: none;
  border-radius: 25px;
  background-color: #2ecc71;
  color: white;
  font-weight: 600;
  transition: all 0.3s ease;
}

.footer-btn:hover {
  background-color: #25a25a;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.footer-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  padding-left: 0;
}

.footer-link:hover {
  color: white;
  padding-left: 10px;
}

.footer-link::before {
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: all 0.3s ease;
}

.footer-link:hover::before {
  left: 0;
  opacity: 1;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  text-decoration: none !important;
}

.social-icon:hover {
  background: #2ecc71;
  transform: translateY(-5px) scale(1.1);
}

.footer-line {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.5), transparent);
  margin: 0 auto 1.5rem;
  max-width: 80%;
}

.leaf-decoration {
  position: absolute;
  opacity: 0.1;
  z-index: 0;
}

.leaf-1 {
  top: 20%;
  left: 5%;
  font-size: 80px;
  transform: rotate(-30deg);
}

.leaf-2 {
  bottom: 15%;
  right: 5%;
  font-size: 100px;
  transform: rotate(20deg);
}

.environment-icon {
  font-size: 1.5rem;
  margin-right: 10px;
  vertical-align: middle;
  transition: all 0.3s ease;
}

.footer-title:hover .environment-icon {
  transform: rotate(15deg) scale(1.2);
  color: #e8f6ef;
}

.animate-footer {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.animate-footer.visible {
  opacity: 1;
  transform: translateY(0);
}

.main-title {
  position: relative;
  display: inline-block;
  cursor: pointer;
  transition: all 0.3s ease;
}

.main-title::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(to right, #2ecc71, #27ae60);
  transition: all 0.3s ease;
}

.main-title:hover::after {
  width: 100%;
}

.main-title:hover {
  transform: translateY(-3px);
  color: #27ae60;
}

.vehicle-card {
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.1);
  height: 100%;
  min-height: 130px;
  position: relative;
}

.vehicle-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  border-color: #dee2e6;
}

.vehicle-card.selected {
  border-color: #28a745;
  background-color: #e8f5e9;
  transform: translateY(-3px);
}

.vehicle-card.selected .vehicle-icon {
  transform: scale(1.2);
}

.vehicle-card.selected .vehicle-info h6 {
  color: #28a745;
}

.nav-pills .pill-link {
  color: #6c757d;
  font-weight: 500;
  border: 1px solid #dee2e6;
  margin-right: 5px;
}

.nav-pills .pill-link.active {
  background-color: #28a745;
  border-color: #28a745;
  color: white;
}

@media (max-width: 768px) {
  .vehicle-card {
    min-height: 110px;
  }

  .vehicle-info h6 {
    font-size: 0.85rem;
  }

  .vehicle-info small {
    font-size: 0.7rem;
  }
}

.cost-breakdown {
  border-left: 3px solid #28a745;
  padding-left: 10px;
  margin: 5px 0;
}

.cost-breakdown small {
  font-size: 0.8em;
}
