:root {
    --primary: #392f88;
    --secondary: #4a3fb5;
    --accent: #5d4fd6;
    --light: #f5f7fa;
    --dark: #2a235c;
    --gray: #8a8ea3;
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #e74c3c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
    background-color: #f9fafc;
}

/* Header */
header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

.logo h1 {
    font-size: 1.5rem;
    color: var(--primary);
}

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

.nav-menu li {
    margin: 0 15px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-menu a:hover {
    color: var(--primary);
}

.nav-menu a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--primary);
    left: 0;
    bottom: -5px;
    transition: width 0.3s;
}

.nav-menu a:hover:after {
    width: 100%;
}

.nav-buttons {
    display: flex;
    align-items: center;
}

.btn {
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-block;
}

.btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
    margin-right: 15px;
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary);
}

/* Blog Hero */
.blog-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 150px 5% 80px;
    text-align: center;
    margin-top: 80px;
}

.blog-hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.blog-hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.9;
}

.blog-search {
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

.blog-search input {
    width: 100%;
    padding: 15px 20px;
    border-radius: 50px;
    border: none;
    font-size: 1rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.blog-search button {
    position: absolute;
    right: 5px;
    top: 5px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 10px 20px;
    cursor: pointer;
    transition: background 0.3s;
}

.blog-search button:hover {
    background: var(--dark);
}

/* Blog Content */
.blog-container {
    display: flex;
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 5%;
    gap: 40px;
}

.blog-posts {
    flex: 2;
}

.blog-sidebar {
    flex: 1;
}

/* Blog Posts */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.post-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.post-img {
    height: 200px;
    overflow: hidden;
}

.post-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.post-content {
    padding: 25px;
}

.post-meta {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--gray);
}

.post-meta span {
    margin-right: 15px;
    display: flex;
    align-items: center;
}

.post-meta i {
    margin-right: 5px;
}

.post-category {
    background: var(--light);
    color: var(--primary);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 500;
}

.post-content h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--dark);
    line-height: 1.4;
}

.post-content p {
    color: var(--gray);
    margin-bottom: 20px;
}

.post-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

.post-link i {
    margin-left: 5px;
    transition: transform 0.3s;
}

.post-link:hover i {
    transform: translateX(5px);
}

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

.pagination a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0 5px;
    border-radius: 5px;
    background: white;
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.pagination a:hover, .pagination a.active {
    background: var(--primary);
    color: white;
}

/* Sidebar */
.sidebar-widget {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.sidebar-widget h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--dark);
    position: relative;
    padding-bottom: 10px;
}

.sidebar-widget h3:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background: var(--primary);
}

/* Categories */
.categories-list {
    list-style: none;
}

.categories-list li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.categories-list a {
    color: var(--dark);
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    transition: color 0.3s;
}

.categories-list a:hover {
    color: var(--primary);
}

.categories-list span {
    background: var(--light);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
}

/* Recent Posts */
.recent-post {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.recent-post:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.recent-post-img {
    width: 70px;
    height: 70px;
    border-radius: 5px;
    overflow: hidden;
    margin-right: 15px;
}

.recent-post-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-post-content h4 {
    font-size: 0.95rem;
    margin-bottom: 5px;
    line-height: 1.4;
}

.recent-post-content h4 a {
    color: var(--dark);
    text-decoration: none;
    transition: color 0.3s;
}

.recent-post-content h4 a:hover {
    color: var(--primary);
}

.recent-post-content span {
    font-size: 0.8rem;
    color: var(--gray);
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tags a {
    background: var(--light);
    color: var(--dark);
    padding: 5px 12px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.tags a:hover {
    background: var(--primary);
    color: white;
}

/* Newsletter */
.newsletter-form {
    margin-top: 20px;
}

.newsletter-form input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.newsletter-form button {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.newsletter-form button:hover {
    background: var(--secondary);
}

/* CTA Section */
.cta {
    padding: 100px 5%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    text-align: center;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    padding: 70px 5% 30px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-col h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background: var(--primary);
}

.footer-col p {
    margin-bottom: 20px;
    opacity: 0.8;
}

.footer-links {
    list-style: none;
}

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

.footer-links a {
    color: white;
    opacity: 0.8;
    text-decoration: none;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--primary);
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.footer-social a:hover {
    background: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    margin-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 992px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        background: white;
        width: 100%;
        height: calc(100vh - 80px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: left 0.3s;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 15px 0;
    }

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

    .blog-container {
        flex-direction: column;
    }

    .blog-hero h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 576px) {
    .blog-hero h1 {
        font-size: 2rem;
    }

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

    .post-card {
        padding: 15px;
    }
}