/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header & Navigation */
header {
    background: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    color: #2c3e50;
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: bold;
}

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

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

.nav-links li {
    margin-left: 1.5rem;
}

.nav-links a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.nav-links a:hover {
    color: #3498db;
}

.mobile-menu-btn {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

.mobile-menu {
    display: none;
    margin-top: 1rem;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu a {
    display: block;
    padding: 0.5rem 0;
    color: #333;
    text-decoration: none;
}

.mobile-menu a:hover {
    color: #3498db;
}

/* Main Content */
main {
    padding: 2rem 0;
}

/* Home Page */
.home-page {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.main-content {
    flex: 2;
}

/* Article Styles - Image on Left, Text on Right */
.article {
    background: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
}

.article-image-container {
    width: 100%;
}

.article img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.article-content {
    padding: 1.5rem;
    flex: 1;
}

.article-category {
    color: #3498db;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-weight: 600;
}

.article-meta {
    color: #7f8c8d;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.article-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

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

.article-title a:hover {
    color: #3498db;
}

.article-excerpt {
    color: #666;
    margin-bottom: 1rem;
}

.read-more {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
}

.read-more:hover {
    text-decoration: underline;
}

/* Featured Article */
.featured-article {
    flex-direction: column;
}

.featured-article img {
    height: 300px;
}

/* Sidebar */
.sidebar {
    margin-top: 2rem;
    flex: 1;
}

.sidebar-section {
    background: white;
    border-radius: 5px;
    padding: 1.5rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.sidebar-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.sidebar-article {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    text-decoration: none;
}

.sidebar-article img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 3px;
}

.sidebar-article-content {
    flex: 1;
}

.sidebar-article-title {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
}

.sidebar-article-title a {
    color: #2c3e50;
    text-decoration: none;
}

.sidebar-article-title a:hover {
    color: #3498db;
}

.sidebar-article-date {
    font-size: 0.8rem;
    color: #7f8c8d;
}

/* List Page */
.list-page {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.list-page .article {
    flex-direction: column;
}

/* Buttons & Pagination */
.btn {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.btn:hover {
    background: #2980b9;
}

.center-btn {
    text-align: center;
    margin: 2rem 0;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.pagination a {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.pagination a:hover {
    background: #f0f0f0;
}

.pagination a.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* Content Page */
.content-page {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.content-header {
    margin-bottom: 2rem;
}

.content-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.content-meta {
    color: #7f8c8d;
    margin-bottom: 1.5rem;
}

.author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.content-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    margin-bottom: 2rem;
    border-radius: 5px;
}

.content-body {
    margin-bottom: 2rem;
}

.content-body p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.content-body h2 {
    margin: 2rem 0 1rem;
    color: #2c3e50;
}

/* Share Section */
.share-section {
    margin: 2rem 0;
    padding: 1.5rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.share-title {
    margin-bottom: 1rem;
    font-weight: bold;
    font-size: 1.1rem;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.share-btn:hover {
    background: #f5f5f5;
}

/* Related Articles */
.related-articles {
    margin-top: 3rem;
}

.related-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.related-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}

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

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

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

.copyright {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #34495e;
    font-size: 0.9rem;
    color: #bdc3c7;
}

/* Back to Top Button */
#backToTop {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #3498db;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: bold;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

#backToTop.visible {
    opacity: 1;
    visibility: visible;
}

/* Responsive Adjustments */
@media (min-width: 768px) {
    .home-page {
        flex-direction: row;
    }

    .sidebar {
        margin-top: 0;
    }

    /* Image on left, text on right for larger screens */
    .article:not(.featured-article) {
        flex-direction: row;
    }

    .article:not(.featured-article) .article-image-container {
        width: 35%;
    }

    .article:not(.featured-article) .article-content {
        width: 65%;
    }

    .article:not(.featured-article) img {
        height: 100%;
    }

    .list-page {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}

@media (max-width: 767px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .content-title {
        font-size: 1.6rem;
    }
}
    