h1, h2, h3, h4, h5 {
    color: var(--avs-color-02);
}
section#article-feed {
    * {border-width: 0;}
    .card-preview {
        box-shadow: rgba(0, 0, 0, 0.15) 2.4px 2.4px 3.2px;
        transition: 0.3s ease-in-out all;
        cursor: pointer;
        * {}
        .card-header {
            * {}
            .card-image {
                aspect-ratio: 4/3;
            }
            span {
                position: absolute;
                z-index: 1;
                top: 0;
                left: 0;
                padding: 0.25rem 0.5rem;
                border-radius: 0;
                color: #fff !important;
                font-size: 0.625rem;
                * {}
                &.a {
                    background-color: var(--avs-color-01) !important;
                }
                &.c {
                    background-color: var(--avs-color-02) !important;
                }
            }
        }
        .card-text {
            * {}
            h6 {
                text-overflow: ellipsis;
                -webkit-box-orient: vertical;
                display: -webkit-box;
                overflow: hidden;
                -webkit-line-clamp: 2;
                padding-top: 0.25rem;
                height: 2.375rem;
                width: 100%;
                text-align: left;
                text-indent: 1rem;
                color: var(--avs-color-02);
            }
            p {
                font-size: 0.875rem;
                text-overflow: ellipsis;
                -webkit-box-orient: vertical;
                display: -webkit-box;
                overflow: hidden;
                -webkit-line-clamp: 3;
                padding-top: 0.25rem;
                height: 4.125rem;
                width: 100%;
                text-align: left;
                text-indent: 1rem;
            }
        }
        .card-button {
            text-align: end;
            * {}
            button {
                font-size: 0.875rem;
            }
        }
        &:hover {
            box-shadow: #088b2930 2.4px 2.4px 3.2px;
            * {}
            .card-image {
                transform: scale(1.1);
            }
            button {
                letter-spacing: 1px;
            }
        }
    }
}
section#article-detail {
    background-color: white;
    * {}
    .article-image {
        background-position: center !important;
        background-size: cover !important;
        background-repeat: no-repeat !important;
        aspect-ratio: 1/1;
        border: 2px solid var(--avs-color-03);
    }
    .this-article-image {
        position: relative;
        transition: 0.4s ease-in-out all;
        cursor: pointer;
        border-width: 4px;
        z-index: 1;
        box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px, rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset;
    }
    .this-article-image:hover {
        border-width: 3px;
        rotate: 10deg;
        border-color: #7dc788;
        scale: 1.05;
    }
    >div:has(.this-article-image:hover) .this-article-image:not(:hover) {
        border-width: 2px;
        scale: 0.8;
        border-color: var(--avs-color-02);
    }
    .this-article-image::before {
        position: absolute;
        color: #fff;
        top: 0;
        left: 0;
        z-index: -1;
        border-radius: inherit;
        background: linear-gradient(to right, var(--avs-color-02), orange);
        transition: 0.4s ease-in all;
        height: 100%;
        width: 100%;
    }
    .this-article-image:hover::before {
        height: 100%;
        width: 100%;
        background-color: #0d833438;
        rotate: 270deg;
    }
    #div-article-detail {
        background-color: #f5f5f5;
        * {}
        .table-article-info {
            font-size: 0.75rem !important;
            * {}
            thead {
                background-color: var(--avs-color-01);
                color: white;
                border-radius: 8px 0 0 8px;
                * {
                    background-color: var(--avs-color-01);
                    color: white;
                    border-radius: 8px 8px 0 0;
                }
                tr {
                    border-radius: 8px 8px 0 0;
                    text-align: center;
                    * {}
                    th {
                        border-bottom: 4px solid gray;
                    }
                }
            }
            tbody {
                background-color: whitesmoke;
                *::not(button) {
                    background-color: whitesmoke;
                    color: #333;
                }
                tr {
                    border: 2px solid whitesmoke;
                    border-top: 0px solid whitesmoke;
                    * {}
                    td {
                        padding: 0.25rem 0.25rem;
                    }
                    td:first-child {
                        text-align: center;
                    }
                    td:last-child {
                        text-align: start;
                    }
                }
            }
        }
        img {
            max-width: 100%;
            height: auto !important;
            object-fit: contain;
        }
    }
    .table-viewed {
        font-size: 0.875rem !important;
        *:not(a) {color: #444;}
        tbody {
            background-color: white;
            *::not(button) {
                background-color: white;
                color: #444;
            }
            tr {
                cursor: pointer;
                border-color: whitesmoke;
                transition: all ease-in 0.15s;
                * {}
                td {
                    transition: all ease-in 0.15s;
                    * {}
                    span {
                        /* text-align: start !important; */
                    }
                    a {
                        text-decoration: none;
                        transition: all ease-in-out 0.3s;
                    }
                }
                td:first-child {
                    font-weight: 700;
                    text-align: start;
                }
                td:last-child {
                    text-align: start;
                }
            }
            tr:hover {
                background-color: whitesmoke !important;
                *:not(a,.viewed-index-badge) {color: var(--avs-color-02) !important;}
                td {
                    background-color: whitesmoke !important;
                    * {}
                    a {
                        letter-spacing: 1px;
                    }
                }
            }
        }
    }
    .table-categories {
        * {}
        tr {
            cursor: pointer;
            transition: all ease-in 0.15s;
            * {}
            td {
                transition: all ease-in 0.15s;
                background-color: transparent !important;
            }
        }
        tr:hover {
            background-color: #f5f5f580 !important;
            * {color: var(--avs-color-02) !important;}
            td {
                background-color: #f5f5f580 !important;
            }
            td:first-child {
                letter-spacing: 1px;
            }
        }
    }
    .title-line {
        position: relative;
        * {}
        span {
            position: relative;
            border-radius: 4px;
            z-index: 1;
            background-color: #fff;
        }
        i {
            font-size: 1.5rem;
        }
    }
    .title-line::after {
        position: absolute;
        content: '';
        top: calc(50% - 0.0625rem);
        width: 100%;
        height: 0.125rem;
        background-color: var(--avs-color-03);
        filter: opacity(0.3);
        z-index: 0;
        left: 0;
    }
    .title-line span::before {
        position: absolute;
        content: '';
        top: calc(50% - 0);
        width: calc(100% - 1rem);
        height: 0.1875rem;
        background-color: white;
        z-index: -1;
        left: 0.625rem;
    }
    #div-article-info {
        * {}
    }
}
.ac-type {
    * {}
    & > input:checked + label {
        color: #fff !important;
        background-color: var(--avs-color-01) !important;
    }
    & > label {
        margin: 0 0.1875rem !important;
        width: fit-content !important;
        font-size: 0.75rem;
        background-color: #fff;
        border-radius: 12px !important;
        box-shadow: rgba(0, 0, 0, 0.12) 0px 1px 3px, rgba(0, 0, 0, 0.24) 0px 1px 2px;
        transition: all ease-in-out 0.1s;
        * {}
        &:hover {
            color: var(--avs-color-01) !important;
            background-color: #fff2f6 !important;
        }
    }
}
.page-item > * {
    line-height: 1rem;
    height: fit-content;
    * {}
}
.page-item.disabled > span {
    padding: 0.25rem !important;
}
@media only screen and (max-width: 767px) {
    #div-article-info {
        flex-direction: column-reverse;
    }
    .page-item > * {
        line-height: 0.75rem !important;
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

/* ── Related content (product/activity/CSR by shared tags — see BaseController::getRelatedByTags) ── */
#div-related-content .related-content__heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--avs-color-04, #0b500e);
    margin: 0 0 0.875rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--avs-color-02, #008000);
}
#div-related-content .related-content__heading .material-icons {
    font-size: 1.25rem;
    color: var(--avs-color-02, #008000);
}
#div-related-content .related-content__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
    gap: 0.75rem;
}
#div-related-content .related-content__item {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #eee;
    box-shadow: rgba(50, 50, 93, 0.1) 0px 4px 10px -2px, rgba(0, 0, 0, 0.08) 0px 2px 5px -2px;
    text-decoration: none;
    color: inherit;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
