/* ==========================================================================
   ApexDental Design Tokens & Reset
   ========================================================================== */

:root {
  /* Colors */
  --primary-gradient: linear-gradient(135deg, #0d9488 0%, #0284c7 100%);
  --accent-gradient: linear-gradient(135deg, #2dd4bf 0%, #38bdf8 100%);
  --primary: #0d9488;
  --primary-hover: #0f766e;
  --primary-light: #f0fdfa;
  --secondary: #0f172a;
  --secondary-light: #1e293b;
  --accent: #0284c7;
  --accent-light: #f0f9ff;
  --white: #ffffff;
  --bg-main: #f8fafc;
  --text: #334155;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-light: rgba(255, 255, 255, 0.5);
  
  /* Layout Metrics */
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.1);
  --shadow-glow: 0 12px 30px -10px rgba(13, 148, 136, 0.35);
  
  /* Animations */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ==========================================================================
   Floating Chatbot Widget Styles
   ========================================================================== */
.chatbot-widget-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Floating Badge Button */
.chatbot-badge {
  background: var(--primary-gradient);
  color: var(--white);
  border: none;
  border-radius: 50px;
  padding: 14px 24px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(13, 148, 136, 0.4);
  transition: var(--transition-spring);
  position: relative;
  overflow: visible;
}

.chatbot-badge:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 15px 35px rgba(13, 148, 136, 0.5);
}

.chatbot-badge:active {
  transform: translateY(-2px) scale(0.98);
}

.badge-icon {
  width: 20px;
  height: 20px;
}

.badge-pulse {
  position: absolute;
  inset: -2px;
  border-radius: 50px;
  border: 2px solid var(--primary);
  opacity: 0.8;
  animation: pulse-ring 2.2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
  pointer-events: none;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  80%, 100% { transform: scale(1.15); opacity: 0; }
}

/* Floating Chat Window positioning override */
.chatbot-card.floating-chat-window {
  position: absolute;
  bottom: 75px;
  right: 0;
  width: 380px;
  height: 520px;
  max-width: 90vw;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  transform: translateY(30px) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transform-origin: bottom right;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: var(--white);
}

.chatbot-card.floating-chat-window.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

/* Header Close Button */
.chat-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  margin-left: auto;
}

.chat-close-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-dark);
}

/* Booking CTA Section Banner styles */
.booking-cta-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 50px;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
  position: relative;
  overflow: hidden;
  background-image: radial-gradient(circle at 100% 100%, var(--primary-light) 0%, transparent 40%);
  width: 100%;
}

.booking-cta-content h2 {
  font-size: clamp(2rem, 3vw, 2.5rem);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.booking-cta-content p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 30px;
  max-width: 540px;
}

#btn-trigger-chat-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* Mobile mockup phone visual */
.booking-cta-visual {
  display: flex;
  justify-content: center;
}

.phone-mockup {
  width: 220px;
  height: 380px;
  border: 10px solid #1e293b;
  border-radius: 36px;
  background: #f8fafc;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 20px 10px;
}

.phone-screen {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-bubble-mock {
  background: var(--primary-gradient);
  color: var(--white);
  padding: 8px 12px;
  font-size: 0.75rem;
  border-radius: 12px;
  border-bottom-right-radius: 2px;
  align-self: flex-end;
  max-width: 85%;
  animation: floatMock 3s ease-in-out infinite alternate;
}

.chat-bubble-mock.mock-bot {
  background: var(--white);
  color: var(--text-dark);
  border: 1px solid var(--border);
  border-radius: 12px;
  border-bottom-left-radius: 2px;
  align-self: flex-start;
  animation-delay: 0.5s;
}

@keyframes floatMock {
  0% { transform: translateY(0); }
  100% { transform: translateY(-4px); }
}

@media (max-width: 768px) {
  .booking-cta-card {
    grid-template-columns: 1fr;
    padding: 30px;
    gap: 30px;
  }
  .booking-cta-visual {
    display: none;
  }
  .chatbot-badge .badge-text {
    display: none; /* Icon-only on mobile screen */
  }
  .chatbot-badge {
    padding: 14px;
    border-radius: 50%;
  }
  .chatbot-card.floating-chat-window {
    bottom: 65px;
    right: -10px;
  }
}





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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-main);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text-dark);
  font-weight: 700;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

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

