/* ==========================================================================
   SMARTCAD — Shared depth & motion system (landing page effects)
   Dùng chung cho index.html và fusion.html. Không phụ thuộc thư viện ngoài.
   ========================================================================== */

/* ---- Unified Single Typography: Roboto across entire website ---- */
*, ::before, ::after {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif !important;
}

body, button, input, optgroup, select, textarea, kbd, code, pre, .font-mono, span, p, a, div, h1, h2, h3, h4, h5, h6 {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif !important;
}

/* ---- High-Contrast Readability & Widescreen System ---- */
html {
  font-size: 16.5px;
}

body {
  color: #0f172a !important;
}

/* Force dark, crisp, easily readable text across all elements (no washed-out gray) */
p, li, dd, dt,
.text-slate-600,
.text-slate-500,
.text-\[\#4b5563\],
.text-\[\#4B5563\] {
  color: #0f172a !important;
}

.text-slate-400 {
  color: #334155 !important;
}

strong, b {
  color: #000000 !important;
  font-weight: 700 !important;
}

h1, h2, h3, h4, h5, h6 {
  color: #0f172a !important;
}

p {
  line-height: 1.65 !important;
}

/* Comfortable readable font scale across all devices */
.text-xs {
  font-size: 0.85rem !important; /* ~14px */
  line-height: 1.55 !important;
}

.text-sm {
  font-size: 0.975rem !important; /* ~16px */
  line-height: 1.6 !important;
}

.text-base {
  font-size: 1.0625rem !important; /* ~17.5px */
  line-height: 1.65 !important;
}

/* Widescreen container expansion: Dàn đều sang ngang để lấp đầy khoảng trống */
@media (min-width: 1024px) {
  .max-w-4xl {
    max-width: 80rem !important; /* 1280px (max-w-7xl) */
  }
  .max-w-5xl {
    max-width: 84rem !important; /* 1344px */
  }
  .max-w-3xl {
    max-width: 66rem !important; /* 1056px */
  }
  .max-w-2xl {
    max-width: 58rem !important; /* 928px */
  }
}

/* ---- Crisp High-Contrast Zalo Chat Button Styling ---- */
.btn-chat-zalo {
  background-color: #008848 !important;
  color: #ffffff !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
  font-weight: 800 !important;
  font-size: 0.95rem !important;
  letter-spacing: 0.02em !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  text-rendering: optimizeLegibility !important;
  box-shadow: 0 4px 14px rgba(0, 136, 72, 0.35) !important;
  transition: all 0.2s ease !important;
}

.btn-chat-zalo:hover {
  background-color: #007038 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 18px rgba(0, 136, 72, 0.45) !important;
}

/* Floating Chat Zalo Pill */
.floating-zalo-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 9999px;
  background-color: #008848;
  color: #ffffff !important;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 25px -4px rgba(0, 136, 72, 0.55), 0 4px 10px -2px rgba(0, 0, 0, 0.2);
  text-decoration: none !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.floating-zalo-btn:hover {
  background-color: #007038;
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 14px 30px -4px rgba(0, 136, 72, 0.65), 0 6px 12px -2px rgba(0, 0, 0, 0.25);
  color: #ffffff !important;
}

/* QR Code Image Hover Zoom Cue */
.qr-code-wrapper {
  position: relative;
  cursor: zoom-in !important;
}
.qr-code-wrapper .qr-code-img {
  transition: transform 0.25s ease, filter 0.25s ease;
}
.qr-code-wrapper:hover .qr-code-img {
  transform: scale(1.04);
}

/* ---- Scroll reveal (IntersectionObserver điều khiển qua effects.js) ---- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Nhóm phần tử hiện tuần tự (thẻ con tự lệch delay theo thứ tự) */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-stagger.is-visible > * { opacity: 1; transform: translateY(0); }
.reveal-stagger > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger > *:nth-child(2) { transition-delay: 90ms; }
.reveal-stagger > *:nth-child(3) { transition-delay: 180ms; }
.reveal-stagger > *:nth-child(4) { transition-delay: 270ms; }
.reveal-stagger > *:nth-child(5) { transition-delay: 360ms; }
.reveal-stagger > *:nth-child(6) { transition-delay: 450ms; }
.reveal-stagger > *:nth-child(n+7) { transition-delay: 520ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ---- Glassmorphism card ---- */
.glass-card {
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    0 30px 70px -20px rgba(2, 45, 80, 0.22),
    0 10px 24px -10px rgba(2, 45, 80, 0.14);
}

/* ---- Ambient background blobs (chiều sâu) ---- */
.blob-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}
.blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(70px);
  opacity: 0.55;
  animation: blobFloat 20s ease-in-out infinite alternate;
}
@keyframes blobFloat {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(24px, -28px, 0) scale(1.08); }
  100% { transform: translate3d(-18px, 18px, 0) scale(0.95); }
}
@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
}

