/**
 * NgoiSaoSo team
 * @version 3.x
 * @contact: xinchao@ngoisaoso.vn
 * @see https://www.ngoisaoso.vn
 */

/* Các tùy chỉnh CSS của giao diện nên để vào đây */

/* =========================================================
   1. GLOBAL DESIGN TOKENS (BIẾN HỆ THỐNG DÙNG CHUNG)
   ========================================================= */
:root {
  --nss-primary: #b01919;
  --nss-primary-hover: #8a0009;
  --nss-primary-deep: #410002;
  --nss-secondary: #f9f9f9;
  --nss-dark: #1b1b1b;

  /* Typography & Spacing Options (Có thể mở rộng thêm) */
  --nss-radius-md: 0.5rem;
  /* 8px */
  --nss-radius-lg: 0.75rem;
  /* 12px */
  --nss-radius-xl: 1rem;
  /* 16px */

  /* Shadows */
  --nss-shadow-primary: 0 12px 24px rgba(176, 25, 25, 0.25);
  --nss-shadow-primary-hover: 0 16px 32px rgba(138, 0, 9, 0.3);
}

/* =========================================================
   2. GLOBAL UI COMPONENTS (COMPONENTS DÙNG LIÊN MODULE)
   ========================================================= */

/* Button Primary (Màu Đỏ Nhận Diện Trọn Vẹn) */
.btn-nss-primary {
  background: linear-gradient(to bottom right, var(--nss-primary), var(--nss-primary-hover));
  color: #ffffff !important;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  transition: all 0.3s ease-in-out;
  border: none;
  border-radius: var(--nss-radius-xl);
  box-shadow: var(--nss-shadow-primary);
}

.btn-nss-primary:hover,
.btn-nss-primary:focus {
  background: linear-gradient(to bottom right, var(--nss-primary-hover), var(--nss-primary-deep));
  box-shadow: var(--nss-shadow-primary-hover);
  transform: translateY(-2px);
  color: #ffffff !important;
}