/* Scroll reveals */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Reusable UI Elements
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-spring);
  font-size: 0.95rem;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--primary-gradient);
  color: var(--white);
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px -8px rgba(13, 148, 136, 0.5);
}

.btn-primary:active {
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary-light);
  transform: translateY(-3px);
}

.btn-large {
  padding: 16px 32px;
  font-size: 1.05rem;
}

.btn-block {
  display: flex;
  width: 100%;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--primary-light);
  color: var(--primary);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(13, 148, 136, 0.15);
}

.gradient-text {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  display: inline-block;
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 12px;
  position: relative;
}

.section-subtitle::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--primary-gradient);
  margin-top: 6px;
}

.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 60px;
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */

.navbar {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1280px;
  z-index: 1000;
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: var(--transition);
}

.navbar.scrolled {
  top: 0;
  width: 100%;
  max-width: 100%;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  padding: 14px 40px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-md);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-gradient);
  color: var(--white);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-sm);
}

.logo-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--text-dark);
  letter-spacing: -0.03em;
}

.logo-text span {
  color: var(--primary);
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link-item {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  padding: 8px 4px;
  position: relative;
  transition: var(--transition);
}

.nav-link-item:hover {
  color: var(--primary);
}

.nav-link-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-gradient);
  transition: var(--transition);
}

.nav-link-item:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-dark);
  cursor: pointer;
  padding: 4px;
  align-items: center;
  justify-content: center;
}

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 320px;
  height: 100vh;
  background: var(--white);
  z-index: 1100;
  padding: 30px;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-drawer.open {
  transform: translateX(-100%);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}

.drawer-close {
  background: transparent;
  border: none;
  color: var(--text-dark);
  cursor: pointer;
  font-size: 1.5rem;
}

.drawer-links {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.drawer-link-item {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--text-dark);
  display: block;
  transition: var(--transition);
}

.drawer-link-item:hover {
  color: var(--primary);
  padding-left: 8px;
}

.drawer-footer {
  margin-top: auto;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
  padding: 160px 40px 100px;
  background: radial-gradient(circle at 80% 20%, rgba(13, 148, 136, 0.04) 0%, rgba(255, 255, 255, 0) 60%);
  overflow: hidden;
}

.hero-container {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 60px;
}

.hero-content .badge {
  margin-bottom: 24px;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  line-height: 1.1;
}

.hero-desc {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 580px;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 50px;
}

.trust-signals {
  display: flex;
  align-items: center;
  gap: 24px;
}

.avatar-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar-placeholder {
  width: 40px;
  height: 40px;
  background: #fef08a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--white);
  font-size: 1.2rem;
  box-shadow: var(--shadow-sm);
}

.avatar-placeholder-text {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-dark);
}

.divider-y {
  width: 1px;
  height: 40px;
  background-color: var(--border);
}

.stars {
  display: flex;
  gap: 4px;
  margin-bottom: 4px;
}

.star-filled {
  fill: #f59e0b;
  color: #f59e0b;
  width: 16px;
  height: 16px;
}

.rating-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.hero-visual {
  position: relative;
}

.image-wrapper {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: visible;
  padding: 10px;
}

.hero-img {
  width: 100%;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
  aspect-ratio: 4/3;
}

/* Floating Badges on Hero image */
.visual-card {
  position: absolute;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-lg);
  animation: float 6s ease-in-out infinite;
}

.floating-card-1 {
  top: 15%;
  left: -10%;
}

.floating-card-2 {
  bottom: 10%;
  right: -5%;
  animation-delay: 3s;
}

