/* ==========================================================================
   BBMC - Event Talent & Client Ecosystem Platform
   Design System: Wix-inspired Clean, Modern & Strict Typographic Standards
   - Maximum 2 Font Families: 'Plus Jakarta Sans' (Display) & 'Inter' (Body/UI)
   - Zero Typographic Orphans: text-wrap: balance & text-wrap: pretty applied
   - Phím nổi 3D (Tactile Raised Buttons) & Dynamic Stage Lighting FX
   ========================================================================== */

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

:root {
  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --color-primary: #0F172A;
  --color-brand-blue: #1E65E6;
  --color-brand-accent: #2563EB;
  --color-brand-gold: #F59E0B;
  --color-bg-base: #FFFFFF;
  --color-bg-subtle: #F8FAFC;
  --color-border: #E2E8F0;
  --color-border-hover: #94A3B8;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-body);
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg-base);
  color: #0F172A;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ================= TYPOGRAPHY RULES (CHUẨN TIẾNG VIỆT - CHỐNG DÍNH CHỮ & CHỐNG RƠI CHỮ) ================= */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body, button, input, select, textarea {
  font-family: var(--font-body);
  letter-spacing: 0.005em;
  word-spacing: 0.02em;
}

h1, h2, h3, h4, h5, h6, .font-display {
  font-family: var(--font-display);
  text-wrap: balance;
  letter-spacing: 0.01em !important; /* Đảm bảo các ký tự có dấu mũ/nặng/hỏi đứng thoáng đãng, 100% không dính nhau */
  word-spacing: 0.03em;
  line-height: 1.25;
}

p {
  text-wrap: pretty;
  line-height: 1.65;
  letter-spacing: 0.005em;
}

/* Vô hiệu hóa triệt để negative tracking của Tailwind để các ký tự tiếng Việt không bao giờ bị đè/dính */
.tracking-tight, .tracking-tighter {
  letter-spacing: 0.005em !important;
}

.text-balance {
  text-wrap: balance;
}

.text-pretty {
  text-wrap: pretty;
}

.nowrap {
  white-space: nowrap;
}

/* Selection */
::selection {
  background-color: #1E65E6;
  color: #FFFFFF;
}

/* ================= PHÍM NỔI 3D (TACTILE RAISED BUTTONS) ================= */
/* Phím nổi màu Xanh BBMC */
.btn-raised-blue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff !important;
  font-family: var(--font-display);
  font-weight: 700;
  border-radius: 9999px;
  padding: 0.65rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 0 0 #1e3a8a, 0 8px 20px -2px rgba(37, 99, 235, 0.45);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}
.btn-raised-blue:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 0 #1e3a8a, 0 12px 24px -2px rgba(37, 99, 235, 0.55);
  background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
}
.btn-raised-blue:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 0 #1e3a8a, 0 4px 10px -2px rgba(37, 99, 235, 0.35);
}

/* Phím nổi màu Trắng (White Raised Button) */
.btn-raised-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: #0f172a !important;
  font-family: var(--font-display);
  font-weight: 700;
  border-radius: 9999px;
  padding: 0.65rem 1.4rem;
  border: 1px solid #e2e8f0;
  border-top: 1px solid #ffffff;
  box-shadow: 0 4px 0 0 #cbd5e1, 0 6px 16px -2px rgba(15, 23, 42, 0.12);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}
.btn-raised-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 0 #94a3b8, 0 10px 20px -2px rgba(15, 23, 42, 0.18);
  background: #ffffff;
}
.btn-raised-white:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 0 #94a3b8, 0 2px 8px -2px rgba(15, 23, 42, 0.1);
}

/* Phím nổi màu Đen Sang Trọng (Dark Raised Button) */
.btn-raised-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff !important;
  font-family: var(--font-display);
  font-weight: 700;
  border-radius: 9999px;
  padding: 0.65rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 0 0 #020617, 0 8px 20px -2px rgba(0, 0, 0, 0.45);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}
