/* =========================================================================
   Hero banner carousel + 2 feature boxes
   ========================================================================= */

.hero {
  position: relative;
  /* dvh keeps the bottom feature boxes inside the visible area on mobile
     browsers (100vh sits under the address bar). Tren desktop, khong dat
     max-height de hero luon chiem full 100vh, section duoi chi hien khi
     cuon xuong. */
  height: 100vh;
  height: 100dvh;
  min-height: 560px;
  overflow: hidden;
}

/* Service page hero: dung base .hero (full 100dvh o desktop) */

/* --- Static hero (no carousel) --------------------------------------------- */
.hero--static > .hero__slide {
  width: 100%;
  height: 100%;
}

/* --- Swiper ---------------------------------------------------------------- */
.hero__swiper {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero__nav {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
}

.hero__nav--prev { left: clamp(12px, 2vw, 32px); }
.hero__nav--next { right: clamp(12px, 2vw, 32px); }

.hero__nav svg {
  display: block;
  width: 48px;
  height: 48px;
  pointer-events: none;
}

.hero__nav:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.hero__slide {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__container {
  position: relative;
  z-index: 1;
  width: 100%;
  /* Chua cho header fixed (120px) + tha 2 box feature phia duoi (~200px) */
  padding-top: 130px;
  padding-bottom: 260px;
  box-sizing: border-box;
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  max-width: 645px;
}

/* Breadcrumb ben trong hero — giam opacity nhe cho dong bo (product/news/solution/...) */
.hero .breadcrumb {
  opacity: 0.7;
}

/* Breadcrumb cua Hero dung chung mau voi title dang hien thi. Bien mau duoc
   hero-page.js cap nhat khi carousel chuyen slide; fallback giu mau mac dinh. */
.hero .hero__breadcrumb-wrap .breadcrumb__link,
.hero .hero__breadcrumb-wrap .breadcrumb__current {
  color: var(--hero-breadcrumb-color, #293948);
}

.hero .hero__breadcrumb-wrap .breadcrumb__sep path {
  stroke: var(--hero-breadcrumb-color, #293948);
}

.hero__title {
  margin: 0;
  color: #293948;
  font-family: var(--font-hn);
  font-weight: 700;
  font-size: 48px;
  line-height: 124%;
  letter-spacing: 0.02em;
}

.hero__desc {
  margin: 0;
  color: #616161;
  font-family: var(--font-hn);
  font-weight: 300;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.01em;
}

.hero__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 12px 24px;
  border-radius: 40px;
  background: #293948;
  color: #FFFFFF;
  font-family: var(--font-hn);
  font-weight: 500;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background-color 0.25s ease, transform 0.25s ease;
}

.hero__btn:hover,
.hero__btn:focus {
  background: #D85401;
  color: #FFFFFF;
}

/* --- Dots pagination ------------------------------------------------------- */
/* Swiper's CSS is injected in <body> (after this file), and its
   `.swiper-pagination-bullets.swiper-pagination-horizontal` rule has the same
   0-2-0 specificity as `.hero__dots.swiper-pagination` — so it used to win on
   source order and force `top:auto; bottom:8px`. The extra `.hero` ancestor
   raises us to 0-3-0; the explicit inset resets undo Swiper's offsets. */
.hero .hero__dots.swiper-pagination {
  position: static;
  top: auto;
  bottom: auto;
  left: auto;
  right: auto;
  width: auto;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
  pointer-events: none;
}

.hero__dots .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  margin: 0;
  border-radius: 4px;
  background: #FFFFFF;
  opacity: 0.3;
  pointer-events: auto;
  transition: width 0.3s ease, opacity 0.3s ease;
}

.hero__dots .swiper-pagination-bullet-active {
  width: 24px;
  opacity: 1;
}

/* --- 2 feature boxes ------------------------------------------------------- */
.hero__features-wrap {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 2;
  width: 100%;
  transform: translateX(-50%);
}

.hero__features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.hero__feature {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  background: rgba(41, 57, 72, 0.28);
  box-shadow: 0 12px 32px rgba(16, 32, 52, 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #FFFFFF;
  text-decoration: none;
  transition: transform 0.28s ease, background-color 0.28s ease;
}


.hero__feature-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero__feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 24px;
  background: #FFFFFF;
  flex-shrink: 0;
}

.hero__feature-icon img {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.hero__feature-title {
  margin: 0;
  color: #FFFFFF;
  font-family: var(--font-hn);
  font-weight: 500;
  font-size: 20px;
  line-height: 138%;
  letter-spacing: 0.01em;
}

.hero__feature-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: nowrap;
}

.hero__feature-desc {
  margin: 0;
  color: #FFFFFF;
  font-family: var(--font-hn);
  font-weight: 300;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.01em;
  opacity: 0.3;
}

.hero__feature-arrow {
  display: inline-flex;
  flex-shrink: 0;
  line-height: 0;
}

.hero__feature-arrow svg {
  width: 32px;
  height: 32px;
  display: block;
}

/* --- Simple hero (breadcrumb + h1 only) ----------------------------------- */
.hero--simple {
  height: auto;
  min-height: 0;
  max-height: 480px;
}

.hero--simple > .hero__slide {
  height: 480px;
  justify-content: center;
}

.hero--simple .hero__container {
  padding-top: 130px;
  padding-bottom: 48px;
}

.hero--simple .hero__content--center {
  align-items: center;
  text-align: center;
  max-width: 100%;
  gap: 16px;
}

.hero--simple .hero__content--center .breadcrumb__list {
  justify-content: center;
}

.hero--simple .hero__title {
  color: #293948;
  font-family: var(--font-hn);
  font-weight: 700;
  font-size: 30px;
  line-height: 136%;
  letter-spacing: 0.01em;
  text-align: center;
  max-width: 850px;
}

/* --- Responsive ------------------------------------------------------------ */
@media screen and (max-width: 1024px) {
  .hero__container {
    padding-top: 100px;
    padding-bottom: 240px;
  }

  .hero__title {
    font-size: 40px;
  }
}

@media screen and (max-width: 767px) {
  .hero {
    height: auto;
    min-height: auto;
    max-height: none;
  }

  .hero__swiper {
    height: auto;
    min-height: 400px;
  }

  .hero__swiper .swiper-wrapper {
    height: auto;
    align-items: stretch;
  }

  .hero__swiper .hero__slide {
    height: auto;
    min-height: 400px;
  }

  .hero__swiper--has-navigation .hero__container {
    padding-right: 15px;
    padding-left: 15px;
  }

  .hero__nav {
    width: 36px;
    height: 36px;
  }

  .hero__nav--prev { left: 8px; }
  .hero__nav--next { right: 8px; }

  .hero__nav svg {
    width: 36px;
    height: 36px;
  }

  .hero--static > .hero__slide {
    min-height: 380px;
    height: auto;
  }

  .hero__container {
    padding-top: 96px;
    padding-bottom: 72px;
  }

  .hero__content {
    max-width: 100%;
    gap: 12px;
  }

  .hero__title {
    font-size: 26px;
  }

  .hero__desc {
    font-size: 15px;
  }

  .hero__btn {
    padding: 10px 20px;
    font-size: 15px;
  }

  .hero__features-wrap {
    position: static !important;
    left: auto;
    bottom: auto;
    transform: none;
    padding: 32px 0 24px;
  }

  .hero__features {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 0 16px;
  }

  .hero__feature {
    padding: 14px;
    gap: 10px;
    border-radius: 16px;
    background: rgba(41, 57, 72, 0.06);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    border-color: rgba(41, 57, 72, 0.08);
  }

  .hero__feature-title {
    font-size: 16px;
    color: #293948;
  }

  .hero__feature-desc {
    font-size: 14px;
    color: #616161;
    opacity: 1;
  }

  .hero__feature-arrow svg rect {
    fill: #293948;
    fill-opacity: 0.1;
  }

  .hero__feature-arrow svg path {
    stroke: #293948;
  }

  /* Keep pagination near the bottom of the carousel as its height grows with content. */
  .hero .hero__dots.swiper-pagination {
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;
    right: auto;
    width: auto;
    margin: -56px 0 48px;
    z-index: 20;
  }

  .hero__dots .swiper-pagination-bullet {
    background: #293948;
    opacity: 0.25;
  }

  .hero__dots .swiper-pagination-bullet-active {
    background: #293948;
    opacity: 1;
  }

  .hero--simple > .hero__slide {
    min-height: 200px;
  }

  .hero--simple .hero__container {
    padding-top: 100px;
    padding-bottom: 32px;
  }

  .hero--simple .hero__title {
    font-size: 24px;
  }
}
