
/* 
===============================================
  1. CORE VARIABLES & SETUP (iOS THEME)
===============================================
*/
:root {
  /* Colors */
  --bg-primary: #F5F5F7;
  --bg-secondary: #FFFFFF;
  --text-main: #1D1D1F;
  --text-muted: #86868B;
  --accent-blue: #007AFF;
  --accent-green: #34C759;
  
  /* Glass Variables */
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
  --glass-blur: blur(20px);
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Background Aurora Blob */
.aurora-bg {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: -1;
  background: var(--bg-primary);
  overflow: hidden;
}
.aurora-blob {
  position: absolute;
  filter: blur(100px);
  opacity: 0.5;
  animation: float 20s infinite ease-in-out alternate;
}
.aurora-blob.blue {
  background: rgba(0, 122, 255, 0.2);
  width: 60vw; height: 60vw;
  top: -10vw; left: -10vw;
}
.aurora-blob.purple {
  background: rgba(88, 86, 214, 0.15);
  width: 50vw; height: 50vw;
  bottom: -10vw; right: -10vw;
  animation-delay: -10s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(5%, 5%) scale(1.05); }
  100% { transform: translate(-5%, -5%) scale(0.95); }
}

/* Utility Classes */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 24px;
  padding: 40px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.08);
}
.btn-primary {
  background: var(--accent-blue);
  color: white;
  border: none;
  border-radius: 980px;
  padding: 16px 32px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.btn-primary:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 122, 255, 0.3);
}

/* 
===============================================
  2. SECTIONS
===============================================
*/

/* Hero */
.hero {
  padding: 120px 0 80px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
  line-height: 1.1;
}
.hero h1 span {
  background: linear-gradient(135deg, var(--accent-blue), #5856D6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 40px;
  line-height: 1.5;
}

/* Features */
.features {
  padding: 80px 0;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}
.feature-icon {
  font-size: 2.5rem;
  color: var(--accent-blue);
  margin-bottom: 24px;
}
.feature-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.feature-text {
  color: var(--text-muted);
  line-height: 1.6;
}

/* Sandbox */
.sandbox-section {
  padding: 100px 0;
}
.sandbox-header {
  text-align: center;
  margin-bottom: 60px;
}
.sandbox-header h2 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
}

/* Sandbox Interactive UI */
.sandbox-wrapper {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 40px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255,255,255,1);
  max-width: 800px;
  margin: 0 auto;
  height: 650px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.sb-topbar {
  padding: 20px 30px;
  background: rgba(255, 255, 255, 0.5);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 10;
}
.sb-avatar {
  width: 50px;
  height: 50px;
  border-radius: 25px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-green));
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 700;
  margin-right: 16px;
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}
.sb-info h3 { margin: 0; font-size: 1.3rem; font-weight: 700; color: var(--text-main); }
.sb-info p { margin: 0; font-size: 0.9rem; color: var(--accent-green); font-weight: 500; }

.sb-chat {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  scroll-behavior: smooth;
}

.sb-msg-row {
  display: flex;
  flex-direction: column;
  max-width: 85%;
  opacity: 0;
  transform: translateY(20px);
  animation: slideInMsg 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.sb-msg-row.bot { align-self: flex-start; }
.sb-msg-row.user { align-self: flex-end; align-items: flex-end; }

@keyframes slideInMsg {
  to { opacity: 1; transform: translateY(0); }
}

.sb-bubble {
  padding: 16px 20px;
  border-radius: 24px;
  font-size: 1.05rem;
  line-height: 1.4;
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.bot .sb-bubble {
  background: #FFFFFF;
  border: 1px solid rgba(0,0,0,0.03);
  color: var(--text-main);
  border-bottom-left-radius: 6px;
}

.user .sb-bubble {
  background: var(--accent-blue);
  color: #FFFFFF;
  border-bottom-right-radius: 6px;
  box-shadow: 0 8px 20px rgba(0, 122, 255, 0.25);
}

.sb-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  width: 100%;
}
.sb-btn {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 122, 255, 0.2);
  color: var(--accent-blue);
  padding: 14px 20px;
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}
.sb-btn:hover {
  background: var(--accent-blue);
  color: #FFFFFF;
  transform: scale(1.02);
  box-shadow: 0 4px 15px rgba(0, 122, 255, 0.2);
}

.sb-input-area {
  padding: 20px 30px;
  background: rgba(255, 255, 255, 0.5);
  border-top: 1px solid rgba(0,0,0,0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  gap: 16px;
}
.sb-input {
  flex: 1;
  background: #FFFFFF;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 980px;
  padding: 16px 24px;
  font-size: 1.05rem;
  outline: none;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}
.sb-input:focus {
  border-color: rgba(0, 122, 255, 0.5);
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}
.sb-send {
  background: var(--accent-blue);
  color: white;
  width: 52px; height: 52px;
  border-radius: 26px;
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3);
}
.sb-send:hover {
  transform: scale(1.08);
}

