/* ═══════════════════════════════════════════════════════════════════════════
   NTCK · INDEX-V2 EXTRAS CSS
   Bao gồm: cursor spotlight, magnetic buttons, ROI calculator, quiz, marquee,
   scroll progress, floating CTA bar, countdown scarcity, AI chat widget
   ═════════════════════════════════════════════════════════════════════════ */

/* ── 1. CURSOR SPOTLIGHT (desktop only) ──────────────────────────────── */
.ntck-cursor {
  position: fixed;
  top: 0; left: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.4);
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: screen;
  transform: translate(-50%, -50%);
  transition: width 0.25s, height 0.25s, background 0.25s;
  display: none;
}
.ntck-cursor.is-hover {
  width: 56px; height: 56px;
  background: rgba(16, 185, 129, 0.25);
}
.ntck-cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15), transparent 60%);
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  display: none;
}
@media (min-width: 1280px) {
  .ntck-cursor, .ntck-cursor-glow { display: block; }
  body { cursor: none; }
  a, button, [role="button"], input, textarea, select { cursor: none; }
}

/* ── 2. SCROLL PROGRESS BAR ─────────────────────────────────────────── */
.ntck-scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green-400), var(--green-600), var(--gold));
  z-index: 1000;
  width: 0%;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
  transition: width 0.1s linear;
}

/* ── 3. FLOATING CTA BAR (sau khi scroll qua hero) ─────────────────── */
.ntck-floating-cta {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(120px);
  z-index: 99;
  background: rgba(10, 31, 28, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 100px;
  padding: 10px 14px 10px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s, transform 0.4s var(--ease-spring);
}
.ntck-floating-cta.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.ntck-floating-cta-text {
  color: var(--white);
  font-size: var(--text-sm);
  font-weight: 600;
}
.ntck-floating-cta-text .price {
  color: var(--gold);
  font-weight: 800;
}
.ntck-floating-cta a {
  background: linear-gradient(135deg, var(--green-500), var(--green-700));
  color: var(--white);
  padding: 10px 20px;
  border-radius: 100px;
  font-weight: 700;
  font-size: var(--text-sm);
  text-decoration: none;
  transition: transform 0.2s;
}
.ntck-floating-cta a:hover { transform: scale(1.05); }
@media (max-width: 1279px) {
  /* ẩn floating CTA trên mobile + tablet portrait — tránh chồng chéo content */
  .ntck-floating-cta,
  .ntck-floating-cta.visible {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(200px) !important;
  }
}

/* ── 4. ROI CALCULATOR ──────────────────────────────────────────────── */
.roi-calc-section {
  padding: var(--space-20) var(--space-6);
  background: linear-gradient(180deg, #f9fafb 0%, #ecfdf5 100%);
  position: relative;
  overflow: hidden;
}
.roi-calc-section::before {
  content: '';
  position: absolute;
  top: -20%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.08), transparent 70%);
  pointer-events: none;
}
.roi-calc-inner {
  max-width: 980px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.roi-calc-header { text-align: center; margin-bottom: var(--space-12); }
.roi-calc-header .badge {
  display: inline-block;
  background: rgba(16, 185, 129, 0.1);
  color: var(--green-700);
  font-size: var(--text-sm);
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: var(--space-4);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.roi-calc-header h2 {
  font-size: var(--text-4xl);
  font-weight: 900;
  color: var(--gray-900);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-3);
}
.roi-calc-header h2 .hl {
  background: linear-gradient(135deg, var(--green-600), var(--green-800));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.roi-calc-header p {
  color: var(--gray-600);
  font-size: var(--text-lg);
  max-width: 640px;
  margin: 0 auto;
}
.roi-calc-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--space-10);
  box-shadow: var(--shadow-xl);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-10);
}
@media (max-width: 768px) {
  .roi-calc-card { grid-template-columns: 1fr; padding: var(--space-6); }
}
.roi-calc-inputs label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: var(--space-3);
  margin-top: var(--space-6);
}
.roi-calc-inputs label:first-child { margin-top: 0; }
.roi-slider-wrapper { display: flex; align-items: center; gap: var(--space-4); }
.roi-slider-wrapper input[type=range] {
  flex: 1;
  -webkit-appearance: none;
  height: 6px;
  border-radius: 100px;
  background: var(--gray-200);
  outline: none;
}
.roi-slider-wrapper input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--green-500);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
  transition: transform 0.15s;
}
.roi-slider-wrapper input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.2); }
.roi-slider-value {
  min-width: 64px;
  text-align: right;
  font-weight: 800;
  color: var(--green-700);
  font-size: var(--text-lg);
  font-variant-numeric: tabular-nums;
}
.roi-calc-output {
  background: linear-gradient(135deg, #0a1f1c 0%, #1a4d3a 100%);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.roi-calc-output::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--hero-mesh);
  opacity: 0.6;
}
.roi-output-row { position: relative; z-index: 1; margin-bottom: var(--space-5); }
.roi-output-row:last-child { margin-bottom: 0; }
.roi-output-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 4px;
}
.roi-output-value {
  font-size: var(--text-3xl);
  font-weight: 900;
  color: var(--gold);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.roi-output-value.green { color: var(--green-400); }
.roi-output-cta {
  margin-top: var(--space-6);
  position: relative;
  z-index: 1;
}

/* ── 5. PRICING QUIZ MODAL ──────────────────────────────────────────── */
.quiz-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(251, 191, 36, 0.12);
  color: var(--gold-dark);
  border: 1px solid rgba(251, 191, 36, 0.4);
  padding: 10px 22px;
  border-radius: 100px;
  font-weight: 700;
  font-size: var(--text-sm);
  cursor: pointer;
  margin-top: var(--space-4);
  transition: all 0.3s;
}
.quiz-trigger-btn:hover {
  background: rgba(251, 191, 36, 0.2);
  transform: translateY(-2px);
}
.quiz-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 31, 28, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}
.quiz-overlay.show { display: flex; }
.quiz-modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  max-width: 560px;
  width: 100%;
  padding: var(--space-10);
  position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,0.3);
  max-height: 90vh;
  overflow-y: auto;
}
.quiz-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--gray-600);
  border: none;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.quiz-close:hover { background: var(--gray-200); }
