/* Blog Header */
.blog-header {
    padding: 150px 0 80px;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    position: relative;
    overflow: hidden;
}

.blog-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,186.7C384,213,480,235,576,213.3C672,192,768,128,864,128C960,128,1056,192,1152,197.3C1248,203,1344,149,1392,122.7L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') bottom center no-repeat;
    background-size: cover;
}

.blog-header h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.blog-header p {
    font-size: 1.2rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

/* Blog Section */
.blog-section {
    padding: 4rem 0;
}

.blog-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
}

/* Featured Post */
.blog-post.featured {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 3rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.blog-post.featured:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.2);
}

.featured-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--accent-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 10;
}

.post-image {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.blog-post.featured:hover .post-image img {
    transform: scale(1.05);
}

.post-content {
    padding: 2rem;
}

.post-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.post-meta span {
    color: var(--text-secondary);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-category {
    background: var(--gradient);
    color: white !important;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

.post-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.post-content h2 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.post-content h2 a:hover {
    color: var(--primary-color);
}

.post-content p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s;
}

.read-more:hover {
    gap: 1rem;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.blog-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

.card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.blog-card:hover .card-image img {
    transform: scale(1.1);
}

.card-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--gradient);
    color: white;
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.card-content {
    padding: 1.5rem;
}

.card-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.card-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.card-content h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.card-content h3 a:hover {
    color: var(--primary-color);
}

.card-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.author span {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.read-link {
    width: 36px;
    height: 36px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: transform 0.3s;
}

.read-link:hover {
    transform: rotate(45deg);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.page-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    color: var(--text-secondary);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s;
}

.page-link:hover:not(.disabled) {
    background: var(--gradient);
    color: white;
}

.page-link.active {
    background: var(--gradient);
    color: white;
}

.page-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Sidebar */
.blog-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-widget {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.sidebar-widget h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
}

/* Search Box */
.search-box {
    display: flex;
    gap: 0.5rem;
}

.search-box input {
    flex: 1;
    padding: 0.75rem;
    background: var(--dark-bg);
    border: 2px solid transparent;
    border-radius: 8px;
    color: var(--text-primary);
    transition: border-color 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-box button {
    padding: 0.75rem 1.25rem;
    background: var(--gradient);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: transform 0.3s;
}

.search-box button:hover {
    transform: scale(1.05);
}

/* Categories */
.categories {
    list-style: none;
}

.categories li {
    margin-bottom: 0.75rem;
}

.categories li a {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s;
}

.categories li a:hover {
    background: var(--dark-bg);
    color: var(--primary-color);
    padding-left: 1rem;
}

.categories li a i {
    margin-right: 0.5rem;
}

.categories li a span {
    color: var(--primary-color);
    font-size: 0.875rem;
}

/* Popular Posts */
.popular-posts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.popular-post {
    display: flex;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    transition: background 0.3s;
}

.popular-post:hover {
    background: var(--dark-bg);
}

.popular-post img {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.popular-post-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.popular-post-content a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1.4;
    transition: color 0.3s;
}

.popular-post-content a:hover {
    color: var(--primary-color);
}

.popular-post-content span {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.tags a {
    padding: 0.4rem 0.8rem;
    background: var(--dark-bg);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 15px;
    font-size: 0.8rem;
    transition: all 0.3s;
    border: 1px solid rgba(99, 102, 241, 0.2);
    white-space: nowrap;
    display: inline-block;
}

.tags a:hover {
    background: var(--gradient);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Scrollbar styling for tags */
.tags::-webkit-scrollbar {
    width: 4px;
}

.tags::-webkit-scrollbar-track {
    background: var(--darker-bg);
    border-radius: 2px;
}

.tags::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 2px;
}

.tags::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Newsletter */
.newsletter p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.newsletter form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.newsletter input {
    padding: 0.75rem;
    background: var(--dark-bg);
    border: 2px solid transparent;
    border-radius: 8px;
    color: var(--text-primary);
    transition: border-color 0.3s;
}

.newsletter input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.newsletter button {
    width: 100%;
}

/* Blog Detail Page */
.blog-detail {
    padding: 150px 0 4rem;
}

.blog-detail-header {
    text-align: center;
    margin-bottom: 3rem;
}

.blog-detail-header .post-category {
    display: inline-block;
    margin-bottom: 1rem;
}

.blog-detail-header h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.detail-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.blog-detail-image {
    margin-bottom: 3rem;
    border-radius: 16px;
    overflow: hidden;
}

.blog-detail-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.blog-detail-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.blog-detail-content h2 {
    color: var(--text-primary);
    margin: 2rem 0 1rem;
    font-size: 2rem;
}

.blog-detail-content h3 {
    color: var(--text-primary);
    margin: 1.5rem 0 0.75rem;
    font-size: 1.5rem;
}

.blog-detail-content p {
    margin-bottom: 1.5rem;
}

.blog-detail-content ul,
.blog-detail-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.blog-detail-content li {
    margin-bottom: 0.5rem;
}

.blog-detail-content code {
    background: var(--card-bg);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9em;
    color: var(--primary-color);
}

.blog-detail-content pre {
    background: var(--darker-bg);
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.blog-detail-content pre code {
    background: none;
    padding: 0;
    color: var(--text-secondary);
}

.share-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.share-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: transform 0.3s;
}

.share-btn:hover {
    transform: translateY(-5px);
}

.share-btn.twitter {
    background: #1da1f2;
}

.share-btn.facebook {
    background: #3b5998;
}

.share-btn.linkedin {
    background: #0077b5;
}

.share-btn.whatsapp {
    background: #25d366;
}

/* Responsive */
@media (max-width: 968px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        position: static;
    }

    .blog-header h1 {
        font-size: 2.5rem;
    }

    .blog-detail-header h1 {
        font-size: 2rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .blog-header h1 {
        font-size: 2rem;
    }

    .post-image {
        height: 250px;
    }

    .post-content {
        padding: 1.5rem;
    }

    .post-content h2 {
        font-size: 1.5rem;
    }

    .blog-detail-image img {
        height: 300px;
    }
}


