/* ==========================================================
   MediCare Hospital - Design System
   Primary #0D6EFD | Secondary #0B5ED7 | Accent #20C997
   ========================================================== */

:root {
  --primary: #0D6EFD;
  --primary-dark: #0B5ED7;
  --accent: #20C997;
  --navy: #0A1A2F;
  --navy-soft: #112B47;
  --soft-blue: #EAF2FF;
  --light-gray: #F5F7FA;
  --white: #FFFFFF;
  --text-dark: #14213D;
  --text-muted: #5C6B7A;
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-soft: 0 10px 30px rgba(13, 110, 253, 0.10);
  --shadow-card: 0 8px 24px rgba(10, 26, 47, 0.08);
  --grad-primary: linear-gradient(135deg, #0D6EFD 0%, #0B5ED7 60%, #084298 100%);
  --grad-accent: linear-gradient(135deg, #20C997 0%, #0D6EFD 100%);
  --font-display: 'Poppins', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--white);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, .display-font {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy);
}
a { text-decoration: none; }
img { max-width: 100%; display: block; }

.container-xl { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--primary); background: var(--soft-blue);
  padding: 6px 16px; border-radius: 999px; margin-bottom: 14px;
}
.section-title { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; margin: 0 0 12px; }
.section-sub { color: var(--text-muted); font-size: 16px; max-width: 620px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px;
  padding: 14px 28px; border-radius: 999px; border: none; cursor: pointer; transition: all .25s ease; }
