/* =========================================================
   INSTALLATION GUIDE PAGE – ctv-guide-* components
   ========================================================= */

.ctv-guide-page { padding-top: 5rem; }

/* ── Hero ─────────────────────────────────────────────── */
.ctv-guide-hero {
  position: relative;
  overflow: hidden;
  background: hsl(220,25%,8%);
  padding: 5rem 0 4rem;
}
.ctv-guide-hero__bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(124,58,237,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,58,237,0.06) 1px, transparent 1px);
  background-size: 64px 64px;
}
.ctv-guide-hero__glow-tl {
  position: absolute; top: 0; left: 0;
  width: 50%; height: 80%;
  background: radial-gradient(ellipse at top left, rgba(124,58,237,0.18), transparent 60%);
}
.ctv-guide-hero__glow-br {
  position: absolute; bottom: 0; right: 0;
  width: 40%; height: 60%;
  background: radial-gradient(ellipse at bottom right, rgba(16,185,129,0.1), transparent 55%);
}
.ctv-guide-hero__inner {
  position: relative; z-index: 2;
  max-width: 56rem; margin: 0 auto; text-align: center;
}
.ctv-guide-hero__title {
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 800; color: #fff; line-height: 1.1;
  margin-bottom: 1rem;
}
.ctv-guide-hero__subtitle {
  font-size: 1.125rem; color: rgba(255,255,255,0.6);
  max-width: 38rem; margin: 0 auto 2.5rem; line-height: 1.7;
}
.ctv-guide-hero__cta { margin-top: 2rem; }

/* Device quick-jump pills */
.ctv-guide-hero__pills {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  justify-content: center; margin-bottom: 2rem;
}
.ctv-guide-pill {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.4rem 0.875rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 99px;
  font-size: 0.8125rem; font-weight: 500;
  color: rgba(255,255,255,0.7);
  transition: var(--tm-transition);
  text-decoration: none;
  white-space: nowrap;
}
.ctv-guide-pill:hover {
  color: #fff;
  background: rgba(124,58,237,0.15);
  border-color: rgba(124,58,237,0.4);
  transform: translateY(-1px);
}

/* ── Before you start ─────────────────────────────────── */
.ctv-guide-prereq {
  background: hsl(220,25%,10%);
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 3rem 0;
}
.ctv-guide-prereq__title {
  font-size: 1.375rem; font-weight: 700; color: #fff;
  text-align: center; margin-bottom: 2rem;
}
.ctv-guide-prereq__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem,1fr));
  gap: 1.25rem;
}
.ctv-guide-prereq__item {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1.25rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 0.875rem;
}
.ctv-guide-prereq__icon { font-size: 1.75rem; flex-shrink: 0; line-height: 1; }
.ctv-guide-prereq__item strong { display: block; font-size: 0.9375rem; font-weight: 700; color: #fff; margin-bottom: 0.375rem; }
.ctv-guide-prereq__item p { font-size: 0.875rem; color: rgba(255,255,255,0.5); line-height: 1.6; }

/* ── Device guide cards ───────────────────────────────── */
.ctv-guide-devices-section { background: var(--tm-bg); }

.ctv-guide-device-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 1.5rem;
  overflow: hidden;
  margin-bottom: 2.5rem;
  transition: var(--tm-transition);
  scroll-margin-top: 6rem;
}
.ctv-guide-device-card:hover {
  border-color: rgba(124,58,237,0.2);
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
}

/* Card header */
.ctv-guide-device-card__header {
  padding: 2rem 2rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.02);
}
.ctv-guide-device-card__title-row {
  display: flex; align-items: flex-start; gap: 1.25rem; flex-wrap: wrap;
  margin-bottom: 1rem;
}
.ctv-guide-device-card__icon {
  font-size: 2.5rem; line-height: 1; flex-shrink: 0;
}
.ctv-guide-device-card__name {
  font-size: 1.5rem; font-weight: 800; color: #fff; line-height: 1.2; margin-bottom: 0.25rem;
}
.ctv-guide-device-card__app {
  font-size: 0.875rem; color: rgba(255,255,255,0.45);
}
.ctv-guide-device-card__app strong { color: hsl(270,70%,65%); }
.ctv-guide-device-card__meta { margin-left: auto; text-align: right; }

.ctv-guide-device-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  font-size: 0.75rem; font-weight: 700;
  background: color-mix(in srgb, var(--badge-color) 20%, transparent);
  border: 1px solid color-mix(in srgb, var(--badge-color) 40%, transparent);
  color: var(--badge-color);
  margin-bottom: 0.5rem;
}

.ctv-guide-device-card__stats {
  display: flex; gap: 0.75rem; flex-wrap: wrap;
  font-size: 0.8125rem; color: rgba(255,255,255,0.4);
}
.ctv-guide-device-card__intro {
  font-size: 0.9375rem; color: rgba(255,255,255,0.6); line-height: 1.7;
}

/* Steps */
.ctv-guide-steps {
  padding: 1.75rem 2rem;
  display: flex; flex-direction: column; gap: 0;
  counter-reset: step-counter;
}
.ctv-guide-step {
  display: flex; gap: 1.25rem; align-items: flex-start;
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  position: relative;
}
.ctv-guide-step:last-child { border-bottom: none; }

/* Connecting line between steps */
.ctv-guide-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: calc(1.25rem - 1px); /* center of the number bubble */
  top: calc(1.25rem + 2.25rem);
  width: 2px;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(124,58,237,0.3), transparent);
}

