@import url('https://fonts.googleapis.com/css2?family=Hanuman:wght@100..900&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

html,
body,
body * {
    cursor: url('../img/cursor.png') 1 1, auto !important;
}

html,
body {
    background: #f1f1f1;
    font-family: 'Montserrat', sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.news-section-title {
    color: #111;
}

.news-section-title span {
    background: #111;
}

.news-article--empty {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 720px;
}

.news-empty-state {
    max-width: 560px;
    padding: 48px 24px;
    text-align: center;
}

.news-empty-state h1 {
    color: #4b260e;
    font-size: 32px;
    line-height: 1.3;
    margin: 0 0 12px;
}

.news-empty-state p {
    color: #76543b;
    font-size: 16px;
    line-height: 1.7;
    margin: 0;
}

@media (max-width: 767.98px) {
    .news-article--empty {
        min-height: 480px;
    }

    .news-empty-state h1 {
        font-size: 26px;
    }
}

/* Backend-authored content is black unless the editor supplies a color. */
.news-rich-content table,
.download-rich-content table {
    border-collapse: collapse;
    margin: 18px 0 24px;
    max-width: 100%;
    width: 100%;
}

.news-rich-content p,
.download-rich-content p {
    margin: 0 0 12px;
}

.news-rich-content,
.download-rich-content {
    line-height: 1.6;
}

.news-article__body.is-khmer .news-rich-content {
    line-height: 1.8;
}

.news-article__body > h1,
.news-article__body > time,
.news-rich-content,
.download-rich-content {
    color: #111;
}

.news-rich-content h1,
.news-rich-content h2,
.news-rich-content h3,
.news-rich-content h4,
.news-rich-content h5,
.news-rich-content h6,
.news-rich-content a,
.news-rich-content th,
.news-rich-content td,
.download-rich-content h1,
.download-rich-content h2,
.download-rich-content h3,
.download-rich-content h4,
.download-rich-content h5,
.download-rich-content h6,
.download-rich-content a,
.download-rich-content th,
.download-rich-content td {
    color: inherit;
}

.news-rich-content img,
.download-rich-content img {
    display: inline-block;
    height: auto;
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
    vertical-align: middle;
}

.news-rich-content::after,
.download-rich-content::after {
    clear: both;
    content: "";
    display: block;
}

img.noto-animated-emoji,
.news-rich-content img.noto-animated-emoji,
.download-rich-content img.noto-animated-emoji {
    display: inline-block;
    height: 1.45em;
    line-height: 0;
    margin: 0 .08em;
    max-width: none;
    vertical-align: -.3em;
    width: 1.45em;
}

.news-rich-content td img.noto-animated-emoji,
.news-rich-content th img.noto-animated-emoji,
.download-rich-content td img.noto-animated-emoji,
.download-rich-content th img.noto-animated-emoji {
    height: 1.3em;
    margin: 0 .06em;
    vertical-align: -.24em;
    width: 1.3em;
}

.news-list-body {
    padding: 26px 32px 42px;
}

.news-list-body.is-khmer,
.news-list-body.is-khmer * {
    font-family: 'Hanuman', 'Noto Sans Khmer', 'Khmer OS Battambang', serif;
    letter-spacing: 0;
}

.news-list-item {
    align-items: start;
    border-bottom: 1px solid #e2ddd6;
    display: grid;
    gap: 22px;
    grid-template-columns: 210px minmax(0, 1fr);
    padding: 24px 0;
}

.news-list-item:first-child {
    padding-top: 0;
}

.news-list-item:last-child {
    border-bottom: 0;
}

.news-list-item__media {
    aspect-ratio: 16 / 10;
    background: #eee8df;
    border-radius: 4px;
    display: block;
    overflow: hidden;
}

.news-list-item__media img {
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
    width: 100%;
}

.news-list-item__media:hover img {
    transform: scale(1.025);
}

.news-list-item__media--empty {
    align-items: center;
    color: #b68243;
    display: flex;
    font-size: 38px;
    justify-content: center;
}

.news-list-item__meta {
    align-items: center;
    color: #7b6a5e;
    display: flex;
    font-size: 12px;
    gap: 12px;
    position: absolute;
    right: 0;
    top: 2px;
}

.news-list-item__meta time {
    margin-left: auto;
}

.news-list-item__content {
    min-width: 0;
    position: relative;
}

.news-list-item h2 {
    font-size: 20px;
    line-height: 1.4;
    margin: 0 0 9px;
    padding-right: 100px;
}

.news-list-item h2 a {
    color: #1c1713;
    text-decoration: none;
}

.news-list-item h2 a:hover {
    color: #9a6229;
}

.news-list-item p {
    color: #5f554d;
    font-size: 13px;
    line-height: 1.75;
    margin: 0 0 12px;
}

.news-list-item__more {
    align-items: center;
    color: #004881;
    display: inline-flex;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: color .18s ease;
}

.news-list-item__more:hover {
    color: #b5341e;
    text-decoration: none;
}

.news-list-item__more::after {
    content: "\203A";
    font-family: Arial, sans-serif;
    font-size: 19px;
    line-height: 1;
    margin-left: 8px;
    margin-top: -1px;
}

.news-pagination {
    align-items: center;
    display: flex;
    gap: 7px;
    justify-content: center;
    padding-top: 30px;
}

.news-pagination a {
    align-items: center;
    border: 1px solid #d7c7b6;
    color: #68401b;
    display: inline-flex;
    font-size: 13px;
    height: 34px;
    justify-content: center;
    min-width: 34px;
    padding: 0 8px;
    text-decoration: none;
}

.news-pagination a:hover,
.news-pagination a.is-active {
    background: #9a6229;
    border-color: #9a6229;
    color: #fff;
}

@media (max-width: 767.98px) {
    .news-list-body {
        padding: 22px 18px 36px;
    }

    .news-list-item {
        gap: 14px;
        grid-template-columns: 1fr;
        padding: 22px 0;
    }

    .news-list-item h2 {
        font-size: 18px;
        padding-right: 92px;
    }
}

@media (max-width: 767.98px) {
    .news-rich-content table,
    .download-rich-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }
}

body.auth-page {
    opacity: 0;
    transform: translateY(6px);
    animation: authPageEnter 160ms ease-out forwards;
}

body.auth-page.auth-page-leaving {
    animation: authPageLeave 95ms ease-in forwards;
}

@keyframes authPageEnter {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes authPageLeave {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-3px);
    }
}

