/* Help & Guide page styling. Reuses Advantix theme variables from site.css. */

.guide-layout {
    position: relative;
}

/* Sticky table of contents (desktop). Reflows to a normal block under lg. */
.guide-toc {
    padding: 1rem 1.25rem;
}

@media (min-width: 992px) {
    .guide-toc-col {
        position: sticky;
        top: 1rem;
        align-self: flex-start;
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }
}

.guide-toc-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--advantix-text-muted);
    margin-bottom: 0.75rem;
}

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

.guide-toc-list li + li {
    margin-top: 0.35rem;
}

.guide-toc-list a {
    display: block;
    padding: 0.3rem 0.5rem;
    border-radius: var(--advantix-radius-sm);
    color: var(--advantix-text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
}

.guide-toc-list a:hover {
    background: rgba(249, 115, 22, 0.08);
    color: var(--advantix-primary);
}

/* Sections */
.guide-section {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    scroll-margin-top: 1rem;
}

.guide-section-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--advantix-text-primary);
}

/* Player */
.guide-player {
    max-width: 960px;
}

.guide-video {
    width: 100%;
    height: auto;
    border-radius: var(--advantix-radius-md);
    background: #000;
    box-shadow: var(--advantix-shadow-md);
    display: block;
}

.guide-speed {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.6rem;
}

.guide-speed-label {
    font-size: 0.85rem;
    color: var(--advantix-text-muted);
    margin-right: 0.15rem;
}

.guide-rate.active {
    background: var(--advantix-primary);
    border-color: var(--advantix-primary);
    color: #fff;
}

/* Full-walkthrough chapter jump list */
.guide-chapters-label {
    margin: 1.25rem 0 0.5rem;
    font-weight: 600;
    color: var(--advantix-text-secondary);
}

.guide-chapters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.guide-chapter {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.guide-chapter-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 50%;
    background: rgba(249, 115, 22, 0.15);
    font-size: 0.8rem;
    font-weight: 600;
}

.guide-chapter-time {
    font-variant-numeric: tabular-nums;
    color: var(--advantix-text-muted);
    font-size: 0.8rem;
}

/* Read-along transcript */
.guide-read-title {
    font-size: 1.05rem;
    margin: 1.5rem 0 1rem;
    color: var(--advantix-text-secondary);
}

.guide-transcript {
    list-style: none;
    counter-reset: guide-step;
    padding: 0;
    margin: 0;
}

.guide-step {
    counter-increment: guide-step;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) 1fr;
    gap: 1.25rem;
    align-items: start;
    padding: 1rem 0;
    border-top: 1px solid #ededed;
}

.guide-step:first-child {
    border-top: none;
}

.guide-step-shot {
    position: relative;
    display: block;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: var(--advantix-radius-sm);
    line-height: 0;
}

.guide-step-shot img {
    width: 100%;
    height: auto;
    border: 1px solid #e5e5e5;
    border-radius: var(--advantix-radius-sm);
    box-shadow: var(--advantix-shadow-sm);
    transition: box-shadow 0.15s ease;
}

.guide-step-shot:hover img,
.guide-step-shot:focus-visible img {
    box-shadow: 0 0 0 2px var(--advantix-primary), var(--advantix-shadow-md);
}

.guide-step-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #fff;
    opacity: 0;
    transition: opacity 0.15s ease;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.guide-step-shot:hover .guide-step-play,
.guide-step-shot:focus-visible .guide-step-play {
    opacity: 0.95;
}

.guide-step-text {
    margin: 0;
    counter-increment: none;
    color: var(--advantix-text-primary);
    line-height: 1.6;
}

.guide-step-text::before {
    content: counter(guide-step) ". ";
    font-weight: 700;
    color: var(--advantix-primary);
}

/* Stack screenshot above text on narrow screens */
@media (max-width: 767.98px) {
    .guide-step {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }
}
