/* ============================================
   ESTILOS PARA ARTÍCULOS DE NOTICIAS
   ============================================ */

/* Variables de color */
:root {
    --primary-color: #2c5aa0;
    --secondary-color: #e74c3c;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --border-color: #ecf0f1;
    --bg-light: #f8f9fa;
    --link-hover: #1a3a6b;
}

/* Contenedor general */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ============================================
   PÁGINA DE ARTÍCULO INDIVIDUAL
   ============================================ */

.template-article .container {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    padding: 3rem 2.5rem;
    margin-top: 2rem;
}

.template-article h1 {
    color: var(--text-dark);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 0.5rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.template-article p small {
    color: var(--text-light);
    font-size: 0.95rem;
    display: block;
    margin-bottom: 1.5rem;
}

.article-hero-image {
    margin-bottom: 1.5rem;
}

.article-hero-image img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    height: auto;
    border-radius: 8px;
    display: block;
}

.article-meta small {
    display: block;
    color: var(--text-light);
}

.template-article p strong {
    font-size: 1.2rem;
    color: var(--text-dark);
    line-height: 1.6;
    display: block;
    margin-bottom: 1.5rem;
    font-style: italic;
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    background: var(--bg-light);
    padding: 1rem 1rem 1rem 1.5rem;
    border-radius: 4px;
}

.template-article .body {
    line-height: 1.8;
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-top: 2rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

.template-article .body a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid var(--primary-color);
    transition: color 0.3s ease;
}

.template-article .body a:hover {
    color: var(--link-hover);
    border-bottom-color: var(--link-hover);
}

.template-article > div > p:last-child {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.template-article > div > p:last-child a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.template-article > div > p:last-child a:hover {
    color: var(--link-hover);
    padding-left: 0.5rem;
}

/* ============================================
   PÁGINA ÍNDICE DE ARTÍCULOS
   ============================================ */

.template-article-index h1 {
    color: var(--text-dark);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.template-article-index .intro {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 6px;
}

.template-article-index hr {
    border: none;
    border-top: 2px solid var(--border-color);
    margin: 2rem 0;
}

.template-article-index ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.template-article-index .feed-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 1.25rem;
}

.template-article-index .feed-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.template-article-index .feed-item h3 {
    font-size: 1.4rem;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.template-article-index .feed-item-thumb {
    flex: 0 0 160px;
    border-radius: 6px;
    overflow: hidden;
}

.template-article-index .feed-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.template-article-index .feed-item h3 a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.template-article-index .feed-item h3 a:hover {
    color: var(--primary-color);
}

/* Etiqueta para artículos externos */
.template-article-index .feed-item-external h3 a::after {
    content: " ↗";
    font-size: 0.8em;
    color: var(--secondary-color);
    margin-left: 0.3rem;
}

.template-article-index .feed-item p small {
    color: var(--text-light);
    font-size: 0.9rem;
}

.template-article-index .feed-item > p:last-of-type {
    margin: 1rem 0 0 0;
    color: #555;
    line-height: 1.6;
}

/* Paginación */
.template-article-index .pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 8px;
}

.template-article-index .pagination a {
    color: white;
    background: var(--primary-color);
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s ease;
}

.template-article-index .pagination a:hover {
    background: var(--link-hover);
}

.template-article-index .pagination span {
    color: var(--text-light);
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .template-article .container {
        padding: 2rem 1.5rem;
    }
    
    .template-article h1,
    .template-article-index h1 {
        font-size: 1.8rem;
    }
    
    .template-article .body {
        font-size: 1rem;
    }
    
    .template-article-index .feed-item {
        padding: 1rem;
        flex-direction: column;
    }
    
    .template-article-index .pagination {
        flex-direction: column;
        gap: 1rem;
    }
}
