/* Mixed Content Carousel - Frontend Styles */

/* Main Wrapper */
body .mcc-wrapper {
  width: 100%;
  position: relative;
}

/* Skeleton Loader - Always visible initially */
body .mcc-wrapper .mcc-skeleton {
  display: flex !important;
  gap: 16px;
  padding: 20px 0;
  opacity: 1;
  visibility: visible;
  position: relative;
  z-index: 1;
}

body .mcc-wrapper .mcc-skeleton-item {
  flex: 0 0 calc(33.333% - 12px);
  min-height: 280px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: mcc-skeleton-shimmer 1.5s infinite linear;
  border-radius: 12px;
  -webkit-animation: mcc-skeleton-shimmer 1.5s infinite linear;
}

@keyframes mcc-skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@-webkit-keyframes mcc-skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Hide skeleton when carousel is loaded */
body .mcc-wrapper.mcc-loaded .mcc-skeleton {
  display: none !important;
  opacity: 0;
  visibility: hidden;
}

/* Hide carousel until loaded */
body .mcc-wrapper .mcc-swiper {
  opacity: 0;
  pointer-events: none;
  position: relative;
  z-index: 2;
}

body .mcc-wrapper.mcc-loaded .mcc-swiper {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.3s ease-in;
}

/* Responsive skeleton */
@media (max-width: 768px) {
  body .mcc-wrapper .mcc-skeleton-item {
    flex: 0 0 calc(50% - 8px);
    min-height: 250px;
  }
  
  body .mcc-wrapper .mcc-skeleton {
    gap: 8px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  body .mcc-wrapper .mcc-skeleton-item {
    flex: 0 0 calc(40% - 10px);
    min-height: 260px;
  }
  
  body .mcc-wrapper .mcc-skeleton {
    gap: 12px;
  }
}

/* Swiper Container */
body .mcc-wrapper .mcc-swiper {
  position: relative;
  width: 100%;
  overflow: hidden;
  cursor: grab;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  contain: layout style paint;
  will-change: auto;
}

body .mcc-wrapper .mcc-swiper:active {
  cursor: grabbing;
}

/* Minimal fade effect on mobile edges */

body .mcc-wrapper .mcc-swiper::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 20px;
  z-index: 2;
  pointer-events: none;
}


body .mcc-wrapper .mcc-direction-rtl.mcc-swiper::after {
  left: 0;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.8), transparent);
}

body .mcc-wrapper .mcc-direction-ltr.mcc-swiper::after {
  right: 0;
  background: linear-gradient(to left, rgba(255, 255, 255, 0.8), transparent);
}

/* Swiper Wrapper */
body .mcc-wrapper .swiper-wrapper {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  perspective: 1000px;
  -webkit-perspective: 1000px;
}

body .mcc-wrapper .mcc-direction-rtl .swiper-wrapper {
  padding-right: 4px;
}

body .mcc-wrapper .mcc-direction-ltr .swiper-wrapper {
  padding-left: 4px;
}

/* Slide Styling */
body .mcc-wrapper .mcc-slide {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  min-height: 280px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  position: relative;
}

