/* Main stylesheet for PHP version - Premium Design */

/* Custom Utilities */
.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;
}

.focus\:not-sr-only:focus {
  position: static;
  width: auto;
  height: auto;
  padding: inherit;
  margin: inherit;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

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

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Focus visible styles with premium gradient */
*:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}

/* Custom scrollbar with premium styling */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #f8fafc;
}

.dark ::-webkit-scrollbar-track {
  background: #0f172a;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #6366f1, #ec4899);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #4f46e5, #db2777);
}

/* Premium Animations */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes glow {
  0% {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
  }
  100% {
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.8);
  }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-glow {
  animation: glow 2s ease-in-out infinite alternate;
}

/* Custom Animations for Scroll */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Form error states */
.error-message {
  display: none;
}

.error-message.show {
  display: block;
}

input.error,
select.error,
textarea.error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* Success/Error messages */
#form-message.success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  padding: 1rem;
  border-radius: 1rem;
  text-align: center;
  font-weight: 600;
}

#form-message.error {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  padding: 1rem;
  border-radius: 1rem;
  text-align: center;
  font-weight: 600;
}

/* Image Lazy Loading */
img[loading="lazy"] {
  transition: opacity 0.3s ease-in;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* Cookie Consent Animations */
@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

#cookie-banner {
  animation: slideUp 0.5s ease-out;
}

#cookie-settings-modal {
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Cookie checkbox styling */
#cookie-settings-modal input[type="checkbox"]:checked {
  background-color: #6366f1;
  border-color: #6366f1;
}

/* Dynamic page content styles */
.dynamic-page-content {
  display: block;
  width: 100%;
}

.dynamic-page-content h1 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-top: 2rem;
  margin-bottom: 1.5rem;
  color: #0f172a;
  line-height: 1.2;
}

.dynamic-page-content h2 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  color: #1e293b;
  line-height: 1.3;
}

.dynamic-page-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #1e293b;
  line-height: 1.4;
}

.dynamic-page-content p {
  margin-bottom: 1.25rem;
  line-height: 1.75;
  color: #1e293b;
}

.dynamic-page-content ul,
.dynamic-page-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.75rem;
}

.dynamic-page-content li {
  margin-bottom: 0.75rem;
  line-height: 1.75;
}

.dynamic-page-content a {
  color: #6366f1;
  text-decoration: underline;
}

.dynamic-page-content a:hover {
  color: #4f46e5;
}

/* Dark mode styles */
.dark .dynamic-page-content h1 {
  color: #f1f5f9;
}

.dark .dynamic-page-content h2,
.dark .dynamic-page-content h3 {
  color: #e2e8f0;
}

.dark .dynamic-page-content p,
.dark .dynamic-page-content li {
  color: #cbd5e1;
}

.dark .dynamic-page-content a {
  color: #818cf8;
}

.dark .dynamic-page-content a:hover {
  color: #a5b4fc;
}
