/* ============================================================
   Smalltalk Studio - Dual Theme Engine (Dark / Light Switcher)
   Dark: Midnight Aurora Glassmorphism (Default)
   Light: Warm Editorial Modern Design System
   ============================================================ */

/* ---------- 1. DARK THEME (DEFAULT) ---------- */
:root, [data-theme="dark"] {
  --bg-deep: #07090e;
  --bg-canvas: #0b0f19;
  --bg-surface: rgba(17, 24, 39, 0.75);
  --bg-surface-solid: #0f172a;
  --bg-surface-hover: rgba(24, 34, 53, 0.85);
  --bg-nested: rgba(11, 16, 27, 0.85);
  --bg-input: rgba(13, 19, 33, 0.85);
  --bg-input-focus: rgba(18, 26, 45, 0.95);
  
  --navbar-bg: rgba(7, 9, 14, 0.85);
  --navbar-border: rgba(255, 255, 255, 0.08);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-top-highlight: rgba(255, 255, 255, 0.16);
  --border-focus: #6366f1;
  --border-glow: rgba(99, 102, 241, 0.4);
  
  --text-pure: #ffffff;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --accent-indigo: #6366f1;
  --accent-indigo-glow: rgba(99, 102, 241, 0.35);
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  
  --grad-brand: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  --grad-surface: linear-gradient(145deg, rgba(20, 29, 47, 0.7) 0%, rgba(13, 19, 32, 0.8) 100%);
  --grad-emerald: linear-gradient(135deg, #059669 0%, #10b981 100%);
  
  --hero-title-grad: linear-gradient(135deg, #ffffff 40%, #c7d2fe 75%, #38bdf8 100%);
  --hero-badge-bg: rgba(99, 102, 241, 0.12);
  --hero-badge-border: rgba(99, 102, 241, 0.35);
  --hero-badge-text: #a5b4fc;
  
  --portfolio-bg: rgba(11, 15, 25, 0.9);
  --portfolio-card-bg: #111827;
  
  --shadow-glass: 0 20px 40px -15px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  --shadow-hover: 0 25px 50px -10px rgba(99, 102, 241, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  
  --price-color: #38bdf8;
  --addon-selected-bg: rgba(20, 34, 58, 0.85);
  --custom-card-border: rgba(99, 102, 241, 0.4);
}

/* ---------- 2. LIGHT THEME (WARM EDITORIAL SYSTEM) ---------- */
[data-theme="light"] {
  --bg-deep: #f8fafc;
  --bg-canvas: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-surface-solid: #ffffff;
  --bg-surface-hover: #f8fafc;
  --bg-nested: #f8fafc;
  --bg-input: #ffffff;
  --bg-input-focus: #ffffff;
  
  --navbar-bg: rgba(255, 255, 255, 0.95);
  --navbar-border: #e2e8f0;
  
  --border-subtle: #e2e8f0;
  --border-top-highlight: #cbd5e1;
  --border-focus: #4f46e5;
  --border-glow: rgba(79, 70, 229, 0.15);
  
  --text-pure: #0f172a;
  --text-main: #334155;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  
  --accent-indigo: #4f46e5;
  --accent-indigo-glow: rgba(79, 70, 229, 0.2);
  --accent-cyan: #0284c7;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  
  --grad-brand: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  --grad-surface: #ffffff;
  --grad-emerald: linear-gradient(135deg, #059669 0%, #10b981 100%);
  
  --hero-title-grad: linear-gradient(135deg, #0f172a 0%, #334155 100%);
  --hero-badge-bg: #eef2ff;
  --hero-badge-border: #e0e7ff;
  --hero-badge-text: #4f46e5;
  
  --portfolio-bg: #0f172a;
  --portfolio-card-bg: #1e293b;
  
  --shadow-glass: 0 4px 16px -2px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-hover: 0 12px 28px -6px rgba(15, 23, 42, 0.08);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.04);
  
  --price-color: #4f46e5;
  --addon-selected-bg: #f8faff;
  --custom-card-border: #e0e7ff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', 'IBM Plex Sans Thai', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-main);
  line-height: 1.65;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] body {
  background-image: 
    radial-gradient(circle at 50% -5%, rgba(99, 102, 241, 0.2) 0%, transparent 55%),
    radial-gradient(circle at 95% 35%, rgba(6, 182, 212, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 5% 65%, rgba(99, 102, 241, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(6, 182, 212, 0.08) 0%, transparent 50%);
  background-attachment: fixed;
}

/* ==================== NAVBAR ==================== */
.navbar {
  background: var(--navbar-bg) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--navbar-border) !important;
  padding: 12px 0 !important;
  transition: all 0.3s ease;
}

.navbar .navbar-brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-pure) !important;
}

.navbar .navbar-brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

/* ==================== HERO SECTION & VIDEO BACKGROUND ==================== */
.hero-section {
  padding: 35px 0 50px;
  position: relative;
  text-align: center;
  overflow: hidden;
  min-height: 480px;
}

.hero-video-bg-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.hero-video-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-video-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  filter: brightness(0.68) saturate(1.1) contrast(1.05);
  pointer-events: none;
}

.hero-video-slide {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%) scale(1.04);
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), transform 10s ease-out;
  filter: brightness(0.65) saturate(1.1) contrast(1.05);
  pointer-events: none;
}

