/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(350px, 100%), 1fr));
    gap: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 3rem;
    width: 100%;
}

.article-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-light);
}

.article-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
}

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

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

.article-content {
    padding: clamp(1rem, 3vw, 1.2rem);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-content h2,
.article-content h3 {
    font-size: clamp(1.2rem, 3vw, 1.4rem);
    margin-bottom: 1rem;
    line-height: 1.4;
    font-weight: 600;
}

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

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

.article-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

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

.article-meta time {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

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

.read-more:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Article Full Page */
.article-full {
    background: var(--card-bg);
    border-radius: 16px;
    padding: clamp(2rem, 4vw, 3rem);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    margin-bottom: 3rem;
}

.article-header {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.article-header h1 {
    font-size: clamp(1.75rem, 5vw, 2.25rem);
    color: var(--secondary-color);
    margin-bottom: 1rem;
    line-height: 1.3;
    font-weight: 700;
}

.article-meta {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.article-hero-image {
    width: 100%;
    margin: 2rem 0;
    border-radius: 12px;
    overflow: hidden;
}

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

.article-content {
    line-height: 1.7;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.article-content h2 {
    font-size: 1.5rem;
    line-height: 1.2;
    color: var(--secondary-color);
    margin: 0 0 1rem 0;
    font-weight: 600;
}

.article-content h3 {
    font-size: 1.25rem;
    color: var(--secondary-color);
    margin: 1.5rem 0 1rem 0;
    font-weight: 600;
}

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

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

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

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

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

/* Related Articles */
.related-articles {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
}

.related-articles h2 {
    font-size: clamp(1.5rem, 4vw, 1.75rem);
    color: var(--secondary-color);
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 600;
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 2rem;
    padding: 1rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

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

.breadcrumb a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.breadcrumb span {
    color: var(--text-secondary);
}

/* No Content State */
.no-content {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.no-content h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .article-card {
        margin: 0;
    }
    
    .article-full {
        padding: 1.5rem;
        margin: 0 -1rem 2rem -1rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .article-content {
        font-size: 1rem;
    }
    
    .article-content h2 {
        font-size: 1.3rem;
    }
    
    .article-content h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .article-image {
        height: 200px;
    }
    
    .article-content {
        padding: 1.25rem;
    }
    
    .page-header {
        padding: 1.5rem 1rem;
    }
    
    .related-articles {
        margin-top: 3rem;
        padding-top: 2rem;
    }
}

/* Print Styles */
@media print {
    .article-card,
    .article-full {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
    
    .read-more,
    .breadcrumb,
    .related-articles {
        display: none;
    }
    
    .article-content {
        font-size: 12pt;
        line-height: 1.4;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .article-card,
    .article-card:hover .article-image img {
        transition: none;
        transform: none;
    }
}

.article-card:focus-within {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Loading States */
.articles-grid.loading {
    opacity: 0.7;
    pointer-events: none;
}

.skeleton-article {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 16px;
    height: 400px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}