/* ============================================================
   Global Somali Health - Main Stylesheet
   Medical-first, calm, professional design
   Colors: Teal primary, clean whites, soft grays
   ============================================================ */

/* ---- CSS Variables ---- */
:root {
  --primary:        #0d9488;    /* teal-600 - main brand */
  --primary-dark:   #0f766e;    /* teal-700 */
  --primary-light:  #ccfbf1;    /* teal-100 */
  --accent:         #0ea5e9;    /* sky blue accent */
  --danger:         #ef4444;
  --success:        #22c55e;
  --warning:        #f59e0b;
  --text-main:      #1e293b;    /* slate-800 */
  --text-muted:     #64748b;    /* slate-500 */
  --border:         #e2e8f0;
  --bg-light:       #f8fafc;
  --bg-white:       #ffffff;
  --radius:         12px;
  --radius-lg:      18px;
  --shadow:         0 2px 12px rgba(0,0,0,.07);
  --shadow-hover:   0 6px 24px rgba(13,148,136,.15);
  --font-heading:   'Outfit', 'Noto Sans', sans-serif;
  --font-body:      'Noto Sans', 'Outfit', sans-serif;
  --navbar-h:       57px;
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* ---- Navbar ---- */
.navbar {
  border-bottom: 1px solid var(--border);
  padding: .75rem 0;
}

.brand-icon {
  width: 38px; height: 38px;
  background: var(--primary);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1rem;
}

.brand-icon-sm {
  width: 32px; height: 32px;
  font-size: .85rem;
}

.brand-text {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text-main);
}

.nav-link {
  color: var(--text-muted) !important;
  font-weight: 500;
  border-radius: 8px;
  padding: .4rem .8rem !important;
  transition: all .2s;
}
.nav-link:hover, .nav-link.active {
  color: var(--primary) !important;
  background: var(--primary-light);
}

.lang-btn {
  font-size: .8rem;
  border-radius: 8px;
  font-weight: 600;
}

.notif-btn {
  border-radius: 10px;
  padding: .4rem .65rem;
}

.user-btn {
  border-radius: 10px;
  background: var(--primary);
  border-color: var(--primary);
  font-size: .85rem;
}

/* ---- Buttons ---- */
.btn-primary {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  border-radius: 10px;
  font-weight: 600;
}
.btn-primary:hover {
  background: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
}
.btn-outline-primary {
  color: var(--primary) !important;
  border-color: var(--primary) !important;
  border-radius: 10px;
  font-weight: 600;
}
.btn-outline-primary:hover {
  background: var(--primary) !important;
  color: #fff !important;
}
.btn-outline-secondary { border-radius: 10px; }

/* ---- Hero Section ---- */
.hero-section {
  background: linear-gradient(135deg, #0d9488 0%, #0ea5e9 100%);
  padding: 80px 0 100px;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  right: -100px; top: -100px;
  width: 500px; height: 500px;
  background: rgba(255,255,255,.06);
  border-radius: 50%;
}

.hero-section::after {
  content: '';
  position: absolute;
  left: -80px; bottom: -150px;
  width: 400px; height: 400px;
  background: rgba(255,255,255,.04);
  border-radius: 50%;
}

.hero-title {
  font-size: clamp(2rem, 4vw, 3rem);
  color: #fff;
  font-weight: 800;
}

.hero-subtitle {
  color: rgba(255,255,255,.88);
  font-size: 1.1rem;
}

.hero-stats {
  background: rgba(255,255,255,.12);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  color: #fff;
  backdrop-filter: blur(8px);
}

.hero-stat-num {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
}

.hero-stat-label {
  font-size: .8rem;
  opacity: .85;
}

/* ---- Section Headings ---- */
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 20px;
  padding: .25rem .85rem;
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: .75rem;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--text-main);
}

/* ---- Cards ---- */
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s;
}

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

.card-header {
  background: transparent;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 1rem;
}

/* ---- Doctor Card ---- */
.doctor-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all .25s;
}

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

.doctor-avatar {
  width: 70px; height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-light);
}

.doctor-avatar-placeholder {
  width: 70px; height: 70px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  color: var(--primary);
}