.hero-video-slide.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Ambient Dark Vignette & Gradient Overlay (Crystal clear text contrast) */
.hero-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(180deg, rgba(11, 15, 25, 0.45) 0%, rgba(11, 15, 25, 0.65) 60%, rgba(11, 15, 25, 0.92) 100%),
    radial-gradient(ellipse at center, rgba(11, 15, 25, 0.25) 0%, rgba(11, 15, 25, 0.75) 100%);
  pointer-events: none;
}

/* Minimal Dots Indicator (จุดไข่ปลา) */
.hero-video-dots {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-video-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  padding: 0;
}

.hero-video-dot:hover {
  background: rgba(255, 255, 255, 0.7);
}

.hero-video-dot.active {
  background: #38bdf8;
  width: 22px;
  border-radius: 11px;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
}

/* Mini Quality Resolution Chips */
.res-chip {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #94a3b8;
  transition: all 0.2s ease;
  user-select: none;
}

.res-chip:hover {
  background: rgba(51, 65, 85, 0.85);
  border-color: rgba(56, 189, 248, 0.4) !important;
  color: #e2e8f0;
}

.res-chip.active {
  background: rgba(56, 189, 248, 0.18) !important;
  border-color: #38bdf8 !important;
  color: #38bdf8 !important;
  font-weight: 600;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--hero-badge-bg);
  border: 1px solid var(--hero-badge-border);
  color: var(--hero-badge-text);
  padding: 8px 22px;
  border-radius: 9999px;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 24px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.15);
}

.badge-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #22c55e;
  display: inline-block;
  box-shadow: 0 0 10px #22c55e;
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

.text-gradient-brand {
  background: linear-gradient(135deg, #6366f1 0%, #38bdf8 50%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-title {
  font-family: 'IBM Plex Sans Thai', 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(2.4rem, 4vw, 3.8rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: var(--text-pure);
  max-width: 980px;
  margin: 0 auto 28px;
  text-wrap: balance;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.34);
  font-feature-settings: 'kern', 'liga';
}

.hero-title::after {
  content: none;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  font-weight: 400;
  max-width: 650px;
  margin: 0 auto 36px;
  line-height: 1.7;
  text-wrap: pretty;
}

.hero-image-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==================== PROMOTION & MOBILE PACKAGE DISCOVERY ==================== */
.promotion-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 7, 18, 0.72);
  backdrop-filter: blur(8px);
}

.promotion-overlay[hidden] { display: none; }

.promotion-dialog {
  position: relative;
  width: min(100%, 440px);
  max-height: min(720px, calc(100vh - 40px));
  overflow: auto;
  border: 1px solid var(--border-top-highlight);
  border-radius: 24px;
  background: var(--bg-surface-solid);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.46), inset 0 1px rgba(255, 255, 255, 0.12);
  transform-origin: center;
  animation: promotion-enter 220ms cubic-bezier(0.23, 1, 0.32, 1) both;
}

@keyframes promotion-enter {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.promotion-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #fff;
  background: rgba(3, 7, 18, 0.7);
  display: grid;
  place-items: center;
  transition: transform 140ms ease-out, background-color 140ms ease-out;
}

