/* News Styles - BEM Methodology */

/* News List Page */
.news__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.news__header {
    margin-bottom: 2rem;
}

.news__title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 1rem;
}

.news__subtitle {
    color: var(--color-text-secondary);
    font-size: 1.125rem;
}

/* News Grid */
.news__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.news__card {
    background-color: var(--color-card-bg);
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
}

.news__card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -3px var(--color-shadow-black-light);
    border-color: var(--color-primary);
}

.news__card-image {
    width: 100%;
    height: 12rem;
    object-fit: cover;
}

.news__card-content {
    padding: 1.5rem;
}

.news__card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.news__card-title-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.news__card-title-link:hover {
    color: var(--color-primary);
}

.news__card-summary {
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news__card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.news__card-author {
    /* Author styling */
}

.news__card-date {
    /* Date styling */
}

/* Pagination */
.news__pagination {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.news__pagination-list {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.news__pagination-link {
    padding: 0.75rem;
    background-color: var(--color-background);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: 0.375rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.news__pagination-link:hover {
    background-color: var(--color-card-bg);
    color: var(--color-text);
    text-decoration: none;
}

.news__pagination-current {
    padding: 0.75rem;
    background-color: var(--color-primary);
    color: white;
    border-radius: 0.375rem;
}

.news__pagination-ellipsis {
    padding: 0.75rem;
    color: var(--color-text-secondary);
}

/* Empty State */
.news__empty {
    text-align: center;
    padding: 3rem 0;
}

.news__empty-message {
    color: var(--color-text-secondary);
    font-size: 1.125rem;
}

/* News Detail Page */
.news-detail__container {
    max-width: 4xl;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.news-detail__back-link {
    display: inline-flex;
    align-items: center;
    color: var(--color-primary);
    text-decoration: none;
    margin-bottom: 1.5rem;
    gap: 0.5rem;
    transition: color 0.2s ease;
}

.news-detail__back-link:hover {
    color: var(--color-primary-light);
}

.news-detail__header {
    margin-bottom: 2rem;
}

.news-detail__title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 1rem;
}

.news-detail__meta {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.news-detail__meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.news-detail__hero-image {
    width: 100%;
    height: 16rem;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .news-detail__hero-image {
        height: 24rem;
    }
}

.news-detail__summary {
    background-color: var(--color-card-bg);
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--color-border);
    margin-bottom: 1.5rem;
}

.news-detail__summary-text {
    color: var(--color-text-secondary);
    font-size: 1.125rem;
    line-height: 1.6;
}

/* News Content */
.news-detail__content {
    color: var(--color-text-secondary);
    line-height: 1.6;
    font-size: 1rem;
}

.news-detail__content h1,
.news-detail__content h2,
.news-detail__content h3,
.news-detail__content h4,
.news-detail__content h5,
.news-detail__content h6 {
    color: var(--color-text);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.news-detail__content h1 {
    font-size: 2rem;
}

.news-detail__content h2 {
    font-size: 1.75rem;
}

.news-detail__content h3 {
    font-size: 1.5rem;
}

.news-detail__content p {
    margin-bottom: 1rem;
}

.news-detail__content ul,
.news-detail__content ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.news-detail__content li {
    margin-bottom: 0.5rem;
}

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

.news-detail__content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

.news-detail__content a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.news-detail__content a:hover {
    color: var(--color-primary-light);
    text-decoration: underline;
}

/* Share Section */
.news-detail__share {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.news-detail__share-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 1rem;
}

.news-detail__share-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.news-detail__share-button {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    gap: 0.5rem;
}

.news-detail__share-button--facebook {
    background-color: #1877f2;
    color: white;
}

.news-detail__share-button--facebook:hover {
    background-color: #166fe5;
    color: white;
    text-decoration: none;
}

.news-detail__share-button--twitter {
    background-color: #1da1f2;
    color: white;
}

.news-detail__share-button--twitter:hover {
    background-color: #1a91da;
    color: white;
    text-decoration: none;
}

.news-detail__share-button--linkedin {
    background-color: #0077b5;
    color: white;
}

.news-detail__share-button--linkedin:hover {
    background-color: #006ba1;
    color: white;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .news__grid {
        grid-template-columns: 1fr;
    }
    
    .news-detail__title {
        font-size: 2rem;
    }
    
    .news-detail__meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .news-detail__share-buttons {
        flex-direction: column;
    }
    
    .news-detail__share-button {
        justify-content: center;
    }
}

/* Loading States */
.news__loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem 0;
}

.news__loading-spinner {
    width: 2rem;
    height: 2rem;
    border: 2px solid var(--color-border);
    border-top: 2px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error States */
.news__error {
    text-align: center;
    padding: 3rem 0;
}

.news__error-message {
    color: #ef4444;
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.news__error-retry {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background-color: var(--color-primary);
    color: white;
    border: none;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    gap: 0.5rem;
}

.news__error-retry:hover {
    background-color: var(--color-primary-dark);
}
