.mba-carousel-container {
  position: relative;
  width: 90%;
  margin: auto;
  overflow: hidden;
  padding-top: 40px;
}
.mba-gallery-container{
padding-left: 20px;
padding-right: 25px;
}

.mba-carousel-wrapper {
  overflow-x: auto; /* Enable horizontal scrolling */
  display: flex;
  scroll-behavior: smooth;
  padding-bottom: 10px; /* Add space for scrollbar */
}

.mba-carousel-items {
  display: flex;
  margin-left: auto;
  margin-right: auto;
  margin-top: 5px;
}
.mba-carousel-item img{
  border-radius: 50%;
}

.mba-carousel-item {
  /* min-width: 150px; */
  margin-right: 25px;
  flex: 0 0 auto;
  text-align: center; /* Center text under images */
  cursor: pointer;
}
.mba-carousel-item img{
  border: 3px solid  transparent;
}
.mba-carousel-item.active img{
  transform: scale(1.05);
    border-color: rgb(59, 130, 246);
}
.mba-carousel-item img {
  display: block;
  width: 100%;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.3s;
  width: 60px;
  height: 60px;
  margin-left: auto;
  margin-right: auto;
  object-fit: cover;
  box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 6px -1px;
  border-width: 3px;
  border-style: solid;
  border-color: transparent;
  border-image: initial;
}

.carousel-item img:hover {
  /* transform: scale(1.05); */
}

.mba-carousel-btns {
  display: none !important;
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mba-carousel-btn {
  background-color: rgba(0,0,0,0.5);
  color: white;
  border: none;
  padding: 10px;
  cursor: pointer;
  z-index: 1;
}

.mba-carousel-btn:disabled {
  background-color: rgba(0,0,0,0.2);
  cursor: not-allowed;
}

/* Custom Scrollbar Styling */
.mba-carousel-wrapper::-webkit-scrollbar {
  height: 8px; /* Height of the scrollbar */
}

.mba-carousel-wrapper::-webkit-scrollbar-track {
  background: #f1f1f1; /* Background of the scrollbar track */
  border-radius: 10px; /* Rounded corners for track */
}

.mba-carousel-wrapper::-webkit-scrollbar-thumb {
  background: #888; /* Color of the scrollbar thumb */
  border-radius: 10px; /* Rounded corners for thumb */
}

.mba-carousel-wrapper::-webkit-scrollbar-thumb:hover {
  background: #555; /* Color on hover */
}


.crtk-ba-set{
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
  justify-content: center;
}
.crtk-before-after-image{
  flex: 0 0 calc(50% - 12.5px);
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  border: 1px solid #cdcdcd;
  padding: 20px;
  max-width: 50%;
  align-items: flex-start;
}
.crtk-item{
  flex: 0 0 calc(50% - 12.5px);
  box-sizing: border-box;
  text-align: center;
  max-width: 50%;
  align-items: center;
  justify-content: center;
  display: flex;
  flex-direction: column;
  /* text-transform: uppercase; */
}
.crtk-item.blurred img{
  filter: blur(18px);
  clip-path: inset(5px);
}
.crtk-ba-set img{
  max-width: 100%;
  height: auto !important;
}
.crtk-read-more{
  flex: 0 0 100%;
  text-align: center;
  margin-top: 0;
}
.crtk-read-more:focus{
    outline: none;
}
.mba-before-after-container.active {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
}
.mba-before-after-container{
text-align: center;
}

.mba-before-after-container.active .crtk-ba-set{
  display: flex;
  flex: 0 0 calc(50% - 12.5px);
  max-width: 50%;
}
.mba-before-after-container.active .crtk-before-after-image{
flex: 0 0 100%;
max-width: 100%;
}

.crtk-ba-set img{
  width: 100%;
  height: 100%;
  /* border-radius: 1rem; */
  object-fit: cover;
}


/* Modal Base Styles */
.crtk-modal {
display: flex;
align-items: center;
justify-content: center;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.95);
z-index: 1000;
padding: 40px 20px;
box-sizing: border-box;
}

