.swiper {
        width: 100%;
        height: auto;
      }

      .swiper-slide {
        text-align: center;
        font-size: 18px;

        /* Center slide text vertically */
        display: -webkit-box;
        display: -ms-flexbox;
        display: -webkit-flex;
        display: flex;
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        -webkit-justify-content: center;
        justify-content: center;
        -webkit-box-align: center;
        -ms-flex-align: center;
        -webkit-align-items: center;
        align-items: center;
      }

      .swiper-slide img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
      }

  .swiper-parent-container {
    width: 100%;
    position: relative;
    overflow-x: hidden;
    }

.swiper-container {
      width: 100%;
      height: 300px;
      margin-left: auto;
      margin-right: auto;
    }

.swiper-gallery {
      background-size: cover;
      background-position: center;
    }

.gallery-top {
      height: 80%;
      width: 100%;
      overflow-x: hidden;
    }

.gallery-thumbs {
      height: 20%;
      box-sizing: border-box;
      padding: 10px 0;
    }

.gallery-thumbs .swiper-gallery {
      width: 25%;
      height: 100%;
      opacity: 0.4;
    }

.gallery-thumbs .swiper-slide-thumb-active {
      opacity: 1;
    }


.carouselSwiper,
.swiper-wrapper {
  width: 100%;
  height: auto !important;
}

.swiper.carouselSwiper p {
    font-size: 14px;
    font-weight: revert;
    text-align: start;
    color: #164040;
}


.swiper.carouselSwiper .swiper-slide {
    background-color: #fff;
    padding: 2%;
    border-radius: 0.5em;
    box-shadow: 0em 0em 0.1em rgb(0, 0, 0, 0.2);
}


.FadeSwiper {
    z-index: 0 !important;
}

.slider-16-8 img{
    object-fit: cover;
    height: 100%;
    width: 100%;
    object-position: right;
}


.swiper-slide .slide-content {
    width: 100%;
    height: 100%;
    position: relative; /* CRUCIAL: Makes caption absolute position relative to this container */
}

.slide-caption {
    /* CRUCIAL FIX: Position relative to .slide-content */
    position: absolute; 
    top: 50%;
    left: 50%; /* Center horizontally */
    transform: translate(-50%, -50%); /* Center vertically and horizontally */
    width: 90%; /* Constrain caption width */
    max-width: 800px; /* Max readable width */
    padding: 1rem;
    text-align: center;
}

@media only screen and (min-width: 768px) {
    
    .mobile-slide-caption{
        display:none;
    }
    .slider-16-8{
        aspect-ratio: 16/8;
    }
}

@media only screen and (max-width: 767px) {
    
    .slider-16-8{
        aspect-ratio: 2/1;
    }
}

.filw-swiper {
    padding: 1em 0 3em!important;
}

.swiper-btn-wrap {
    position: absolute;
    bottom: 0;
    right: 2%;
    width: 120px;
}

/* ---- Pill pagination (works with Swiper 6–11) ---- */
:root{
  --pill-h: 6px;             /* pill height */
  --pill-w: 20px;            /* inactive pill width */
  --pill-w-active: 36px;     /* active pill width */
  --pill-inactive: #cbd5e1;  /* inactive color */
  --pill-active: #111827;    /* active color */
  --pill-gap: 8px;           /* spacing between pills */
}

.swiper-pagination-bullet{
  width: var(--pill-w) !important;
  height: var(--pill-h) !important;
  display: inline-block;
  border-radius: 9999px !important;   /* pill shape */
  background-color: var(--pill-inactive) !important;
  opacity: 1 !important;              /* ignore Swiper’s opacity var */
  transition: width .25s ease, background-color .25s ease, transform .25s ease;
}

/* spacing row */
.swiper-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet,
.swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet{
  margin: 0 var(--pill-gap) !important;
}

/* active state = longer, darker pill */
.swiper-pagination-bullet-active{
  width: var(--pill-w-active) !important;
  background-color: var(--pill-active) !important;
}

/* optional: subtle press/hover */
.swiper-pagination-bullet:hover{ transform: translateY(-1px); }


  .filw-swiper{position:relative}
  .filw-swiper .swiper-wrapper{align-items:stretch}
  .filw-swiper .swiper-slide{height:auto;border-radius:12px;overflow:hidden;border: #eee solid 1px;}
  .filw-item{display:block;overflow:hidden;}
  .filw-item img{display:block;width:100%;height:auto;transition:transform .25s ease}
  .filw-item:hover img{transform:scale(1.04)}
  .filw-fallback{display:block;width:100%;padding-top:66%;background:#f3f3f3;border:1px solid #eee;border-radius:12px}
  .filw-pagination{position:relative;margin-top:8px}



  /* Minimal, self-contained nav buttons */
.filw-swiper .swiper-button-next,
.filw-swiper .swiper-button-prev{
  position:absolute; top:50%; transform:translateY(-50%);
  width:36px; height:36px; border-radius:50%;
  background:rgba(0,0,0,.45); z-index:5; cursor:pointer;
}

.filw-swiper .swiper-button-prev{ left:6px; }
.filw-swiper .swiper-button-next{ right:6px; }

.filw-swiper .swiper-button-next::after,
.filw-swiper .swiper-button-prev::after{
  content:''; display:block; width:0; height:0;
  border-top:7px solid transparent; border-bottom:7px solid transparent;
  margin: 12px auto;
}
.filw-swiper .swiper-button-prev::after{ border-right:8px solid #fff; margin-left:12px; }
.filw-swiper .swiper-button-next::after{ border-left:8px solid #fff;  margin-right:12px; }


.filw-swiper .swiper-slide:after {
    content: 'f061';
    width: 7vw;
    aspect-ratio: 1 / 1;
    background-color: #fff;
    position: absolute;
    bottom: -3.5vw;
    right: -3.5vw;
    transform: rotate(45deg);
}





.FadeSwiper .swiper-slide {
    aspect-ratio: 16 / 5;
}

@media only screen and (min-width: 1024px) {
    .FadeSwiper .swiper-slide {
        aspect-ratio: 16 / 3;
    }
}

@media only screen and (max-width: 480px) {
    .FadeSwiper .swiper-slide {
        aspect-ratio: 15 / 8;
    }
}

#frontpage-slideshow .swiper-slide {
    aspect-ratio: 16 / 7;
}


@media only screen and (min-width: 1024px) {
#frontpage-slideshow .swiper-slide {
        aspect-ratio: 16 / 5;
    }
}

@media only screen and (max-width: 480px) {
#frontpage-slideshow .swiper-slide {
        aspect-ratio: 15 / 8;
    }
}


a.filw-view-archive-link {
    position: absolute;
    left: 1em;
    bottom: 0.5em;
    padding: 0.2em 1em;
    background-color: var(--primary-colour);
    border-radius: 1em;
    color: #fff;
}


@media only screen and (max-width: 767px) {
.widget_filw_featured_image_links .swiper-pagination {
    display:none;
}
}