/* Wrapper controls stacking */
.tsm-carousel-wrapper {
  position: relative;
  /* Full-bleed comes from WordPress's own .alignfull handling — do NOT add
     breakout margins here. See the note in the theme's global.css.
     Was `width: 100vw; margin-left: calc(50% - 50vw)`, which overflowed the
     viewport by the scrollbar's width and fought WP's rule at the same time. */
  width: auto;
  height: 100vh;
  overflow: hidden;
  min-height: 800px;
}

.tsm-carousel-wrapper p:not(.tsm-overlay-text) {
  display: none;
}

/* Mobile Responsive Styles */
@media (max-width: 900px) {
  .tsm-carousel-wrapper {
    height: 100vh;
    min-height: 100vh;
  }
}

/* Slider full size */
.tsm-carousel,
.tsm-carousel .splide__track,
.tsm-carousel .splide__list,
.tsm-carousel .splide__slide {
  height: 100%;
}

/* Slide container - needs position relative for overlay */
.tsm-carousel .splide__slide {
  position: relative;
  overflow: hidden;

  /* Mobile: Image fills container properly */
  @media (max-width: 900px) {
    min-height: 100vh;
  }
}

/* Overlay */
.tsm-carousel-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  background: rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

/* Allow buttons and links clickable */
.tsm-carousel-overlay a,
.tsm-carousel-overlay button {
  pointer-events: auto;
}

/* BACKGROUND IMAGE STYLES - Images are now set as background-image on slides */
/* The inline styles handle: background-size: cover, background-position: center, background-repeat: no-repeat */
/* No additional image styles needed since we're using background images instead of <img> tags */

/* VIDEO BACKGROUND */
.tsm-video-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.tsm-background-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* Video mode specific styles */
.tsm-carousel-wrapper.video-mode .tsm-carousel-overlay {
  background: rgba(0, 0, 0, 0.5); /* Slightly lighter overlay for video */
}

/* Hide pagination for video mode */
.tsm-carousel-wrapper.video-mode .splide__pagination {
  display: none;
}

.tsm-overlay-content-wrapper {
  /* border-box or the side padding ADDS to width:100%, making this wider than
     the carousel and shifting the overlay text off-centre (measured -20px at
     390px wide). Sibling rules here already set it; this one was missed. */
  box-sizing: border-box;
  width: 100%;
  max-width: 1030px;
  padding: 100px 55px;
}

/* Center title vertically when only title is shown */
.tsm-carousel-wrapper.title-only-mode .tsm-carousel-overlay {
  justify-content: center;
}

.tsm-carousel-wrapper.title-only-mode .tsm-overlay-content-wrapper {
  padding: 0 55px;
}

.tsm-carousel-wrapper.title-only-mode .tsm-overlay-title {
  margin-bottom: 0;
}

.tsm-overlay-title {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 64px;
  line-height: 100%;
  letter-spacing: 0%;
  text-align: center;
  margin-bottom: 80px;
  font-weight: 500;
  margin-top: 0;
  font-style: italic !important;
}

.tsm-overlay-title em,
.tsm-overlay-title i {
}

.tsm-overlay-text {
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 80px;
  font-weight: 500;
  color: #ffffff80;

  @media (min-width: 768px) {
    padding: 0 100px;
  }
}

/* Pagination over the carousel */
.tsm-carousel .splide__pagination {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  pointer-events: auto;
}

/* Pagination dots - default (inactive) */
.tsm-carousel .splide__pagination__page {
  background-color: #ffffff; /* white */
  opacity: 1;
  width: 6px;
  height: 6px;
  margin: 0 6px;
  border-radius: 50%;
  transition:
    background-color 0.3s ease,
    transform 0.3s ease;
}

/* Active dot */
.tsm-carousel .splide__pagination__page.is-active {
  background-color: #ee2346;
  transform: none !important;
}

.tsm-carousel .splide__pagination__page:focus {
  outline-width: 0 !important;
}

.tsm-overlay-badge {
  font-weight: 500;
  font-size: 13px;
  line-height: 1.5;
  color: white;
  border-radius: 100px;
  border: inset 2px #ffffff2d;
  display: inline-block;
  padding: 10px 20px;
  text-transform: uppercase;
  initial-letter-align: 20%;
  margin-bottom: 40px !important;
}

/* Mobile Responsive Styles */
@media (max-width: 900px) {
  .tsm-carousel-wrapper {
    height: 500px;
  }

  .tsm-overlay-content-wrapper {
    padding: 0 32px;
    max-width: 100%;
  }

  .tsm-overlay-badge {
    font-size: 11px;
    padding: 8px 16px;
  }

  .tsm-overlay-title {
    font-size: 48px;
    margin-bottom: 40px;
    margin-top: 24px;
  }

  .tsm-overlay-text {
    font-size: 14px;
    margin-bottom: 40px;
  }

  .tsm-carousel .splide__pagination {
    bottom: 24px;
  }
}

@media (max-width: 600px) {
  .tsm-carousel-wrapper {
    height: 400px;
  }

  .tsm-overlay-content-wrapper {
    padding: 0 20px;
  }

  .tsm-overlay-badge {
    font-size: 10px;
    padding: 6px 12px;
  }

  .tsm-overlay-title {
    font-size: 32px;
    margin-bottom: 24px;
    margin-top: 16px;
  }

  .tsm-overlay-text {
    font-size: 13px;
    margin-bottom: 32px;
    line-height: 1.6;
  }

  .tsm-carousel .splide__pagination {
    bottom: 16px;
  }

  .tsm-carousel .splide__pagination__page {
    width: 5px;
    height: 5px;
    margin: 0 4px;
  }
}

/* Floating Contact Button */
.tsm-floating-contact {
  position: absolute;
  bottom: 70px;
  right: 40px;
  width: 47px;
  height: 47px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-decoration: none;
}

.tsm-floating-contact.whatsapp {
  background: #21cd21;
}

.tsm-floating-contact.email {
  background: #ee2346;
}

.tsm-floating-contact:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.tsm-floating-contact img {
  width: 24px;
  height: 24px;
}

/* Mobile Responsive for Floating Button */
@media (max-width: 900px) {
  .tsm-floating-contact {
    bottom: 40px;
    right: 24px;
    width: 42px;
    height: 42px;
  }

  .tsm-floating-contact img {
    width: 20px;
    height: 20px;
  }
}
