/* ==========================================================================
   BBU Hospital Project - Comprehensive Modern Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Color Palette - Light Mode */
  --bg-primary: #f4f7fb;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-glass: rgba(255, 255, 255, 0.75);
  --bg-overlay: rgba(11, 23, 42, 0.6);
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --brand-navy: #0b1e36;
  --brand-blue: #0284c7;
  --brand-teal: #0d9488;
  --brand-mint: #10b981;
  --brand-cyan: #06b6d4;
  
  --accent-red: #ef4444;
  --accent-amber: #f59e0b;
  --accent-purple: #8b5cf6;
  --accent-emerald: #10b981;
  --accent-blue: #3b82f6;

  --border-light: rgba(226, 232, 240, 0.8);
  --border-glass: rgba(255, 255, 255, 0.4);
  
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 25px 50px -12px rgba(15, 23, 42, 0.15);
  --shadow-glow: 0 0 25px rgba(13, 148, 136, 0.25);
  
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Theme Overrides */
[data-theme="dark"] {
  --bg-primary: #070d19;
  --bg-secondary: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.85);
  --bg-glass: rgba(15, 23, 42, 0.75);
  --bg-overlay: rgba(2, 6, 23, 0.85);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  
  --brand-navy: #1e293b;
  --brand-blue: #38bdf8;
  --brand-teal: #14b8a6;
  --brand-mint: #34d399;
  
  --border-light: rgba(51, 65, 85, 0.7);
  --border-glass: rgba(255, 255, 255, 0.08);
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 25px 50px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 30px rgba(20, 184, 166, 0.35);
}

/* Reset & Global Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.25;
}

.gradient-text {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Utility Containers */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-padding {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3.5rem auto;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(13, 148, 136, 0.12);
  color: var(--brand-teal);
  border: 1px solid rgba(13, 148, 136, 0.2);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: rgba(13, 148, 136, 0.4);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--brand-teal);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-teal), var(--brand-blue));
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(13, 148, 136, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(13, 148, 136, 0.45);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-main);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background: var(--bg-primary);
  border-color: var(--brand-teal);
  color: var(--brand-teal);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.5);
}

.btn-icon {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: var(--radius-full);
}

/* Top Emergency Announcement Bar */
.top-bar {
  background: var(--brand-navy);
  color: #ffffff;
  font-size: 0.875rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.top-bar-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.top-bar-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #cbd5e1;
}

.top-bar-item i {
  color: var(--brand-cyan);
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle-btn, .lang-toggle-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: background var(--transition-fast);
}

.theme-toggle-btn:hover, .lang-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.sos-pulse-btn {
  background: var(--accent-red);
  color: #ffffff;
  font-weight: 700;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  animation: pulse-red 2s infinite;
  border: none;
  cursor: pointer;
}

@keyframes pulse-red {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Navigation Header */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  transition: all var(--transition-normal);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--text-main);
}

.brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--brand-teal), var(--brand-blue));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.4rem;
  box-shadow: var(--shadow-glow);
}

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

.nav-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--brand-teal);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--brand-teal);
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mobile-nav-toggle {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
}

/* Hero Section */
.hero {
  position: relative;
  padding: 6rem 0 4rem 0;
  overflow: hidden;
  background: radial-gradient(circle at 10% 20%, rgba(13, 148, 136, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 90% 80%, rgba(2, 132, 199, 0.08) 0%, transparent 50%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1.2rem;
  background: rgba(13, 148, 136, 0.1);
  border: 1px solid rgba(13, 148, 136, 0.25);
  border-radius: var(--radius-full);
  color: var(--brand-teal);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 3.25rem;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -0.03em;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.hero-features {
  display: flex;
  gap: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}

.hero-feature-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-main);
}

.hero-feature-item i {
  color: var(--brand-mint);
}

.hero-visual {
  position: relative;
}

.hero-image-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-glass);
}

.hero-image-wrapper img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  display: block;
}

.floating-card {
  position: absolute;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  z-index: 10;
}

.floating-card-1 {
  bottom: 20px;
  left: -30px;
  animation: float-anim 4s ease-in-out infinite;
}

.floating-card-2 {
  top: 30px;
  right: -20px;
  animation: float-anim 5s ease-in-out infinite reverse;
}

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

.icon-box-sm {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* Stats Counter Ribbon */
.stats-ribbon {
  background: var(--brand-navy);
  color: #ffffff;
  padding: 3rem 0;
  border-radius: var(--radius-lg);
  margin-top: -2rem;
  position: relative;
  z-index: 20;
  box-shadow: var(--shadow-lg);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stat-item {
  position: relative;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--brand-cyan);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  font-size: 0.95rem;
  color: #cbd5e1;
  font-weight: 500;
}

/* Departments Section */
.department-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}

.dept-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.dept-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--dept-color, var(--brand-teal));
  transition: width var(--transition-fast);
}

.dept-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-teal);
}

.dept-card:hover::before {
  width: 8px;
}

.dept-header {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 1.25rem;
}

