/* ========================================
   BLOG STYLES
======================================== */

/* Blog Hero */
.blog-hero,
.single-post-hero {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.blog-hero .hero-bg-image,
.single-post-hero .hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.blog-hero .hero-overlay,
.single-post-hero .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.5) 100%);
    z-index: 2;
}

.blog-hero .hero-content,
.single-post-hero .hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    width: 100%;
}

/* Blog Main */
.blog-main {
    padding: 80px 0;
    background: #f8fafc;
}

.blog-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 60px;
    align-items: start;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-bottom: 60px;
}

/* Blog Card */
.blog-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.blog-card-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.1);
}

.blog-card-category {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-card-category a {
    color: white;
    text-decoration: none;
}

.blog-card-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 0.875rem;
    color: #6b7280;
}

.blog-card-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.blog-card-meta i {
    font-size: 0.75rem;
    color: var(--primary-color);
}

.blog-card-title {
    margin: 0 0 15px 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
}

.blog-card-title a {
    color: var(--dark-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-card-title a:hover {
    color: var(--primary-color);
}

.blog-card-excerpt {
    color: #4b5563;
    line-height: 1.7;
    margin-bottom: 20px;
    flex: 1;
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.blog-card-read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.3s ease;
}

.blog-card-read-more:hover {
    gap: 12px;
}

.blog-card-comments {
    color: #6b7280;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Blog Sidebar */
.blog-sidebar {
    position: sticky;
    top: 120px;
}

.sidebar-widget {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.widget-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: var(--dark-color);
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
}

/* Blog Search */
.blog-search-form {
    display: flex;
    gap: 10px;
}

.blog-search-form input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: border-color 0.3s ease;
}

.blog-search-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.blog-search-form button {
    padding: 12px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.blog-search-form button:hover {
    background: var(--secondary-color);
}

/* Widget Categories */
.widget-categories {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-categories li {
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.widget-categories li:last-child {
    border-bottom: none;
}

.widget-categories a {
    color: #4b5563;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
}

.widget-categories a:hover {
    color: var(--primary-color);
}

.widget-categories span {
    color: #9ca3af;
    font-size: 0.875rem;
}

/* Widget Recent Posts */
.widget-recent-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-recent-posts li {
    padding: 15px 0;
    border-bottom: 1px solid #f3f4f6;
}

.widget-recent-posts li:last-child {
    border-bottom: none;
}

.widget-recent-posts a {
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
    transition: color 0.3s ease;
}

.widget-recent-posts a:hover {
    color: var(--primary-color);
}

.widget-recent-posts .post-date {
    color: #6b7280;
    font-size: 0.875rem;
}

/* Widget Tags */
.widget-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-link {
    display: inline-block;
    padding: 6px 14px;
    background: #f3f4f6;
    color: #4b5563;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.tag-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Sidebar CTA */
.sidebar-cta {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
}

.sidebar-cta .widget-title {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.sidebar-cta p {
    margin-bottom: 20px;
    opacity: 0.9;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: white;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Blog Pagination */
.blog-pagination {
    margin-top: 60px;
}

.blog-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    background: white;
    color: var(--dark-color);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid #e5e7eb;
    margin: 0 5px;
}

.blog-pagination .page-numbers:hover,
.blog-pagination .page-numbers.current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.blog-pagination ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.blog-pagination ul li {
    display: inline-block;
    margin: 0;
}

/* Single Post Styles */
.single-post-main {
    padding: 80px 0;
    background: #f8fafc;
}

.single-post-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 60px;
    align-items: start;
}

.single-post-content {
    background: white;
    padding: 50px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.single-post-header {
    text-align: center;
    margin-bottom: 40px;
}

.post-category {
    display: inline-block;
    margin-bottom: 15px;
}

.post-category a {
    display: inline-block;
    padding: 8px 20px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 0.875rem;
}

.post-meta i {
    color: var(--primary-color);
}

.post-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #374151;
}

.post-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 40px 0 20px 0;
    color: var(--dark-color);
}

.post-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 30px 0 15px 0;
    color: var(--dark-color);
}

.post-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 25px 0 12px 0;
    color: var(--dark-color);
}

.post-content p {
    margin-bottom: 20px;
}

.post-content ul,
.post-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.post-content li {
    margin-bottom: 10px;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 30px 0;
}

.post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 30px;
    margin: 30px 0;
    font-style: italic;
    color: #6b7280;
    font-size: 1.25rem;
}

.post-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.post-content a:hover {
    color: var(--secondary-color);
}

/* Post Tags */
.post-tags {
    margin: 40px 0;
    padding: 30px 0;
    border-top: 2px solid #e5e7eb;
    border-bottom: 2px solid #e5e7eb;
}

.post-tags h4 {
    margin: 0 0 15px 0;
    font-size: 1rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Post Share */
.post-share {
    margin: 40px 0;
    padding: 30px;
    background: #f8fafc;
    border-radius: 12px;
}

.post-share h4 {
    margin: 0 0 20px 0;
    font-size: 1rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.share-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: white;
    color: var(--dark-color);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    border: 2px solid #e5e7eb;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.share-facebook:hover {
    background: #1877f2;
    color: white;
    border-color: #1877f2;
}

.share-twitter:hover {
    background: #1da1f2;
    color: white;
    border-color: #1da1f2;
}

.share-linkedin:hover {
    background: #0077b5;
    color: white;
    border-color: #0077b5;
}

.share-email:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Author Box */
.post-author-box {
    display: flex;
    gap: 20px;
    padding: 30px;
    background: #f8fafc;
    border-radius: 12px;
    margin: 40px 0;
}

.author-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h4 {
    margin: 0 0 10px 0;
    font-size: 1.25rem;
    color: var(--dark-color);
}

.author-info p {
    margin: 0;
    color: #6b7280;
    line-height: 1.6;
}

/* Post Navigation */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 40px 0;
    padding: 30px 0;
    border-top: 2px solid #e5e7eb;
    border-bottom: 2px solid #e5e7eb;
}

.nav-previous,
.nav-next {
    display: flex;
}

.nav-previous a,
.nav-next a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 100%;
}

.nav-next a {
    flex-direction: row-reverse;
    text-align: right;
}

.nav-previous a:hover,
.nav-next a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(-5px);
}

