/* Blog Specific Styles */

/* Blog Header */
.blog-header {
    position: relative;
    padding: 8rem 0 5rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, #2a3c5d 50%, #3a4c6d 100%);
    color: var(--color-background);
    overflow: hidden;
}

.blog-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23FFFFFF' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.1;
    z-index: 0;
}

.blog-header-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    animation: fadeInUp 0.8s forwards;
}

.blog-header h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--color-background);
    line-height: 1.1;
}

.blog-header h1 .highlight {
    color: var(--color-secondary);
    position: relative;
    display: inline-block;
}

.blog-description {
    font-size: 1.5rem;
    max-width: 700px;
    margin: 0 auto;
    color: rgba(245, 241, 233, 0.9);
}

/* Blog Categories */
.blog-categories {
    background: var(--color-background-alt);
    padding: 2rem 0;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 70px;
    z-index: 40;
}

.categories-wrapper {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.category-btn {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: 9999px;
    color: var(--color-text);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn:hover {
    border-color: var(--color-secondary);
    color: var(--color-secondary);
    transform: translateY(-2px);
}

.category-btn.active {
    background: var(--color-secondary);
    color: white;
    border-color: var(--color-secondary);
}

/* Blog Posts Grid */
.blog-posts {
    padding: 5rem 0;
    background: var(--color-background);
}

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

/* Blog Card Styles */
.blog-card {
    background: var(--color-background);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--color-secondary);
}

.blog-card.featured {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: auto;
}

.blog-card.featured .blog-card-content {
    padding: 2.5rem;
}

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

.blog-card.featured .blog-card-image {
    height: 100%;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.blog-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--color-secondary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.blog-card-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.blog-category {
    background: rgba(26, 43, 76, 0.1);
    color: var(--color-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-weight: 500;
}

.blog-date {
    color: var(--color-text-light);
}

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

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

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

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

.blog-excerpt {
    color: var(--color-text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
}

.blog-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info {
    flex: 1;
}

.author-name {
    display: block;
    font-weight: 600;
    color: var(--color-text);
}

.author-role {
    display: block;
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.read-more:hover {
    gap: 0.75rem;
    color: var(--color-secondary);
}

.blog-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.read-time {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

/* Blog Pagination */
.blog-pagination {
    text-align: center;
    margin-top: 3rem;
}

.load-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: transparent;
    border: 2px solid var(--color-primary);
    border-radius: 0.75rem;
    color: var(--color-primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more:hover {
    background: var(--color-primary);
    color: var(--color-background);
    transform: translateY(-3px);
}

/* Blog Newsletter Section */
.blog-newsletter {
    padding: 4rem 0;
    background: var(--color-primary);
    color: var(--color-background);
}

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

.newsletter-text h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.newsletter-text p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: rgba(245, 241, 233, 0.9);
}

.blog-newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.blog-newsletter-form input {
    flex: 1;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.75rem;
    color: var(--color-background);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.blog-newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.blog-newsletter-form input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--color-secondary);
}

.blog-newsletter-form .btn-primary {
    white-space: nowrap;
}

/* Article Page Styles */
.article-header {
    padding: 6rem 0 3rem;
    background: var(--color-background);
}

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

.article-meta-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.article-category {
    background: rgba(26, 43, 76, 0.1);
    color: var(--color-primary);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 600;
}

.article-date, .article-read-time {
    color: var(--color-text-light);
}

.article-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--color-text);
}

.article-excerpt {
    font-size: 1.5rem;
    line-height: 1.6;
    color: var(--color-text-light);
    margin-bottom: 2rem;
}

.article-author-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--color-background-alt);
    border-radius: 1rem;
}

.author-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info-large {
    text-align: left;
}

.author-info-large .author-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.author-bio {
    color: var(--color-text-light);
    line-height: 1.5;
}

/* Article Featured Image */
.article-featured-image {
    margin: 3rem 0;
}

.article-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 1rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Article Content Grid */
.article-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    margin-top: 3rem;
}

.article-main {
    max-width: 100%;
}

/* Table of Contents */
.table-of-contents {
    background: var(--color-background-alt);
    padding: 2rem;
    border-radius: 1rem;
    margin-bottom: 3rem;
}

.table-of-contents h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--color-primary);
}

.table-of-contents ol {
    list-style: none;
    counter-reset: toc-counter;
    padding: 0;
}

.table-of-contents li {
    counter-increment: toc-counter;
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1rem;
}

.table-of-contents li::before {
    content: counter(toc-counter) ".";
    position: absolute;
    left: 0;
    color: var(--color-secondary);
    font-weight: 600;
}

.table-of-contents a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.table-of-contents a:hover {
    color: var(--color-secondary);
}

/* Article Body Typography */
.article-body {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color-text);
}

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

.article-body p.lead {
    font-size: 1.25rem;
    line-height: 1.7;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 2rem;
}

.article-body h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 3rem 0 1.5rem;
    color: var(--color-primary);
    position: relative;
}

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

.article-body h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.5rem 0 1rem;
    color: var(--color-text);
}

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

.article-body li {
    margin-bottom: 0.75rem;
}

.article-body blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: var(--color-background-alt);
    border-left: 4px solid var(--color-secondary);
    font-style: italic;
}

.article-body blockquote p {
    margin-bottom: 0.5rem;
}

