/* =====================================================================
   idu.vn – CSS phụ trợ ngoài Tailwind CDN
   ===================================================================== */

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

/* Giữ chỗ cho header (dựng bằng JS) để nội dung không bị nhảy */
#site-header { min-height: 72px; }

/* Mũi tên select tự vẽ: mũi tên mặc định của trình duyệt luôn dính sát viền phải, không ăn padding */
select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m19.5 8.25-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  background-size: 1.1rem 1.1rem;
  padding-right: 2.75rem !important;
}

/* Ẩn thanh cuộn nhưng vẫn cuộn được (slider ngang) */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Chữ gradient cho tiêu đề nhấn */
.text-gradient {
  background-image: linear-gradient(90deg, #2563eb 0%, #7c3aed 55%, #db2777 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Nền lưới / chấm mờ trang trí */
.bg-grid {
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, .06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, .06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 40%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 40%, transparent 85%);
}
.bg-dots {
  background-image: radial-gradient(rgba(255, 255, 255, .55) 1px, transparent 1px);
  background-size: 22px 22px;
}
.bg-grid-dark {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 44px 44px;
}

/* Hiệu ứng xuất hiện khi cuộn tới (IntersectionObserver gắn class .is-visible) */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }
.reveal-delay-5 { transition-delay: .5s; }

/* Nâng nhẹ thẻ khi hover */
.hover-lift { transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease; }
.hover-lift:hover { transform: translateY(-4px); }

/* Thanh skeleton dùng trong mockup giao diện */
.skeleton {
  background: linear-gradient(90deg, #e2e8f0 0%, #f1f5f9 40%, #e2e8f0 80%);
  background-size: 800px 100%;
  animation: shimmer 2.4s linear infinite;
}

/* Bảng so sánh gói trên điện thoại: chỉ hiện cột Tính năng + cột gói đang chọn (data-active-plan) */
@media (max-width: 639px) {
  .plan-table th[data-plan],
  .plan-table td[data-plan] { display: none; }
  .plan-table[data-active-plan="1"] [data-plan="1"],
  .plan-table[data-active-plan="2"] [data-plan="2"],
  .plan-table[data-active-plan="3"] [data-plan="3"] { display: table-cell; }
}

/* Icon mũi tên accordion xoay khi mở */
[data-accordion-toggle][aria-expanded="true"] .acc-icon { transform: rotate(180deg); }
.acc-icon { transition: transform .3s ease; }

/* Tôn trọng người dùng tắt hiệu ứng */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .animate-float, .animate-fade-up, .skeleton { animation: none !important; }
}
