.accordion {
  width: 100%;
  max-width: 650px;
  margin: 20px auto;
  font-family: "Poppins", Arial, sans-serif;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 15px;
  overflow: hidden;
  background: linear-gradient(145deg, #f5f5f5, #ffffff);
  box-shadow: 12px 12px 24px rgba(0, 0, 0, 0.1), -8px -8px 16px rgba(255, 255, 255, 0.7);
  transition: box-shadow 0.3s ease;
}

.accordion:hover {
  box-shadow: 14px 14px 28px rgba(0, 0, 0, 0.15), -10px -10px 20px rgba(255, 255, 255, 0.8);
}

.accordion-item {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.accordion-header {
  width: 100%;
  background: #fafafa;
  color: #222;
  padding: 18px 25px;
  text-align: left;
  font-size: 1.6rem;
  font-weight: 600;
  border: none;
  outline: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.4s ease;
  position: relative;
}

.accordion-header:hover {
  background: linear-gradient(145deg, #f0f0f0, #ffffff);
  color: #0056b3;
}

.accordion-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: #0056b3;
  transition: width 0.4s ease;
}

.accordion-header:hover::after {
  width: 100%;
}

.icon {
  font-size: 1.8rem;
  transition: transform 0.4s ease, color 0.3s;
  color: #0056b3;
}

.accordion-header[aria-expanded="true"] .icon {
  transform: rotate(135deg);
  color: #dc3545; /* Change icon color on active */
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s ease-out, opacity 0.6s ease;
  padding: 0 25px;
  opacity: 0;
  background: linear-gradient(145deg, #ffffff, #f9f9f9);
}

.accordion-content.active {
  max-height: 400px; /* Adjust based on content */
  opacity: 1;
  padding: 20px 25px;
  box-shadow: inset 5px 5px 15px rgba(0, 0, 0, 0.05);
}

.accordion-content p,
.accordion-content ul {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.8;
  color: #333;
}

.accordion-content ul {
  list-style-type: disc;
  padding-left: 40px;
}

.accordion-content ul li {
  margin-bottom: 12px;
}

.accordion-content.active {
  border-top: 2px solid rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
  .accordion-header {
    font-size: 1.4rem;
  }

  .accordion-content p,
  .accordion-content ul {
    font-size: 1.1rem;
  }
}

@media (max-width: 576px) {
  .accordion {
    max-width: 90%;
  }

  .accordion-header {
    padding: 16px 20px;
  }

  .accordion-content {
    padding: 15px 20px;
  }
}