.visual-icon {
  width: 44px;
  height: 44px;
  background-color: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.visual-card h4 {
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.visual-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

/* ==========================================================================
   Stats Bar Section
   ========================================================================== */

.stats-bar {
  background-color: var(--white);
  padding: 40px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 10;
}

.stats-container {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.stat-item {
  text-align: center;
}

.stat-item h3 {
  font-size: clamp(2rem, 3.5vw, 3rem);
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  margin-bottom: 4px;
}

.stat-item p {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
}

/* ==========================================================================
   Services Section
   ========================================================================== */

.services-section {
  padding: 100px 40px;
  max-width: 1280px;
  margin: 0 auto;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}

.service-card {
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: var(--transition-spring);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background: var(--primary-gradient);
  transition: var(--transition);
}

.service-icon-bg {
  width: 60px;
  height: 60px;
  background-color: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 1.5rem;
  transition: var(--transition);
}

.service-card h3 {
  font-size: 1.25rem;
  margin-bottom: 14px;
  transition: var(--transition);
}

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

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--primary);
  font-size: 0.9rem;
  transition: var(--transition);
}

.service-link i {
  width: 16px;
  height: 16px;
  transition: var(--transition);
}

/* Hover effects for service cards */
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.service-card:hover::before {
  height: 100%;
}

.service-card:hover .service-icon-bg {
  background: var(--primary-gradient);
  color: var(--white);
  transform: rotate(6deg) scale(1.05);
}

.service-card:hover h3 {
  color: var(--primary);
}

.service-card:hover .service-link {
  color: var(--primary-hover);
}

.service-card:hover .service-link i {
  transform: translate(3px, -3px);
}

/* ==========================================================================
   Before/After Smile Gallery
   ========================================================================== */

.smile-gallery {
  background-color: var(--white);
  padding: 100px 40px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.gallery-container {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  align-items: center;
  gap: 60px;
}

.gallery-info h2 {
  font-size: clamp(2rem, 3.5vw, 2.5rem);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.gallery-info p {
  color: var(--text-muted);
  margin-bottom: 30px;
  line-height: 1.7;
}

.transformation-highlights {
  margin-bottom: 40px;
}

.transformation-highlights li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-weight: 600;
  color: var(--text-dark);
}

.transformation-highlights li i {
  color: var(--primary);
  width: 20px;
  height: 20px;
}

/* Custom Interactive Before/After Slider */
.gallery-slider {
  display: flex;
  justify-content: center;
}

.slider-image-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  aspect-ratio: 4/3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  user-select: none;
  container-type: inline-size;
}

.slider-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.img-before {
  z-index: 10;
}

.img-after-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%; /* initial visible width */
  height: 100%;
  overflow: hidden;
  z-index: 20;
}

.img-after-wrapper .img-after {
  width: 100cqw;
  max-width: none;
}

.label {
  position: absolute;
  bottom: 20px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  color: var(--white);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 30;
  pointer-events: none;
  white-space: nowrap;
}

.label-before {
  right: 20px;
}

.label-after {
  left: 20px;
}

.slider-handle {
  position: absolute;
  top: 0;
  left: 50%; /* initial handle position matching after wrapper width */
  width: 4px;
  height: 100%;
  background: var(--white);
  z-index: 40;
  cursor: ew-resize;
  transform: translateX(-50%);
}

.handle-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  color: var(--primary);
  border: 1px solid var(--border);
  transition: transform 0.2s ease;
}

.slider-handle:hover .handle-button {
  transform: translate(-50%, -50%) scale(1.1);
  color: var(--primary-hover);
}

/* ==========================================================================
   Meet the Team Section
   ========================================================================== */

.team-section {
  padding: 100px 40px;
  max-width: 1280px;
  margin: 0 auto;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 40px;
  justify-content: center;
}

.team-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  transition: var(--transition-spring);
}

.doctor-img-wrapper {
  background-color: var(--accent-light);
  overflow: hidden;
  height: 100%;
}

.doctor-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

.doctor-details {
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.doctor-details .specialty {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.doctor-details h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.doctor-details .bio {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 20px;
}

.doctor-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  background-color: var(--primary-light);
  color: var(--primary);
  padding: 6px 12px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}

.available-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px #10b981;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.5; }
  100% { transform: scale(0.9); opacity: 1; }
}

.team-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.team-card:hover .doctor-img {
  transform: scale(1.05);
}

/* ==========================================================================
   Appointment Booking Wizard
   ========================================================================== */

