/* CallGenix — Navy Command Theme */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', sans-serif;
  background: #f4f7fb;
  color: #1e2a4a;
  line-height: 1.6;
  font-size: 15px;
}

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  background: #1c3461;
  border-bottom: 2px solid #e8a020;
  padding: 0 24px;
  height: 58px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.site-logo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: contain;
}

.site-title {
  font-family: 'Monda', monospace;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.01em;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.header-username {
  font-size: 13px;
  color: rgba(255,255,255,0.90);
}

.header-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 0.5px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 500;
  color: #ffffff;
  flex-shrink: 0;
}

/* ── Layout ──────────────────────────────────────────────────── */
.wrapper {
  display: flex;
  min-height: calc(100vh - 60px);
}

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
  width: 240px;
  background: #1c3461;
  border-right: none;
  padding: 4px 0 16px;
  flex-shrink: 0;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
}

.menu { list-style: none; }

.menu-section {
  font-size: 11px;
  font-weight: 500;
  color: #e8a020;
  padding: 0 16px;
  margin: 14px 0 4px;
  letter-spacing: 0.07em;
}

.menu-item a {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 5px 12px;
  margin: 1px 8px;
  border-radius: 6px;
  color: rgba(255,255,255,0.90);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  border-left: 2px solid transparent;
  transition: color 0.15s ease, background 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
}

.menu-item a:hover {
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.08);
  text-decoration: none;
}

.menu-item.active a {
  background: #e8a020;
  color: #ffffff;
  border-left: 2px solid transparent;
  font-weight: 500;
}

