/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* CSS Custom Properties for Dynamic Spiritual Colors */
:root {
  --color-primary: #7C3AED;     /* Deep Purple - Spirituality */
  --color-secondary: #F59E0B;   /* Amber - Enlightenment */
  --color-accent: #059669;      /* Emerald - Healing/Growth */
  
  /* Dynamic color overrides - These will be updated by PHP */
  --dynamic-primary: var(--color-primary);
  --dynamic-secondary: var(--color-secondary);
  --dynamic-accent: var(--color-accent);
}

/* Base Styles */
body {
  font-family: 'Inter', sans-serif;
}

/* Dynamic Color Utility Classes - Updated by PHP */
.text-primary { color: var(--dynamic-primary) !important; }
.bg-primary { background-color: var(--dynamic-primary) !important; }
.border-primary { border-color: var(--dynamic-primary) !important; }
.focus\:border-primary:focus { border-color: var(--dynamic-primary) !important; }
.focus\:ring-primary\/20:focus { 
  --tw-ring-color: rgba(124, 58, 237, 0.2) !important; 
  box-shadow: 0 0 0 3px var(--tw-ring-color);
}
.from-primary { --tw-gradient-from: var(--dynamic-primary) !important; }

.text-secondary { color: var(--dynamic-secondary) !important; }
.bg-secondary { background-color: var(--dynamic-secondary) !important; }

.text-accent { color: var(--dynamic-accent) !important; }
.bg-accent { background-color: var(--dynamic-accent) !important; }
.from-accent { --tw-gradient-from: var(--dynamic-accent) !important; }

/* Hide Scrollbars */
.scroll-hidden {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* Internet Explorer 10+ */
}

.scroll-hidden::-webkit-scrollbar {
  display: none; /* WebKit browsers */
}

/* Left Column Scrollable Styling */
.left-column {
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
  padding-right: 1rem;
  padding-top: 1rem;
  padding-bottom: 2rem;
}

/* Right Column Sticky Styling */
.right-column {
  position: sticky;
  top: 2rem;
  height: fit-content;
}

/* Dynamic Spiritual Animations */
.pulse-glow {
  animation: pulse-glow-spiritual 2s infinite;
}

@keyframes pulse-glow-spiritual {
  0%, 100% {
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(124, 58, 237, 0.6), 0 0 40px rgba(124, 58, 237, 0.4);
  }
}

.floating {
  animation: floating-spiritual 4s ease-in-out infinite;
}

@keyframes floating-spiritual {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  25% {
    transform: translateY(-4px) rotate(0.5deg);
  }
  50% {
    transform: translateY(-8px) rotate(0deg);
  }
  75% {
    transform: translateY(-4px) rotate(-0.5deg);
  }
}

/* Mystical glow effect for special elements */
.mystical-glow {
  animation: mystical-glow 3s ease-in-out infinite alternate;
}

@keyframes mystical-glow {
  from {
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.4);
  }
  to {
    box-shadow: 0 0 25px rgba(124, 58, 237, 0.7), 0 0 35px rgba(124, 58, 237, 0.3);
  }
}

/* Enhanced animations for thank you page */
.bounce-in {
  animation: bounce-in 0.8s ease-out;
}

@keyframes bounce-in {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.success-bounce {
  animation: success-bounce 0.6s ease-in-out;
}

@keyframes success-bounce {
  0%, 20%, 60%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  80% {
    transform: translateY(-5px);
  }
}

.pulse-success {
  animation: pulse-success 2s infinite;
}

@keyframes pulse-success {
  0%, 100% {
    box-shadow: 0 0 15px rgba(5, 150, 105, 0.4);
  }
  50% {
    box-shadow: 0 0 25px rgba(5, 150, 105, 0.7), 0 0 35px rgba(5, 150, 105, 0.3);
  }
}

/* Form Input Focus States - Enhanced for PHP Backend */
#leadForm input[type="email"]:focus,
#leadForm input[type="text"]:focus {
  border-color: var(--dynamic-primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
  outline: none;
}

#leadForm input[type="checkbox"]:checked {
  accent-color: var(--dynamic-primary);
}

/* Form Validation States - Enhanced */
#leadForm input:invalid:not(:focus):not(:placeholder-shown) {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