.ctv-guide-step__num {
  width: 2.25rem; height: 2.25rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #9333ea);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--tm-font-display);
  font-size: 0.875rem; font-weight: 700; color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(124,58,237,0.4);
  position: relative; z-index: 2;
}
.ctv-guide-step__body { flex: 1; padding-top: 0.2rem; }
.ctv-guide-step__title {
  font-size: 1rem; font-weight: 700; color: #fff;
  margin-bottom: 0.375rem;
}
.ctv-guide-step__desc {
  font-size: 0.9rem; color: rgba(255,255,255,0.6); line-height: 1.7;
}

/* Tip box */
.ctv-guide-tip {
  margin: 0 2rem 0;
  padding: 1rem 1.25rem;
  background: rgba(16,185,129,0.06);
  border: 1px solid rgba(16,185,129,0.18);
  border-radius: 0.75rem;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.65;
}

/* Card footer */
.ctv-guide-device-card__footer {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 1.5rem 2rem;
  border-top: 1px solid rgba(255,255,255,0.07);
}

/* ── Compatible players ───────────────────────────────── */
.ctv-guide-players {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 0.75rem;
}
.ctv-guide-player {
  display: flex; align-items: center; gap: 0.875rem;
  padding: 1rem 1.25rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 0.875rem;
  transition: var(--tm-transition);
}
.ctv-guide-player:hover {
  border-color: rgba(124,58,237,0.25);
  background: rgba(124,58,237,0.05);
}
.ctv-guide-player--recommended {
  border-color: rgba(124,58,237,0.25);
  background: rgba(124,58,237,0.07);
}
.ctv-guide-player__icon { font-size: 1.5rem; flex-shrink: 0; }
.ctv-guide-player__info { display: flex; flex-direction: column; gap: 0.125rem; }
.ctv-guide-player__name { font-size: 0.9375rem; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.ctv-guide-player__rec {
  font-size: 0.6875rem; font-weight: 600;
  color: hsl(270,70%,65%);
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.3);
  padding: 0.125rem 0.5rem; border-radius: 99px;
}
.ctv-guide-player__platforms { font-size: 0.8125rem; color: rgba(255,255,255,0.4); }

/* ── Troubleshooting ──────────────────────────────────── */
.ctv-guide-trouble {
  display: flex; flex-direction: column; gap: 1rem;
  max-width: 56rem; margin: 0 auto;
}
.ctv-guide-trouble-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 1rem;
  overflow: hidden;
}
.ctv-guide-trouble-item__q {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: rgba(245,158,11,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 0.9375rem; font-weight: 600; color: #fff;
}
.ctv-guide-trouble-item__icon { font-size: 1.125rem; flex-shrink: 0; }
.ctv-guide-trouble-item__a {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 1rem 1.25rem;
}
.ctv-guide-trouble-item__a svg {
  width: 1rem; height: 1rem; color: hsl(155,65%,55%);
  flex-shrink: 0; margin-top: 3px;
}
.ctv-guide-trouble-item__a p {
  font-size: 0.9rem; color: rgba(255,255,255,0.65); line-height: 1.7;
}

/* ── CTA card ─────────────────────────────────────────── */
.ctv-guide-cta-card {
  max-width: 44rem; margin: 0 auto; text-align: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 2rem; padding: 3.5rem 2.5rem;
  box-shadow: 0 8px 60px rgba(124,58,237,0.15);
  position: relative; overflow: hidden;
}
.ctv-guide-cta-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--tm-gradient-primary);
}
.ctv-guide-cta-card__icon {
  width: 3.5rem; height: 3.5rem;
  background: linear-gradient(135deg,#7c3aed,#9333ea,#ec4899);
  border-radius: 1rem; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.5rem; box-shadow: 0 8px 24px rgba(124,58,237,0.35);
}
.ctv-guide-cta-card__icon svg { width: 1.75rem; height: 1.75rem; color: #fff; }
.ctv-guide-cta-card__title { font-size: clamp(1.75rem,3vw,2.5rem); font-weight: 800; color: #fff; margin-bottom: 1rem; }
.ctv-guide-cta-card__desc { color: rgba(255,255,255,0.55); max-width: 32rem; margin: 0 auto 2rem; line-height: 1.7; }
.ctv-guide-cta-card__btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
  .ctv-guide-hero { padding: 4rem 0 3rem; }
  .ctv-guide-device-card__header,
  .ctv-guide-steps,
  .ctv-guide-device-card__footer { padding-left: 1.25rem; padding-right: 1.25rem; }
  .ctv-guide-tip { margin-left: 1.25rem; margin-right: 1.25rem; }
  .ctv-guide-device-card__title-row { flex-direction: column; gap: 0.75rem; }
  .ctv-guide-device-card__meta { margin-left: 0; text-align: left; }
  .ctv-guide-players { grid-template-columns: 1fr; }
  .ctv-guide-prereq__grid { grid-template-columns: 1fr; }
  .ctv-guide-cta-card { padding: 2.5rem 1.5rem; border-radius: 1.5rem; }
  .ctv-guide-hero__pills { gap: 0.375rem; }
  .ctv-guide-pill { font-size: 0.75rem; padding: 0.35rem 0.7rem; }
  .ctv-guide-step:not(:last-child)::after { display: none; }
}
@media (max-width: 480px) {
  .ctv-guide-step { gap: 0.875rem; }
  .ctv-guide-device-card__footer { flex-direction: column; }
  .ctv-guide-device-card__footer .tm-btn { width: 100%; justify-content: center; }
}
