/* ============================================
   PubMed Center Clinic — Premium Medical Theme
   Bright, professional, award-winning design
   ============================================ */

/* --- CSS Variables / Design Tokens --- */
:root {
  /* Core palette */
  --primary: #0a7bcf;
  --primary-dark: #065299;
  --primary-darker: #043b73;
  --primary-light: #e6f2fd;
  --primary-lighter: #f0f7ff;
  --primary-gradient: linear-gradient(135deg, #0a7bcf 0%, #0ea5e9 100%);
  --primary-glow: rgba(10, 123, 207, 0.25);

  /* Accent */
  --accent: #0d9488;
  --accent-light: #ccfbf1;
  --accent-gradient: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);

  /* Neutrals */
  --bg: #ffffff;
  --bg-alt: #f4f7fc;
  --bg-card: #ffffff;
  --bg-dark: #0f172a;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.10), 0 10px 10px -5px rgba(0,0,0,0.04);
  --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.15);
  --shadow-primary: 0 8px 32px rgba(10, 123, 207, 0.3);
  --shadow-primary-lg: 0 12px 48px rgba(10, 123, 207, 0.35);

  /* Radii */
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --header-height: 72px;

  /* Transitions */
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; -webkit-font-smoothing:antialiased; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  overflow-x: hidden;
}
::selection { background: var(--primary); color: #fff; }

/* --- Custom Scrollbar --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 var(--primary-glow); }
  50% { box-shadow: 0 0 0 12px transparent; }
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-in { animation: fadeInUp 0.6s ease forwards; opacity: 0; }
.animate-in-d1 { animation-delay: 0.1s; }
.animate-in-d2 { animation-delay: 0.2s; }
.animate-in-d3 { animation-delay: 0.3s; }
.animate-in-d4 { animation-delay: 0.4s; }
.animate-in-d5 { animation-delay: 0.5s; }

/* --- HEADER --- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  transition: var(--transition);
}
.header.scrolled {
  box-shadow: var(--shadow-md);
  background: rgba(255,255,255,0.98);
  border-bottom-color: var(--border);
}
.header .logo {
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}
.header .logo svg {
  width: 36px; height: 36px;
  filter: drop-shadow(0 2px 8px rgba(10,123,207,0.3));
  transition: var(--transition);
}
.header .logo:hover svg { transform: rotate(-5deg) scale(1.05); }
.header .logo span {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.header nav { display: flex; align-items: center; gap: 6px; }
.header nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  transition: var(--transition);
  text-decoration: none;
  position: relative;
}
.header nav a::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 50%;
  width: 0; height: 2px;
  background: var(--primary-gradient);
  border-radius: 2px;
  transition: var(--transition);
  transform: translateX(-50%);
}
.header nav a:hover { color: var(--primary); background: var(--primary-light); }
.header nav a:hover::after { width: 60%; }
.header .btn-primary {
  background: var(--primary-gradient) !important;
  color: #fff !important;
  padding: 10px 28px !important;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-primary);
  margin-left: 8px;
}
.header .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-primary-lg);
}
.header .btn-primary::after { display: none; }

/* --- DEMO BANNER --- */
.demo-banner {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #fff;
  text-align: center;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.demo-banner .pulse-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: #fff;
  border-radius: 50%;
  animation: pulseGlow 2s infinite;
}

/* --- HERO SECTION --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: calc(var(--header-height) + 32px);
  background: linear-gradient(160deg, #f0f7ff 0%, #ffffff 40%, #e6f2fd 100%);
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(10,123,207,0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -30%; left: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(13,148,136,0.05) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero-carousel {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-carousel .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.8s cubic-bezier(0.4, 0, 0.2, 1);
  background-size: cover;
  background-position: center;
}
.hero-carousel .slide.active { opacity: 1; }
.hero-carousel .slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10,123,207,0.35) 0%,
    rgba(13,148,136,0.20) 40%,
    rgba(255,255,255,0.15) 70%,
    rgba(255,255,255,0.50) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  padding: 60px 40px;
  animation: fadeInUp 0.8s ease;
}
.hero-content .badge {
  display: inline-block;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.6);
  padding: 8px 24px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.hero-content h1 {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: 20px;
  color: var(--text);
  text-shadow: 0 2px 30px rgba(255,255,255,0.6);
}
.hero-content h1 .highlight {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-content p {
  font-size: 20px;
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
}
.hero-content .hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-content .btn-hero {
  padding: 16px 40px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 16px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-content .btn-hero.primary {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: var(--shadow-primary);
}
.hero-content .btn-hero.primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-primary-lg);
}
.hero-content .btn-hero.secondary {
  background: rgba(255,255,255,0.85);
  color: var(--text);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: var(--shadow-sm);
}
.hero-content .btn-hero.secondary:hover {
  background: #fff;
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.hero-indicators {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 10px;
}
.hero-indicators .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: var(--transition);
}
.hero-indicators .dot.active {
  background: #fff;
  width: 36px;
  border-radius: 6px;
  box-shadow: 0 0 16px rgba(255,255,255,0.4);
}

/* --- STATS BANNER --- */
.stats-banner {
  background: var(--primary-gradient);
  padding: 64px 40px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.stats-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.3;
}
.stats-banner .stats-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  text-align: center;
  position: relative;
  z-index: 1;
}
.stats-banner .stat-item {
  padding: 20px;
  transition: var(--transition);
}
.stats-banner .stat-item:hover { transform: translateY(-4px); }
.stats-banner .stat-item .stat-icon {
  font-size: 28px;
  margin-bottom: 12px;
  display: block;
}
.stats-banner .stat-item h3 {
  font-size: 44px;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -1px;
  line-height: 1.1;
}
.stats-banner .stat-item p {
  font-size: 16px;
  opacity: 0.85;
  font-weight: 400;
}

