/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Ảnh/iframe không bao giờ tràn ngang */
img {
  max-width: 100%;
}

/* DESKTOP CSS */
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: "Montserrat", Arial, Helvetica, sans-serif;
  color: #fff;
}

.desktop {
  display: flex;
  flex-direction: column;
  min-height: max-content;
  width: 100%;
  background: url("./images/background_1.png"),url("./images/background.png"), no-repeat center center fixed;
  background-size: cover;
  background-color: #161920;
  position: relative;
  overflow-y: auto;
  /* overflow: hidden; */
}

.menu-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  padding: 2vw 3vw;
  align-items: center;
}

.logo {
  max-width: 350px;
  margin-bottom: 20px;
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-mobile {
  display: none;
}

.logo-mobile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.download-app {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  border: 2px solid transparent;
  border-radius: 12px;

  background: linear-gradient(#017859, #014149) padding-box,
  linear-gradient(180deg, #F6C53F, #FDE071, #CE8C03) border-box;
}

.qr-custom {
  max-width: 168px;
  width: 100%;
}

.section-left-banner--mb {
  display: none;
}

.download-app.download-desktop {
  display: flex;
}

.download-app.download-mobile {
  display: none;
}

.download-app-right {
  display: flex;
}

.download-app-right-mobile {
  display: none;
  gap: 10px;
  width: 100%;
}

.qr-download-mobile {
  width: 100%;
}

.download-app img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.15) brightness(1.05);
  image-rendering: crisp-edges;
  image-rendering: -webkit-optimize-contrast;
  transform: scale(1.001);
  will-change: transform;
}

.download-app-left {
  display: flex;
  /*flex-direction: column;*/
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.download-app-flex, .download-app-flex-1 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.download-app-flex, .download-app-flex-1 img {
  cursor: pointer;
}

.title-group {
  width: 100%;
  text-align: center;
  margin-top: 2vh;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0vh;
}

.title-img {
  width: 15%;
  height: auto;
}

.title-banner-img {
  width: auto;
  height: auto;
}

.title-banner-img-mobile {
  display: none;
  width: auto;
  height: auto;
}

.title-banner-img img {
  width: 100%;
  object-fit: cover;
}

.title-banner-img-mobile img {
  width: 100%;
  object-fit: cover;
}

.social-icons {
  position: fixed;
  right: 2vw;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  z-index: 100;
  /*background: linear-gradient(#2D0172, #5B00D4);*/
  /*border-radius: 40px;*/
  /*padding: 10px;*/
  gap: 30px;
  /*border: 2px solid #9951a3;*/
}

.social-icon {
  width: clamp(50px, 5vw, 80px);
  height: clamp(50px, 5vw, 80px);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.social-icon:hover {
  /* transform: scale(1.1); */
}

.social-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/*Link Items*/
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.neon-text {
  font-size: 40px;
  font-weight: 900;
  text-transform: uppercase;
  color: #fff;
  letter-spacing: 2px;
  text-align: center;
  -webkit-text-stroke: 2px #00cfff;
  paint-order: stroke fill;
  filter: drop-shadow(0 0 3px #00cfff) drop-shadow(0 0 7px #007fff) drop-shadow(0 0 15px #0044ff);
  animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    filter: drop-shadow(0 0 3px #00cfff) drop-shadow(0 0 7px #007fff) drop-shadow(0 0 15px #0044ff);
  }
  50% {
    filter: drop-shadow(0 0 3px #00efff) drop-shadow(0 0 24px #00aaff) drop-shadow(0 0 25px #0055ff) drop-shadow(0 0 35px #003aaa);
  }
}

.link-items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  flex-direction: row;
  align-items: flex-end;
  justify-content: center;
  gap: 2.4rem;
  /*padding: 0 1rem 1rem;*/
  flex-wrap: wrap;
}

.link-item:hover {
  transform: scale(1.08);
  transition: transform 0.25s ease;
}

.link-item {
  transition: transform 0.25s ease;
}

.link-divider {
  width: 2px;
  height: 140px;
  border-left: 2px dashed #ccc;
  align-self: center;
  opacity: 0.5;
}

.link-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
}

.link-circle {
  position: relative;
  width: 220px;
  height: 220px;
  overflow: hidden;
}

/* Ring 1 — outer, full solid */
.link-ring-1 {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  object-fit: cover;
  opacity: 1;
  width: 100%;
  height: 100%;
}

/* Ring 2 — middle, nhiều răng cưa dùng repeating-conic-gradient */
.link-ring-2 {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: linear-gradient(180deg, #3AFFB0, #D5D5D5);
  -webkit-mask: repeating-conic-gradient(#000 0deg 4deg, transparent 4deg 6deg),
  radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 5px));
  mask: repeating-conic-gradient(#000 0deg 4deg, transparent 4deg 6deg),
  radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 5px));
  -webkit-mask-composite: intersect;
  mask-composite: intersect;
  opacity: 0.9;
}

/* Ring 3 — inner, 70% arc, spinning */
/* Uses conic-gradient + radial-gradient mask to create a partial arc ring */
.link-ring-3 {
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  background: conic-gradient(var(--color) 252deg, transparent 252deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 5px));
  animation: spin 2s linear infinite;
}

/* Center content */
.link-content {
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.link-content-1 {
  position: absolute;
  top: 18%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Chỉ desktop: nhãn LINK dịch lên top 15% (mobile/tablet giữ 18%) */
@media (min-width: 1025px) {
  .link-circle {
    width: 100%;
    height: 100%;
  }
  .link-content-1 {
    top: 19%;
  }

  /* Khung nền nhỏ lại 90% (thụt ~5% mỗi cạnh) => tăng padding để
     các vòng tròn nằm gọn bên trong khung */
  .section-left-banner {
    background-size: 90% 90%;
    padding: 60px 96px;
  }
}

.link-content-1-ms {
  color: #FFFF6D;
  font-weight: 700;
  font-size: 20px;
}

.link-ms {
  color: #fff;
  font-weight: 700;
  font-size: 30px;
}

.link-ms-1 {
  color: #fff;
  font-weight: 700;
  font-size: 20px;
}

.link-label img {
  width: 100%;
}

.link-label {
  position: relative;
  color: #3447F5;
  font-weight: 700;
  font-size: 16px;
  /*letter-spacing: 1px;*/
}

.link-text {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  text-align: center;
}

/*Link Section*/
.link-section {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.link-section img {
  max-width: 55rem;
  max-height: 22rem;
  object-fit: contain;
}

.link-join {
  margin-top: -6rem;
  background: #fff;
  position: relative;
  border: 8px solid #FFA4D1;
  border-radius: 16px;
  padding: 40px 40px 0 40px
}

.link-join-img {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
}

/* section-desktop */
.section-desktop {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.box-text {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  text-align: center;
}

.section-left-banner {
  position: relative;
  /*background: #1B063C;*/
  border-radius: 40px;
  padding: 25px;
  background: url("./images/link-ring-bg.png") no-repeat center center;
  /* Khung nền kéo khít khối => ôm trọn các vòng tròn, padding tạo khoảng hở */
  background-size: contain;
}

.section-left-banner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.section-left-banner .speed-test {
  width: auto;
  object-fit: cover;
}

.section-left {
  width: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}

.icon-ios {
  display: flex;
  align-items: center;
  /*gap: 10px;*/
  /*text-decoration: none;*/
  /*width: 100%;*/
  /*max-width: 145px;*/
}

.icon-ios img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section-right {
  width: auto;
  position: relative;
  display: flex;
  flex-direction: column;
}

.banner-right {
  width: 100%;
  max-height: 750px;
}

.banner-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Social Buttons */
.social {
  display: none;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0;
  align-items: center;
}

.social-row {
  display: flex;
  flex-direction: row;
  gap: 10px;
  justify-content: space-between;
}

.social-btn-link {
  display: inline-block;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.social-btn-link img {
  /*height: 44px;*/
  width: 100%;
  display: block;
  object-fit: contain;
  filter: contrast(1.15) brightness(1.05);
  image-rendering: crisp-edges;
  image-rendering: -webkit-optimize-contrast;
  transform: scale(1.001);
  will-change: transform;
}

.social-btn-link:hover {
  transform: scale(1.06);
  filter: brightness(1.05);
}

.section-2 {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: #0F4A36;
  padding: 40px 10px;
}

.section-container {
  max-width: 1440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: auto;
  gap: 20px;
}

.section-container-1 {
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: auto;
}

.section-title {
  color: #fff;
  font-weight: bold;
  font-size: 14px;
  max-width: 1000px;
  text-align: center;
}

.section-text {
  text-align: center;
  color: #fff;
  max-width: 1000px;
  font-size: 16px;
}

.section-title-1 {
  background: linear-gradient(
      180deg,
      #FFFFA8 0%,
      #EABB00 50%,
      #FFF9A9 100%
  );

  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  /*color: #FFD700;*/
  font-weight: bold;
  font-size: 36px;
  text-align: center;
}

.section-title-2 {
  color: #fff;
  font-weight: bold;
  font-size: 24px;
  text-align: center;
}

.section-cards {
  display: flex;
  gap: 20px;
  /*align-items: center;*/
}

.section-cards-1 {
  display: flex;
  gap: 20px;
  align-items: center;
}

.section-card {
  background: linear-gradient(#017859, #014149) padding-box;
  border-radius: 15px;
  width: 100%;
  border: 2px #66c066 solid;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Card giải trí: phần ruột lấp đầy chiều cao card (đã được flex cào bằng),
   để 3 card trên 1 hàng cao đều nhau và ảnh kéo hết card */
.section-card > .card-flex-1,
.section-card > .card-flex {
  flex: 1;
}

.section-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-flex {
  padding: 20px;
  display: flex;
  gap: 20px;
}

.card-column {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card-flex-1 {
  display: flex;
  gap: 20px;
  align-items: center;
}

.card-text-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card-title {
  background: linear-gradient(
      180deg,
      #FFFFA8 0%,
      #EABB00 50%,
      #FFF9A9 100%
  );

  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: bold;
  font-size: 16px;
}

.card-text {
  color: #fff;
  font-size: 14px;
}

.card-icon {
  width: 90px !important;
  height: 90px !important;
}

.card-icon-1 {
  width: 60px !important;
  height: 60px !important;
}

.image-step {
  position: relative;
  overflow: hidden;
  width: 100%;
}

/* Ảnh định vị tuyệt đối => chữ làm chủ chiều cao, ảnh cover lấp đầy bằng chữ */
.image-step img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Card "Getting started": chữ trái / ảnh phải 30%, hai cột cao bằng nhau */
.card-flex:has(> .image-step) {
  align-items: stretch;
}

.card-flex:has(> .image-step) > .card-text-column {
  flex: 1 1 70%;
  min-width: 0;
}

.card-flex > .image-step {
  flex: 0 0 30%;
  align-self: stretch;
  border-radius: 10px;
}

.image-banner {
  position: relative;
  overflow: hidden;
  width: 100%;
}

/* Ảnh định vị tuyệt đối => KHÔNG tự đẩy chiều cao, chỉ lấp đầy theo
   chiều cao do cột chữ quyết định (chữ làm chủ). cover => phủ kín không trống. */
.image-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

/* Card giải trí (desktop): ảnh 40% / chữ 60%. Chữ làm chủ chiều cao,
   ảnh stretch theo đúng chiều cao cột chữ => hai bên bằng nhau, ảnh phủ kín. */
.card-flex-1 > .image-banner {
  flex: 0 0 40%;
  align-self: stretch;
}

.card-flex-1 > .card-text-column {
  flex: 1 1 60%;
  min-width: 0;
  align-self: stretch;
  justify-content: center;
}

/* Hướng 2: thu nhỏ chữ ở các card này để cân chiều cao với ảnh */
.card-flex-1 > .card-text-column .card-text {
  font-size: 13px;
}

.section-conclusion {
  display: flex;
  align-items: center;
}

.section-conclusion img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-sealess {
  width: 100%;
  height: 100%;
}

.img-sealess img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.social-wrap {
  margin-top: 20px;
  position: relative;
  display: none;
  flex-direction: column;
  align-items: center;
}

.social-flex {
  display: flex;
  align-items: center;
  gap: 20px;
}

.center-logo {
  width: 100px;
  height: 70px;
}

.footer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  background: #0D6956;
  padding: 40px 0;
  /*width: 100%;*/
  /*height: 100%;*/
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 1200px;
  padding: 0 20px;
  box-sizing: border-box;
}

.footer-content img {
  width: calc(10% - 11px);
  height: auto;
  object-fit: contain;
  transition: transform 0.25s ease;
  transform-origin: center;
}

.footer-content img:hover {
  transform: scale(1.08);
}

.footer-end {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 10px;
  margin-top: 20px;
}

.footer-end img {
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: transform 0.25s ease;
  transform-origin: center;
  margin: 0 5px;
}

.footer-end img:hover {
  transform: scale(1.08);
}

.footer-end-content {
  display: flex;
  justify-content: center;
  margin: 0 3px;
}

.footer-desktop {
  display: block;
}

.footer-mobile {
  display: none;
}

/* =========================================================
   MOBILE + TABLET  (≤ 1024px)
   Tablet dùng chung style với mobile theo yêu cầu.
   Một breakpoint duy nhất thay cho toàn bộ media query
   theo từng thiết bị (đã gỡ bỏ vì trùng lặp/mâu thuẫn).
   ========================================================= */
@media (max-width: 1024px) {
  .desktop {
    background: url(./images/H5.png) no-repeat center center;
    background-size: cover;
    background-color: #161920;
  }

  /* ----- Bố cục đầu trang ----- */
  .section-desktop {
    flex-direction: column;
    align-items: center;
    margin-top: 15px;
    gap: 10px;
  }

  .section-left {
    align-items: center;
    width: 100%;
  }

  .logo {
    display: none;
  }

  .logo-mobile {
    max-width: clamp(180px, 45vw, 250px);
    display: block;
  }

  /* ----- Khối speed-test các link ----- */
  /* Khung nền kéo giãn vừa đúng khối => viền bám mép, padding tạo khoảng hở thật.
     padding: <trên/dưới>  <trái/phải> */
  .section-left-banner {
    padding: clamp(20px, 4vw, 44px) clamp(16px, 3vw, 36px);
    border-radius: 20px;
    width: 100%;
    background-size: 100% 100%;
  }

  .section-left-banner--mb {
    display: block;
    width: 100%;
    text-align: center;
  }

  .section-left-banner--mb img {
    width: 100%;
  }

  .link-section img {
    width: 100%;
    height: 100%;
  }

  .link-items {
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
    justify-items: center;
    /* gap: <dọc giữa 2 hàng>  <ngang giữa các cột> */
    gap: clamp(0px, 0.5vw, 6px) clamp(3px, 1.4vw, 20px);
  }

  .link-divider {
    display: none;
  }

  .link-circle {
    width: clamp(92px, 28.5vw, 170px);
    height: clamp(92px, 28.5vw, 170px);
  }

  /* Ring lấp đầy vòng nhỏ trên mobile/tablet (desktop dùng kích thước cố định) */
  .link-ring-1 {
    width: 100%;
    height: 100%;
  }

  .link-ms {
    font-size: clamp(0.95rem, 3.6vw, 1.5rem);
  }

  .link-ms-1 {
    font-size: clamp(0.75rem, 2.6vw, 1.05rem);
  }

  .link-content-1-ms {
    font-size: clamp(0.68rem, 2.6vw, 1rem);
  }

  /* ----- Tải app ----- */
  .download-app {
    border: none;
    background: none;
  }

  .download-app-flex {
    flex-direction: column;
  }

  .download-app-flex-1 {
    flex-direction: column-reverse;
  }

  .qr-custom {
    max-width: 300px;
    width: 100%;
  }

  /* ----- Khối card nội dung ----- */
  .section-cards,
  .section-cards-1 {
    flex-direction: column;
  }

  .card-flex,
  .card-column {
    padding: 12px;
    gap: 12px;
  }

  .card-text-column,
  .card-flex-1,
  .card-flex-2 {
    gap: 12px;
  }

  .card-title {
    font-size: 15px;
  }

  .card-text {
    font-size: 13px;
  }

  .card-icon {
    width: 65px !important;
    height: 65px !important;
  }

  .card-icon-1 {
    width: 40px !important;
    height: 40px !important;
  }

  .image-banner img {
    width: 100%;
  }

  /* Mobile/tablet: ảnh nhỏ lại, text rộng + font to hơn cho cân chiều cao */
  .card-flex-1 > .image-banner {
    flex: 0 0 45%;
  }

  .card-flex-1 > .card-text-column {
    flex: 1 1 55%;
  }

  .card-flex-1 > .card-text-column .card-text {
    font-size: 14px;
  }

  .img-conclusion-1 {
    max-width: clamp(70px, 18vw, 110px);
    max-height: clamp(70px, 18vw, 110px);
  }

  .img-conclusion-2 {
    display: none;
  }

  /* ----- Chữ các section ----- */
  .section-text,
  .section-title {
    font-size: 14px;
  }

  .section-title-1 {
    font-size: clamp(20px, 5vw, 28px);
  }

  /* ----- Nút mạng xã hội (hàng) thay cho icon dọc bên phải ----- */
  .social {
    display: flex;
    width: 100%;
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
    gap: 12px;
  }

  .social-row {
    width: 100%;
    gap: clamp(20px, 5vw, 60px);
    justify-content: center;
  }

  .social-btn-link {
    display: flex;
    justify-content: center;
    flex: 1 1 0;
    min-width: 0;
  }

  .social-btn-link img {
    width: 70%;
    height: auto;
  }

  .social-icons {
    display: none;
  }

  /* ----- Footer ----- */
  .footer-content {
    gap: 8px;
  }

  .footer-content img {
    width: calc(20% - 7px);
  }

  .footer-end-content img {
    width: calc(20% - 7px);
  }

  .footer-end-content img:nth-child(2) {
    width: calc(11% - 7px);
  }
}

/* =========================================================
   TABLET (768–1024px): cột ảnh trái 30%, chữ chiếm phần còn lại, font to hơn
   ========================================================= */
@media (min-width: 768px) and (max-width: 1024px) {
  /* Ảnh cao bằng đúng cột chữ (chữ làm chủ), cover lấp đầy => 2 bên cao đều,
     cột chữ không còn dư khoảng trắng trên/dưới. Khung hẹp+cao nên ảnh chủ yếu
     bị cắt nhẹ hai bên, giữ được trên/dưới. */
  .card-flex-1 > .image-banner {
    flex: 0 0 14%;
    align-self: stretch;
  }

  .card-flex-1 > .card-text-column {
    flex: 1 1 86%;
    justify-content: flex-start;
  }

  .card-flex-1 > .card-text-column .card-text {
    font-size: 14px;
  }

  .card-flex-1 > .card-text-column .card-title {
    font-size: 14px;
  }

  /* Social: tablet rộng hơn + khoảng cách nút to hơn */
  .social {
    max-width: 600px;
  }
  .social-row {
    width: 100%;
    gap: clamp(20px, 5vw, 60px);
  }
  .social-btn-link img {
    width: 100%;
  }
  .social-btn-link img {
    width: 85%;
  }
}
@media (min-width: 820px) {
  .social {
    max-width: 600px;
  }
  .social-btn-link img {
    width: 85%;
  }
}
@media (min-width: 912px) {
  .link-circle {
    width: 250px;
    height: 250px;
  }
  .social {
    max-width: 580px;
  }
}

@media (min-width: 1024px) {
  .link-circle {
    width: 250px;
    height: 250px;
  }
}
