/* ==========================================================================
   GTM Playbook — Interactive Playbook Page
   Scoped under .gtm-pb namespace
   ========================================================================== */

/* ---------- Layout: sidebar + main content ---------- */
.gtm-pb-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  align-items: start;
}

/* ---------- Sticky sidebar nav ---------- */
.gtm-pb-nav {
  padding: 32px 24px 32px 0;
  border-right: 1px solid var(--border-light);
}

.gtm-pb-nav.is-fixed {
  position: fixed;
  top: 100px;
  width: 240px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  z-index: 50;
}

.gtm-pb-nav.is-bottom {
  position: absolute;
  bottom: 0;
  width: 240px;
}

/* Spacer to prevent layout shift when nav goes fixed */
.gtm-pb-nav-spacer {
  display: none;
}

.gtm-pb-nav-spacer.active {
  display: block;
  width: 240px;
}

.gtm-pb-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gtm-pb-nav__item {
  display: block;
}

.gtm-pb-nav__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  transition: all 0.2s ease;
}

.gtm-pb-nav__link:hover {
  background: var(--surface-gray);
  color: var(--brand-primary);
}

.gtm-pb-nav__link.active {
  background: var(--brand-secondary);
  color: var(--brand-primary);
  font-weight: 600;
}

.gtm-pb-nav__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface-gray);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.gtm-pb-nav__link.active .gtm-pb-nav__num {
  background: var(--brand-primary);
  color: #fff;
}

/* ---------- Main content ---------- */
.gtm-pb-main {
  padding: 0 0 0 48px;
  min-width: 0;
}

/* ---------- Hero ---------- */
.gtm-pb-hero {
  padding: 120px 0 80px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.gtm-pb-hero h1 {
  font-size: 3rem;
  font-weight: 700;
  color: var(--brand-primary);
  margin-bottom: 16px;
  line-height: 1.15;
}

.gtm-pb-hero__sub {
  font-size: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 640px;
  margin: 0 auto 40px;
}

/* Consolidation visual */
.gtm-pb-hero__visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 48px;
}

.gtm-pb-hero__before {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: right;
}

.gtm-pb-hero__before span {
  font-size: 13px;
  color: var(--text-disabled);
  text-decoration: line-through;
  line-height: 1.5;
}

.gtm-pb-hero__arrow {
  font-size: 24px;
  color: var(--brand-primary);
  flex-shrink: 0;
}

.gtm-pb-hero__after {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--brand-secondary);
  border-radius: 10px;
}

.gtm-pb-hero__after span {
  font-size: 15px;
  font-weight: 700;
  color: var(--brand-primary);
}

/* Logo bar */
.gtm-pb-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  padding: 24px 0;
  opacity: 0.5;
}

.gtm-pb-logos img {
  height: 20px;
  width: auto;
}

.gtm-pb-logos__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-600);
  font-weight: 600;
  width: 100%;
  text-align: center;
  margin-bottom: 8px;
}

/* ---------- Chapter sections ---------- */
.gtm-pb-chapter {
  padding: 80px 0;
  border-top: 1px solid var(--border-light);
}

.gtm-pb-chapter:first-of-type {
  border-top: none;
}

.gtm-pb-chapter__header {
  margin-bottom: 40px;
}

.gtm-pb-chapter__num {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-primary);
  background: var(--brand-secondary);
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.gtm-pb-chapter__title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand-primary);
  margin-bottom: 8px;
  line-height: 1.2;
}

.gtm-pb-chapter__hook {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Methodology content */
.gtm-pb-methodology {
  font-size: 1.0625rem;
  color: #333;
  line-height: 1.75;
  max-width: 720px;
  margin-bottom: 40px;
}

.gtm-pb-methodology p {
  margin-bottom: 16px;
}

.gtm-pb-methodology p:last-child {
  margin-bottom: 0;
}

.gtm-pb-methodology strong {
  color: var(--brand-primary);
  font-weight: 600;
}

/* ---------- "Inside graph8" block ---------- */
.gtm-pb-g8-block {
  border-left: 3px solid var(--brand-secondary);
  padding: 24px 0 24px 24px;
  margin-bottom: 40px;
}

.gtm-pb-g8-block__label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
}

.gtm-pb-g8-block__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--brand-primary);
  margin-bottom: 8px;
  line-height: 1.3;
}

.gtm-pb-g8-block__desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 640px;
}

/* ---------- Key metrics bar ---------- */
.gtm-pb-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--brand-primary);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 40px;
}

.gtm-pb-stats__item {
  background: var(--brand-primary);
  padding: 24px 20px;
  text-align: center;
}

.gtm-pb-stats__value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand-secondary);
  margin-bottom: 4px;
  line-height: 1.2;
}

.gtm-pb-stats__label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.4;
}

/* ---------- Case study proof card ---------- */
.gtm-pb-proof {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px;
  background: var(--surface-gray);
  border-radius: 12px;
  border: 1px solid var(--border-light);
  margin-bottom: 32px;
}

.gtm-pb-proof__icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  flex-shrink: 0;
  object-fit: contain;
}

.gtm-pb-proof__body {
  flex: 1;
}

