html, body {
  max-width: 100%;
  overflow-x: hidden;
}

html {
  scrollbar-gutter: stable;
  overflow-y: scroll;
}

/* =========================================================
   GoLive Asia – Slider Base Styles
   ========================================================= */

.gla-splide {
  width: 100%;
  overflow: visible; /* allow peeking slides */
}

/* Force correct direction even if Divi/section is RTL */
.gla-splide,
.gla-splide * {
  direction: ltr;
}

.gla-slide-inner {
  display: flex;
  flex-direction: row;
  gap: 24px;
  align-items: stretch;
  box-sizing: border-box;
}

.gla-slide-image img {
  display: block;
  width: 100%;
  height: auto;
}

.gla-slide-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #f8f8f8;
}

.gla-slide-title {
  font-size: 26rem;
  padding-bottom: 0px;
  line-height: 1.5;
}

.gla-slide-title a {
  text-decoration: none;
}

.gla-slide-meta {
  font-size: 0.875rem;
  opacity: 0.75;
  margin-bottom: 8px;
}

.gla-slide-excerpt {
  margin-bottom: 12px;
}

.gla-button {
  display: inline-block;
  padding: 10px 18px;
  text-decoration: none;
  font-size: 0.875rem;
}

/* If your "View" is a <button>, normalize it */
button.gla-button {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  min-width: 100px;
}

/* =========================================================
   Latest Posts Slider – "Hero" Design
   ========================================================= */

/* Allow peeking but prevent scrollbar */
.gla-latest-posts-slider {
  overflow: visible;
  padding-left: 1px;
  padding-right: 1px;
}

/* Splide internal overflow handling */
.gla-latest-posts-slider .splide__track {
  overflow: visible;
}

.gla-latest-posts-slider .gla-slide-inner {
  position: relative;
  display: block;
  width: 100%;
  min-height: 625px;
  overflow: hidden;
}

.gla-latest-posts-slider .gla-slide-inner::after {
  content: "";
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.25) 50%, rgba(0, 0, 0, 0) 100%);
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Full background image */
.gla-latest-posts-slider .gla-slide-image {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.gla-latest-posts-slider .gla-slide-image a {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.gla-latest-posts-slider .gla-slide-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 15%;
  transition: filter 250ms ease, opacity 250ms ease;
}

/* =========================================================
   B/W peeking slides – color only on active (middle)
   ========================================================= */

/* Default: grayscale all slides */
.gla-latest-posts-slider .splide__slide .gla-slide-image img {
  filter: grayscale(100%);
  opacity: 0.9;
}

/* Active (center) slide */
.gla-latest-posts-slider .splide__slide.is-active .gla-slide-image img {
  filter: none;
  opacity: 1;
}

/* Bottom-left content */
.gla-latest-posts-slider .gla-slide-content {
  position: absolute;
  left: 48px;
  bottom: 48px;
  z-index: 2;
  width: calc(100% - 96px);
  max-width: 625px;
  color: #fff;
  display: block;
}

.gla-latest-posts-slider .gla-slide-title {
  font-size: 40px;
  line-height: 1.2;
  margin-bottom: 8px;
  letter-spacing: 0.2px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
}

.gla-latest-posts-slider .gla-slide-title a {
  color: #fff;
  text-decoration: none;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.gla-latest-posts-slider .gla-slide-meta {
  display: none;
}

.gla-latest-posts-slider .gla-slide-excerpt {
  margin: 0 0 16px;
  max-width: 640px;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  line-height: 1.7;
}

.gla-latest-posts-slider .gla-button {
  color: #fff;
  font-size: 19px;
  background-color: transparent;
  border: 1px solid;
  text-transform: uppercase;
}

.gla-latest-posts-slider .gla-button:hover {
  opacity: 0.92;
}

/* =========================================================
   Splide controls
   ========================================================= */

.gla-splide .splide__arrows {
  top: 50%;
  transform: translateY(-50%);
  position: absolute;
  width: 100%;  
}

/* Arrows */
.gla-splide .splide__arrow {
  width: 45px;
  height: 45px;
  background-color: #ffffff;
  border-radius: 100px;
  color: #8B1C1C;
  opacity: 1;
  box-shadow: none;
}

/* Hide the default SVG so we can keep consistent sizing */
.gla-splide .splide__arrow svg {
  display: none;
}

/* Use CSS chevrons */
.gla-splide .splide__arrow::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(135deg);
  margin-right: -3px;
}

.gla-splide .splide__arrow--next::after {
  transform: rotate(-45deg);
  margin-left: -3px;
  margin-right: unset;
}

/* Positioning similar to your Swiper setup */
.gla-splide .splide__arrow--prev {
  left: 20px;
}

.gla-splide .splide__arrow--next {
  right: 20px;
}

.gla-splide .splide__pagination {
  bottom: 5px;
  padding-left: 0px;
}

/* Pagination bullets */
.gla-splide .splide__pagination__page {
  opacity: 0.3;
  background: #f8f8f8;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin: 0 4px;
}

.gla-splide .splide__pagination__page.is-active {
  opacity: 1;
  width: 10px;
  height: 10px;
  background: #f8f8f8;
  transform: none;
}

.gla-splide .splide__pagination li:has(> .is-active) button {
  margin-bottom: -2px;
  display: block;
}

/* =========================================================
   Featured Projects Slider
   ========================================================= */

/* Featured Projects: no peeking needed, so hide overflow to prevent scrollbar flash */
.gla-featured-projects-slider {
  /*overflow: hidden;*/
  overflow: visible;
}

/* Splide track must also hide overflow for featured projects */
.gla-featured-projects-slider .splide__track {
  overflow: hidden;
}

.gla-featured-projects-slider .gla-slide-inner {
  display: flex;
  flex-direction: column;
  gap: 0px;
  text-align: center;
  background-color: #fff;
  height: 100%;
}

.gla-featured-projects-slider .splide__slide {
  transition: padding 200ms ease, opacity 200ms ease, filter 200ms ease;
  opacity: 0.9;
  filter: grayscale(100%);
  padding: 0.5em;
}

.gla-featured-projects-slider .splide__slide.is-active {
  opacity: 1;
  filter: none;
  padding: 0px;
}

.gla-featured-projects-slider .gla-project-thumb {
  width: 100%;
  aspect-ratio: 1 / 0.55;
  overflow: hidden;
}

.gla-featured-projects-slider .gla-project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gla-featured-projects-slider .gla-slide-content {
  padding: 25px;
  color: #222222;
}

.gla-featured-projects-slider .gla-slide-title {
  font-size: 22px;
  margin-bottom: 10px;
  min-height: 52px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.gla-featured-projects-slider .gla-slide-excerpt {
  margin: 0;
  opacity: 0.9;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  line-height: 1.6;
  min-height: 56px;
}

.gla-featured-projects-slider .gla-project-actions {
  margin-top: 18px;
}

.gla-featured-projects-slider .gla-button.gla-project-view {
  cursor: pointer;
  background-color: #8B1C1C;
  color: #f8f8f8;
}

.gla-featured-projects-slider .splide__arrow--prev {
  left: -70px;
}

.gla-featured-projects-slider .splide__arrow--next {
  right: -70px;
}

.gla-featured-projects-slider .splide__pagination {
  bottom: -70px;
}

.gla-featured-projects-slider .splide__pagination__page.is-active, .gla-featured-projects-slider .splide__pagination__page {
  background: #222222;
}

/* =========================================================
   Modal
   ========================================================= */

.gla-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2147483647; /* overkill, but avoids Divi header z-index wars */
  display: none;
  isolation: isolate; /* creates a clean stacking context for overlay/dialog */
}

.gla-modal.is-open {
  display: block;
}

.gla-modal-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
}

