.news-main {
    width: 100%;
    height: calc(100vh - 65px);
    overflow-x: hidden;
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    background-color: var(--color-bg);
}

.news-page-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    height: 100%;
}

.news-page-header-container {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    padding: 8px;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 2px 4px rgba(10, 10, 10, 0.15);
}

.news-page-header-title {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 4px;
}
.news-page-header-title p {
    font-size: clamp(12px, 1.8vw, 14px);
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
    text-align: right;
}

.news-page-header-title img {
    width: 19px;
    height: 19px;
    pointer-events: none;
    user-select: none;
}

.news-page-body-container {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: flex-start;
    width: 100%;
    height: 100%;
}

.new-hottest-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 30%;
    height: 100%;
    border-left: 1px solid var(--color-border);
}

.new-hottest-header {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    padding: 16px;
}
.new-hottest-header p {
    font-size: clamp(12px, 1.8vw, 14px);
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
    text-align: center;
}

.new-hottest-list-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    width: 100%;
    height: 100%;
}

.new-hottest-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    height: calc(100vh - 139px);
    width: 100%;
    padding: 0 16px 16px 16px;
    direction: ltr;
    box-sizing: border-box;
    min-width: unset;
    scrollbar-width: none;
}
.new-hottest-list::-webkit-scrollbar {
    display: none;
}

.new-hottest-item {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
    padding: 16px 0;
    direction: rtl;
    border-bottom: 1px solid var(--color-border);
    scroll-snap-align: center;
}
.new-hottest-item:last-child {
    border-bottom: none;
}

.new-hottest-img-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100px;
    height: 100px;
    border-radius: 8px;
}

.top-news-img {
    width: 100%;
    height: 100%;
    pointer-events: none;
    user-select: none;
    border-radius: 8px;
    object-fit: cover;
}

.new-hottest-item-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 8px;
    width: calc(100% - 100px);
    height: 100%;
    box-sizing: border-box;
}
.new-hottest-item-body h6 {
    font-size: clamp(13px, 1.4vw, 15px);
    font-weight: 600;
    color: var(--color-text);
    text-align: right;
    margin: 0;
    text-overflow: ellipsis;
    display: -webkit-box;
    max-width: 100%;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-body {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 80%;
}

.news-category-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 16px 0;
    border-bottom: 1px solid var(--color-border);
}

.news-category-slider {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    scroll-snap-type: x mandatory;
    width: max-content;
    scroll-behavior: smooth;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 16px;
    padding: 0 16px;
    scrollbar-width: none;
}
.news-category-slider::-webkit-scrollbar {
    display: none;
}

.news-category-item {
    position: relative;
    display: flex;
    flex: 0 0 max-content;
    justify-content: center;
    align-items: center;
    padding: 6px 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background-color: var(--color-bg-soft);
    scroll-snap-align: center;
    cursor: pointer;
    color: var(--color-text);
    transition: border-color 0.3s ease, color 0.3s ease;
}
.news-category-item p {
    font-size: clamp(12px, 1.2vw, 14px);
    font-weight: 600;
    margin: 0;
    text-align: center;
}

.news-category-item.active {
    color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}

.news-body-search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    width: 100%;
    box-sizing: border-box;
    display: none;
}

.news-search-input-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
    max-width: 450px;
}

.news-search-input-container input {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background-color: #F5F5F5;
    border-radius: 999px;
    height: 42px;
    padding: 4px 20px 4px 45px;
    border: none;
    box-sizing: border-box;
    font-family: "PeydaWebVF", serif;
    transition: background-color 0.3s ease;
}
.news-search-input-container input:focus {
    outline: none;
    background-color: #F2F2F2;
}
.news-search-input-container img {
    position: absolute;
    left: 20px;
    top: calc(50% - 6px);
    width: 12px;
    height: 12px;
    pointer-events: none;
    user-select: none;
}

.news-slider-container {
    display: flex;
    position: relative;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    height: 100%;
}

.news-container {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    height: calc(100vh - 124px);
    gap: 8px;
    padding: 16px 16px 16px 16px;
    box-sizing: border-box;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    overflow-y: auto;
}

.news-item {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    scroll-snap-align: center;
    flex-shrink: 0;
    height: 150px;
    width: 100%;
    background-color: var(--color-bg-soft);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(10, 10, 10, 0.1);
    border-bottom: 1px solid var(--color-border);
}

.news-item-img-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 150px;
    border-radius: 0 8px 8px 0;
}

.news-item-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
    border-radius: 0 8px 8px 0;
}

.news-item-img-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    border-radius: 0 8px 8px 0;
}

