/* Đầu trang và bộ lọc chuyên mục theo 40_Kien-thuc.html. */
body.category .site-inner {
    width: 100%;
    max-width: none;
}

body.category .content > *,
body.category .breadcrumb {
    width: calc(100% - 48px);
    max-width: 1200px;
    margin-right: auto;
    margin-left: auto;
}

body.category .content > .phero {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 40px 0 45px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, var(--paper-2), #fff);
}

body.category .phero > * {
    width: calc(100% - 48px);
    max-width: 1200px;
    margin-right: auto;
    margin-left: auto;
}

body.category .phero .eyebrow {
    margin-bottom: 14px;
    color: var(--accent);
    font-family: var(--font-main);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

body.category .phero .archive-heading,
.category-description h1 {
    margin-bottom: 16px;
    color: var(--head);
    font-family: var(--font-accent);
    font-size: 42px;
    font-weight: 600;
    line-height: 1.18;
}

body.category .phero .archive-heading a {
    color: inherit;
}

body.category .phero .category-description,
body.category .phero .category-description-actions {
    max-width: 850px;
    margin-left: max(24px, calc((100% - 1200px) / 2));
    margin-right: 0;
}

body.category .phero .category-description {
    color: var(--ink-2);
    font-family: var(--font-main);
    font-size: 18px;
    line-height: 1.6;
}

body.category .category-description p {
    margin-bottom: 16px;
}

body.category .category-description ul li,
body.category .category-description{
    font-size: 16px;
}

body.category .category-description ul{
    margin-left: 20px;
    margin-bottom: 16px;
}

body.category .category-description ul li{
    margin-bottom: 7px;
}

.category-description h2{
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
     margin-bottom: 16px;
     color: var(--main);
}

.category-description h3{
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
     margin-bottom: 16px;
        color: var(--accent);

}

body.category .category-description > :last-child {
    margin-bottom: 0;
}

body.category .category-description {
    --description-preview-height: 240px;
}

body.category .category-description.is-collapsed {
    max-height: var(--description-preview-height);
    overflow: hidden;
}

body.category .category-description-actions {
    position: relative;
    display: flex;
    justify-content: center;
    padding-top: 12px;
}

body.category .category-description-actions[hidden] {
    display: none;
}

body.category .category-description-actions.is-collapsed::before {
    position: absolute;
    top: -96px;
    right: 0;
    left: 0;
    height: 96px;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.08) 20%,
        rgba(255, 255, 255, 0.35) 45%,
        rgba(255, 255, 255, 0.72) 70%,
        rgba(255, 255, 255, 0.94) 90%,
        #fff 100%
    );
    content: '';
    pointer-events: none;
}

body.category .category-description-toggle {
    position: relative;
    min-height: 44px;
    padding: 9px 22px;
    border: 1px solid var(--main);
    border-radius: 6px;
    background: #fff;
    color: var(--main);
    font-family: var(--font-main);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.6;
    text-transform: none;
    cursor: pointer;
}

body.category .category-description-toggle:hover {
    background: var(--paper-3);
}

body.category .category-description-toggle:focus-visible {
    outline: 2px solid var(--main);
    outline-offset: 3px;
}

body.category .content > .pk-category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 50px;
    margin-bottom: 40px;
}

.pk-category-filters a {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    min-height: 40px;
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    color: var(--ink-2);
    font-family: var(--font-main);
    font-size: 15px;
    line-height: 1.6;
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: transform 0.2s ease;
}

.pk-category-filters a:hover {
    transform: translateY(-2px);
}

.pk-category-filters a.on,
.pk-category-filters a:hover {
    border-color: var(--main);
    background: var(--paper-3);
    color: var(--main);
}

.pk-category-filters a.on {
    font-weight: 600;
}

.pk-category-filters a:focus-visible {
    outline: 2px solid var(--main);
    outline-offset: 3px;
}

body.category .content > .pk-category-articles {
    margin-top: 80px;
}

body.category .pk-category-filters + .pk-category-articles {
    margin-top: 0;
}

body.category .pk-article-card .entry-image-link img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* Bài đầu chiếm trọn hàng; giữ nguyên các phần tử ảnh/header/content/footer. */
.pk-category-articles > .pk-article-card.entry:first-child {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    grid-template-rows: 1fr auto auto auto 1fr;
    column-gap: 36px;
    margin-bottom: 8px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--line);
}

.pk-category-articles > .pk-article-card:first-child > .entry-image-link {
    grid-column: 1;
    grid-row: 1 / 6;
    align-self: center;
    margin-bottom: 0;
}