/* --- SECTIONS GENERAL --- */
.section {
  padding: 100px 40px;
  max-width: 1200px;
  margin: 0 auto;
}
.section-alt {
  background: var(--bg-alt);
  max-width: 100%;
  padding-left: 40px;
  padding-right: 40px;
}
.section-title {
  text-align: center;
  margin-bottom: 64px;
}
.section-title .section-label {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  padding: 6px 20px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}
.section-title h2 {
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}
.section-title p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
}

/* --- SERVICE CARDS --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.service-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border-light);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 4px;
  background: var(--primary-gradient);
  opacity: 0;
  transition: var(--transition);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border);
}
.service-card:hover::before { opacity: 1; }
.service-card .icon {
  width: 60px; height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 20px;
  transition: var(--transition);
}
.service-card:hover .icon { transform: scale(1.1) rotate(-5deg); }
.service-card .icon.blue {
  background: var(--primary-light);
  color: var(--primary);
}
.service-card .icon.green {
  background: var(--accent-light);
  color: var(--accent);
}
.service-card h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
}
.service-card p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}
.service-card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
  transition: var(--transition);
}
.service-card:hover .card-link { gap: 10px; }

/* --- DOCTOR CARDS --- */
.doctors-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.doctor-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border-light);
}
.doctor-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}
.doctor-card .img-wrapper {
  position: relative;
  overflow: hidden;
  height: 280px;
}
.doctor-card .img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}
.doctor-card:hover .img-wrapper img { transform: scale(1.08); }
.doctor-card .img-wrapper .overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
  opacity: 0;
  transition: var(--transition);
}
.doctor-card:hover .img-wrapper .overlay { opacity: 1; }
.doctor-card .img-wrapper .overlay span {
  color: #fff;
  font-size: 13px;
  font-weight: 500;
}
.doctor-card .info {
  padding: 24px;
}
.doctor-card .info .specialty-tag {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.doctor-card .info h4 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}
.doctor-card .info .title {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 10px;
}
.doctor-card .info .bio {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* --- IMAGE GALLERY --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.gallery-grid .gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  cursor: pointer;
  aspect-ratio: 16/10;
}
.gallery-grid .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}
.gallery-grid .gallery-item:hover img { transform: scale(1.1); }
.gallery-grid .gallery-item .gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,123,207,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}
.gallery-grid .gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-grid .gallery-item .gallery-overlay span {
  color: #fff;
  font-size: 28px;
  transform: scale(0.8);
  transition: var(--transition);
}
.gallery-grid .gallery-item:hover .gallery-overlay span { transform: scale(1); }