.booking-section {
  padding: 100px 40px;
  background: radial-gradient(circle at 10% 80%, rgba(2, 132, 199, 0.03) 0%, rgba(255, 255, 255, 0) 70%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.booking-container {
  max-width: 900px;
  margin: 0 auto;
}

.booking-header {
  text-align: center;
  margin-bottom: 50px;
}

.booking-header h2 {
  font-size: clamp(2rem, 3.5vw, 2.5rem);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.booking-header p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 30px;
}

/* Chatbot Card Wrapper */
.chatbot-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  height: 550px;
  overflow: hidden;
  max-width: 700px;
  margin: 0 auto;
}

/* Chat Header */
.chat-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  gap: 14px;
}

.chat-header-avatar {
  width: 44px;
  height: 44px;
  background: var(--primary-gradient);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(13, 148, 136, 0.2);
}

.chat-header-avatar i {
  width: 20px;
  height: 20px;
}

.chat-header-info h3 {
  font-size: 1.1rem;
  margin-bottom: 2px;
}

.chat-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: pulse 2s infinite;
}

/* Chat Messages Area */
.chat-messages-container {
  flex-grow: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background-color: #fafbfc;
  scrollbar-width: thin;
}

/* Message Bubbles */
.message {
  display: flex;
  flex-direction: column;
  max-width: 80%;
}

.message-bot {
  align-self: flex-start;
}

.message-user {
  align-self: flex-end;
}

.message-bubble {
  padding: 14px 18px;
  font-size: 0.95rem;
  line-height: 1.5;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  word-wrap: break-word;
}

.message-bot .message-bubble {
  background-color: var(--white);
  color: var(--text-dark);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border);
}

.message-user .message-bubble {
  background: var(--primary-gradient);
  color: var(--white);
  border-bottom-right-radius: 4px;
}

.message-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
  padding: 0 4px;
}

.message-user .message-time {
  align-self: flex-end;
}

/* Option suggestion list */
.chat-options-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.chat-option-btn {
  background-color: var(--white);
  border: 1px solid var(--primary);
  color: var(--primary);
  border-radius: 50px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-spring);
}

.chat-option-btn:hover {
  background-color: var(--primary-light);
  transform: translateY(-2px);
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  align-self: flex-start;
  box-shadow: var(--shadow-sm);
}

.typing-dot {
  width: 6px;
  height: 6px;
  background-color: var(--text-muted);
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: 200ms; }
.typing-dot:nth-child(2) { animation-delay: 300ms; }
.typing-dot:nth-child(3) { animation-delay: 400ms; }

@keyframes typing {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Chat Input Area */
.chat-input-area {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background-color: var(--white);
}

#chat-form {
  display: flex;
  gap: 12px;
  align-items: center;
}

#chat-input-field {
  flex-grow: 1;
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 14px 20px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: var(--transition);
  background-color: #f8fafc;
}

#chat-input-field:focus {
  border-color: var(--primary);
  background-color: var(--white);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

#btn-send-chat {
  width: 46px;
  height: 46px;
  background: var(--primary-gradient);
  color: var(--white);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-spring);
  box-shadow: var(--shadow-sm);
}

#btn-send-chat:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-glow);
}

#btn-send-chat i {
  width: 18px;
  height: 18px;
}


/* ==========================================================================
   Testimonials Slider Carousel
   ========================================================================== */

.testimonials-section {
  padding: 100px 40px;
  max-width: 1280px;
  margin: 0 auto;
}

.carousel-container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.carousel-track-wrapper {
  overflow: hidden;
  position: relative;
  width: 100%;
  border-radius: var(--radius-xl);
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  width: 100%;
}

.carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  padding: 50px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.carousel-slide .stars {
  margin-bottom: 24px;
}

.testimonial-quote {
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  font-style: italic;
  line-height: 1.7;
  color: var(--text-dark);
  margin-bottom: 30px;
  font-weight: 500;
}