.pk-category-articles > .pk-article-card:first-child > .entry-header {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
}

.pk-category-articles > .pk-article-card:first-child > .entry-content {
    grid-column: 2;
    grid-row: 3;
    min-width: 0;
}

.pk-category-articles > .pk-article-card:first-child > .entry-footer {
    grid-column: 2;
    grid-row: 4;
    min-width: 0;
}

.pk-category-articles > .pk-article-card.entry:first-child .entry-title ,
body.category.pk-hospital-category .pk-article-card.entry .entry-title{
    font-size: 18px;
}

.pk-category-articles > .pk-article-card.entry:first-child .entry-content p {
    font-size: 16px;
}

.pk-category-articles > .pk-article-card.entry:first-child:not(.has-post-thumbnail) {
    display: flex;
}

/* Danh sách phòng khám: giữ markup Genesis, chỉ hiển thị liên kết tiêu đề. */
body.category.pk-hospital-category .pk-category-articles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 50px;
}

body.category.pk-hospital-category .pk-category-articles > .pk-article-card.entry {
    display: block;
    grid-column: auto;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

body.category.pk-hospital-category .pk-category-articles .entry-image-link,
body.category.pk-hospital-category .pk-category-articles .art-c,
body.category.pk-hospital-category .pk-category-articles .entry-content,
body.category.pk-hospital-category .pk-category-articles .entry-footer {
    display: none;
}
/*
body.category.pk-hospital-category .pk-category-articles > .pk-article-card.entry .entry-title {
    display: block;
    overflow: visible;
    max-height: none;
    margin: 0;
    color: var(--ink-2);
    font-family: var(--font-main);
    font-size: 20px;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: 0;
    -webkit-line-clamp: unset;
}*/

body.category.pk-hospital-category .pk-category-articles .entry-title-link {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    overflow-wrap: anywhere;
}

body.category.pk-hospital-category .pk-category-articles .entry-title-link::before {
    content: "";
    flex-shrink: 0;
    width: 15px;
    height: 18px;
    margin-top: 2px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 32'%3E%3Cpath fill='%2312524C' d='M12 0C5.4 0 0 5.4 0 12c0 8 12 20 12 20s12-12 12-20C24 5.4 18.6 0 12 0Z'/%3E%3Ccircle cx='12' cy='12' r='4.5' fill='white'/%3E%3C/svg%3E") center / contain no-repeat;
}

@media (max-width: 1170px) {
    body.category .phero .archive-heading {
        font-size: 36px;
    }
}

@media (max-width: 860px) {
    body.category.pk-hospital-category .pk-category-articles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }

    body.category.pk-hospital-category .pk-category-articles > .pk-article-card.entry .entry-title {
        font-size: 16px;
    }

    body.category.pk-hospital-category .pk-category-articles .entry-title-link::before {
        width: 18px;
        height: 23px;
    }

    .pk-category-articles > .pk-article-card.entry:first-child {
        display: flex;
        gap: 0;
        padding-bottom: 32px;
    }

    .pk-category-articles > .pk-article-card:first-child > .entry-image-link {
        align-self: stretch;
        margin-bottom: 20px;
    }

    .pk-category-articles > .pk-article-card.entry:first-child .entry-title {
        font-size: 18px;
    }

    .pk-category-articles > .pk-article-card.entry:first-child .entry-content p {
        font-size: 16px;
    }

    body.category .phero .category-description,
    body.category .phero .category-description-actions {
        margin-left: 16px;
    }

    body.category .content > *,
    body.category .breadcrumb,
    body.category .phero > * {
        width: calc(100% - 32px);
    }

    body.category .phero .archive-heading {
        font-size: 30px;
    }

    body.category .content > .pk-category-filters{
        display: none;
    }
    body.category .content > .pk-category-articles {
        margin-top: 56px;
    }

    body.category .pk-category-filters + .pk-category-articles {
        margin-top: 0;
    }

    body.category .phero .archive-heading, .category-description h1{
        font-size: 28px;
    }

    body.category .content > .phero{
        padding: 35px 0 20px;
        margin-bottom: 30px;
    }

    .pk-category-filters a{
        min-height: 36px;
        padding: 8px 10px;
        font-size: 13px;
    }

    .pk-category-articles{
        gap: 20px;
    }
}


@media (max-width: 500px) {
    body.category.pk-hospital-category .pk-category-articles {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    body.category .phero .eyebrow{
        font-size: 10px;
    }
}