/* ---- Subtle 3D tilt on hover (Tắt theo yêu cầu người dùng để tránh bị nghiêng rung lắc) ---- */
.tilt-card {
  transition: box-shadow 0.3s ease;
  transform: none !important;
}
.tilt-card:hover {
  transform: none !important;
}

/* ---- Dot grid depth backdrop (tinh tế hơn pattern phẳng) ---- */
.dot-grid {
  background-image: radial-gradient(rgba(2, 45, 80, 0.09) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
}

/* ==========================================================================
   SolidWorks Official Brand Palette (Iconic Red #E2231A)
   ========================================================================== */
:root {
  --sw-red: #E2231A;
  --sw-red-hover: #C41A13;
  --sw-red-light: #FEF2F2;
  --sw-red-border: #FECACA;
}

.text-\[\#E2231A\], .text-sw-red { color: #E2231A !important; }
.bg-\[\#E2231A\], .bg-sw-red { background-color: #E2231A !important; }
.border-\[\#E2231A\], .border-sw-red { border-color: #E2231A !important; }
.hover\:bg-\[\#C41A13\]:hover { background-color: #C41A13 !important; }
.hover\:border-\[\#E2231A\]:hover { border-color: #E2231A !important; }
.hover\:text-\[\#E2231A\]:hover { color: #E2231A !important; }
.group:hover .group-hover\:text-\[\#E2231A\] { color: #E2231A !important; }

.bg-red-50 { background-color: #FEF2F2 !important; }
.bg-red-100 { background-color: #FEE2E2 !important; }
.bg-red-600 { background-color: #E2231A !important; }
.bg-red-700 { background-color: #C41A13 !important; }
.text-red-500 { color: #EF4444 !important; }
.text-red-600 { color: #E2231A !important; }
.text-red-700 { color: #C41A13 !important; }
.text-red-800 { color: #991B1B !important; }
.border-red-200 { border-color: #FECACA !important; }
.border-red-300 { border-color: #FCA5A5 !important; }
.border-red-500 { border-color: #EF4444 !important; }
.border-red-600 { border-color: #E2231A !important; }
.hover\:border-red-500:hover { border-color: #EF4444 !important; }
.hover\:border-red-600:hover { border-color: #E2231A !important; }
.hover\:bg-red-50\/50:hover { background-color: rgba(254, 242, 242, 0.5) !important; }
.hover\:bg-red-50\/70:hover { background-color: rgba(254, 242, 242, 0.7) !important; }
.hover\:bg-red-600:hover { background-color: #E2231A !important; }
.hover\:bg-red-700:hover { background-color: #C41A13 !important; }
.hover\:text-red-600:hover { color: #E2231A !important; }
.group:hover .group-hover\:text-red-600 { color: #E2231A !important; }
.from-red-600 { --tw-gradient-from: #E2231A var(--tw-gradient-from-position); --tw-gradient-to: rgba(226, 35, 26, 0) var(--tw-gradient-to-position); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important; }
.to-rose-600 { --tw-gradient-to: #E11D48 var(--tw-gradient-to-position) !important; }
.selection\:bg-\[\#E2231A\] ::selection { background-color: #E2231A !important; }
.selection\:bg-\[\#E2231A\]::selection { background-color: #E2231A !important; }
.shadow-red-500\/20 { --tw-shadow-color: rgba(226, 35, 26, 0.2); box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color) !important; }

/* ---- QR Code sizing & container fix ---- */
.qr-code-wrapper {
  width: 180px;
  max-width: 180px;
  flex-shrink: 0;
  margin: 0 auto;
}
.qr-code-img {
  width: 100% !important;
  height: auto !important;
  max-width: 180px !important;
  max-height: 260px !important;
  object-fit: contain !important;
  display: block !important;
  border-radius: 0.75rem;
}

/* ---- Hero CTA Buttons (SolidWorks Section) ---- */
.btn-hero-solidworks-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.15rem 2.6rem;
  min-height: 3.75rem; /* ~60px */
  border-radius: 1rem;
  background-color: #E2231A;
  color: #ffffff !important;
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 25px -5px rgba(226, 35, 26, 0.45), 0 8px 10px -6px rgba(226, 35, 26, 0.2);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.01em;
}

.btn-hero-solidworks-primary:hover {
  background-color: #C41A13 !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 20px 30px -10px rgba(226, 35, 26, 0.55), 0 10px 15px -5px rgba(226, 35, 26, 0.3);
}

.btn-hero-solidworks-primary svg {
  width: 1.5rem;
  height: 1.5rem;
  transition: transform 0.2s ease;
}

.btn-hero-solidworks-primary:hover svg {
  transform: translateX(4px);
}

.btn-hero-solidworks-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 1.15rem 2.1rem;
  min-height: 3.75rem; /* ~60px - matches primary height */
  border-radius: 1rem;
  background-color: #ffffff;
  color: #0f172a !important;
  font-size: 1.05rem;
  font-weight: 700;
  border: 2px solid #cbd5e1;
  text-decoration: none;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-hero-solidworks-secondary:hover {
  background-color: #f8fafc !important;
  border-color: #E2231A;
  color: #0f172a !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.08);
}

@media (max-width: 640px) {
  .btn-hero-solidworks-primary,
  .btn-hero-solidworks-secondary {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.05rem;
  }
}

/* ---- Slideshow Fade Transition ---- */
@keyframes tabFadeIn {
  from {
    opacity: 0.7;
  }
  to {
    opacity: 1;
  }
}
.tab-fade-in {
  animation: tabFadeIn 0.25s ease-out forwards;
}

/* ---- Rock-Solid Simulator Layout (Zero CLS / No Stutter) ---- */
#appScreenContainer {
  height: 540px !important;
  min-height: 540px !important;
  max-height: 540px !important;
  background-color: #ffffff !important;
  contain: layout paint;
}

#appScreenWrapper {
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#appScreenImg {
  width: 100% !important;
  height: 100% !important;
  max-height: 510px !important;
  object-fit: contain !important;
  display: block !important;
}

#appScreenDetails {
  min-height: 145px !important;
}

#appSubTabsBar {
  min-height: 44px !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
}

@media (max-width: 768px) {
  #appScreenContainer {
    height: 380px !important;
    min-height: 380px !important;
    max-height: 380px !important;
  }
  #appScreenImg {
    max-height: 360px !important;
  }
}




/* ---- Shared card surface (dùng cho blog.html và các trang bài viết) ---- */
.bommer-card {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 1.25rem;
  transition: all 0.2s ease-in-out;
}

.bommer-card:hover {
  box-shadow: 0 10px 25px -5px rgba(226, 35, 26, 0.12), 0 8px 10px -6px rgba(226, 35, 26, 0.04);
  border-color: #E2231A;
}