.dept-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: rgba(13, 148, 136, 0.1);
  color: var(--brand-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.dept-title {
  font-size: 1.35rem;
  font-weight: 700;
}

.dept-headcount {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.dept-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.dept-services-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.dept-services-list li {
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
}

.dept-services-list li i {
  color: var(--brand-teal);
  font-size: 0.8rem;
}

.dept-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

.dept-lead {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Doctors Directory Section */
.doctor-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 3rem;
  background: var(--bg-card);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 280px;
}

.search-box input {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 2.8rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  outline: none;
  transition: border-color var(--transition-fast);
}

.search-box input:focus {
  border-color: var(--brand-teal);
}

.search-box i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.filter-pills {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-full);
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-pill:hover, .filter-pill.active {
  background: var(--brand-teal);
  color: #ffffff;
  border-color: var(--brand-teal);
}

.doctor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.doctor-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-normal);
  position: relative;
}

.doctor-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-teal);
}

.doctor-image-box {
  position: relative;
  height: 240px;
  overflow: hidden;
  background: var(--brand-navy);
}

.doctor-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

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

.doctor-badge-rating {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.doctor-badge-rating i {
  color: var(--accent-amber);
}

.doctor-body {
  padding: 1.5rem;
}

.doctor-name {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.doctor-title {
  color: var(--brand-teal);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.doctor-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.doctor-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.doctor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}

/* Bed & ICU Live Availability Dashboard */
.bed-dashboard {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}

.bed-dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand-mint);
  text-transform: uppercase;
}

.live-dot {
  width: 10px;
  height: 10px;
  background: var(--brand-mint);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--brand-mint);
  animation: pulse-green 1.5s infinite;
}

@keyframes pulse-green {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

.bed-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.bed-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.bed-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bed-meter {
  height: 10px;
  background: rgba(148, 163, 184, 0.2);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.bed-meter-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 1s ease-in-out;
}

.bed-stats-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.bed-stat-val {
  font-weight: 700;
  color: var(--text-main);
}

/* Health Assessment Tool (BMI & Heart Risk) */
.health-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 2.5rem;
}

.calculator-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}

.calc-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-control:focus {
  border-color: var(--brand-teal);
}

.gauge-display {
  margin-top: 1.5rem;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  border: 1px solid var(--border-light);
}

.gauge-value {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--brand-teal);
}

.gauge-status {
  font-weight: 700;
  font-size: 1.1rem;
  margin-top: 0.2rem;
}

.gauge-advice {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Modals System (Booking & Patient Portal) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-overlay);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  padding: 1.5rem;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  position: relative;
  transform: translateY(20px) scale(0.95);
  transition: transform var(--transition-normal);
}

.modal-overlay.active .modal-container {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
}

.modal-title {
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--accent-red);
}

.modal-body {
  padding: 2rem;
}

/* Step Wizard Progress */
.wizard-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
  position: relative;
}

.wizard-steps::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--border-light);
  z-index: 1;
}

.wizard-step {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--border-light);
  color: var(--text-muted);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.wizard-step.active .step-num {
  background: var(--brand-teal);
  border-color: var(--brand-teal);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(13, 148, 136, 0.4);
}

.wizard-step.completed .step-num {
  background: var(--brand-mint);
  border-color: var(--brand-mint);
  color: #ffffff;
}

.step-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Printable Digital Appointment Pass */
.digital-pass {
  background: linear-gradient(135deg, #0b1e36, #0f2b48);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.digital-pass::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.3) 0%, transparent 70%);
}

.pass-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
  padding-bottom: 1rem;
}

.pass-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.pass-field-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.pass-field-val {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
}

.pass-qr-area {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.08);
  padding: 1rem;
  border-radius: var(--radius-sm);
}

/* Patient Portal Tabs */
.portal-tabs {
  display: flex;
  gap: 1rem;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 1.5rem;
}

.portal-tab-btn {
  padding: 0.8rem 1.2rem;
  background: none;
  border: none;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: color var(--transition-fast);
}

.portal-tab-btn.active {
  color: var(--brand-teal);
}

.portal-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--brand-teal);
  border-radius: 3px 3px 0 0;
}

.record-item-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

/* FAQ Accordion */
.faq-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-question {
  padding: 1.25rem 1.5rem;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-answer {
  padding: 0 1.5rem 1.25rem 1.5rem;
  color: var(--text-muted);
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

.faq-item.active .faq-question i {
  transform: rotate(180deg);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.toast {
  background: var(--bg-secondary);
  color: var(--text-main);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--brand-teal);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 300px;
  animation: slide-in 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slide-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Footer */
.footer {
  background: var(--brand-navy);
  color: #ffffff;
  padding: 5rem 0 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer-brand p {
  color: #94a3b8;
  margin-top: 1rem;
  max-width: 320px;
  font-size: 0.95rem;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;

}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.footer-links a {
  color: #94a3b8;
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--brand-cyan);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #64748b;
  font-size: 0.88rem;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 2.5rem;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .top-bar {
    display: none;
  }
  .nav-links {
    display: none;
  }
  .mobile-nav-toggle {
    display: block;
  }
  .section-title {
    font-size: 1.75rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
