/* Blog Page Styles */

/* Hero Section */
.blog-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 4rem 0;
    text-align: center;
    color: white;
}

.blog-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.blog-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Layout */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    padding: 3rem 0;
}

.blog-main {
    min-width: 0;
}

/* Section Titles */
.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #667eea;
    display: inline-block;
}

/* Featured Posts */
.featured-posts {
    margin-bottom: 3rem;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.featured-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.featured-large {
    grid-column: span 2;
}

.featured-large .featured-image-link {
    height: 300px;
}

.featured-image-link {
    display: block;
    height: 200px;
    overflow: hidden;
}

.featured-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.featured-card:hover .featured-image {
    transform: scale(1.05);
}

.featured-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.featured-content {
    padding: 1.25rem;
}

.post-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
    text-decoration: none;
    transition: background 0.2s;
}

.post-category:hover {
    background: rgba(102, 126, 234, 0.2);
}

.featured-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.featured-title a {
    color: #1a1a2e;
    text-decoration: none;
    transition: color 0.2s;
}

.featured-title a:hover {
    color: #667eea;
}

.featured-excerpt {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Post Meta */
.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: #888;
}

.post-meta i {
    margin-right: 0.25rem;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.post-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.post-image-link {
    display: block;
    height: 180px;
    overflow: hidden;
}

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

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

.post-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
}

.post-content {
    padding: 1.25rem;
}

.post-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.post-title a {
    color: #1a1a2e;
    text-decoration: none;
    transition: color 0.2s;
}

.post-title a:hover {
    color: #667eea;
}

.post-excerpt {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

/* No Posts */
.no-posts {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.no-posts i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.no-posts h3 {
    font-size: 1.5rem;
    color: #1a1a2e;
    margin-bottom: 0.5rem;
}

.no-posts p {
    color: #666;
}

/* Pagination */
.pagination-wrapper {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

/* Sidebar */
.blog-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-widget {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #eee;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 0.5rem;
}

.category-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    color: #555;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

.category-list li a:hover,
.category-list li.active a {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.category-list .count {
    background: #eee;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    color: #888;
}

.category-list li.active .count,
.category-list li a:hover .count {
    background: #667eea;
    color: white;
}

/* Newsletter Widget */
.newsletter-widget p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.newsletter-form input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    transition: border-color 0.2s;
}

.newsletter-form input:focus {
    outline: none;
    border-color: #667eea;
}

.btn-subscribe {
    width: 100%;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-subscribe:hover {
    opacity: 0.9;
}

/* Single Post Styles */
.blog-single .post-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 3rem 0;
    color: white;
}

.post-header {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.post-category-badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    text-decoration: none;
    transition: background 0.2s;
}

.post-category-badge:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.blog-single .post-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.post-meta-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    opacity: 0.9;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
}

.meta-separator {
    opacity: 0.5;
}

/* Article */
.blog-article {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.article-featured-image {
    width: 100%;
    max-height: 450px;
    overflow: hidden;
}

.article-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-content {
    padding: 2rem;
}

.article-content.cms-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
}

.article-content h2 {
    font-size: 1.5rem;
    color: #1a1a2e;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content h3 {
    font-size: 1.25rem;
    color: #1a1a2e;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.article-content p {
    margin-bottom: 1.25rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.article-content blockquote {
    border-left: 4px solid #667eea;
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #555;
}

/* Share Buttons */
.article-share {
    padding: 1.5rem 2rem;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.share-label {
    font-weight: 600;
    color: #1a1a2e;
}

.share-buttons {
    display: flex;
    gap: 0.5rem;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
}

.share-btn:hover {
    opacity: 0.85;
    transform: scale(1.1);
}

.share-btn.facebook { background: #1877f2; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.linkedin { background: #0a66c2; }
.share-btn.email { background: #667eea; }

/* Author Box */
.author-box {
    margin: 0 2rem 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.author-avatar-large {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.author-details .author-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 0.25rem;
}

.author-bio {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* Related Posts Sidebar */
.related-posts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.related-post {
    display: flex;
    gap: 0.75rem;
}

.related-image-link {
    width: 80px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.related-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.related-content {
    flex: 1;
    min-width: 0;
}

.related-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.related-title a {
    color: #1a1a2e;
    text-decoration: none;
    transition: color 0.2s;
}

.related-title a:hover {
    color: #667eea;
}

.related-date {
    font-size: 0.75rem;
    color: #888;
}

/* Back to Blog */
.back-to-blog {
    padding: 2rem 0;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: gap 0.2s;
}

.back-link:hover {
    gap: 0.75rem;
}

/* Responsive */
@media (max-width: 992px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        position: static;
    }

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

    .featured-large {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 3rem 0;
    }

    .blog-title {
        font-size: 2rem;
    }

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

    .blog-single .post-title {
        font-size: 1.75rem;
    }

    .post-meta-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .meta-separator {
        display: none;
    }

    .article-content {
        padding: 1.5rem;
    }

    .article-share {
        padding: 1rem 1.5rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .author-box {
        margin: 0 1.5rem 1.5rem;
        flex-direction: column;
        text-align: center;
    }
}
