/* =========================================================
   Marslia Hero Slider — unified default for all slides
   Brand blues, RTL-first, mobile-first, cross-browser
   ========================================================= */

.ml-hero {
  --ml-hero-ink: #061528;
  --ml-hero-mid: #0a3d73;
  --ml-hero-brand: #145fa8;
  --ml-hero-accent: #2ec4ff;
  --ml-hero-sand: #f4f8fc;
  --ml-hero-text: #ffffff;
  --ml-hero-muted: rgba(255, 255, 255, 0.84);
  --ml-hero-line: rgba(255, 255, 255, 0.22);
  --ml-hero-radius: 14px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: var(--ml-hero-text);
  background:
    radial-gradient(900px 420px at 12% 88%, rgba(46, 196, 255, 0.16), transparent 60%),
    radial-gradient(780px 380px at 92% 12%, rgba(20, 95, 168, 0.45), transparent 55%),
    linear-gradient(145deg, var(--ml-hero-ink) 0%, var(--ml-hero-mid) 48%, var(--ml-hero-brand) 100%);
}

.ml-hero__atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at center, #000 35%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 35%, transparent 85%);
}

.ml-hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  opacity: 0.55;
  animation: mlHeroOrb 14s ease-in-out infinite;
}

.ml-hero__orb--a {
  width: min(42vw, 360px);
  height: min(42vw, 360px);
  top: -8%;
  left: -6%;
  background: rgba(46, 196, 255, 0.18);
}

.ml-hero__orb--b {
  width: min(36vw, 300px);
  height: min(36vw, 300px);
  right: 4%;
  bottom: 12%;
  background: rgba(255, 255, 255, 0.08);
  animation-delay: -5s;
}

@keyframes mlHeroOrb {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(12px, -18px, 0) scale(1.06); }
}

.ml-hero .ml-hero-swiper {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0;
  overflow: hidden;
}

.ml-hero .swiper-slide {
  height: auto;
  box-sizing: border-box;
}

.ml-hero__container {
  position: relative;
  z-index: 1;
  padding-top: clamp(2.4rem, 5vw, 4.5rem);
  padding-bottom: clamp(3.2rem, 6vw, 5.5rem);
}

.ml-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  min-height: clamp(320px, 52vh, 540px);
}

.ml-hero__copy {
  max-width: 640px;
  opacity: 1;
  transform: none;
}

/* Animate only after Swiper marks the hero ready (avoids invisible content before JS) */
.ml-hero.is-ready .ml-hero__copy {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.ml-hero.is-ready .swiper-slide-active .ml-hero__copy,
.ml-hero.is-ready .swiper-slide-duplicate-active .ml-hero__copy {
  opacity: 1;
  transform: translateY(0);
}

.ml-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 1rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--ml-hero-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #e8f5ff;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.ml-hero__eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ml-slide-accent, var(--ml-hero-accent));
  box-shadow: 0 0 0 3px rgba(46, 196, 255, 0.18);
}

.ml-hero__title {
  margin: 0 0 1rem;
  color: #fff !important;
  font-size: clamp(1.75rem, 4.2vw, 3.15rem);
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.ml-hero__lead {
  margin: 0 0 1.6rem;
  max-width: 36rem;
  color: var(--ml-hero-muted);
  font-size: clamp(0.98rem, 1.35vw, 1.125rem);
  font-weight: 400;
  line-height: 1.85;
}

.ml-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.ml-hero__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 48px;
  padding: 0.8rem 1.45rem;
  border-radius: var(--ml-hero-radius);
  border: 1.5px solid transparent;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none !important;
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease, color 0.22s ease;
  -webkit-tap-highlight-color: transparent;
}

.ml-hero__btn:focus-visible {
  outline: 2px solid #7de3ff;
  outline-offset: 3px;
}

.ml-hero__btn--primary {
  background: linear-gradient(135deg, #1d7ad1 0%, #0f4c8a 100%);
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.12);
}

.ml-hero__btn--primary:hover,
.ml-hero__btn--primary:focus {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #2a8be6 0%, #145fa8 100%);
  color: #fff !important;
}

.ml-hero__btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.42);
}

.ml-hero__btn--ghost:hover,
.ml-hero__btn--ghost:focus {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.14);
  color: #fff !important;
}

.ml-hero__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transform: none;
}

.ml-hero.is-ready .ml-hero__visual {
  opacity: 0;
  transform: translateY(14px) scale(0.985);
  transition: opacity 0.65s ease 0.08s, transform 0.65s ease 0.08s;
}