.promotion-close:hover { background: rgba(15, 23, 42, 0.95); transform: scale(1.04); }
.promotion-close:active { transform: scale(0.97); }
.promotion-close:focus-visible, .promotion-dialog a:focus-visible, .promotion-nav-button:focus-visible, .promotion-dot:focus-visible, .mobile-packages-cta:focus-visible { outline: 3px solid var(--accent-cyan); outline-offset: 3px; }

.promotion-image {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 1px solid var(--border-subtle);
}

.promotion-copy { padding: 28px; }
.promotion-eyebrow { display: inline-flex; align-items: center; gap: 7px; color: var(--accent-cyan); font-size: 0.83rem; font-weight: 700; }
.promotion-copy h2 { margin: 12px 0 8px; color: var(--text-pure); font-size: clamp(1.45rem, 5vw, 2rem); line-height: 1.22; text-wrap: balance; }
.promotion-copy p { margin: 0 0 22px; color: var(--text-muted); line-height: 1.65; text-wrap: pretty; }
.promotion-copy .btn:active { transform: scale(0.98); }

.promotion-navigation {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
  padding: 0 28px 26px;
}

.promotion-nav-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  color: var(--text-pure);
  background: var(--bg-surface);
  display: grid;
  place-items: center;
  transition: transform 140ms ease-out, border-color 140ms ease-out, background-color 140ms ease-out;
}

.promotion-nav-button:hover { transform: translateY(-1px); border-color: var(--accent-cyan); background: rgba(8, 145, 178, 0.14); }
.promotion-nav-button:active { transform: scale(0.96); }

.promotion-dots { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; }

.promotion-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.55);
  transition: width 170ms ease, background-color 170ms ease, transform 170ms ease;
}

.promotion-dot:hover { background: var(--accent-cyan); transform: scale(1.1); }
.promotion-dot.is-active { width: 26px; background: var(--accent-cyan); }
.promotion-slide-changing .promotion-image,
.promotion-slide-changing .promotion-copy { animation: promotion-slide-change 180ms ease both; }

@keyframes promotion-slide-change {
  from { opacity: 0.45; transform: translateX(5px); }
  to { opacity: 1; transform: translateX(0); }
}

.mobile-packages-cta { display: none; }
body.promotion-open { overflow: hidden; }
#standardPackagesSection { scroll-margin-top: 82px; }

.info-box {
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-top: 1px solid var(--border-top-highlight);
  border-radius: 16px;
  padding: 18px 22px;
  box-shadow: var(--shadow-glass);
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  transition: all 0.25s ease;
}

.info-box:hover {
  transform: translateY(-3px);
  border-color: var(--accent-indigo);
  box-shadow: var(--shadow-hover);
}

.info-box i {
  font-size: 1.8rem;
  color: var(--accent-indigo);
}

.info-text small {
  color: var(--text-dim);
  font-size: 0.8rem;
  display: block;
}

.info-text strong {
  color: var(--text-pure);
  font-size: 1.05rem;
  font-weight: 600;
}

/* ==================== SECTIONS ==================== */
section {
  padding: 80px 0;
  position: relative;
}

.section-title {
  font-size: 2.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-pure) !important;
  margin-bottom: 10px;
}

.section-description {
  font-size: 1.08rem;
  color: var(--text-muted) !important;
  max-width: 580px;
  margin: 0 auto;
}

/* ==================== PORTFOLIO SHOWCASE ==================== */
#portfolio {
  background: var(--portfolio-bg) !important;
  color: #fff;
  border-radius: 28px;
  margin: 20px auto 40px;
  max-width: 1320px;
  padding: 70px 40px;
  box-shadow: 0 25px 50px -15px rgba(0, 0, 0, 0.5);
}

#portfolio .section-title {
  color: #ffffff !important;
}

#portfolio .section-description {
  color: #94a3b8 !important;
}

.portfolio-video-card {
  border-radius: 18px;
  overflow: hidden;
  background: var(--portfolio-card-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
}

.portfolio-video-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-indigo);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

