/* 
   Love Tyagi Blog - Custom Blog Component Styles
   Extends theme.css and matches the brand's premium design language.
*/

/* Blog Hero Section */
.blog-hero {
    background-color: var(--bg-light);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.blog-hero-glow {
    position: absolute;
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.05) 0%, rgba(var(--primary-rgb), 0) 70%);
    top: -50%;
    left: -10%;
    z-index: 0;
    pointer-events: none;
}

/* Category Badges */
.blog-badge {
    display: inline-block;
    background-color: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.35em 0.85em;
    border-radius: 9999px;
    text-decoration: none;
    transition: all 0.3s ease;
}

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

/* Featured Article Asymmetric Layout */
.featured-card {
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    background: var(--bg-white);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.08);
}

.featured-img-container {
    height: 100%;
    min-height: 350px;
    overflow: hidden;
    position: relative;
}

.featured-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-card:hover .featured-img {
    transform: scale(1.03);
}

/* Article Cards Grid */
.blog-card {
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    background: var(--bg-white);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.08);
    border-color: rgba(var(--primary-rgb), 0.2);
}

.blog-card-img-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
    background-color: var(--bg-light);
}

.blog-card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-img {
    transform: scale(1.04);
}

.blog-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

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

.blog-card-title a {
    color: var(--dark-slate);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.blog-card-excerpt {
    font-size: 0.925rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.blog-card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
}

/* Pagination */
.blog-pagination {
    margin-top: 3rem;
}

.blog-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0 4px;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.blog-pagination .page-numbers:hover,
.blog-pagination .page-numbers.current {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Single Post Layout */
.single-post-container {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

.post-header {
    text-align: center;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.post-meta-details {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 1rem;
}

.post-featured-image-container {
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.post-featured-image {
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
}

/* Premium Typography for Reading Comfort */
.post-content {
    font-size: 1.125rem; /* Larger font size for reading comfort */
    line-height: 1.8;
    color: var(--text-primary);
}

.post-content h2 {
    font-size: 1.85rem;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    font-weight: 700;
}

.post-content h3 {
    font-size: 1.45rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.post-content h4 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

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

.post-content a {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 4px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.post-content a:hover {
    color: var(--primary-color-hover);
}

.post-content blockquote {
    font-style: italic;
    background-color: var(--bg-light);
    border-left: 4px solid var(--primary-color);
    padding: 1.25rem 1.75rem;
    margin: 2rem 0;
    border-radius: 0 0.75rem 0.75rem 0;
}

.post-content blockquote p {
    margin-bottom: 0;
    font-size: 1.2rem;
    color: var(--dark-slate);
}

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

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

.post-content figure {
    margin: 2.5rem 0;
    text-align: center;
}

.post-content figcaption {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
}

.post-content table {
    width: 100%;
    margin-bottom: 2rem;
    border-collapse: collapse;
}

.post-content th, .post-content td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
}

.post-content th {
    background-color: var(--bg-light);
    font-weight: 600;
}

/* Breadcrumbs */
.breadcrumbs {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.breadcrumbs a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.breadcrumbs span {
    margin: 0 0.5rem;
}

/* Table of Contents */
.table-of-contents {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2.5rem;
}

.toc-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark-slate);
}

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

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

.toc-list a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.toc-list a:hover {
    color: var(--primary-color);
}

/* Social Share Bar */
.share-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.share-title {
    font-weight: 600;
    color: var(--dark-slate);
    margin-right: 0.5rem;
}

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

.share-btn:hover {
    transform: translateY(-2px);
    color: white;
    filter: brightness(1.1);
}

.share-btn.linkedin { background-color: #0077b5; }
.share-btn.twitter { background-color: #1da1f2; }
.share-btn.facebook { background-color: #1877f2; }
.share-btn.whatsapp { background-color: #25d366; }

/* Author Box */
.author-box {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    margin-top: 3rem;
    margin-bottom: 3rem;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

@media (max-width: 576px) {
    .author-box {
        flex-direction: column;
        text-align: center;
    }
}

.author-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.author-info-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-slate);
    margin-bottom: 0.5rem;
}

.author-bio {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Related Posts */
.related-posts-section {
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.related-posts-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--dark-slate);
}

/* Consultation & Newsletter CTA */
.newsletter-cta {
    background-color: var(--dark-slate);
    color: white;
    border-radius: 1rem;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.newsletter-cta-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.15) 0%, rgba(var(--primary-rgb), 0) 60%);
    top: -50%;
    right: -30%;
    z-index: 0;
}

.newsletter-cta-content {
    position: relative;
    z-index: 1;
}

/* Responsive Overrides */
@media (max-width: 991px) {
    .featured-img-container {
        min-height: 250px;
    }
}
