/* ==================== BLOG STYLES ==================== */

/* Blog Container */
.blog-container {
    min-height: 100vh;
    background: #f8fafc;
}

/* Blog Header */
.blog-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0 3rem;
    text-align: center;
    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 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1.5" fill="rgba(255,255,255,0.1)"/></svg>');
    animation: float 20s ease-in-out infinite;
}

.blog-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.blog-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Blog Layout */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
    margin: 3rem auto;
}

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

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Blog Card */
.blog-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e2e8f0;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.blog-card-image {
    position: relative;
    overflow: hidden;
    height: 220px;
}

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

.blog-card:hover .blog-thumbnail {
    transform: scale(1.05);
}

.blog-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-card-content {
    padding: 1.5rem;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #64748b;
}

.blog-date,
.blog-author {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.blog-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.blog-card-title a {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.3s;
}

.blog-card-title a:hover {
    color: #6366f1;
}

.blog-excerpt {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.blog-read-more {
    color: #6366f1;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s;
}

.blog-read-more:hover {
    gap: 0.75rem;
}

.blog-read-time {
    color: #94a3b8;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Blog Pagination */
.blog-pagination {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.blog-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0 0.25rem;
    border-radius: 8px;
    background: white;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
}

.blog-pagination .page-numbers:hover,
.blog-pagination .page-numbers.current {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border-color: transparent;
}

.blog-pagination .prev,
.blog-pagination .next {
    width: auto;
    padding: 0 1rem;
}

/* No Posts */
.no-posts {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

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

.no-posts h2 {
    font-size: 1.5rem;
    color: #1e293b;
    margin-bottom: 0.75rem;
}

.no-posts p {
    color: #64748b;
    margin-bottom: 1.5rem;
}

/* ==================== SIDEBAR ==================== */

.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-widget {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.widget-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #6366f1;
}

/* Search Form */
.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #6366f1;
}

.search-button {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s;
}

.search-button:hover {
    transform: translateY(-2px);
}

/* Categories List */
.categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.categories-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #64748b;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
}

.categories-list a:hover {
    background: #f8fafc;
    color: #6366f1;
}

.categories-list span {
    background: #e2e8f0;
    color: #64748b;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Recent Posts */
.recent-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-posts li {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.recent-posts li:last-child {
    border-bottom: none;
}

.recent-post-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

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

.recent-post-content h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.recent-post-content h4 a {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.3s;
}

.recent-post-content h4 a:hover {
    color: #6366f1;
}

.recent-post-date {
    font-size: 0.875rem;
    color: #94a3b8;
}

/* Newsletter Widget */
.newsletter-widget {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
}

.newsletter-widget .widget-title {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.newsletter-widget p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.newsletter-form input {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
}

.newsletter-form button {
    background: white;
    color: #6366f1;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s;
}

.newsletter-form button:hover {
    transform: translateY(-2px);
}

/* ==================== SINGLE POST ==================== */

.single-post-container {
    background: #f8fafc;
    min-height: 100vh;
}

/* Post Hero */
.single-post-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0 2rem;
    position: relative;
    overflow: hidden;
}

.single-post-hero::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 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1.5" fill="rgba(255,255,255,0.1)"/></svg>');
    animation: float 20s ease-in-out infinite;
}

.post-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.post-breadcrumbs a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.post-breadcrumbs a:hover {
    color: white;
}

.breadcrumb-separator {
    color: rgba(255, 255, 255, 0.5);
}

.breadcrumb-current {
    color: white;
    font-weight: 500;
}

.post-hero-content {
    position: relative;
    z-index: 1;
}

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

.post-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.post-author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    font-size: 1rem;
}

.author-role {
    font-size: 0.875rem;
    opacity: 0.8;
}

.post-meta-info {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.9;
}

/* Featured Image */
.post-featured-image {
    background: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.featured-image {
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Post Content Wrapper */
.post-content-wrapper {
    padding: 2rem 0 4rem;
}

.post-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
}

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

/* Post Article */
.post-article {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.post-body {
    color: #334155;
    line-height: 1.8;
    font-size: 1.05rem;
}

.post-body h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin: 2rem 0 1rem;
    line-height: 1.3;
}

.post-body h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin: 1.5rem 0 0.75rem;
    line-height: 1.4;
}

.post-body p {
    margin-bottom: 1.5rem;
}

.post-body ul,
.post-body ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.post-body li {
    margin-bottom: 0.5rem;
}

.post-body blockquote {
    border-left: 4px solid #6366f1;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: #f8fafc;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #475569;
}

.post-body code {
    background: #f1f5f9;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.post-body pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.post-body pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* Post Pagination */
.post-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.post-pagination a,
.post-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #f8fafc;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
}

.post-pagination a:hover {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border-color: transparent;
}

/* Post Tags */
.post-tags {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
}

.tags-label {
    font-weight: 600;
    color: #1e293b;
}

.post-tags a {
    background: white;
    color: #6366f1;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
}

.post-tags a:hover {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border-color: transparent;
}

/* Post Share */
.post-share {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    margin: 2rem 0;
}

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

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

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

.share-button:hover {
    transform: translateY(-3px);
}

.share-button.facebook {
    background: #1877f2;
}

.share-button.twitter {
    background: #1da1f2;
}

.share-button.linkedin {
    background: #0a66c2;
}

.share-button.email {
    background: #6366f1;
}

/* Author Box */
.author-box {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: 16px;
    margin: 2rem 0;
}

.author-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.author-details {
    flex: 1;
}

.author-details h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.author-bio {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.author-social {
    display: flex;
    gap: 0.75rem;
}

.author-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    color: #6366f1;
    text-decoration: none;
    transition: all 0.3s;
}

.author-social a:hover {
    background: #6366f1;
    color: white;
}

/* Related Posts */
.related-posts {
    margin: 3rem 0;
}

.related-posts-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.5rem;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.related-post-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
    border: 1px solid #e2e8f0;
}

.related-post-card:hover {
    transform: translateY(-5px);
}

.related-post-image {
    height: 150px;
    overflow: hidden;
}

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

.related-post-content {
    padding: 1rem;
}

.related-post-content h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.related-post-content h4 a {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.3s;
}

.related-post-content h4 a:hover {
    color: #6366f1;
}

.related-post-date {
    font-size: 0.875rem;
    color: #94a3b8;
}

/* Post Comments */
.post-comments {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid #e2e8f0;
}

/* Post Sidebar */
.post-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* TOC Widget */
.toc-widget {
    position: sticky;
    top: 2rem;
}

.toc-content {
    max-height: 400px;
    overflow-y: auto;
}

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

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

.toc-list a {
    color: #64748b;
    text-decoration: none;
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.toc-list a:hover {
    background: #f8fafc;
    color: #6366f1;
    padding-left: 1rem;
}

.toc-sublist {
    list-style: none;
    padding-left: 1.5rem;
    margin: 0.5rem 0;
}

/* Author Widget */
.author-widget-content {
    text-align: center;
}

.author-widget-content img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 1rem;
    border: 3px solid #6366f1;
}

.author-widget-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.author-widget-content p {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

/* Post Navigation */
.post-navigation-wrapper {
    background: white;
    padding: 2rem 0;
    margin-top: 2rem;
}

.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.nav-item {
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
}

.nav-item:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-label {
    display: block;
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #1e293b;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.4;
}

.nav-link:hover {
    color: #6366f1;
}

.nav-prev {
    text-align: left;
}

.nav-next {
    text-align: right;
}

.nav-next .nav-link {
    justify-content: flex-end;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.btn-outline {
    background: transparent;
    color: #6366f1;
    border: 2px solid #6366f1;
}

.btn-outline:hover {
    background: #6366f1;
    color: white;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .blog-layout,
    .post-layout {
        grid-template-columns: 1fr 300px;
    }
}

@media (max-width: 768px) {
    .blog-title,
    .post-title {
        font-size: 2rem;
    }
    
    .blog-layout,
    .post-layout {
        grid-template-columns: 1fr;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .post-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .post-navigation {
        grid-template-columns: 1fr;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .author-box {
        flex-direction: column;
        text-align: center;
    }
    
    .post-share {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .blog-header {
        padding: 3rem 0 2rem;
    }
    
    .blog-title,
    .post-title {
        font-size: 1.75rem;
    }
    
    .blog-subtitle {
        font-size: 1rem;
    }
    
    .post-article {
        padding: 1.5rem;
    }
    
    .post-body {
        font-size: 1rem;
    }
    
    .post-body h2 {
        font-size: 1.5rem;
    }
    
    .post-body h3 {
        font-size: 1.25rem;
    }
}
