:root {
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-deep: #1d4ed8;
  --primary-light: rgba(59, 130, 246, 0.1);
  --success: #10b981;
  --success-hover: #059669;
  --accent: #111827;
  --gold: #f59e0b;
  --bg: #f9fafb;
  --surface: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;
  --text: #111827;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --font-sans: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Top Utility Bar */
.top-utility {
  background: #111827;
  color: #e5e7eb;
  font-size: 13px;
  padding: 6px 0;
}

.utility-inner {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.utility-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.lang-pills, .currency-pills {
  display: flex;
  background: rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.pill-btn {
  background: transparent;
  border: none;
  color: #d1d5db;
  padding: 4px 9px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.15s;
}

.pill-btn:hover {
  color: #fff;
  background: rgba(255,255,255,0.12);
}

.pill-btn.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

/* Main Sticky Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  gap: 16px;
  flex-wrap: wrap;
}

.brand-box {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.25);
}

.brand-title-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.brand-main {
  font-size: 21px;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.3px;
}

.brand-by {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 8px;
  border-radius: 99px;
}

.brand-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.main-nav {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.nav-btn {
  background: transparent;
  border: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.2s;
}

.nav-btn:hover {
  background: var(--gray-100);
  color: var(--primary);
}

.nav-btn.active {
  background: var(--primary);
  color: #fff;
}

.nav-btn.admin-toggle {
  border: 1px dashed var(--primary);
  color: var(--primary);
}

.nav-btn.admin-toggle.active {
  background: #1e3a8a;
  color: #fff;
  border-style: solid;
}

/* ==========================================================================
   HOME.VUE DESIGN SYSTEM: Full-Bleed Carousel + 896px Search Box + Hospital Cards
   ========================================================================== */
.carousel-section {
  position: relative;
  height: 460px;
  overflow: hidden;
  background: #0f2942;
}

@media (max-width: 768px) {
  .carousel-section {
    height: 280px;
  }
}

.carousel-container {
  position: relative;
  height: 100%;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.carousel-slide.active {
  opacity: 1;
  pointer-events: auto;
}

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

.carousel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(17, 24, 39, 0.78) 0%, rgba(30, 58, 138, 0.52) 55%, rgba(0, 0, 0, 0.15) 100%);
}

.carousel-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.carousel-text {
  max-width: 640px;
  color: #fff;
}

.carousel-badge {
  display: inline-block;
  background: rgba(59, 130, 246, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 14px;
}

.carousel-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
  line-height: 1.25;
}

.carousel-subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  margin-bottom: 24px;
}

.carousel-indicators {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}

.indicator-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.35);
  transition: all 0.3s ease;
  cursor: pointer;
}

.indicator-dot.active {
  background: rgba(255, 255, 255, 0.95);
  transform: scale(1.15);
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 5;
}

.carousel-nav:hover {
  background: rgba(255, 255, 255, 0.35);
}

.carousel-nav.prev { left: 20px; }
.carousel-nav.next { right: 20px; }
.carousel-nav svg { width: 24px; height: 24px; }

/* Search Section (from home.vue) */
.search-section {
  background: #ffffff;
  padding: 40px 0;
  border-bottom: 1px solid var(--gray-100);
}

.search-container {
  max-width: 896px;
  margin: 0 auto;
}

.search-box {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
  padding: 24px;
}

.search-wrapper {
  display: flex;
  gap: 16px;
}

.search-input-wrapper {
  flex: 1;
  position: relative;
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--gray-400);
  display: flex;
}

.search-icon svg {
  width: 20px;
  height: 20px;
}

.search-input {
  width: 100%;
  padding: 12px 16px 12px 48px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  outline: none;
  font-size: 15px;
  transition: all 0.3s ease;
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.search-button {
  padding: 12px 28px;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.search-button:hover {
  background: var(--primary-hover);
}

/* Hospitals Section (from home.vue) */
.hospitals-section {
  background: var(--gray-50);
  padding: 48px 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-900);
}

.section-desc {
  font-size: 14px;
  color: var(--gray-500);
  margin-top: 4px;
}

.filter-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 16px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--gray-700);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
}

.filter-btn:hover {
  background: var(--gray-50);
  border-color: var(--primary);
  color: var(--primary);
}

.filter-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.hospitals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 32px;
  align-items: start;
}

@media (max-width: 1024px) {
  .hospitals-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hospitals-grid { grid-template-columns: 1fr; }
}

.hospital-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(229, 231, 235, 0.7);
}

.hospital-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-3px);
}

.hospital-image {
  height: 192px;
  background: var(--gray-200);
  position: relative;
  overflow: hidden;
}

.hospital-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hospital-card:hover .hospital-image img {
  transform: scale(1.03);
}

.hospital-info {
  padding: 20px 24px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hospital-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
}

