/*
 * SMALL CONTENT BLOCKS - Features, Sections (clubs), Text.
 *
 * These three used to be styled entirely with inline Tailwind utilities and
 * hardcoded grays, which is why they drifted visually from the Documents
 * and Staff blocks. They now compose the same primitives from
 * components.css, so one token change moves all of them together.
 */

/* ---- Features -------------------------------------------------------- */

.features-grid {
    --card-min: 17rem;
}

.feature-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    margin-bottom: var(--space-xs);
    border-radius: var(--radius-sm);
    background: var(--color-primary-light);
    font-size: 1.5rem;
    line-height: 1;
}

/* ---- Clubs & sections: course cards -------------------------------- */

/* Explicit 1 -> 2 -> 3 columns rather than the auto-filling card-grid:
   a club list is short, and a fixed three-up desktop row reads as a
   deliberate catalogue instead of however many cards happen to fit. */
.club-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

@media (min-width: 640px) {
    .club-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .club-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.club-grid--more {
    margin-top: var(--space-lg);
}

.club-rail__slide {
    flex: 0 0 min(82%, 20rem);
}

.club-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-ambient);
    transition: box-shadow var(--transition-slow), transform var(--transition-slow);
}

/* Twice the standard lift (-4px): a large card needs more travel to read as
   raised. Derived from --lift so prefers-reduced-motion still zeroes it. */
.club-card:hover,
.club-card:focus-within {
    box-shadow: var(--shadow-lifted);
    transform: translateY(calc(var(--lift) * 2));
}

/* Flush with the card's top edge: the card's own radius + overflow clip it. */
.club-card__media {
    --media-ratio: 16 / 10;
    border-radius: 0;
}

.club-card__media--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary-light);
}

.club-card__initial {
    font-family: var(--font-heading);
    font-size: var(--fs-h1);
    font-weight: 700;
    color: var(--color-primary-text);
    opacity: 0.55;
}

.club-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-lg);
}

.club-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.club-card__title {
    font-family: var(--font-heading);
    font-size: var(--fs-h4);
    font-weight: 700;
    line-height: var(--lh-snug);
    color: var(--text-primary);
}

.club-card__text {
    color: var(--text-muted);
    font-size: var(--fs-sm);
    line-height: var(--lh-normal);
}

/* Pinned to the bottom so prices line up across a row even when the
   descriptions above them differ in length. */
.club-card__price {
    margin-top: auto;
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-subtle);
    font-family: var(--font-heading);
    font-size: var(--fs-body);
    font-weight: 700;
    color: var(--color-primary-text);
}

.sections-block__action {
    margin-top: var(--space-xl);
    text-align: center;
}

/* ---- Text block ------------------------------------------------------ */

.text-block__body {
    /* Reading copy stays at a comfortable measure even though the section
       container is much wider. */
    margin-inline: auto;
}