/* 
===============================================
  3. RESPONSIVE
===============================================
*/
@media (max-width: 768px) {
  .hero h1 { font-size: 2.5rem; }
  .sandbox-wrapper { height: 80vh; border-radius: 24px; }
  .sb-topbar { padding: 15px 20px; }
  .sb-chat { padding: 20px; }
  .sb-input-area { padding: 15px 20px; }
  .glass-card { padding: 24px; }
}

/* Webview Modal Simulation */
.sb-webview-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}
.sb-webview-close {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.05);
  border: none;
  width: 30px; height: 30px;
  border-radius: 15px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.sb-webview-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}
.sb-step {
  display: none;
  animation: fadeIn 0.3s ease;
}
.sb-step.active {
  display: block;
}
.sb-service-card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}
.sb-service-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-blue);
  box-shadow: 0 8px 20px rgba(0,122,255,0.1);
}
.sb-service-icon {
  width: 48px; height: 48px;
  background: rgba(0, 122, 255, 0.1);
  color: var(--accent-blue);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  margin-right: 16px;
}
.sb-service-info h4 { margin: 0 0 4px 0; font-size: 1rem; }
.sb-service-info p { margin: 0; font-size: 0.85rem; color: var(--text-muted); }

.sb-date-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 15px;
}
.sb-date-btn {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  padding: 16px 12px;
  border-radius: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}
.sb-date-btn.selected {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(0, 122, 255, 0.3);
}
.sb-btn-full {
  width: 100%;
  background: var(--accent-blue);
  color: #fff;
  border: none;
  padding: 16px;
  border-radius: 16px;
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 20px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 122, 255, 0.3);
  transition: all 0.2s ease;
}
.sb-btn-full:hover {
  transform: scale(1.02);
}

/* 5-Step Webview Additional CSS */
.sb-steps-indicator {
  display: flex; justify-content: center; gap: 8px; margin: 10px 0 20px 0; padding: 0 20px;
}
.sb-step-dot {
  height: 4px; flex: 1; max-width: 40px; border-radius: 2px; background: rgba(0,0,0,0.1); transition: all 0.3s ease;
}
.sb-step-dot.active, .sb-step-dot.completed {
  background: var(--accent-blue);
}
.sb-staff-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.sb-staff-card {
  background: rgba(255, 255, 255, 0.6); backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 16px; padding: 15px 10px; text-align: center; cursor: pointer; transition: all 0.2s ease;
}
.sb-staff-card.selected {
  background: #fff; border: 2px solid var(--accent-blue);
}
.sb-staff-avatar {
  width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
  color: white; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin: 0 auto 10px;
}
.sb-staff-name { font-size: 0.95rem; font-weight: 600; margin-bottom: 2px; }
.sb-staff-role { font-size: 0.8rem; color: var(--text-muted); }

/* Calendar - Date Cards */
.sb-date-cards-container {
  display: flex; gap: 10px; overflow-x: auto; padding: 4px 0 12px 0; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.sb-date-cards-container::-webkit-scrollbar { display: none; }
.sb-date-card {
  min-width: 68px; padding: 14px 10px; border-radius: 18px; background: rgba(255, 255, 255, 0.6); backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255, 255, 255, 0.8); text-align: center; cursor: pointer; transition: all 0.25s ease; flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}
.sb-date-card:hover { border-color: var(--accent-blue); }
.sb-date-card.selected { background: var(--accent-blue); border-color: var(--accent-blue); color: white; box-shadow: 0 8px 20px rgba(0, 122, 255, 0.3); }
.sb-date-card.selected .sb-date-day-name, .sb-date-card.selected .sb-date-day-num, .sb-date-card.selected .sb-date-month { color: white; }
.sb-date-card .sb-date-day-name { font-size: 0.7rem; font-weight: 500; color: var(--text-muted); text-transform: uppercase; margin-bottom: 4px; }
.sb-date-card .sb-date-day-num { font-size: 1.4rem; font-weight: 700; color: var(--text-main); line-height: 1.2; }
.sb-date-card .sb-date-month { font-size: 0.65rem; font-weight: 500; color: var(--text-muted); margin-top: 2px; }
.sb-date-card.today { border-color: var(--accent-blue); }
.sb-date-card.today .sb-date-day-name { color: var(--accent-blue); }