.nav-next a:hover {
    transform: translateX(5px);
}

.nav-previous span,
.nav-next span {
    display: block;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-previous a:hover span,
.nav-next a:hover span {
    color: rgba(255, 255, 255, 0.8);
}

.nav-previous h5,
.nav-next h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-color);
}

.nav-previous a:hover h5,
.nav-next a:hover h5 {
    color: white;
}

/* Related Posts */
.related-posts {
    margin: 60px 0;
    padding: 40px 0;
    border-top: 2px solid #e5e7eb;
}

.related-posts h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 30px 0;
    color: var(--dark-color);
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.related-post-card {
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.related-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.related-post-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-post-card:hover .related-post-image img {
    transform: scale(1.1);
}

.related-post-content {
    padding: 20px;
}

.related-post-content h4 {
    margin: 0 0 10px 0;
    font-size: 1rem;
    font-weight: 600;
}

.related-post-content a {
    color: var(--dark-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-post-content a:hover {
    color: var(--primary-color);
}

.related-post-date {
    display: block;
    font-size: 0.875rem;
    color: #6b7280;
}

/* Single Post Sidebar */
.single-post-sidebar {
    position: sticky;
    top: 120px;
}

.toc-widget {
    max-height: 500px;
    overflow-y: auto;
}

.toc-content {
    font-size: 0.875rem;
    line-height: 1.8;
}

.toc-content ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.toc-content li {
    padding: 8px 0;
    padding-left: 20px;
    border-left: 2px solid #e5e7eb;
}

.toc-content li a {
    color: #4b5563;
    text-decoration: none;
    transition: color 0.3s ease;
}

.toc-content li a:hover {
    color: var(--primary-color);
}

/* No Posts */
.no-posts {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.no-posts h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.no-posts p {
    color: #6b7280;
    font-size: 1.125rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .blog-content-wrapper,
    .single-post-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .blog-sidebar,
    .single-post-sidebar {
        position: static;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .blog-main,
    .single-post-main {
        padding: 40px 0;
    }
    
    .blog-hero,
    .single-post-hero {
        height: 300px;
    }
    
    .blog-card-content,
    .single-post-content {
        padding: 25px;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .post-navigation {
        grid-template-columns: 1fr;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .share-buttons {
        flex-direction: column;
    }
    
    .share-btn {
        width: 100%;
        justify-content: center;
    }
}

