
:root {
    --primary: #4361ee;
    --secondary: #3a0ca3;
    --accent: #4cc9f0;
    --light: #f8f9fa;
    --dark: #212529;
    --success: #4bb543;
    --gray: #6c757d;
    --light-gray: #e9ecef;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fb;
    color: var(--dark);
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    /* background: linear-gradient(135deg, var(--primary), var(--secondary)); */
    color: rgb(112, 3, 3);
    padding: .5rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.logo-icon {
    margin-right: 10px;
    font-size: 2rem;
}

.mobile-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(130, 151, 224, 0.8), rgba(58, 12, 163, 0.9));
    background-size: cover;
    background-position: center;
    color: white;
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
}


/* Main Content */
.main-content {
    display: grid;
    /* grid-template-columns: 4fr 0fr; */
    gap: 2rem;
    margin-bottom: 3rem;
}
.blog-section{
    display: flex;
}
/* Blog Posts */
.blog-posts {
    display: grid;
    /* grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); */
    gap: 2rem;
    width: 70%;
    margin-right: 40px;
}

.blog-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.blog-image {
    height: 160px;
    background-size: cover;
    background-position: center;
}

.blog-content {
    padding: 1.2rem;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--gray);
}

.blog-category {
    background: var(--light-gray);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.blog-title {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.blog-excerpt {
    color: var(--gray);
    margin-bottom: 1rem;
}

.read-more {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

/* Full Article Styles */
.full-article {
    display: none;
    background: white;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    width: 70%;
    margin-right: 20px;
}

.article-header {
    margin-bottom: 2rem;
    text-align: center;
    border-bottom: 1px solid var(--light-gray);
    padding-bottom: 1.5rem;
}

.article-title {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--dark);
    line-height: 1.3;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--gray);
}

.article-image {
    width: 100%;
    height: 400px;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    margin: 1.5rem 0;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content h2 {
    margin: 2rem 0 1rem;
    color: var(--secondary);
}

.article-content h3 {
    margin: 1.5rem 0 0.8rem;
    color: var(--primary);
}

.article-content p {
    margin-bottom: 1.2rem;
}

.article-content ul,
.article-content ol {
    margin: 1rem 0 1rem 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.back-button {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    margin-top: 2rem;
    transition: background 0.3s ease;
}

.back-button:hover {
    background: var(--secondary);
}

/* Sidebar */
.sidebar {
    width: 35%;
    background: white;
    border-radius: 10px;
    padding: 1.2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.sidebar-widget {
    margin-bottom: 2rem;
}

.sidebar-widget:last-child {
    margin-bottom: 0;
}

.sidebar-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-gray);
}

.categories-list {
    list-style: none;
}

.categories-list li {
    margin-bottom: 0.8rem;
}

.categories-list li a {
    color: var(--dark);
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    transition: color 0.3s ease;
}

.categories-list li a:hover {
    color: var(--primary);
}

.categories-list li a span {
    background: var(--light-gray);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
}

.popular-posts .post-item {
    display: flex;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--light-gray);
    cursor: pointer;
}

.popular-posts .post-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.post-image {
    width: 70px;
    height: 70px;
    background-size: cover;
    background-position: center;
    border-radius: 5px;
    margin-right: 1rem;
}

.post-content h4 {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
    line-height: 1.4;
}

.post-content .post-date {
    font-size: 0.8rem;
    color: var(--gray);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: var(--light-gray);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--dark);
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--primary);
    color: white;
}

/* Newsletter */
.newsletter {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 3rem;
}

.newsletter h2 {
    margin-bottom: 1rem;
}

.newsletter p {
    margin-bottom: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 5px 0 0 5px;
    font-size: 1rem;
}

.newsletter-form button {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background 0.3s ease;
}

.newsletter-form button:hover {
    background: #3aa8d8;
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    padding: 2rem 0 1.2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-widget h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-widget h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background: var(--primary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links li a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links li a:hover {
    color: white;
}

.copyright {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #343a40;
    color: #adb5bd;
    font-size: 0.9rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.pagination a {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 5px;
    background: white;
    color: var(--dark);
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.pagination a.active,
.pagination a:hover {
    background: var(--primary);
    color: white;
}

/* Responsive */
@media (max-width: 992px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    .blog-section{
        display: block;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        margin-top: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav ul li {
        margin: 0 0.5rem 0.5rem;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .blog-posts {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form input {
        border-radius: 5px;
        margin-bottom: 10px;
    }

    .newsletter-form button {
        border-radius: 5px;
        padding: 12px;
    }

    .article-title {
        font-size: 1.8rem;
    }

    .article-image {
        height: 250px;
    }
}
