/* Optimized font loading - preload critical fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Almarai:wght@400;700;800&display=swap');

body {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  font-weight: 300;
  color: #e5e7eb;
  background: #181f2c;
}

h1, .main-heading {
  font-size: 2.1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 0.5em;
}

h2 {
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: #fff;
  margin-bottom: 0.5em;
}

h3 {
  font-size: 1.2rem;
  font-weight: 400;
  color: #fff;
  margin-bottom: 0.5em;
}

/* Public Section Title Classes */
.section-title {
  font-size: 3rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 1.5rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-align: center;
  position: relative;
  z-index: 2;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #FFBF00, #FFD700);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.section-title:hover::after {
  width: 120px;
}

.section-title-large {
  font-size: 3rem;
  font-weight: 600;
  margin-bottom: 2rem;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-align: center;
  position: relative;
  z-index: 2;
  background: white;
  /* background: linear-gradient(90deg, #2563eb 0%, #06b6d4 30%, #6366f1 60%, #a21caf 100%);  */
  /* blue, cyan, indigo, purple */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.section-title-large::after {
  content: '';
  position: absolute;
  bottom: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 5px;
  background: linear-gradient(90deg, #FFBF00, #FFD700); /* yellow gradient for consistency */
  border-radius: 3px;
  transition: width 0.3s ease;
}

.section-title-large:hover::after {
  width: 150px;
}

.section-title-medium {
  font-size: 2.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1.25rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-align: center;
  position: relative;
  z-index: 2;
}

.section-title-medium::after {
  content: '';
  position: absolute;
  bottom: -0.4rem;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #FFBF00, #FFD700);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.section-title-medium:hover::after {
  width: 90px;
}

.section-title-small {
  font-size: 2rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 1rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-align: center;
  position: relative;
  z-index: 2;
}

.section-title-small::after {
  content: '';
  position: absolute;
  bottom: -0.3rem;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 2px;
  background: linear-gradient(90deg, #FFBF00, #FFD700);
  border-radius: 1px;
  transition: width 0.3s ease;
}

.section-title-small:hover::after {
  width: 70px;
}

.section-title-left {
  text-align: left;
}

.section-title-left::after {
  left: 0;
  transform: none;
}

.section-title-right {
  text-align: right;
}

.section-title-right::after {
  left: auto;
  right: 0;
  transform: none;
}

.section-title-pill {
  color: #60a5fa; /* text-blue-400 */
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.5em 1.5em;
  background: rgba(30, 58, 138, 0.2); /* blue-900/30 */
  border-radius: 9999px;
  border: 1px solid rgba(59, 130, 246, 0.2); /* blue-500/30 */
  display: inline-block;
  margin: 0 1em;
}

/* Responsive Section Titles */
@media (max-width: 768px) {
  .section-title {
    font-size: 2.5rem;
    margin-bottom: 1.25rem;
  }
  
  .section-title-large {
    font-size: 3rem;
    margin-bottom: 1.5rem;
  }
  
  .section-title-medium {
    font-size: 2rem;
    margin-bottom: 1rem;
  }
  
  .section-title-small {
    font-size: 1.75rem;
    margin-bottom: 0.875rem;
  }
}

@media (max-width: 480px) {
  .section-title {
    font-size: 2rem;
    margin-bottom: 1rem;
  }
  
  .section-title-large {
    font-size: 2.5rem;
    margin-bottom: 1.25rem;
  }
  
  .section-title-medium {
    font-size: 1.75rem;
    margin-bottom: 0.875rem;
  }
  
  .section-title-small {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
  }
}

/* RTL Support for Section Titles */
html[dir="rtl"] .section-title,
html[dir="rtl"] .section-title-large,
html[dir="rtl"] .section-title-medium,
html[dir="rtl"] .section-title-small {
  direction: rtl;
  unicode-bidi: isolate;
}

html[dir="rtl"] .section-title-left {
  text-align: right;
}

html[dir="rtl"] .section-title-right {
  text-align: left;
}

html[dir="rtl"] .section-title-left::after {
  left: auto;
  right: 0;
  transform: none;
}

html[dir="rtl"] .section-title-right::after {
  left: 0;
  right: auto;
  transform: none;
}

p, .body-text {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.7;
  color: #e5e7eb;
  margin-bottom: 1em;
}

nav a, .nav-link, .mobile-nav-overlay a {
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: #fff;
  transition: color 0.2s;
}
nav a:hover, .nav-link:hover, .mobile-nav-overlay a:hover {
  color: #FFBF00;
}

.button, .btn, button {
  font-size: 1rem;
  font-weight: 400;
  border-radius: 999px;
  padding: 0.6em 1.5em;
  letter-spacing: 0.01em;
}

.stats-number {
  font-size: 1.3rem;
  font-weight: 400;
  color: #fff;
}
.stats-label {
  font-size: 0.95rem;
  font-weight: 300;
  color: #cbd5e1;
}

/* 3D Background Container Styles - Global */
#bg-3d-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: -1 !important;
    pointer-events: none !important;
    overflow: hidden !important;
}

#bg-3d-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* Loader styles */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 41, 59, 0.35);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.18);
  border-radius: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

#loader.fade-out {
  opacity: 0;
  visibility: hidden;
}

#loader-logo {
  width: 200px;
  height: auto;
  opacity: 0;
  transform: scale(0.8);
  animation: logoFadeIn 1.2s ease-out 0.3s forwards;
  filter: drop-shadow(0 8px 24px rgba(255, 191, 0, 0.3));
  margin-bottom: 40px;
}