.quiz-progress {
  display: flex;
  gap: 6px;
  margin-bottom: var(--space-6);
}
.quiz-progress-dot {
  flex: 1;
  height: 4px;
  background: var(--gray-200);
  border-radius: 100px;
}
.quiz-progress-dot.active { background: linear-gradient(90deg, var(--green-500), var(--green-700)); }
.quiz-question { display: none; }
.quiz-question.active { display: block; }
.quiz-question h3 {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: var(--space-2);
  letter-spacing: -0.01em;
}
.quiz-question p {
  color: var(--gray-600);
  margin-bottom: var(--space-6);
  font-size: var(--text-base);
}
.quiz-options { display: grid; gap: var(--space-3); }
.quiz-option {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.25s;
  text-align: left;
  width: 100%;
  font-family: inherit;
  font-size: var(--text-base);
  color: var(--gray-800);
}
.quiz-option:hover {
  border-color: var(--green-400);
  background: var(--green-50);
  transform: translateX(4px);
}
.quiz-option .qicon {
  width: 40px; height: 40px;
  flex-shrink: 0;
  background: var(--green-50);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.quiz-option .qlabel { flex: 1; font-weight: 600; }
.quiz-result { display: none; text-align: center; }
.quiz-result.show { display: block; }
.quiz-result-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--green-500), var(--green-700));
  color: var(--white);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}
.quiz-result h3 {
  font-size: var(--text-3xl);
  font-weight: 900;
  color: var(--gray-900);
  margin-bottom: var(--space-3);
  letter-spacing: -0.02em;
}
.quiz-result h3 .price {
  color: var(--green-700);
  display: block;
  margin-top: 4px;
}
.quiz-result p {
  color: var(--gray-600);
  font-size: var(--text-base);
  line-height: 1.7;
  margin-bottom: var(--space-6);
}

/* ── 6. MARQUEE LOGOS ──────────────────────────────────────────────── */
.marquee-section {
  padding: var(--space-12) 0;
  background: var(--white);
  border-top: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
  overflow: hidden;
}
.marquee-label {
  text-align: center;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--gray-500);
  font-weight: 700;
  margin-bottom: var(--space-6);
}
.marquee-track {
  display: flex;
  gap: var(--space-8);
  animation: marquee 35s linear infinite;
  width: max-content;
}
.marquee-section:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  background: var(--gray-50);
  border-radius: 100px;
  flex-shrink: 0;
}
.marquee-item img {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.marquee-item .mname {
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--gray-800);
}
.marquee-item .mrole {
  font-size: var(--text-xs);
  color: var(--gray-500);
  margin-left: 6px;
}

