/* ================================================================
   pages.css — Page-specific styles for Swarn Platform
   Implements exact reference image layouts:
     • Template 5 → Telehealth Connect   (Patient portal)
     • Template 6 → Knowledge Hub        (Student portal)
     • Template 8 → Integrated Workflow  (Doctor/features list)
================================================================ */

/* ──────────────────────────────────────────────────────────────
   SHARED FULL-PAGE LAYOUT (replaces "container" on portal pages)
────────────────────────────────────────────────────────────── */
.portal-page {
  min-height: calc(100vh - 80px);
  display: flex;
  overflow-x: hidden;
  position: relative;
  width: 100%;
}

/* ================================================================
   TEMPLATE 5 — TELEHEALTH CONNECT  (Patient Portal / Doctor List)
================================================================ */

/* ─── Outer wrapper ─────────────────────────────────────────── */
.tc-page {
  background: linear-gradient(145deg, #e8eff8 0%, #d6e4f0 100%);
  flex: 1;
  display: flex;
  position: relative;
}

/* ─── Swarn logo at top of sidebar ───────────────────────── */
.tc-sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .75rem 0 .5rem;
  border-bottom: 1px solid #e8edf4;
  margin-bottom: .5rem;
}
.tc-sidebar-logo img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

/* ─── Left narrow avatar sidebar ──────────────────────────── */
.tc-sidebar {
  width: 200px;
  background: #fff;
  border-right: 1px solid #dde6ef;
  display: flex;
  flex-direction: column;
  padding: 1rem 0;
  gap: .5rem;
  flex-shrink: 0;
  box-shadow: 2px 0 12px rgba(0,0,0,.04);
}

.tc-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg,#bfd4ea,#9abacf);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4a7fa5;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all .2s;
  border: 2.5px solid transparent;
  flex-shrink: 0;
  text-decoration: none;
}

a.tc-avatar {
  color: #4a7fa5;
}

.tc-avatar:hover, .tc-avatar.is-active {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,162,39,.15);
}

.tc-avatar img { width:100%; height:100%; object-fit:cover; border-radius:50%; }

.tc-divider {
  width: 32px;
  height: 1px;
  background: #e8edf4;
  flex-shrink: 0;
}

.tc-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 1rem;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
}

a.tc-icon-btn {
  color: #94a3b8;
}

.tc-icon-btn:hover, .tc-icon-btn.is-active {
  background: #eef4ff;
  color: var(--blue);
}

/* ─── Sidebar with labels ──────────────────────────────────── */
.tc-sidebar-nav {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0 .5rem;
}

/* Collapsed sidebar for teleconsult */
.tc-sidebar.collapsed {
  width: 70px;
}
.tc-sidebar.collapsed .tc-nav-label,
.tc-sidebar.collapsed .tc-header-title {
  display: none;
}
.tc-sidebar.collapsed .tc-nav-item {
  justify-content: center;
  padding: 0.65rem;
}

.tc-nav-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem .75rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  color: #64748b;
}

.tc-nav-item:hover {
  background: #f1f5f9;
  color: var(--blue);
}

.tc-nav-item.is-active {
  background: #eef4ff;
  color: var(--blue);
}

.tc-nav-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg,#e2e8f0,#cbd5e1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  flex-shrink: 0;
}

.tc-nav-item:hover .tc-nav-icon {
  background: linear-gradient(135deg,#dbeafe,#bfdbfe);
  color: var(--blue);
}

.tc-nav-item.is-active .tc-nav-icon {
  background: var(--blue);
  color: #fff;
}

.tc-nav-label {
  font-size: .8rem;
  font-weight: 500;
  white-space: nowrap;
}

/* ─── Main content ─────────────────────────────────────────── */
.tc-body {
  flex: 1;
  padding: 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow-y: auto;
}

/* Page title row */
.tc-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.tc-portal-label {
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .1em;
  background: rgba(255,255,255,.8);
  padding: .3rem .875rem;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: .625rem;
  backdrop-filter: blur(8px);
}

.tc-main-title {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
}

/* ─── Glass card (main panel) ─────────────────────────────── */
.tc-glass {
  border: none;
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.tc-glass-video {
  position: absolute;
  top: 0;
  right: 0;
  width: 45%;
  height: 100%;
  object-fit: contain;
}

.tc-glass::after {
  content: '';
  clear: both;
}

.tc-glass-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.5rem 2rem .5rem;
  position: relative;
  z-index: 1;
}

.tc-glass-title {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #fff;
}

.tc-glass-heading {
  font-family: var(--font-heading);
  font-size: 1.9rem;
  font-weight: 800;
  color: #fff;
}

.tc-glass-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  padding: 1.25rem 2rem 2rem;
  flex: 1;
  position: relative;
  z-index: 1;
}

