/* --- VARIABLES DE COLORES Y ESTILO --- */
:root {
    --primary: #007bff;     /* Azul moderno */
    --secondary: #00bb2d;   /* Rojo llamativo */
    --bg: #f8f9fa;          /* Gris muy claro */
    --text: #333;
    --white: #ffffff;
    --shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* --- RESET GENERAL --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- CABECERA (HEADER) --- */
header {
    background: var(--white);
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
}

.logo span { color: var(--secondary); }

nav ul { display: flex; list-style: none; }
nav ul li { margin-left: 20px; }
nav ul li a { 
    text-decoration: none; 
    color: var(--text); 
    font-weight: 600;
    transition: 0.3s;
}
nav ul li a:hover { color: var(--primary); }

/* --- PUBLICIDAD (ESTILOS ACTUALIZADOS) --- */
.ad-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    transition: opacity 0.3s;
}

.ad-image:hover { opacity: 0.9; }

.ads-top { 
    margin: 20px auto; 
    text-align: center;
}

.ad-sidebar {
    position: sticky; /* La publicidad lateral te sigue al bajar */
    top: 100px;
}

/* --- LAYOUT PRINCIPAL --- */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin-top: 20px;
}

/* --- GRID DE NOTAS (INDEX) --- */
.grid-notas {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--shadow);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.card-body { padding: 20px; }
.card-body h3 { margin-bottom: 10px; font-size: 1.25rem; }
.card-body p { color: #666; font-size: 0.9rem; margin-bottom: 15px; }

.btn-leer {
    display: inline-block;
    padding: 10px 18px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
}

/* --- NOTA INDIVIDUAL --- */
.single-post {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.category-tag {
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 4px;
}

.post-header h1 { font-size: 2.4rem; margin: 15px 0; line-height: 1.2; }
.post-meta { color: #888; font-size: 0.9rem; margin-bottom: 30px; }

.featured-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 30px;
}

.post-content p { font-size: 1.1rem; margin-bottom: 20px; color: #444; }

/* --- SECCIÓN AUTOR (ACTUALIZADO) --- */
.post-footer-info {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.author-box {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
}

.author-avatar {
    width: 80px; 
    height: 80px;
    object-fit: cover; /* Mantiene proporciones */
    object-position: center;
    border-radius: 50%; /* Círculo perfecto */
    border: 3px solid var(--white);
    flex-shrink: 0;
}

.author-name { font-weight: bold; font-size: 1.2rem; }
.source { font-size: 0.9rem; color: #666; margin-top: 5px; }
.source a { color: var(--secondary); text-decoration: none; font-weight: bold; }

/* --- PIE DE PÁGINA --- */
footer {
    background: #222;
    color: white;
    padding: 40px 0;
    margin-top: 50px;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.share-btn {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
}

/* --- RESPONSIVO --- */
@media (max-width: 992px) {
    .main-layout { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .post-header h1 { font-size: 1.8rem; }

/* Etiqueta de publicidad sutil */
.ad-label {
    display: block;
    font-size: 10px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
    text-align: center;
    width: 100%;
}

/* Ajuste adicional para los contenedores de anuncios */
.ads-top, .ad-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Para que el banner lateral no se pegue al texto de "Publicidad" */
.ad-sidebar .ad-image {
    margin-top: 2px;
}
}