.badge-verified {
  background: #dcfce7;
  color: #15803d;
  font-size: .7rem;
  border-radius: 20px;
  padding: .2rem .65rem;
  font-weight: 600;
}

.badge-pending {
  background: #fef9c3;
  color: #854d0e;
  font-size: .7rem;
  border-radius: 20px;
  padding: .2rem .65rem;
  font-weight: 600;
}

/* ---- Specialty Cards ---- */
.specialty-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1rem;
  text-align: center;
  transition: all .25s;
  cursor: pointer;
}

.specialty-card:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.specialty-icon {
  width: 56px; height: 56px;
  background: var(--primary-light);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  color: var(--primary);
  margin: 0 auto .75rem;
}
/* When used inline inside a flex row (icon + text), drop the auto-centering
   margins so the icon aligns cleanly to the left of its text. */
.specialty-icon.flex-shrink-0 { margin: 0; }

/* ---- Pricing Cards ---- */
.plan-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  position: relative;
  transition: all .25s;
}

.plan-card.popular {
  border-color: var(--primary);
}

.plan-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-hover);
}

.popular-badge {
  position: absolute;
  top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  padding: .2rem 1rem;
  border-radius: 20px;
}

.plan-price {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.plan-period {
  font-size: .85rem;
  color: var(--text-muted);
}

/* ---- Stats Cards (Dashboard) ---- */
.stat-card {
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: none;
}

.stat-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}

.stat-num {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

/* ---- Dashboard Sidebar ---- */
.dash-sidebar {
  background: var(--bg-white);
  border-right: 1px solid var(--border);
  width: 240px;
  position: fixed;
  top: var(--navbar-h);
  left: 0;
  bottom: 0;
  padding: 1.5rem 0 2rem;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 100;
  box-sizing: border-box;
}

.dash-main {
  margin-left: 240px;
  padding: 2rem;
  min-height: calc(100vh - var(--navbar-h));
  background: var(--bg-light);
}

.dash-nav-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem 1.5rem;
  color: var(--text-muted);
  font-weight: 500;
  font-size: .9rem;
  transition: all .2s;
  border-left: 3px solid transparent;
}

.dash-nav-link:hover, .dash-nav-link.active {
  color: var(--primary);
  background: var(--primary-light);
  border-left-color: var(--primary);
}

.dash-nav-link i {
  width: 18px;
  text-align: center;
}

.dash-nav-heading {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  padding: 1rem 1.5rem .25rem;
}


/* Footer sits in the right column only — L-shape layout */
@media (min-width: 992px) {
  body:has(.dash-sidebar) .site-footer {
    margin-left: 240px;
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 991px) {
  .dash-sidebar {
    position: static;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    overflow-y: visible;
  }
  .dash-main {
    margin-left: 0;
    padding: 1rem;
  }
}

/* ---- Consultation Room ---- */
.consultation-room {
  background: #0f172a;
  min-height: 100vh;
  color: #fff;
}

.video-container {
  position: relative;
  background: #1e293b;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-placeholder-icon {
  font-size: 5rem;
  color: rgba(255,255,255,.2);
}

.video-self {
  position: absolute;
  bottom: 16px; right: 16px;
  width: 160px;
  background: #334155;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 4/3;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255,255,255,.2);
}

.call-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 0;
}

.call-btn {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all .2s;
}

