/* ============ CSS VARIABLES ============ */
:root {
  --primary-color: #00AEEF;
  --secondary-color: #FF9500;
  --text-color: #585858;
  --border-color: #D9D9D9;
  --container-max-width: 1300px;
  --transition-speed: 0.2s;
  --border-radius: 8px;
  --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ============ GLOBAL RESET FOR CONSISTENT RENDERING ============ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  line-height: 1.4;
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Prevent horizontal scroll */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

/* Reset common elements */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  padding: 0;
  font-weight: inherit;
  font-size: inherit;
}

p,
ul,
ol,
li,
dl,
dt,
dd {
  margin: 0;
  padding: 0;
}

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Fix for flexbox and grid */
.flex,
.d-flex {
  display: flex !important;
}

.grid {
  display: grid !important;
}

/* Container max-width safety */
.container,
.container-fluid {
  max-width: 100%;
  overflow-x: hidden;
}

.wp-banner {
  background-image: url(./../images/bg-pc.png);
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  height: 100vh;
  min-height: 100vh;
  width: 100%;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

.img-phone {
  filter: invert(1)
}

body {
  background-color: #fff;
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.dp-pc {
  display: block !important;
}

.dp-mb {
  display: none !important;
}

.wp-site {
  height: 100vh;
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
}

.container {
  max-width: 1300px !important;
  width: 100%;
  margin: 0 auto;
  padding: 0 15px;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* PC ONLY - Large container */
@media screen and (min-width: 768px) {
  .container {
    max-width: 1400px !important;
  }
}

a {
  cursor: pointer;
}

/* Logo */

.logo-company {
  max-width: 300px;
  width: 100%;
  margin: auto;
  padding-top: 10px;
  position: relative;
  z-index: 1;
  -webkit-animation: drift 2s infinite alternate;
  animation: drift 2s infinite alternate;
}

.logo-company img {
  width: 100%;
  height: auto;
}

/* Redirect Link */
.bottom-redirect {
  background: url(./../images/bg-download.png) no-repeat center center;
  display: flex;
  justify-content: center;
  width: 831px;
  height: 208px;
  margin: 0 auto;
}

/* PC ONLY - Large download container */
@media screen and (min-width: 768px) {
  .bottom-redirect {
    background-size: contain;
    width: 100%;
    max-width: 1000px;
    height: auto;
    min-height: 200px;
  }

  .wp-speed-title {
    height: 50px;
  }
}

.wp-speed-title {
  display: flex;
  justify-content: center;
  margin: 10px auto;
}

.wp-box-center {
  width: 800px;
}

.wp-speed {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 831px;
  height: 506px;
  background: url(./../images/speed-test.png) no-repeat center center;
  margin: 0 auto;
}

/* PC ONLY - Large speed container */
@media screen and (min-width: 768px) {
  .wp-speed {
    width: 100%;
    max-width: 1000px;
    height: auto;
    min-height: 440px;
    background-size: contain;
  }
}

.wp-speed-content {
  margin-top: 30px;
}

.wp-speed-text {
  font-size: 30PX;
  font-weight: 800;
  color: #00AEEF;
  text-align: center;
  padding: 15px 0;
}

.redirect-links {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  /* PC: 2 cột */
  grid-template-rows: repeat(3, auto) !important;
  /* PC: 3 hàng */
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  z-index: 2;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* ============ RESPONSIVE BREAKPOINTS ============ */

/* TABLET PORTRAIT - 768px to 1023px */
@media screen and (min-width: 768px) and (max-width: 1023px) {
  .container {
    max-width: 1400px !important;
  }

  .redirect-links {
    max-width: 1200px !important;
    gap: 15px !important;
  }

  .item-link {
    min-height: 80px !important;
    padding: 10px !important;
  }

  .item-link .icon img,
  .item-link img {
    width: 400px !important;
    max-width: 100% !important;
    height: auto !important;
    min-width: 400px !important;
  }

  .wp-speed {
    max-width: 1000px !important;
    min-height: 500px !important;
  }

  .bottom-redirect {
    max-width: 1000px !important;
    min-height: 200px !important;
  }

  .qr-app-row {
    gap: 40px !important;
  }

  .qr-app-col {
    width: 300px !important;
    height: 200px !important;
  }

  .qr-app-col img.qr-img {
    max-width: 200px !important;
    height: 120px !important;
  }

  .qr-app-col a img {
    max-width: 150px !important;
    height: 100px !important;
  }

  .logo-company {
    max-width: 300px !important;
    padding: 20px 0 !important;
  }

  .speed-meter {
    font-size: 1.1rem !important;
  }
}

/* TABLET LANDSCAPE - 1024px to 1199px */
@media screen and (min-width: 1024px) and (max-width: 1199px) {
  .container {
    max-width: 1100px !important;
  }

  .redirect-links {
    max-width: 900px !important;
    gap: 15px !important;
  }

  .item-link .icon img,
  .item-link img {
    width: 200px !important;
    min-width: 200px !important;
    max-width: 100% !important;
  }

  .wp-speed {
    max-width: 800px !important;
    min-height: 350px !important;
  }

  .bottom-redirect {
    max-width: 800px !important;
    min-height: 180px !important;
  }
}

/* LARGE DESKTOP - 1200px and above */
@media screen and (min-width: 1200px) {
  .redirect-links {
    max-width: 1100px !important;
    gap: 15px !important;
  }

  .item-link .icon img,
  .item-link img {
    width: 260px !important;
    min-width: 260px !important;
    max-width: 100% !important;
  }
}

.item-link {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60px;
  width: 100%;
  text-align: center;
}

/* ============ PC DESKTOP STYLES (1024px+) ============ */
@media screen and (min-width: 1024px) {
  .item-link {
    min-height: 70px !important;
    padding: 10px !important;
  }

  .redirect-links .item-link .icon img,
  .redirect-links .item-link img,
  .item-link .icon img,
  .item-link img {
    max-width: 100% !important;
    height: auto !important;
    min-width: 250px !important;
    width: 300px !important;
  }

  .qr-app-row {
    margin-top: 20px !important;
    gap: 30px !important;
  }

  .qr-app-col {
    width: 250px !important;
    height: 180px !important;
    gap: 10px !important;
  }

  .qr-app-col img.qr-img {
    max-width: 180px !important;
    width: 100% !important;
    height: 120px !important;
    margin-bottom: 10px !important;
  }

  .qr-app-col a img {
    max-width: 140px !important;
    width: 100% !important;
    height: 80px !important;
    margin-bottom: 10px !important;
  }

  .logo-company {
    max-width: 250px !important;
    padding: 15px 0 !important;
  }

  .speed-meter {
    font-size: 0.9rem !important;
  }
}

/* ============ INTERACTIVE STATES ============ */
.item-link {
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.item-link:hover {
  transform: translateY(-2px);
}

.item-link:active {
  transform: translateY(0);
}

/* CSS Grid items */
.redirect-links .item-link {
  display: grid;
}

/* Show/hide desktop vs mobile links */
.domain-desktop {
  display: block !important;
}

.domain-mobile {
  display: none !important;
}

@media (max-width: 767px) {
  .domain-desktop {
    display: none !important;
  }

  .domain-mobile {
    display: block !important;
  }
}



.icon-link.btn-link02 {
  background-image: url(./../images/icon-link2.png);
}

.icon-link.btn-link03 {
  background-image: url(./../images/icon-link3.png);
}

.icon-link.btn-link04 {
  background-image: url(./../images/icon-link4.png);
}

.icon-link.btn-link05 {
  background-image: url(./../images/icon-link5.png);
}

.icon-link.btn-link06 {
  background-image: url(./../images/icon-link6.png);
}

.item-link .title {
  font-size: 20px;
  font-weight: 700;
  padding: 5px;
  border-bottom: 1px solid #D9D9D9;
  width: 100%;
}

.item-link .speed {
  font-size: 16px;
  color: #585858;
  font-weight: 700;
  padding: 0px;
  position: absolute;
  right: 9px;
  white-space: nowrap;
  flex-shrink: 0;
  top: 14px;
}

.item-link .btn-redirect {
  padding: 2px 0px;
  width: 100%;
  transition: 0.3s;
}

.item-link .speed {
  padding: 0px;
  margin-bottom: 5px;
}

.item-link .btn-redirect:hover {
  text-decoration: none !important;
  -webkit-transform: translateY(-5px);
  transform: translateY(-5px);
}

.element-hover:hover {
  text-decoration: none !important;
  -webkit-transform: translateY(-5px);
  transform: translateY(-5px);
}

.item-link .title-top {
  font-size: 18px;
  color: #FF9500;
}

.item-link .btn-link {
  text-decoration: none;
  box-sizing: border-box;
  color: #00AEEF;
}

.nhapnhay2 {
  font-weight: 700;
  animation: my02 1s infinite;
  text-align: center
}

.br_right_bar {
  position: fixed;
  top: 70%;
  transform: translateY(-50%);
  right: 24px;
  z-index: 1111;
  transition: .3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4.5px;
  -webkit-animuiion: zoom 1.3s infinite;
  animation: zoom 1.3s infinite;
}

.br_right_bar .right-item {
  width: 100%;
  height: auto;
  gap: 4px;
  position: relative;
  transform: translate(-30px, -100px);
  cursor: pointer;
  border-radius: 50%;
  box-shadow: inset 0 -3.55px 4.733px 0 rgba(0, 0, 0, .25);

}

/* Desktop: CSKH góc trên phải */
@media screen and (min-width: 768px) {
  .br_right_bar {
    top: 80px;
    right: 50px;
    transform: translateY(0);
  }

  .br_right_bar .right-item {
    width: 90px;
    height: 90px;
    transform: translate(0, 0);
  }
}

.br_right_bar .right-item .ellipse {
  background: url(../images/ellipse-cskh.png);
  background-size: contain;
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  position: absolute;
  -webkit-animation: shake 1.3s infinite;
  animation: shake 1.3s infinite;
}

.br_right_bar .right-item .LIVECHAT {
  width: 80%;
  height: 80%;
  background: url(../images/icon-cskh.png) no-repeat 50% / contain;
  transform: rotate(-360deg);
  /* Hoặc animation riêng để ngược lại */
  /* animation: counterSpin 2s linear infinite; */
}

@keyframes counterSpin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(359deg);
  }

}

.br_right_bar .right-item,
.br_right_bar .right-item .rightbat-box {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.br_right_bar .right-item .rightbat-box .rightbar_title {
  color: #fff;
  text-align: center;
  font-size: 10px;
  font-weight: 600;
}

@keyframes shake {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes my02 {
  0% {
    color: #000;
  }

  50% {
    color: #38497a;
  }

  to {
    color: #000;
  }
}

/* End Redirect Link */

/* Banner VIP */

.banner-vip {
  width: 94%;
  margin: auto;
  margin-top: 30px;
  display: flex;
}

.banner-vip img {
  width: 100%;
  height: auto;
}

/* End Banner VIP */

@media screen and (max-width: 1300px) {

  .item-link .title {
    font-size: 18px;
  }

  .item-link .btn-link {
    font-size: 16px;
  }

  .wp-item-link {
    padding: 10px 15px;
  }

  /* Layout */
  .wp-box-center {
    padding-left: 50px;
    padding-right: 50px;
  }
}

@media screen and (max-width: 1200px) {
  .wp-box-center {
    padding-left: 15px;
    padding-right: 15px;
  }
}

@media screen and (max-width: 1100px) {
  .logo-company {
    max-width: 200px;
  }

  .ds-image {
    max-width: 240px;
    margin-bottom: -45px;
  }


  .download-product {
    padding: 14px 100px;
    margin-top: 10px;
  }

  .product-item .product-title {
    font-size: 14px;
  }

  .product-item .thumb-nail {
    height: 65px;
  }

  .product-item {
    height: 65px;
  }

  .wp-item-link {
    padding: 5px 8px;
  }

  .icon-link {
    min-height: 35px;
    top: 6px;
    left: 0px;
  }

  .list-btn-function {
    gap: 10px;
    padding: 0px;
  }

}

@media screen and (max-width: 990px) {
  .item-link .title {
    font-size: 15px;
  }

  .item-link .btn-link {
    font-size: 12px;
    padding: 5px 15px;
  }

  .download-product {
    padding: 14px 45px;
  }

  .bottom-redirect {
    padding: 0px 0px;
  }

  .banner-vip {
    width: 90%;
  }

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

@media screen and (max-width: 767px) and (min-width: 500px) {
  .btn-function-sp {
    height: 135px !important;
  }
}

@media screen and (max-width: 767px) {
  * {
    overflow: unset;
  }

  body {
    overflow: auto;
    height: auto;
    min-height: 100vh;
  }

  .wp-banner {
    height: auto;
    min-height: 100vh;
    background-size: cover;
    background-position: center center;
    background-attachment: scroll;
    /* padding-bottom: 20px; */
  }

  /* Mobile: remove decorative backgrounds to avoid duplicate visuals */
  .wp-speed {
    background-image: none !important;
  }

  .bottom-redirect {
    background-image: none !important;
  }

  .wp-site {
    height: auto;
    min-height: 100vh;
  }

  .row>* {
    padding-left: 8px;
    padding-right: 8px;
  }

  .row.wp-content-cskh img {
    width: 100%;
  }

  .wp-speed-text {
    font-size: 18px;

  }

  .wp-speed-text img {
    width: 50%;
  }

  .br_right_bar .right-item {
    width: 70px;
    height: 70px;
  }

  .item-link .speed {
    font-size: 10px;
    top: 11px;
  }


  .image-title div {
    padding: 8px 0;
  }

  .wp-taiapp-img img {
    padding: 10px 0;
  }

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

  .br_right_bar {
    top: 32%;
    right: -30px;
  }

  video {
    display: none;
  }
}

/* ============ MOBILE STYLES (≤500px) ============ */
@media screen and (max-width: 500px) {

  /* Force no horizontal scroll on mobile */
  html,
  body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  .wp-speed-content {
    margin-top: 20px;
  }

  .wp-site {
    height: auto;
    min-height: 100vh;
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  .container {
    max-width: 100% !important;
    padding: 0 10px !important;
    overflow-x: hidden !important;
  }

  /* Performance: Remove background images on mobile */
  .wp-speed {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    background-image: none !important;
    overflow-x: hidden !important;
  }

  .bottom-redirect {
    width: 100% !important;
    height: auto !important;
    background-image: none !important;
    overflow-x: hidden !important;
  }

  .wp-banner {
    height: auto;
    min-height: 100vh;
    background-size: cover;
    background-position: center center;
    background-attachment: scroll;
    /* padding-bottom: 20px; */
    overflow-x: hidden !important;
  }

  /* Mobile: Single column layout */
  .redirect-links {
    grid-template-columns: 1fr !important;
    margin-top: 5px !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .item-link {
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .item-link img {
    width: 100% !important;
    max-width: 60vw !important;
    height: auto !important;
  }

  .item-link .btn-link,
  .item-link .title-top,
  .item-link .title {
    font-size: 3.2vw !important;
  }

  .item-link .btn-link {
    padding: 5px 7px;
  }

  /* Mobile: QR section */
  .qr-app-row {
    display: none;
  }

  .qr-app-row-mb {
    display: flex;
    flex-direction: row;
    gap: 12px;
    justify-content: center;
    align-items: center;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .qr-app-row-mb a {
    display: inline-flex;
    max-width: 100% !important;
  }

  .qr-app-row-mb img {
    max-width: 44vw;
    height: auto;
    display: block;
  }

  .wp-speed-title img {
    max-width: 100%;
    height: auto;
  }
}

@media screen and (max-width: 370px) {
  .wp-banner {
    height: auto;
    min-height: 100vh;
    background-size: cover;
    background-position: center center;
    background-attachment: scroll;
    /* padding-bottom: 20px; */
  }

  .wp-site {
    height: auto;
    min-height: 100vh;
  }

  .item-link {
    width: 100%;
  }
}

.btn-function-sp {

  background: linear-gradient(180deg, #019efb, #0176dc);

}

.speed-meter {
  position: absolute;
  top: 48%;
  left: 86%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: bold;
  color: #fff;
  pointer-events: none;
  line-height: 0.8;
  z-index: 2;
}

.icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon img {
  display: block;
  width: 100%;
  height: auto;
}

.link-label {
  position: absolute;
  left: 50%;
  bottom: 5%;
  transform: translateX(-50%);
  color: #ffffff;
  font-weight: bold;
  font-size: 1rem;
  pointer-events: auto;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.3s ease;
}

/* Hover effect cho domain links */
.item-link:hover .link-label {
  color: #e1fa03;
}

/* Hover effect cho toàn bộ item-link */
.item-link:hover {
  transform: translateY(-2px);
  transition: transform 0.3s ease;
}

@media (max-width: 576px) {
  .speed-meter {
    font-size: 0.8rem;
    min-width: unset;
    min-height: unset;
    padding: 0;
    left: 86%;
    top: 48%;
    transform: translate(-50%, -50%);
  }

  .icon {
    min-width: 48px;
    min-height: 48px;
  }
}

@media (max-width: 576px) {
  .link-label {
    padding: 8px 20px;
    font-size: 0.95rem;
    bottom: 4%;
    min-width: 80px;
    max-width: 90vw;
    white-space: normal;
    text-align: center;
  }
}

/* QR App Download Section */
.qr-app-row {
  justify-content: center;
  align-items: center;
  gap: 40px;
  margin-top: 12px;
}

.qr-app-col {
  margin-top: 15px;
  display: flex;
  align-items: center;
  flex: 1 1 0;
  width: 269px;
  height: 163px;
  gap: 5px;
}

.qr-app-col img.qr-img {
  max-width: 180px;
  width: 100%;
  height: auto;
  margin-bottom: 8px;
}

.qr-app-col a img {
  max-width: 120px;
  width: 100%;
  height: auto;
}

@media (max-width: 576px) {
  .qr-app-row {
    gap: 12px;
  }

  .qr-app-col {
    min-width: 0;
    max-width: 100%;
    padding: 0 2px;
  }

  .qr-app-col img.qr-img {
    max-width: 48vw;
  }

  .qr-app-col a img {
    max-width: 32vw;
  }
}

/* Mặc định ẩn domain mobile trên PC */
.domain-mobile {
  display: none;
}

/* Mobile-only page speed image */
.page-speed-mobile {
  display: none;
  text-align: center;
  margin: 0px auto;
  max-width: 320px;
  margin-top: 5px;
  margin-bottom: -10px;
}

/* Khi ở màn hình nhỏ (điện thoại), ẩn domain desktop, hiện domain mobile */
@media (max-width: 767px) {
  .domain-desktop {
    display: none;
  }

  .domain-mobile {
    display: block;
  }

  .wp-banner {
    background-image: url(./../images/bg-mb.png);
  }

  .redirect-links {
    grid-template-columns: 1fr;
    max-width: 100%;
    margin-top: 10px;
  }

  /* Show mobile page speed image */
  .page-speed-mobile {
    display: block;
  }
}