
/* Blog-Specific Components - Using Design System Variables */

/* Global Blog Image Constraints */
.article-text img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: var(--space-6) auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.blog-header {
    background: var(--bg-hero);
    color: var(--text-inverse);
    padding: calc(var(--navbar-height) + var(--space-20)) 0 var(--space-16);
    text-align: center;
}

.blog-header h1 {
    font-size: var(--text-5xl);
    font-weight: var(--weight-bold);
    margin-bottom: var(--space-4);
    color: var(--text-inverse);
}

.blog-header p {
    font-size: var(--text-xl);
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    color: var(--text-inverse);
    line-height: var(--leading-relaxed);
}

/* Blog Layout */
.blog-main {
    padding: var(--space-20) 0;
}

.blog-main .container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--space-16);
}

/* Featured Article */
.featured-article {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: var(--space-12);
    border: 1px solid var(--border-primary);
}

.featured-article img {
    width: 100%;
    height: 250px;
    max-height: 250px;
    object-fit: cover;
    object-position: center;
}

.featured-article .article-content {
    padding: var(--space-8);
}

.featured-article .article-category {
    background: var(--color-accent);
    color: var(--text-inverse);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    display: inline-block;
}

.featured-article h2 {
    margin: var(--space-6) 0 var(--space-4);
    font-size: var(--text-3xl);
    font-weight: var(--weight-bold);
}

.featured-article h2 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.featured-article h2 a:hover {
    color: var(--color-accent);
}

.featured-article .article-meta {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin: var(--space-6) 0;
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.featured-article .read-more {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: var(--weight-medium);
    transition: color var(--transition-fast);
}

.featured-article .read-more:hover {
    color: var(--color-accent-hover);
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-8);
    margin-bottom: var(--space-12);
}

/* Newsletter Signup */
.newsletter-signup {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: var(--space-12);
    text-align: center;
    margin-top: var(--space-12);
    border: 1px solid var(--border-primary);
}

.newsletter-signup h3 {
    color: var(--text-primary);
    font-size: var(--text-2xl);
    font-weight: var(--weight-semibold);
    margin-bottom: var(--space-4);
}

.newsletter-form {
    display: flex;
    gap: var(--space-4);
    max-width: 400px;
    margin: var(--space-8) auto 0;
}

.newsletter-form input {
    flex: 1;
    padding: var(--space-3);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-lg);
    font-size: var(--text-base);
    transition: border-color var(--transition-fast);
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.newsletter-form button {
    padding: var(--space-3) var(--space-6);
    white-space: nowrap;
}

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