@keyframes logoFadeIn {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.loader-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  background: none;
  box-shadow: none;
  border-radius: 24px;
  border: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 48px 40px 40px 40px;
  min-width: 320px;
  max-width: 90vw;
}

@media (max-width: 600px) {
  .loader-container {
    padding: 28px 10px 24px 10px;
    min-width: 0;
  }
}

.loader-spinner {
  width: 60px;
  height: 60px;
  position: relative;
  opacity: 0;
  animation: spinnerFadeIn 0.8s ease-out 1s forwards;
}

.loader-spinner::before,
.loader-spinner::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.loader-spinner::before {
  border: 3px solid rgba(255, 191, 0, 0.2);
  animation: pulse 2s ease-in-out infinite;
}

.loader-spinner::after {
  border: 3px solid transparent;
  border-top: 3px solid #FFBF00;
  border-right: 3px solid #FFBF00;
  animation: spin 1.2s linear infinite;
}

@keyframes spinnerFadeIn {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

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

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.2;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.4;
  }
}

.loader-text {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  opacity: 0;
  animation: textFadeIn 0.8s ease-out 1.5s forwards;
  letter-spacing: 1px;
  text-transform: uppercase;
}

@keyframes textFadeIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.loader-progress {
  width: 200px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  opacity: 0;
  animation: progressFadeIn 0.8s ease-out 1.8s forwards;
}

.loader-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #FFBF00, #FFD700);
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s ease-out;
  box-shadow: 0 0 10px rgba(255, 191, 0, 0.5);
}

@keyframes progressFadeIn {
  0% {
    opacity: 0;
    transform: scaleX(0);
  }
  100% {
    opacity: 1;
    transform: scaleX(1);
  }
}

/* Loading dots animation */
.loading-dots {
  display: inline-block;
  margin-left: 8px;
}

.loading-dots::after {
  content: '';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%, 20% { content: ''; }
  40% { content: '.'; }
  60% { content: '..'; }
  80%, 100% { content: '...'; }
}

/* Responsive design */
@media (max-width: 768px) {
  #loader-logo {
    width: 150px;
    margin-bottom: 30px;
  }
  
  .loader-spinner {
    width: 50px;
    height: 50px;
  }
  
  .loader-text {
    font-size: 12px;
  }
  
  .loader-progress {
    width: 160px;
  }
}

@media (max-width: 480px) {
  #loader-logo {
    width: 120px;
    margin-bottom: 25px;
  }
  
  .loader-spinner {
    width: 40px;
    height: 40px;
  }
  
  .loader-text {
    font-size: 11px;
  }
  
  .loader-progress {
    width: 140px;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  #loader {
    background: #000;
  }
  
  .loader-spinner::after {
    border-top-color: #fff;
    border-right-color: #fff;
  }
  
  .loader-progress-bar {
    background: #fff;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  #loader-logo,
  .loader-spinner,
  .loader-text,
  .loader-progress {
    animation: none;
    opacity: 1;
    transform: none;
  }
  
  .loader-spinner::after {
    animation: spin 2s linear infinite;
  }
  
  .loader-spinner::before {
    animation: none;
  }
}

::-webkit-scrollbar {
  width: 4px; 
}

