/* Custom change: Styles for the /courses/ page (lhb-courses.hbs). Loaded only on that page.
   Uses the theme's colour variables; the custom properties below cover only what the theme lacks.
   Dark mode follows the theme's `.dark` class on <html>, so it flips with the theme toggle. */

.lhb-courses {
    --lhb-bg: var(--color-background);
    --lhb-surface: #fff;
    --lhb-text-strong: var(--color-gray-950);
    --lhb-text: var(--color-gray-600);
    --lhb-text-secondary: var(--color-gray-500);
    --lhb-stroke: var(--color-gray-200);
    --lhb-stroke-strong: var(--color-gray-500); /* chip/outline borders, 3:1+ on the page background */
    --lhb-focus: var(--color-gray-950);
    --lhb-link: #a52c5b;
    --lhb-button: #a52c5b;
    --lhb-button-text: #fff;

    --lhb-badge-ink: #020618;
    --lhb-badge-no-signup: #71b9c1;
    --lhb-badge-pro: #f1ab41;

    padding-inline: 16px;
    padding-block: 64px 80px;
}

.dark .lhb-courses {
    --lhb-bg: var(--color-background-dark);
    --lhb-surface: var(--color-background-dark);
    --lhb-text-strong: var(--color-gray-100);
    --lhb-text: var(--color-gray-400);
    --lhb-text-secondary: #a3b3c8;
    --lhb-stroke: rgb(255 255 255 / 10%);
    --lhb-stroke-strong: var(--color-gray-500);
    --lhb-focus: var(--color-gray-100);
    --lhb-link: var(--color-gray-100);
    --lhb-button: #ad3161;
}

@media (min-width: 640px) {
    .lhb-courses {
        padding-inline: var(--spacing-outer);
        padding-block: 80px;
    }
}

@media (min-width: 1280px) {
    .lhb-courses {
        padding-inline: var(--spacing-outer-xl);
    }
}

.lhb-inner {
    max-width: 72rem;
    margin-inline: auto;
}

/* Spacing between page sections */
.lhb-section {
    margin-top: 80px;
}

/* Headings and text */

.lhb-h2 {
    font-size: 1.5rem;
    line-height: 1.25;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--lhb-text-strong);
}

.lhb-h3 {
    font-size: 1.25rem;
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--lhb-text-strong);
}

.lhb-subline,
.lhb-lead {
    margin-top: 8px;
    color: var(--lhb-text);
}

.lhb-lead {
    margin-top: 24px;
    max-width: 42rem;
    font-size: 1.125rem;
    line-height: 1.6;
    text-wrap: pretty;
}

.lhb-link {
    color: var(--lhb-link);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

.lhb-link:hover {
    text-decoration-thickness: 2px;
}

/* Focus: every new control and the cards */

.lhb-courses a:focus-visible,
.lhb-courses button:focus-visible {
    outline: 3px solid var(--lhb-focus);
    outline-offset: 3px;
}

/* Badges */

.lhb-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border: 1px solid transparent;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 700;
    line-height: 18px;
    white-space: nowrap;
}

.lhb-badge-no-signup {
    background-color: var(--lhb-badge-no-signup);
    color: var(--lhb-badge-ink);
}

.lhb-badge-pro {
    background-color: var(--lhb-badge-pro);
    color: var(--lhb-badge-ink);
}

.lhb-badge-free,
.lhb-badge-status,
.lhb-badge-step {
    background-color: var(--lhb-surface);
    border-color: var(--lhb-stroke-strong);
    color: var(--lhb-text-strong);
}