.news-item-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    width: calc(100% - 150px);
    height: 100%;
}
.news-item-body h5 {
    font-size: clamp(13px, 1.4vw, 15px);
    font-weight: 600;
    color: var(--color-text);
    text-align: right;
    margin: 0;
    text-overflow: ellipsis;
    display: -webkit-box;
    width: 100%;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-item-body h6 {
    font-size: clamp(12px, 1.4vw, 14px);
    font-weight: 500;
    color: var(--color-text);
    text-align: right;
    margin: 0;
    text-overflow: ellipsis;
    display: -webkit-box;
    width: 100%;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-item-body p {
    font-size: clamp(11px, 1.4vw, 13px);
    font-weight: normal;
    color: var(--color-text);
    text-align: right;
    margin: 0;
    text-overflow: ellipsis;
    display: -webkit-box;
    width: 100%;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-item-body-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
}

.news-item-footer {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
    border-top: 1px solid var(--color-border);
}

.news-item-footer-right {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

.news-item-footer-time {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 4px;
}
.news-item-footer-time img {
    height: 18px;
    width: 18px;
    pointer-events: none;
    user-select: none;
}
.news-item-footer-time p {
    font-size: clamp(10px, 1.2vw, 12px);
    font-weight: normal;
    color: var(--color-text);
    text-align: center;
    margin: 0;
}

.news-item-footer-tags {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.news-item-tag {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--color-bg);
    border-radius: 6px;
    padding: 4px 8px;
}
.news-item-tag p {
    font-size: clamp(9px, 1.2vw, 11px);
    font-weight: 650;
    color: var(--color-text);
    text-align: center;
    margin: 0;
}

.news-item-footer-left {
    display: flex;
    justify-content: center;
    align-items: center;
}
.news-item-footer-goto {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 4px;
    color: var(--color-primary);
    transition: color 0.3s ease;
}
.news-item-footer-goto p {
    margin: 0;
    font-size: clamp(10px, 1.2vw, 12px);
    font-weight: 600;
    text-align: center;
    color: var(--color-primary);
}
.news-item-footer-goto:hover {
    color: var(--color-primary-hover);
}


.news-detail-page {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    opacity: 0;
    z-index: -3000;
    background-color: var(--color-bg);
    transition: opacity 0.3s ease, z-index 0.3s ease;
}
.news-detail-page.show {
    opacity: 1;
    z-index: 3000;
}

.news-detail-header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 16px;
    padding: 16px;
    box-sizing: border-box;
}

.news-detail-header-detail{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.news-detail-header-date-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    align-self: flex-start;
    gap: 6px;
}
.news-detail-header-date-container img {
    width: 15px;
    height: 15px;
    user-select: none;
    pointer-events: none;
}
.news-detail-header-date-container p {
    font-size: clamp(10px, 1.2vw, 12px);
    font-weight: normal;
    color: var(--color-text);
    text-align: center;
    margin: 0;
}

.news-detail-header-captions-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
}

.news-detail-header-back-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    align-self: flex-end;
    cursor: pointer;
    padding: 3px;
    border-radius: 5px;
    background-color: transparent;
    transition: background-color 0.3s ease;
}
.news-detail-header-back-container img {
    width: 20px;
    height: 20px;
    pointer-events: none;
    user-select: none;
}
.news-detail-header-back-container:hover {
    background-color: var(--color-active-btn);
}

.news-detail-img-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 450px;
    height: auto;
    border-radius: 14px;
}
.news-detail-img {
    width: 100%;
    height: 100%;
    border-radius: 14px;
    object-fit: cover;
    user-select: none;
    pointer-events: none;
}

.news-detail-title-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    justify-content: center;
    align-items: center;
    width: 100%;
}
.news-detail-title-container h6 {
    font-size: clamp(12px, 1.4vw, 14px);
    font-weight: 600;
    color: var(--color-text);
    text-align: center;
    margin: 0;
}
.news-detail-title-container p {
    margin: 0;
    font-size: clamp(12px, 1.4vw, 14px);
    font-weight: 500;
    color: var(--color-text);
    text-align: center;
}

.news-detail-body {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    padding: 16px;
    box-sizing: border-box;
}
.news-detail-body p {
    text-align: justify;
    font-size: clamp(12px, 1.4vw, 14px);
    font-weight: normal;
    color: var(--color-text);
    margin: 0;
}


.loading-spinner-news {
    position: absolute;
    top: calc(10% - 10px);
    left: calc(50% - 18px);
    text-align: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}
.spinner-news {
    width: 40px;
    height: 40px;
    border: 2px solid var(--color-secondary);
    border-top-color: var(--color-bg-soft);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* Mobile */
@media (max-width: 991.999px) {
    .news-main {
        height: calc(100vh - 133px);
    }
    .news-page-body-container {
        flex-direction: column;
    }
    .new-hottest-container {
        width: 100% !important;
        height: max-content;
    }
    .new-hottest-list {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        overflow-y: hidden;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        height: max-content;
        width: max-content;
        min-width: 100%;
        padding: 0;
        direction: rtl;
    }
    .new-hottest-item {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        width: 100%;
        box-sizing: border-box;
        flex: 0 0 50%;
        padding: 0px 0;
        direction: rtl;
        border-bottom: none;
        scroll-snap-align: start;
    }
    .new-hottest-img-container {
        width: 80px;
        height: 80px;
    }
    .news-body {
        width: 100%;
    }
    .news-container {
        height: calc(100vh - 322px);
    }
    .news-body-search-container {
        padding: 8px;
        width: 100%;
        box-sizing: border-box;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .news-item {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: flex-start;
        scroll-snap-align: center;
        flex-shrink: 0;
        height: auto;
        width: 100%;
    }
    .news-item-img-container {
        height: 120px;
        width: 100%;
    }
    .news-item-img-container img {
         border-radius: 8px 8px 0 0;
    }
    .news-item-body {
        width: 100%;
        height: calc(100% - 120px);
    }
    .new-hottest-item {
        flex: 0 0 90%;
    }

}