/* Image Styling */
body .mcc-wrapper .mcc-image {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: scale-down;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  margin-bottom: 16px;
  content-visibility: auto;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Title Styling */
body .mcc-wrapper .mcc-title {
  margin: 12px 0 16px;
  font-size: 20px;
  font-weight: 600;
  color: #333;
  line-height: 1.3;
}

/* Button Styling */
body .mcc-wrapper .mcc-button {
  display: inline-block;
  background: #3b485a;
  color: #ffffff !important;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.3s ease;
  border: none;
}

body .mcc-wrapper .mcc-button:hover {
  background: #2a3442;
  color: #ffffff !important;
}

/* Navigation Buttons - Hidden */
body .mcc-wrapper .swiper-button-prev,
body .mcc-wrapper .swiper-button-next {
  display: none !important;
}

/* Pagination Styling */
body .mcc-wrapper .swiper-pagination {
  display: flex !important;
  justify-content: center !important;
  margin-top: 24px !important;
  margin-bottom: 8px !important;
  position: relative !important;
  text-align: center !important;
  z-index: 10 !important;
  transition: 300ms opacity !important;
  transform: translate3d(0, 0, 0) !important;
  padding: 8px 0;
  cursor: pointer;
}

body .mcc-wrapper .swiper-pagination-bullet {
  width: 11px !important;
  height: 11px !important;
  border-radius: 50% !important;
  background: #e0e0e0 !important;
  padding: 0 !important;
  border: 2px solid transparent !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  position: relative !important;
  display: inline-block !important;
  margin: 0 6px !important;
  opacity: 1 !important;
  box-shadow: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

body .mcc-wrapper .swiper-pagination-bullet:hover {
  background: #3b485a !important;
  transform: scale(1.1) !important;
}

body .mcc-wrapper .swiper-pagination-bullet-active {
  background: #3b485a !important;
  border-color: #3b485a !important;
  opacity: 1 !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  body .mcc-wrapper .swiper-wrapper {
    gap: 8px;
  }

  body .mcc-wrapper .mcc-slide {
    padding: 16px;
    min-height: 250px;
  }

  body .mcc-wrapper .mcc-image {
    width: 90px;
    height: 90px;
  }

  body .mcc-wrapper .mcc-title {
    font-size: 16px;
    margin: 8px 0 12px;
  }

  body .mcc-wrapper .mcc-button {
    padding: 10px 20px;
    font-size: 14px;
    color: #ffffff !important;
  }

  body .mcc-wrapper .swiper-pagination {
    margin-top: 16px !important;
  }

  body .mcc-wrapper .swiper-pagination-bullet {
    width: 10px !important;
    height: 10px !important;
  }
}

/* Tablet Responsive */
@media (min-width: 769px) and (max-width: 1024px) {
  body .mcc-wrapper .swiper-wrapper {
    gap: 12px;
  }

  body .mcc-wrapper .mcc-slide {
    padding: 18px;
    min-height: 260px;
  }

  body .mcc-wrapper .mcc-image {
    width: 100px;
    height: 100px;
  }

  body .mcc-wrapper .mcc-title {
    font-size: 18px;
    margin: 10px 0 14px;
  }

  body .mcc-wrapper .mcc-button {
    padding: 11px 22px;
    font-size: 15px;
    color: #ffffff !important;
  }

  body .mcc-wrapper .swiper-pagination {
    margin-top: 16px !important;
  }
}

/* Direction Support - Set dynamically by JavaScript based on carousel setting */
/* No hardcoded direction - allows per-carousel RTL/LTR control */

/* LTR-specific adjustments */
body .mcc-wrapper .mcc-swiper.mcc-direction-ltr,
body .mcc-wrapper .mcc-swiper.mcc-direction-ltr .swiper-wrapper,
body .mcc-wrapper .mcc-swiper.mcc-direction-ltr .swiper-slide,
body .mcc-wrapper .mcc-swiper.mcc-direction-ltr .mcc-slide {
  direction: ltr !important;
  text-align: center;
}

/* RTL-specific adjustments */
body .mcc-wrapper .mcc-swiper.mcc-direction-rtl,
body .mcc-wrapper .mcc-swiper.mcc-direction-rtl .swiper-wrapper,
body .mcc-wrapper .mcc-swiper.mcc-direction-rtl .swiper-slide,
body .mcc-wrapper .mcc-swiper.mcc-direction-rtl .mcc-slide {
  direction: rtl !important;
  text-align: center;
}

/* WordPress Content Filter Cleanup */
body .mcc-wrapper + p,
body .mcc-wrapper + code {
  display: none !important;
}

body .mcc-wrapper .wpb_wrapper > p code,
body .mcc-wrapper .wpb_wrapper > p {
  display: none !important;
}

body .mcc-wrapper p:empty,
body .mcc-wrapper code:empty,
body .mcc-wrapper p code:empty {
  display: none !important;
}

body .mcc-wrapper .wpb_wrapper p:empty,
body .mcc-wrapper .wpb_wrapper p code:empty,
body .mcc-wrapper .wpb_wrapper p code,
body .mcc-wrapper .wpb_wrapper > p,
body .mcc-wrapper .wpb_wrapper p:first-child:last-child {
  display: none !important;
}

body .mcc-wrapper .mcc-slide code {
  background-color: #fff !important;
}

/* Clickable Card Link */
body .mcc-wrapper .mcc-card-link {
  text-decoration: none;
  display: block;
  color: inherit;
  width: 100%;
  height: 100%;
  z-index: 1;
}

body .mcc-wrapper .mcc-card-link:hover {
  text-decoration: none;
  color: inherit;
}

/* Button text styling when card is clickable */
body .mcc-wrapper .mcc-button-text {
  display: inline-block;
  background: #3b485a;
  color: #ffffff !important;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.3s ease;
  border: none;
  margin-top: 10px;
}
