/* Visual refinement v6: full-width category scenes and compact premium controls. */
:root {
    --v6-coral: #f27660;
    --v6-coral-deep: #b94f3c;
    --v6-cream: #fffaf1;
    --v6-shadow: 0 16px 34px rgb(8 53 45 / 14%);
}

.header-action,
.footer-search button {
    min-height: 48px;
    border: 1px solid rgb(255 255 255 / 24%);
    background: linear-gradient(135deg, var(--v6-coral), #ff9a6d);
    box-shadow: 0 10px 22px rgb(185 79 60 / 26%);
}

.header-action {
    padding-left: 1.15rem;
    color: var(--v4-forest);
}

.header-action span {
    color: inherit;
}

.header-action b,
.footer-search button b {
    color: var(--v6-coral-deep);
    background: var(--v6-cream);
}

.header-action:hover,
.footer-search button:hover {
    background: linear-gradient(135deg, #e96652, #ff8b64);
    box-shadow: 0 14px 28px rgb(185 79 60 / 34%);
}

/* One editorial shell: copy remains readable above the full-width scene. */
.category-hub__intro {
    display: block;
    max-width: none;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 28px;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

.category-hub__copy {
    min-height: 0;
    padding: clamp(2rem, 4.3vw, 4.2rem) clamp(2rem, 5vw, 5.25rem) clamp(1.8rem, 3.1vw, 3rem);
    border: 1px solid var(--v4-line);
    border-bottom: 0;
    border-radius: 28px 28px 0 0;
    background: linear-gradient(112deg, #fffdf7 0%, #f0f5e8 66%, #e3f1e6 100%);
}

.category-hub__intro h1 {
    max-width: none;
}

.category-hub__banner {
    width: 100%;
    height: clamp(400px, 30vw, 440px);
    min-height: 400px;
    margin: 0;
    border: 1px solid var(--v4-line);
    border-radius: 0 0 28px 28px;
    overflow: hidden;
    background: #e4eee4;
}

.category-hub__banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.category-hub__intro--no-banner .category-hub__copy {
    border-bottom: 1px solid var(--v4-line);
    border-radius: 28px;
}

/* The guide asset decorates the heading but never covers a card or copy. */
.category-hub__featured {
    padding: clamp(1.35rem, 2.4vw, 2rem);
}

.category-hub__featured-heading {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, .72fr) minmax(130px, .3fr);
    align-items: center;
    gap: clamp(1rem, 2vw, 2.25rem);
    min-height: 132px;
    padding-right: 0;
}

.category-hub__featured-heading > p {
    max-width: 31rem;
    margin: 0;
}

.category-hub__guide-art {
    width: min(100%, 170px);
    height: auto;
    justify-self: end;
    filter: drop-shadow(0 12px 20px rgb(7 62 53 / 12%));
}

.category-hub__featured .journal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Reading boundary is a compact information card with a real visual mark. */
.category-hub__boundary {
    grid-template-columns: minmax(170px, 210px) minmax(0, 1.25fr) minmax(250px, .78fr);
    gap: clamp(1.2rem, 3vw, 3.25rem);
    align-items: center;
    margin-block: clamp(4rem, 7vw, 7rem);
    padding: clamp(1.65rem, 3.4vw, 3.2rem);
}

.category-hub__boundary .boundary-symbol {
    width: 100%;
    height: 132px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.category-hub__boundary .boundary-symbol img {
    width: 100%;
    height: 100%;
    border-radius: 0;
    object-fit: contain;
}

.category-hub__boundary .boundary-link {
    justify-content: space-between;
    min-height: 50px;
    background: var(--v4-forest);
    box-shadow: var(--v6-shadow);
}

.category-hub__boundary .boundary-link b {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    background: var(--v6-cream);
    color: var(--v4-forest);
}

/* Five real cards replace the old empty-cell grid. */
.category-hub__related {
    display: block;
    margin-top: clamp(4.5rem, 8vw, 8rem);
    padding: clamp(1.35rem, 2.5vw, 2.25rem);
    border: 1px solid var(--v4-line);
    border-radius: 28px;
    background: linear-gradient(135deg, #e5ece1, #f2eee5 72%);
}

.category-hub__related-heading {
    display: block;
    margin-bottom: 1.6rem;
}

.category-hub__related-heading .kicker {
    margin-bottom: .45rem;
}

.category-hub__related-heading h2 {
    margin: 0;
    color: var(--v4-ink);
    font: 600 clamp(1.7rem, 2.6vw, 2.5rem) / 1.15 Georgia, "Noto Serif KR", serif;
    letter-spacing: -.055em;
}

.category-hub__related-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: clamp(.65rem, 1.25vw, 1.25rem);
}

.category-hub__related-card {
    display: flex;
    min-width: 0;
    min-height: 220px;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--v4-line);
    border-radius: 18px;
    background: var(--v4-paper);
    box-shadow: 0 9px 24px rgb(15 49 41 / 8%);
    transition: transform .24s ease, box-shadow .24s ease;
}

.category-hub__related-card:hover,
.category-hub__related-card:focus-visible {
    transform: translateY(-5px);
    box-shadow: var(--v6-shadow);
}

.category-hub__related-card img {
    display: block;
    width: 100%;
    aspect-ratio: 1.25 / 1;
    object-fit: cover;
}

.category-hub__related-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .65rem;
    min-height: 62px;
    padding: .8rem .9rem;
    color: var(--v4-ink);
    font: 700 1rem / 1.25 Georgia, "Noto Serif KR", serif;
}

.category-hub__related-label b {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: #e3efe5;
    color: var(--v4-green);
    font-family: system-ui, sans-serif;
}

/* Clear state, number and next controls with a 44px target. */
.pagination .nav-links {
    align-items: center;
    gap: .55rem;
}

.pagination .page-numbers {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: .45rem .75rem;
    border: 1px solid var(--v4-line);
    border-radius: 999px;
    background: var(--v6-cream);
    color: var(--v4-ink);
    font-size: .82rem;
    font-weight: 800;
}

.pagination .page-numbers.prev,
.pagination .page-numbers.next {
    min-width: 84px;
    gap: .38rem;
}

.pagination .page-numbers.current,
.pagination a.page-numbers:hover {
    border-color: var(--v6-coral);
    background: var(--v6-coral);
    color: #fff;
}

.pagination .page-numbers > span {
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
}

/* Search signal asset adds a visual cue without competing with the field. */
.footer-cta__accent {
    color: var(--v6-coral);
    text-decoration: underline;
    text-decoration-color: rgb(255 255 255 / 30%);
    text-underline-offset: .14em;
}

.footer-search {
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.footer-search__art {
    width: 72px;
    height: 72px;
    object-fit: contain;
    filter: drop-shadow(0 8px 14px rgb(0 0 0 / 18%));
}

@media (max-width: 1024px) {
    .category-hub__copy {
        padding-inline: clamp(1.75rem, 5vw, 3.25rem);
    }

    .category-hub__banner {
        height: clamp(360px, 39vw, 410px);
        min-height: 360px;
    }

    .category-hub__featured-heading {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .category-hub__boundary {
        grid-template-columns: 190px minmax(0, 1fr);
    }

    .category-hub__featured-heading > p,
    .category-hub__guide-art,
    .category-hub__boundary .boundary-actions {
        grid-column: 2;
    }

    .category-hub__guide-art {
        grid-row: 1 / span 2;
    }

    .category-hub__related-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .header-action {
        display: inline-flex;
        min-height: 44px;
        margin-left: auto;
        padding: .3rem .34rem .3rem .72rem;
        gap: .25rem;
        font-size: .69rem;
        white-space: nowrap;
    }

    .header-action b {
        width: 30px;
        height: 30px;
        margin-left: .2rem;
    }

    .menu-toggle {
        margin-left: 0;
    }

    .category-hub__intro {
        border-radius: 20px;
    }

    .category-hub__copy {
        padding: 1.5rem;
        border-radius: 20px 20px 0 0;
    }

    .category-hub__intro--no-banner .category-hub__copy {
        border-radius: 20px;
    }

    .category-hub__banner {
        height: auto;
        min-height: 0;
        aspect-ratio: 16 / 10;
        border-radius: 0 0 20px 20px;
    }

    .category-hub__featured-heading,
    .category-hub__boundary {
        grid-template-columns: 1fr;
    }

    .category-hub__featured .journal-grid {
        grid-template-columns: 1fr;
    }

    .category-hub__featured-heading > p,
    .category-hub__guide-art,
    .category-hub__boundary .boundary-actions {
        grid-column: auto;
    }

    .category-hub__guide-art {
        display: block;
        width: 112px;
        justify-self: start;
    }

    .category-hub__boundary .boundary-symbol {
        width: min(220px, 100%);
        height: 110px;
    }

    .category-hub__related-heading {
        display: block;
    }

    .category-hub__related {
        padding: 1rem;
        border-radius: 20px;
    }

    .category-hub__related-heading h2 {
        font-size: 1.75rem;
    }

    .category-hub__related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .category-hub__related-card {
        min-height: 0;
    }

    .footer-search {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .footer-search button {
        grid-column: 1 / -1;
    }
}

@media (max-width: 360px) {
    .category-hub__related-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .header-action,
    .footer-search button,
    .category-hub__related-card {
        transition: none;
    }
}
