/* ===================================
   NOTICIAS - STYLES
   News section with grid layout and cards
   =================================== */

/* ---------- CATEGORIES FILTER ---------- */
.categories-filter {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap-sm);
    justify-content: center;
    max-width: 900px;
    margin: 0 auto;
}

.category-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--white);
    border: 2px solid var(--bg-dark);
    border-radius: var(--radius-pill);
    color: var(--txt);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.category-badge:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--white);
    transform: translateY(-2px);
}

.category-badge.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--white);
}

/* ---------- NEWS GRID ---------- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--gap-lg);
    max-width: 1200px;
    margin: 0 auto;
}

.news-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--shadow-hover);
}

.news-card__image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    display: block;
}

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

.news-card:hover .news-card__image img {
    transform: scale(1.05);
}

.news-card__category {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: var(--accent);
    color: var(--white);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-card__content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card__title {
    margin: 0 0 0.75rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
}

.news-card__title a {
    color: var(--txt);
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-card__title a:hover {
    color: var(--accent);
}

.news-card__description {
    color: var(--text-body);
    line-height: 1.6;
    margin: 0 0 1rem 0;
    flex: 1;
}

.news-card__meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--bg-dark);
}

.news-card__source {
    color: var(--text-muted);
}

/* ---------- SINGLE ARTICLE ---------- */
.article-meta {
    text-align: center;
    margin-top: 1rem;
    font-size: 1rem;
    color: var(--text-muted);
}

.article-meta time {
    display: inline-block;
}

.article-categories {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap-xs);
    margin-top: 1rem;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
}

.article-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
}

.article-body {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--txt);
}

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

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

.article-body ul li,
.article-body ol li {
    margin-bottom: 0.75rem;
}

.article-body ul {
    list-style-type: disc;
}

.article-body ol {
    list-style-type: decimal;
}

.article-body a {
    color: var(--accent);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.article-body a:hover {
    color: var(--txt);
}

.article-body strong {
    font-weight: 700;
}

.article-body em {
    font-style: italic;
}

.article-body h2,
.article-body h3 {
    margin-top: 5rem;
    margin-bottom: 1.5rem;
    color: var(--txt);
    font-weight: 700;
}

.article-body h2 {
    font-size: 1.75rem;
}

.article-body h3 {
    font-size: 1.5rem;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 767px) {
    .news-grid {
        grid-template-columns: 1fr;
        gap: var(--gap-md);
    }

    .news-card__image {
        height: 200px;
    }

    .news-card__title {
        font-size: 1.125rem;
    }

    .categories-filter {
        gap: var(--gap-xs);
    }

    .category-badge {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

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

    .article-body h2,
    .article-body h3 {
        margin-top: 3rem;
    }
}

/* ---------- ARTICLE AUTHOR ---------- */
.article-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--bg-dark);
}

.article-author__image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid var(--accent);
}

.article-author__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.8);
}

.article-author__text {
    font-size: 1rem;
    color: var(--txt-soft);
    margin: 0;
}

.article-author__text strong {
    color: var(--txt);
    font-weight: 700;
}

@media (max-width: 480px) {
    .news-card__content {
        padding: 1.25rem;
    }

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

    .article-author {
        flex-direction: column;
        text-align: center;
    }

    .article-author__image {
        width: 80px;
        height: 80px;
    }
}

/* ---------- NEWS META ---------- */
.news-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

.news-meta time {
    font-weight: 500;
}