.hospital-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gray-900);
  width: 100%;
  line-height: 1.4;
}

.hospital-tag {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  line-height: 1.4;
}

.hospital-description {
  color: var(--gray-600);
  margin-bottom: 16px;
  font-size: 0.875rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hospital-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-100);
}

.hospital-location {
  display: flex;
  align-items: center;
  color: var(--gray-500);
  font-size: 0.85rem;
}

.hospital-location svg {
  width: 16px;
  height: 16px;
  margin-right: 4px;
  flex-shrink: 0;
  color: var(--primary);
}

.booking-btn {
  padding: 8px 16px;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

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

/* ==========================================================================
   HOSPITALDETAIL.VUE DESIGN SYSTEM: Subheader + 384px Banner + Intro + Dynamics + Fixed Footer
   ========================================================================== */
.subpage-header {
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid var(--gray-200);
}

.subpage-header__container {
  max-width: 1280px;
  margin: 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.subpage-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--gray-600);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 6px;
  transition: all 0.2s;
}

.subpage-back-btn:hover {
  color: var(--gray-900);
  background: var(--gray-100);
}

.subpage-header__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--gray-900);
}

.hospital-banner {
  position: relative;
  height: 360px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hospital-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.68) 0%, rgba(0, 0, 0, 0.12) 100%);
}

.hospital-banner__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px;
}

.hospital-banner__title {
  font-size: 32px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 14px;
}

.hospital-banner__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hospital-level-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
}

.hospital-address {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ffffff;
  font-size: 14px;
}

.hospital-intro,
.hospital-dynamics {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  padding: 28px;
  margin-bottom: 28px;
  border: 1px solid var(--gray-200);
}

.hospital-dynamics__list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hospital-article {
  display: flex;
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
  background: #ffffff;
}

.hospital-article:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.hospital-article__img {
  width: 340px;
  height: 188px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.hospital-article__body {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hospital-article__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.hospital-article__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--gray-900);
}

.hospital-article__date {
  font-size: 12px;
  color: var(--gray-500);
  white-space: nowrap;
}

.hospital-article__content {
  font-size: 14px;
  color: var(--gray-600);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 768px) {
  .hospital-article {
    flex-direction: column;
  }
  .hospital-article__img {
    width: 100%;
    height: 190px;
  }
}

.appointment-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #ffffff;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
  border-top: 1px solid var(--gray-200);
  z-index: 80;
}

.appointment-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  justify-content: center;
}

.appointment-btn {
  width: 100%;
  max-width: 380px;
  background: var(--primary-hover);
  color: #ffffff;
  font-weight: 600;
  font-size: 16px;
  padding: 14px 24px;
  border: none;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
}

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

/* ==========================================================================
   DEPARTMENTLIST.VUE DESIGN SYSTEM: 896px Search + Left Sidebar (340px) + Right Content
   ========================================================================== */
.dept-search-section {
  padding: 24px 0;
  background-color: var(--gray-50);
}

.dept-search-wrapper {
  position: relative;
  max-width: 896px;
  margin: 0 auto;
  height: 50px;
  background-color: #ffffff;
  border: 1px solid var(--gray-300);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  padding: 0 18px;
  gap: 10px;
}

.dept-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  color: var(--gray-900);
  background: transparent;
}

.dept-main-content {
  display: flex;
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  min-height: 540px;
  margin-bottom: 48px;
}

.department-sidebar {
  width: 340px;
  background-color: var(--gray-50);
  border-right: 1px solid var(--gray-200);
  flex-shrink: 0;
}

.department-categories {
  padding: 12px;
}

.category-item {
  padding: 14px 16px;
  margin-bottom: 6px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  border-left: 4px solid transparent;
}

.category-item:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

.category-item.active {
  background-color: #ffffff;
  border-left-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.category-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-700);
}

.category-item.active .category-name {
  color: var(--gray-900);
}

.department-content {
  flex: 1;
  background-color: #ffffff;
  padding: 28px;
}

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

.department-card {
  background-color: #ffffff;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 22px;
  transition: all 0.2s;
}

.department-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
  border-color: var(--gray-300);
}

@media (max-width: 900px) {
  .dept-main-content {
    flex-direction: column;
  }
  .department-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--gray-200);
  }
}

/* ==========================================================================
   HOSPITALDYNAMIC.VUE DESIGN SYSTEM: 800px Centered Article Reader
   ========================================================================== */
.dynamic-reader-container {
  max-width: 800px;
  margin: 32px auto 64px;
  background: #ffffff;
  padding: 36px;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}

.article-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
  line-height: 1.35;
}

.article-date {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 24px;
}

.article-image {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 24px;
}

.article-content {
  font-size: 16px;
  line-height: 1.85;
  color: var(--gray-700);
  white-space: pre-line;
}

