/* ==========================================================================
   KOC VIỆT - LIGHT THEME DESIGN SYSTEM (CHUẨN KOCVIET.COM)
   Thương hiệu: KOC VIỆT - Trusted Creator Platform
   Dành cho Doanh nghiệp Việt | Chính danh - Minh bạch - Hiệu quả
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #ff4136;
  --primary-dark: #e0281b;
  --primary-light: #ff6b5e;
  --primary-glow: rgba(255, 65, 54, 0.2);
  --secondary: #ff7a00;
  
  /* Light Theme Color System */
  --bg-main: #ffffff;
  --bg-alt: #f8fafc;
  --bg-subtle: #f1f5f9;
  --bg-card: #ffffff;
  --border-light: #e2e8f0;
  --border-card-hover: rgba(255, 65, 54, 0.35);
  
  --text-primary: #0f172a;
  --text-secondary: #1e293b;
  --text-body: #334155;
  --text-muted: #64748b;
  
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.04);
  --shadow-card: 0 4px 15px -3px rgba(15, 23, 42, 0.05), 0 2px 6px -2px rgba(15, 23, 42, 0.03);
  --shadow-hover: 0 16px 28px -8px rgba(255, 65, 54, 0.12), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden !important;
  width: 100% !important;
  max-width: 100vw !important;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-main);
  color: var(--text-body);
  position: relative;
  letter-spacing: 0.012em; /* Tối ưu khoảng cách ký tự, tránh dính chữ tiếng Việt */
  line-height: 1.75;       /* Chuẩn line-height tối ưu theo chuẩn SEO & WCAG Readability */
  word-spacing: 0.02em;    /* Khoảng cách giữa các từ thoáng đãng, dễ quét thông tin */
}

/* Typography Chuẩn SEO & Khả năng đọc tối ưu cho tiếng Việt */
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
  color: var(--text-primary);
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

h1 {
  letter-spacing: 0.005em !important;
  line-height: 1.35 !important;
  word-spacing: 0.03em !important;
}

h2 {
  letter-spacing: 0.01em !important;
  line-height: 1.38 !important;
  word-spacing: 0.025em !important;
  margin-top: 0.35rem;
  margin-bottom: 0.75rem;
}

h3 {
  letter-spacing: 0.012em !important;
  line-height: 1.42 !important;
  word-spacing: 0.02em !important;
}

h4, h5, h6 {
  letter-spacing: 0.015em !important;
  line-height: 1.45 !important;
  word-spacing: 0.015em !important;
}

p {
  text-wrap: pretty;
  line-height: 1.75 !important;
  letter-spacing: 0.012em !important;
  word-spacing: 0.02em !important;
}

li {
  line-height: 1.7 !important;
  letter-spacing: 0.01em !important;
}

button, .btn-primary, .btn-secondary {
  letter-spacing: 0.025em;
  word-spacing: 0.02em;
}

main, section {
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
}

/* Ensure flex and grid children can shrink */
.glass-panel, .glass-card, section, div, main {
  min-width: 0;
  max-width: 100%;
}

/* Custom Scrollbar - Light Theme */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: #ff4136;
}

/* Light Card & Glassmorphism Classes */
.glass-panel {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
}

