/* style.css - Core Design Tokens and Global Resets */

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

:root {
  /* Color Palette */
  --primary: #ff4664;
  --primary-dark: #e23450;
  --secondary: #1688d4;
  --bg-main: #f8fafc;
  /* Soft light grey */
  --bg-surface: #ffffff;
  /* Pure white */
  --bg-card: #ffffff;
  /* Pure white card */
  --text-main: #475569;
  /* Slate-600 */
  --text-heading: #0f172a;
  /* Slate-900 */
  --text-muted: #64748b;
  /* Slate-500 */
  --border-color: #e2e8f0;
  /* Slate-200 */

  /* Typography */
  --font-sans: 'Inter', sans-serif;
  --font-display: 'Plus Jakarta Sans', sans-serif;

  /* Geometry (Soft & Modern) */
  --radius-none: 0px;
  --radius-xs: 6px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;

  /* Spacing (8-point Grid) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* Shadows - Soft & Premium */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 10px 30px -10px rgba(15, 23, 42, 0.06);
  --shadow-glow: 0 0 20px rgba(255, 70, 100, 0.15);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* padding-bottom: 90px;  */
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -0.01em;
  line-height: 1.25;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Typography Scales */
h1 {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  line-height: 1.15;
  font-weight: 800;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.25;
  margin-bottom: var(--space-8);
  position: relative;
  display: inline-block;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: var(--primary);
  border-radius: 2px;
}

h3 {
  font-size: 1.25rem;
  line-height: 1.3;
}

/* SEO Article Line Length */
.seo-article {
  max-width: 72ch;
  margin: 0 auto;
}

.seo-article p {
  color: var(--text-main);
  margin-bottom: var(--space-4);
}

/* Section Common Styles */
section {
  padding: var(--space-16) 0;
}

/* Utility Classes */
.text-primary {
  color: var(--primary) !important;
}

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

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

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

/* Custom Buttons - Soft & Premium */
.btn-custom {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  cursor: pointer;
  transition: var(--transition-normal);
}

.btn-custom-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(255, 70, 100, 0.2);
}

.btn-custom-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 70, 100, 0.3);
}

.btn-custom-secondary {
  background-color: transparent;
  color: var(--text-heading);
  border-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}

.btn-custom-secondary:hover {
  background-color: rgba(0, 0, 0, 0.02);
  border-color: var(--text-heading);
  transform: translateY(-2px);
}

.btn-custom-sm {
  padding: 8px 16px;
  font-size: 0.8rem;
  border-radius: var(--radius-xs);
}

/* Badges */
.badge-custom {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-xs);
  display: inline-block;
}

.badge-playback {
  background-color: rgba(22, 136, 212, 0.1);
  color: var(--secondary);
  border: 1px solid rgba(22, 136, 212, 0.2);
}

.badge-karaoke {
  background-color: rgba(255, 70, 100, 0.1);
  color: var(--primary);
  border: 1px solid rgba(255, 70, 100, 0.2);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ============================================================
   HEADER SEARCH DROPDOWN — white, matching header
   ============================================================ */
#header-search-dropdown {
  position: fixed;
  top: 61px;
  left: 0;
  right: 0;
  z-index: 1040;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.07);
  padding: 16px 0 20px;
  transform: translateY(-110%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
}

#header-search-dropdown.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.header-search-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.header-search-icon {
  color: #94a3b8;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.header-search-input {
  flex: 1;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 18px;
  color: #0f172a;
  font-size: 1rem;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.header-search-input::placeholder {
  color: #94a3b8;
}

.header-search-input:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 70, 100, 0.1);
}

.header-search-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.header-search-close:hover {
  color: #0f172a;
  background: #f1f5f9;
}

/* Popular keywords below input */
.header-search-keywords {
  max-width: 760px;
  margin: 12px auto 0;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.search-kw-label {
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.search-kw-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  padding: 4px 12px;
  border-radius: 50px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 500;
}

.search-kw-tag:hover {
  background: rgba(255, 70, 100, 0.08);
  border-color: rgba(255, 70, 100, 0.25);
  color: var(--primary);
}

/* Autocomplete inside dropdown */
#header-search-dropdown .search-autocomplete-box {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 52px;
  z-index: 100;
}

/* ============================================================
   FLOATING CONTACT BUTTONS — above player bar
   ============================================================ */
.float-contact-wrap {
  position: fixed;
  bottom: 106px;
  /* above 90px music player + 16px gap */
  right: 24px;
  /* aligned perfectly with .player-open-btn */
  z-index: 9997;
  /* visible above content but below player bar */
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
  transition: bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1), right 0.3s ease;
}

/* When player is collapsed (showing pink music note button at bottom: 24px) */
#music-player.collapsed~.float-contact-wrap {
  bottom: 84px;
  /* 24px bottom + 48px open-btn + 12px gap */
}

.float-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px 0 0;
  height: 48px;
  /* matched perfectly with player-open-btn height */
  border-radius: 50px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  overflow: hidden;
  max-width: 48px;
  /* matched with player-open-btn width */
  animation: floatIn 0.5s ease backwards;
}

.float-btn:nth-child(1) {
  animation-delay: 0.1s;
}

.float-btn:nth-child(2) {
  animation-delay: 0.2s;
}

.float-btn:nth-child(3) {
  animation-delay: 0.3s;
}

.float-btn:hover {
  max-width: 170px;
  transform: scale(1.08) translateX(-4px);
}

.float-btn-icon {
  width: 48px;
  /* fill the button circle */
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  /* matched with player-open-btn icon size */
  flex-shrink: 0;
  background: transparent;
  /* make it clean and flat like the music player button */
}

.float-btn-label {
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.2s ease 0.06s, transform 0.2s ease 0.06s;
  letter-spacing: 0.01em;
  pointer-events: none;
}

.float-btn:hover .float-btn-label {
  opacity: 1;
  transform: translateX(0);
}

.float-btn-phone {
  background-color: var(--primary);
  /* same pink-red solid as player-open-btn */
  box-shadow: 0 4px 15px rgba(255, 70, 100, 0.3);
}

.float-btn-phone:hover {
  background-color: #e11d48;
  box-shadow: 0 6px 20px rgba(255, 70, 100, 0.45);
}

.float-btn-zalo {
  background-color: #0068ff;
  /* clean solid Zalo blue */
  box-shadow: 0 4px 15px rgba(0, 104, 255, 0.3);
}

.float-btn-zalo:hover {
  background-color: #0052cc;
  box-shadow: 0 6px 20px rgba(0, 104, 255, 0.4);
}

.float-btn-messenger {
  background-color: #8b5cf6;
  /* clean solid Messenger purple */
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.float-btn-messenger:hover {
  background-color: #7c3aed;
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateX(30px) scale(0.85);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* Why card icon fix */
.why-card-icon {
  font-size: 1.5rem;
  color: var(--primary);
}

.why-card-icon i {
  display: block;
  line-height: 1;
}

@media (max-width: 768px) {
  .float-contact-wrap {
    right: 16px;
    bottom: 96px;
    /* when player is active, floating above it */
  }

  #music-player.collapsed~.float-contact-wrap {
    bottom: 76px;
    /* 16px bottom + 48px open-btn + 12px gap */
  }

  /* Force open button to align vertically with contact buttons on mobile */
  .player-open-btn {
    right: 16px !important;
    bottom: 16px !important;
  }
}

@media (max-width: 640px) {
  #header-search-dropdown {
    top: 58px;
  }
}