#div-related-content .related-content__item:hover {
    transform: translateY(-4px);
    box-shadow: rgba(50, 50, 93, 0.25) 0px 12px 22px -6px, rgba(0, 0, 0, 0.3) 0px 6px 10px -4px;
    text-decoration: none;
    color: inherit;
    border-color: #8fca91;
}
#div-related-content .related-content__image {
    position: relative;
    aspect-ratio: 4/3;
    background-color: #eef4ee;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}
#div-related-content .related-content__badge {
    position: absolute;
    top: 0.5rem; left: 0.5rem;
    font-size: 0.65625rem;
    font-weight: 700;
    padding: 0.1875rem 0.625rem;
    border-radius: 20px;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
#div-related-content .related-content__badge--product  { background: #6a1b9a; }
#div-related-content .related-content__badge--article  { background: var(--avs-color-02, #008000); }
#div-related-content .related-content__badge--activity { background: #1565c0; }
#div-related-content .related-content__badge--csr       { background: #ef6c00; }
#div-related-content .related-content__body {
    padding: 0.5rem 0.625rem 0.625rem;
}
#div-related-content .related-content__date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.71875rem;
    color: #888;
    margin-bottom: 0.25rem;
}
#div-related-content .related-content__date .material-icons {
    font-size: 0.8125rem;
}
#div-related-content .related-content__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    font-size: 0.78125rem;
    line-height: 1.35;
    min-height: 2.7em;
    color: #222;
}
@media only screen and (max-width: 767px) {
    #div-related-content .related-content__grid {
        grid-template-columns: repeat(auto-fill, minmax(8.125rem, 1fr));
        gap: 0.5rem;
    }
    #div-related-content .related-content__title {
        font-size: 0.71875rem;
    }
    #div-related-content .related-content__body {
        padding: 0.375rem 0.5rem 0.5rem;
    }
}