.call-btn-mute  { background: #334155; color: #fff; }
.call-btn-video { background: #334155; color: #fff; }
.call-btn-end   { background: var(--danger); color: #fff; }
.call-btn:hover { opacity: .85; transform: scale(1.08); }

.chat-panel {
  background: #1e293b;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  height: 500px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.chat-bubble {
  max-width: 78%;
  padding: .5rem .85rem;
  border-radius: 14px;
  margin-bottom: .5rem;
  font-size: .88rem;
  line-height: 1.5;
}

.chat-bubble.mine {
  background: var(--primary);
  color: #fff;
  align-self: flex-end;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}

.chat-bubble.theirs {
  background: #334155;
  color: #fff;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

/* ---- Privacy Notice ---- */
.privacy-notice {
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}

/* ---- Tables ---- */
.table { border-collapse: separate; border-spacing: 0; }
.table thead th {
  background: var(--bg-light);
  font-weight: 600;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  padding: .85rem 1rem;
}
.table td { padding: .85rem 1rem; vertical-align: middle; }
.table-hover tbody tr:hover { background: var(--primary-light); }

/* ---- Badges ---- */
.badge { border-radius: 8px; font-weight: 600; }

/* ---- Status badges ---- */
.status-pending   { background: #fef3c7; color: #92400e; }
.status-approved  { background: #d1fae5; color: #065f46; }
.status-rejected  { background: #fee2e2; color: #991b1b; }
.status-completed { background: #dbeafe; color: #1e40af; }
.status-cancelled { background: #f1f5f9; color: #475569; }
.status-active    { background: #d1fae5; color: #065f46; }
.status-waiting   { background: #fef3c7; color: #92400e; }
.status-missed    { background: #fee2e2; color: #991b1b; }

/* ---- Forms ---- */
.form-control, .form-select {
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: .55rem .9rem;
  font-size: .9rem;
  transition: border-color .2s, box-shadow .2s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13,148,136,.12);
}

.form-label { font-weight: 600; font-size: .88rem; margin-bottom: .35rem; }

/* ---- Alerts ---- */
.alert { border-radius: var(--radius); border: none; font-size: .9rem; }
.alert-success { background: #d1fae5; color: #065f46; }
.alert-danger   { background: #fee2e2; color: #991b1b; }
.alert-warning  { background: #fef9c3; color: #854d0e; }
.alert-info     { background: var(--primary-light); color: var(--primary-dark); }

/* ---- Footer ---- */
.site-footer {
  background: #0f172a;
  color: rgba(255,255,255,.7);
}

.footer-brand {
  font-family: var(--font-heading);
  font-weight: 800;
  color: #fff;
  font-size: 1.1rem;
}

.footer-desc { font-size: .88rem; max-width: 300px; }

.footer-heading {
  color: rgba(255,255,255,.9);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 700;
  margin-bottom: .85rem;
}

.footer-links {
  list-style: none;
  padding: 0; margin: 0;
}
.footer-links li { margin-bottom: .4rem; }
.footer-links a {
  color: rgba(255,255,255,.6);
  font-size: .88rem;
  transition: color .2s;
}
.footer-links a:hover { color: #fff; }

.footer-contact {
  list-style: none;
  padding: 0; margin: 0;
}
.footer-contact li {
  display: flex; gap: .6rem; align-items: flex-start;
  margin-bottom: .6rem;
  font-size: .88rem;
}
.footer-contact i { margin-top: .15rem; color: var(--primary); width: 14px; }
.footer-contact a { color: rgba(255,255,255,.6); }
.footer-contact a:hover { color: #fff; }

.footer-divider { border-color: rgba(255,255,255,.1); }

.footer-copy { font-size: .8rem; color: rgba(255,255,255,.4); }

.social-btn {
  width: 36px; height: 36px;
  background: rgba(255,255,255,.08);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.6);
  font-size: .9rem;
  transition: all .2s;
}
.social-btn:hover {
  background: var(--primary);
  color: #fff;
}

/* ---- How it works steps ---- */
.step-circle {
  width: 60px; height: 60px;
  background: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1.3rem;
  margin: 0 auto 1rem;
  font-weight: 800;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .hero-section { padding: 50px 0 70px; }
  .hero-title { font-size: 1.8rem; }
}

/* ---- Loading spinner ---- */
.spinner-wrap {
  display: flex; justify-content: center; align-items: center; min-height: 200px;
}

/* ---- Avatar initials fallback ---- */
.avatar-initials {
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  font-family: var(--font-heading);
  border-radius: 50%;
}

/* ---- Consultation type icons ---- */
.consult-type-video { color: #2563eb; }
.consult-type-audio { color: var(--success); }
.consult-type-chat  { color: var(--primary); }

/* ---- Page header ---- */
.page-header {
  background: linear-gradient(120deg, var(--primary) 0%, var(--accent) 100%);
  padding: 3rem 0;
  color: #fff;
  margin-bottom: 3rem;
}

.page-header h1 { color: #fff; }
.page-header p  { color: rgba(255,255,255,.85); margin-bottom: 0; }