/* ── 7. COUNTDOWN SCARCITY ────────────────────────────────────────── */
.countdown-banner {
  background: linear-gradient(90deg, #fef3c7 0%, #fde68a 100%);
  border-top: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  padding: var(--space-3) var(--space-6);
  text-align: center;
  position: sticky;
  top: 88px;
  z-index: 50;
}
/* ── MOBILE: bỏ sticky, hiện 1 lần dưới header rồi trôi đi với scroll ── */
@media (max-width: 1279px) {
  .countdown-banner {
    position: relative;
    top: auto;
    z-index: 1;
    /* Header height (88px desktop, 76px mobile small) — chừa chỗ cho header fixed */
    margin-top: 88px;
    padding-top: var(--space-3);
    padding-bottom: var(--space-3);
  }
}
@media (max-width: 640px) {
  .countdown-banner {
    margin-top: 76px;  /* mobile small: header height nhỏ hơn */
  }
  .countdown-banner .countdown-text {
    font-size: 12px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .countdown-banner .countdown-time {
    font-size: 13px;
  }
  .countdown-banner .countdown-num {
    padding: 3px 6px;
    min-width: 32px;
    font-size: 13px;
  }
}
.countdown-text {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  justify-content: center;
  font-size: var(--text-sm);
  color: #78350f;
  font-weight: 700;
}
.countdown-time {
  display: inline-flex;
  gap: 4px;
  font-family: 'JetBrains Mono', monospace;
}
.countdown-num {
  background: var(--gray-900);
  color: var(--gold);
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 800;
  min-width: 38px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.countdown-sep { color: var(--gray-900); font-weight: 900; }

/* ── 8. ZALO CHAT WIDGET ───────────────────────────────────────────── */
.zalo-chat-trigger {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2962FF, #0068FF);
  color: var(--white);
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 104, 255, 0.45);
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}
.zalo-chat-trigger:hover {
  transform: scale(1.1);
  box-shadow: 0 14px 36px rgba(0, 104, 255, 0.6);
}
.zalo-chat-trigger::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #4D8EFF;
  animation: zalo-pulse-ring 2s infinite;
}
@keyframes zalo-pulse-ring {
  0%   { transform: scale(1);   opacity: 0.6; }
  100% { transform: scale(1.5); opacity: 0; }
}
.zalo-chat-trigger svg { width: 32px; height: 32px; }
.zalo-chat-badge {
  position: absolute;
  top: -6px; right: -6px;
  background: #fbbf24;
  color: #111827;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 100px;
  border: 2px solid var(--white);
  letter-spacing: 0.2px;
  font-family: 'Inter', sans-serif;
}
.zalo-chat-tooltip {
  position: absolute;
  bottom: 50%;
  right: calc(100% + 14px);
  transform: translateY(50%) translateX(8px);
  background: #111827;
  color: white;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}
.zalo-chat-tooltip::after {
  content: '';
  position: absolute;
  left: 100%; top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: #111827;
}
.zalo-chat-trigger:hover .zalo-chat-tooltip {
  opacity: 1;
  transform: translateY(50%) translateX(0);
}
@media (max-width: 640px) {
  .zalo-chat-trigger { width: 56px; height: 56px; bottom: 160px; right: 16px; }
  .zalo-chat-trigger svg { width: 28px; height: 28px; }
  .zalo-chat-tooltip { display: none; }
}

/* ── 9. 3D TILT — pricing & feature cards ──────────────────────────── */
.tilt-card { transform-style: preserve-3d; perspective: 1000px; transition: transform 0.1s linear; }
.tilt-card .tilt-glare {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.3) 50%, transparent 60%);
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.tilt-card:hover .tilt-glare { opacity: 1; }

/* ── 10. SECTION READING TIME ─────────────────────────────────────── */
.section-reading-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,0,0,0.04);
  color: var(--gray-600);
  font-size: var(--text-xs);
  padding: 4px 10px;
  border-radius: 100px;
  margin-left: var(--space-3);
  font-weight: 600;
}
.section-reading-time::before { content: '⏱'; font-size: 14px; }

/* ═══ SAFE-AREA-INSET — iPhone X+ notch / home bar ═══════════════════════ */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .ntck-floating-cta {
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }
  .ai-chat-trigger {
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    right: calc(24px + env(safe-area-inset-right, 0px));
  }
  .countdown-banner {
    padding-left: calc(var(--space-6) + env(safe-area-inset-left, 0px));
    padding-right: calc(var(--space-6) + env(safe-area-inset-right, 0px));
  }
}

/* ═══ PRINT STYLES — ẩn UI tools khi in trang ═══════════════════════════ */
@media print {
  .ntck-cursor, .ntck-cursor-glow,
  .ntck-scroll-progress,
  .ntck-floating-cta,
  .countdown-banner,
  .ai-chat-trigger,
  .quiz-overlay { display: none !important; }
}

/* ═══ OVERFLOW SAFETY — body không bao giờ tràn ngang ════════════════════ */
html, body { max-width: 100%; overflow-x: hidden; }