/* ==========================================================================
   FLOATING ACTION BUTTONS & FLOATING CHAT WITH PHONE POPUP (from home.vue)
   ========================================================================== */
.floating-buttons {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 40;
}

.floating-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: none;
  border-radius: var(--radius-sm);
  color: #ffffff;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 600;
}

.floating-btn.booking {
  background: var(--primary);
}
.floating-btn.booking:hover {
  background: var(--primary-hover);
  transform: translateX(-2px);
}

.floating-btn.appointment {
  background: var(--success);
}
.floating-btn.appointment:hover {
  background: var(--success-hover);
  transform: translateX(-2px);
}

.floating-btn svg {
  width: 20px;
  height: 20px;
}

.floating-chat {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 95;
}

.chat-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: #1d4ed8;
  color: #ffffff;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: var(--shadow-xl);
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 600;
}

.chat-btn:hover {
  background: #1e40af;
}

.chat-btn svg {
  width: 22px;
  height: 22px;
}

.phone-popup {
  position: absolute;
  bottom: calc(100% + 12px);
  right: 0;
  transform: translateY(8px) scale(0.95);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  color: var(--gray-900);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  white-space: nowrap;
  z-index: 41;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.floating-chat:hover .phone-popup {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.phone-popup .phone-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
}

.phone-popup .phone-item svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
  flex-shrink: 0;
}

/* Footer (from home.vue) */
.footer {
  background: #ffffff;
  border-top: 1px solid var(--gray-200);
  margin-top: 48px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  flex-wrap: wrap;
  gap: 12px;
}

.copyright {
  color: var(--gray-600);
  font-size: 14px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-link {
  color: var(--gray-600);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--gray-900);
}

/* ==========================================================================
   COMMON CARDS, BUTTONS, MODALS, AND CHAT DRAWER
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-white {
  background: #fff;
  color: var(--primary-deep);
}
.btn-white:hover {
  background: #f3f4f6;
}

.btn-gold {
  background: var(--gold);
  color: #fff;
}

.btn-outline {
  background: #fff;
  border-color: var(--gray-300);
  color: var(--gray-700);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin: 32px 0 18px;
  gap: 12px;
  flex-wrap: wrap;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (max-width: 980px) {
  .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

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

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.badge-teal { background: rgba(59, 130, 246, 0.1); color: var(--primary); }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-amber { background: #fef3c7; color: #b45309; }
.badge-green { background: #d1fae5; color: #065f46; }
.badge-purple { background: #ede9fe; color: #5b21b6; }

.price-box {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin: 10px 0;
}

.price-main {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}

.price-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.filter-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.input, .select, .textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}

.textarea {
  min-height: 80px;
  resize: vertical;
}

.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--gray-700);
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: var(--shadow-xl);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
  margin-bottom: 16px;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 10px;
}

.slot-item {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  cursor: pointer;
  transition: all 0.15s;
}

.slot-item:hover {
  border-color: var(--primary);
}

.slot-item.selected {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.06);
}

/* Chat Drawer (Opened from bottom-right .floating-chat) */
.chat-drawer {
  width: 400px;
  max-width: calc(100vw - 32px);
  height: 540px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-bottom: 12px;
}

.chat-header {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  padding: 14px 16px;
}

.im-bar {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.im-chip {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 99px;
  background: #fff;
  border: 1px solid var(--gray-300);
  color: var(--gray-700);
  text-decoration: none;
  white-space: nowrap;
  font-weight: 600;
  cursor: pointer;
}

.chat-body {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--gray-50);
}

.msg-bubble {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
}

.msg-patient {
  align-self: flex-end;
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 2px;
}

.msg-admin {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 2px;
}

.msg-trans {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255,255,255,0.35);
  font-size: 12px;
  opacity: 0.95;
}

.msg-admin .msg-trans {
  border-top-color: var(--border);
  color: var(--primary-deep);
}

.chat-footer {
  padding: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  background: #fff;
}

.chat-img-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

@media (max-width: 640px) {
  .chat-img-compare {
    grid-template-columns: 1fr;
  }
}

.chat-img-box {
  background: #ffffff;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  padding: 6px;
  color: var(--gray-900);
}

.chat-img-box img {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  border-radius: 6px;
  background: var(--gray-50);
  display: block;
}

.chat-img-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-600);
  margin-bottom: 4px;
}

/* ==========================================================================
   MOBILE-FIRST RESPONSIVE OVERHAUL & APP BOTTOM TAB BAR (<768px)
   ========================================================================== */
.mobile-bottom-nav {
  display: none;
}

.pill-btn {
  white-space: nowrap;
}

