/**
 * Blog Styles
 * Styles for blog listing and article detail pages
 */

/* Blog Listing Page */
.blog-listing-page {
    padding: 0;
}

.blog-content-section {
    padding: 4rem 0;
    background: var(--white);
}

.blog-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
}

.blog-header .section-heading-uppercase {
    margin-bottom: 0.5rem;
}

.blog-subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    margin-bottom: 2rem;
}

/* Category Filter Section - Top of Page */
.blog-filter-section {
    padding: 2rem 0;
    background: var(--white);
    border-bottom: 1px solid var(--pinkish-grey);
}

.blog-category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
}

.category-filter-btn {
    padding: 0.75rem 1.5rem;
    background: var(--carolina-blue-brightest);
    color: var(--clear-blue);
    text-decoration: none;
    border: 2px solid var(--clear-blue);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: var(--font-semibold);
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(41, 105, 255, 0.1);
}

.category-filter-btn:hover {
    background: var(--clear-blue);
    color: var(--white);
    border-color: var(--clear-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(41, 105, 255, 0.2);
}

.category-filter-btn.active {
    background: var(--clear-blue);
    color: var(--white);
    border-color: var(--clear-blue);
    box-shadow: 0 4px 12px rgba(41, 105, 255, 0.3);
}

.no-articles {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
}

.no-articles p {
    margin-bottom: 1rem;
}

.no-articles .cta-button-dark {
    margin-top: 1rem;
}

/* Articles Grid - Tile Design */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
    margin-top: 2rem;
}

.article-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #f0f0f0;
}

.article-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.article-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: #e0e0e0;
}

.article-cover {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
}

.article-category-tag {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    background: rgba(15, 30, 67, 0.9);
    color: var(--white);
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    backdrop-filter: blur(4px);
}

.article-cover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.article-card:hover .article-cover::after {
    opacity: 1;
}

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

.article-card:hover .article-cover img {
    transform: scale(1.08);
}

.article-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.article-title {
    font-size: 0.75rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
    font-weight: 600;
    flex-grow: 1;
}

.article-title {
    color: #1f2937;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid #f3f4f6;
}

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

.article-date {
    color: #6b7280;
}

.article-views {
    color: #9ca3af;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 1rem 0;
}

.pagination-link {
    padding: 0.5rem 1rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s;
}

.pagination-link:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.pagination-info {
    color: #6b7280;
    font-size: 0.875rem;
}

/* Article Detail Page */
.article-detail {
    padding: 2rem 0;
}

.article-full {
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.article-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.article-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #1f2937;
    line-height: 1.2;
}

.article-cover-image {
    width: 100%;
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
}

.article-cover-image img {
    width: 100%;
    height: auto;
    display: block;
}

.article-excerpt {
    font-size: 1.125rem;
    color: #6b7280;
    font-style: italic;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f9fafb;
    border-left: 4px solid #3b82f6;
}

.article-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #374151;
    margin-bottom: 2rem;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #1f2937;
    font-weight: 600;
}

.article-content h1 { font-size: 2rem; }
.article-content h2 { font-size: 1.75rem; }
.article-content h3 { font-size: 1.5rem; }
.article-content h4 { font-size: 1.25rem; }

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

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

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

.article-content a {
    color: #3b82f6;
    text-decoration: underline;
}

.article-content a:hover {
    color: #2563eb;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1.5rem 0;
}

.article-content blockquote {
    border-left: 4px solid #3b82f6;
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #6b7280;
}

.article-content code {
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.article-content pre {
    background: #1f2937;
    color: #f9fafb;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.article-content pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

.article-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e5e7eb;
}

.article-navigation {
    text-align: center;
}

.back-to-blog {
    display: inline-block;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.back-to-blog:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .articles-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .article-header h1 {
        font-size: 2rem;
    }
    
    .article-full {
        padding: 1rem;
    }
    
    .article-content {
        font-size: 1rem;
    }
    
    .article-cover {
        height: 180px;
    }
}

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