/*
 * /actie-cursussen/ (soofos.nl only): courses with a running discount, one
 * grid per category. Layout only; colours, spacing and surfaces use the
 * Soofos tokens, the cards are the shared course-card partial. Loaded by
 * page slug.
 */

.sf-actie {
    padding-bottom: var(--soofos-space-3xl);
    background: var(--page);
    color: var(--body);
    font-family: var(--font);
}

.sf-actie .sf-actie__inner {
    width: 100%;
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 var(--soofos-space-xl);
    box-sizing: border-box;
}

.sf-actie .sf-actie__hero {
    padding: var(--soofos-space-3xl) 0;
    background: var(--blue-tint);
    text-align: center;
}

.sf-actie .sf-actie__eyebrow {
    margin: 0 0 var(--soofos-space-md);
    color: var(--deep-blue);
    font-size: .875rem;
    font-weight: var(--soofos-font-weight-black);
}

.sf-actie .sf-actie__title {
    margin: 0;
    color: var(--ink);
    font-size: clamp(2rem, 6vw, 3.25rem);
    font-weight: var(--soofos-font-weight-black);
    letter-spacing: -.03em;
    line-height: 1.1;
}

.sf-actie .sf-actie__lead {
    max-width: 42rem;
    margin: var(--soofos-space-xl) auto 0;
    color: var(--muted);
    font-size: 1.125rem;
    line-height: 1.7;
}

.sf-actie .sf-actie__section {
    padding: var(--soofos-space-3xl) 0 0;
}

.sf-actie .sf-actie__section-title {
    margin: 0 0 var(--soofos-space-xl);
    color: var(--ink);
    font-size: clamp(1.375rem, 3.5vw, 1.875rem);
    font-weight: var(--soofos-font-weight-black);
    line-height: 1.2;
}

/* The grid block prints nothing when no course in the category qualifies:
   hide that category's heading too. */
.sf-actie .sf-actie__category:not(:has(.course-card-wrap)) {
    display: none;
}

/* The "nothing on sale" note shows only when no grid on the page has a card. */
.sf-actie:has(.course-card-wrap) .sf-actie__empty {
    display: none;
}

.sf-actie .sf-actie__empty-copy {
    margin: 0;
    color: var(--muted);
    font-size: 1.125rem;
    line-height: 1.7;
    text-align: center;
}

/* Grid layout only. The block prints an inline 4-column style, so the
   overrides need !important (same as pages/home.css). min-width: 0 lets the
   1fr tracks shrink below a card's min-content width. */
.sf-actie .soofos-course-grid {
    gap: var(--soofos-space-xl) !important;
    align-items: stretch;
}

.sf-actie .course-card-wrap {
    height: 100%;
    min-width: 0;
}

.sf-actie .course-card {
    height: 100%;
}

.sf-actie .sf-actie__panel {
    padding: var(--soofos-space-2xl) var(--soofos-space-xl);
    border: thin solid var(--card-border);
    border-radius: var(--r-card-lg);
    background: var(--white);
}

.sf-actie .sf-actie__panel-title {
    margin: 0 0 var(--soofos-space-sm);
    color: var(--ink);
    font-size: 1.25rem;
    font-weight: var(--soofos-font-weight-black);
    line-height: 1.3;
}

.sf-actie .sf-actie__panel-copy {
    max-width: 48rem;
    margin: 0 0 var(--soofos-space-xl);
    color: var(--muted);
    line-height: 1.7;
}

.sf-actie .sf-actie__panel-copy:last-child {
    margin-bottom: 0;
}

@media (max-width: 1024px) {
    .sf-actie .soofos-course-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 640px) {
    .sf-actie .sf-actie__inner {
        padding: 0 var(--soofos-space-lg);
    }

    /* Phone: one sideways-scrolling row per category (the old page used
       carousels); a single column would stack about 140 cards. */
    .sf-actie .soofos-course-grid {
        grid-template-columns: none !important;
        grid-auto-flow: column;
        grid-auto-columns: 78%;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        padding-bottom: var(--soofos-space-sm);
    }

    .sf-actie .soofos-course-grid::-webkit-scrollbar {
        display: none;
    }

    .sf-actie .soofos-course-grid > * {
        scroll-snap-align: start;
    }
}