.btn-raised-dark:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 0 #020617, 0 12px 26px -2px rgba(0, 0, 0, 0.55);
}
.btn-raised-dark:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 0 #020617, 0 4px 10px -2px rgba(0, 0, 0, 0.3);
}

/* Phím nổi trong card nhà cung ứng */
.btn-raised-card {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.65rem 1rem;
  border-radius: 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-display);
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  color: #0f172a;
  border: 1px solid #e2e8f0;
  box-shadow: 0 3px 0 0 #cbd5e1, 0 4px 10px rgba(15, 23, 42, 0.05);
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-raised-card:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border-color: #1d4ed8;
  box-shadow: 0 4px 0 0 #1e3a8a, 0 8px 16px rgba(37, 99, 235, 0.35);
}
.btn-raised-card:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 0 #cbd5e1;
}

/* Phím nổi 3D khối lớn (Portal Cards) */
.btn-portal-raised {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 6px 0 0 #cbd5e1, 0 16px 30px -4px rgba(0, 0, 0, 0.25);
  border: 2px solid rgba(255, 255, 255, 0.85);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}
.btn-portal-raised:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 0 0 #94a3b8, 0 22px 35px -4px rgba(30, 101, 230, 0.3);
  border-color: #3b82f6;
}
.btn-portal-raised:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 0 #94a3b8, 0 6px 15px -2px rgba(0, 0, 0, 0.15);
}

/* ================= EVENT STAGE LIGHTING & ATMOSPHERE ================= */
.event-stage-bg {
  position: relative;
  overflow: hidden;
  background-color: #0B0F19;
}

.event-stage-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 50% 0%, rgba(30, 101, 230, 0.35) 0%, transparent 60%),
    radial-gradient(circle at 15% 20%, rgba(2, 132, 199, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 85% 20%, rgba(245, 158, 11, 0.18) 0%, transparent 50%),
    linear-gradient(180deg, rgba(11, 15, 25, 0.82) 0%, rgba(11, 15, 25, 0.65) 50%, #0B0F19 100%);
  pointer-events-none;
}

/* Animated Event Stage Glow */
@keyframes stageLightSway {
  0% { transform: rotate(-4deg) scale(1); opacity: 0.5; }
  50% { transform: rotate(4deg) scale(1.08); opacity: 0.75; }
  100% { transform: rotate(-4deg) scale(1); opacity: 0.5; }
}

.stage-beam {
  position: absolute;
  top: -150px;
  width: 320px;
  height: 650px;
  filter: blur(55px);
  pointer-events-none;
  transform-origin: top center;
  animation: stageLightSway 8s ease-in-out infinite;
}

.stage-beam-blue {
  left: 20%;
  background: linear-gradient(180deg, rgba(30, 101, 230, 0.4) 0%, transparent 80%);
}

.stage-beam-gold {
  right: 20%;
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.3) 0%, transparent 80%);
  animation-delay: -4s;
}

/* Card Styling */
.wix-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 24px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.wix-card:hover {
  border-color: #CBD5E1;
  transform: translateY(-3px);
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.1);
}

/* Glass Header */
.glass-header {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}

/* Modal styling */
.modal-backdrop {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Pulse animation */
@keyframes pulseDot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.animate-pulse-dot {
  animation: pulseDot 2s infinite;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: #F8FAFC;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* ================= MOBILE RESPONSIVE HARDENING ================= */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  position: relative;
}

@media (max-width: 640px) {
  .btn-portal-raised {
    padding: 1.25rem 1rem !important;
    border-radius: 1.25rem !important;
  }
  
  .glass-header {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }

  /* Đảm bảo modal vừa khít màn hình điện thoại, cuộn mượt */
  .modal-dialog, [id^="modal-"] > div:not(.modal-backdrop) {
    max-width: calc(100vw - 1.25rem) !important;
    margin: 0.625rem !important;
  }
}
