/* ============ Front-page "Free tool guide" carousel (v0.3.94) ============
   Tokens: existing --course-* custom properties only (palette-tokens is a
   declared dependency of this stylesheet). No new colors. */

/* v0.3.94: the guide is injected at the top of the front-page content for
   anonymous visitors (front-tool-guide.php). Scoped to .ppfb-tool-guide so
   nothing outside the section is touched. */
.ppfb-tool-guide {
    margin: 0 0 2.5rem;
    padding: 2.5rem 1rem;
    background: var(--course-egret);
    border-bottom: 1px solid var(--course-candied-ginger);
}
.ppfb-tool-guide-inner {
    max-width: 1100px;
    margin: 0 auto;
}
.ppfb-tool-guide h2 {
    font-size: 1.5625rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--course-text-primary);
    margin: 0 0 0.5rem;
}
.ppfb-tool-guide-intro {
    font-size: 1rem;
    color: var(--course-text-muted);
    margin: 0 0 0.5rem;
    max-width: 60ch;
}
.ppfb-tool-guide-disclosure {
    font-size: 7pt;
    color: var(--course-text-muted);
    margin: 0 0 1.5rem;
    max-width: 70ch;
}
.ppfb-tool-guide-disclosure a {
    color: var(--course-link);
    text-decoration: underline;
}

/* Carousel frame: buttons flank a natively swipeable snap track. */
.ppfb-tool-carousel {
    position: relative;
}
.ppfb-tool-track {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0.5rem 3.5rem;
    scrollbar-width: thin;
}
.ppfb-tool-card {
    flex: 0 0 240px;
    scroll-snap-align: start;
}
.ppfb-tool-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--course-surface-card);
    border: 1px solid var(--course-candied-ginger);
    border-radius: 13px;
    padding: 1rem;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.ppfb-tool-card-link:hover {
    border-color: var(--course-gold-accent);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.ppfb-tool-card-img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: contain;
    margin-bottom: 0.75rem;
}
.ppfb-tool-card-name {
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--course-text-primary);
    margin-bottom: 0.5rem;
}
/* 2026-09-25: CTA is a "Buy" pill (blue outline, pill radius) instead of an
   underlined text link. Tokens only, per the header contract. */
.ppfb-tool-card-cta {
    align-self: flex-start;
    display: inline-block;
    margin-top: auto;
    padding: 0.5rem 1.375rem;
    border: 2px solid var(--course-link);
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--course-link);
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.ppfb-tool-card-link:hover .ppfb-tool-card-cta,
.ppfb-tool-card-link:focus-visible .ppfb-tool-card-cta {
    background-color: var(--course-link);
    color: var(--course-button-text);
}

/* Nav buttons: 44px targets, vertically centered at the track edges. */
.ppfb-tool-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--course-candied-ginger);
    background: var(--course-surface-card);
    color: var(--course-text-primary);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1;
}
.ppfb-tool-prev {
    left: 0;
}
.ppfb-tool-next {
    right: 0;
}
.ppfb-tool-nav:hover {
    border-color: var(--course-gold-accent);
}
.ppfb-tool-nav:focus-visible {
    outline: 3px solid var(--course-link);
    outline-offset: 2px;
}
.ppfb-tool-nav:disabled {
    opacity: 0.35;
    cursor: default;
}

/* Reduced motion: the JS also switches scrollBy to auto. */
@media (prefers-reduced-motion: reduce) {
    .ppfb-tool-track {
        scroll-behavior: auto;
    }
    .ppfb-tool-card-link,
    .ppfb-tool-nav {
        transition: none;
    }
}

@media (max-width: 640px) {
    .ppfb-tool-guide {
        padding: 2rem 0.75rem;
    }
    .ppfb-tool-track {
        padding: 0.5rem 3rem;
    }
    .ppfb-tool-card {
        flex-basis: 210px;
    }
}