.lhb-badge-step {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* Badge positions over the card image */

.lhb-card-badge-start,
.lhb-card-badge-end,
.lhb-card [data-lhb-step] {
    position: absolute;
    z-index: 1;
    display: flex;
}

.lhb-card-badge-start {
    top: 8px;
    inset-inline-start: 8px;
}

.lhb-card-badge-end {
    top: 8px;
    inset-inline-end: 8px;
}

.lhb-card [data-lhb-step] {
    bottom: 8px;
    inset-inline-end: 8px;
}

.lhb-card-badges-static {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.lhb-card-badges-static [data-lhb-step] {
    position: static;
}

.lhb-card-badges-static [data-lhb-status]:empty {
    display: none;
}

/* Card: two-line excerpt so cards in a row stay even */

.lhb-card-excerpt {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

/* Meta line: Level · N lessons · Nh · Text + video */

.lhb-meta {
    color: var(--lhb-text-secondary);
}

.lhb-meta > span + span::before {
    content: "·";
    content: "·" / "";
    margin-inline: 6px;
    opacity: 0.85;
}

.lhb-video {
    display: inline-flex;
    align-items: center;
}

.lhb-video-icon {
    width: 14px;
    height: 14px;
    margin-inline-end: 4px;
}

/* Hero */

.lhb-hero-access {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 24px;
    margin-top: 24px;
}

.lhb-hero-access li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lhb-hero-access-count {
    font-size: 0.875rem;
    color: var(--lhb-text-secondary);
}

.lhb-hero-access-count:empty {
    display: none;
}

.lhb-hero-access .lhb-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 0.875rem;
}

/* Start here */

.lhb-start-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.lhb-goal-label {
    font-size: 12px;
    line-height: 16px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--lhb-text-secondary);
}

.lhb-goal-why {
    color: var(--lhb-text);
}

.lhb-goal-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

/* Filters */

.lhb-filters {
    padding-bottom: 24px;
    border-bottom: 1px solid var(--lhb-stroke);
}

.lhb-filters-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 24px;
}

.lhb-filters-status {
    font-size: 0.875rem;
    color: var(--lhb-text-secondary);
}

.lhb-filters-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 32px;
    margin-top: 24px;
}

.lhb-filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.lhb-filter-label {
    margin-inline-end: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--lhb-text-strong);
}

.lhb-chip {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-inline: 16px;
    border: 1px solid var(--lhb-stroke-strong);
    border-radius: 9999px;
    background-color: transparent;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--lhb-text-strong);
}

.lhb-chip[aria-pressed="true"] {
    border-color: var(--lhb-text-strong);
    background-color: var(--lhb-text-strong);
    color: var(--lhb-bg);
}

/* Tracks */

.lhb-track {
    margin-top: 48px;
}

.lhb-track-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--lhb-stroke);
}

.lhb-track-blurb {
    margin-top: 4px;
    color: var(--lhb-text);
}

.lhb-track-count {
    font-size: 0.875rem;
    color: var(--lhb-text-secondary);
    white-space: nowrap;
}

/* Card grid. Rows are 48px apart rather than 24px to leave room for the card's stacked-pages effect above each card */
.lhb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
    gap: 48px 24px;
    padding-top: 48px;
}

/* Empty state */

.lhb-empty {
    margin-top: 48px;
    padding: 48px 24px;
    border: 1px dashed var(--lhb-stroke-strong);
    border-radius: 1rem;
    text-align: center;
    color: var(--lhb-text);
}

.lhb-empty-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--lhb-text-strong);
}

.lhb-empty .lhb-btn {
    margin-top: 16px;
}

/* Access explainer */

.lhb-access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.lhb-access-grid p {
    margin-top: 8px;
    color: var(--lhb-text);
}

.lhb-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 32px;
}

/* Buttons. The theme has no shared button classes, so these follow its pill buttons (content-cta.hbs) */

.lhb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding-inline: 24px;
    border: 1px solid transparent;
    border-radius: 9999px;
    font-size: 0.9375rem;
    font-weight: 600;
    transition: opacity 200ms;
}

.lhb-btn:hover {
    opacity: 0.9;
}

.lhb-btn-primary {
    background-color: var(--lhb-button);
    color: var(--lhb-button-text);
}

.lhb-btn-secondary {
    border-color: var(--lhb-stroke-strong);
    background-color: transparent;
    color: var(--lhb-text-strong);
}
