/* Native replacements for the landing slider, reveal, marquee and lightbox behaviors. */
.native-slider {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.native-slider::-webkit-scrollbar {
  display: none;
}

/*
 * KHÔNG set `width: max-content` trên wrapper: design CSS dùng `width: calc(100%/3)`
 * cho slide — phần trăm phải resolve theo bề rộng khung nhìn của slider, đúng như
 * `slidesPerView` của Swiper. Wrapper giữ 100%, slide `flex: 0 0 auto` → tràn ngang → scroll.
 */
.native-slider > .swiper-wrapper,
.native-slider .swiper-wrapper {
  display: flex;
  flex-wrap: nowrap;
  transform: none !important;
}

.native-slider .swiper-slide {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

/* Swiper `grid: { rows: n }` → wrap nhiều hàng (services). */
.native-slider--wrap > .swiper-wrapper,
.native-slider--wrap .swiper-wrapper {
  flex-wrap: wrap;
}

.native-slider--wrap {
  overflow-x: hidden;
  scroll-snap-type: none;
}

/* services: Swiper cấp width qua inline style, design CSS không set → native tự cấp. */
.services-slider .native-slider .swiper-slide {
  width: calc(100% / 3);
}

@media screen and (max-width: 767px) {
  .services-slider .native-slider .swiper-slide {
    width: 50%;
  }
}

@media screen and (max-width: 575px) {
  .services-slider .native-slider .swiper-slide {
    width: 100%;
  }
}

/*
 * Base contract của swiper-bundle.css mà style.min.css phụ thuộc (đã gỡ Swiper).
 *
 * Đặt trong `@layer` vì file này enqueue SAU style.min.css: rule không-layer luôn
 * thắng rule trong layer bất kể thứ tự/specificity → design giữ nguyên quyền override
 * đúng như khi swiper-bundle.css còn nạp trước.
 *
 * KHÔNG scope vào `.native-slider`: markup đặt `.swiper-pagination` là SIBLING của `.swiper`.
 */
@layer swiper-base {
  .swiper-pagination {
    position: absolute;
    text-align: center;
    transition: 0.3s opacity;
    transform: translate3d(0, 0, 0);
    z-index: 10;
  }

  .swiper-pagination-bullets,
  .swiper-pagination-bullets.swiper-pagination-horizontal {
    bottom: 10px;
    left: 0;
    width: 100%;
  }

  .swiper-pagination-bullet {
    appearance: none;
    background: var(--ink-strong);
    border: none;
    border-radius: 50%;
    box-shadow: none;
    display: inline-block;
    height: 8px;
    margin: 0;
    opacity: 0.2;
    padding: 0;
    width: 8px;
  }

  .swiper-pagination-bullet:only-child {
    display: none !important;
  }

  .swiper-pagination-bullet-active {
    background: var(--brand-blue);
    opacity: 1;
  }

  .swiper-pagination-bullets .swiper-pagination-bullet {
    margin: 0 4px;
  }

  /*
   * Design set `left:50%` + `width:fit-content` nhưng không bù translate (bản gốc
   * nhận từ CSS core của Bricks). Chỉ áp cho pagination absolute trong `.slider-wrapper`
   * — `.services-slider` dùng `position:initial` nên phải loại trừ.
   */
  .slider-wrapper .swiper-pagination {
    transform: translateX(-50%);
  }
}

.swiper-pagination .swiper-pagination-bullet {
  cursor: pointer;
}

.swiper-pagination[hidden],
.swiper-navigation [hidden] {
  display: none !important;
}

.results-thumb .native-slider {
  scroll-padding-inline: var(--sp, 0.5rem);
}

/*
 * FAQ — chiều cao do JS animate (design đã khai báo `will-change:height`).
 * Đây chỉ là affordance cho vùng bấm; đã thử `grid-template-rows` nhưng trong
 * bối cảnh này track không resolve ra chiều cao nội dung.
 */
.faq-head,
.js-faq-head,
.js-faq-item .faq-tt {
  cursor: pointer;
}

.faq-head:focus-visible {
  outline: 2px solid var(--brand-yellow);
  outline-offset: 2px;
}

/* `.native-reveal` đã chuyển sang style.min.css (dùng chung toàn site). */

.native-marquee {
  animation: native-marquee-scroll 28s linear infinite;
  display: flex !important;
  flex-wrap: nowrap !important;
  width: max-content !important;
}

.native-marquee:hover,
.native-marquee:focus-within {
  animation-play-state: paused;
}

@keyframes native-marquee-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.native-lightbox {
  background: color-mix(in srgb, var(--ink-strong) 82%, transparent);
  border: 0;
  box-sizing: border-box;
  color: var(--text-on-blue);
  height: 100dvh;
  margin: 0;
  max-height: none;
  max-width: none;
  padding: 4rem;
  width: 100vw;
}

.native-lightbox::backdrop {
  background: color-mix(in srgb, var(--ink-strong) 82%, transparent);
}

.native-lightbox__frame {
  align-items: center;
  display: flex;
  height: 100%;
  justify-content: center;
  position: relative;
  width: 100%;
}

.native-lightbox__image {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.native-lightbox__button {
  align-items: center;
  background: color-mix(in srgb, var(--ink-strong) 45%, transparent);
  border: 1px solid color-mix(in srgb, var(--surface) 55%, transparent);
  border-radius: 50%;
  color: var(--text-on-blue);
  cursor: pointer;
  display: inline-flex;
  font-size: 2rem;
  height: 4rem;
  justify-content: center;
  line-height: 1;
  padding: 0;
  position: absolute;
  width: 4rem;
  z-index: 1;
}

.native-lightbox__button:focus-visible {
  outline: 2px solid var(--brand-yellow);
  outline-offset: 3px;
}

.native-lightbox__close {
  right: 1rem;
  top: 1rem;
}

.native-lightbox__prev {
  left: 1rem;
}

.native-lightbox__next {
  right: 1rem;
}

@media (max-width: 575px) {
  .native-lightbox {
    padding: 3rem 1.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .native-slider {
    scroll-behavior: auto;
  }

  /* `.native-reveal` do style.min.css xử lý. */

  .native-marquee {
    animation: none;
  }
}

/*
 * Bảng giá — thay bố cục flex + `nth-of-type(6n+1)` của style.min.css.
 *
 * Bố cục cũ hardcode 6 ô/hàng và 5 cột (`calc(70%/5)`) nên chỉ đúng khi có đúng
 * 5 gói; trang SEO đang chạy 4 gói → nhãn và giá trị lệch cột từ hàng thứ hai.
 * `table-layout: fixed` cho trình duyệt tự chia đều số cột thực tế.
 */
table.pricing-compare {
  border-collapse: collapse;
  display: table;
  margin-top: 4rem;
  table-layout: fixed;
  width: 100%;
}

.pricing-compare__corner {
  width: 30%;
}

.pricing-compare th,
.pricing-compare td {
  border-bottom: 1px solid color-mix(in srgb, var(--brand-blue) 24%, transparent);
  min-height: 4rem;
  padding: 1rem;
  text-align: center;
  vertical-align: middle;
}

/* `.pricing-compare th` (0,1,1) thắng class đơn (0,1,0) → phải gắn kèm `th`. */
.pricing-compare th.pricing-compare__label {
  font-weight: 400;
  text-align: left;
}

.pricing-compare th.pricing-compare__label.is-bold {
  font-weight: 700;
}

.pricing-compare__head {
  position: relative;
}

.pricing-compare__head.is-best {
  background: var(--brand-blue);
  color: var(--text-on-blue);
}

.pricing-compare td.is-best {
  background: color-mix(in srgb, var(--brand-blue) 4%, transparent);
}

.pricing-compare__badge {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.pricing-compare__name {
  display: block;
  font-weight: 700;
}

.pricing-compare__price {
  display: block;
  font-size: 2.4rem;
  font-weight: 700;
}

.pricing-compare td img {
  height: auto;
  width: 2rem;
}

.pricing-compare caption {
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

@media screen and (max-width: 767px) {
  table.pricing-compare {
    display: none;
  }
}
/* ── Footer bottom: đưa về flow bình thường thay vì absolute ──────────────
   Bản gốc dùng position:absolute;bottom:-1.1rem khiến footer-bottom
   chồng lên item cuối cùng của cột menu ("About us"). */
.footer-grid {
  padding-bottom: 0;
}

.footer-bottom {
  position: relative !important;
  bottom: auto !important;
  width: 100% !important;
  margin-top: 3.2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, .15);
}

.footer-bottom::before {
  display: none !important;
}

/* Tách footer-bottom ra khỏi container để về cuối footer */
.site-footer > .container {
  position: relative;
}

/* ── Scroll target offset for sticky header ────────────────────── */
:is(#lead-form, #lien-he, #seo2-cta, #csa-cta, #cs-cta, #cta, .lead, .seo2-form-wrap, .csa-cta, .cs-cta) {
  scroll-margin-top: 80px;
}

.anchor-target {
  display: block;
  position: relative;
  top: -80px;
  visibility: hidden;
  pointer-events: none;
  height: 0;
  width: 0;
  margin: 0;
  padding: 0;
}
