h1 {
  text-align: center;
  margin: 30px;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  color: #222222;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.faq {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Each FAQ item */
details {
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  margin-bottom: 16px;
  background: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: 
    box-shadow 0.3s ease, 
    transform 0.2s ease, 
    border-color 0.3s ease,
    background-color 0.3s ease; /* optional if background changes */
}

details:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

details[open] {
  border-color: #007bff;
  box-shadow: 0 6px 20px rgba(0, 123, 255, 0.15);
}

/* FAQ question styling */
summary {
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  font-family: "Poppins";
  color: #2c2c2c;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  user-select: none;
  outline: none;
  position: relative;
}

summary:hover {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  color: #007bff;
}

summary::-webkit-details-marker {
  display: none;
}

/* Plus/minus icon using CSS only */
summary::after {
  content: "+";
  font-size: 20px;
  font-weight: 300;
  color: #007bff;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 123, 255, 0.1);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

summary:hover::after {
  background: rgba(0, 123, 255, 0.2);
  transform: scale(1.1);
}

details[open] summary::after {
  content: "−";
  transform: rotate(180deg) scale(1.1);
  background: rgba(0, 123, 255, 0.2);
}

/* Answer section */
details > .answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.4s ease 0.1s,
              transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              border-top-color 0.3s ease 0.2s;
  padding: 0 24px;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  color: #4a4a4a;
  line-height: 1.7;
  font-size: 15px;
  opacity: 0;
  border-top: 1px solid transparent;
  transform: translateY(-10px);
  font-family: "Roboto", sans-serif;
}

/* Expanded answer */
details[open] > .answer {
  max-height: 1000px;
  padding: 24px;
  opacity: 1;
  border-top-color: #e5e5e5;
  transform: translateY(0);
  animation: slideInFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Keyframe animation for answer opening */
@keyframes slideInFadeIn {
  0% {
    opacity: 0;
    transform: translateY(-15px) scale(0.98);
  }
  50% {
    opacity: 0.7;
    transform: translateY(-5px) scale(0.99);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .faq {
    padding: 0 16px;
  }
  
  summary {
    padding: 16px 20px;
    font-size: 15px;
  }
  
  details > .answer {
    padding: 0 20px;
    font-size: 14px;
  }
  
  details[open] > .answer {
    padding: 20px;
  }
}