/* ==========================================================
   Meridian home hero slideshow
   Theme: logo blue #155791 · navy #121e2d · deep navy #0d1723
   ========================================================== */
.mf-hero {
  --mf-blue: #155791;
  --mf-blue-dark: #0f4573;
  --mf-blue-light: #3cb1c5;
  --mf-navy: #121e2d;
  --mf-navy-deep: #0d1723;
  --mf-duration: 10s;
  position: relative;
  /* the site header is absolutely positioned; hero.js measures it */
  margin-top: var(--mf-header-h, 150px);
  background: var(--mf-navy-deep);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}

/* All slides share one grid cell, so the hero is as tall as its tallest slide */
.mf-hero__track {
  display: grid;
}
.mf-slide {
  grid-area: 1 / 1;
  position: relative;
  min-height: clamp(560px, calc(100vh - var(--mf-header-h, 150px)), 760px);
  display: flex;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s ease, visibility 0s linear 0.9s;
}
.mf-slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.9s ease, visibility 0s;
  z-index: 1;
}

/* Background photo + slow zoom */
.mf-slide__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.mf-slide__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
  transform: scale(1.1);
  transition: transform 11s linear;
}
.mf-slide.is-active .mf-slide__bg img {
  transform: scale(1);
}
.mf-slide__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(13, 23, 35, 0.95) 0%, rgba(13, 23, 35, 0.82) 38%, rgba(13, 23, 35, 0.35) 72%, rgba(13, 23, 35, 0.15) 100%),
    linear-gradient(0deg, rgba(13, 23, 35, 0.85) 0%, rgba(13, 23, 35, 0) 32%);
}

/* Content */
.mf-slide__inner {
  position: relative;
  padding-top: 48px;
  padding-bottom: 118px;
}.mf-slide__content {
  max-width: 660px;
}
.mf-slide__content > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.mf-slide.is-active .mf-slide__content > * {
  opacity: 1;
  transform: none;
}
.mf-slide.is-active .mf-slide__content > :nth-child(1) { transition-delay: 0.25s; }
.mf-slide.is-active .mf-slide__content > :nth-child(2) { transition-delay: 0.38s; }
.mf-slide.is-active .mf-slide__content > :nth-child(3) { transition-delay: 0.5s; }
.mf-slide.is-active .mf-slide__content > :nth-child(4) { transition-delay: 0.62s; }
.mf-slide.is-active .mf-slide__content > :nth-child(5) { transition-delay: 0.74s; }

.mf-slide__tag {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  font-family: "Oswald", sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mf-blue-light);
}
.mf-slide__tag::before {
  content: "";
  width: 42px;
  height: 2px;
  background: var(--mf-blue-light);
}
.mf-hero .mf-slide__title {
  margin: 0 0 22px;
  font-family: "Oswald", sans-serif;
  font-size: clamp(36px, 4.4vw, 60px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.005em;
  color: #fff;
  text-wrap: balance;
}
.mf-hero .mf-slide__text {
  margin: 0 0 34px;
  max-width: 560px;
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
}

/* Buttons */
.mf-slide__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.mf-hero .mf-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 28px;
  font-family: "Oswald", sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.mf-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s ease;
}
.mf-hero .mf-btn--primary {
  background: var(--mf-blue);
  color: #fff;
}
.mf-hero .mf-btn--primary:hover {
  background: var(--mf-blue-dark);
  color: #fff;
}
.mf-btn--primary:hover svg {
  transform: translateX(4px);
}
.mf-hero .mf-btn--ghost {
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
}
.mf-hero .mf-btn--ghost:hover {
  background: #fff;
  border-color: #fff;
  color: var(--mf-navy);
}
.mf-hero .mf-btn:focus-visible,
.mf-hero button:focus-visible {
  outline: 2px solid var(--mf-blue-light);
  outline-offset: 3px;
}

/* Stats row (first slide) */
.mf-hero .mf-slide__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 40px;
  margin: 32px 0 0;
  padding: 22px 0 0;
  list-style: none;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}