.menu-item.active a:hover { background: #d49018; }

.menu-item a i {
  font-size: 16px;
  flex-shrink: 0;
}

/* ── Content wrap ────────────────────────────────────────────── */
.content-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.page-topbar {
  background: #ffffff;
  border-bottom: 0.5px solid #d8dde8;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 60px;
  z-index: 50;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #8090b8;
}

.breadcrumb i { font-size: 14px; }
.breadcrumb-sep { color: #c8d4e8; }
.breadcrumb-current { color: #1c3461; font-weight: 500; }

.topbar-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: #e8a020;
  text-decoration: none;
  font-weight: 500;
}

.topbar-action:hover { text-decoration: underline; }

/* ── Content area ────────────────────────────────────────────── */
.content {
  padding: 24px 28px;
  background: #f4f7fb;
}

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: #ffffff;
  border: 0.5px solid #d8dde8;
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 16px;
}

.card:last-child { margin-bottom: 0; }

.card-title {
  font-size: 13px;
  font-weight: 500;
  color: #1a1a1a;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title i { font-size: 15px; }

/* ── Profile ─────────────────────────────────────────────────── */
.profile-row {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.profile-photo {
  width: 92px;
  height: auto;
  border-radius: 10px;
  object-fit: contain;
  flex-shrink: 0;
}

.profile-name {
  font-size: 18px;
  font-weight: 500;
  color: #1c3461;
  margin: 0 0 4px;
}

.profile-role {
  font-size: 13px;
  color: #8090b8;
  margin: 0 0 10px;
}

.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }

.tag {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(28,52,97,0.06);
  color: #1c3461;
  border: 0.5px solid rgba(28,52,97,0.2);
}

.profile-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: #1c5ab4;
  text-decoration: none;
}

.profile-link:hover { text-decoration: underline; }

/* ── Divider ─────────────────────────────────────────────────── */
.divider { height: 0.5px; background: #e8edf5; margin: 16px 0; }

/* ── Stats grid ──────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.stat-box {
  background: #f4f7fb;
  border: 0.5px solid #d8dde8;
  border-radius: 8px;
  padding: 12px 14px;
}

.stat-label { font-size: 11px; color: #8090b8; margin: 0 0 4px; }
.stat-value { font-size: 13px; color: #1c3461; font-weight: 500; line-height: 1.4; margin: 0; }

/* ── Prose ───────────────────────────────────────────────────── */
.card p {
  font-size: 14px;
  color: #4a5a7a;
  line-height: 1.8;
  margin: 0 0 10px;
}

.card p:last-child { margin-bottom: 0; }
.card p strong { color: #1c3461; }
.card p a { color: #1c5ab4; }

/* ── Sub-heading inside card ─────────────────────────────────── */
.sub-heading {
  font-size: 14px;
  font-weight: 500;
  color: #1c3461;
  margin: 18px 0 8px;
  padding-left: 10px;
  border-left: 3px solid #e8a020;
  border-radius: 0;
}

/* ── Lists ───────────────────────────────────────────────────── */
.content-list {
  margin: 0 0 12px 18px;
  font-size: 14px;
  color: #4a5a7a;
  line-height: 1.8;
}

.content-list li { margin-bottom: 6px; }
.content-list li:last-child { margin-bottom: 0; }
.content-list li strong { color: #1c3461; }
.content-list ul { margin-top: 4px; margin-left: 16px; }

/* ── Images ──────────────────────────────────────────────────── */
.content-img {
  max-width: 85%;
  height: auto;
  display: block;
  border-radius: 8px;
  border: 0.5px solid #d8dde8;
  margin: 10px 0;
}

.content-img.full-width { width: 85%; }

.img-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 10px 0;
}

.img-row .content-img { flex: 1 1 180px; margin: 0; max-width: 100%; }

.img-caption {
  font-size: 12px;
  color: #8090b8;
  text-align: center;
  margin-top: -4px;
  margin-bottom: 8px;
}

/* ── Video ───────────────────────────────────────────────────── */
.video-wrap {
  margin: 10px 0;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  border: 0.5px solid #d8dde8;
}

.video-wrap video { width: 100%; display: block; max-height: 520px; }

/* ── Blockquote ──────────────────────────────────────────────── */
.highlight-block {
  background: #fef8ec;
  border-left: 3px solid #e8a020;
  border-radius: 0 6px 6px 0;
  padding: 12px 16px;
  margin: 12px 0;
  font-style: italic;
  font-size: 14px;
  color: #5a4820;
}

/* ── Cert row ────────────────────────────────────────────────── */
.cert-row { display: flex; gap: 12px; }

.cert-box {
  flex: 1;
  border-radius: 8px;
  background: #f4f7fb;
  border: 0.5px solid #d8dde8;
  overflow: hidden;
}

.cert-box img { width: 100%; height: auto; display: block; }

/* ── Feature blocks ──────────────────────────────────────────── */
.feature-block {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 0.5px solid #edf0f8;
}

.feature-block:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.feature-title {
  font-size: 14px;
  font-weight: 500;
  color: #1c3461;
  margin: 10px 0 5px;
}

.feature-block p {
  font-size: 14px;
  color: #4a5a7a;
  line-height: 1.75;
  margin: 0;
}

/* ── Next list ───────────────────────────────────────────────── */
.next-list { margin-left: 0; list-style: none; }
.next-list li { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 0.5px solid #edf0f8; }
.next-list li:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.next-list li p { font-size: 14px; color: #4a5a7a; margin: 0; line-height: 1.7; }
.next-list li p strong { color: #1c3461; }

/* ── Global links ────────────────────────────────────────────── */
a { color: #1c5ab4; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #dce4f2; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #c8d4e8; }

/* ── Tablet (769px – 1024px) ────────────────────────────────── */
@media (max-width: 1024px) and (min-width: 769px) {
  .sidebar { width: 170px; }
  .menu-item a { font-size: 13px; padding: 5px 10px; }
}

/* ── Mobile (≤768px) ─────────────────────────────────────────── */
@media (max-width: 768px) {

  /* ── Sidebar: 130px with visible text labels ── */
  .sidebar {
    width: 130px;
    min-width: 130px;
    flex-shrink: 0;
    position: relative;
    height: auto;
    padding: 8px 0;
    
  }

  .menu-section {
    display: block;
    font-size: 9px;
    padding: 0 8px;
    margin: 10px 0 3px;
  }

  .menu-item a {
    padding: 5px 6px;
    margin: 1px 4px;
    font-size: 11px;
    white-space: normal;
    overflow: visible;
    border-left: none;
    border-radius: 6px;
    gap: 5px;
    align-items: flex-start;
    line-height: 1.25;
  }

  .menu-item a i { font-size: 14px; flex-shrink: 0; margin-top: 1px; }
  .menu-item a span { display: block; }
  .menu-item.active a { border-radius: 6px; }

  /* ── Header ── */
  .site-header { padding: 0 12px; }
  .site-title { font-size: 13px; }
  .header-username { display: none; }

  /* ── Topbar ── */
  .page-topbar { padding: 8px 10px; }
  .breadcrumb { font-size: 12px; }
  .topbar-action span { display: none; }

  /* ── Content: white bg, generous padding ── */
  .content {
    padding: 16px 14px 24px;
    background: #ffffff;
  }

  /* ── Cards: flat on mobile — no box, just spacing + separator ── */
  .card {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0 0 22px 0;
    margin-bottom: 22px;
    border-bottom: 1px solid #e8edf5;
  }

  .card:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
  }

  /* ── Card title: larger, navy ── */
  .card-title {
    font-size: 15px;
    color: #1c3461;
    margin-bottom: 14px;
    gap: 8px;
  }

  .card-title i { font-size: 17px; }

  /* ── Body text: larger, aired ── */
  .card p {
    font-size: 16px;
    line-height: 1.9;
    margin-bottom: 16px;
    color: #2d3a5a;
  }

  /* ── Sub-headings ── */
  .sub-heading { font-size: 15px; margin: 20px 0 10px; }

  /* ── Lists ── */
  .content-list { font-size: 16px; line-height: 1.9; }

  /* ── Stats: stack vertically ── */
  .stats-grid { grid-template-columns: 1fr; gap: 8px; }
  .stat-box { padding: 10px 12px; }
  .stat-label { font-size: 11px; }
  .stat-value { font-size: 14px; }

  /* ── Profile ── */
  .profile-row { flex-direction: column; align-items: center; gap: 14px; }
  .profile-photo { width: 120px; }
  .profile-name { font-size: 20px; text-align: center; }
  .profile-role { font-size: 14px; text-align: center; }
  .tags { justify-content: center; }
  .profile-link { font-size: 14px; }

  /* ── Images ── */
  .img-row { flex-direction: column; }
  .content-img { border-radius: 6px; }

  /* ── Video ── */
  .video-wrap { border-radius: 6px; }
  .video-wrap video { max-height: 220px; }

  /* ── Certs ── */
  .cert-row { flex-direction: column; }

  /* ── Highlight block ── */
  .highlight-block { font-size: 15px; line-height: 1.8; }

  /* ── Feature blocks ── */
  .feature-title { font-size: 15px; }
  .feature-block p { font-size: 16px; line-height: 1.85; }

  /* ── Next list ── */
  .next-list li p { font-size: 15px; line-height: 1.8; }
}

@media (max-width: 768px) {
  .content-img { max-width: 85%; }
  .content-img.full-width { width: 85%; }
  .img-row .content-img { max-width: 100%; }
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.4); }

/* ── Sidebar era groups ───────────────────────────────────────── */
.menu-group { list-style: none; margin: 6px 0 2px; }

.menu-group-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: calc(100% - 16px);
  margin: 0 8px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.06);
  border: none;
  border-left: 2px solid rgba(232,160,32,0.5);
  border-radius: 0 6px 6px 0;
  cursor: pointer;
  transition: background 0.15s;
}

.menu-group-btn:hover { background: rgba(255,255,255,0.1); }

.menu-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-group-header > i { font-size: 15px; color: #e8a020; }

.menu-group-era {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #e8a020;
  line-height: 1.3;
  text-align: left;
}

.menu-group-sub {
  display: block;
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  line-height: 1.3;
  text-align: left;
}

.menu-group-chevron {
  font-size: 14px;
  color: rgba(255,255,255,0.4);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.menu-group.open .menu-group-chevron { transform: rotate(180deg); }

.menu-group-items {
  list-style: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

/* Era group mobile fixes */
@media (max-width: 768px) {
  .sidebar { width: 160px; min-width: 160px; }
  .menu-group-btn { width: calc(100% - 8px); margin: 0 4px; padding: 5px 6px; }
  .menu-group-era { font-size: 10px; }
  .menu-group-sub { display: none; }
  .menu-group-header > i { font-size: 13px; }
  .menu-group-chevron { font-size: 12px; }
  .menu-group-items .menu-item a { overflow: hidden; white-space: normal; }
}

.no-transition * { transition: none !important; }

html, body { overflow-x: hidden; }

@media (max-width: 768px) { .sidebar { top: 0; } }

/* Mobile vertical space optimisation */
@media (max-width: 768px) {
  .stats-grid { display: block; }
  .stat-box { background: transparent; border: none; border-radius: 0; padding: 5px 0; margin-bottom: 0; border-bottom: 0.5px solid #e8edf5; display: flex; align-items: baseline; gap: 20px; }
  .stat-box:last-child { border-bottom: none; }
  .stat-label { font-size: 12px; color: #1c3461; font-weight: 500; min-width: 90px; flex-shrink: 0; margin: 0; }
  .stat-value { font-size: 14px; margin: 0; }
  .feature-block { margin-bottom: 12px; padding-bottom: 12px; }
  .divider { margin: 10px 0; }
  .sub-heading { margin: 12px 0 6px; }
  .card-title { margin-bottom: 10px; }
  .highlight-block { padding: 10px 14px; margin: 10px 0; }
  .next-list li { margin-bottom: 10px; padding-bottom: 10px; }
}

/* ── Sidebar toggle button ── */
.sidebar-toggle { background: none; border: none; cursor: pointer; color: rgba(255,255,255,0.85); padding: 8px; display: flex; align-items: center; justify-content: center; border-radius: 6px; transition: background 0.15s, color 0.15s; flex-shrink: 0; margin-right: 8px; }
.sidebar-toggle:hover { background: rgba(255,255,255,0.12); color: #ffffff; }
.sidebar-toggle i { font-size: 22px; }

/* ── Sidebar collapsible ── */
.sidebar { transition: width 0.3s ease, min-width 0.3s ease, padding 0.3s ease; }
.sidebar.collapsed { width: 0 !important; min-width: 0 !important; padding: 0 !important; overflow: hidden; }
.no-transition, .no-transition * { transition: none !important; }

/* ── Sidebar rail tab ── */
.sidebar-tab { flex-shrink: 0; width: 18px; background: #1c3461; border: none; border-right: 1px solid rgba(255,255,255,0.1); cursor: pointer; color: #e8a020; display: flex; align-items: flex-start; justify-content: center; padding-top: 48px; position: sticky; top: 60px; height: calc(100vh - 60px); transition: background 0.15s; z-index: 50; }
.sidebar-tab:hover { background: rgba(255,255,255,0.08); }
.sidebar-tab i { font-size: 13px; transition: transform 0.3s ease; }
.sidebar.collapsed + .sidebar-tab i { transform: rotate(180deg); }
@media (max-width: 768px) { .sidebar-tab { position: relative; top: 0; height: auto; padding: 16px 0; align-items: center; } }

@media (min-width: 769px) { .sidebar-toggle { display: none; } }

.sidebar-tab { background: #0f1e3a; border-right: 2px solid #e8a020; }
.sidebar-tab i { font-size: 16px; }

.sidebar-tab { background: #0f1e3a; border-right: 2px solid #e8a020; }
.sidebar-tab i { font-size: 16px; }

/* Icon rail */
.rail-toggle-item { list-style: none; }
.rail-toggle { display: flex; align-items: center; gap: 20px; width: 100%; padding: 10px 14px; background: rgba(0,0,0,0.25); border: none; border-bottom: 1px solid rgba(255,255,255,0.12); cursor: pointer; color: #e8a020; margin-bottom: 4px; white-space: nowrap; overflow: hidden; -webkit-tap-highlight-color: transparent; }
.rail-toggle:hover, .rail-toggle:focus { background: rgba(255,255,255,0.1); outline: none; }
.rail-toggle i { font-size: 22px; flex-shrink: 0; }
.rail-toggle span { font-size: 12px; color: rgba(255,255,255,0.65); font-family: "DM Sans",sans-serif; }

/* Collapsed icon-rail state */
.sidebar.collapsed { width: 52px !important; min-width: 52px !important; padding: 4px 0 !important; }
.sidebar.collapsed .rail-toggle { justify-content: center; padding: 12px 4px; }
.sidebar.collapsed .menu-section,
.sidebar.collapsed .menu-item a span,
.sidebar.collapsed .menu-group-era,
.sidebar.collapsed .menu-group-sub,
.sidebar.collapsed .menu-group-chevron,
.sidebar.collapsed .rail-toggle span { display: none !important; }
.sidebar.collapsed .menu-item a { justify-content: center; padding: 10px 4px; margin: 1px 4px; border-left: none; }
.sidebar.collapsed .menu-group-btn { justify-content: center; padding: 8px 4px; width: calc(100% - 8px); margin: 2px 4px; border-left: none; }
.sidebar.collapsed .menu-group-items { max-height: 800px !important; }
.sidebar-tab { display: none; }

.rail-toggle span { display: none; }
.sidebar.collapsed .menu-group-btn { display: none; }
.breadcrumb-current { font-size: 15px; font-weight: 700; }
@media (max-width: 768px) { .breadcrumb-current { font-size: 17px; font-weight: 700; } .breadcrumb { gap: 8px; } }

.content-img { box-shadow: 8px 8px 4px rgba(0,0,0,0.38); margin: 30px auto; max-width: 75%; }


/* ── Fixed sidebar + scrollable content ─────────────────────────────
   Replace the previous sidebar-fix block at the bottom of style.css
   with this complete updated version.
──────────────────────────────────────────────────────────────────── */

html, body { height: 100%; }

body { display: flex; flex-direction: column; overflow: hidden; }

.site-header { flex-shrink: 0; position: sticky; top: 0; z-index: 200; }

.wrapper { flex: 1; overflow: hidden; display: flex; min-height: 0; }

/* Sidebar animates width smoothly so content area expands/contracts */
.sidebar {
  flex-shrink: 0;
  height: 100%;
  overflow-y: auto;
  transition: width 0.25s ease, min-width 0.25s ease;
}

/* Content fills whatever space the sidebar leaves behind */
.content-wrap {
  flex: 1;
  height: 100%;
  overflow-y: auto;
  min-width: 0;
  transition: none;
}

/* Stop the page topbar from floating over content */
.page-topbar { position: static; }

/* On mobile: fully hide the sidebar when collapsed */
@media (max-width: 768px) {
  .sidebar.collapsed {
    width: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    border: none;
  }
}