.glass-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  border-color: var(--border-card-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.glass-pill {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}

/* ==========================================================================
   GLOBAL ICON BADGE COMPONENT (CHUẨN HÌNH 2 - CAM NỀN GRADIENT & LINE TRẮNG)
   ========================================================================== */
.koc-icon-box,
.icon-badge-orange {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border-radius: 14px;
  background: linear-gradient(145deg, #f27759 0%, #e25f46 100%) !important;
  box-shadow: 0 5px 15px -1px rgba(234, 107, 80, 0.38), 0 2px 6px -1px rgba(234, 107, 80, 0.22) !important;
  border: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff !important;
  flex-shrink: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.koc-icon-box:hover,
.group:hover .koc-icon-box,
.icon-badge-orange:hover,
.group:hover .icon-badge-orange {
  transform: scale(1.08) translateY(-1px);
  box-shadow: 0 8px 20px -1px rgba(234, 107, 80, 0.5) !important;
}

/* Small Variant (40x40px for Category Grid, Floating Badges) */
.koc-icon-box-sm {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, #f27759 0%, #e25f46 100%) !important;
  box-shadow: 0 4px 12px -1px rgba(234, 107, 80, 0.35) !important;
  border: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff !important;
  flex-shrink: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.koc-icon-box-sm:hover,
.group:hover .koc-icon-box-sm {
  transform: scale(1.08) translateY(-1px);
  box-shadow: 0 6px 16px -1px rgba(234, 107, 80, 0.45) !important;
}

/* Large Variant (56x56px for Hero / National Banner) */
.koc-icon-box-lg {
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  border-radius: 16px;
  background: linear-gradient(145deg, #f27759 0%, #e25f46 100%) !important;
  box-shadow: 0 6px 18px -1px rgba(234, 107, 80, 0.4) !important;
  border: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff !important;
  flex-shrink: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Force Pure White Stroke For All Lucide Icons inside the orange boxes */
.koc-icon-box i,
.koc-icon-box svg,
.icon-badge-orange i,
.icon-badge-orange svg {
  width: 24px !important;
  height: 24px !important;
  color: #ffffff !important;
  stroke: #ffffff !important;
  stroke-width: 2px !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  fill: none !important;
}

.koc-icon-box-sm i,
.koc-icon-box-sm svg {
  width: 20px !important;
  height: 20px !important;
  color: #ffffff !important;
  stroke: #ffffff !important;
  stroke-width: 2px !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  fill: none !important;
}

.koc-icon-box-lg i,
.koc-icon-box-lg svg {
  width: 28px !important;
  height: 28px !important;
  color: #ffffff !important;
  stroke: #ffffff !important;
  stroke-width: 2px !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  fill: none !important;
}

/* Harmonized Card Tag Pill (Like in Image 2) */
.koc-tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 9999px;
  background-color: #fff7ed; /* orange-50 */
  color: #e25f46;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(254, 215, 170, 0.6); /* orange-200/60 */
  letter-spacing: 0.02em;
}

/* Gradient Backgrounds & Text */
.gradient-text {
  background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-brand {
  background: linear-gradient(135deg, #ff4136 0%, #ff7a00 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-blue-cyan {
  background: linear-gradient(135deg, #0284c7 0%, #4f46e5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Subtle Ambient Glows on Light Background */
.gradient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.2;
}

@media (max-width: 768px) {
  .gradient-glow {
    display: none !important;
  }
}

.glow-red {
  background: radial-gradient(circle, rgba(255, 65, 54, 0.25) 0%, rgba(255, 65, 54, 0) 70%);
}

.glow-orange {
  background: radial-gradient(circle, rgba(255, 122, 0, 0.2) 0%, rgba(255, 122, 0) 70%);
}

.glow-blue {
  background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0) 70%);
}

/* Light Grid Pattern Background */
.bg-grid-pattern {
  background-size: 32px 32px;
  background-image: 
    linear-gradient(to right, rgba(15, 23, 42, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
}

.bg-dots-pattern {
  background-image: radial-gradient(rgba(15, 23, 42, 0.06) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* Primary and Secondary CTA Buttons */
.btn-primary {
  background: linear-gradient(135deg, #ff4136 0%, #ff6036 100%);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(255, 65, 54, 0.3);
  transition: all 0.25s ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #e0281b 0%, #ff4b1f 100%);
  box-shadow: 0 6px 24px rgba(255, 65, 54, 0.45);
  transform: translateY(-2px);
}

.btn-secondary {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: var(--text-secondary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.25s ease;
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* Trust Badges */
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.825rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

/* Floating animation */
@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes floatFast {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(1deg);
  }
}

@keyframes pulseBorder {
  0%, 100% {
    border-color: rgba(255, 65, 54, 0.25);
    box-shadow: 0 0 12px rgba(255, 65, 54, 0.1);
  }
  50% {
    border-color: rgba(255, 65, 54, 0.6);
    box-shadow: 0 0 20px rgba(255, 65, 54, 0.25);
  }
}

.animate-float {
  animation: floatSlow 5s ease-in-out infinite;
}

.animate-float-fast {
  animation: floatFast 4s ease-in-out infinite;
}

.pulse-border {
  animation: pulseBorder 3s infinite;
}

/* Comparison Table Styling - Light Theme */
.table-custom {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table-custom th,
.table-custom td {
  padding: 14px 18px;
  text-align: left;
}

.table-custom tr {
  border-bottom: 1px solid var(--border-light);
  transition: background-color 0.2s ease;
}

.table-custom tr:hover {
  background-color: #f8fafc;
}

.table-custom th {
  font-weight: 700;
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #f1f5f9;
}

/* Interactive Slider Styles - Light Theme */
input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: #e2e8f0;
  outline: none;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ff4136;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(255, 65, 54, 0.4);
  border: 2px solid #ffffff;
  transition: transform 0.15s ease;
}

input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

/* Custom Accordion Chevron */
.faq-item.active .faq-chevron {
  transform: rotate(180deg);
  color: #ff4136;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  opacity: 1;
  padding-top: 0.75rem;
}

/* Sticky Bottom Bar on Mobile */
@media (max-width: 768px) {
  .mobile-cta-bar {
    display: flex !important;
  }
}
@media (min-width: 769px) {
  .mobile-cta-bar {
    display: none !important;
  }
}

.faq-answer {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.35s ease-in-out;
}

/* Step Pipeline Active States */
.step-tab.active {
  background: #fff1f0;
  border-color: #ff4136;
  color: #e0281b;
}

.case-tab.active {
  background: #ff4136;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(255, 65, 54, 0.3);
}

/* Custom Modal Backdrop */
.modal-backdrop {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
}