/* Left: magazine text */
.tc-magazine h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: .875rem;
  line-height: 1.3;
}

.tc-magazine p {
  color: var(--text-muted);
  font-size: .875rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

/* Right: 2×2 feature cards */
.tc-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .875rem;
}

.tc-feat {
  background: #fff;
  border: 1px solid #e8edf4;
  border-radius: 14px;
  padding: .875rem;
  position: relative;
  cursor: pointer;
  transition: all .25s;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}

.tc-feat:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,.1);
  transform: translateY(-3px);
  border-color: var(--gold);
}

.tc-feat-num {
  position: absolute;
  top: -9px; right: -9px;
  width: 22px; height: 22px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: .7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}

.tc-feat-icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  font-size: .9rem;
  margin-bottom: .625rem;
}

.tc-feat-icon.gold-ico  { background: var(--gold-bg);    color: var(--gold);  }
.tc-feat-icon.teal-ico  { background: var(--teal-light); color: var(--teal);  }
.tc-feat-icon.green-ico { background: var(--green-light);color: var(--green); }

.tc-feat-title { font-size: .8rem;  font-weight: 700; color: var(--primary);  margin-bottom: .25rem; }
.tc-feat-desc  { font-size: .72rem; color: var(--text-muted); line-height: 1.5; }

.tc-feat-footer {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: .625rem;
  padding-top: .625rem;
  border-top: 1px solid var(--border);
  font-size: .7rem;
  color: var(--text-muted);
}

.tc-feat-avatar {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg,#bfd4ea,#9abacf);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4a7fa5;
  font-size: .55rem;
}

/* ─── Doctor list cards (TC style) ───────────────────────── */
.tc-doctors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.tc-doctor-card {
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 18px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .75rem;
  transition: all .25s;
  box-shadow: 0 4px 16px rgba(30,58,100,.07);
}

.tc-doctor-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 36px rgba(30,58,100,.13);
  border-color: var(--gold);
}

.tc-doc-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #bfd4ea, #7aabcc);
  display: flex; align-items: center; justify-content: center;
  color: #3a7aa8; font-size: 2.2rem;
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(30,58,100,.15);
}

.tc-doc-name  { font-size: 1.1rem; font-weight: 700; color: var(--primary); }
.tc-doc-spec  { font-size: .85rem; font-weight: 500; color: var(--blue); }

.tc-doc-cat {
  font-size: .75rem;
  background: var(--blue-light);
  color: var(--blue);
  padding: .25rem .75rem;
  border-radius: var(--radius-full);
  font-weight: 500;
}

.tc-book-btn {
  width: 100%;
  padding: .7rem;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: .875rem;
  cursor: pointer;
  border: none;
  transition: all .25s;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-top: .5rem;
}

.tc-book-btn:hover { background: var(--gold); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-gold); }

/* Filter chips for TC pages */
.tc-filter-row {
  display: flex;
  gap: .625rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.tc-chip {
  padding: .45rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
  background: rgba(255,255,255,.8);
  border: 1.5px solid #dde6ef;
  color: var(--text-muted);
  backdrop-filter: blur(8px);
}

.tc-chip:hover, .tc-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Section page header (light themed) */
.tc-page-header {
  padding: 2.5rem 0 0;
  margin-bottom: 2rem;
}

.tc-page-header h1 {
  font-size: 2.2rem;
  margin-bottom: .625rem;
}

.tc-page-header p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 640px;
}

/* ================================================================
   TEMPLATE 6 — KNOWLEDGE HUB  (Student Portal / Course List)
================================================================ */

/* ─── Page wrapper ─────────────────────────────────────────── */
.kh-page {
  background: #080f1e;
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* ─── Swarn logo at top of course sidebar ────────────────── */
.kh-sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 0 .5rem;
  border-bottom: 1px solid rgba(255,255,255,.05);
  margin-bottom: .5rem;
}
.kh-sidebar-logo img {
  height: 40px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

/* ─── Left course navigation sidebar ─────────────────────── */
.kh-sidebar {
  width: 228px;
  background: rgba(255,255,255,.025);
  border-right: 1px solid rgba(255,255,255,.06);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
}

.kh-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.05);
}

.kh-sb-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: rgba(59,130,246,.2);
  display: flex; align-items: center; justify-content: center;
  color: #60a5fa; font-size: .85rem;
}

.kh-sb-title {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.35);
}

