/* ========================================
   RESET Y CONFIGURACIÓN BASE
   ======================================== */

/* Reset universal: elimina márgenes y padding por defecto
   box-sizing: border-box hace que padding y border se incluyan en el ancho total */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Configuración base del body con system fonts para mejor rendimiento */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6; /* Mejora la legibilidad */
    color: #1a1a1a;
    background-color: #693434; /* Gris muy claro para reducir fatiga visual */
    font-size: 16px; /* Tamaño base accesible */
}


img {   
    .article-card .about-widget image-rendering: .about-widget
}
/* ========================================
   HEADER Y NAVEGACIÓN
   ======================================== */
.header {
    background-color: #a0a8d8;
    border-bottom: 1px solid #9bd3a7;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-brand h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #000;
    letter-spacing: -0.02em;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: color 0.2s ease;
    font-size: 0.95rem;
}

.nav-menu a:hover {
    color: #000;
}

/* Contenido Principal */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Sección Hero */
.hero-section {
    padding: 3rem 0;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 3rem;
}

.featured-article {
    max-width: 800px;
}

.featured-article h2 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #000;
    letter-spacing: -0.03em;
}

.article-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.article-excerpt {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.read-more {
    color: #000;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: opacity 0.2s ease;
}

.read-more:hover {
    opacity: 0.7;
}

/* ========================================
   GRID DE CONTENIDO PRINCIPAL
   ======================================== */

/* Layout principal usando CSS Grid: contenido principal + sidebar */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 300px; /* Contenido flexible + sidebar fijo */
    gap: 4rem; /* Espacio entre columnas */
    margin-bottom: 4rem;
}

/* ========================================
   GRID DE ARTÍCULOS
   ======================================== */

/* Grid responsivo para artículos usando auto-fit y minmax */
.main-articles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Columnas que se adaptan automáticamente */
    gap: 2rem;
    grid-auto-rows: min-content; /* Filas se ajustan al contenido */
}

.article-card {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.2s ease;
    height: fit-content;
}

.article-card:hover {
    border-color: #d0d0d0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.article-card.large {
    grid-column: span 2;
    padding: 2rem;
}

.article-card.medium {
    grid-column: span 1;
}

.article-card.small {
    grid-column: span 1;
    padding: 1.25rem;
}

.article-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #000;
    line-height: 1.3;
}

.article-card.large h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.article-card.small h3 {
    font-size: 1.1rem;
}

.article-card p {
    color: #555;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.article-card .article-meta {
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

/* ========================================
   SIDEBAR
   ======================================== */

/* Sidebar usando Flexbox para layout vertical */
.sidebar {
    display: flex;
    flex-direction: column; /* Elementos apilados verticalmente */
    gap: 2rem; /* Espacio uniforme entre secciones */
}

.sidebar section {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 1.5rem;
}

.sidebar h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #000;
}

.about-widget {
    text-align: center;
}

.author-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
    border-radius: 50%;
    margin: 0 auto 1rem;
    border: 3px solid #f5f5f5;
}

.about-widget p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

.categories-widget ul {
    list-style: none;
}

.categories-widget li {
    margin-bottom: 0.5rem;
}

.categories-widget a {
    color: #555;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    transition: color 0.2s ease;
}

.categories-widget a:hover {
    color: #000;
}

.categories-widget span {
    color: #999;
    font-size: 0.8rem;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.newsletter-form input {
    padding: 0.75rem;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 0.9rem;
    background: #fafafa;
}

.newsletter-form input:focus {
    outline: none;
    border-color: #999;
    background: #ffffff;
}

.newsletter-form button {
    padding: 0.75rem;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.newsletter-form button:hover {
    background: #333;
}

.newsletter-widget p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.recent-posts ul {
    list-style: none;
}

.recent-posts li {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
}

.recent-posts li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.recent-posts a {
    color: #555;
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.recent-posts a:hover {
    color: #000;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    background: #f5f5f5;
    border-top: 1px solid #e5e5e5;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #000;
}

.footer-section p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-section a:hover {
    color: #000;
}

.footer-bottom {
    border-top: 1px solid #e0e0e0;
    padding: 1.5rem 2rem;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-bottom p {
    color: #999;
    font-size: 0.85rem;
}

/* ========================================
   DISEÑO RESPONSIVO
   ======================================== */

/* Media query para tablets y móviles */
@media (max-width: 768px) {
    .nav {
        padding: 0 1rem;
        flex-direction: column;
        height: auto;
        padding: 1rem;
    }
    
    .nav-menu {
        margin-top: 1rem;
        gap: 1rem;
    }
    
    .main-content {
        padding: 0 1rem;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .main-articles {
        grid-template-columns: 1fr;
    }
    
    .article-card.large,
    .article-card.medium,
    .article-card.small {
        grid-column: span 1;
    }
    
    .featured-article h2 {
        font-size: 2rem;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
    
    .footer-content {
        padding: 2rem 1rem 1rem;
        grid-template-columns: 1fr;
    }
}

/* ========================================
   ETIQUETAS DE ARTÍCULOS
   ======================================== */

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    background: #f3f4f6;
    color: #374151;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tag:hover {
    background: #e5e7eb;
    color: #1f2937;
}

/* Media query para móviles pequeños */
@media (max-width: 480px) {
    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .featured-article h2 {
        font-size: 1.75rem;
    }
    
    .article-card {
        padding: 1rem;
    }
    
    .sidebar section {
        padding: 1rem;
    }
}