/* ============================================
   BrightPath ESG - Guide Page (GitBook Style)
   ============================================ */

.guide-body {
  padding-top: var(--header-height);
}

/* --- Layout --- */
.guide-layout {
  display: grid;
  grid-template-columns: 300px 1fr 220px;
  min-height: calc(100vh - var(--header-height));
  max-width: 1920px;
  margin: 0 auto;
}

/* --- Sidebar --- */
.guide-sidebar {
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  background: var(--white);
  border-right: 1px solid #E8E8E8;
  padding: 32px 0;
  display: flex;
  flex-direction: column;
}

.guide-sidebar-header {
  padding: 0 24px 24px;
  border-bottom: 1px solid #E8E8E8;
  margin-bottom: 16px;
}

.guide-sidebar-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 4px;
}

.guide-sidebar-header p {
  font-size: 12px;
  color: var(--gold-dark);
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* --- Sidebar Navigation --- */
.guide-nav {
  flex: 1;
  padding: 0 12px;
}

.guide-nav-group {
  margin-bottom: 24px;
}

.guide-nav-group-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 8px 12px;
  margin-bottom: 4px;
}

.guide-nav-link {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--gray-700);
  border-radius: 8px;
  transition: all 0.15s;
  border-left: 2px solid transparent;
}

.guide-nav-link:hover {
  background: var(--gray-100);
  color: var(--black);
}

.guide-nav-link.active {
  background: rgba(26, 39, 68, 0.06);
  color: var(--navy);
  font-weight: 600;
  border-left-color: var(--navy);
}

/* --- Sidebar CTA --- */
.guide-sidebar-cta {
  padding: 20px 24px;
  border-top: 1px solid #E8E8E8;
  margin-top: auto;
}

.guide-sidebar-cta p {
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 12px;
}

.guide-sidebar-cta .btn {
  font-size: 13px;
  padding: 10px 16px;
}

/* --- Mobile Sidebar Toggle --- */
.guide-sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 800;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

/* --- Content Area --- */
.guide-content {
  max-width: 100%;
  padding: 48px 80px 80px;
}

/* --- Article --- */
.guide-article {
  max-width: 100%;
  padding-bottom: 80px;
  margin-bottom: 60px;
  border-bottom: 1px solid #E8E8E8;
}

.guide-article:last-of-type {
  border-bottom: none;
}

.guide-breadcrumb {
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 16px;
}

.guide-article h1 {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 20px;
  line-height: 1.3;
}

.guide-lead {
  font-size: 17px;
  color: var(--gray-700);
  line-height: 1.8;
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid #E8E8E8;
}

.guide-article h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--black);
  margin-top: 48px;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--gold);
  display: inline-block;
}

.guide-article p {
  font-size: 15px;
  color: var(--gray-700);
  line-height: 1.8;
  margin-bottom: 16px;
}

.guide-article ul {
  margin-bottom: 24px;
  padding-left: 0;
}

.guide-article ul li {
  font-size: 15px;
  color: var(--gray-700);
  line-height: 1.8;
  padding: 4px 0 4px 20px;
  position: relative;
}

.guide-article ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
}

/* --- Table --- */
.guide-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 32px;
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
}

.guide-table th,
.guide-table td {
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid #E8E8E8;
}

.guide-table th {
  background: var(--gray-100);
  font-weight: 600;
  color: var(--black);
}

.guide-table td {
  color: var(--gray-700);
}

/* --- Badge --- */
.guide-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}

.guide-badge--gold {
  background: rgba(212, 168, 67, 0.15);
  color: var(--gold-dark);
}

.guide-badge--silver {
  background: var(--gray-100);
  color: var(--gray-700);
}

/* --- Cards Grid --- */
.guide-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.guide-card {
  padding: 20px;
  background: var(--gray-100);
  border-radius: 8px;
  border-left: 3px solid var(--navy);
}

.guide-card-num {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-dark);
  margin-bottom: 8px;
}

.guide-card h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 4px;
}

.guide-card p {
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 0;
}

/* --- Callout --- */
.guide-callout {
  background: rgba(26, 39, 68, 0.04);
  border-left: 4px solid var(--navy);
  padding: 20px 24px;
  border-radius: 0 4px 4px 0;
  margin-bottom: 32px;
}

.guide-callout p {
  margin-bottom: 0;
}

.guide-callout ul {
  margin-bottom: 0;
}

.guide-callout--warning {
  background: rgba(212, 168, 67, 0.08);
  border-left-color: var(--gold);
}

/* --- Checklist --- */
.guide-checklist li::before {
  content: '☐';
  background: none;
  width: auto;
  height: auto;
  border-radius: 0;
  font-size: 14px;
  top: 5px;
  left: 0;
}

/* --- Steps --- */
.guide-steps {
  margin-bottom: 32px;
}

.guide-step {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
}

.guide-step-num {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
}

.guide-step-body h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 4px;
}

.guide-step-body p {
  font-size: 14px;
  color: var(--gray-500);
  margin-bottom: 0;
}

/* --- Tag Grid --- */
.guide-tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.guide-tag {
  padding: 6px 14px;
  background: var(--gray-100);
  color: var(--gray-700);
  font-size: 13px;
  border-radius: 8px;
}

/* --- Footer CTA --- */
.guide-footer-cta {
  text-align: center;
  padding: 60px 0;
}

.guide-footer-cta h2 {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 12px;
}

.guide-footer-cta p {
  font-size: 16px;
  color: var(--gray-500);
  margin-bottom: 24px;
}

/* --- Active nav --- */
.nav-link--active {
  color: var(--navy) !important;
  font-weight: 600;
}

/* --- Right TOC (Table of Contents) --- */
.guide-toc {
  position: sticky;
  top: calc(var(--header-height) + 48px);
  align-self: start;
  padding: 20px 16px;
  border-left: 1px solid #E8E8E8;
  max-height: calc(100vh - var(--header-height) - 96px);
  overflow-y: auto;
}

.guide-toc-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.guide-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.guide-toc-list li {
  margin-bottom: 6px;
}

.guide-toc-list a {
  font-size: 13px;
  color: var(--gray-500);
  text-decoration: none;
  line-height: 1.5;
  display: block;
  padding: 2px 0 2px 10px;
  border-left: 2px solid transparent;
  transition: all 0.2s;
}

.guide-toc-list a:hover {
  color: var(--navy);
}

.guide-toc-list a.active {
  color: var(--navy);
  font-weight: 600;
  border-left-color: var(--navy);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .guide-layout {
    grid-template-columns: 300px 1fr;
  }
  .guide-toc {
    display: none;
  }
  .guide-content {
    padding: 40px 36px 60px;
  }
}

@media (max-width: 768px) {
  .guide-layout {
    grid-template-columns: 1fr;
  }

  .guide-sidebar {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    width: 280px;
    z-index: 800;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
  }

  .guide-sidebar.open {
    display: flex;
  }

  .guide-sidebar-toggle {
    display: flex;
  }

  .guide-content {
    padding: 32px 20px 60px;
  }

  .guide-article h1 {
    font-size: 28px;
  }

  .guide-lead {
    font-size: 15px;
  }

  .guide-article h2 {
    font-size: 19px;
  }

  .guide-cards {
    grid-template-columns: 1fr 1fr;
  }

  .guide-footer-cta h2 {
    font-size: 22px;
  }
}