@media (max-width: 768px) {
  body {
    padding-bottom: 66px;
  }

  .container {
    padding: 0 14px;
  }

  /* 1. Compact Single-Row Horizontal Scroll Top Utility Bar */
  .top-utility {
    padding: 5px 0;
  }

  .utility-inner {
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .utility-inner::-webkit-scrollbar {
    display: none;
  }

  .utility-controls {
    flex-wrap: nowrap;
    gap: 6px;
    width: max-content;
  }

  #demo-user-switcher {
    max-width: 148px;
    font-size: 11px !important;
    padding: 2px 6px !important;
    height: 26px !important;
  }

  .lang-pills, .currency-pills {
    flex-wrap: nowrap;
    flex-shrink: 0;
  }

  .pill-btn {
    padding: 3px 7px;
    font-size: 11px;
    white-space: nowrap;
  }

  /* 2. Ultra-Clean 52px Sticky Brand Header (Move Navigation to Bottom App Bar) */
  .header-inner {
    padding: 8px 0;
    gap: 8px;
  }

  .brand-logo {
    width: 34px;
    height: 34px;
    font-size: 14px;
    border-radius: 8px;
  }

  .brand-main {
    font-size: 18px;
  }

  .brand-by {
    font-size: 10px;
    padding: 1px 6px;
  }

  .brand-sub {
    display: none;
  }

  .main-nav {
    display: none;
  }

  /* 3. Hide Desktop Floating Buttons on Mobile (Integrated into Bottom Tab Bar) */
  .floating-buttons {
    display: none !important;
  }

  .floating-chat > .chat-btn,
  .floating-chat > .phone-popup {
    display: none !important;
  }

  /* 4. App-Style Bottom Navigation Bar */
  .mobile-bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 60px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--gray-200);
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
    z-index: 110;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .m-nav-item {
    border: none;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--gray-500);
    cursor: pointer;
    padding: 4px 2px;
    transition: all 0.15s ease;
  }

  .m-nav-item .m-nav-icon {
    font-size: 18px;
    line-height: 1.1;
  }

  .m-nav-item .m-nav-label {
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 68px;
  }

  .m-nav-item.active {
    color: var(--primary);
  }

  .m-nav-item.m-nav-chat .m-nav-icon {
    background: var(--primary);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.35);
  }

  /* 5. Proportionate Mobile Hero Carousel (No Text Clipping) */
  .carousel-section {
    height: 220px;
  }

  .carousel-overlay {
    background: linear-gradient(to right, rgba(15, 23, 42, 0.86) 0%, rgba(30, 58, 138, 0.68) 70%, rgba(15, 23, 42, 0.4) 100%);
  }

  .carousel-badge {
    font-size: 10px;
    padding: 2px 9px;
    margin-bottom: 6px;
  }

  .carousel-title {
    font-size: 17px;
    line-height: 1.32;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .carousel-subtitle {
    font-size: 12px;
    line-height: 1.45;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .carousel-nav {
    display: none;
  }

  .carousel-indicators {
    bottom: 10px;
  }

  .indicator-dot {
    width: 8px;
    height: 8px;
  }

  /* 6. Compact Mobile Search & Filter Sections */
  .search-section {
    padding: 14px 0;
  }

  .search-box {
    padding: 10px;
    border-radius: 12px;
  }

  .search-wrapper {
    gap: 8px;
  }

  .search-input {
    padding: 9px 10px 9px 36px;
    font-size: 13px;
  }

  .search-icon {
    left: 11px;
  }

  .search-button {
    padding: 9px 14px;
    font-size: 13px;
  }

  .hospitals-section {
    padding: 20px 0 32px;
  }

  .section-header {
    margin-bottom: 16px;
    gap: 10px;
  }

  .section-title {
    font-size: 1.25rem;
  }

  .filter-buttons {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    gap: 8px;
  }

  .filter-btn {
    padding: 6px 12px;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* 7. Department Sidebar as Horizontal Scroll Chips on Mobile */
  .department-categories {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 10px 12px;
    white-space: nowrap;
  }

  .category-item {
    margin-bottom: 0;
    padding: 8px 14px;
    border-left: none;
    border-bottom: 3px solid transparent;
    flex-shrink: 0;
    background: #fff;
  }

  .category-item.active {
    border-left-color: transparent;
    border-bottom-color: var(--primary);
    background: var(--primary-light);
  }

  .category-name {
    font-size: 13px;
  }

  .department-content {
    padding: 14px;
  }

  .department-card {
    padding: 14px;
  }

  /* 8. Full-Width Bottom-Sheet Chat Drawer on Mobile */
  .floating-chat {
    right: 0;
    left: 0;
    bottom: 60px;
    z-index: 115;
  }

  .chat-drawer {
    width: 100vw;
    max-width: 100vw;
    height: calc(100vh - 116px);
    margin-bottom: 0;
    border-radius: 16px 16px 0 0;
    border-bottom: none;
  }

  /* 9. Hospital Detail Fixed Footer Above Mobile Tab Bar */
  .appointment-footer {
    bottom: 60px;
  }
}