/* Carousel Container */
.crtk-carousel {
position: relative;
width: 90%;
max-width: 1200px;
max-height: 85vh;
background: #fff;
border-radius: 12px;
position: relative;
overflow: hidden;
display: flex;
flex-direction: column;
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Carousel Inner */
.crtk-carousel-inner {
width: 100%;
overflow: hidden;
}

/* Carousel Items */
.crtk-carousel-item {
flex: 0 0 100%;
display: none;
opacity: 0;
transition: opacity 0.3s ease;
}

.crtk-carousel-item.active {
display: block;
opacity: 1;
}

/* Carousel Content */
.crtk-carousel-content {
display: flex;
flex-direction: column;
align-items: center;
gap: 20px;
padding: 40px 20px 20px;
overflow-y: auto;
max-height: calc(85vh - 40px);
}

/* Before/After Image Pair */
.crtk-before-after-pair {
display: flex;
gap: 30px;
justify-content: center;
align-items: flex-start;
width: 100%;
position: relative;
padding-top: 0; /* Remove top padding since we're moving labels */
}

/* Image Items */
.carousel-ba-image-item {
flex: 1;
max-width: 45%;
position: relative;
text-align: center; /* Center align the content */
}

.carousel-ba-image-item img {
width: 100%;
height: auto;
max-height: 50vh;
object-fit: contain;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Image Labels - Simplified */
.image-label {
position: static; /* Remove absolute positioning */
display: block;
margin-bottom: 10px;
color: #2d3748;
font-size: 16px;
font-weight: 500;
text-align: center;
background: none;
padding: 0;
transform: none;
/* text-transform: uppercase; */
letter-spacing: 1px;
}

/* Description */
.crtk-modal-ba-description {
margin: 0 auto;
padding: 20px;
background: #f7fafc;
border-radius: 8px;
box-sizing: border-box;
font-size: 14px;
line-height: 1.6;
color: #2d3748;
width: calc(100% - 85px);
text-align: center;
}

/* Navigation Buttons */
.crtk-prev,
.crtk-next {
position: absolute;
top: 50%;
transform: translateY(-50%);
background: rgba(255, 255, 255, 0.9);
border: none;
width: 40px;
height: 40px;
border-radius: 50%;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
z-index: 2;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.crtk-prev {
left: 10px;
}

.crtk-next {
right: 10px;
}

.crtk-close {
position: absolute;
top: 10px;
right: 10px;
background: #fff;
border: none;
width: 32px;
height: 32px;
border-radius: 50%;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
z-index: 3;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Hide navigation buttons when only one item */
.crtk-carousel-inner:only-child .crtk-prev,
.crtk-carousel-inner:only-child .crtk-next {
display: none;
}

.crtk-prev svg,
.crtk-next svg,
.crtk-close svg {
width: 24px;
height: 24px;
fill: #2d3748;
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
.crtk-carousel {
  padding: 30px;
}

.crtk-prev {
  left: 10px;
}

.crtk-next {
  right: 10px;
}

.crtk-close {
  top: 10px;
  right: 10px;
}
}

@media (max-width: 768px) {
.crtk-modal {
  padding: 20px 10px;
}

.crtk-carousel {
  padding: 20px;
}
/*
.crtk-before-after-pair {
  flex-direction: column;
  align-items: center;
  gap: 40px;
  padding-top: 25px;
}
*/
.carousel-ba-image-item {
  max-width: 100%;
}

.carousel-ba-image-item img {
  max-height: 35vh;
}

.image-label {
  font-size: 13px;
  padding: 4px 12px;
}

.crtk-modal-ba-description {
  padding: 15px;
  font-size: 14px;
}

.crtk-prev,
.crtk-next {
  width: 36px;
  height: 36px;
}

.crtk-close {
  width: 28px;
  height: 28px;
}
}

.crtk-ba-description{
width: 100%;
font-size: 14px;
background: #f3f3f3;
padding: 15px;
margin-top: 15px;
margin-bottom: 15px;
}

/* Add loading animation styles */
.mba-loading {
  text-align: center;
  padding: 2rem;
}

.mba-loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

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

/* Add image loading animation */
.crtk-item img {
  opacity: 0;
  transition: opacity 0.3s ease-in;
}

.crtk-item img.loaded {
  opacity: 1;
}

/* Improve responsive design */
@media (max-width: 768px) {
  .crtk-before-after-image {
    /*  flex-direction: column;
      gap: 15px;*/
      flex: 0 0 100%;
      max-width: 100%;
  }




  .crtk-ba-set {
      flex: 0 0 100%;
      max-width: 100%;
  }
}

/* Add smooth transitions */
.crtk-category-item {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s ease forwards;
}

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

/* Add touch-friendly styles */
.crtk-carousel-btn {
  min-width: 44px;
  min-height: 44px;
}

.crtk-item {
  touch-action: pan-y pinch-zoom;
}

@media (hover: none) {
  .crtk-item.blurred::before {
      content: "Tap to reveal";
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      background: rgba(0, 0, 0, 0.7);
      color: white;
      padding: 8px 16px;
      border-radius: 20px;
      font-size: 14px;
  }
}

/* Smooth transitions */
.crtk-carousel-content {
  transition: transform 0.3s ease;
}
.crtk-before-after-wrapper{
display: flex;
gap: 25px;
align-items: flex-start;
}

/* Additional breakpoint for very small screens */
@media (max-width: 480px) {
  .mba-carousel-item {
      margin-right: 15px;
  }

  .mba-carousel-item img {
      width: 50px;
      height: 50px;
  }

  .crtk-before-after-image {
      padding: 10px;
  }
}

/* Add this to your existing CSS */
.crtk-prev.hidden,
.crtk-next.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Update carousel styles */
.mba-carousel-container {
  position: relative;
  width: 90%;
  margin: auto;
  overflow: hidden;
}

.mba-nav-btn {
  position: static;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: none; /* Hidden by default */
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.mba-nav-btn svg {
  width: 16px;
  height: 16px;
  fill: #2d3748;
}

.mba-prev-btn {
  left: -16px;
}

.mba-next-btn {
  right: -16px;
}

.mba-nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mba-nav-btn.visible {
  display: flex;
}

/* Add container for navigation buttons */
.mba-nav-buttons {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  gap: 8px;
  z-index: 2;
}
button.mba-nav-btn:focus {
outline: none;
}
.crtk-before-image,
.crtk-after-image {
position: relative;
}
.crtk-before-image  span ,
.crtk-after-image  span {
position: absolute;
top: 10px;
left: 10px;
padding: 5px 12px;
background: rgba(0, 0, 0, 0.7);
color: white;
font-size: 14px;
border-radius: 0 0 0 8px;
display: none;
z-index: 10;
}
.crtk-after-image  span {
left: auto;
right: 10px;
}
.crtk-before-after-image:hover .crtk-before-image span,
.crtk-before-after-image:hover .crtk-after-image span{
display: block;
}

/* Add to your existing CSS file */
.crtk-item.blurred {
  position: relative;
  cursor: pointer;
}

.blur-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  transition: opacity 0.3s ease-out;
}

.eye-slash-icon {
  width: 30px;
  height: 30px;
  fill: #ffffff;
  filter: drop-shadow(0 0 2px rgba(0,0,0,0.5));
}

.crtk-item img {
  transition: filter 0.3s ease-out;
}

.crtk-item.blurred img {
  filter: blur(20px);
}

/* Reset styles for navigation buttons */
button.crtk-prev,
button.crtk-next {
    all: unset; /* Reset all inherited styles */
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

button.crtk-prev {
    left: 10px;
}

button.crtk-next {
    right: 10px;
}

button.crtk-prev svg,
button.crtk-next svg {
    width: 24px;
    height: 24px;
    fill: #2d3748;
}

/* Hover states */
button.crtk-prev:hover,
button.crtk-next:hover {
    background: rgba(255, 255, 255, 1);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    button.crtk-prev,
    button.crtk-next {
        width: 36px;
        height: 36px;
    }
}

/* Reset and position close button */
button.crtk-close {
    all: unset; /* Reset all inherited styles */
    position: fixed; /* Changed from absolute to fixed */
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001; /* Higher than modal z-index */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: background-color 0.3s ease;
}

button.crtk-close svg {
    width: 24px;
    height: 24px;
    fill: #2d3748;
}

/* Hover state */
button.crtk-close:hover {
    background: rgba(255, 255, 255, 1);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    button.crtk-close {
        width: 36px;
        height: 36px;
        top: 10px;
        right: 10px;
    }

    button.crtk-close svg {
        width: 20px;
        height: 20px;
    }
}