/* Layout for guide-style pages: a centred hero above the article column and its
   "on this page" index. See `Lang.Components.Guide`. */

.guide-hero {
    padding-top: var(--space-16);
}

.guide-hero .heading-section {
    margin-bottom: 0;
}

/* The hero eyebrow: the pill from title.css flattened into a plain label. */
.guide-hero .heading-section > span.badge-ghost {
    padding: 0;
    border-color: transparent;
    background: transparent;
    color: var(--color-primary);
}

.guide .post-page {
    padding-top: var(--space-14);
}

/* Guide sections are short and already separated by whitespace, so they skip
   the rule that article headings carry. */
.guide .post-content h2 {
    margin-top: var(--space-16);
    padding-bottom: 0;
    border-bottom: 0;
    font-size: 1.6rem;
}

.guide .post-content h2:first-child {
    margin-top: 0;
}

.guide .post-content .button-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
    margin: var(--space-8) 0 0;
}

.guide .post-content .button-container .btn {
    justify-content: flex-start;
    box-sizing: border-box;
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-md);
    font-size: var(--fs-sm);
    font-weight: 600;
    text-align: left;
    white-space: normal;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast),
        transform var(--transition-fast);
}

/* The arrow trails the label and is pinned to the far edge of the row. */
.guide .post-content .button-container .btn svg {
    order: 2;
    flex: none;
    margin-left: auto;
    transition: transform var(--transition-fast);
}

.guide .post-content .button-container .btn:hover {
    border-color: var(--color-primary) !important;
    box-shadow: 0 4px 12px var(--color-shadow);
    transform: translateY(-1px);
}

.guide .post-content .button-container .btn:hover svg {
    transform: translateX(3px);
}

.guide .post-content .button-container .btn:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .guide-hero {
        padding-top: var(--space-12);
    }

    .guide .post-page {
        padding-top: var(--space-10);
    }

    .guide .post-content h2 {
        margin-top: var(--space-12);
    }

    /* Below this width the article column is too narrow for two columns, and
       `toolbar.css` has already stacked the row. */
    .guide .post-content .button-container {
        grid-template-columns: minmax(0, 1fr);
    }
}
