@font-face {
    font-family: 'TexgyrebonumItalic';
    src: url('../font/TexgyrebonumItalic.otf') format('opentype');
    font-weight: normal;
    font-style: italic;
}
@font-face {
    font-family: 'EnPhanithRam';
    src: url('../font/EnPhanithRam.ttf') format('truetype');
    font-weight: normal;
    font-style: italic;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'EnPhanithRam', serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

a:hover {
    color: #0066cc !important;
    text-decoration: none !important;
}


.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-container {
    max-width: 600px;
    width: 90%;
}

.search-input {
    width: 100%;
    padding: 20px;
    font-size: 18px;
    border: none;
    border-radius: 4px;
}

.search-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
}

/* Header */
header {
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.top-header {
    border-bottom: 1px solid #eee;
}

.top-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    margin: 0 auto;
}

.top-center {
    flex: 1;
    text-align: center;
}

.top-left, .top-right {
    flex: 0 0 auto;
}

.top-left {
    font-size: 12px;
    cursor: pointer;
    background-color: #0066cc;
    color: white;
    padding: 5px 15px;
    border-radius: 3px;
    font-weight: bold;
}

.top-right {
    font-size: 12px;
}

.top-right a {
    color: #666;
    text-decoration: none;
}

.top-right .subscribe {
    background-color: #0066cc;
    color: white;
    padding: 5px 15px;
    border-radius: 3px;
    font-weight: bold;
}
.top-right a:hover{
    color: #f2f2f2 !important;
}

.logo {
    font-family: 'TexgyrebonumItalic', serif;
    font-size: 48px;
    font-weight: bold;
    color: #0066cc;
    font-style: italic;
}

/* Navigation */
nav {
    border-bottom: 1px solid #eee;
}

.nav-content {
    display: flex;
    justify-content: center;
}

.nav-content ul {
    display: flex;
    list-style: none;
    gap: 40px;
    margin: 0;
}

.nav-content ul li a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
}

.nav-content ul li a:hover {
    color: #0066cc;
}

/* Main Content */
.main-content {
    display: flex;
    gap: 20px;
}

/* Fresh stories Section */
.fresh-stories-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.fresh-stories-section .section-title,.popular-section .section-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.section-description {
    font-size: 14px;
    color: #999;
    margin-bottom: 20px;
}

.latest-news ul {
    list-style: none;
    margin-bottom: 20px;
}

.latest-news ul li {
    margin-bottom: 14px;
    border-bottom: 1px solid #f8f8f8;
}

.latest-news ul li a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.latest-news ul li a:hover {
    color: #0066cc;
}

.article-meta {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    height: 30px;
}
.article-meta .category a{
    font-size: 12px;
     text-decoration: none;
     color: #0066cc;
}
.article-meta .category {
    color: #0066cc;
    font-weight: bold;
    margin-right: 10px;
}

.article-meta .date {
    color: #666;
    font-size: 12px;
}

.category-info {
    margin-top: 20px;
}

.red-category {
    color: #0066cc;
    font-weight: bold;
    margin-right: 15px;
}

.publish-date {
    color: #666;
    font-size: 14px;
}

/* Main Featured Section */
.main-featured-section {
    flex: 2;
}

.main-featured {
    position: relative;
    height: 550px;
}

.main-featured img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-featured-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 20px;
}

.category-tag {
    background-color: #0066cc;
    color: white;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 10px;
    display: inline-block;
}
.category-tag a{
    color: white;
    text-decoration: none;
}
.category-tag a:hover,.search-btn:hover{
    color: #f2f2f2 !important;
}
.main-featured-content h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.main-featured-content h2 a {
    color: white;
    text-decoration: none;
}

.main-featured-content h2 a:hover {
    color: #0066cc;
}

.main-featured-content .article-excerpt {
    font-size: 14px;
    line-height: 1.4;
}

/* Middle Right Section */
.middle-right-section {
    flex: 1;
}

