*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #0078d4;
  --primary-hover: #005a9e;
  --primary-soft: rgba(0, 120, 212, 0.08);
  --text: #1a1a2e;
  --text-secondary: #555770;
  --text-muted: #8e90a6;
  --bg: #ffffff;
  --bg-page: #f6f8fa;
  --bg-hover: #f4f5f7;
  --bg-active: rgba(0, 120, 212, 0.06);
  --border: #ebebef;
  --border-subtle: #f0f0f4;
  --sidebar-w: 272px;
  --header-h: 56px;
  --nav-h: 42px;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --content-max: 960px;
}

html {
  scroll-behavior: auto;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

/* ── Top Bar ── */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 200;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.topbar-logo {
  height: 28px;
  width: auto;
  object-fit: contain;
}

.topbar-divider {
  width: 1px;
  height: 18px;
  background: var(--border);
}

.topbar-label {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 4px;
  border-radius: 6px;
  margin-right: 8px;
}

.menu-toggle:hover {
  background: var(--bg-hover);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-link {
  display: flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 6px;
  transition: color 0.15s var(--ease);
}

.topbar-link:hover {
  color: var(--primary);
}

.topbar-link .material-icons-round {
  font-size: 15px;
}

/* ── Navigation Tabs ── */
.nav-tabs {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: stretch;
  padding: 0 24px;
  gap: 0;
  z-index: 190;
  overflow-x: auto;
}

.nav-tab {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s var(--ease);
}

.nav-tab:hover {
  color: var(--text);
}

.nav-tab.active {
  color: var(--text);
  font-weight: 500;
}

.nav-tab.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px 2px 0 0;
}

/* ── Layout ── */
.layout {
  display: flex;
  margin-top: calc(var(--header-h) + var(--nav-h));
}

/* ── Sidebar ── */
.sidebar {
  position: fixed;
  top: calc(var(--header-h) + var(--nav-h));
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 50;
  padding: 20px 0 40px;
}

.sidebar::-webkit-scrollbar {
  width: 0;
}

.sidebar-section {
  margin-bottom: 8px;
}

.sidebar-heading {
  padding: 6px 20px 6px 20px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  width: 100%;
  font-family: inherit;
  text-align: left;
  transition: color 0.12s var(--ease);
}

.sidebar-heading:hover {
  color: var(--primary);
}

.sidebar-heading-chevron {
  font-size: 16px;
  color: var(--text-muted);
  transition: transform 0.2s var(--ease);
}

.sidebar-heading.open .sidebar-heading-chevron {
  transform: rotate(180deg);
}

.sidebar-links {
  display: none;
  padding: 2px 0 8px;
}

.sidebar-links.open {
  display: block;
}

.sidebar-link {
  display: block;
  width: 100%;
  padding: 5px 20px 5px 20px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  background: none;
  border: none;
  border-left: 2px solid transparent;
  cursor: pointer;
  text-align: left;
  transition: all 0.1s var(--ease);
  line-height: 1.55;
}

.sidebar-link:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.sidebar-link.active {
  color: var(--primary);
  font-weight: 500;
  background: var(--bg-active);
  border-left-color: var(--primary);
}

/* ── Sidebar Overlay (mobile) ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
  z-index: 40;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.sidebar-overlay.open {
  display: block;
}

/* ── Main Content ── */
.content {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: calc(100vh - var(--header-h) - var(--nav-h));
}

.content-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 40px 48px 80px;
}

/* ── Breadcrumb ── */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.breadcrumb-sep {
  font-size: 14px;
  color: var(--border);
}

.breadcrumb-current {
  color: var(--text-secondary);
}

/* ── Page Header ── */
.page-category {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.page-title {
  font-size: 30px;
  font-weight: 650;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 12px;
}

.page-description {
  font-size: 15px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 32px;
  max-width: 700px;
}

/* ── Video ── */
.video-wrapper {
  margin-bottom: 36px;
}

.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  border-radius: 12px;
  overflow: hidden;
  background: #0a0a0a;
  border: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.video-container iframe,
.video-container video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
}

.video-thumbnail {
  position: absolute;
  inset: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s var(--ease);
}

.video-thumbnail:hover img {
  transform: scale(1.02);
}

.video-thumbnail .play-btn {
  position: absolute;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s var(--ease), background 0.25s;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.video-thumbnail .play-btn span {
  color: rgba(255, 255, 255, 0.95);
  font-size: 42px;
  margin-left: 3px;
}

.video-thumbnail:hover .play-btn {
  background: rgba(0, 120, 212, 0.85);
  transform: scale(1.1);
}

.resume-label {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 20px;
  white-space: nowrap;
  pointer-events: none;
}

/* ── Steps ── */
.steps-card {
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 24px 24px;
  margin-bottom: 40px;
}

.steps-heading {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.steps-heading .material-icons-round {
  font-size: 16px;
  color: var(--primary);
}

.steps-ol {
  list-style: none;
  counter-reset: s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.steps-ol li {
  counter-increment: s;
  position: relative;
  padding-left: 32px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.6;
}

.steps-ol li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: 1px;
  width: 22px;
  height: 22px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.steps-ol li strong {
  color: var(--text);
  font-weight: 500;
}

/* ── Divider ── */
.content-divider {
  height: 1px;
  background: var(--border);
  margin: 32px 0;
}

/* ── Prev / Next Nav ── */
.pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.pager-btn {
  display: flex;
  flex-direction: column;
  padding: 14px 16px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s var(--ease);
  text-align: left;
  min-width: 0;
  max-width: 48%;
}

.pager-btn:hover {
  border-color: var(--primary);
}

.pager-label {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.pager-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pager-btn.next {
  margin-left: auto;
  text-align: right;
}

/* ── Responsive ── */
@media (min-width: 1400px) {
  .content-inner {
    max-width: 1060px;
    padding: 48px 56px 80px;
  }
}

@media (max-width: 1024px) {
  :root {
    --sidebar-w: 240px;
  }

  .content-inner {
    padding: 32px 28px 72px;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .topbar-label,
  .topbar-divider {
    display: none;
  }

  .nav-tabs {
    padding: 0 16px;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s var(--ease);
    box-shadow: none;
    z-index: 60;
    background: var(--bg);
    width: 280px;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.06);
  }

  .content {
    margin-left: 0;
  }

  .content-inner {
    padding: 24px 20px 64px;
  }

  .page-title {
    font-size: 24px;
  }

  .pager {
    flex-direction: column;
  }

  .pager-btn {
    max-width: 100%;
  }

  .pager-btn.next {
    margin-left: 0;
  }

  .topbar-link-text {
    display: none;
  }

  .video-thumbnail .play-btn {
    width: 64px;
    height: 64px;
  }

  .video-thumbnail .play-btn span {
    font-size: 36px;
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: 22px;
  }

  .video-container {
    border-radius: 8px;
  }

  .video-container video,
  .video-container iframe {
    border-radius: 8px;
  }

  .video-thumbnail .play-btn {
    width: 56px;
    height: 56px;
  }

  .video-thumbnail .play-btn span {
    font-size: 30px;
  }

  .resume-label {
    font-size: 11px;
    padding: 5px 10px;
  }
}