.sidebar-widget {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.sidebar-widget h4 {
    color: #1a365d;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3182ce;
}

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

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

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

.category-list a:hover {
    color: #3182ce;
}

.category-list span {
    font-size: 0.8rem;
    color: #999;
}

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

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

.recent-post img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.recent-content h5 {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
}

.recent-content a {
    color: #1a365d;
    text-decoration: none;
    transition: color 0.3s ease;
}

.recent-content a:hover {
    color: #3182ce;
}

.recent-date {
    font-size: 0.8rem;
    color: #666;
}

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

.tag {
    background: #f0f4f8;
    color: #3182ce;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag:hover {
    background: #3182ce;
    color: white;
}

/* Article Page Styles */
.article-page {
    padding-top: 80px;
}

.article-header {
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
    color: white;
    padding: 2rem 0;
}

.article-breadcrumb {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.article-breadcrumb a {
    color: white;
    text-decoration: none;
}

.article-breadcrumb span {
    color: #ddd;
}

.article-category {
    background: #3182ce;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 1rem;
}

.article-page h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.article-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

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

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

.author-name {
    font-weight: 600;
    display: block;
}

.author-title {
    font-size: 0.9rem;
    opacity: 0.8;
}

.article-details {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Article Content */
.article-content {
    padding: 80px 0;
}

.article-content .container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 4rem;
}

.article-hero-image {
    width: 100%;
    height: 300px;
    max-height: 300px;
    object-fit: cover;
    object-position: center;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.article-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.article-text h2 {
    color: #1a365d;
    margin: 2rem 0 1rem;
    font-size: 1.8rem;
}

.article-text h3 {
    color: #2c5282;
    margin: 1.5rem 0 1rem;
    font-size: 1.3rem;
}

.article-text blockquote {
    background: #f8fafc;
    border-left: 4px solid #3182ce;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
    font-style: italic;
}

.article-text blockquote p {
    margin: 0 0 1rem;
    font-size: 1.2rem;
    color: #2c5282;
}

.article-text blockquote footer {
    font-size: 0.9rem;
    color: #666;
    font-style: normal;
}

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

.article-text li {
    margin-bottom: 0.5rem;
}

/* Article Components */
.case-study {
    background: #f0f8ff;
    border: 1px solid #b3d9ff;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.case-study h3 {
    color: #1a365d;
    margin-bottom: 1rem;
}

.stats-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 12px;
}

.stats-showcase .stat-item {
    text-align: center;
}

.stats-showcase .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #3182ce;
    display: block;
}

.stats-showcase .stat-label {
    font-size: 0.9rem;
    color: #666;
}

.comparison-table {
    margin: 2rem 0;
    overflow-x: auto;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.comparison-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #1a365d;
}

.comparison-chart {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cost-comparison {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cost-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.system-name {
    width: 200px;
    font-weight: 500;
}

.cost-bar {
    height: 20px;
    background: #3182ce;
    border-radius: 10px;
    min-width: 20px;
}

.cost-bar.fenek {
    background: #38a169;
}

.cost-bar.patriot {
    background: #e53e3e;
}

.cost-bar.iron-dome {
    background: #d69e2e;
}

.cost-value {
    font-weight: 600;
    color: #1a365d;
}

.effectiveness-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.metric-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.metric-card h4 {
    color: #1a365d;
    margin-bottom: 1rem;
}

.metric-card ul {
    list-style: none;
    padding: 0;
}

.metric-card li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.metric-card li:last-child {
    border-bottom: none;
}

.article-cta {
    background: #f8fafc;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin: 3rem 0;
}

.article-cta h3 {
    color: #1a365d;
    margin-bottom: 1rem;
}

/* Article Sidebar */
.article-sidebar {
    position: sticky;
    top: 120px;
    height: fit-content;
}

.key-points {
    list-style: none;
    padding: 0;
}

.key-points li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    position: relative;
    padding-left: 1.5rem;
}

.key-points li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #3182ce;
    font-weight: bold;
}

.key-points li:last-child {
    border-bottom: none;
}

.related-articles {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.related-article {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.related-article img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.related-article h5 {
    margin: 0;
    font-size: 0.9rem;
}

.related-article a {
    color: #1a365d;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-article a:hover {
    color: #3182ce;
}

.social-share {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.share-link {
    background: #f0f4f8;
    color: #3182ce;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.share-link:hover {
    background: #3182ce;
    color: white;
}

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

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

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

.share-link.email:hover {
    background: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-main .container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .article-content .container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .blog-header h1 {
        font-size: 2rem;
    }

    .article-page h1 {
        font-size: 2rem;
    }

    .featured-article .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .stats-showcase {
        grid-template-columns: repeat(2, 1fr);
    }

    .effectiveness-metrics {
        grid-template-columns: 1fr;
    }

    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .article-details {
        flex-direction: column;
        gap: 0.5rem;
    }

    .cost-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .system-name {
        width: auto;
    }
}

@media (max-width: 480px) {
    .stats-showcase {
        grid-template-columns: 1fr;
    }

    .blog-header h1 {
        font-size: 1.8rem;
    }

    .article-page h1 {
        font-size: 1.8rem;
    }

    .article-text {
        font-size: 1rem;
    }

    .sidebar-widget {
        padding: 1rem;
    }
    
    .featured-article img {
        height: 200px;
    }
    
    .article-hero-image {
        height: 200px;
        max-height: 200px;
    }
    
    .article-content .container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Related Articles Styling */
.related-articles {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.related-article {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.related-article:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.related-article img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.related-content {
    flex: 1;
    min-width: 0;
}

.related-content h5 {
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
    line-height: 1.3;
}

.related-content h5 a {
    color: #1a365d;
    text-decoration: none;
    font-weight: 600;
}

.related-content h5 a:hover {
    color: #3182ce;
}

.related-content p {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
}

/* Key Points Styling Enhancement */
.key-points {
    list-style: none;
    padding: 0;
}

.key-points li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.key-points li:last-child {
    border-bottom: none;
}

.key-points li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
    font-size: 1rem;
}

/* Sidebar Widget Enhancement */
.sidebar-widget {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.sidebar-widget h4 {
    color: #1a365d;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
    border-bottom: 2px solid #3182ce;
    padding-bottom: 0.5rem;
}

/* Mobile responsiveness for related articles */
@media (max-width: 768px) {
    .related-article {
        flex-direction: column;
    }
    
    .related-article img {
        width: 100%;
        height: 120px;
    }
}

/* Articles Grid for Related Articles Section */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.article-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

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

.article-card-content .article-category {
    display: inline-block;
    background: #e6fffa;
    color: #008080;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.article-card-content h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1.1rem;
    line-height: 1.4;
}

.article-card-content h3 a {
    color: #1a365d;
    text-decoration: none;
    font-weight: 600;
}

.article-card-content h3 a:hover {
    color: #3182ce;
}

.article-card-content p {
    margin: 0 0 1rem 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

.article-card-content .article-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #888;
}

.article-meta span {
    display: flex;
    align-items: center;
}

/* Ensure both sidebar and main content related articles look good */
.related-articles section,
section.related-articles {
    background: #f8fafc;
    padding: 3rem 0;
    margin-top: 3rem;
}

section.related-articles .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

section.related-articles h2 {
    text-align: center;
    color: #1a365d;
    margin-bottom: 2rem;
    font-size: 2rem;
}

/* Additional mobile styles for very small screens */
@media (max-width: 480px) {
    .featured-article img {
        height: 150px;
    }
    
    .article-hero-image {
        height: 150px;
        max-height: 150px;
    }
    
    .blog-header {
        padding: 100px 0 40px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .article-card-content {
        padding: 1rem;
    }
}
