.block--type-landing-page-hero .hero--slide-title {
  margin: 0;
}

/* Clear all existing slide/image styling */
.block--type-landing-page-hero .splide,
.block--type-landing-page-hero .splide__track,
.block--type-landing-page-hero .splide__list,
.block--type-landing-page-hero .splide__slide {
  width: 100%;
  box-sizing: border-box;
}

.block--type-landing-page-hero .splide__slide__container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.block--type-landing-page-hero .image-only-slide {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.block--type-landing-page-hero
  .image-only-slide
  .field--name-field-slide-background-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Image styling */
.block--type-landing-page-hero
  .image-only-slide
  .field--name-field-slide-background-image
  img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  margin: 0 auto;
  display: block;
}

/* Remove all overlay/before styles */
.block--type-landing-page-hero
  .field--name-field-slide-background-image::before {
  display: none !important;
}

.block--type-landing-page-hero .paragraph {
  position: relative;
  width: 100%;
}

.block--type-landing-page-hero {
  width: 50%;
  max-width: 720px;
}

.lamar-hero-container {
  display: flex;
  flex-direction: column;
  gap: 80px;
  margin-top: 0;
  margin-bottom: 0;
  position: relative;
  padding: 0;
  padding-bottom: 80px;
}

.lamar-hero-container:has(.desktop-hero-banner) {
  gap: 60px;
}

.lamar-hero-container::before,
.lamar-hero-container::after {
  inset: 0 0 0 50%;
  display: block;
  width: 100vw;
  transform: translateX(-50%);
  position: absolute;
  content: "";
}

.lamar-hero-container::after {
  background: black;
  z-index: -1;
  opacity: 0.6;
}

.lamar-hero-container::before {
  z-index: -2;
  background-image: url("/themes/custom/lamar2/images/Library3.png");
  background-size: cover;
  background-position: center;
}

/* Use custom background image when available */
.lamar-hero-container.has-custom-background::before {
  background-image: var(--hero-background-image);
}

.lamar-hero-container > * {
  position: relative;
  z-index: 1;
}

.hero-and-search--container {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}

.hero-and-search--container #block-lamar2-bootstraptabbedsearch .tab-search-box,
.hero-and-search--container #block-lamar2-bootstraptabbedsearch > div {
  margin-top: 0;
  height: 100%;
}

.hero-and-search--container #block-lamar2-bootstraptabbedsearch {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-and-search--container .nav-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.hero-and-search--container .nav-tabs:before,
.hero-and-search--container .nav-tabs:after {
  display: none;
}

.hero-and-search--container .nav-tabs li {
  outline: 1px solid white;
}

/* Hero carousel styling - Edge to edge approach */
.block--type-landing-page-hero .splide {
  width: 100%;
  height: auto;
  background-color: #f9f9f9;
}

.block--type-landing-page-hero .splide__track {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.block--type-landing-page-hero .splide__list {
  width: 100%;
  height: 100%;
}

/* Make slides full width and height */
.block--type-landing-page-hero .splide__slide {
  width: 100% !important;
  height: 100% !important;
  opacity: 1 !important;
  visibility: visible !important;
  position: relative !important;
  z-index: 1 !important;
  background-color: transparent;
  overflow: hidden;
}

/* Set slide container to fill the entire slide */
.block--type-landing-page-hero .splide__slide__container {
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  display: block !important;
  overflow: hidden !important;
}

/* Make image containers cover the entire slide */
.block--type-landing-page-hero .image-only-slide {
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  display: block;
}

.block--type-landing-page-hero
  .image-only-slide
  .field--name-field-slide-background-image {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  display: block !important;
  overflow: hidden !important;
}

/* Make images cover the entire container - fixed image fitting */
.block--type-landing-page-hero .splide__slide img,
.block--type-landing-page-hero
  .image-only-slide
  .field--name-field-slide-background-image
  img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
  margin: 0 !important;
}

/* Remove any overlay styles */
.block--type-landing-page-hero
  .field--name-field-slide-background-image::before {
  display: none !important;
}

/* Fix slide height to maintain aspect ratio */
.block--type-landing-page-hero .splide__slide,
.block--type-landing-page-hero .splide__track {
  height: 100% !important;
  width: 100% !important;
}

/* SPLIDE Styling */
.block--type-landing-page-hero .splide__arrows {
  position: absolute;
  bottom: 0;
  right: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 8px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 4px;
  z-index: 5;
}

.block--type-landing-page-hero .splide__arrow {
  position: initial;
  opacity: 1;
  background: transparent;
  transform: unset;
}

.block--type-landing-page-hero .splide__arrow svg {
  fill: white;
  width: 0.75em;
  height: 0.75em;
}

.block--type-landing-page-hero .splide__counter {
  order: 1;
  color: white;
}

.block--type-landing-page-hero .splide__arrow--prev {
  order: 0;
}

.block--type-landing-page-hero .splide__arrow--next {
  order: 2;
}

.block--type-landing-page-hero .splide__pagination {
  display: none;
}

.block--type-landing-page-hero .splide__progress__bar {
  height: 6px;
  background: var(--lamar-blue);
  opacity: 0.5;
}

.block--type-landing-page-hero .splide__toggle {
  background: transparent;
  border: none;
  padding-top: 0;
  padding-bottom: 0;
}

.splide__toggle__play,
.splide__toggle__pause {
  width: 0.75em;
  height: 0.75em;
  fill: white;
}

/* Fix arrow direction styling */
.block--type-landing-page-hero .splide__arrow--prev svg {
  fill: white;
  width: 0.75em;
  height: 0.75em;
  transform: scaleX(-1); /* Flip the arrow horizontally */
}

.block--type-landing-page-hero .splide__arrow--next svg {
  fill: white;
  width: 0.75em;
  height: 0.75em;
}

.lamar-banner .field--name-field-hero-banner img {
  margin: auto;
  width: 100%;
}

/* Mobile banner display logic */
.mobile-hero-banner {
  display: none;
}

/* Responsive adjustments */
@media (max-width: 1280px) {
  .lamar-hero-container {
    padding-bottom: 60px;
  }

  .hero-and-search--container {
    flex-direction: column;
    gap: 60px;
  }

  .block--type-landing-page-hero {
    min-width: 100%;
    max-width: 1280px;
  }

  .hero-and-search--container #block-lamar2-bootstraptabbedsearch {
    width: 100%;
  }

  .hero-and-search--container
    #block-lamar2-bootstraptabbedsearch
    .tab-search-box {
    padding: 0;
  }

  .lamar-banner {
    margin-left: -20px;
    margin-right: -20px;
  }
}

@media (max-width: 576px) {
  /* Hide desktop banner on mobile when mobile banner exists */
  .hide-on-mobile {
    display: none;
  }

  /* Show mobile banner on mobile devices */
  .mobile-hero-banner {
    display: block;
  }
}

@media (max-width: 480px) {
  .hero-and-search--container {
    gap: 30px;
  }
}

/* Hide the debug info in production */
.debug-info,
.debug-message,
.no-slides-message {
  display: none !important;
}