.kh-sb-menu { color: rgba(255,255,255,.4); cursor: pointer; font-size: .9rem; }

.kh-nav-list {
  padding: .75rem 0;
  flex: 1;
}

.kh-nav-item {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding: .7rem 1.25rem;
  cursor: pointer;
  transition: all .2s;
  position: relative;
  text-decoration: none;
}

.kh-nav-item:hover { background: rgba(255,255,255,.04); }

.kh-nav-item.active { background: rgba(59,130,246,.12); }

.kh-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: #3b82f6;
  border-radius: 0 2px 2px 0;
}

.kh-nav-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem; flex-shrink: 0;
}

.ni-blue   { background:rgba(59,130,246,.15); color:#60a5fa; }
.ni-green  { background:rgba(16,185,129,.15); color:#34d399; }
.ni-purple { background:rgba(139,92,246,.15); color:#a78bfa; }
.ni-gold   { background:rgba(201,162,39,.15); color:var(--gold-light); }
.ni-teal   { background:rgba(8,145,178,.15);  color:#22d3ee; }
.ni-red    { background:rgba(239,68,68,.15);  color:#f87171; }
.ni-gray   { background:rgba(255,255,255,.07);color:rgba(255,255,255,.4); }

.kh-nav-label {
  font-size: .84rem; font-weight: 500;
  color: rgba(255,255,255,.55);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.kh-nav-item.active .kh-nav-label { color: rgba(255,255,255,.9); font-weight: 600; }

/* ─── Main learning area ───────────────────────────────────── */
.kh-body {
  flex: 1;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow-y: auto;
  transition: margin-left 0.3s ease;
}

/* Collapsed sidebar */
.kh-sidebar.collapsed {
  width: 60px;
}
.kh-sidebar.collapsed .kh-sidebar-head,
.kh-sidebar.collapsed .kh-nav-label {
  display: none;
}
.kh-sidebar.collapsed .kh-nav-item {
  justify-content: center;
  padding: 0.75rem;
}
.kh-sidebar.collapsed .kh-nav-icon {
  margin: 0 !important;
}
.kh-body.expanded {
  margin-left: 0;
}

/* Header */
.kh-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
}

.kh-header-text .kh-sub-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.35);
  display: block;
  margin-bottom: .5rem;
}

.kh-header-text .kh-big-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  text-shadow: 0 0 40px rgba(59,130,246,.25);
}

.kh-hero-img {
  width: 280px; height: 170px;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  background: linear-gradient(135deg, #1e3a8a, #1d4ed8);
}

.kh-hero-img img {
  width: 100%; height: 100%; object-fit: cover; opacity: .75;
}

.kh-hero-glow {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(59,130,246,.25), transparent 70%);
}

/* Progress tracker */
.kh-progress-card {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  display: flex;
  gap: 1.5rem;
  align-items: stretch;
}

.kh-tracker-area { flex: 1; }

.kh-tracker-title {
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: rgba(255,255,255,.5);
  margin-bottom: .875rem;
}

/* SVG line chart placeholder */
.kh-chart {
  width: 100%; height: 72px;
  display: flex; align-items: flex-end; gap: 3px;
}

.kh-bar {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: rgba(59,130,246,.25);
  transition: background .3s;
}

.kh-bar.hi { background: rgba(59,130,246,.6); }
.kh-bar.peak { background: #3b82f6; box-shadow: 0 0 8px rgba(59,130,246,.5); }

.kh-chart-days {
  display: flex; justify-content: space-between;
  margin-top: .5rem;
  font-size: .62rem; color: rgba(255,255,255,.25);
}

.kh-stats-box {
  width: 110px;
  background: rgba(255,255,255,.04);
  border-radius: 12px;
  padding: .875rem;
  display: flex; flex-direction: column; gap: .625rem;
  flex-shrink: 0;
}

.kh-big-num {
  font-family: var(--font-heading);
  font-size: 2.2rem; font-weight: 800;
  color: #fff;
  text-shadow: 0 0 20px rgba(59,130,246,.5);
  line-height: 1; margin-bottom: .125rem;
}

.kh-stat-row { display: flex; align-items: center; gap: .4rem; font-size: .68rem; color: rgba(255,255,255,.35); }
.kh-dot { width: 7px; height: 7px; border-radius: 50%; background: #3b82f6; flex-shrink: 0; }
.kh-dot.alt { background: rgba(255,255,255,.2); }

/* Interactive Courses section */
.kh-courses-section {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
}

.kh-courses-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.kh-courses-title {
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: rgba(255,255,255,.45);
}

.kh-courses-num {
  width: 20px; height: 20px;
  background: var(--gold); color: #fff;
  border-radius: 50%; font-size: .68rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading);
}

.kh-courses-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 160px;
  gap: .875rem;
  align-items: stretch;
}

.kh-course-card {
  border-radius: 12px; padding: 1rem;
  display: flex; flex-direction: column; gap: .5rem;
  cursor: pointer; transition: all .2s; position: relative;
}

.kh-course-card.light {
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.1);
}

.kh-course-card.dark {
  background: rgba(29,78,216,.14);
  border: 1px solid rgba(59,130,246,.2);
}

.kh-course-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.3); }