.article-body blockquote cite {
    display: block;
    font-size: 0.95rem;
    color: var(--color-text-light);
    font-style: normal;
    margin-top: 1rem;
}

/* Code Block */
.code-block {
    margin: 2rem 0;
    background: #1e2b48;
    border-radius: 0.75rem;
    overflow: hidden;
}

.code-block pre {
    padding: 1.5rem;
    overflow-x: auto;
    margin: 0;
}

.code-block code {
    color: #f8f8f2;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Info Box */
.info-box {
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(168, 230, 207, 0.1);
    border: 1px solid var(--color-accent);
    border-radius: 0.75rem;
}

.info-box h4 {
    margin: 0 0 0.75rem;
    color: var(--color-primary);
    font-weight: 700;
}

.info-box p {
    margin: 0;
    color: var(--color-text);
}

/* Article Tags */
.article-tags {
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.article-tags h3 {
    display: inline-block;
    margin-right: 1rem;
    font-size: 1.125rem;
    color: var(--color-text);
}

.tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    background: var(--color-background-alt);
    border: 1px solid var(--color-border);
    border-radius: 9999px;
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--color-secondary);
    color: white;
    border-color: var(--color-secondary);
    transform: translateY(-2px);
}

/* Share Section */
.article-share {
    margin: 2rem 0;
    text-align: center;
}

.article-share h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: var(--color-text);
}

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

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--color-background-alt);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    transition: all 0.3s ease;
}

.share-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.share-btn.twitter:hover {
    background: #1DA1F2;
    color: white;
    border-color: #1DA1F2;
}

.share-btn.facebook:hover {
    background: #1877F2;
    color: white;
    border-color: #1877F2;
}

.share-btn.linkedin:hover {
    background: #0A66C2;
    color: white;
    border-color: #0A66C2;
}

/* Author Box */
.author-box {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    background: var(--color-background-alt);
    border-radius: 1rem;
    margin: 3rem 0;
}

.author-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-details h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.author-details p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

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

.author-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(26, 43, 76, 0.1);
    color: var(--color-primary);
    transition: all 0.3s ease;
}

.author-social a:hover {
    background: var(--color-primary);
    color: var(--color-background);
    transform: translateY(-3px);
}

/* Article Sidebar */
.article-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.sidebar-widget {
    background: var(--color-background-alt);
    padding: 2rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
}

.sidebar-widget h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--color-primary);
}

/* Blog Search */
.blog-search {
    display: flex;
    gap: 0.5rem;
}

.blog-search input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.blog-search input:focus {
    outline: none;
    border-color: var(--color-secondary);
}

.blog-search button {
    padding: 0.75rem 1rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.blog-search button:hover {
    background: var(--color-secondary);
}

/* Category List */
.category-list {
    list-style: none;
    padding: 0;
}

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

.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-text);
    text-decoration: none;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
}

.category-list a:hover {
    color: var(--color-secondary);
    transform: translateX(5px);
}

.category-list span {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

/* Recent Posts */
.recent-posts {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.recent-post {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.recent-post:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

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

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

.recent-post a:hover h4 {
    color: var(--color-secondary);
}

.recent-post time {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

/* Newsletter Widget */
.newsletter-widget {
    background: var(--color-primary);
    color: var(--color-background);
}

.newsletter-widget h3 {
    color: var(--color-background);
}

.newsletter-widget p {
    margin-bottom: 1.5rem;
    color: rgba(245, 241, 233, 0.9);
}

.sidebar-newsletter input {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    color: var(--color-background);
}

.sidebar-newsletter input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.sidebar-newsletter .btn-primary {
    width: 100%;
    justify-content: center;
}

/* Related Posts */
.related-posts {
    padding: 4rem 0;
    background: var(--color-background-alt);
}

.related-posts h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--color-text);
}

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

/* Responsive Styles */
@media (max-width: 1200px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .blog-card.featured {
        grid-column: span 2;
        grid-template-columns: 1fr;
    }
    
    .article-title {
        font-size: 3rem;
    }
}

@media (max-width: 991px) {
    .article-grid {
        grid-template-columns: 1fr;
    }
    
    .article-sidebar {
        position: static;
        margin-top: 3rem;
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .blog-header h1 {
        font-size: 3rem;
    }
    
    .blog-description {
        font-size: 1.25rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-card.featured {
        grid-column: 1;
    }
    
    .blog-newsletter-form {
        flex-direction: column;
    }
    
    .article-title {
        font-size: 2.5rem;
    }
    
    .article-excerpt {
        font-size: 1.25rem;
    }
    
    .article-author-header {
        flex-direction: column;
        text-align: center;
    }
    
    .author-info-large {
        text-align: center;
    }
    
    .author-box {
        flex-direction: column;
        text-align: center;
    }
    
    .author-social {
        justify-content: center;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .blog-header {
        padding: 6rem 0 3rem;
    }
    
    .blog-header h1 {
        font-size: 2.5rem;
    }
    
    .categories-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 0.5rem;
        padding: 0 1rem;
    }
    
    .category-btn {
        flex-shrink: 0;
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
    
    .blog-posts {
        padding: 3rem 0;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    .article-body {
        font-size: 1rem;
    }
    
    .table-of-contents {
        padding: 1.5rem;
    }
    
    .share-buttons {
        gap: 0.5rem;
    }
    
    .share-btn {
        width: 40px;
        height: 40px;
    }
}