@media (prefers-reduced-motion: reduce) {
    body.auth-page,
    body.auth-page.auth-page-leaving {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

body.auth-has-background {
    background: #111;
    position: relative;
}

body.auth-has-background::before,
.auth-bg-video {
    height: 100vh;
    left: 0;
    object-fit: cover;
    position: fixed;
    top: 0;
    width: 100vw;
}

body.auth-has-background::before {
    background: var(--auth-bg-image, none) center / cover no-repeat;
    content: "";
    z-index: 0;
}

.auth-bg-video {
    z-index: 0;
}

body.auth-has-background::after {
    background: linear-gradient(180deg, rgba(7, 10, 16, 0.3), rgba(7, 10, 16, 0.46));
    content: "";
    inset: 0;
    pointer-events: none;
    position: fixed;
    z-index: 1;
}

html[lang="km"] body {
    font-family: 'Hanuman', sans-serif;
}

::selection {

    color: #fff;
    background: #910000;
}

/* Removed legacy absolute container positioning to rely on Bootstrap flex utilities */
.auth-container {
    background: #f1f1f1;
}

body.auth-has-background .auth-container {
    background: transparent;
    position: relative;
    z-index: 2;
}

.form {
    background: #fff;
    padding: 50px 30px;
    border-radius: 5px;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

body.auth-has-background .form {
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: 0 22px 52px rgba(0, 0, 0, 0.34);
}

.form form .form-control {
    height: 35px;
    font-size: 15px;
}

.form form .form-control:focus {
    border-color: #d9dee7;
    box-shadow: 0 0 0 3px rgba(23, 29, 43, 0.08);
}

.form form .form-control:invalid {
    border-color: #d9dee7;
    box-shadow: none;
}

.form form .forget-pass {
    margin: -15px 0 15px 0;
}

.form form .forget-pass a {
    font-size: 15px;
}

.form form .button {
    background: #910000;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.form form .button:hover {
    background: #730000;
}

.form form .link {
    padding: 5px 0;
}

.form form .link a {
    color: #910000;
}

.login-form form p {
    font-size: 14px;
}

.row .alert {
    font-size: 14px;
}

.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
h1,
h2,
h3,
h4,
h5,
h6 {
    margin-bottom: 2.0rem;
    font-weight: 500;
    line-height: 1.2;
}

footer {
    background-color: #222;
    color: #fff;
    font-size: 15px;
    position: relative;
    text-align: center;
    z-index: 999;
}

footer p {
    margin: 10px 0;
}

footer i {
    color: red;
}

footer a {
    color: #3c97bf;
    text-decoration: none;
}

.custom-page-body { padding: 34px 34px 70px; }
.custom-page-body.is-khmer,
.custom-page-body.is-khmer .news-rich-content,
.custom-page-body.is-khmer .news-rich-content * {
    font-family: 'Hanuman', 'Noto Sans Khmer', 'Khmer OS Battambang', serif;
    letter-spacing: 0;
}
.custom-page-body .news-rich-content {
    color: #111;
    min-height: 560px;
}
@media (max-width: 767.98px) {
    .custom-page-body { padding: 26px 20px 48px; }
    .custom-page-body .news-rich-content { min-height: 360px; }
}
