/* WFA Crystal Effects - Common Styles */

/* RTL Support */
[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .rtl\:flex-row-reverse {
  flex-direction: row-reverse;
}

[dir="rtl"] .rtl\:text-right {
  text-align: right;
}

[dir="rtl"] .rtl\:text-left {
  text-align: left;
}

[dir="rtl"] .rtl\:mr-auto {
  margin-right: auto;
  margin-left: 0;
}

[dir="rtl"] .rtl\:ml-auto {
  margin-left: auto;
  margin-right: 0;
}

[dir="rtl"] .rtl\:pr-4 {
  padding-right: 1rem;
  padding-left: 0;
}

[dir="rtl"] .rtl\:pl-4 {
  padding-left: 1rem;
  padding-right: 0;
}

[dir="rtl"] .rtl\:mr-4 {
  margin-right: 1rem;
  margin-left: 0;
}

[dir="rtl"] .rtl\:ml-4 {
  margin-left: 1rem;
  margin-right: 0;
}

[dir="rtl"] .rtl\:border-r {
  border-right: 1px solid;
  border-left: 0;
}

[dir="rtl"] .rtl\:border-l-0 {
  border-left: 0;
}

/* RTL adjustments for flex containers */
[dir="rtl"] .flex {
  flex-direction: row-reverse;
}

[dir="rtl"] .flex-row {
  flex-direction: row-reverse;
}

[dir="rtl"] .space-x-3 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-x-reverse: 1;
  margin-right: calc(0.75rem * var(--tw-space-x-reverse));
  margin-left: calc(0.75rem * calc(1 - var(--tw-space-x-reverse)));
}

/* RTL order adjustments for header */
[dir="rtl"] .order-1.rtl\:order-2 {
  order: 2;
}

[dir="rtl"] .order-2.rtl\:order-1 {
  order: 1;
}

/* Ensure nav container reverses in RTL */
[dir="rtl"] nav.flex.justify-between {
  flex-direction: row-reverse;
}

/* RTL Centering fixes */
[dir="rtl"] .rtl\:justify-center {
  justify-content: center;
}

[dir="rtl"] .text-center,
[dir="rtl"] .rtl\:text-center {
  text-align: center !important;
}

/* RTL flex centering */
[dir="rtl"] .items-center {
  align-items: center;
}

[dir="rtl"] .justify-center {
  justify-content: center;
}

/* Social media icons centering in RTL */
[dir="rtl"] .flex.justify-center {
  justify-content: center !important;
}

/* Footer Follow Us alignment fix for RTL */
[dir="rtl"] footer .flex.space-x-4.justify-center {
  justify-content: center !important;
  flex-direction: row-reverse;
}

/* Footer Quick Links text alignment */
[dir="rtl"] footer ul li {
  text-align: right;
}
[dir="rtl"] footer ul li a {
  justify-content: flex-end;
}
[dir="rtl"] footer ul li a.rtl\:justify-end {
  justify-content: flex-end !important;
}

/* Navigation menu order - ensure proper RTL reversal */
/* In RTL, we want the same visual order: Home (rightmost), then Gallery, Services, Funding Form, Contact (leftmost) */
[dir="rtl"] nav .flex.space-x-6 {
  flex-direction: row-reverse !important;
}

/* Ensure navigation menu items order correctly in RTL */
[dir="rtl"] .flex.space-x-6.rtl\:flex-row-reverse {
  flex-direction: row-reverse !important;
}

/* Footer Quick Links alignment - ensure proper alignment in RTL */
[dir="rtl"] .footer-quick-links li a {
  justify-content: flex-end !important;
}

/* Footer Quick Links - align left in English, right in Urdu */
footer ul li a {
  justify-content: flex-start;
}
[dir="rtl"] footer ul li a {
  justify-content: flex-end !important;
}

/* Ensure icons are positioned on right in RTL for all sections */
[dir="rtl"] .flex.items-center.gap-3.rtl\:flex-row-reverse > div:first-child,
[dir="rtl"] .flex.items-center.gap-4.rtl\:flex-row-reverse > div:first-child {
  order: 2 !important;
}
[dir="rtl"] .flex.items-center.gap-3.rtl\:flex-row-reverse > div:last-child,
[dir="rtl"] .flex.items-center.gap-4.rtl\:flex-row-reverse > div:last-child {
  order: 1 !important;
}

/* Banner Join Our Community icons - ensure icons on right in RTL */
[dir="rtl"] .flex.items-center.gap-3.rtl\:flex-row-reverse {
  flex-direction: row-reverse !important;
}

