/* Global Body Styling */
body {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  min-height: 100vh;
}

/* Glass effect utilities */
.glass {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.glass-dark {
  background: rgba(30, 64, 175, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(30, 64, 175, 0.2);
}

/* Page Loader Styles */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
  margin: 0;
  padding: 0;
}

.loader-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 300px;
  padding: 20px;
}

.loader-logo {
  position: relative;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-logo-img {
  width: 120px;
  height: auto;
  object-fit: contain;
  animation: logoFadeIn 1s ease-in-out, logoPulse 2s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(30, 64, 175, 0.2));
  z-index: 2;
  position: relative;
}

.loader-icon {
  width: 140px;
  height: 140px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.loader-icon:before,
.loader-icon:after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid transparent;
}

.loader-icon:before {
  border-top-color: #1e40af;
  border-bottom-color: #1e40af;
  animation: spin 2s linear infinite;
}

.loader-icon:after {
  border-left-color: #3b82f6;
  border-right-color: #3b82f6;
  animation: spin 1.5s linear infinite reverse;
}

.loader-text {
  color: #1e40af;
  font-weight: 700;
  letter-spacing: 2px;
  margin: 10px 0 5px 0;
  font-size: 20px;
  display: block;
  text-align: center;
  animation: textSlideUp 0.8s ease-out 0.5s both;
}

.loader-subtitle {
  color: #6b7280;
  font-weight: 400;
  font-size: 14px;
  margin-bottom: 20px;
  animation: textSlideUp 0.8s ease-out 0.7s both;
}

.loader-progress {
  width: 220px;
  height: 6px;
  background-color: #e5e7eb;
  border-radius: 3px;
  margin: 15px auto 0 auto;
  overflow: hidden;
  display: block;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  animation: progressSlideUp 0.8s ease-out 0.9s both;
}

.loader-progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #1e40af, #3b82f6, #1e40af);
  background-size: 200% 100%;
  animation: progressFlow 2s ease-in-out infinite;
  transition: width 0.3s ease;
  border-radius: 3px;
}

.page-content {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.page-loaded .page-content {
  opacity: 1;
}

.page-loaded .page-loader {
  opacity: 0;
  visibility: hidden;
}

/* Ensure no scrollbars during loading */
body.loading {
  overflow: hidden;
}

@keyframes logoFadeIn {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes logoPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

@keyframes textSlideUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes progressSlideUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes progressFlow {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Mobile responsive adjustments for loader */
@media (max-width: 768px) {
  .loader-logo-img {
    width: 100px;
  }

  .loader-icon {
    width: 120px;
    height: 120px;
  }

  .loader-text {
    font-size: 18px;
  }

  .loader-progress {
    width: 180px;
  }
}

@media (max-width: 480px) {
  .loader-logo-img {
    width: 80px;
  }

  .loader-icon {
    width: 100px;
    height: 100px;
  }

  .loader-text {
    font-size: 16px;
    letter-spacing: 1px;
  }

  .loader-progress {
    width: 160px;
    height: 4px;
  }

  .loader-content {
    max-width: 250px;
  }
}

/* Mobile Menu Styles */
#mobileMenu {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
}

#mobileMenuOverlay {
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* Hamburger Menu Animation */
#mobileMenuToggle span {
  transform-origin: center;
}

/* Mobile Menu Hover Effects */
.mobile-menu-item {
  position: relative;
  overflow: hidden;
}

.mobile-menu-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(30, 64, 175, 0.1), transparent);
  transition: left 0.5s;
}

.mobile-menu-item:hover::before {
  left: 100%;
}

/* Smooth scrolling for mobile menu links */
.mobile-menu-link {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-link:hover {
  transform: translateX(8px);
}

/* Mobile submenu animation */
.mobile-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out;
}

.mobile-submenu.open {
  max-height: 300px;
}

/* Mobile menu responsive adjustments */
@media (max-width: 480px) {
  #mobileMenu {
    width: 100vw;
    max-width: 100vw;
  }
}

@media (max-width: 320px) {
  .mobile-menu-link {
    font-size: 0.9rem;
  }

  .mobile-menu-link i {
    width: 1rem;
    height: 1rem;
  }
}

/* Improved touch targets for mobile */
.mobile-menu-link {
  min-height: 48px;
  display: flex;
  align-items: center;
}

/* Loading animation for mobile menu */
.mobile-menu-loading {
  opacity: 0;
  transform: translateY(20px);
  animation: slideInUp 0.3s ease-out forwards;
}

@keyframes slideInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stagger animation for menu items */
.mobile-menu-item:nth-child(1) {
  animation-delay: 0.1s;
}

.mobile-menu-item:nth-child(2) {
  animation-delay: 0.15s;
}

.mobile-menu-item:nth-child(3) {
  animation-delay: 0.2s;
}

.mobile-menu-item:nth-child(4) {
  animation-delay: 0.25s;
}

.mobile-menu-item:nth-child(5) {
  animation-delay: 0.3s;
}

.mobile-menu-item:nth-child(6) {
  animation-delay: 0.35s;
}

/* Touch device optimizations */
.touch-device .btn,
.touch-device button,
.touch-device a {
  -webkit-tap-highlight-color: rgba(30, 64, 175, 0.1);
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.touch-device .btn:active,
.touch-device button:active,
.touch-device a:active,
.touch-active {
  transform: scale(0.98);
  transition: transform 0.1s ease;
}

/* Hero slider mobile optimizations */
@media (max-width: 768px) {

  .swiper-button-next,
  .swiper-button-prev {
    opacity: 0.8;
  }

  .swiper-button-next:active,
  .swiper-button-prev:active {
    opacity: 1;
    transform: scale(0.9);
  }

  .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    margin: 0 4px;
  }

  .swiper-pagination-bullet-active {
    width: 16px;
    border-radius: 4px;
  }
}

/* Smooth transitions for mobile interactions */
@media (hover: none) and (pointer: coarse) {
  .mobile-menu-link:hover {
    transform: none;
  }

  .mobile-menu-link:active {
    background-color: rgba(30, 64, 175, 0.1);
    transform: translateX(4px);
  }
}

/* Performance optimizations for mobile */
.mobile-menu-item,
.loader-logo-img,
.swiper-slide {
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .loader-logo-img {
    animation: none;
  }

  .loader-icon:before,
  .loader-icon:after {
    animation: none;
  }

  .animate-fade-in,
  .animate-slide-up {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}