/* CBP Service Category Carousel Styles */

:root {
  --cbp-carousel-gap: 16px;
  --cbp-carousel-radius: 10px;
  --cbp-carousel-shadow: 0 2px 14px rgba(0, 0, 0, 0.08);
  --cbp-carousel-hover-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  --cbp-carousel-transition: all 0.3s ease;
  --cbp-carousel-arrow-bg: rgba(255, 255, 255, 0.95);
  --cbp-carousel-arrow-hover: #0f766e;
}

/* Main Container */
.cbp-service-carousel {
  width: 100%;
  margin: 0 auto;
  padding: 20px 0;
}

/* Header Section */
.cbp-carousel__header {
  margin-bottom: 24px;
  padding: 0 16px;
}

.cbp-carousel__title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
  line-height: 1.3;
}

/* Carousel Wrapper */
.cbp-carousel__wrapper {
  position: relative;
  padding: 0 60px;
  /* Space for arrows on sides */
}

/* Carousel Container (overflow hidden) */
.cbp-carousel__container {
  overflow: hidden;
  position: relative;
}

/* Carousel Track (scrollable) */
.cbp-carousel__track {
  display: flex;
  gap: var(--cbp-carousel-gap);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  scroll-behavior: smooth;
}

/* Individual Card */
.cbp-carousel-card {
  flex: 0 0 auto;
  width: calc((100% - (var(--cbp-carousel-gap) * 3)) / 4);
  min-width: 200px;
  background: #fff;
  border-radius: var(--cbp-carousel-radius);
  overflow: hidden;
  box-shadow: var(--cbp-carousel-shadow);
  transition: var(--cbp-carousel-transition);
  position: relative;
}

/* Card Link */
.cbp-carousel-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

/* Card Image Container */
.cbp-carousel-card__image {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: #f3f4f6;
}

.cbp-carousel-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
}

/* Hover Effect - Zoom In */
.cbp-carousel-card:hover .cbp-carousel-card__image img {
  transform: scale(1.08);
}

.cbp-carousel-card:hover {
  box-shadow: var(--cbp-carousel-hover-shadow);
  transform: translateY(-4px);
}

/* Title Overlay (shown on hover) */
.cbp-carousel-card__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.5) 70%, transparent 100%);
  padding: 20px 16px 16px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.cbp-carousel-card:hover .cbp-carousel-card__overlay {
  opacity: 1;
  transform: translateY(0);
}

.cbp-carousel-card__overlay .cbp-carousel-card__title {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Title Below Image (when not using hover overlay) */
.cbp-carousel-card__body {
  padding: 16px;
}

.cbp-carousel-card__body .cbp-carousel-card__title {
  color: #1f2937;
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
}

/* Title Hover Underline Effect */
.cbp-carousel-card__title--underline {
  position: relative;
  display: inline-block;
}

.cbp-carousel-card__title--underline::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background-color: currentColor;
  transition: width 0.3s ease;
}

.cbp-carousel-card:hover .cbp-carousel-card__title--underline::after {
  width: 100%;
}

/* Carousel Arrows */
.cbp-carousel__arrow {
  position: absolute;
  top: 110px;
  /* Center on image (half of 220px image height) */
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--cbp-carousel-arrow-bg);
  border: 1px solid #e5e7eb;
  color: #374151;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cbp-carousel__arrow:hover {
  background: var(--cbp-carousel-arrow-hover);
  color: #fff;
  border-color: var(--cbp-carousel-arrow-hover);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.3);
  transform: translateY(-50%) scale(1.05);
}

.cbp-carousel__arrow:active {
  transform: translateY(-50%) scale(0.95);
}

.cbp-carousel__arrow:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* SVG icon - default size, can be overridden via Elementor widget */
.cbp-carousel__arrow svg {
  width: 24px;
  height: 24px;
}

/* Arrow positioning adjustments */
.cbp-carousel__arrow--left {
  left: 0;
}

.cbp-carousel__arrow--right {
  right: 0;
}

/* Empty State */
.cbp-carousel-empty {
  padding: 40px 20px;
  text-align: center;
  color: #6b7280;
  font-size: 1rem;
}

/* Responsive Design */

/* Tablets (3 cards) */
@media (max-width: 1024px) {
  .cbp-carousel-card {
    width: calc((100% - (var(--cbp-carousel-gap) * 2)) / 3);
  }

  .cbp-carousel__title {
    font-size: 1.5rem;
  }

  .cbp-carousel-card__image {
    height: 200px;
  }

  .cbp-carousel__arrow {
    top: 100px;
  }

  .cbp-carousel__wrapper {
    padding: 0 50px;
  }
}

/* Small Tablets (2 cards) */
@media (max-width: 768px) {
  .cbp-carousel-card {
    width: calc((100% - var(--cbp-carousel-gap)) / 2);
  }

  .cbp-carousel-card__image {
    height: 180px;
  }

  .cbp-carousel__wrapper {
    padding: 0 45px;
  }
}

/* Mobile (1 card) */
@media (max-width: 480px) {
  .cbp-carousel-card {
    width: 100%;
    min-width: 100%;
  }

  .cbp-carousel__title {
    font-size: 1.25rem;
  }

  .cbp-carousel__wrapper {
    padding: 0 40px;
  }

  .cbp-carousel-card__image {
    height: 160px;
  }

  .cbp-carousel-card__overlay .cbp-carousel-card__title {
    font-size: 1rem;
  }
}

/* Accessibility - Focus States */
.cbp-carousel__arrow:focus-visible {
  outline: 2px solid var(--cbp-carousel-arrow-hover);
  outline-offset: 2px;
}

.cbp-carousel-card__link:focus-visible {
  outline: 2px solid var(--cbp-carousel-arrow-hover);
  outline-offset: 2px;
  border-radius: var(--cbp-carousel-radius);
}

/* Smooth scrolling for reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .cbp-carousel__track {
    transition: none;
  }

  .cbp-carousel-card,
  .cbp-carousel-card__image img,
  .cbp-carousel-card__overlay,
  .cbp-carousel__arrow {
    transition: none;
  }
}

/* Print styles */
@media print {
  .cbp-carousel__arrow {
    display: none;
  }

  .cbp-carousel__track {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}