/* Blog Styles - BloodWeb.net Theme */
:root {
    --blog-primary: var(--bloodweb-blue, #2196F3);
    --blog-secondary: var(--bloodweb-purple, #9C27B0);
    --blog-accent: var(--bloodweb-red, #F44336);
    --blog-text: var(--text-color, #333);
    --blog-bg: var(--bg-color, #ffffff);
    --blog-card-bg: var(--card-bg, #f8f9fa);
    --blog-border: var(--border-color, #e0e0e0);
    --blog-shadow: var(--shadow-color, rgba(0, 0, 0, 0.1));
}

/* Layout Structure */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.blog-header {
    background: linear-gradient(135deg, var(--blog-primary), var(--blog-secondary));
    color: white;
    padding: 20px 0;
    margin-bottom: 40px;
}

.blog-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.home-link {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: opacity 0.3s;
}

.home-link:hover {
    opacity: 0.8;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.8;
}

.blog-hero {
    text-align: center;
    padding: 40px 0;
}

.blog-hero h1 {
    font-size: 3em;
    margin: 0 0 15px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.blog-hero p {
    font-size: 1.2em;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Main Layout */
.blog-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

/* Featured Post */
.featured-post {
    margin-bottom: 50px;
}

.post-card {
    background: var(--blog-card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px var(--blog-shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 30px;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--blog-shadow);
}

.post-card.featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-bottom: 0;
}

.post-image {
    position: relative;
    overflow: hidden;
}

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

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

.post-card.featured .post-image img {
    height: 100%;
    min-height: 300px;
}

.post-content {
    padding: 25px;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.9em;
    color: var(--blog-text);
    opacity: 0.7;
}

.post-category {
    background: var(--blog-primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
}

/* Author Styles */
.post-author {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    min-width: 0; /* Prevent flex overflow */
}

.author-avatar {
    width: 24px;
    height: 24px;
    min-width: 24px; /* Prevent shrinking */
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--blog-border);
    transition: transform 0.2s;
    background: var(--blog-card-bg); /* Fallback background */
}

.author-avatar:hover {
    transform: scale(1.1);
}

.author-name {
    font-size: 0.85em;
    font-weight: 500;
    color: var(--blog-text);
}

/* Author Profile Styles */
.author-profile {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: var(--blog-card-bg);
    border-radius: 12px;
    border: 1px solid var(--blog-border);
    margin: 30px 0;
}

.author-profile.compact {
    padding: 15px;
    margin: 20px 0;
}

.author-avatar-large {
    flex-shrink: 0;
}

.author-avatar-large img {
    width: 60px;
    height: 60px;
    min-width: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--blog-primary);
    background: var(--blog-card-bg);
    display: block;
}

.author-profile.compact .author-avatar-large img {
    width: 40px;
    height: 40px;
    border-width: 2px;
}

.author-info {
    flex: 1;
}

.author-info .author-name {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--blog-text);
    margin: 0 0 8px 0;
}

.author-bio {
    font-size: 0.9em;
    color: var(--blog-text);
    opacity: 0.8;
    line-height: 1.5;
    margin: 0 0 12px 0;
}

.author-social {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.author-social a {
    font-size: 0.85em;
    color: var(--blog-primary);
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--blog-primary);
    transition: all 0.2s;
}

.author-social a:hover {
    background: var(--blog-primary);
    color: white;
}

/* Sidebar Author Styles */
.authors-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.authors-list li {
    margin-bottom: 12px;
}

.author-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--blog-text);
    transition: background-color 0.2s;
}

.author-link:hover {
    background-color: var(--blog-card-bg);
}

.author-avatar-small {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--blog-border);
    background: var(--blog-card-bg);
}

.author-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.author-details .author-name {
    font-size: 0.9em;
    font-weight: 500;
}

.post-count {
    font-size: 0.75em;
    opacity: 0.6;
}

.post-content h2,
.post-content h3 {
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.post-content h2 a,
.post-content h3 a {
    color: var(--blog-text);
    text-decoration: none;
    transition: color 0.3s;
}

.post-content h2 a:hover,
.post-content h3 a:hover {
    color: var(--blog-primary);
}

.post-content p {
    line-height: 1.6;
    margin-bottom: 20px;
    color: var(--blog-text);
    opacity: 0.8;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tag {
    background: var(--blog-border);
    color: var(--blog-text);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8em;
    text-decoration: none;
    transition: background 0.3s;
}

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

.read-more {
    color: var(--blog-primary);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.read-more:hover {
    color: var(--blog-secondary);
}

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

.sidebar-widget {
    background: var(--blog-card-bg);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px var(--blog-shadow);
}

.sidebar-widget h3 {
    margin: 0 0 20px 0;
    color: var(--blog-text);
    font-size: 1.2em;
    border-bottom: 2px solid var(--blog-border);
    padding-bottom: 10px;
}

/* Search Box */
.search-box {
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 10px;
    border: 2px solid var(--blog-border);
    border-radius: 6px;
    font-size: 0.9em;
}

.search-box button {
    padding: 10px 15px;
    background: var(--blog-primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

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

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

.category-list li {
    margin-bottom: 10px;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    color: var(--blog-text);
    text-decoration: none;
    padding: 8px 0;
    border-bottom: 1px solid var(--blog-border);
    transition: color 0.3s;
}

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

.category-list span {
    opacity: 0.6;
    font-size: 0.9em;
}

/* Tag Cloud */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-link {
    background: var(--blog-border);
    color: var(--blog-text);
    padding: 6px 12px;
    border-radius: 15px;
    text-decoration: none;
    font-size: 0.85em;
    transition: all 0.3s;
}

.tag-link:hover {
    background: var(--blog-primary);
    color: white;
    transform: translateY(-2px);
}

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

.recent-posts li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--blog-border);
}

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

.recent-posts a {
    display: block;
    color: var(--blog-text);
    text-decoration: none;
    transition: color 0.3s;
}

.recent-posts a:hover {
    color: var(--blog-primary);
}

.recent-title {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    line-height: 1.3;
}

.recent-date {
    font-size: 0.85em;
    opacity: 0.6;
}

/* Newsletter Form */
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.newsletter-form input {
    padding: 12px;
    border: 2px solid var(--blog-border);
    border-radius: 6px;
    font-size: 0.9em;
}

.newsletter-form button {
    padding: 12px;
    background: var(--blog-primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.newsletter-form button:hover {
    background: var(--blog-secondary);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding: 20px 0;
    border-top: 2px solid var(--blog-border);
}

.page-info {
    color: var(--blog-text);
    opacity: 0.7;
}

.page-links {
    display: flex;
    gap: 10px;
}

.page-link {
    padding: 8px 12px;
    color: var(--blog-text);
    text-decoration: none;
    border: 2px solid var(--blog-border);
    border-radius: 6px;
    transition: all 0.3s;
}

.page-link:hover {
    background: var(--blog-primary);
    color: white;
    border-color: var(--blog-primary);
}

.page-link.current {
    background: var(--blog-primary);
    color: white;
    border-color: var(--blog-primary);
}

/* Footer */
.blog-footer {
    background: var(--blog-text);
    color: white;
    margin-top: 60px;
    padding: 40px 0 20px 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h4 {
    margin: 0 0 15px 0;
    color: var(--blog-primary);
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul a {
    color: white;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-section ul a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .post-card.featured {
        grid-template-columns: 1fr;
    }
    
    .post-card.featured .post-image img {
        height: 250px;
        min-height: auto;
    }
    
    .blog-hero h1 {
        font-size: 2em;
    }
    
    .blog-nav {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .pagination {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    /* Author responsive styles */
    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .author-profile {
        flex-direction: column;
        text-align: center;
    }
    
    .author-profile .author-info {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .post-content {
        padding: 20px;
    }
    
    .sidebar-widget {
        padding: 20px;
    }
    
    .blog-hero {
        padding: 20px 0;
    }
    
    .blog-hero h1 {
        font-size: 1.8em;
    }
    
    /* Small screen author adjustments */
    .author-avatar-large img {
        width: 50px;
        height: 50px;
    }
    
    .author-social {
        justify-content: center;
    }
    
    .authors-list {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 8px;
    }
    
    .author-link {
        flex-direction: column;
        text-align: center;
        padding: 12px 8px;
    }
}

/* Call-to-Action Section Styles */
.cta-section {
    margin: 40px 0;
    padding: 30px;
    background: linear-gradient(135deg, var(--blog-primary), var(--blog-secondary));
    border-radius: 12px;
    text-align: center;
    color: white;
}

.cta-content h3 {
    font-size: 1.5em;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.cta-content p {
    font-size: 1.1em;
    margin: 0 0 25px 0;
    opacity: 0.9;
    line-height: 1.5;
}

.cta-button {
    display: inline-block;
    padding: 15px 30px;
    background: white;
    color: var(--blog-primary);
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    color: var(--blog-secondary);
}

/* Responsive CTA */
@media (max-width: 480px) {
    .cta-section {
        margin: 30px 0;
        padding: 25px 20px;
    }
    
    .cta-content h3 {
        font-size: 1.3em;
    }
    
    .cta-content p {
        font-size: 1em;
    }
    
    .cta-button {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
}