.ml-hero.is-ready .swiper-slide-active .ml-hero__visual,
.ml-hero.is-ready .swiper-slide-duplicate-active .ml-hero__visual {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.ml-hero__visual-frame {
  position: relative;
  width: 100%;
  max-width: 560px;
}

.ml-hero__visual-frame::before {
  content: "";
  position: absolute;
  inset: 12% 10% auto;
  height: 70%;
  border-radius: 40% 60% 55% 45%;
  background: radial-gradient(circle at 50% 40%, rgba(46, 196, 255, 0.22), transparent 70%);
  z-index: 0;
  pointer-events: none;
}

.ml-hero__visual img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  max-height: min(460px, 58vh);
  object-fit: contain;
  animation: mlHeroFloat 6.5s ease-in-out infinite;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.28));
}

@keyframes mlHeroFloat {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -12px, 0); }
}

/* Controls */
.ml-hero .swiper-pagination {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1.35rem;
  z-index: 3;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
}

.ml-hero .swiper-pagination-bullet {
  width: 9px;
  height: 9px;
  margin: 0 !important;
  opacity: 1;
  background: rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  transition: width 0.25s ease, background 0.25s ease;
}

.ml-hero .swiper-pagination-bullet-active {
  width: 26px;
  background: var(--ml-hero-accent);
}

.ml-hero .swiper-button-next,
.ml-hero .swiper-button-prev {
  width: 44px;
  height: 44px;
  margin-top: 0;
  top: auto;
  bottom: 1.1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background 0.2s ease;
}

.ml-hero .swiper-button-prev { right: auto; left: max(1rem, calc((100% - 1140px) / 2 + 0.5rem)); }
.ml-hero .swiper-button-next { left: auto; right: max(1rem, calc((100% - 1140px) / 2 + 0.5rem)); }

.ml-hero .swiper-button-next:hover,
.ml-hero .swiper-button-prev:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.ml-hero .swiper-button-next::after,
.ml-hero .swiper-button-prev::after {
  font-size: 14px;
  font-weight: 900;
}

.ml-hero__wave {
  position: relative;
  z-index: 2;
  line-height: 0;
  margin-top: -1px;
}

.ml-hero__wave svg {
  display: block;
  width: 100%;
  height: clamp(42px, 7vw, 78px);
}

/* Fallback single-slide (addon inactive) */
.ml-hero--fallback .ml-hero__copy,
.ml-hero--fallback .ml-hero__visual {
  opacity: 1;
  transform: none;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .ml-hero__orb,
  .ml-hero__visual img,
  .ml-hero__copy,
  .ml-hero__visual {
    animation: none !important;
    transition: none !important;
  }
  .ml-hero.is-ready .ml-hero__copy,
  .ml-hero.is-ready .ml-hero__visual,
  .ml-hero.is-ready .swiper-slide-active .ml-hero__copy,
  .ml-hero.is-ready .swiper-slide-active .ml-hero__visual,
  .ml-hero.is-ready .swiper-slide-duplicate-active .ml-hero__copy,
  .ml-hero.is-ready .swiper-slide-duplicate-active .ml-hero__visual {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Tablet */
@media (max-width: 991.98px) {
  .ml-hero__grid {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 1.5rem;
    text-align: center;
  }

  .ml-hero__copy {
    max-width: 40rem;
    margin-inline: auto;
    order: 1;
  }

  .ml-hero__lead {
    margin-inline: auto;
  }

  .ml-hero__actions {
    justify-content: center;
  }

  .ml-hero__visual {
    order: 2;
    max-width: 420px;
    margin-inline: auto;
  }

  .ml-hero__visual img {
    max-height: 300px;
  }

  .ml-hero .swiper-button-next,
  .ml-hero .swiper-button-prev {
    display: none;
  }

  .ml-hero .swiper-pagination {
    bottom: 0.85rem;
  }
}

/* Mobile */
@media (max-width: 575.98px) {
  .ml-hero__container {
    padding-top: 1.75rem;
    padding-bottom: 2.75rem;
  }

  .ml-hero__title {
    font-size: clamp(1.55rem, 7.2vw, 2rem);
  }

  .ml-hero__lead {
    font-size: 0.98rem;
    margin-bottom: 1.25rem;
  }

  .ml-hero__btn {
    width: 100%;
    min-height: 46px;
  }

  .ml-hero__actions {
    width: 100%;
  }

  .ml-hero__visual img {
    max-height: 240px;
  }

  .ml-hero__eyebrow {
    margin-bottom: 0.85rem;
  }
}

/* Very small / landscape phones */
@media (max-height: 520px) and (orientation: landscape) {
  .ml-hero__container {
    padding-top: 1.1rem;
    padding-bottom: 2rem;
  }

  .ml-hero__grid {
    grid-template-columns: 1.1fr 0.9fr;
    text-align: start;
    gap: 1rem;
    min-height: 0;
  }

  .ml-hero__copy,
  .ml-hero__visual {
    order: initial;
    margin-inline: 0;
  }

  .ml-hero__actions {
    justify-content: flex-start;
  }

  .ml-hero__btn {
    width: auto;
  }

  .ml-hero__visual img {
    max-height: 180px;
  }
}