::-webkit-scrollbar-track {
  background: rgba(31, 41, 55, 0.1); 
  border-radius: 6px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #FFBF00, #FFD700); 
  border-radius: 6px; 
  border: 1px solid rgba(31, 41, 55, 0.1);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #FFD700, #FFBF00);
  box-shadow: 0 0 8px rgba(255, 191, 0, 0.4);
}

::-webkit-scrollbar-corner {
  background: rgba(31, 41, 55, 0.1);
}


header, main, footer {
position: relative; 
z-index: 10; 

}

.card-image {
background-size: cover;
background-position: center;
height: 300px;
display: flex;
align-items: flex-end;
transition: transform 0.3s ease-in-out;
}
.card-image > div {
background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
width: 100%;
}



.carousel-container {
overflow: hidden;
width: 100%;
}

.carousel-inner {
display: flex;
transition: transform 0.5s ease-in-out;
}

.carousel-item {
flex: 0 0 calc(100% / var(--items-per-page));
box-sizing: border-box;
}
#fullWidthSearchContainer {
background-color: #18202e;
color: white; 
}
.animate-fade-in-up.active-animation {
animation: fadeInUp 0.8s ease-out forwards;
}

.animate-pulse-grow.active-animation {
animation: pulseGrow 1.5s infinite alternate;
}

/* Mobile navigation overlay styles are now handled in header.css */
    .frosted-glass {
            background-color: rgba(255, 255, 255, 0.2); 
            backdrop-filter: blur(10px) saturate(180%); 
            -webkit-backdrop-filter: blur(10px) saturate(180%);
            border: 1px solid rgba(255, 255, 255, 0.3); 
            box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
        }

        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.7); 
            justify-content: center;
            align-items: center; 
            z-index: 1000; 
            display: none; 
        }

        .modal-overlay.active {
            display: flex; 
        }

/* Close button styles are now handled in header.css */
.nav-link-active{
  border-bottom: 2px solid #FFBF00; 
}

.slider-container{
  width: 100%;
  padding: 40px 0;
  display: flex;
  justify-content: center; 
  align-items: center;
}
.slider-content {
  overflow: hidden;
  margin: 0 40px;
  display: flex; 
  justify-content: center; 
}
.card {
  background-color: rgb(31, 41, 55); 
  border: 1px solid rgb(55, 65, 81); 
  border-radius: 0.5rem; 
  padding: 2rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1); 
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 300ms; 
  transform: scale(1); 
  animation: pulse-grow 2s infinite ease-in-out; 
 width: 100%; 
}
.image-content,
.card-content {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  align-items: left;
}
.image-content {
  position: relative;
  row-gap: 5px;
  padding: 25px 0;
}
.overlay {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgb(31, 41, 55);
}
.overlay::before,
.overlay::after{
    content: "";
    position: absolute;
    right: 0;
    bottom: -40px;
    width: 40px;
    height: 40px;
    background-color: rgb(31, 41, 55);
}
.overlay::after{
    background-color:  rgb(31, 41, 55);
}
.card-image {
  position: relative;
  height: 100%;
  width: 100%;
  background-color:  rgb(31, 41, 55);
  border-radius: 50%;
}
.card-image .card-img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}
.name {
  font-size: 20px;
  font-weight: 400;
  color: white;
  
}
.description {
  font-size: 14px;
  color: rgb(209 213 219);
  text-align: left;
}
.button {
  border: none;
  outline: none;
  font-size: 14px;
  background-color: #4070f4;
  color: white;
  margin: 14px 0 14px 0;
  padding: 8px 16px;
  border-radius: 50px;
  font-weight: 400;
  cursor: pointer;
  transition: all ease 0.3s;
}
.button:hover {
  background-color: #265df2;
}
.swiper-navBtn{
  color: #6e93f7;
  transition: color 0.3s ease;
}
.swiper-navBtn:hover{
  color: #4070f4;
}
.swiper-navBtn::before,
.swiper-navBtn::after{
  font-size: 16px;
}
.swiper-button-next{
  right: 0;
}
.swiper-button-prev{
  left: 0;
}


