/* Modern Design System - The Women's Health Solution */
:root {
  --primary: #C87D8B;
  --primary-hover: #B56C7A;
  --primary-light: #F7EBEF;
  --secondary: #2A1D2B;
  --secondary-light: #3D2C3F;
  --accent-sage: #4E7C69;
  --accent-sage-light: #EBF4F0;
  --bg-main: #FAF4F5;
  --bg-surface: #FFFFFF;
  --text-dark: #1F1521;
  --text-muted: #6B5B6D;
  --border-light: #EBDCE0;
  --emergency-red: #D93838;
  --emergency-bg: #FDF2F2;
  --shadow-sm: 0 4px 12px rgba(42, 29, 43, 0.05);
  --shadow-md: 0 8px 24px rgba(42, 29, 43, 0.08);
  --shadow-lg: 0 16px 40px rgba(42, 29, 43, 0.12);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Header & Top Bar */
.top-emergency-bar {
  background-color: var(--emergency-bg);
  color: var(--emergency-red);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 8px 24px;
  text-align: center;
  border-bottom: 1px solid rgba(217, 56, 56, 0.15);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.main-navbar {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-light);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--secondary);
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: var(--shadow-sm);
}

.brand-text h1 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-text p {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  outline: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 14px rgba(200, 125, 139, 0.35);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(200, 125, 139, 0.45);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border-light);
  color: var(--secondary);
}

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

.btn-dark {
  background: var(--secondary);
  color: white;
}

.btn-dark:hover {
  background: var(--secondary-light);
}

/* Hero Section */
.hero-section {
  padding: 64px 32px;
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-light);
  color: var(--primary);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3.25rem;
  line-height: 1.15;
  color: var(--secondary);
  margin-bottom: 20px;
}

.hero-title span {
  color: var(--primary);
  font-style: italic;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 540px;
}

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

.hero-stats {
  display: flex;
  gap: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
}

.stat-item h3 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  color: var(--secondary);
}

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

.hero-image-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #EAD7DC, #D4B3BC);
}

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

.hero-card-overlay {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.doctor-info-mini {
  display: flex;
  align-items: center;
  gap: 12px;
}

.doctor-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* Sections */
.section-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 32px;
}

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

.section-tag {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  color: var(--secondary);
  margin-bottom: 12px;
}

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

/* Grid Layouts */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 28px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.service-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 20px;
}

.service-card h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--secondary);
  margin-bottom: 10px;
}

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

/* Insurance Tool */
.insurance-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-sm);
}

.insurance-search-bar {
  max-width: 500px;
  margin: 0 auto 32px auto;
  position: relative;
}

.insurance-search-bar input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-light);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.insurance-search-bar input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.insurance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.insurance-pill {
  background: var(--bg-main);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.insurance-name {
  font-weight: 600;
  font-size: 0.925rem;
  color: var(--secondary);
}

.insurance-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--accent-sage-light);
  color: var(--accent-sage);
}

/* Clinic Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.info-card {
  background: var(--bg-surface);
  padding: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.info-card h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--secondary);
}

.hours-list {
  list-style: none;
}

.hours-list li {
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-light);
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
}

.hours-list li:last-child {
  border-bottom: none;
}

/* Floating AI Chat Assistant Widget */
.chat-launcher-btn {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 14px 24px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(200, 125, 139, 0.4);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  z-index: 999;
  transition: var(--transition);
}

.chat-launcher-btn:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 14px 40px rgba(200, 125, 139, 0.5);
}

.pulse-dot {
  width: 10px;
  height: 10px;
  background: #4ADE80;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(74, 222, 128, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

/* Chat Drawer / Modal Container */
.chat-widget-window {
  position: fixed;
  bottom: 100px;
  right: 32px;
  width: 420px;
  height: 640px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 120px);
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: var(--transition);
}

.chat-widget-window.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.chat-widget-window.fullscreen {
  bottom: 0;
  right: 0;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  border-radius: 0;
}

.chat-header {
  background: var(--secondary);
  color: white;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.chat-title h4 {
  font-size: 0.95rem;
  font-weight: 700;
}

.chat-title p {
  font-size: 0.725rem;
  opacity: 0.8;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: var(--transition);
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

/* Chat Body & Messages */
.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bg-main);
}

.chat-bubble {
  max-width: 85%;
  padding: 14px 18px;
  border-radius: 18px;
  font-size: 0.925rem;
  line-height: 1.5;
  animation: fadeIn 0.25s ease-out;
}

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

.chat-bubble.assistant {
  align-self: flex-start;
  background: white;
  color: var(--text-dark);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.chat-bubble.user {
  align-self: flex-end;
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 4px;
}

.chat-bubble.emergency {
  background: var(--emergency-bg);
  border: 1.5px solid var(--emergency-red);
  color: #8D1D1D;
}

.quick-actions-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.quick-pill {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(200, 125, 139, 0.3);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.quick-pill:hover {
  background: var(--primary);
  color: white;
}

/* Chat Input Footer */
.chat-footer {
  padding: 14px 16px;
  background: white;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-footer input {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  font-size: 0.9rem;
  outline: none;
}

.chat-footer input:focus {
  border-color: var(--primary);
}

.send-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.send-btn:hover {
  background: var(--primary-hover);
}

/* Modals & Sandbox Drawer */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(31, 21, 33, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-card {
  background: white;
  border-radius: var(--radius-lg);
  width: 600px;
  max-width: 90vw;
  max-height: 85vh;
  overflow-y: auto;
  padding: 32px;
  box-shadow: var(--shadow-lg);
  position: relative;
}

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

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--secondary);
}

.code-box {
  background: var(--secondary);
  color: #E2E8F0;
  padding: 16px;
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: 0.85rem;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 260px;
  overflow-y: auto;
}

/* Responsive queries */
@media (max-width: 900px) {
  .hero-section {
    grid-template-columns: 1fr;
    padding: 40px 20px;
  }
  .info-grid {
    grid-template-columns: 1fr;
  }
  .main-navbar {
    padding: 16px 20px;
  }
  .nav-links {
    display: none;
  }
}
