
:root {
    --primary: #673de6;
    --primary-dark: #512da8;
    --primary-light: #f0ebff;
    --success: #10b981;
    --dark: #0f172a;
    --slate: #64748b;
    --border: #e2e8f0;
    --bg: #f8fafc;
    --white: #ffffff;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Top Header */
.top-header {
    background-color: var(--dark);
    color: #94a3b8;
    padding: 10px 0;
    font-size: 0.85rem;
}

.top-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.top-header a {
    color: var(--primary-light);
    text-decoration: none;
    margin-left: 20px;
    transition: color 0.3s;
}

.top-header a:hover {
    color: white;
}

.top-header i {
    margin-right: 6px;
}

/* Main Navigation */
nav {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--dark);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo span {
    color: var(--primary);
    margin-left: 5px;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s;
    position: relative;
}

.nav-links a.active {
    color: var(--primary);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links .btn-subscribe {
    background: var(--primary);
    color: white;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 700;
}

.nav-links .btn-subscribe:hover {
    background: var(--primary-dark);
    color: white;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Blog Hero */
.blog-hero {
    padding: 80px 0 40px;
    text-align: center;
    background: linear-gradient(135deg, #673de6 0%, #512da8 100%);
    color: white;
    margin-bottom: 60px;
}

.blog-hero h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.blog-hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.9;
}

.blog-search {
    max-width: 500px;
    margin: 30px auto 0;
    position: relative;
}

.blog-search input {
    width: 100%;
    padding: 15px 20px;
    border-radius: 12px;
    border: none;
    font-size: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.blog-search button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Blog Categories */
.blog-categories {
    margin-bottom: 40px;
}

.categories-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 5px;
    scrollbar-width: none;
    justify-content: flex-start;
    scrollbar-width: thin;
}

.categories-container::-webkit-scrollbar {
    height: 6px; /* horizontal scrollbar height */
}

.categories-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

/*
        .categories-container::-webkit-scrollbar {
            display: none;
        }*/

.category-btn {
    background: white;
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    white-space: nowrap;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.category-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.category-btn:hover:not(.active) {
    border-color: var(--primary);
}

/* Blog Layout */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    margin-bottom: 80px;
}

/* Featured Post */
.featured-post {
    margin-bottom: 50px;
}

.featured-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.featured-card:hover {
    transform: translateY(-5px);
}

.featured-image {
    height: 300px;
    width: 100%;
    object-fit: cover;
}

.featured-content {
    padding: 30px;
}

.post-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.85rem;
    color: var(--slate);
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-category {
    background: var(--primary-light);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.75rem;
    display: inline-block;
    margin-bottom: 15px;
}

.featured-content h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    line-height: 1.3;
}

.featured-content p {
    color: var(--slate);
    margin-bottom: 20px;
}

.read-more {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.blog-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.card-image {
    height: 180px;
    width: 100%;
    object-fit: cover;
}

.card-content {
    padding: 20px;
}

.card-content h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.card-content p {
    color: var(--slate);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 50px;
}

.page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: white;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-btn:hover:not(.active) {
    border-color: var(--primary);
}

/* Sidebar */
.sidebar-widget {
    background: white;
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;

    &#aboutWidget {
        font-size: 0.9rem;
        color: var(--slate);
    }

    &#categoryWidget .count {
        background: var(--primary-light);
        color: var(--primary);
        padding: 2px 8px;
        border-radius: 50px;
        font-size: 0.8rem;
    }

    &#newsletterWidget p {
        font-size: 0.9rem;
        color: var(--slate);
        margin-bottom: 15px;
    }
}

.sidebar-widget h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}

.popular-posts {
    list-style: none;
}

.popular-post {
    display: flex;
    gap: 15px;
    text-decoration: none;
    color: var(--dark);
}


.popular-posts li {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.popular-posts li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.popular-img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 10px;
}

.popular-content h4 {
    font-size: 0.9rem;
    margin-bottom: 5px;
    line-height: 1.4;
}

.popular-content span {
    font-size: 0.8rem;
    color: var(--slate);
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: var(--primary-light);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.tag:hover {
    background: var(--primary);
    color: white;
}

.newsletter-form input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 10px;
}

.newsletter-form button {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
}

.newsletter-form button:hover {
    background: var(--primary-dark);
}

/* Main Footer */
.main-footer {
    background: var(--dark);
    color: #94a3b8;
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-col p, .footer-col a {
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-col a {
    color: #94a3b8;
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 30px;
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #1e293b;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: background 0.3s;
}

.social-links a:hover {
    background: var(--primary);
}

.sidebar-widget#categoryWidget a {
    color: var(--dark);
    text-decoration: none;

    &:hover {
        text-decoration: underline;
    }
}

/* Responsive */
@media (max-width: 992px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .nav-flex.active .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        border-top: 1px solid var(--border);
    }

    .featured-image {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 60px 0 30px;
    }

    .blog-hero h1 {
        font-size: 2rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .categories-container {
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .top-header .container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .top-header a {
        margin: 0 10px;
    }

    .blog-hero h1 {
        font-size: 1.8rem;
    }

    .post-meta {
        flex-direction: column;
        gap: 5px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}