#leadForm input:valid:not(:focus):not(:placeholder-shown) {
  border-color: var(--dynamic-accent);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

/* Enhanced Button Hover Effects for PHP Forms */
#leadForm button[type="submit"] {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

#leadForm button[type="submit"]:hover {
  transform: scale(1.02);
}

#leadForm button[type="submit"]:active {
  transform: scale(0.98);
}

/* Loading State Enhanced */
#leadForm button[type="submit"]:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

#leadForm button[type="submit"].loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Spiritual gradient overlays - Enhanced */
.spiritual-gradient {
  background: linear-gradient(135deg, 
    rgba(124, 58, 237, 0.1) 0%, 
    rgba(99, 102, 241, 0.1) 50%, 
    rgba(139, 92, 246, 0.1) 100%);
}

.enlightenment-gradient {
  background: linear-gradient(135deg, 
    rgba(245, 158, 11, 0.1) 0%, 
    rgba(251, 191, 36, 0.1) 50%, 
    rgba(252, 211, 77, 0.1) 100%);
}

/* Success/Error Message Styling */
.form-message {
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin-top: 1rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  animation: slide-in 0.3s ease-out;
}

.form-message.success {
  background-color: rgba(5, 150, 105, 0.1);
  border: 1px solid rgba(5, 150, 105, 0.3);
  color: #059669;
}

.form-message.error {
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

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

/* Quick Feedback Styling */
.quick-feedback {
  font-size: 0.875rem;
  margin-top: 0.25rem;
  animation: fade-in 0.2s ease-out;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Mobile Responsive Adjustments */
@media (max-width: 1024px) {
  .left-column {
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
  }
  
  .right-column {
    position: static;
    max-height: none;
    overflow-y: visible;
  }
}

/* Additional Mobile Optimizations */
@media (max-width: 768px) {
  .text-3xl.lg\:text-4xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
  }
  
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .grid.grid-cols-1.lg\:grid-cols-2 {
    gap: 2rem;
  }
  
  .floating {
    animation: none; /* Disable floating animation on mobile for better performance */
  }
  
  .mystical-glow {
    animation: none; /* Disable complex animations on mobile */
  }
  
  /* Enhanced mobile form styling */
  #leadForm input {
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  #leadForm button[type="submit"] {
    padding: 1rem;
    font-size: 1rem;
  }
}

/* Loading Spinner */
.spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Glass Effect Enhancements */
.glass-effect {
  backdrop-filter: blur(10px);
  background: rgba(17, 24, 39, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.backdrop-blur-sm {
  backdrop-filter: blur(8px);
}

.backdrop-blur-md {
  backdrop-filter: blur(12px);
}

/* Smooth Transitions */
* {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Focus Accessibility */
button:focus,
input:focus,
a:focus {
  outline: 2px solid var(--dynamic-primary);
  outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .bg-white\/80 {
    background-color: white;
  }
  
  .bg-white\/60 {
    background-color: white;
  }
  
  .backdrop-blur-sm,
  .backdrop-blur-md {
    backdrop-filter: none;
  }
}

/* Special spiritual elements */
.chakra-glow {
  animation: chakra-glow 4s ease-in-out infinite;
}

@keyframes chakra-glow {
  0%, 100% {
    filter: hue-rotate(0deg) brightness(1);
  }
  25% {
    filter: hue-rotate(90deg) brightness(1.1);
  }
  50% {
    filter: hue-rotate(180deg) brightness(1.2);
  }
  75% {
    filter: hue-rotate(270deg) brightness(1.1);
  }
}

/* Enhanced video/image containers */
.media-container {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.media-container iframe,
.media-container video,
.media-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Dark theme support */
.dark-theme {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
}

/* Print styles */
@media print {
  .floating,
  .mystical-glow,
  .pulse-glow,
  .chakra-glow {
    animation: none;
  }
  
  .glass-effect {
    backdrop-filter: none;
    background: white;
    border: 1px solid #ddd;
  }
}

/* --- Custom Mobile Column Reversal --- */
@media (max-width: 1023px) {
  .right-column {
    order: 2 !important;
  }

  .order-2 {
    order: 1 !important;
  }

  .order-1 {
    order: 2 !important;
  }
}