/* --- CTA BANNER --- */
.cta-banner {
  background: linear-gradient(135deg, #0a7bcf 0%, #0d9488 100%);
  padding: 100px 40px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.cta-banner::after {
  content: '';
  position: absolute;
  bottom: -150px; left: -100px;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.cta-banner h2 {
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}
.cta-banner p {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 36px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
  line-height: 1.8;
}
.cta-banner .btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 18px 48px;
  background: #fff;
  color: var(--primary);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 16px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  position: relative;
  z-index: 1;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
.cta-banner .btn-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

/* --- FOOTER --- */
.footer {
  background: var(--bg-dark);
  color: #94a3b8;
  padding: 80px 40px 30px;
}
.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
}
.footer h4 {
  color: #fff;
  font-weight: 600;
  margin-bottom: 20px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.footer a {
  color: #94a3b8;
  font-size: 14px;
  display: block;
  margin-bottom: 10px;
  transition: var(--transition);
  text-decoration: none;
}
.footer a:hover { color: #fff; padding-left: 4px; }
.footer p {
  font-size: 14px;
  line-height: 1.9;
  color: #94a3b8;
}
.footer .footer-logo {
  font-size: 20px;
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  display: inline-block;
}
.footer-bottom {
  text-align: center;
  padding-top: 40px;
  margin-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 13px;
  color: #64748b;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* --- PAGE HEADER (sub-pages) --- */
.page-header {
  padding: 140px 40px 80px;
  background: linear-gradient(160deg, var(--primary-lighter) 0%, #fff 60%, #f4f7fc 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute;
  top: -100px; left: -100px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(10,123,207,0.08), transparent);
  border-radius: 50%;
}
.page-header h1 {
  font-size: 44px;
  font-weight: 700;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}
.page-header p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  line-height: 1.8;
}

/* --- FORMS --- */
.form-card {
  max-width: 520px;
  margin: 40px auto;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
}
.form-card h2 {
  text-align: center;
  margin-bottom: 8px;
  font-size: 28px;
}
.form-card .form-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 32px;
}
.form-group {
  margin-bottom: 22px;
}
.form-group label {
  display: block;
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--text);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  transition: var(--transition);
  background: #fff;
  font-family: var(--font);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}
.form-group textarea { min-height: 100px; resize: vertical; }
.form-card .btn-submit {
  width: 100%;
  padding: 14px;
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font);
}
.form-card .btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-primary);
}
.form-card .btn-submit:active { transform: translateY(0); }

/* --- ABOUT PAGE --- */
.about-content {
  max-width: 800px;
  margin: 0 auto;
}
.about-content .about-section {
  margin-bottom: 48px;
  animation: fadeInUp 0.6s ease;
}
.about-content h3 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--primary);
}
.about-content p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 16px;
}
.about-values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}
.about-values .value-card {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  transition: var(--transition);
  border: 1px solid var(--border-light);
}
.about-values .value-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border);
}
.about-values .value-card .value-icon {
  font-size: 36px;
  margin-bottom: 16px;
  display: block;
}
.about-values .value-card h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}
.about-values .value-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- SERVICES DETAIL PAGE --- */
.service-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 60px;
  padding: 32px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  transition: var(--transition);
}
.service-detail:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.service-detail .service-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: var(--radius);
}
.service-detail .service-info h3 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--primary);
}
.service-detail .service-info p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.9;
}

/* --- DOCTOR FILTER --- */
.filter-bar {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

/* --- PORTAL LOGIN SPECIFIC --- */
.portal-login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  padding: 40px 20px;
}
.portal-login-wrapper .login-card {
  width: 100%;
  max-width: 440px;
}
.portal-login-wrapper .login-header {
  text-align: center;
  margin-bottom: 32px;
}
.portal-login-wrapper .login-header .login-icon {
  width: 64px; height: 64px;
  background: var(--primary-gradient);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 28px;
  color: #fff;
  box-shadow: var(--shadow-primary);
}
.portal-login-wrapper .login-header h2 {
  font-size: 24px;
  font-weight: 700;
}
.portal-login-wrapper .login-header p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
}

/* --- PORTAL DASHBOARD --- */
.portal-dashboard {
  max-width: 1000px;
  margin: 40px auto;
  padding: 40px;
}
.portal-dashboard .welcome-card {
  background: var(--primary-gradient);
  border-radius: var(--radius-lg);
  padding: 48px;
  color: #fff;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}
.portal-dashboard .welcome-card::before {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 200px; height: 200px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}
.portal-dashboard .welcome-card h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}
.portal-dashboard .welcome-card p {
  opacity: 0.9;
  font-size: 16px;
  position: relative;
  z-index: 1;
}
.portal-dashboard .dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.portal-dashboard .dash-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  transition: var(--transition);
  cursor: pointer;
}
.portal-dashboard .dash-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.portal-dashboard .dash-card .dash-icon {
  font-size: 32px;
  margin-bottom: 16px;
  display: block;
}
.portal-dashboard .dash-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}
.portal-dashboard .dash-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- BOOKING FORM ENHANCED --- */
.booking-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  max-width: 1000px;
  margin: 40px auto;
  padding: 0 40px;
}
.booking-info h3 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 16px;
}
.booking-info p {
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 24px;
}
.booking-info .info-card {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  border-left: 4px solid var(--primary);
}
.booking-info .info-card h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}
.booking-info .info-card p {
  font-size: 14px;
  margin-bottom: 0;
  color: var(--text-muted);
}