.middle-right {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.side-article {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.side-article img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.side-article-content h3 {
    font-size: 16px;
    line-height: 1.3;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.side-article-content h3 a {
    color: #333;
    text-decoration: none;
}

.side-article-content h3 a:hover {
    color: #0066cc;
}

/* Popular Section */
.popular-section-wrapper {
    flex: 1;
}

.popular-section .section-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
}


/* Popular Section */
.popular-section {
    margin-bottom: 30px;
    box-shadow: 0 0 16px rgba(0, 0, 0, 0.09) !important;
    padding: 20px;
}



.popular-article {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.popular-number {
    font-size: 24px;
    font-weight: bold;
    color: #0066cc;
    width: 30px;
}

.popular-content h3 {
    font-size: 14px;
    line-height: 1.3;
     display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}


.popular-content h3 a {
    color: #333;
    text-decoration: none;
}

.popular-content h3 a:hover {
    color: #0066cc;
}

.popular-content .date {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* Second Main Content */
.main-content-gray {
    background-color: #f8f8f8;
    padding: 20px;
    margin-top: 20px;
    flex-direction: column;
    gap: 20px;
}

/* First Row: 4 Images */
.main-content-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
}

.image-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.image-card img {
    width: 100%;
     aspect-ratio: 9/10;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-card:hover img {
    transform: scale(1.05);
}

.image-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 20px;
}

.image-card-content h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.image-card-content h3 a {
    color: white;
    text-decoration: none;
}

.image-card-content h3 a:hover {
    color: #0066cc;
}

/* Second Row: 8 Content Items */
.content-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
}

.content-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    cursor: pointer;
}

.content-item h3 {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.content-item h3 a {
    color: #333;
    text-decoration: none;
}

.content-item h3 a:hover {
    color: #0066cc;
}

.content-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
}

/* Article List */
.article-list {
    margin-top: 40px;
    margin-bottom: 40px;
}

.article-list .section-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 30px;
}

.article-item {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #f8f8f8;
}

.article-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.article-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.article-content img{
    max-width: 100%;
    display: block;
  margin: 0 auto;
}
.article-meta-info {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #b5b5b5;
}

.article-meta-info span {
    display: inline-block;
}

.article-meta-info .article-author {
    color: #4ea5fc;
}

.article-meta-info .article-category {
    background-color: #dff7ff;
    color: #3cbee9;
    padding: 0px 8px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
}

.article-meta-info .article-category:hover {
    background-color: #3cbee9;
    color: white;
    transition: all 0.3s ease;
}

.article-title {
    font-size: 22px;
    font-weight: bold;
    margin: 0;
}

.article-title a {
    color: #333;
    text-decoration: none;
}

.article-title a:hover {
    color: #0066cc;
}

