/*
  Dr. Vinu Raj — Spine & Orthopaedic Surgeon
  Static site stylesheet (works alongside the Tailwind CDN build + inline config in each page)
*/

:root {
  --background: 0 0% 100%;
  --foreground: 240 10% 3.9%;
  --primary: 211 74% 40%;
  --primary-foreground: 0 0% 100%;
  --secondary: 200 40% 96%;
  --secondary-foreground: 211 74% 30%;
  --muted: 210 30% 96%;
  --muted-foreground: 215 20% 45%;
  --accent: 178 62% 42%;
  --accent-foreground: 0 0% 100%;
  --radius: 1rem;
}

* {
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Manrope", sans-serif;
  overflow-x: clip;
  color: hsl(215 35% 16%);
  background: #fff;
}

.font-display {
  font-family: "Fraunces", serif;
}

/* Scroll-margin so anchored sections aren't hidden under the fixed navbar */
section[id] {
  scroll-margin-top: 5.5rem;
}

.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* Reveal-on-scroll (replaces framer-motion "whileInView") */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* FAQ accordion */
.faq-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}
.faq-panel > div { overflow: hidden; }
.faq-item.open .faq-panel { grid-template-rows: 1fr; }
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-chevron { transition: transform 0.25s ease; }

/* Mobile nav */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.mobile-menu.open {
  max-height: 28rem;
}

/* Floating action buttons — expand on hover to show label */
.fab {
  overflow: hidden;
  transition: width 0.3s ease;
}
.fab .fab-label {
  display: none;
  white-space: nowrap;
}
.fab:hover {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  width: auto;
}
.fab:hover .fab-label {
  display: inline;
}

/* ---------------- Chatbot widget ---------------- */
.chatbot-window {
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.chatbot-window.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.chat-scroll {
  scrollbar-width: thin;
  scrollbar-color: hsl(var(--primary) / 0.3) transparent;
}
.chat-scroll::-webkit-scrollbar { width: 6px; }
.chat-scroll::-webkit-scrollbar-thumb {
  background: hsl(var(--primary) / 0.25);
  border-radius: 999px;
}

.chat-bubble-bot {
  background: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  border-radius: 1rem 1rem 1rem 0.25rem;
}
.chat-bubble-user {
  background: hsl(var(--primary));
  color: #fff;
  border-radius: 1rem 1rem 0.25rem 1rem;
}

.chat-option-btn {
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.chat-option-btn:hover {
  background: hsl(var(--primary));
  color: #fff;
  border-color: hsl(var(--primary));
  transform: translateX(2px);
}

.typing-dot {
  animation: typingBounce 1.2s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

@media (max-width: 420px) {
  .chatbot-window {
    width: calc(100vw - 2rem) !important;
    right: -0.25rem;
  }
}

/* Blog article prose */
.article-prose h2 {
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 1.5rem;
  color: hsl(215 35% 16%);
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
}
.article-prose p {
  margin-bottom: 1.25rem;
  line-height: 1.8;
  color: hsl(var(--muted-foreground));
}
.article-prose ul {
  margin: 0 0 1.5rem 0;
  display: grid;
  gap: 0.6rem;
}
.article-prose blockquote {
  border-left: 3px solid hsl(var(--accent));
  background: hsl(var(--secondary) / 0.6);
  border-radius: 0 1rem 1rem 0;
  padding: 1.25rem 1.5rem;
  font-family: "Fraunces", serif;
  font-size: 1.15rem;
  color: hsl(var(--primary));
  margin: 1.75rem 0;
}