/* ==================== CARDS & PANELS ==================== */
.card, .summary-card, .contact-card, .package-card, .addon-card {
  background: var(--grad-surface) !important;
  border: 1px solid var(--border-subtle) !important;
  border-top: 1px solid var(--border-top-highlight) !important;
  border-radius: 22px !important;
  color: var(--text-main) !important;
  box-shadow: var(--shadow-glass) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover, .package-card:hover, .addon-card:hover {
  border-color: var(--accent-indigo) !important;
  box-shadow: var(--shadow-hover) !important;
  transform: translateY(-3px);
}

/* ==================== SERVICES SECTION & LARGE ICONS ==================== */
.service-card {
  padding: 30px 24px !important;
  border-radius: 20px !important;
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-subtle) !important;
  border-top: 1px solid var(--border-top-highlight) !important;
  box-shadow: var(--shadow-glass) !important;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  height: 100% !important;
  position: relative !important;
  overflow: hidden !important;
}

.service-card:hover {
  transform: translateY(-6px) !important;
  border-color: var(--accent-indigo) !important;
  box-shadow: 0 20px 40px -10px rgba(99, 102, 241, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  background: var(--bg-surface-hover) !important;
}

.service-card .service-icon {
  width: 58px;
  height: 58px;
  min-width: 58px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(6, 182, 212, 0.2));
  border: 1px solid rgba(99, 102, 241, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  color: #38bdf8;
  margin-bottom: 20px;
  transition: all 0.35s ease;
  box-shadow: 0 8px 24px -4px rgba(99, 102, 241, 0.3);
}

.service-card:hover .service-icon {
  transform: scale(1.12) rotate(3deg);
  background: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 12px 28px -4px rgba(99, 102, 241, 0.6);
}

.service-card h5 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-pure) !important;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.service-card p {
  color: var(--text-muted) !important;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0;
}

.card-header {
  background: transparent !important;
  border-bottom: 1px solid var(--border-subtle) !important;
  padding: 22px 28px !important;
}

.card-body {
  padding: 28px !important;
}

/* ==================== CUSTOM SOLUTION BUILDER ==================== */
#customSolutionCard {
  border: 1.5px solid #475569 !important;
  box-shadow: 0 20px 45px -15px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  background: linear-gradient(160deg, #1e293b 0%, #172033 100%) !important;
  border-radius: 20px !important;
}

#customSolutionCard .card-header {
  background: rgba(30, 41, 59, 0.85) !important;
  border-bottom: 1px solid #334155 !important;
  border-top-left-radius: 20px !important;
  border-top-right-radius: 20px !important;
}

#customSolutionCard h4 {
  color: #ffffff !important;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.scope-builder-wrapper {
  background: #172033 !important;
  border: 1px solid #334155 !important;
  border-radius: 20px;
  padding: 24px;
}

.btn-ai-magic {
  background: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4) !important;
  transition: all 0.25s ease !important;
}

.btn-ai-magic:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #0891b2 100%) !important;
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.6) !important;
  color: #ffffff !important;
}

.btn-ai-magic:active {
  transform: translateY(0);
}

.prod-style-btn {
  font-size: 0.82rem !important;
  font-weight: 500 !important;
  border-width: 1.5px !important;
  transition: all 0.2s ease !important;
  cursor: pointer;
}
.prod-style-btn.active {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4) !important;
}

.scope-section-card {
  background: #1e293b !important;
  border: 1.5px solid #334155 !important;
  border-radius: 16px !important;
  padding: 18px !important;
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.35) !important;
  transition: all 0.25s ease;
}

.scope-section-card:hover {
  border-color: #6366f1 !important;
}

.scope-item-block {
  background: #0f172a !important;
  border: 1px solid #334155 !important;
  border-radius: 12px !important;
  transition: all 0.2s ease;
}

.scope-item-block:hover, .scope-item-block:focus-within {
  border-color: #6366f1 !important;
  background: #1e293b !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.scope-item-input {
  font-size: 0.95rem !important;
  font-weight: 500 !important;
  color: #ffffff !important;
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  border-radius: 8px !important;
  min-height: 38px !important;
}

.scope-item-input:focus {
  background: #273549 !important;
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25) !important;
}

.scope-item-price {
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  color: #38bdf8 !important;
  background: #0f172a !important;
  border: 1px solid #334155 !important;
}

.scope-item-block .input-group-text {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

#customSolutionCard input.form-control, 
#customSolutionCard select.form-select {
  background-color: #0f172a !important;
  color: #ffffff !important;
  border-color: #334155 !important;
}