/*partner Section*/

    .slide-logo {
        height: 100px;
        width: 250px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .slide-logo img {
        height: 100%; 
        width: 100%;  
        object-fit: contain; 
    }

    .slide-track-logo {
    
        display: flex;
        gap: 3em;
        width: fit-content; 
        min-width: 100%; 
        animation: scroll 60s linear infinite; 
    }

    .slider-logo {
        background-color: #1F2937;
        padding: 30px;
        overflow: hidden; 
        position: relative;
        width: 100%; 
        text-align: center; 
    }

    @keyframes scroll {
        0% { transform: translateX(0); }
        100% { transform: translateX(-100%); } 
    }



    .animate-fade-in-up {  opacity: 1; transform: translateY(0); }

    /* End of This Section */

@media screen and (max-width:768px) {
  .slider-content{
    margin: 0 10px;
  }
  .swiper-navBtn{
    display: none;
  }
}
@media (max-width: 768px) {
.carousel-item {
flex: 0 0 100%;
}
}

@media (min-width: 769px) and (max-width: 1024px) {
.carousel-item {
flex: 0 0 50%;
}

}

@media (min-width: 1025px) {
.carousel-item {
flex: 0 0 33.3333%;
}

}

                                          
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}

@keyframes pulseGrow {
0% {
transform: scale(1);
}
50% {
transform: scale(1.05);
}
100% {
transform: scale(1);
}
}

/* Explore Button Styles - Based on scroll-to-top button */
.explore-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.2));
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  color: #3B82F6;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
  min-width: 120px;
  position: relative;
  overflow: hidden;
}

.explore-btn:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.3));
  border-color: rgba(59, 130, 246, 0.5);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.2);
  color: #60A5FA;
  text-decoration: none;
}

.explore-btn:active {
  transform: translateY(-1px) scale(1.02);
}

.explore-btn span {
  transition: all 0.3s ease;
  z-index: 1;
  position: relative;
}

.explore-btn:hover span {
  transform: translateY(-2px);
}

/* Focus states for accessibility */
.explore-btn:focus {
  outline: 2px solid rgba(59, 130, 246, 0.5);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .explore-btn {
    border: 2px solid #3B82F6;
    background: rgba(59, 130, 246, 0.3);
  }
  
  .explore-btn:hover {
    background: rgba(59, 130, 246, 0.5);
  }
}

/* Reduced motion support for explore button */
@media (prefers-reduced-motion: reduce) {
  .explore-btn,
  .explore-btn span {
    transition: none;
  }
  
  .explore-btn:hover {
    transform: none;
  }
}

/* Responsive adjustments for explore button */
@media (max-width: 768px) {
  .explore-btn {
    min-width: 100px;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .explore-btn {
    min-width: 90px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}
}

html[dir="rtl"] body,
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] .main-heading,
html[dir="rtl"] .section-title,
html[dir="rtl"] .section-title-large,
html[dir="rtl"] .section-title-medium,
html[dir="rtl"] .section-title-small,
html[dir="rtl"] p,
html[dir="rtl"] .body-text,
html[dir="rtl"] nav a,
html[dir="rtl"] .nav-link,
html[dir="rtl"] .mobile-nav-overlay a,
html[dir="rtl"] .button,
html[dir="rtl"] .btn,
html[dir="rtl"] button {
  font-family: 'Almarai', 'Montserrat', sans-serif !important;
  line-height: 1.6;
}

html[dir="rtl"] .flex.justify-center.space-x-4,

/* Hero Image Transition Effects */
.hero-background-wrapper {
    position: relative;
    overflow: hidden;
}

.hero-background-wrapper img {
    transition: opacity 0.8s ease-in-out;
}

/* Slide transition effects */
.slide-out-left {
    animation: slideOutLeft 0.5s ease-in-out forwards;
}

.slide-in-right {
    animation: slideInRight 0.5s ease-in-out forwards;
}

@keyframes slideOutLeft {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(-100%);
        opacity: 0;
    }
}

@keyframes slideInRight {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Crossfade transition for images */
.hero-image-container {
    position: absolute;
    overflow: hidden;
    width: 100%; 
    height: 100%;
}

.hero-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
    transform: scale(1);
}

.hero-image-container img.transitioning {
    transform: scale(1.1);
}

.hero-image-container img.zooming {
    animation: slowZoom 8s ease-in-out infinite;
}

@keyframes slowZoom {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Swipe animation effects */
.swipe-left {
    animation: swipeLeft 0.5s ease-in-out;
}

.swipe-right {
    animation: swipeRight 0.5s ease-in-out;
}

@keyframes swipeLeft {
    0% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(-20px);
    }
    100% {
        transform: translateX(0);
    }
}

@keyframes swipeRight {
    0% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(20px);
    }
    100% {
        transform: translateX(0);
    }
}
html[dir="rtl"] .flex.justify-center.space-x-2 {
  flex-direction: row-reverse !important;
}

