/* ================= Gobal Styles ================= */

.section-divider {
  height: 2px;
  background: #ffffff;
  margin: 30px 0;
}

#backToTop {
  position: fixed;
  right: 32px;
  bottom: 32px;
  width: 52px;
  height: 52px;
  border-radius: 50%;

  background: #7fd1b9;
  color: #000;
  font-size: 22px;
  font-weight: 600;

  border: none;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: all 0.25s ease;

  z-index: 999;
}

#backToTop.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#backToTop:hover {
  background: #9ad9c6;
}

/* ================= Support Hero ================= */

.support-hero {
  position: relative;
  min-height: 100vh;
  width: 100%;
  background-color: #000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-40px);
}

.support-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  z-index: 0;
}

.support-video-box {
  position: absolute;
  width: min(80vw, 420px); /* คุมขนาด */
  aspect-ratio: 1 / 1;     /* ⭐ สี่เหลี่ยมจตุรัส */
  overflow: hidden;
  z-index: 0;
}

.support-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.support-content {
  position: relative;
  z-index: 3;
  max-width: 900px;
  padding: 0 20px;
  text-align: center;
  color: var(--white-color);
}

.support-content h1 {
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 600;
  color: #9ad9c6;
  margin-bottom: 24px;
}

.support-content p {
  font-size: clamp(20px, 2vw, 23px);
  line-height: 1.8;
  color: #e0e0e0;
}

.support-content p span {
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
  color: var(--primary-color);
  font-weight: 500;
}

/* ================= Menu Section ================= */

.doc-layout {
  max-width: 1600px;
  margin: 0 auto;
  padding: 80px 24px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 80px;
}

.doc-sidebar {
  position: sticky;
  top: 120px;
  align-self: start;
}

.doc-sidebar-title {
  font-size: 18px;
  color: #7fd1b9;
  margin-bottom: 16px;
}

.doc-menu {
  list-style: none;
  padding-left: 16px;
  border-left: 2px solid rgba(255,255,255,0.15);
}

.doc-menu li {
  margin-bottom: 12px;
}

.doc-menu a {
  position: relative;
  display: inline-block;
  color: var(--white-color);
  text-decoration: none;

  padding-left: 0;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.doc-menu a::before {
  content: attr(data-icon);
  position: absolute;
  left: -6px;
  opacity: 0;
  filter: grayscale(1) brightness(1.4);

  color: #7fd1b9;
  transform: translateX(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.doc-menu a:hover,
.doc-menu a.active {
  padding-left: 24px;
  color: #7fd1b9;
}

.doc-menu a:hover::before,
.doc-menu a.active::before {
  opacity: 1;
  transform: translateX(0);
}

/* ================= NR Section ================= */

.hp-content {
  display: flex;
  flex-direction: column;
  gap: 120px;
}

.hp-section {
  scroll-margin-top: 120px;
}

.hp-section h2 {
  font-size: 32px;
  color: #7fd1b9;
  margin-bottom: 16px;
}

.hp-section h3 {
  font-size: 26px;
  color: #00b7ff;
  margin: 24px 0 12px;
}

.hp-section p {
  max-width: 900px;
  line-height: 1.5;
  color: #9e9e9e;
  font-size: clamp(16px, 2.5vw, 24px);
}

.hp-section .hp-sub {
  font-size: 23px;
  color: #ffffff;
  margin-bottom: 8px;
}


/* ======== Text ======= */

.hp-line {
  font-size: 20px;
  line-height: 2;
  color: #ddd;
}

.hp-line-yellow {
  font-size: 20px;
  line-height: 2;
  color: #ffd54f;
}

.win-badge,
.mac-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  background: #000;
  border: 1px solid rgba(255,255,255,0.25);
  color: #ffd54f;
  font-size: 14px;
  white-space: nowrap;
}

.win-icon,
.mac-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 14px;
}

.win-badge span,
.mac-badge span {
  color: #fff;
}

/* ======== Tip ======= */

.tip-line {
  position: relative;
  padding-left: 16px;
  margin: 16px 0;
  font-size: 20px;
  line-height: 1.8;
  color: #ddd;
}

.tip-line::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 4px;
  height: calc(100% - 8px);
  background: #7fd1b9;
  border-radius: 2px;
}

