/* Blog post specific styles */
.blog-post-hero {
    padding: 8rem 0 3rem;
    background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    position: relative;
    overflow: hidden;
}

.blog-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"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(148,163,184,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
}

.blog-post-header {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.blog-post-breadcrumb {
    margin-bottom: 2rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--primary-dark);
}

.blog-post-category {
    display: inline-block;
    background: var(--gradient);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.blog-post-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.blog-post-excerpt {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.blog-post-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

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

.author-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

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

.author-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.author-title {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.blog-post-stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Specific styling for engagement stats (views, likes, like button) */
.engagement-stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.blog-post-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 0;
}

.blog-post-image {
    width: 100%;
    height: 400px;
    background: var(--surface);
    border-radius: 1rem;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    opacity: 0.7;
}

.post-content {
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 1.1rem;
}

.post-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 3rem 0 1.5rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.5rem;
}

.post-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: var(--text-primary);
}

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

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

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

.post-content strong {
    color: var(--primary);
    font-weight: 600;
}

.post-content code {
    background: var(--surface);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
}

.blog-post-footer {
    border-top: 1px solid var(--border);
    padding-top: 3rem;
    margin-top: 3rem;
}

.post-tags {
    margin-bottom: 3rem;
}

.tags-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: block;
}

.tag-list {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    background: var(--surface);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--primary);
    color: white;
}

.author-bio-section {
    background: var(--surface);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 3rem;
}

.author-bio-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.author-bio-avatar {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.author-bio-info h4 {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.author-bio-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.author-bio-text {
    color: var(--text-secondary);
    line-height: 1.6;
}

.share-section {
    text-align: center;
    margin-bottom: 3rem;
}

.share-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    color: white;
    border: none;
    cursor: pointer;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

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

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

.share-linkedin {
    background: #0077b5;
}

.share-copy {
    background: var(--primary);
}

.related-posts {
    margin-top: 4rem;
}

.related-posts h3 {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Enhanced Related Posts Grid */
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 320px));
    gap: 2rem;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

/* Enhanced Related Card Styling */
.related-card {
    background: var(--surface);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    width: 100%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.related-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

.related-card-image {
    height: 180px;
    background: var(--surface-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    opacity: 0.7;
    overflow: hidden;
    position: relative;
}

.related-placeholder {
    font-size: 3.5rem;
    width: 100%;
    height: 100%;
    background-color: var(--surface-light);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 0.75rem;
}

.related-card-category {
    background: var(--primary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 1rem;
    font-size: 0.7rem;
    font-weight: 600;
    display: inline-block;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.related-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
    line-height: 1.4;
    flex-grow: 0;
}

.related-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-card-title a:hover {
    color: var(--primary);
}

/* Enhanced excerpt styling */
.related-card-excerpt {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Enhanced footer layout */
.related-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Changed from flex-end to center for proper alignment */
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    gap: 1rem;
}

.related-card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
    display: flex;
    align-items: center; /* Ensure meta text is centered */
}

/* Enhanced Read More styling */
.related-read-more {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem; /* Match the meta font size for better alignment */
    transition: all 0.3s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0; /* Remove padding that might affect alignment */
    border-bottom: 2px solid transparent;
    line-height: 1.4; /* Match the meta line-height */
}

.related-read-more:hover {
    color: var(--primary-dark);
    border-bottom-color: var(--primary);
    transform: translateX(2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-post-hero {
        padding: 6rem 0 2rem;
    }

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

    .blog-post-meta {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    /* Keep author and date/reading time together on mobile */
    .blog-post-stats {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    /* Move engagement stats (views, likes, like button) to a new row */
    .engagement-stats {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
        margin-top: 0.5rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border);
    }

    .blog-post-content {
        padding: 2rem 0;
    }

    .blog-post-image {
        height: 250px;
        margin-bottom: 2rem;
    }

    .post-content {
        font-size: 1rem;
    }

    .post-content h2 {
        font-size: 1.5rem;
        margin: 2rem 0 1rem;
    }

    .post-content h3 {
        font-size: 1.25rem;
        margin: 1.5rem 0 0.75rem;
    }

    .author-bio-header {
        flex-direction: column;
        text-align: center;
    }

    .author-bio-section {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

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

    .share-btn {
        width: 2.5rem;
        height: 2.5rem;
    }

    /* Related posts mobile adjustments */
    .related-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .related-card {
        max-width: none;
        height: auto;
    }

    .related-card-content {
        padding: 1.25rem;
    }

    .related-card-image {
        height: 160px;
    }

    .related-card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .related-read-more {
        align-self: flex-end;
        margin-top: 0.5rem;
    }
    
    .related-card-excerpt {
        -webkit-line-clamp: 2;
    }

    .blog-post-footer {
        padding-top: 2rem;
        margin-top: 2rem;
    }

    .post-tags {
        margin-bottom: 2rem;
    }

    .share-section {
        margin-bottom: 2rem;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .blog-post-hero {
        padding: 5rem 0 1.5rem;
    }

    .blog-post-header {
        padding: 0 1rem;
    }

    .blog-post-title {
        font-size: 1.75rem;
        line-height: 1.3;
    }

    .blog-post-excerpt {
        font-size: 1.1rem;
    }

    .breadcrumb {
        font-size: 0.8rem;
        flex-wrap: wrap;
    }

    .blog-post-stats {
        gap: 0.75rem;
        font-size: 0.8rem;
    }

    .engagement-stats {
        gap: 0.75rem;
        font-size: 0.8rem;
    }

    .stat-item {
        gap: 0.2rem;
    }

    .blog-post-content {
        padding: 1.5rem 0;
    }

    .blog-post-image {
        height: 200px;
        border-radius: 0.75rem;
        margin-bottom: 1.5rem;
        font-size: 3rem;
    }

    .post-content {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .related-posts {
        margin-top: 3rem;
    }

    .related-posts h3 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .related-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 0.5rem;
    }

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

    .related-card-image {
        height: 140px;
    }

    .related-card-title {
        font-size: 1rem;
    }

    .related-card-excerpt {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
    }

    .related-read-more {
        font-size: 0.8rem;
    }

    .related-card-meta {
        font-size: 0.75rem;
    }
}

/* Large screens optimization */
@media (min-width: 1200px) {
    .related-grid {
        grid-template-columns: repeat(3, 350px);
        gap: 2.5rem;
    }
    
    .related-card {
        max-width: 350px;
    }
    
    .related-card-image {
        height: 200px;
    }
    
    .related-card-content {
        padding: 2rem;
    }
    
    .related-card-title {
        font-size: 1.2rem;
    }
    
    .related-card-excerpt {
        font-size: 0.95rem;
    }
}