/* Popup Notification Styles */
.popup-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  max-width: 400px;
  min-width: 300px;
  background: #1f2937;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  border: 1px solid #374151;
  animation: slideInRight 0.3s ease-out;
}

.popup-content {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  gap: 12px;
}

.popup-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.popup-error .popup-icon {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.popup-success .popup-icon {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.popup-warning .popup-icon {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.popup-info .popup-icon {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.popup-message {
  flex: 1;
  color: #f9fafb;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
}

.popup-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.popup-close:hover {
  background: rgba(156, 163, 175, 0.1);
  color: #d1d5db;
}

.popup-close:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Popup animations */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Mobile responsive */
@media (max-width: 768px) {
  .popup-notification {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
    min-width: auto;
  }
  
  .popup-content {
    padding: 14px 16px;
  }
  
  .popup-message {
    font-size: 13px;
  }
}

/* RTL support */
html[dir="rtl"] .popup-notification {
  right: auto;
  left: 20px;
  animation: slideInLeft 0.3s ease-out;
}

html[dir="rtl"] .popup-notification.fade-out {
  animation: slideOutLeft 0.3s ease-out;
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutLeft {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-100%);
    opacity: 0;
  }
}

@media (max-width: 768px) {
  html[dir="rtl"] .popup-notification {
    left: 10px;
    right: 10px;
  }
}

/* Unified Yellow Spinner for Sections */
.section-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 191, 0, 0.2);
    border-top: 3px solid #FFBF00;
    border-radius: 50%;
    animation: sectionSpin 1s linear infinite;
    margin: 0 auto;
    flex-shrink: 0;
}

.section-spinner.small {
    width: 24px;
    height: 24px;
    border-width: 2px;
    margin: 0 auto;
    flex-shrink: 0;
}

.section-spinner.large {
    width: 60px;
    height: 60px;
    border-width: 4px;
    margin: 0 auto;
    flex-shrink: 0;
}

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

/* Section Loading Container */
.section-loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    min-height: 200px;
    width: 100%;
    position: relative;
}

.section-loading-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: #6b7280;
    margin-top: 1rem;
    letter-spacing: 0.5px;
    text-align: center;
    width: 100%;
}

/* Loading State for Cards */
.card-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 191, 0, 0.2);
    border-top: 2px solid #FFBF00;
    border-radius: 50%;
    animation: sectionSpin 1s linear infinite;
    z-index: 10;
}

/* Modal Loading States */
.modal-loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    min-height: 300px;
    width: 100%;
    position: relative;
}

.modal-loading-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: #6b7280;
    margin-top: 1rem;
    letter-spacing: 0.5px;
    text-align: center;
    width: 100%;
}

/* Responsive Design for Spinners */
@media (max-width: 768px) {
    .section-spinner {
        width: 32px;
        height: 32px;
        border-width: 2.5px;
    }
    
    .section-spinner.large {
        width: 48px;
        height: 48px;
        border-width: 3px;
    }
    
    .section-loading-text {
        font-size: 0.9rem;
    }
    
    .modal-loading-text {
        font-size: 1rem;
    }
    
    .section-loading-container {
        min-height: 150px;
        padding: 1.5rem;
    }
    
    .modal-loading-container {
        min-height: 250px;
        padding: 2rem 1rem;
    }
}

@media (max-width: 480px) {
    .section-spinner {
        width: 28px;
        height: 28px;
        border-width: 2px;
    }
    
    .section-spinner.large {
        width: 40px;
        height: 40px;
        border-width: 2.5px;
    }
    
    .section-loading-text {
        font-size: 0.85rem;
    }
    
    .modal-loading-text {
        font-size: 0.9rem;
    }
    
    .section-loading-container {
        min-height: 120px;
        padding: 1rem;
    }
    
    .modal-loading-container {
        min-height: 200px;
        padding: 1.5rem 0.5rem;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .section-spinner {
        border-color: #000;
        border-top-color: #FFD700;
    }
    
    .card-loading::after {
        border-color: #000;
        border-top-color: #FFD700;
    }
}

/* Swiper Slide Loading Centering */
.swiper-slide .section-loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 200px;
}

.swiper-slide .modal-loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 300px;
}

/* Grid Container Loading Centering */
.grid .modal-loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 300px;
    grid-column: 1 / -1;
}

.grid .section-loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 200px;
    grid-column: 1 / -1;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .section-spinner,
    .card-loading::after {
        animation: sectionSpin 2s linear infinite;
    }
}