.btn-primary { background: var(--grad-primary); color: #fff; box-shadow: 0 8px 20px rgba(13,110,253,.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(13,110,253,.45); }
.btn-accent { background: var(--grad-accent); color: #fff; }
.btn-outline { background: transparent; border: 2px solid rgba(255,255,255,.4); color: #fff; }
.btn-outline-navy { background: transparent; border: 2px solid var(--navy); color: var(--navy); }
.btn-outline:hover, .btn-outline-navy:hover { background: rgba(255,255,255,.12); }
.btn-sm { padding: 9px 18px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }

/* Glassmorphism */
.glass {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--radius-lg);
}
.glass-light {
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.6);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
}

/* Cards */
.card-soft {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 28px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.card-soft:hover { transform: translateY(-6px); box-shadow: var(--shadow-soft); }
.icon-tile {
  width: 56px; height: 56px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #fff; margin-bottom: 16px;
}

/* Top bar */
.topbar { background: var(--navy); color: rgba(255,255,255,.85); font-size: 13.5px; padding: 8px 0; }
.topbar a { color: rgba(255,255,255,.85); }
.topbar .divider { width: 1px; height: 14px; background: rgba(255,255,255,.25); margin: 0 14px; }

/* Navbar */
.navbar-medicare { background: #fff; padding: 14px 0; position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 18px rgba(10,26,47,.06); }
.navbar-medicare .brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 22px; color: var(--navy); }
.navbar-medicare .brand .tagline { display: block; font-size: 11px; font-weight: 500; color: var(--text-muted); letter-spacing: .03em; }
.navbar-medicare .brand-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--grad-primary); color: #fff; display: flex; align-items: center; justify-content: center; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--text-dark); font-weight: 500; font-size: 15px; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.dropdown-menu-medicare { border-radius: var(--radius-md); border: none; box-shadow: var(--shadow-soft); padding: 10px; }

/* Hero */
.hero { background: var(--grad-primary); position: relative; overflow: hidden; color: #fff; padding: 70px 0 110px; }
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(32,201,151,.25), transparent 55%);
}
.hero .hero-eyebrow { background: rgba(255,255,255,.15); color: #fff; }
.hero h1 { color: #fff; font-size: clamp(34px, 5vw, 54px); line-height: 1.1; }
.hero .highlight { color: var(--accent); }
.hero p.lead { color: rgba(255,255,255,.85); font-size: 17px; max-width: 480px; }
.hero-image-wrap { position: relative; border-radius: var(--radius-lg); overflow: hidden; }

/* Emergency strip */
.emergency-strip { background: linear-gradient(135deg, #FF7A30, #FF5733); color: #fff; padding: 18px 0; }
.emergency-strip .item { display: flex; align-items: center; gap: 12px; }
.emergency-strip .icon-circle { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* Department / Service Cards */
.dept-card { text-align: left; border-radius: var(--radius-md); }
.dept-card .icon-tile { background: var(--grad-primary); }
.dept-card:nth-child(2) .icon-tile, .service-card:nth-child(2) .icon-tile { background: linear-gradient(135deg,#FF9F45,#FF7A30); }
.dept-card:nth-child(3) .icon-tile { background: linear-gradient(135deg,#20C997,#0AA67D); }
.dept-card:nth-child(4) .icon-tile { background: linear-gradient(135deg,#FF7A9C,#E83E8C); }

/* Doctor cards */
.doctor-card { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card); background: #fff; transition: transform .25s; }
.doctor-card:hover { transform: translateY(-6px); }
.doctor-card img { height: 260px; object-fit: cover; width: 100%; }
.doctor-card .body { padding: 20px; }
.doctor-card .rating { color: #FFA41C; font-size: 13px; }

/* Booking panel */
.booking-panel { background: var(--navy); border-radius: var(--radius-lg); padding: 32px; color: #fff; }
.booking-panel .form-control, .booking-panel select { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); color: #fff; border-radius: var(--radius-sm); padding: 12px 16px; }
.booking-panel .form-control::placeholder { color: rgba(255,255,255,.5); }
.form-control, select.form-control, textarea.form-control {
  border-radius: var(--radius-sm); border: 1.5px solid #E2E8F0; padding: 12px 16px; font-size: 15px;
}
.form-control:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(13,110,253,.12); }
label { font-weight: 600; font-size: 13.5px; color: var(--navy); margin-bottom: 6px; display: block; }

/* Stats */
.stat-box .num { font-size: 38px; font-weight: 800; color: var(--navy); font-family: var(--font-display); }
.stat-box .label { color: var(--text-muted); font-size: 14px; }

/* Testimonial */
.testimonial-dark { background: linear-gradient(135deg, var(--navy), #163759); color: #fff; border-radius: var(--radius-lg); padding: 40px; }

/* Footer */
.site-footer { background: var(--navy); color: rgba(255,255,255,.7); padding: 64px 0 24px; }
.site-footer h6 { color: #fff; font-weight: 700; margin-bottom: 18px; }
.site-footer a { color: rgba(255,255,255,.65); }
.site-footer a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; margin-top: 40px; font-size: 13px; }
.social-circle { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.1); display: inline-flex; align-items: center; justify-content: center; color: #fff; margin-right: 8px; }
.social-circle:hover { background: var(--accent); }

/* Floating buttons */
.float-btn-stack { position: fixed; bottom: 26px; right: 26px; z-index: 1200; display: flex; flex-direction: column; gap: 12px; }
.float-btn { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 22px; box-shadow: 0 10px 24px rgba(0,0,0,.2); }
.float-btn.whatsapp { background: #25D366; }
.float-btn.emergency { background: linear-gradient(135deg,#FF7A30,#FF5733); }
.float-btn.totop { background: var(--navy); }

/* Badges */
.badge-soft { background: var(--soft-blue); color: var(--primary); font-weight: 600; font-size: 12px; padding: 5px 12px; border-radius: 999px; }
.badge-accent { background: rgba(32,201,151,.12); color: #0AA67D; font-weight: 600; font-size: 12px; padding: 5px 12px; border-radius: 999px; }

/* Utility */
.text-accent { color: var(--accent); }
.text-primary-custom { color: var(--primary); }
.bg-soft-blue { background: var(--soft-blue); }
.bg-light-gray { background: var(--light-gray); }

/* FAQ Accordion */
.faq-item { border: 1px solid #E5EAF1; border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden; background: #fff; }
.faq-question { padding: 16px 20px; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.faq-answer { padding: 0 20px; max-height: 0; overflow: hidden; color: var(--text-muted); transition: all .25s ease; }
.faq-item.open .faq-answer { max-height: 300px; padding: 0 20px 18px; }
.faq-item.open .faq-question i { transform: rotate(45deg); }
.faq-question i { transition: transform .2s; color: var(--primary); }

/* Dark mode (basic) */
body.dark-mode { background: #0A1A2F; color: #E6EDF5; }
body.dark-mode .card-soft, body.dark-mode .navbar-medicare, body.dark-mode .faq-item { background: #112B47; color: #E6EDF5; }
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, body.dark-mode h4, body.dark-mode h5, body.dark-mode h6 { color: #fff; }

@media (max-width: 991px) {
  .nav-links { display: none; }
}

/* ==========================================================
   Shared Table & KPI Styles (used by patient portal + admin)
   ========================================================== */
.medicare-table { width:100%; border-collapse:collapse; }
.medicare-table th { text-align:left; font-size:12.5px; text-transform:uppercase; letter-spacing:.04em; color:var(--text-muted); padding:12px 14px; border-bottom:2px solid #EEF2F7; font-weight:600; }
.medicare-table td { padding:14px; border-bottom:1px solid #EEF2F7; font-size:14.5px; vertical-align:middle; }
.medicare-table tr:hover td { background:#FAFCFF; }

.kpi-card { background:#fff; border-radius:var(--radius-md); padding:22px; box-shadow:var(--shadow-card); display:flex; align-items:center; gap:16px; }
.kpi-icon { width:50px; height:50px; border-radius:14px; display:flex; align-items:center; justify-content:center; font-size:20px; color:#fff; background:var(--grad-primary); flex-shrink:0; }
.kpi-value { font-size:24px; font-weight:800; font-family:var(--font-display); color:var(--navy); }
.kpi-label { font-size:13px; color:var(--text-muted); }

/* Patient portal sidebar */
.portal-shell { display:flex; min-height:calc(100vh - 140px); }
.portal-sidebar-nav { width:220px; background:var(--navy); flex-shrink:0; padding:20px 0; }
.portal-sidebar-nav a { display:flex; align-items:center; gap:10px; color:rgba(255,255,255,.75); padding:12px 20px; font-size:14px; font-weight:500; }
.portal-sidebar-nav a:hover, .portal-sidebar-nav a.active { color:#fff; background:rgba(255,255,255,.08); }
.portal-content { flex:1; padding:28px; min-width:0; }
@media (max-width:991px) { .portal-shell { flex-direction:column; } .portal-sidebar-nav { width:100%; display:flex; overflow-x:auto; padding:8px; } .portal-sidebar-nav a { padding:10px 14px; white-space:nowrap; border-radius:8px; } }