.article-summary {
    font-size: 14px;
    line-height: 1.4;
    color: #666;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.article-image {
    flex: 0 0 300px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-image:hover img {
    transform: scale(1.05);
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    padding: 40px 0;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-section h3 {
    font-size: 16px;
    margin-bottom: 15px;
}

.footer-section p {
    font-size: 14px;
    color: #ccc;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
}


.footer-logo {
    font-family: 'TexgyrebonumItalic', serif;
    font-size: 24px;
    font-weight: bold;
    color: white;
    font-style: italic;
    margin-bottom: 15px;
}

.social-icons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.social-icon {
    width: 30px;
    height: 30px;
    background-color: #444;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
}

.subscribe-form {
    margin-top: 15px;
}

.subscribe-form input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: none;
    border-radius: 3px;
}

.subscribe-form button {
    width: 100%;
    padding: 10px;
    background-color: #0066cc;
    color: white;
    border: none;
    border-radius: 3px;
    font-weight: bold;
    cursor: pointer;
}

/* Category Page */
.category-page {
    margin: 30px 0;
}

.category-title {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 30px;
    color: #333;
    text-align: center;
}

.article-list {
    margin-bottom: 40px;
}

.article-item {
    display: flex;
    gap: 30px;
    border-bottom: 1px solid #eee;
}

.article-item:last-child {
    border-bottom: none;
}

.article-content {
    flex: 1;
}

.article-meta-info {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.article-meta-info .article-category {
    color: #0066cc;
    text-decoration: none;
}


.article-title {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 10px;
}

.article-title a {
    color: #333;
    text-decoration: none;
}

.article-title a:hover {
    color: #0066cc;
}

.article-summary {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 20px;
}
.article-header{
    margin-bottom: 50px;
}

.article-image {
    flex: 0 0 300px;
    height: 200px;
    overflow: hidden;
}

/* Article Page Layout */
.article-page {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

.article-main {
    flex: 1;
    min-width: 0;
}

.article-sidebar {
    flex: 0 0 300px;
}

.sidebar-section {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.sidebar-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #0066cc;
    padding-bottom: 10px;
}

.sidebar-section ul {
    list-style: none;
    padding: 0;
}

.sidebar-section li {
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.sidebar-section li:last-child {
    border-bottom: none;
}

.sidebar-section a {
    color: #333;
    text-decoration: none;
    display: block;
    margin-bottom: 5px;
}

.sidebar-section a:hover {
    color: #0066cc;
}

.sidebar-views {
    font-size: 12px;
    color: #999;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-image:hover img {
    transform: scale(1.05);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.pagination ul {
    display: flex;
    list-style: none;
    gap: 10px;
}

.pagination li a {
    display: block;
    padding: 8px 16px;
    text-decoration: none;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pagination li a:hover {
    background-color: #f5f5f5;
    border-color: #0066cc;
    color: #0066cc;
}

.pagination li.active a {
    background-color: #0066cc;
    color: white;
    border-color: #0066cc;
}

/* Responsive */
@media (max-width: 1200px) {
    .container {
        padding: 15px;
    }
    
    .main-content {
        gap: 15px;
    }
    
    .main-content-row {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .content-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 992px) {
    .main-content {
        flex-direction: column;
    }
    
    .main-featured {
        height: 400px;
    }
    
    .main-content-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .content-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .article-item {
        flex-direction: column;
        gap: 20px;
    }
    
    .article-image {
        flex: 0 0 auto;
        width: 100%;
    }
    
    .article-image img {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 768px) {
    .top-header-content {
        flex-direction: column;
        gap: 10px;
        padding: 15px 0;
    }
    
    .logo {
        font-family: 'TexgyrebonumItalic', serif;
        font-size: 36px;
    }
    
    .nav-content ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .main-featured {
        height: 300px;
    }
    
    .main-content-row {
        grid-template-columns: 1fr;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .content-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .content-item img {
        width: 100%;
        height: 150px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .article-meta-info {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .fresh-stories-section .section-title, .popular-section .section-title {
        font-size: 20px;
    }
    
    .article-title {
        font-size: 18px;
    }
    
    /* Category Page */
    .article-item {
        flex-direction: column;
        gap: 15px;
    }
    
    .article-content {
        flex: 1;
    }
    
    .article-image {
        flex: 0 0 auto;
        width: 100%;
    }
    
    .article-image img {
        width: 100%;
        height: 200px;
    }
    
    /* Article Page */
    .article-page {
        flex-direction: column;
        gap: 30px;
    }
    
    .article-main {
        flex: 1;
    }
    
    .article-sidebar {
        flex: 0 0 100%;
    }
    
    .sidebar-section h3 {
        font-size: 18px;
    }
    
    /* Search Page */
    .search-title {
        font-size: 20px;
    }
    
    .no-results {
        padding: 30px 0;
    }
    
    /* Pagination */
    .pagination ul {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .pagination li a {
        padding: 8px 12px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .logo {
        font-family: 'TexgyrebonumItalic', serif;
        font-size: 28px;
    }
    
    .nav-content ul {
        gap: 10px;
    }
    
    .nav-content ul li a {
        font-size: 12px;
    }
    
    .main-featured {
        height: 250px;
    }
    
    .main-featured-content h2 {
        font-size: 20px;
    }
    
    .article-title {
        font-size: 16px;
    }
    
    .article-image img {
        height: 150px;
    }
    
    .footer-section h3 {
        font-size: 14px;
    }
    
    .footer-section p {
        font-size: 12px;
    }
    
    /* Category Page */
    .category-title {
        font-size: 20px;
    }
    
    .article-item {
        gap: 10px;
    }
    
    .article-meta-info {
        font-size: 12px;
    }
    
    /* Article Page */
    .article-header h1 {
        font-size: 20px;
    }
    
    .article-sidebar {
        padding: 20px;
    }
    
    .sidebar-section h3 {
        font-size: 16px;
    }
    
    .sidebar-section ul li {
        font-size: 14px;
    }
    
    /* Search Page */
    .search-title {
        font-size: 18px;
    }
    
    .no-results p {
        font-size: 14px;
    }
    
    /* Pagination */
    .pagination li a {
        padding: 6px 10px;
        font-size: 12px;
    }
}