/* ----------------------------------------------------------------------------
   The magazine — `/magazin` and its rubric pages, CU-869f5ze3t.
   `templates/magazine/listing.html.twig`; the numbers are `new-magazin.html`'s.
   The breadcrumb is `.gk-crumbs` in base.css, shared with the article page.
   ---------------------------------------------------------------------------- */

/* ---- The column ---------------------------------------------------------- */

/* 550px of text, the article's measure, with the gutter outside it. */
.gk-magazine {
    max-width: 34.375rem;
    margin-inline: auto;
    padding: var(--gk-space-4) var(--gk-space-4) 4rem;
}

@media (min-width: 768px) {
    .gk-magazine {
        max-width: calc(34.375rem + 2 * var(--gk-space-6));
        padding-inline: var(--gk-space-6);
        padding-top: var(--gk-space-6);
    }
}

@media (min-width: 1024px) {
    .gk-magazine {
        max-width: calc(34.375rem + 2 * var(--gk-space-10));
        padding-inline: var(--gk-space-10);
    }
}

/* ---- Heading ------------------------------------------------------------- */

/* The design's `gk-h1-flow`, 36/48 — `.gk-auth__title`'s sizes, left-aligned. */
.gk-magazine__title {
    margin: 0;
    color: var(--gk-color-text);
    font-size: var(--gk-text-3xl);
    font-weight: var(--gk-weight-bold);
    line-height: 1.06;
    letter-spacing: -0.012em;
}

@media (min-width: 768px) {
    .gk-magazine__title {
        font-size: var(--gk-text-4xl);
        line-height: 1;
    }
}

/* ---- Rubric strip -------------------------------------------------------- */

.gk-magazine__rubrics {
    margin-top: var(--gk-space-4);
}

/* Pulled left by a link's padding, so the first label lines up with the h1. */
.gk-magazine__rubrics ul {
    display: flex;
    flex-wrap: wrap;
    margin: 0 0 0 calc(-1 * var(--gk-space-2));
    padding: 0;
    list-style: none;
}

.gk-magazine__rubric {
    display: flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0 var(--gk-space-2);
    color: var(--gk-color-text);
    font-weight: var(--gk-weight-medium);
    line-height: 1.5rem;
    text-decoration: none;
}

.gk-magazine__rubric span {
    position: relative;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

@media (hover: hover) {
    .gk-magazine__rubric:hover span {
        text-decoration-color: currentColor;
    }
}

.gk-magazine__rubric:active span {
    text-decoration-color: currentColor;
}

/* The one she is on: heavier, with a bar under it instead of the hover line. */
.gk-magazine__rubric[aria-current="page"] {
    font-weight: var(--gk-weight-semibold);
}

.gk-magazine__rubric[aria-current="page"] span {
    text-decoration-color: transparent;
}

.gk-magazine__rubric[aria-current="page"] span::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -0.25rem;
    left: 0;
    height: 2px;
    background: currentColor;
}

/* ---- Empty rubric -------------------------------------------------------- */

.gk-magazine__empty {
    margin-top: var(--gk-space-6);
}

.gk-magazine__empty p {
    margin: 0;
    color: var(--gk-color-text);
}

.gk-magazine__empty a {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    color: var(--gk-color-text);
    text-decoration: underline;
    text-decoration-color: var(--gk-color-border);
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: text-decoration-color 140ms ease;
}

@media (hover: hover) {
    .gk-magazine__empty a:hover {
        text-decoration-color: currentColor;
    }
}

.gk-magazine__empty a:active {
    text-decoration-color: currentColor;
}

/* The cards themselves are base.css's: search shows them too. */

/* ---- Load more ----------------------------------------------------------- */

/* The error sits under the control without moving it, so the footer does not
   jump when a failed load says so. */
.gk-magazine__more-wrap {
    position: relative;
}

.gk-magazine__more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--gk-space-2);
    width: 100%;
    height: 3rem;
    margin-top: var(--gk-space-8);
    border: 1px solid var(--gk-color-border);
    border-radius: var(--gk-radius-md);
    background: var(--gk-color-surface);
    color: var(--gk-color-text);
    font-size: var(--gk-text-sm);
    font-weight: var(--gk-weight-semibold);
    line-height: 1.5rem;
    text-decoration: none;
    transition: border-color 140ms ease;
}

@media (hover: hover) {
    .gk-magazine__more:hover {
        border-color: var(--gk-color-border-strong);
    }
}

.gk-magazine__more:active {
    border-color: var(--gk-color-border-strong);
}

.gk-magazine__more-error {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    margin: var(--gk-space-2) 0 0;
    color: var(--gk-color-danger);
    font-size: var(--gk-text-sm);
    line-height: 1.25rem;
    text-align: center;
}

.gk-magazine__announce {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* ---- Focus --------------------------------------------------------------- */

.gk-magazine a:focus {
    outline: none;
}

.gk-magazine a:focus-visible {
    border-radius: var(--gk-radius-md);
    box-shadow: var(--gk-ring-focus);
}
