/* ============================================
   UI/UX Enhancements
   ============================================ */

/* Loading States */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.6s linear infinite;
}

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

/* Form Success States */
.form-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--color-success);
  padding: var(--spacing-md);
  border-radius: var(--radius-lg);
  margin-top: var(--spacing-md);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  animation: slideDown 0.3s ease-out;
}

.form-success::before {
  content: '✓';
  font-size: 1.25rem;
  font-weight: bold;
}

.form-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--color-error);
  padding: var(--spacing-sm);
  border-radius: var(--radius-md);
  margin-top: var(--spacing-xs);
  font-size: var(--font-size-sm);
  animation: slideDown 0.3s ease-out;
}

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

/* Smooth Scroll Indicator */
.scroll-indicator {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(206, 141, 37, 0.1);
  z-index: 9999;
  pointer-events: none;
}

.scroll-indicator::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--gradient-primary);
  width: 0%;
  transition: width 0.1s ease-out;
}

/* Focus Visible for Accessibility */
*:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Update glow effects for gold theme */
.glow {
  box-shadow: 0 0 20px rgba(206, 141, 37, 0.5);
  animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(206, 141, 37, 0.5);
  }
  50% {
    box-shadow: 0 0 40px rgba(206, 141, 37, 0.8);
  }
}

/* Skip to Content Link */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--color-primary);
  color: white;
  padding: var(--spacing-md);
  z-index: 10000;
  text-decoration: none;
  border-radius: 0 0 var(--radius-md) 0;
}

/* Update scroll indicator for gold theme */
.scroll-indicator::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--gradient-primary);
  width: 0%;
  transition: width 0.1s ease-out;
}

.skip-to-content:focus {
  top: 0;
}

/* Improved Card Hover States */
.card-hover-lift {
  transition: all var(--transition-base);
}

.card-hover-lift:hover {
  transform: translateY(-8px);
}

/* Better Link Styling */
a:not(.btn):not(.navbar-link) {
  color: var(--color-primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all var(--transition-fast);
}

a:not(.btn):not(.navbar-link):hover {
  border-bottom-color: var(--color-primary);
  color: var(--color-primary-dark);
}

/* Improved List Styling */
ul:not(.navbar-menu):not(.footer-links) {
  list-style: none;
  padding-left: 0;
}

ul:not(.navbar-menu):not(.footer-links) li {
  position: relative;
  padding-left: var(--spacing-lg);
  margin-bottom: var(--spacing-sm);
  line-height: 1.6;
}

ul:not(.navbar-menu):not(.footer-links) li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: bold;
}

/* Better Table Styling (if needed) */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--glass-white);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

th {
  background: rgba(206, 141, 37, 0.1);
  padding: var(--spacing-md);
  text-align: left;
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

td {
  padding: var(--spacing-md);
  border-top: 1px solid var(--glass-border);
}

/* Print Styles */
@media print {
  .navbar,
  .footer,
  .hero-cta,
  .btn {
    display: none;
  }
  
  body {
    background: white;
  }
  
  .card {
    background: white;
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .card {
    border: 2px solid var(--color-text-primary);
  }
  
  .btn-primary {
    border: 2px solid white;
  }
}

/* Reduced Motion Enhancements */
@media (prefers-reduced-motion: reduce) {
  .hero-title,
  .hero-subtitle,
  .hero-cta {
    animation: none;
  }
  
  .value-prop-icon::before {
    animation: none;
  }
}