.gtm-pb-proof__company {
  font-size: 15px;
  font-weight: 700;
  color: var(--brand-primary);
  margin-bottom: 4px;
}

.gtm-pb-proof__result {
  font-size: 15px;
  color: #333;
  line-height: 1.5;
  margin-bottom: 4px;
}

.gtm-pb-proof__industry {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Multiple proof cards side by side */
.gtm-pb-proof-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.gtm-pb-proof-row .gtm-pb-proof {
  margin-bottom: 0;
}

/* ---------- Micro CTA ---------- */
.gtm-pb-micro-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--brand-primary);
  text-decoration: none;
  padding: 12px 0;
  transition: gap 0.2s ease;
  cursor: pointer;
  background: none;
  border: none;
}

.gtm-pb-micro-cta:hover {
  gap: 12px;
}

.gtm-pb-micro-cta::after {
  content: '\2192';
}

/* ---------- Handoff stories (Ch 7 & 9) ---------- */
.gtm-pb-handoff-story {
  background: #fff;
  border-left: 4px solid var(--brand-secondary);
  padding: 24px 24px 24px 28px;
  margin-bottom: 20px;
  border-radius: 0 12px 12px 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.gtm-pb-handoff-story__quote {
  font-size: 1rem;
  color: #333;
  line-height: 1.7;
  font-style: italic;
  margin-bottom: 8px;
}

.gtm-pb-handoff-story__source {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-primary);
}

/* ---------- Power dialer sub-section ---------- */
.gtm-pb-dialer {
  background: var(--surface-gray);
  border-radius: 12px;
  padding: 32px;
  margin: 32px 0;
}

.gtm-pb-dialer__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* no icon - clean text only */

.gtm-pb-dialer__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.gtm-pb-dialer__metric {
  text-align: center;
  padding: 16px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--border-light);
}

.gtm-pb-dialer__metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand-primary);
  margin-bottom: 4px;
}

.gtm-pb-dialer__metric-label {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ---------- Final CTA section ---------- */
.gtm-pb-final-cta {
  background: var(--brand-primary);
  padding: 80px 40px;
  text-align: center;
  border-radius: 16px;
  margin: 40px 0 80px;
}

.gtm-pb-final-cta h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.gtm-pb-final-cta p {
  font-size: 1.125rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 32px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.gtm-pb-final-cta .cbtn {
  font-size: 16px;
}

.gtm-pb-final-cta__logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-top: 40px;
  flex-wrap: wrap;
  opacity: 0.4;
}

.gtm-pb-final-cta__logos img {
  height: 18px;
  width: auto;
  filter: brightness(0) invert(1);
}

/* ---------- Floating CTA ---------- */
.gtm-pb-float-cta {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.3s ease;
}

.gtm-pb-float-cta.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.gtm-pb-float-cta .cbtn {
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  font-size: 14px;
}

/* ---------- Progress bar (top) ---------- */
.gtm-pb-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--brand-secondary);
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  .gtm-pb-layout {
    grid-template-columns: 1fr;
  }

  .gtm-pb-nav,
  .gtm-pb-nav.is-fixed,
  .gtm-pb-nav.is-bottom {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    width: 100% !important;
    border-right: none;
    border-bottom: 1px solid var(--border-light);
    padding: 12px 16px;
    background: #fff;
    z-index: 100;
    overflow-x: auto;
    overflow-y: hidden;
    max-height: none;
    bottom: auto;
  }

  .gtm-pb-nav-spacer.active {
    display: block;
    width: 100%;
    height: 60px;
  }

  .gtm-pb-nav__list {
    flex-direction: row;
    gap: 4px;
    flex-wrap: nowrap;
    min-width: max-content;
  }

  .gtm-pb-nav__link {
    padding: 8px 14px;
    font-size: 13px;
    white-space: nowrap;
  }

  .gtm-pb-nav__num {
    width: 22px;
    height: 22px;
    font-size: 11px;
  }

  .gtm-pb-main {
    padding: 0 16px;
  }

  .gtm-pb-hero {
    padding: 60px 0 40px;
  }

  .gtm-pb-hero h1 {
    font-size: 2rem;
  }

  .gtm-pb-chapter {
    padding: 48px 0;
  }

  .gtm-pb-chapter__title {
    font-size: 1.5rem;
  }

  .gtm-pb-dialer__grid {
    grid-template-columns: 1fr;
  }

  .gtm-pb-final-cta {
    padding: 48px 24px;
    margin: 24px 0 48px;
  }

  .gtm-pb-final-cta h2 {
    font-size: 1.5rem;
  }

  .gtm-pb-float-cta {
    bottom: 16px;
    right: 16px;
  }
}

@media (max-width: 576px) {
  .gtm-pb-stats {
    grid-template-columns: 1fr;
  }

  .gtm-pb-proof-row {
    grid-template-columns: 1fr;
  }

  .gtm-pb-hero__visual {
    flex-direction: column;
  }

  .gtm-pb-hero__arrow {
    transform: rotate(90deg);
  }

  .gtm-pb-g8-block {
    padding: 16px 0 16px 16px;
  }

  .gtm-pb-hero__visual {
    flex-direction: column;
    gap: 16px;
  }

  .gtm-pb-hero__before {
    text-align: center;
  }
}