/* --- SUCCESS / ERROR STATES --- */
.success-msg {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  padding: 16px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 500;
}
.error-msg {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 16px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 500;
}

/* --- LOADING --- */
.loading-spinner {
  display: inline-block;
  width: 24px; height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- BACK TO TOP --- */
.back-to-top {
  position: fixed;
  bottom: 32px; right: 32px;
  width: 48px; height: 48px;
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  box-shadow: var(--shadow-primary);
  transition: var(--transition);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  z-index: 999;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-primary-lg);
}

/* --- UTILITY --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 40px; }
.text-center { text-align: center; }
.mt-2 { margin-top: 20px; }
.mt-4 { margin-top: 40px; }
.mt-6 { margin-top: 60px; }
.mb-4 { margin-bottom: 40px; }
.error { color: #dc2626; font-size: 14px; margin-bottom: 12px; text-align: center; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .doctors-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-banner .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .about-values { grid-template-columns: repeat(2, 1fr); }
  .service-detail { grid-template-columns: 1fr; }
  .booking-wrapper { grid-template-columns: 1fr; }
  .portal-dashboard .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-content h1 { font-size: 42px; }
}

@media (max-width: 768px) {
  .header { padding: 0 20px; }
  .header nav { display: none; }
  /* Mobile menu button could be added */
  .hero-content { padding: 40px 24px; }
  .hero-content h1 { font-size: 32px; }
  .hero-content p { font-size: 17px; }
  .hero-content .btn-hero { padding: 14px 28px; font-size: 15px; }
  .section { padding: 60px 20px; }
  .section-title h2 { font-size: 28px; }
  .services-grid { grid-template-columns: 1fr; }
  .doctors-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .stats-banner .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-banner { padding: 40px 20px; }
  .stats-banner .stat-item h3 { font-size: 32px; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-content .hero-buttons { flex-direction: column; align-items: center; }
  .form-card { padding: 32px 24px; }
  .page-header { padding: 120px 20px 60px; }
  .page-header h1 { font-size: 28px; }
  .about-values { grid-template-columns: 1fr; }
  .portal-dashboard .dashboard-grid { grid-template-columns: 1fr; }
  .portal-dashboard { padding: 20px; }
  .booking-wrapper { padding: 0 20px; }
}

@media (max-width: 480px) {
  .hero-content h1 { font-size: 26px; }
  .stats-banner .stats-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .stats-banner .stat-item h3 { font-size: 28px; }
  .cta-banner h2 { font-size: 26px; }
}