.mf-slide__stats li {
  display: flex;
  flex-direction: column;
}
.mf-slide__stats strong {
  font-family: "Oswald", sans-serif;
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
  color: #fff;
}
.mf-slide__stats span {
  margin-top: 6px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.65);
}

/* Bottom bar: tabs + controls */
.mf-hero__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(13, 23, 35, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.mf-hero__bar-inner {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 24px;
}
.mf-hero__tabs {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
}
.mf-tab {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 24px 18px 24px 0;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.55);
  text-align: left;
  cursor: pointer;
  transition: color 0.25s ease;
}
.mf-tab:hover,
.mf-tab.is-active {
  color: #fff;
}
.mf-tab__num {
  font-family: "Oswald", sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--mf-blue-light);
}
.mf-tab__label {
  font-family: "Oswald", sans-serif;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mf-tab__progress {
  position: absolute;
  top: -1px;
  left: 0;
  right: 18px;
  height: 3px;
  background: transparent;
}
.mf-tab__progress span {
  display: block;
  height: 100%;
  background: var(--mf-blue-light);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.1s linear;
}
.mf-tab:not(.is-active) .mf-tab__progress span {
  transition: none;
}

.mf-hero__controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.mf-hero__counter {
  margin-right: 10px;
  font-family: "Oswald", sans-serif;
  font-size: 15px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
}
.mf-hero__counter strong {
  font-size: 22px;
  font-weight: 600;
  color: #fff;
}
.mf-ctrl {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}
.mf-ctrl:hover {
  background: var(--mf-blue);
  border-color: var(--mf-blue);
}
.mf-ctrl svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mf-ctrl--pause {
  background: var(--mf-blue);
  border-color: var(--mf-blue);
}
.mf-ctrl--pause:hover {
  background: var(--mf-blue-dark);
  border-color: var(--mf-blue-dark);
}
.mf-ctrl--pause .mf-icon-play { display: none; fill: currentColor; }
.mf-hero.is-paused .mf-ctrl--pause .mf-icon-pause { display: none; }
.mf-hero.is-paused .mf-ctrl--pause .mf-icon-play { display: block; }

/* Tablet */
@media (max-width: 991.98px) {
  .mf-tab__label { display: none; }
  .mf-tab { padding-right: 10px; }
  .mf-tab__progress { right: 10px; }
  .mf-slide__inner { padding-bottom: 140px; }
}

/* Phone */
@media (max-width: 575.98px) {
  .mf-slide { min-height: 600px; align-items: flex-end; }
  .mf-slide__bg img { object-position: 65% center; }
  .mf-slide__bg::after {
    background: linear-gradient(0deg, rgba(13, 23, 35, 0.96) 0%, rgba(13, 23, 35, 0.85) 55%, rgba(13, 23, 35, 0.45) 100%);
  }
  .mf-slide__inner { padding-top: 60px; padding-bottom: 120px; }
  .mf-slide__tag { font-size: 13px; margin-bottom: 16px; }
  .mf-slide__tag::before { width: 28px; }
  .mf-hero .mf-slide__text { margin-bottom: 26px; }
  .mf-hero .mf-btn { min-height: 50px; padding: 0 20px; font-size: 14px; }
  .mf-hero .mf-slide__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 28px; padding-top: 18px; }
  .mf-slide__stats strong { font-size: 26px; }
  .mf-slide__stats span { font-size: 13px; line-height: 1.3; }
  .mf-hero__bar-inner { gap: 12px; }
  .mf-tab { padding: 20px 6px 20px 0; }
  .mf-tab__progress { right: 6px; }
  .mf-hero__counter { display: none; }
  .mf-ctrl { width: 42px; height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  .mf-slide,
  .mf-slide.is-active,
  .mf-slide__content > *,
  .mf-slide__bg img { transition: none !important; }
  .mf-slide__bg img { transform: none !important; }
  .mf-slide__content > * { opacity: 1; transform: none; }
}