.tip-line strong {
  color: #ffd54f;
  font-weight: 600;
}

/* ======== Number list ============= */

.number-list {
  list-style: decimal;
}

.number-list li::marker {
  content: counter(list-item) ") ";
  font-weight: 600;
}

.number-list li p {
  font-size: 18px;
  color: #bdbdbd;
  margin-top: 8px;
  line-height: 1.6;
}

/* ================= HP Layout ================= */

/* layout = หน้าที่จัดตำแหน่งเท่านั้น */
.hp-layout {
  display: grid;
  grid-template-columns: 1fr 500px;
  gap: 48px;
  align-items: flex-start;
}

.hp-text {
  min-width: 0;
}

/* =============== Image ============ */

.hp-img {
  display: flex;
  justify-content: flex-end;
}

.hp-img img {
  width: 100%;
  max-width: 220px;
  height: auto;
  display: block;
}

.hp-img-sm img {
  max-width: 160px;
}

#not-responding .hp-img img {
  max-width: 400px;
}

#login .hp-img img {
  max-width: 400px;
  margin-top: -64px;
}

#language .hp-img img {
  max-width: 500px;
  right: -40px;
}

#performance .hp-img img {
  max-width: 250px;
  margin-top: -32px;
}

#uiux .hp-img img {
  max-width: 250px;
  margin-top: -90px;
}

#security .hp-img img {
  max-width: 250px;
  margin-top: -32px;
}

#billing .hp-img img {
  max-width: 250px;
  margin-top: 50px;
}

#account .hp-img img {
  max-width: 250px;
  margin-top: -64px;
}

#files .hp-img img {
  max-width: 200px;
  margin-top: -64px;
}

#mobile .hp-img img {
  max-width: 200px;
  margin-top: -64px;
}

#faq .hp-img img {
  max-width: 200px;
}

/* ================= Responsive ================= */

@media (max-width: 1024px) {
  .doc-sidebar {
    display: none;
  }

  .doc-layout {
    grid-template-columns: 1fr; /* ให้ content เต็มจอ */
    gap: 0;
  }

  .support-content h1 {
    font-size: 24px
  }

  .support-content p {
    font-size: 16px
  }

  .support-video-box {
    width: 70vw;
  }

  /* ----- Layout ----- */

  .hp-layout {
    grid-template-columns: 1fr; /* เรียง text → image */
    gap: 32px;
  }

  .hp-img {
    justify-content: center;
  }

  /* ----- Headings ----- */

  .hp-section h2 {
    font-size: 24px;
  }

  .hp-section h3 {
    font-size: 20px;
  }

  .hp-section p {
    font-size: 16px;
    line-height: 1.6;
  }

  .hp-line,
  .hp-line-yellow {
    font-size: 16px;
    line-height: 1.8;
  }

  .hp-img img {
    max-width: 180px;
    margin-top: 0;
  }

  #not-responding .hp-img img {
    max-width: 220px;
    margin-top: 24px;
  }

  #login .hp-img img {
    max-width: 220px;
    margin-top: 24px;
  }

  #language .hp-img img {
    max-width: 240px;
    margin-top: 24px;
    right: 0;
  }

  #performance .hp-img img {
    max-width: 180px;
    margin-top: 24px;
  }

  #uiux .hp-img img {
    max-width: 180px;
    margin-top: 24px;
  }

  #security .hp-img img {
    max-width: 180px;
    margin-top: 24px;
  }

  #billing .hp-img img {
    max-width: 180px;
    margin-top: 24px;
  }

  #account .hp-img img {
    max-width: 180px;
    margin-top: 24px;
  }

  #files .hp-img img {
    max-width: 160px;
    margin-top: 24px;
  }

  #mobile .hp-img img {
    max-width: 160px;
    margin-top: 24px;
  }

  #faq .hp-img img {
    max-width: 160px;
    margin-top: 24px;
  }
}