/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--color-maroon);
  color: white;
  border: none;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1000;
  box-shadow: var(--shadow-card);
  transition: all 0.3s ease;
  display: none;
}

.back-to-top:hover {
  background: var(--color-maroon-dark);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(128, 0, 0, 0.4);
}

.back-to-top:active {
  transform: translateY(-1px);
}

/* Enhanced Focus Indicators for Keyboard Navigation */
body.keyboard-nav *:focus {
  outline: 3px solid var(--color-maroon);
  outline-offset: 2px;
}

body:not(.keyboard-nav) *:focus {
  outline: none;
}

/* Better focus for interactive elements */
.filter-btn:focus-visible,
.pricing-button:focus-visible,
.faq-question:focus-visible,
.nav-link:focus-visible {
  outline: 2px solid var(--color-maroon);
  outline-offset: 3px;
}

/* Loading Spinner for Form Submit */
.btn-loader {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* Improved Form States */
input:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-maroon);
  box-shadow: 0 0 0 3px rgba(128, 0, 0, 0.1);
}

input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
  border-color: #dc3545;
}

input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown) {
  border-color: #28a745;
}

/* Screen Reader Only Content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .back-to-top {
    width: 45px;
    height: 45px;
    bottom: 20px;
    right: 20px;
    font-size: 20px;
  }
}
