/* District 127 — Hero Carousel
   Scoped under .d127-hero so nothing leaks into the rest of the page. */

.d127-hero{
  --d127-navy:#004165;
  --d127-maroon:#772432;
  --d127-maroon-dark:#5e1c27;
  --d127-ink:#333333;
  --d127-display:'Montserrat',-apple-system,'Segoe UI',sans-serif;
  position:relative;
  overflow:hidden;
  background:linear-gradient(180deg,#f6f6f6,#ececec);
  /* Break out to the full *visible* viewport width so the image reaches the
     screen edge, regardless of parent padding/max-width. --d127-sbw is the
     scrollbar width (set by JS) so we don't overshoot under the scrollbar. */
  width:auto;
  margin-left:calc(50% - 50vw + (var(--d127-sbw, 0px) / 2));
  margin-right:calc(50% - 50vw + (var(--d127-sbw, 0px) / 2));
}

.d127-hero .swiper{position:relative;overflow:hidden;}
.d127-hero .swiper-wrapper{align-items:stretch;}
.d127-hero .swiper-slide{height:auto;}

.d127-hero__inner{
  display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;
  min-height:380px;
}
/* Image bleeds to the right edge; text starts exactly where the header logo
   does — the left edge of the centered 1180px box + its 24px inner padding.
   590px = 1180/2, minus 24px padding => 566px. --d127-sbw corrects for the scrollbar. */
.d127-hero__text{
  padding:60px 48px 60px max(24px, calc(50vw - (var(--d127-sbw, 0px) / 2) - 566px));
  max-width:none;
}
.d127-hero--img-left .d127-hero__text{
  padding:60px max(24px, calc(50vw - (var(--d127-sbw, 0px) / 2) - 566px)) 60px 48px;
}
.d127-hero__title{
  font-family:var(--d127-display);font-weight:700;color:var(--d127-navy);
  font-size:2.7rem;line-height:1.12;margin:0 0 18px;
}
.d127-hero__desc{color:var(--d127-ink);font-size:1.02rem;line-height:1.6;margin:0 0 28px;}
.d127-hero__btn{
  display:inline-block;font-family:var(--d127-display);font-weight:600;font-size:.92rem;
  padding:13px 30px;background:var(--d127-maroon);color:#fff;text-decoration:none;
  border:none;cursor:pointer;transition:background .2s ease,transform .15s ease;
}
.d127-hero__btn:hover{background:var(--d127-maroon-dark);}

.d127-hero__media{position:relative;align-self:stretch;min-height:380px;}
.d127-hero__media img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;}

/* image-left variant */
.d127-hero--img-left .d127-hero__media{order:-1;}

/* arrows */
.d127-hero__arrow{
  position:absolute;top:50%;transform:translateY(-50%);
  width:46px;height:46px;border-radius:50%;
  background:rgba(0,65,101,.85);border:none;cursor:pointer;z-index:6;
  display:flex;align-items:center;justify-content:center;
  transition:background .2s ease;
}
.d127-hero__arrow:hover{background:var(--d127-maroon);}
.d127-hero__arrow--prev{left:18px;}
.d127-hero__arrow--next{right:18px;}
.d127-hero__arrow::before{
  content:"";width:11px;height:11px;
  border-top:3px solid #fff;border-right:3px solid #fff;
}
.d127-hero__arrow--prev::before{transform:rotate(-135deg);margin-left:4px;}
.d127-hero__arrow--next::before{transform:rotate(45deg);margin-right:4px;}
.d127-hero__arrow.swiper-button-disabled{opacity:.35;cursor:default;}

/* pagination */
.d127-hero .swiper-pagination{position:absolute;bottom:16px;left:0;right:0;text-align:center;z-index:6;}
.d127-hero .swiper-pagination-bullet{
  width:11px;height:11px;display:inline-block;margin:0 5px;border-radius:50%;
  background:var(--d127-navy);opacity:.4;cursor:pointer;
  transition:opacity .2s ease,background .2s ease;
}
.d127-hero .swiper-pagination-bullet-active{opacity:1;background:var(--d127-maroon);}

/* responsive */
@media(max-width:880px){
  .d127-hero__inner{grid-template-columns:1fr;}
  .d127-hero__media{min-height:260px;order:-1;}
  .d127-hero--img-left .d127-hero__media{order:-1;}
  .d127-hero__text{padding:44px 24px;}
  .d127-hero__title{font-size:2.1rem;}
}
@media(max-width:480px){
  .d127-hero__title{font-size:1.7rem;}
  .d127-hero__arrow{width:38px;height:38px;}
}