#customSolutionCard input.form-control:focus, 
#customSolutionCard select.form-select:focus {
  background-color: #1e293b !important;
  border-color: #6366f1 !important;
  color: #ffffff !important;
}

#customSolutionCard label {
  color: #f8fafc !important;
}

#customSolutionCard .text-muted {
  color: #94a3b8 !important;
}

#customSolutionCard .input-group-text {
  background-color: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}

[data-theme="light"] .scope-builder-wrapper {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

[data-theme="light"] .scope-section-card {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .scope-item-block {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
}

[data-theme="light"] .scope-item-block:hover, [data-theme="light"] .scope-item-block:focus-within {
  border-color: #818cf8 !important;
  background: #ffffff !important;
}

[data-theme="light"] .scope-item-input {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

[data-theme="light"] .scope-item-price {
  background: #ffffff !important;
  color: #0284c7 !important;
  border-color: #cbd5e1 !important;
}

[data-theme="light"] .scope-item-block .input-group-text {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #64748b !important;
}

/* ==================== FORMS & INPUTS ==================== */
.form-control, .form-select {
  background-color: var(--bg-input) !important;
  border: 1px solid var(--border-subtle) !important;
  color: var(--text-pure) !important;
  border-radius: 12px;
  padding: 11px 16px;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
  background-color: var(--bg-input-focus) !important;
  border-color: var(--accent-indigo) !important;
  box-shadow: 0 0 0 3px var(--accent-indigo-glow) !important;
  color: var(--text-pure) !important;
}

.form-control::placeholder {
  color: var(--text-dim) !important;
}

.form-label {
  color: var(--text-pure) !important;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.input-group-text {
  background-color: var(--bg-nested) !important;
  border: 1px solid var(--border-subtle) !important;
  color: var(--text-muted) !important;
  font-weight: 600;
}

/* ==================== BUTTONS & TOGGLES (HIGH CONTRAST) ==================== */
.btn {
  border-radius: 12px;
  padding: 10px 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--grad-brand) !important;
  border: none !important;
  color: #ffffff !important;
  box-shadow: 0 4px 18px var(--accent-indigo-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--accent-indigo-glow);
}

.btn-outline-primary {
  border: 1.5px solid var(--accent-indigo) !important;
  color: var(--accent-indigo) !important;
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--grad-brand) !important;
  border-color: transparent !important;
  color: #ffffff !important;
}

/* Radio Button-Check State Fix (Crystal Clear White Text) */
.btn-check:checked + .btn-outline-primary,
.btn-check:checked + .btn-primary,
.btn-outline-primary.active,
.btn-outline-primary:active {
  background: var(--accent-indigo) !important;
  border-color: var(--accent-indigo) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px var(--accent-indigo-glow) !important;
}

.btn-check:not(:checked) + .btn-outline-primary {
  color: var(--text-main) !important;
  border-color: var(--border-subtle) !important;
  background: var(--bg-surface) !important;
}

.btn-success {
  background: var(--grad-emerald) !important;
  border: none !important;
  color: #ffffff !important;
}

.btn-outline-secondary {
  border: 1.5px solid var(--border-subtle) !important;
  color: var(--text-main) !important;
  background: var(--bg-surface);
}

.btn-outline-secondary:hover {
  background: var(--bg-surface-hover) !important;
}

/* ==================== PACKAGES & ADDONS ==================== */
.package-card {
  padding: 26px 22px !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  position: relative !important;
  border-radius: 20px !important;
}

.package-card.popular {
  border: 2px solid #6366f1 !important;
  box-shadow: 0 15px 40px -10px rgba(99, 102, 241, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.popular-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  width: fit-content;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.package-name {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-pure) !important;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.package-for {
  color: var(--text-muted) !important;
  font-size: 0.85rem;
  margin-bottom: 14px;
  line-height: 1.4;
}

.package-for strong {
  color: var(--text-main) !important;
}

.package-pricing-card {
  margin: 10px 0 16px;
  padding: 12px 14px;
  background: rgba(13, 19, 33, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
}

.pricing-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
}

.price-strike-label {
  font-size: 0.82rem;
  color: #94a3b8;
  white-space: nowrap;
}

.price-strike-label s {
  color: #cbd5e1;
  text-decoration-color: #ef4444;
  text-decoration-thickness: 1.5px;
  font-weight: 600;
  margin-left: 2px;
}

.badge-save {
  font-size: 0.74rem;
  font-weight: 700;
  color: #f87171;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  padding: 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
}

.pricing-amount-group {
  display: flex;
  align-items: baseline;
  gap: 4px;
  white-space: nowrap;
}

.price-val {
  font-size: 1.95rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em;
  color: #38bdf8 !important;
  line-height: 1.1;
}

.price-unit {
  font-size: 0.88rem;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
}

.special-badge-tag {
  display: inline-block;
  margin-top: 6px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
}

.package-features {
  margin-bottom: 24px;
  flex-grow: 1;
}

.package-features ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.package-features li {
  color: var(--text-muted) !important;
  padding: 8px 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.925rem;
  line-height: 1.45;
}

.package-features li i {
  color: var(--accent-emerald);
  margin-top: 2px;
  font-size: 1rem;
}

.addon-card {
  padding: 22px;
}

.addon-card.selected {
  border-color: var(--accent-indigo) !important;
  background: var(--addon-selected-bg) !important;
}

.addon-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-emerald);
}

/* ==================== SUMMARY & CONTACT ==================== */
.sticky-sidebar {
  position: sticky;
  top: 85px;
}

.summary-card {
  padding: 26px;
  border: 1.5px solid var(--border-subtle) !important;
}

.summary-total {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--price-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.summary-item span:last-child {
  color: var(--text-pure);
  font-weight: 600;
}

.contact-card {
  padding: 26px;
}

/* ==================== FLOATING SOCIAL BUTTONS ==================== */
.floating-social {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 99999;
}

.float-social-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #ffffff !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: all 0.25s ease;
  text-decoration: none;
}

.float-social-btn:hover {
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.float-line {
  background-color: #06C755 !important;
}

.float-fb {
  background-color: #1877F2 !important;
}

.site-audio-toggle {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 99998;
  min-height: 42px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 999px;
  color: rgba(226, 232, 240, 0.9);
  background: rgba(15, 23, 42, 0.76);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: 'IBM Plex Sans Thai', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
  transition: background-color 160ms ease-out, border-color 160ms ease-out, color 160ms ease-out, transform 160ms ease-out, box-shadow 160ms ease-out;
}

.site-audio-toggle.is-playing {
  border-color: rgba(34, 211, 238, 0.58);
  color: #cffafe;
  background: rgba(8, 47, 73, 0.82);
}

.site-audio-toggle:focus-visible {
  outline: 2px solid #67e8f9;
  outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  .site-audio-toggle:hover {
    color: #ffffff;
    border-color: rgba(103, 232, 249, 0.62);
    transform: translateY(-1px);
    box-shadow: 0 13px 28px rgba(0, 0, 0, 0.32);
  }
}

/* ==================== MODALS (DARK AURORA THEME) ==================== */
.modal-content {
  background: var(--bg-surface-solid) !important;
  border: 1px solid var(--border-subtle) !important;
  border-top: 1px solid var(--border-top-highlight) !important;
  border-radius: 24px !important;
  color: var(--text-main) !important;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 30px rgba(99, 102, 241, 0.2) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.modal-header, .modal-footer {
  border-color: var(--border-subtle) !important;
}

.modal-title {
  color: var(--text-pure) !important;
  font-weight: 700;
}

.modal-backdrop.show {
  opacity: 0.75 !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-modal-preview {
  background: rgba(99, 102, 241, 0.12) !important;
  border: 1.5px solid rgba(99, 102, 241, 0.4) !important;
  color: #38bdf8 !important;
  transition: all 0.25s ease;
}

.btn-modal-preview:hover {
  background: rgba(99, 102, 241, 0.25) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px -4px rgba(99, 102, 241, 0.4);
}

[data-theme="light"] .modal-content {
  background: #ffffff !important;
  color: #0f172a !important;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.15) !important;
}

[data-theme="light"] .modal-title {
  color: #0f172a !important;
}

[data-theme="light"] .btn-modal-preview {
  background: #f0f9ff !important;
  border-color: #0284c7 !important;
  color: #0284c7 !important;
}

[data-theme="light"] .btn-modal-preview:hover {
  background: #0284c7 !important;
  color: #ffffff !important;
}

/* ==================== FOOTER ==================== */
footer {
  background: #04060a !important;
  border-top: 1px solid var(--border-subtle);
  color: #94a3b8;
  padding: 50px 0 35px;
}

/* ==================== UTILITIES ==================== */
.text-dark {
  color: var(--text-pure) !important;
}

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

.bg-light {
  background-color: transparent !important;
}

.bg-white {
  background-color: transparent !important;
}

/* ==================== RESPONSIVE & MOBILE POLISH ==================== */
@media (max-width: 991.98px) {
  .sticky-sidebar {
    position: static !important;
    margin-top: 2rem;
  }
  
  .navbar-brand span {
    font-size: 1.05rem;
  }

  .hero-section {
    padding: 30px 0 20px;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem !important;
    line-height: 1.22 !important;
    letter-spacing: -0.025em;
  }

  .hero-subtitle {
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
    padding: 0 8px;
  }

  .section-title {
    font-size: 1.6rem !important;
  }

  .section-description {
    font-size: 0.9rem !important;
  }

  #portfolio {
    border-radius: 0;
    margin: 0;
    padding: 40px 15px;
  }

  .package-card {
    padding: 20px 16px !important;
    border-radius: 16px !important;
  }

  .summary-card, .contact-card {
    padding: 20px 16px !important;
    border-radius: 16px !important;
  }

  .summary-total {
    font-size: 1.45rem !important;
  }

  /* Form Inputs on Mobile: 16px font-size prevents iOS zoom, touch-friendly min height */
  .form-control, .form-select {
    font-size: 16px !important;
    min-height: 42px !important;
  }

  .form-control-sm, .form-select-sm {
    font-size: 15px !important;
    min-height: 40px !important;
  }

  /* Switch Toggle Container */
  .form-switch .form-check-input {
    width: 2.3em !important;
    height: 1.25em !important;
  }

  /* Custom Solution Card on Mobile */
  #customSolutionCard .card-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 12px;
  }

  #customSolutionCard .card-header button {
    width: 100%;
  }

  #customSolutionCard .card-body {
    padding: 16px 14px !important;
  }

  .scope-builder-wrapper {
    overflow-x: hidden !important;
  }

  .scope-section-card {
    padding: 14px 10px !important;
    overflow-x: hidden !important;
  }

  /* Production style buttons on mobile */
  .prod-style-btn {
    font-size: 0.78rem !important;
    padding: 6px 10px !important;
    flex: 1 1 auto !important;
    text-align: center !important;
  }

  /* Action buttons on mobile */
  #btnAiGenerateScope, #btnAddScopeSection {
    font-size: 0.88rem !important;
    padding: 10px 14px !important;
    white-space: normal !important;
  }

  /* Scope Item input block on mobile */
  .scope-item-block {
    padding: 10px 8px !important;
    overflow-x: hidden !important;
  }

  .scope-item-input {
    font-size: 0.88rem !important;
  }

  /* Floating Buttons on Mobile: Compact & unobtrusive */
  .floating-social {
    right: 16px;
    bottom: 18px;
    gap: 10px;
  }

  .float-social-btn {
    width: 46px;
    height: 46px;
    font-size: 1.25rem;
  }

  .site-audio-toggle {
    left: 16px;
    bottom: 78px;
    min-height: 40px;
    padding: 0 12px;
  }

  .mobile-packages-cta {
    position: fixed;
    left: 16px;
    right: 78px;
    bottom: 18px;
    min-height: 48px;
    z-index: 99990;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(99, 102, 241, 0.5);
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #4f46e5, #0891b2);
    box-shadow: 0 12px 28px rgba(8, 145, 178, 0.28);
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
  }

  .promotion-overlay { padding: 14px; }
  .promotion-copy { padding: 24px 20px 22px; }
  .promotion-navigation { padding: 0 20px 22px; }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.8rem !important;
  }
  
  .btn-lg {
    font-size: 0.95rem !important;
    padding: 10px 18px !important;
    width: 100% !important;
  }

  .modal-dialog {
    margin: 12px;
  }

  .modal-content {
    border-radius: 18px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .promotion-dialog, .promotion-slide-changing .promotion-image, .promotion-slide-changing .promotion-copy { animation-duration: 0.01ms; }
  .promotion-close { transition-duration: 0.01ms; }
}