.sb-slots-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sb-slot-btn {
  background: rgba(255, 255, 255, 0.6); backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.8);
  padding: 10px 5px; border-radius: 12px; text-align: center; cursor: pointer; font-size: 0.9rem; font-weight: 600; transition: all 0.2s ease;
}
.sb-slot-btn.selected { background: var(--accent-blue); color: #fff; border-color: var(--accent-blue); box-shadow: 0 4px 14px rgba(0, 122, 255, 0.3); }

.sb-summary-card {
  background: rgba(255, 255, 255, 0.6); backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 16px; padding: 1.5rem; margin-bottom: 60px;
}
.sb-summary-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(0,0,0,0.05); font-size: 0.95rem; }
.sb-summary-row:last-child { border-bottom: none; }
.sb-summary-label { color: var(--text-muted); }
.sb-summary-val { font-weight: 600; }

.sb-webview-nav {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 15px 20px;
  background: linear-gradient(to top, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0) 100%);
  display: flex; gap: 10px;
}
.sb-nav-btn {
  flex: 1; padding: 12px; border-radius: 12px; font-weight: 600; border: none; cursor: pointer; transition: all 0.2s ease;
}
.sb-btn-back { background: #fff; color: var(--text-main); border: 1px solid rgba(0,0,0,0.1); flex: 0.5; }
.sb-btn-next { background: var(--accent-blue); color: #fff; }
.sb-btn-next:disabled { opacity: 0.5; cursor: not-allowed; }

.sb-success-icon {
  width: 60px; height: 60px; border-radius: 50%; background: #34C759; color: white; display: flex; align-items: center; justify-content: center; font-size: 2rem; margin: 2rem auto 1rem;
}


/* Fix missing steps CSS */
.sb-step { display: none; animation: slideUp 0.3s ease-out; }
.sb-step.active { display: block; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* WhatsApp Bottom Sheet Styling */
.sb-webview-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.sb-webview-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.sb-webview-modal {
  position: absolute;
  bottom: 0; /* Attach to bottom */
  top: auto;
  left: 0;
  width: 100%;
  height: 85%; /* 85% of sandbox */
  background: #f0f2f5; /* WhatsApp light background */
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.1);
}
.sb-webview-modal.open {
  transform: translateY(0); /* Slide up to its position */
}

/* Drag Handle */
.sb-drag-handle {
  width: 36px;
  height: 5px;
  background: #d1d1d6;
  border-radius: 3px;
  margin: 12px auto 0;
}

.sb-webview-header {
  padding: 10px 20px 20px;
  background: #fff;
  text-align: center;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  position: relative;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
}
.sb-webview-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #111b21; /* WhatsApp dark text */
}
.sb-webview-close {
  position: absolute;
  right: 20px;
  top: 20px;
  background: #f0f2f5;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #54656f;
  transition: all 0.2s;
}
.sb-webview-close:hover { background: #e9edef; }

.sb-webview-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #f0f2f5;
}

.sb-btn-next { background: #00a884; color: #fff; } /* WhatsApp Green */
.sb-btn-next:hover { background: #008f6f; }
.sb-step-dot.active, .sb-step-dot.completed { background: #00a884; }
.sb-date-card.today { border-color: #00a884; }
.sb-date-card.today .sb-date-day-name { color: #00a884; }
.sb-date-card.selected { background: #00a884 !important; border-color: #00a884 !important; }
.sb-slot-btn.selected { background: #00a884; border-color: #00a884; box-shadow: 0 4px 14px rgba(0, 168, 132, 0.3); }
.sb-service-card.selected { border: 2px solid #00a884; background: #fff; }
.sb-staff-card.selected { border: 2px solid #00a884; background: #fff; }

/* Responsive Header */
.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  width: 100%;
  box-sizing: border-box;
}
.site-header .logo {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -1px;
  color: #1D1D1F;
}
.desktop-nav {
  display: flex;
  gap: 30px;
}
.desktop-nav a {
  text-decoration: none;
  color: #86868B;
  font-weight: 500;
  transition: color 0.3s;
}
.desktop-nav a:hover {
  color: #1D1D1F;
}
.header-login-btn {
  padding: 10px 24px;
  font-size: 0.95rem;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .site-header {
    padding: 15px 20px;
  }
  .desktop-nav {
    display: none; /* Hide links on mobile to prevent overflow */
  }
  .site-header .logo {
    font-size: 20px;
  }
  .header-login-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
  }
  /* Fix container paddings for mobile */
  .container {
    padding-left: 15px;
    padding-right: 15px;
    width: 100%;
    box-sizing: border-box;
  }
  /* Make sure sandbox fits the screen */
  .sandbox-wrapper {
    height: 75vh;
    border-radius: 20px;
    margin: 0;
    width: 100%;
  }
  .sb-chat {
    padding: 15px;
  }
}