/* ─── EHR System Specific Styles ─── */
.section-padding{padding:80px 24px;position:relative;z-index:1}
.content-max{max-width:1200px;margin:0 auto;padding:0 20px}
@media(max-width:768px){.section-padding{padding:40px 16px}}
.stats-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:16px;margin-bottom:24px}
.stat-card{background:var(--card-bg);border:1px solid var(--border);border-radius:16px;padding:20px;transition:all .3s ease}
.stat-card:hover{transform:translateY(-2px);box-shadow:0 8px 30px rgba(10,123,207,0.1)}
.stat-value{font-size:28px;font-weight:800;color:var(--primary);line-height:1.2}
.stat-label{font-size:13px;color:var(--text-muted);margin-top:4px}
.table-wrap{overflow-x:auto}
.data-table{width:100%;border-collapse:collapse;font-size:14px}
.data-table th{padding:12px 16px;text-align:left;font-weight:600;font-size:12px;text-transform:uppercase;letter-spacing:.5px;color:var(--text-muted);border-bottom:1px solid var(--border)}
.data-table td{padding:12px 16px;border-bottom:1px solid var(--border);color:var(--text)}
.data-table tr:last-child td{border-bottom:none}
.data-table tr:hover td{background:rgba(10,123,207,0.03)}
.pagination{display:flex;gap:6px;justify-content:center;margin-top:24px;flex-wrap:wrap}
.page-btn{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:10px;font-size:13px;font-weight:600;color:var(--text-muted);background:var(--card-bg);border:1px solid var(--border);text-decoration:none;transition:all .2s}
.page-btn:hover{border-color:var(--primary);color:var(--primary)}
.page-btn.active{background:var(--primary);color:#fff;border-color:var(--primary)}
.form-input{width:100%;padding:12px 16px;border-radius:12px;border:1px solid var(--border);background:var(--card-bg);color:var(--text);font-size:14px;font-family:'Inter',sans-serif;transition:all .2s}
.form-input:focus{outline:none;border-color:var(--primary);box-shadow:0 0 0 3px rgba(10,123,207,0.1)}
.form-label{display:block;font-size:13px;font-weight:600;color:var(--text);margin-bottom:6px}
.form-group{margin-bottom:16px}
.search-input{width:100%;padding:12px 16px 12px 44px;border-radius:12px;border:1px solid var(--border);background:var(--card-bg);color:var(--text);font-size:14px;font-family:'Inter',sans-serif;transition:all .2s;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:14px center}
.glass-card{background:var(--card-bg);border:1px solid var(--border);border-radius:16px}
.search-input:focus{outline:none;border-color:var(--primary);box-shadow:0 0 0 3px rgba(10,123,207,0.1)}
.login-container{max-width:420px;margin:0 auto}
.login-card{padding:32px}
.login-header{text-align:center;margin-bottom:24px}
.login-header h2{font-size:24px;font-weight:700;color:var(--text);margin-bottom:4px}
.login-header p{font-size:14px;color:var(--text-muted)}
.login-icon{width:56px;height:56px;border-radius:16px;background:linear-gradient(135deg,#0a7bcf,#0d9488);display:flex;align-items:center;justify-content:center;color:#fff;font-size:24px;font-weight:800;margin:0 auto 16px}
.login-error{background:rgba(239,68,68,0.1);border:1px solid rgba(239,68,68,0.2);color:#ef4444;padding:12px 16px;border-radius:10px;font-size:13px;margin-bottom:16px}
.login-hint{text-align:center;font-size:13px;color:var(--text-muted);margin-top:16px;padding-top:16px;border-top:1px solid var(--border)}
.patient-row-link{text-decoration:none;display:block;margin-bottom:8px}
.patient-row{display:flex;align-items:flex-start;gap:16px;padding:16px 20px;flex-direction:column}
.patient-row-main{display:flex;align-items:center;gap:12px;width:100%}
.patient-row-title{font-weight:600;color:var(--text);flex:1;font-size:15px}
.patient-row-meta{font-size:12px;color:var(--text-muted);white-space:nowrap}
.patient-row-preview{font-size:13px;color:var(--text-muted);line-height:1.5}
.patient-row-id{font-size:12px;color:var(--primary);font-weight:600}
.patient-detail-grid{display:grid;grid-template-columns:1fr 380px;gap:24px}
@media(max-width:900px){.patient-detail-grid{grid-template-columns:1fr}}
.riska-panel{display:flex;flex-direction:column;gap:16px}
.riska-scores{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.riska-score-item{padding:12px 16px;background:var(--bg);border-radius:12px;border:1px solid var(--border)}
.riska-score-item.composite{grid-column:1/-1;background:linear-gradient(135deg,rgba(10,123,207,0.05),rgba(13,148,136,0.05));border-color:rgba(10,123,207,0.15)}
.riska-label{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.5px;color:var(--text-muted);margin-bottom:4px}
.riska-value{font-size:22px;font-weight:800}
.riska-tier{font-size:11px;font-weight:600;margin-top:2px}
.tier-low{color:#10b981}
.tier-standard{color:#f59e0b}
.tier-elevated{color:#f97316}
.tier-high{color:#ef4444}
.tier-critical{color:#dc2626}
.factor-badge{display:inline-block;padding:4px 10px;border-radius:9999px;font-size:11px;font-weight:500;background:rgba(10,123,207,0.08);color:var(--primary);margin:2px;border:1px solid rgba(10,123,207,0.15)}
.patient-note{padding:16px;background:var(--bg);border-radius:12px;border:1px solid var(--border);max-height:400px;overflow-y:auto}
.note-entry{padding:12px;border-bottom:1px solid var(--border)}
.note-entry:last-child{border-bottom:none}
.note-header{font-size:12px;color:var(--text-muted);margin-bottom:4px}
.note-header strong{color:var(--text)}
.status-badge{display:inline-block;padding:4px 10px;border-radius:9999px;font-size:11px;font-weight:600}
.status-badge.active{background:rgba(16,185,129,0.1);color:#10b981;border:1px solid rgba(16,185,129,0.2)}
.status-badge.inactive{background:rgba(239,68,68,0.1);color:#ef4444;border:1px solid rgba(239,68,68,0.2)}
.login-form { max-width:400px; margin: 0 auto; }
