/* news.css - Estilos específicos para la sección de noticias */

.news-page-content {
    padding: 20px 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.news-page-header {
    text-align: center;
    padding: 25px 0 35px 0;
    border-bottom: 1px solid #1f1f1f;
    margin-bottom: 30px;
}

.news-page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #e8e8e8;
    margin-bottom: 10px;
}

.news-page-header p {
    font-size: 1.1rem;
    color: #a0a0a0;
    max-width: 600px;
    margin: 0 auto;
}

/* Barra de Herramientas */
.news-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 35px;
    padding: 15px;
    background-color: #101013;
    border-radius: 8px;
    border: 1px solid #2a2a2e;
}

.filter-group, .sort-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.news-toolbar label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #a0a0a5;
}

.news-toolbar select {
    background-color: #1A1A1E;
    color: #EAEAEA;
    border: 1px solid #38383D;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.9rem;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23888888%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 12px top 50%;
    background-size: .65em auto;
    padding-right: 30px;
    transition: border-color 0.2s ease;
}

/* Grid de Noticias */
.news-feed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.news-card-item {
    background-color: #161618;
    border: 1px solid #2a2a2e;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
}

.news-card-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.news-card-item .news-card-image-container {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background-color: #202023;
}

.news-card-item .news-card-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card-item:hover .news-card-image-container img {
    transform: scale(1.05);
}

.news-card-item .news-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-card-item .news-card-tags {
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.news-card-item .tag {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 15px;
    background-color: #28282C;
    color: #909090;
}

.news-card-item .news-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #e8e8e8;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.news-card-item .news-card-excerpt {
    font-size: 0.9rem;
    color: #a0a0a5;
    line-height: 1.6;
    margin-bottom: 15px;
    flex-grow: 1;
}

.news-card-item .news-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #2a2a2e;
}

.news-card-item .news-card-date {
    font-size: 0.8rem;
    color: #777;
}

.news-card-item .read-more-link {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-color-2);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Vista de Detalle de Noticia */
.news-detail-view {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

.news-detail-header {
    text-align: center;
    margin-bottom: 30px;
}

.news-detail-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: #f0f0f0;
    line-height: 1.2;
    margin-bottom: 15px;
}

.news-detail-meta {
    font-size: 0.9rem;
    color: #888;
}

.news-detail-meta span {
    margin: 0 10px;
}

.news-detail-image {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 30px;
}

.news-detail-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #c0c0c0;
}

.news-detail-body h2, .news-detail-body h3 {
    color: #e8e8e8;
    margin-top: 30px;
    margin-bottom: 15px;
}

.news-detail-body p, .news-detail-body ul, .news-detail-body ol {
    margin-bottom: 20px;
}

.back-to-news-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    color: #a0a0a5;
    font-weight: 500;
}

/* Indicador de Carga */
.loader-container {
    display: flex;
    justify-content: center;
    padding: 40px 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loader-container.visible {
    opacity: 1;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-left-color: var(--accent-color-1);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