.kh-course-icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.75); font-size: .875rem;
}

.kh-course-title { font-size: .8rem; font-weight: 600; color: rgba(255,255,255,.85); line-height: 1.35; }
.kh-course-desc  { font-size: .68rem; color: rgba(255,255,255,.4); line-height: 1.5; }

.kh-enroll {
  border-radius: 12px;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading);
  font-size: 1rem; font-weight: 800;
  color: var(--primary);
  cursor: pointer; transition: all .25s;
  text-decoration: none; border: none;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
  flex-direction: column; gap: .25rem;
}

.kh-enroll:hover { background: var(--gold); color: #fff; transform: translateY(-3px); box-shadow: 0 8px 30px rgba(201,162,39,.4); }

.kh-enroll span { font-size: .72rem; font-weight: 500; color: var(--text-muted); }
.kh-enroll:hover span { color: rgba(255,255,255,.7); }

/* ── Course List Page (grid of courses in KH style) ── */
.kh-course-grid-full {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.kh-course-full-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 18px;
  overflow: hidden;
  transition: all .25s;
  display: flex; flex-direction: column;
}

.kh-course-full-card:hover {
  border-color: rgba(201,162,39,.4);
  background: rgba(255,255,255,.09);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
}

.kh-course-full-head {
  padding: 1.5rem;
  background: rgba(29,78,216,.12);
  display: flex; align-items: center; gap: 1rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.kh-course-full-num {
  width: 40px; height: 40px;
  border-radius: 10px; background: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-size: 1rem; font-weight: 800; color: #fff;
  flex-shrink: 0;
}

.kh-course-full-head h3 { color: #fff; font-size: 1rem; line-height: 1.3; }

.kh-course-full-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; gap: 1rem; }

.kh-tag-row { display: flex; gap: .5rem; flex-wrap: wrap; }

.kh-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: .7rem; font-weight: 500;
  background: rgba(255,255,255,.08); color: rgba(255,255,255,.6);
}

.kh-course-full-desc { color: rgba(255,255,255,.5); font-size: .85rem; line-height: 1.65; flex: 1; }

.kh-course-full-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,.06);
  padding-top: .875rem;
  font-size: .78rem; color: rgba(255,255,255,.4);
}

.kh-enroll-sm {
  display: inline-flex; align-items: center; gap: 5px;
  padding: .45rem 1.1rem;
  border-radius: var(--radius-full);
  background: var(--gold); color: #fff;
  font-size: .78rem; font-weight: 700;
  cursor: pointer; transition: all .2s;
  text-decoration: none; border: none;
}

.kh-enroll-sm:hover { background: var(--gold-dark); color: #fff; transform: translateY(-1px); }

/* KH category chips */
.kh-filter-row {
  display: flex; gap: .625rem; flex-wrap: wrap; margin-bottom: 1.75rem;
  position: relative; z-index: 1;
}

.kh-chip {
  padding: .45rem 1.25rem;
  border-radius: var(--radius-full); font-size: .83rem; font-weight: 500;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.6);
  cursor: pointer; transition: all .2s;
}

.kh-chip:hover, .kh-chip.active { background: var(--gold); border-color: var(--gold); color: #fff; }

/* KH page header */
.kh-page-header {
  margin-bottom: 2rem;
}

.kh-page-header .kh-sub-label {
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: rgba(255,255,255,.35); display: block; margin-bottom: .5rem;
}

.kh-page-header h1 {
  font-size: 2.2rem; font-weight: 800; color: #fff;
  margin-bottom: .625rem;
  text-shadow: 0 0 40px rgba(59,130,246,.2);
}

.kh-page-header p { color: rgba(255,255,255,.5); font-size: .95rem; }

/* ================================================================
   TEMPLATE 8 — INTEGRATED WORKFLOW  (General features layout)
================================================================ */

.iw-page {
  background: #f0f2f7;
  flex: 1;
  display: flex;
}

.iw-sidebar {
  width: 60px;
  background: #fff;
  border-right: 1px solid #e4e8ef;
  display: flex; flex-direction: column;
  align-items: center;
  padding: 1.25rem 0;
  gap: .625rem;
  flex-shrink: 0;
}

.iw-icon-btn {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #94a3b8; font-size: .95rem;
  cursor: pointer; transition: all .2s;
}

.iw-icon-btn:hover, .iw-icon-btn.active {
  background: #f0f4ff; color: var(--blue);
}

.iw-body {
  flex: 1;
  padding: 1.75rem 2rem;
  overflow-y: auto;
}

.iw-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.75rem;
}

