/* ==========================================================================
   CR Dental Wellness - Modernization CSS
   Added: 2026 Modernization Update
   ========================================================================== */

/* Bootstrap 5 compatibility - legacy class aliases */
.pull-left {
  float: left !important;
}
.pull-right {
  float: right !important;
}

/* Modern Preloader */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}

.preloader::after {
  content: "";
  width: 50px;
  height: 50px;
  border: 4px solid #4c68ac;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Scroll to Top - Modern styling */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: #4c68ac;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 9999;
  box-shadow: 0 4px 15px rgba(76, 104, 172, 0.3);
}

.scroll-to-top:hover {
  background: #3a5299;
  transform: translateY(-3px);
}

.scroll-to-top span {
  font-size: 20px;
}

/* Swiper Carousel Compatibility */
.swiper {
  width: 100%;
  overflow: hidden;
}

.swiper-wrapper {
  display: flex;
}

.swiper-slide {
  flex-shrink: 0;
}

/* Main Slider Swiper */
.main-slider-carousel.swiper {
  position: relative;
}

.main-slider-carousel .swiper-slide {
  min-height: 600px;
  background-size: cover;
  background-position: center;
}

.main-slider-carousel .swiper-button-prev,
.main-slider-carousel .swiper-button-next {
  color: #fff;
  width: 50px;
  height: 50px;
  background: rgba(76, 104, 172, 0.8);
  border-radius: 50%;
}

.main-slider-carousel .swiper-button-prev::after,
.main-slider-carousel .swiper-button-next::after {
  font-size: 18px;
}

.main-slider-carousel .swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background: #fff;
  opacity: 0.5;
}

.main-slider-carousel .swiper-pagination-bullet-active {
  opacity: 1;
  background: #4c68ac;
}

/* Team Carousel Swiper */
.three-item-carousel.swiper {
  padding: 20px 0;
}

.three-item-carousel .swiper-slide {
  padding: 0 15px;
  box-sizing: border-box;
}

.three-item-carousel .swiper-button-prev,
.three-item-carousel .swiper-button-next {
  color: #4c68ac;
  background: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.three-item-carousel .swiper-button-prev::after,
.three-item-carousel .swiper-button-next::after {
  font-size: 16px;
}

/* Modern Animation Classes (compatible with Animate.css v4) */
.animated {
  animation-duration: 1s;
  animation-fill-mode: both;
}

.animate__animated {
  animation-duration: 1s;
  animation-fill-mode: both;
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

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

.fadeInLeft {
  animation-name: fadeInLeft;
}
.fadeInRight {
  animation-name: fadeInRight;
}
.fadeInUp {
  animation-name: fadeInUp;
}
.fadeIn {
  animation-name: fadeIn;
}

/* Mobile Menu - Touch Friendly */
.mobile-menu .menu-outer {
  padding: 20px;
}

.mobile-menu .navigation li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu .navigation li a {
  padding: 12px 0;
  display: block;
}

.mobile-menu .dropdown-btn {
  position: absolute;
  right: 0;
  top: 10px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Accordion Modern CSS Transitions */
.accordion-box .acc-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.accordion-box .accordion.active-block .acc-content {
  max-height: 500px;
}

/* Form Modern Styles */
input[type="date"],
input[type="time"],
input[type="datetime-local"] {
  appearance: none;
  -webkit-appearance: none;
}

/* GLightbox Override */
.glightbox-clean .gclose,
.glightbox-clean .gnext,
.glightbox-clean .gprev {
  background: rgba(76, 104, 172, 0.8);
}

/* Focus Visible for Accessibility */
:focus-visible {
  outline: 2px solid #4c68ac;
  outline-offset: 2px;
}

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

/* Modern Typography Improvements */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Reduced 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;
  }

  html {
    scroll-behavior: auto;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .btn-style-one,
  .btn-style-two {
    border: 2px solid currentColor;
  }
}

/* Print Styles */
@media print {
  .preloader,
  .scroll-to-top,
  .mobile-menu,
  .mobile-nav-toggler {
    display: none !important;
  }
}
