/* Custom styles for DUERPilot Landing Page */

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Header scroll effect */
header.scrolled {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* FAQ Accordion */
.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.faq-content.open {
  max-height: 500px;
}

.faq-button.active span:last-child {
  transform: rotate(45deg);
}

/* Counter animation */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.counter-animate {
  animation: countUp 0.5s ease-out;
}

/* Form validation */
input:invalid:not(:placeholder-shown) {
  border-color: #ef4444;
}

input:valid:not(:placeholder-shown) {
  border-color: #10b981;
}

/* Loading state */
button.loading {
  opacity: 0.7;
  cursor: not-allowed;
  position: relative;
}

button.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Success message */
.success-message {
  background-color: #10b981;
  color: white;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-top: 1rem;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Error message */
.error-message {
  background-color: #ef4444;
  color: white;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-top: 1rem;
  animation: slideDown 0.3s ease-out;
}

/* Cookie banner animation */
#cookie-banner {
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #cookie-banner .container {
    flex-direction: column;
    gap: 1rem;
  }
  
  #cookie-banner .container > div {
    width: 100%;
  }
}

/* Print styles */
@media print {
  header,
  #cookie-banner,
  footer {
    display: none;
  }
}