.iw-main-title {
  font-family: var(--font-heading);
  font-size: 2rem; font-weight: 800; color: var(--primary);
}

.iw-sub-title {
  font-family: var(--font-heading);
  font-size: 1.4rem; font-weight: 700; color: var(--text-muted);
}

.iw-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.iw-card {
  background: #fff;
  border: 1px solid #e4e8ef;
  border-radius: 16px;
  padding: 1.25rem;
  position: relative;
  transition: all .25s;
  cursor: pointer;
}

.iw-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.08); border-color: var(--gold); transform: translateY(-3px); }

.iw-card-num {
  position: absolute; top: -9px; right: -9px;
  width: 22px; height: 22px;
  background: var(--primary); color: #fff;
  border-radius: 50%; font-size: .7rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading);
}

.iw-card h3 { font-size: .95rem; margin-bottom: .5rem; }
.iw-card p  { font-size: .8rem; color: var(--text-muted); line-height: 1.6; }

.iw-card-icon {
  width: 64px; height: 64px;
  border-radius: 12px;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: #c0ccdc;
  margin: .875rem 0;
}

.iw-card-meta {
  display: flex; align-items: center; gap: .5rem;
  margin-top: .875rem;
  font-size: .75rem; color: var(--text-muted);
}

/* ================================================================
   RESPONSIVE OVERRIDES FOR PORTAL PAGES
================================================================ */
@media(max-width: 1024px) {
  .kh-courses-grid     { grid-template-columns: 1fr 1fr; }
  .kh-enroll           { display: none; }
  .kh-sidebar          { width: 180px; }
  .iw-grid             { grid-template-columns: repeat(2, 1fr); }
  .tc-glass-video { display: none !important; }
}

@media(max-width: 768px) {
  .portal-page { flex-direction: column; min-height: auto; }
  .tc-sidebar, .kh-sidebar, .iw-sidebar { display: none; }
  .tc-body, .kh-body, .iw-body { padding: 1.25rem 1rem; width: 100%; }
  
  .tc-glass-body       { grid-template-columns: 1fr; }
  .tc-features         { grid-template-columns: 1fr 1fr; }
  
  /* Teleconsult intro glass card video fix on mobile */
  .tc-glass [style*="position:absolute;right:0"],
  .tc-glass [style*="position: absolute; right: 0"],
  .tc-glass-video {
    display: none !important;
  }
  .tc-glass [style*="padding:1.5rem 2rem"],
  .tc-glass [style*="padding: 1.5rem 2rem"] {
    padding: 1.25rem 1rem !important;
  }
  
  /* Scrollable chips on mobile */
  .tc-filter-row, .kh-filter-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 1.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tc-filter-row::-webkit-scrollbar,
  .kh-filter-row::-webkit-scrollbar {
    display: none;
  }
  .tc-chip, .kh-chip {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .tc-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
  }
  .tc-title-row .btn {
    width: 100%;
    justify-content: center;
  }
  
  .kh-header           { flex-direction: column; }
  .kh-hero-img         { width: 100%; }
  .kh-courses-grid     { grid-template-columns: 1fr; }
  .kh-progress-card    { flex-direction: column; }
  .kh-stats-box        { width: 100%; flex-direction: row; gap: 1rem; }
  .iw-grid             { grid-template-columns: 1fr; }
  .tc-doctors-grid     { grid-template-columns: 1fr; gap: 1rem; }
  .kh-course-grid-full { grid-template-columns: 1fr; }
}

@media(max-width: 480px) {
  .tc-body, .kh-body { padding: 1rem 0.75rem; }
  .tc-main-title, .kh-page-header h1 { font-size: 1.6rem; }
  .tc-features { grid-template-columns: 1fr; }
  .tc-doctor-card { padding: 1.25rem 1rem; }
  .tc-book-btn { width: 100%; justify-content: center; }
  .kh-course-full-head { padding: 1rem; }
  .kh-course-full-body { padding: 1rem; }
}