.testimonial-author strong {
  display: block;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.1rem;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.testimonial-author span {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.carousel-btn {
  width: 44px;
  height: 44px;
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  color: var(--text-dark);
  transition: var(--transition);
}

.carousel-btn:hover {
  background-color: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.carousel-dots {
  display: flex;
  gap: 8px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--border);
  cursor: pointer;
  transition: var(--transition);
}

.carousel-dot.active {
  background-color: var(--primary);
  width: 20px;
  border-radius: 4px;
}

/* ==========================================================================
   FAQ Section Accordion
   ========================================================================== */

.faq-section {
  padding: 100px 40px;
  background-color: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.faq-accordion {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.faq-question {
  width: 100%;
  padding: 24px;
  background-color: var(--white);
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
}

.faq-question span {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-dark);
}

.faq-chevron {
  color: var(--text-muted);
  transition: transform 0.3s ease;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
  background-color: var(--bg-main);
  padding: 0 24px;
}

.faq-answer p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 24px; /* margins only when open */
}

/* FAQ active state */
.faq-item.open {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.faq-item.open .faq-question {
  background-color: var(--primary-light);
}

.faq-item.open .faq-question span {
  color: var(--primary);
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-item.open .faq-answer {
  max-height: 200px; /* high placeholder */
  padding: 24px 24px 0;
}

/* ==========================================================================
   Footer Section
   ========================================================================== */

.main-footer {
  background-color: var(--secondary);
  color: var(--white);
  padding: 80px 40px 40px;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr 1fr;
  gap: 50px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 60px;
  margin-bottom: 40px;
}

.footer-info .logo-text {
  color: var(--white);
  margin-bottom: 24px;
}

.footer-tagline {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 30px;
  max-width: 320px;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-icon {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  color: var(--white);
}

.social-icon i,
.social-icon svg {
  width: 18px;
  height: 18px;
  display: inline-block;
}

.social-icon:hover {
  background: var(--primary-gradient);
  transform: translateY(-3px);
}

.footer-grid h4 {
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 24px;
  font-weight: 700;
  position: relative;
}

.footer-grid h4::after {
  content: '';
  display: block;
  width: 25px;
  height: 2px;
  background-color: var(--primary);
  margin-top: 8px;
}

.footer-links-col ul {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-links-col ul a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  transition: var(--transition);
}

.footer-links-col ul a:hover {
  color: var(--primary);
  padding-left: 4px;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

.contact-list li i {
  color: var(--primary);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 3px;
}

.footer-newsletter p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 20px;
}

.newsletter-form {
  display: flex;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background-color: rgba(255, 255, 255, 0.05);
}

.newsletter-form input {
  flex-grow: 1;
  background: transparent;
  border: none;
  padding: 14px 18px;
  color: var(--white);
  font-family: inherit;
  font-size: 0.9rem;
}

.newsletter-form input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.newsletter-form button {
  background: var(--primary-gradient);
  border: none;
  padding: 0 20px;
  color: var(--white);
  cursor: pointer;
  transition: var(--transition);
}

.newsletter-form button:hover {
  background-color: var(--primary-hover);
}

.success-message {
  display: none;
  color: #10b981;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 10px;
  animation: fadeIn 0.3s ease;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom a {
  text-decoration: underline;
  transition: var(--transition);
}

.footer-bottom a:hover {
  color: var(--white);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */

@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }
  
  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .hero-ctas {
    justify-content: center;
  }
  
  .trust-signals {
    justify-content: center;
  }
  
  .floating-card-1 {
    left: 0;
  }
  
  .floating-card-2 {
    right: 0;
  }
  
  .stats-container {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .gallery-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .team-grid {
    grid-template-columns: 1fr;
    max-width: 600px;
    margin: 0 auto;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .navbar {
    top: 0;
    width: 100%;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
  }
  
  .nav-links, .nav-actions .nav-cta {
    display: none;
  }
  
  .mobile-toggle {
    display: flex;
  }
  
  .hero-section {
    padding: 120px 20px 60px;
  }

  .hero-ctas {
    flex-direction: column;
    width: 100%;
  }
  
  .hero-ctas .btn {
    width: 100%;
  }
  
  .trust-signals {
    flex-direction: column;
    gap: 15px;
  }
  
  .visual-card {
    display: none;
  }

  /* Grid Layouts Stack */
  .features-grid,
  .services-grid,
  .transformations-container,
  .convo-demo-container,
  .team-grid,
  .stats-container,
  .services-selector-grid,
  .dentist-selector-grid,
  .form-row,
  .summary-details {
    grid-template-columns: 1fr;
  }

  /* Specific Layout Overrides */
  .time-slots-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .carousel-slide {
    padding: 30px 20px;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* Fix overflowing elements */
  .chatbot-widget-container {
    bottom: 15px;
    right: 15px;
  }

  .section-header h2 {
    font-size: 2rem;
  }
}