/* Button Dark (Nút Đen Bổ Trợ) */
.btn-nss-dark {
  background-color: var(--nss-dark);
  color: #ffffff !important;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  transition: all 0.3s ease-in-out;
  border: none;
  border-radius: var(--nss-radius-xl);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-nss-dark:hover,
.btn-nss-dark:focus {
  background-color: var(--nss-primary);
  transform: translateY(-1px);
  box-shadow: 0 6px 10px rgba(176, 25, 25, 0.2);
}

/* Form Input Element (Chuẩn hóa viền đỏ khi focus) */
.form-input-nss {
  background-color: #ffffff;
  border-width: 1px !important;
  border-style: solid !important;
  border-color: #d1d5db !important;
  /* gray-300 */
  border-radius: var(--nss-radius-xl);
  font-family: 'Inter', sans-serif;
  transition: all 0.2s ease-in-out;
  outline: none;
}

.form-input-nss:focus {
  border-color: var(--nss-primary) !important;
  box-shadow: 0 0 0 2px rgba(176, 25, 25, 0.2) !important;
}

/* =========================================================
   3. GLOBAL UTILITY CLASSES (DỰ PHÒNG CHỐNG LỖI JIT)
   ========================================================= */

/* Text Colors */
.text-nss-primary {
  color: var(--nss-primary) !important;
}

.hover\:text-nss-primary:hover {
  color: var(--nss-primary) !important;
}

.text-nss-dark {
  color: var(--nss-dark) !important;
}

.hover\:text-nss-dark:hover {
  color: var(--nss-dark) !important;
}

/* Background Colors */
.bg-nss-primary {
  background-color: var(--nss-primary) !important;
}

.hover\:bg-nss-primary:hover {
  background-color: var(--nss-primary) !important;
}

.bg-nss-dark {
  background-color: var(--nss-dark) !important;
}

/* Border Colors */
.border-nss-primary {
  border-color: var(--nss-primary) !important;
}

.focus\:border-nss-primary:focus {
  border-color: var(--nss-primary) !important;
}

/* Nút Viền (Outline Button) */
.btn-nss-outline {
  background-color: transparent;
  color: var(--nss-dark);
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  border: 1px solid #e2e2e2;
  border-radius: var(--nss-radius-md);
  transition: all 0.2s ease-in-out;
}

.btn-nss-outline:hover,
.btn-nss-outline:focus {
  background-color: var(--nss-primary);
  color: #ffffff !important;
  border-color: var(--nss-primary);
}

/* =========================================================
   4. LUMINOUS HERITAGE SCALES (DIGITAL ARCHITECT)
   ========================================================= */
:root {
  --lh-primary: #74000c;
  --lh-primary-container: #971a1e;
  --lh-background: #f8faf6;
  --lh-surface: #f8faf6;
  --lh-surface-container-low: #f2f4f0;
  --lh-surface-container-highest: #e1e3df;
  --lh-surface-lowest: #ffffff;
  --lh-on-surface: #191c1a;
  --lh-outline-ghost: rgba(225, 191, 188, 0.2);
  /* e1bfbc at 20% */
}

/* Typography Editorial */
.lh-editorial {
  font-family: 'Manrope', sans-serif;
  color: var(--lh-on-surface);
  background-color: var(--lh-background);
}

.lh-editorial h1,
.lh-editorial h2,
.lh-editorial h3,
.lh-editorial h4,
.lh-editorial h5,
.lh-editorial h6,
.lh-font-display {
  font-family: 'Epilogue', sans-serif;
  letter-spacing: -0.02em;
  color: var(--lh-on-surface);
}

/* Tonal Layering Surfaces */
.lh-surface {
  background-color: var(--lh-surface);
}

.lh-surface-low {
  background-color: var(--lh-surface-container-low);
}

.lh-surface-lowest {
  background-color: var(--lh-surface-lowest);
}

.lh-surface-highest {
  background-color: var(--lh-surface-container-highest);
}

/* Ambient Shadows (No Hard Black) */
.lh-ambient-shadow {
  box-shadow: 0px 20px 40px rgba(25, 28, 26, 0.05);
  /* Tinted with on-surface */
  transition: all 0.3s ease;
}

.lh-ambient-shadow:hover {
  box-shadow: 0px 24px 48px rgba(25, 28, 26, 0.08);
}

/* Structural Gradients */
.lh-hero-gradient {
  /* Subtle linear gradient top-left to bottom-right */
  background: linear-gradient(135deg, var(--lh-primary) 0%, var(--lh-primary-container) 100%);
  color: #ffffff;
}

/* The Ghost Border */
.lh-ghost-border {
  border: 1px solid var(--lh-outline-ghost);
}

.lh-ghost-border-b {
  border-bottom: 1px solid var(--lh-outline-ghost);
}

/* Interaction Cards */
.lh-card {
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  border-radius: 1rem;
  /* lg radius */
}

.lh-card:hover {
  background-color: var(--lh-surface-lowest);
  /* Surface bright */
  box-shadow: 0px 10px 30px rgba(25, 28, 26, 0.04);
}

/* Glassmorphism */
.lh-glass {
  background: rgba(248, 250, 246, 0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

/* =========================================================
   5. BỔ TÚC UTILITY CLASSES (DỰ PHÒNG KHÔNG CÓ TAILWIND COMPILER)
   ========================================================= */

/* Luminous Heritage Arbitrary Fixes */
.bg-\[var\(--lh-primary\)\] {
  background-color: var(--lh-primary) !important;
  color: #ffffff !important;
}

.text-\[var\(--lh-primary\)\] {
  color: var(--lh-primary) !important;
}

.text-\[var\(--lh-on-surface\)\] {
  color: var(--lh-on-surface) !important;
}

.bg-\[var\(--lh-surface-container-highest\)\] {
  background-color: var(--lh-surface-container-highest) !important;
}

/* Các Utility màu chuẩn của Tailwind */
.bg-zinc-900 {
  background-color: #18181b !important;
  color: #ffffff !important;
}

.text-white {
  color: #ffffff !important;
}

.text-zinc-400 {
  color: #a1a1aa !important;
}

.bg-white\/5 {
  background-color: rgba(255, 255, 255, 0.05) !important;
}

.bg-white\/10 {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

.bg-red-800\/20 {
  background-color: rgba(153, 27, 27, 0.2) !important;
}

.bg-blue-900\/20 {
  background-color: rgba(30, 58, 138, 0.2) !important;
}

.border-white\/10 {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.text-white\/80 {
  color: rgba(255, 255, 255, 0.8) !important;
}

.bg-red-800 {
  background-color: #991b1b !important;
}

.hover\:bg-red-800:hover {
  background-color: #991b1b !important;
}

/* Sửa các vấn đề về nút bấm */
.bg-primary {
  background-color: var(--lh-primary) !important;
  color: white !important;
}

.text-primary {
  color: var(--lh-primary) !important;
}

.bg-primary-container {
  background-color: var(--lh-primary-container) !important;
}

.text-primary-container {
  color: var(--lh-primary-container) !important;
}

/* Grid gap khẩn cấp */
.gap-6 {
  gap: 1.5rem !important;
}

.gap-8 {
  gap: 2rem !important;
}

.mb-6 {
  margin-bottom: 1.5rem !important;
}

.mb-8 {
  margin-bottom: 2rem !important;
}

.mb-10 {
  margin-bottom: 2.5rem !important;
}

.text-on-surface {
  color: var(--lh-on-surface) !important;
}

.text-secondary {
  color: #52525b !important;
}

/* zinc-600 */
.bg-surface-container {
  background-color: var(--lh-surface) !important;
}

.bg-surface-container-low {
  background-color: var(--lh-surface-container-low) !important;
}

.bg-surface-container-lowest {
  background-color: var(--lh-surface-lowest) !important;
}

/* Các Background cho dark-mode */
.text-on-primary {
  color: #ffffff !important;
}

.text-on-primary-container {
  color: #ffffff !important;
}

/* Menu Sub-item Icon Hover Fix */
.group\/item:hover .group-hover\/item\:text-white {
  color: #ffffff !important;
}

.group\/item:hover .group-hover\/item\:bg-primary {
  background-color: var(--lh-primary) !important;
}

.group\/item:hover .group-hover\/item\:scale-110 {
  transform: scale(1.1);
}

.gap-24 {
  gap: 6rem;
}

.gap-30 {
  gap: 10rem;
}

/* Class giới hạn chiều cao cho logo */
.logo-max-h {
  height: 70px;
  max-width: 100%;
}

/* Class tạo tỷ lệ khung hình 3:2 cho thẻ div bên ngoài */
.logo-aspect-ratio {
  aspect-ratio: 3 / 2;
}

/* Logo chạy ở trang chủ */
@keyframes infinite-scroll {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(-100%, 0, 0);
  }
}

@keyframes infinite-scroll-reverse {
  from {
    transform: translate3d(-100%, 0, 0);
  }

  to {
    transform: translate3d(0, 0, 0);
  }
}

.animate-infinite-scroll {
  animation: infinite-scroll 150s linear infinite;
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.animate-infinite-scroll-reverse {
  animation: infinite-scroll-reverse 150s linear infinite;
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Showcase dạng slider ở trang chủ */

.showcase-img {
  transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: scale(1.05);
  z-index: 0;
}

.showcase-img.active {
  opacity: 1;
  transform: scale(1);
  z-index: 10;
}

.showcase-slide {
  display: none;
}

.showcase-slide.active {
  display: block;
}

.showcase-nav-btn {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lh-primary);
  cursor: pointer;
  transition: color 0.2s;
}

.showcase-nav-btn:hover {
  color: var(--lh-primary-container);
}

.showcase-nav-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

/* =============================================
   Bo sung responsive utilities cho Tailwind
   ============================================= */



/* --- SM (min-width: 640px) --- */
@media (min-width: 640px) {
  .sm\:gap-2 { gap: 0.5rem !important; }
  .sm\:gap-4 { gap: 1rem !important; }
  .sm\:gap-8 { gap: 2rem !important; }
  .sm\:p-10 { padding: 2.5rem !important; }
  .sm\:px-6 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
  .sm\:px-8 { padding-left: 2rem !important; padding-right: 2rem !important; }
  .sm\:px-12 { padding-left: 3rem !important; padding-right: 3rem !important; }
  .sm\:px-16 { padding-left: 4rem !important; padding-right: 4rem !important; }
  .sm\:py-4 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
  .sm\:text-3xl { font-size: 1.875rem !important; line-height: 2.25rem !important; }
  .sm\:text-4xl { font-size: 2.25rem !important; line-height: 2.5rem !important; }
  .sm\:text-6xl { font-size: 3.75rem !important; line-height: 1 !important; }
  .sm\:text-base { font-size: 1rem !important; line-height: 1.5rem !important; }
  .sm\:text-lg { font-size: 1.125rem !important; line-height: 1.75rem !important; }
  .sm\:flex-none { flex: none !important; }
}

/* --- MD (min-width: 768px) --- */
@media (min-width: 768px) {
  .md\:gap-10 { gap: 2.5rem !important; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .md\:grid-cols-4 {grid-template-columns: 2fr 1fr 1fr 1fr !important;}
  .md\:col-span-1 { grid-column: span 1 / span 1 !important; }
  .md\:mt-2 { margin-top: 0.5rem !important; }
  .md\:text-4xl { font-size: 2.25rem !important; line-height: 2.5rem !important; }
  .md\:text-6xl { font-size: 3.75rem !important; line-height: 1 !important; }
  .md\:text-7xl { font-size: 4.5rem !important; line-height: 1 !important; }
  .md\:text-xl { font-size: 1.25rem !important; line-height: 1.75rem !important; }
}

/* --- LG (min-width: 1024px) --- */
@media (min-width: 1024px) {
  .lg\:gap-8 { gap: 2rem !important; }
  .lg\:gap-10 { gap: 2.5rem !important; }
  .lg\:gap-12 { gap: 3rem !important; }
  .lg\:gap-24 { gap: 6rem !important; }
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
  .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)) !important; }
  .lg\:col-span-5 { grid-column: span 5 / span 5 !important; }
  .lg\:col-span-6 { grid-column: span 6 / span 6 !important; }
  .lg\:col-start-8 { grid-column-start: 8 !important; }
  .lg\:order-1 { order: 1 !important; }
  .lg\:order-2 { order: 2 !important; }
  .lg\:block { display: block !important; }
  .lg\:flex { display: flex !important; }
  .lg\:hidden { display: none !important; }
  .lg\:flex-nowrap { flex-wrap: nowrap !important; }
  .lg\:mb-0 { margin-bottom: 0 !important; }
  .lg\:mb-4 { margin-bottom: 1rem !important; }
  .lg\:mb-5 { margin-bottom: 1.25rem !important; }
  .lg\:mb-6 { margin-bottom: 1.5rem !important; }
  .lg\:mb-8 { margin-bottom: 2rem !important; }
  .lg\:mb-16 { margin-bottom: 4rem !important; }
  .lg\:mb-20 { margin-bottom: 10rem !important; }
  .lg\:mt-10 { margin-top: 2.5rem !important; }
  .lg\:mt-20 { margin-top: 10rem !important; }
  .lg\:pb-0 { padding-bottom: 0 !important; }
  .lg\:pt-12 { padding-top: 3rem !important; }
  .lg\:px-8 { padding-left: 2rem !important; padding-right: 2rem !important; }
  .lg\:py-20 { padding-top: 5rem !important; padding-bottom: 5rem !important; }
  .lg\:py-32 { padding-top: 8rem !important; padding-bottom: 8rem !important; }
  .lg\:rounded-3xl { border-radius: 1.5rem !important; }
  .lg\:space-y-8 > :not([hidden]) ~ :not([hidden]) { margin-top: 2rem !important; }
  .lg\:text-4xl { font-size: 2.25rem !important; line-height: 2.5rem !important; }
  .lg\:text-lg { font-size: 1.125rem !important; line-height: 1.75rem !important; }
}

/* ============================================
   SHOWCASE - Mobile: hiện hết, không slide
   ============================================ */
@media (max-width: 1023px) {
  .showcase-slide {
    display: block !important;
    opacity: 1 !important;
    position: relative !important;
    margin-bottom: 4rem;
    padding-bottom: 4rem;
    border-bottom: 1px solid #e5e7eb;
  }
  .showcase-slide:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
  }
}

@media (min-width: 1024px) {
  .showcase-slide {
    display: none;
  }
  .showcase-slide.active {
    display: block;
  }
}


@media (min-width: 768px) {
  .md\:text-3xl {
    line-height: 2.8rem;
  }

  .md\:text-6xl {
    line-height: 1.1;
  }
}