.gla-modal-dialog {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 90vw;
  height: 85vh;
  max-width: none;
  max-height: none;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  z-index: 1;
}

.gla-modal-header {
  padding: 14px 18px;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.gla-modal-title {
  font-size: 16px;
  opacity: 0.95;
}

.gla-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 100px;
  background: #000;
  color: #fff;
  font-size: 24px;
  line-height: 38px;
  cursor: pointer;
  z-index: 2;
}

.gla-modal-body {
  height: 100%;
  padding: 30px;
  box-sizing: border-box;
}

/* Video fills the available body area */
.gla-modal-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;

  /* Keeps full video visible; controls still show */
  object-fit: contain;
}

/* Lock scroll when modal is open */
html.gla-modal-open,
body.gla-modal-open {
  overflow: hidden;
}

@media (min-width: 981px) {
  .et_pb_section {
    padding: 6% 0;
  }
}

/* =========================================================
   Mobile adjustments
   ========================================================= */

@media (max-width: 767px) {
  .gla-slide-inner {
    flex-direction: column;
  }

  .gla-latest-posts-slider .gla-slide-inner {
    min-height: 450px;
  }

  .gla-latest-posts-slider .gla-slide-content {
    left: 18px;
    right: 18px;
    bottom: 80px;
    width: calc(100% - 36px);
    max-width: none;
    text-align: center;
  }

  .gla-latest-posts-slider .gla-slide-title {
    font-size: 25px;
  }

  .gla-splide .splide__arrows {
    top: unset;
    transform: unset;
    bottom: 38px;
  }

  .gla-splide .splide__arrow {
    width: 38px;
    height: 38px;
  }

  /* Featured Projects */

  .gla-featured-projects-slider .splide__slide {
    transform: scale(1);
    opacity: 1;
  }

  .gla-featured-projects-slider .gla-slide-content {
    padding-bottom: 76px;
  }

  .gla-featured-projects-slider .gla-slide-title {
    font-size: 18px;
  }

  .gla-featured-projects-slider .splide__arrows {
    bottom: 38px;
  }

  .gla-featured-projects-slider .splide__arrow--prev {
    left: 20px;
    right: unset;
  }

  .gla-featured-projects-slider .splide__arrow--next {
    right: 20px;
    left: unset;
  }

  .gla-featured-projects-slider .splide__pagination {
    bottom: 8px;
  }

  .gla-featured-projects-slider .splide__pagination__page.is-active, .gla-featured-projects-slider .splide__pagination__page {
    background: #222222;
  } 

  /* Modal */
  .gla-modal-body {
    padding: 15px;
  }
}
