/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

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

a {
    color: #2c6ecb;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #1a4b8c;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Header Styles */
.site-header {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #222;
}

.main-nav ul {
    display: flex;
    list-style: none;
}

.main-nav li {
    margin-left: 30px;
}

.main-nav a {
    color: #555;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: #2c6ecb;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin-bottom: 5px;
    border-radius: 3px;
}

/* Featured Article */
.featured-article {
    padding: 40px 0;
    background-color: white;
    margin-bottom: 40px;
}

.featured-article .container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.featured-content {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-title {
    font-size: 2.2rem;
    line-height: 1.2;
    margin: 15px 0 20px;
}

.featured-title a {
    color: #222;
    text-decoration: none;
}

.featured-title a:hover {
    color: #2c6ecb;
}

.featured-excerpt {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 20px;
}

.featured-image {
    flex: 1;
    min-width: 300px;
}

.featured-image img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

/* Section Titles */
.section-title {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: #222;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background-color: #2c6ecb;
}

/* Waterfall Grid */
.waterfall-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.news-card {
    background-color: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.news-image {
    height: 180px;
    overflow: hidden;
}

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

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

.news-content {
    padding: 20px;
}

.category {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 3px;
    margin-bottom: 10px;
}

.category.politics {
    background-color: #e1f5fe;
    color: #0288d1;
}

.category.tech {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.category.business {
    background-color: #fff3e0;
    color: #ef6c00;
}

.category.health {
    background-color: #fce4ec;
    color: #c2185b;
}

.category.science {
    background-color: #ede7f6;
    color: #6a1b9a;
}

.category.culture {
    background-color: #e0f7fa;
    color: #00838f;
}

.category.sports {
    background-color: #f1f8e9;
    color: #558b2f;
}

.category.education {
    background-color: #fff8e1;
    color: #ff8f00;
}

.category.environment {
    background-color: #e8f5e9;
    color: #388e3c;
}

.category.books {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.news-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
    line-height: 1.3;
}

.news-title a {
    color: #222;
    text-decoration: none;
}

.news-title a:hover {
    color: #2c6ecb;
}

.news-excerpt {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    display: flex;
    font-size: 0.85rem;
    color: #888;
}

.article-meta span:not(:last-child) {
    margin-right: 10px;
    position: relative;
}

.article-meta span:not(:last-child)::after {
    content: '•';
    position: absolute;
    right: -6px;
}

.author-info {
    display: flex;
    align-items: center;
    margin-right: 15px;
}

.author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 8px;
}

/* Load More Button */
.load-more {
    text-align: center;
    margin-bottom: 60px;
}

.btn {
    display: inline-block;
    background-color: #2c6ecb;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background-color: #1a4b8c;
    color: white;
}

/* News List Page */
.page-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.category-filters {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    background-color: white;
    border: 1px solid #ddd;
    padding: 6px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.filter-btn:hover {
    border-color: #2c6ecb;
    color: #2c6ecb;
}

.filter-btn.active {
    background-color: #2c6ecb;
    color: white;
    border-color: #2c6ecb;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 40px 0;
}

.page-link {
    display: inline-block;
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    color: #555;
    text-decoration: none;
    transition: all 0.2s ease;
}

.page-link:hover {
    border-color: #2c6ecb;
    color: #2c6ecb;
}

.page-link.active {
    background-color: #2c6ecb;
    color: white;
    border-color: #2c6ecb;
}

.page-dots {
    color: #888;
    padding: 0 5px;
}

/* Article Page */
.article-page {
    padding: 30px 0;
}

.article-header {
    max-width: 800px;
    margin: 0 auto 40px;
}

.article-title {
    font-size: 2.5rem;
    line-height: 1.2;
    color: #222;
    margin: 15px 0 20px;
}

.article-meta {
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.article-featured-image {
    margin-bottom: 40px;
}

.article-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

.image-caption {
    font-size: 0.9rem;
    color: #777;
    margin-top: 8px;
    font-style: italic;
    text-align: center;
}

.article-content {
    max-width: 800px;
    margin: 0 auto 40px;
    font-size: 1.1rem;
    color: #333;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content h2 {
    font-size: 1.8rem;
    margin: 30px 0 15px;
    color: #222;
}

.article-content ul {
    margin: 0 0 20px 30px;
}

.article-content li {
    margin-bottom: 10px;
}

.article-image {
    margin: 30px 0;
}

.article-image img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

.article-image figcaption {
    font-size: 0.9rem;
    color: #777;
    margin-top: 8px;
    font-style: italic;
    text-align: center;
}

/* Share Buttons */
.article-share {
    max-width: 800px;
    margin: 0 auto 40px;
    padding: 20px;
    background-color: #f5f7fa;
    border-radius: 5px;
}

.article-share h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #222;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.share-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.share-btn:hover {
    opacity: 0.9;
}

.share-btn.facebook {
    background-color: #3b5998;
}

.share-btn.twitter {
    background-color: #1da1f2;
}

.share-btn.whatsapp {
    background-color: #25d366;
}

.share-btn.email {
    background-color: #7d7d7d;
}

/* Author Bio */
.author-bio {
    max-width: 800px;
    margin: 0 auto 50px;
    padding: 25px;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 20px;
}

.author-bio-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

.author-bio-title {
    color: #777;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.author-bio-text {
    color: #555;
}

/* Related Articles */
.related-articles {
    max-width: 800px;
    margin: 0 auto;
}

.related-articles h3 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: #222;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.related-article {
    display: block;
    background-color: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease;
}

.related-article:hover {
    transform: translateY(-5px);
}

.related-article img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.related-article h4 {
    padding: 15px;
    font-size: 1rem;
    color: #222;
}

.related-date {
    display: block;
    padding: 0 15px 15px;
    font-size: 0.85rem;
    color: #888;
}

/* Footer */
.site-footer {
    background-color: #222;
    color: white;
    padding: 50px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: white;
}

.footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: white;
}

.footer-section p {
    color: #bbb;
    margin-bottom: 15px;
}

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

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

.footer-section a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-section a:hover {
    color: white;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #888;
    font-size: 0.9rem;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #2c6ecb;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: opacity 0.3s ease, visibility 0.3s ease;
    opacity: 0;
    visibility: hidden;
    border: none;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #1a4b8c;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .waterfall-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .waterfall-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .article-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .waterfall-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        box-shadow: 0 5px 5px rgba(0,0,0,0.1);
        padding: 20px;
    }
    
    .main-nav.active {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
    }
    
    .main-nav li {
        margin: 10px 0;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .featured-title {
        font-size: 1.8rem;
    }
    
    .article-title {
        font-size: 1.8rem;
    }
    
    .author-bio {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .waterfall-grid {
        grid-template-columns: 1fr;
    }
    
    .site-title {
        font-size: 1.5rem;
    }
    
    .featured-title {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .article-title {
        font-size: 1.5rem;
    }
    
    .article-content {
        font-size: 1rem;
    }
    
    .article-content h2 {
        font-size: 1.5rem;
    }
    
    .share-btn {
        flex: 1;
        justify-content: center;
    }
}
    