/* Ensure icons stay on right side of text in RTL */
[dir="rtl"] .flex.items-center.rtl\:flex-row-reverse > div:first-child {
  order: 2;
}
[dir="rtl"] .flex.items-center.rtl\:flex-row-reverse > div:last-child {
  order: 1;
}

/* Gradient Animation */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Floating Animation */
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(50px, -50px) scale(1.1); }
  50% { transform: translate(-30px, -100px) scale(0.9); }
  75% { transform: translate(-50px, 50px) scale(1.05); }
}

/* Shimmer Animation */
@keyframes shimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* Slide In Animation */
@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Slide Out Animation */
@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

/* Fade In Up Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade In Animation */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Zoom In Animation */
@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Gradient Background */
.wfa-gradient-bg {
  background: linear-gradient(135deg, #fef3f7 0%, #f0f9ff 25%, #fce7f3 50%, #e0e7ff 75%, #fef3f7 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

/* Floating Crystal Orbs */
.crystal-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  animation: float 20s infinite ease-in-out;
  pointer-events: none;
}

.crystal-orb-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.4), transparent);
  top: 10%;
  left: 5%;
  animation-delay: 0s;
}

.crystal-orb-2 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.4), transparent);
  top: 60%;
  right: 10%;
  animation-delay: 5s;
}

.crystal-orb-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(244, 114, 182, 0.3), transparent);
  bottom: 10%;
  left: 20%;
  animation-delay: 10s;
}

.crystal-orb-4 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.3), transparent);
  top: 30%;
  right: 30%;
  animation-delay: 15s;
}

/* Crystal Glass Effect */
.crystal-glass {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.2));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(236, 72, 153, 0.15), 
              inset 0 1px 1px rgba(255, 255, 255, 0.5),
              0 0 0 1px rgba(255, 255, 255, 0.3);
}

/* Crystal Button */
.crystal-button {
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3),
              inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.button-crystal {
  box-shadow: 0 8px 25px rgba(236, 72, 153, 0.4),
              0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  position: relative;
  overflow: hidden;
}

.button-crystal::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.button-crystal:hover::before {
  left: 100%;
}

/* Crystal Input */
.crystal-input {
  transition: all 0.3s ease;
}

.crystal-input:focus {
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.1),
              0 4px 15px rgba(236, 72, 153, 0.2);
}

/* Shimmer Text */
.shimmer-text {
  background-size: 200% auto;
  animation: shimmer 3s linear infinite;
}

/* Animation Classes */
.animate-slideIn {
  animation: slideIn 0.3s ease-out;
}

.animate-fadeInUp {
  animation: fadeInUp 0.6s ease-out;
}

.animate-fadeIn {
  animation: fadeIn 0.6s ease-out;
}

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

/* Page Header Styles */
.wfa-page-header {
  text-align: center;
  margin-bottom: 3rem;
}

.wfa-page-header-box {
  display: inline-block;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.4);
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 20px 40px rgba(236, 72, 153, 0.15), 
              inset 0 1px 1px rgba(255, 255, 255, 0.5),
              0 0 0 1px rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.5);
  margin-bottom: 1rem;
}

.wfa-page-title {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
  background: linear-gradient(to right, #ec4899, #f43f5e, #a855f7, #38bdf8);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% auto;
  animation: shimmer 3s linear infinite;
}

.wfa-page-subtitle {
  font-size: 1.125rem;
  color: #374151;
  max-width: 48rem;
  margin: 0 auto;
  line-height: 1.75;
}

.wfa-divider {
  height: 0.25rem;
  width: 8rem;
  background: linear-gradient(to right, #f472b6, #fbcfe8, #c084fc);
  margin: 0 auto 1rem;
  border-radius: 9999px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Crystal Container */
.wfa-crystal-container {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.3));
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(236, 72, 153, 0.15), 
              inset 0 1px 1px rgba(255, 255, 255, 0.5),
              0 0 0 1px rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Notification Styles */
.wfa-notification {
  position: fixed;
  top: 5rem;
  right: 1rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2),
              inset 0 1px 1px rgba(255, 255, 255, 0.5),
              0 0 0 1px rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.5);
  z-index: 50;
  animation: slideIn 0.3s ease-out;
}

.wfa-notification-error {
  background: rgba(239, 68, 68, 0.9);
}

.wfa-notification-success {
  background: rgba(255, 255, 255, 0.9);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .crystal-orb {
    filter: blur(40px);
    opacity: 0.3;
  }
  
  .crystal-orb-1, .crystal-orb-2, .crystal-orb-3, .crystal-orb-4 {
    width: 200px;
    height: 200px;
  }
  
  .wfa-page-title {
    font-size: 2rem;
  }
}

