/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

html,
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f8;
    color: #333;
    line-height: 1.6;
}

/* Layout Containers */
.rh-container {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

.homepage-wrapper {
    padding: 20px;
}

.homepage-layout {
    display: grid;
    grid-template-columns: 1fr 3fr 1fr;
    gap: 20px;
}

/* Header */
.main-header {
    background-color: #ffc500;
    color: white;
    padding: 15px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
}

.logo-container img {
    height: 50px;
}

.search-container {
    display: flex;
}

.search-container input {
    padding: 8px 12px;
    border: none;
    border-radius: 4px 0 0 4px;
}

.search-container button {
    background-color: #0077cc;
    border: none;
    padding: 8px 12px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.search-container svg {
    stroke: white;
}

/* Footer */
.footer {
    background-color: #1e1e2f;
    color: white;
    text-align: center;
    padding: 20px;
}

.footer-links {
    margin-bottom: 10px;
}

.footer-links a {
    margin: 0 10px;
    color: #ccc;
    text-decoration: none;
}

.footer-links a:hover {
    color: white;
}

/* Sidebar */
.sidebar {
    padding: 0px;
    border-radius: 8px;
    height: fit-content;
}

.sidebar h2 {
    margin-bottom: 10px;
    text-align: center;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li {
    margin-bottom: 8px;
}

ul {
    list-style: inside;
}

.sidebar-box {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
}

/* Latest Posts */
.latest-posts {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.latest-post-item {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #000;
}

.latest-post-item:hover {
    text-decoration: none;
}

.latest-post-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.latest-post-item .post-info p {
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0;
    color: #000;
    text-decoration: none;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.latest-post-item .post-info p:hover {
    color: #005fa3;

}

/* Recent Posts */
.recent-posts-list {
    list-style: none;
    padding-left: 0;
}

.recent-posts-list li {
    margin-bottom: 8px;
}

.recent-posts-list li a {
    color: #000;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-posts-list li a:hover {
    color: #005fa3;

}

/* Article Cards */
.article-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 275px;
}

.article-card:hover {
    transform: translateY(-5px);
}

.article-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.overlay-content {
    padding: 12px;
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
}

.overlay-content h3 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 2.8em;
    margin: 0;

    text-decoration: none;

}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

/* Category Page */
.category-title-wraper {
    text-align: center;
    margin: 30px 0 10px;
}

.category-title {
    font-size: 2rem;
}

.category-articles {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.category-article-card {
    display: flex;
    gap: 20px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.05);
}

.card-thumb img {
    width: 150px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

.card-details h2 {
    margin-bottom: 10px;
}

.card-meta {
    margin-top: 10px;
    font-size: 0.9em;
    color: #666;
}

.read-more {
    float: right;
    color: #0077cc;
}

/* Pagination */
.pagination {
    text-align: center;
    margin: 30px 0;
}

.page-link {
    display: inline-block;
    margin: 0 5px;
    padding: 2px 12px;
    background: #eee;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
}

.page-link.active {
    background: #0077cc;
    color: white;
}

/* Article Page */
.article-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
}

.article-title {
    font-size: 2rem;
    margin-bottom: 10px;
}

.article-meta {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 20px;
}

.article-hero img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 20px;
}

.article-body {
    line-height: 1.8;
}

/* Static Pages */
.static-page h1 {
    margin-bottom: 20px;
}

.static-body {
    background: white;
    padding: 20px;
    border-radius: 8px;
    line-height: 1.8;
}

/* Modern Categories Grid */
.modern-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 12px;
    margin-bottom: 30px;
}

.modern-category-card {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0077cc, #005fa3);
    color: white;
    padding: 12px 16px;
    border-radius: 30px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    text-decoration: none;
}

.modern-category-card:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, #005fa3, #003f7f);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.modern-category-title {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive */
@media (max-width: 1024px) {
    .homepage-layout {
        grid-template-columns: 1fr 2fr;
    }
}

@media (max-width: 768px) {
    .homepage-layout {
        grid-template-columns: 1fr;
    }

    .category-article-card {
        flex-direction: column;
    }

    .logo-container img {
        height: 40px;

    }

    .search-container {
        flex-direction: row;
        align-items: center;
        max-width: 100%;
        margin-top: 0px;
    }

    .search-container input {
        font-size: 0.85rem;
        padding: 9px 10px;
        width: 140px;
    }

    .search-container button {
        padding: 6px 10px;
    }

    .search-container svg {
        width: 16px;
        height: 16px;
    }

}


.article-card {
    text-decoration: none;
    color: inherit;
}

.article-card h3,
.article-card h3 a {
    text-decoration: none;
    color: #333;
}

.article-card h3 a:hover {
    color: #005fa3;
}

.modern-category-card.active {
    background: linear-gradient(135deg, #ffc500, #e0a800);
    color: #000;
    font-weight: 700;
}

/* Category Article Card Title */
.category-article-card h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #000;
    margin: 0 0 8px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.category-article-card h2:hover {
    color: #005fa3;
}

/* Remove underline from link wrapping the title */
.category-article-card a {
    text-decoration: none;
    color: inherit;
}

/* Read More Button */
.read-more {
    display: inline-block;
    margin-top: 10px;
    color: #0077cc;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: #005fa3;
}