/* ======== CONFIGURACIÓN GLOBAL DEL BLOG ÍNDICE ======== */
:root {
    --color-ia: #007bff;      /* Azul para IA */
    --color-excel: #1D6F42;   /* Verde para Excel */
    --color-fondo: #f8f9fa;
    --color-blanco: #ffffff;
    --color-texto: #212529;
    --color-texto-gris: #555;
    --fuente-principal: 'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --sombra-tarjeta: 0 4px 12px rgba(0,0,0,0.08);
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--fuente-principal);
    background-color: var(--color-fondo);
    color: var(--color-texto);
    line-height: 1.6;
    padding-top: 80px; /* ★ IMPORTANTE: Espacio para el menú fijo */
}

h1, h2 {
    font-weight: 900;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ======== BARRA DE NAVEGACIÓN (MENU) ======== */
.main-nav {
    background-color: rgba(15, 18, 26, 0.95);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo img {
    height: 40px; 
    width: auto;
    display: block;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #4CAF50;
}

.nav-btn-comprar {
    background-color: #1D6F42;
    padding: 8px 15px;
    border-radius: 4px;
}
.nav-btn-comprar:hover {
    background-color: #145230;
    color: #fff !important;
}

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
}

/* ======== CABECERA DEL BLOG ======== */
.blog-header {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-blanco);
    background-color: #222; 
}

.blog-header .header-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; 
    z-index: 1;
    filter: brightness(0.4); 
}

.blog-header .header-content {
    position: relative;
    z-index: 2;
    padding: 20px;
}

.blog-header h1 {
    font-size: 3.5rem;
    margin: 0;
    color: var(--color-blanco);
}

.blog-header p {
    font-size: 1.3rem;
    color: var(--color-blanco);
    opacity: 0.9;
}

/* ======== LISTA DE POSTS (GRID) ======== */
.post-list-container {
    max-width: 1100px;
    margin: 60px auto;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

/* ======== TARJETA DE POST INDIVIDUAL ======== */
.post-card {
    background-color: var(--color-blanco);
    border-radius: 8px;
    box-shadow: var(--sombra-tarjeta);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.post-card .card-image-link img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.post-card .card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-category {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.cat-ia { color: var(--color-ia); }
.cat-excel { color: var(--color-excel); }

.post-card h2 {
    font-size: 1.4rem;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.post-card h2 a {
    color: var(--color-texto);
    transition: color 0.2s;
}

.post-card h2 a:hover {
    opacity: 0.8;
}

.post-card p {
    font-size: 1rem;
    color: var(--color-texto-gris);
    flex-grow: 1; 
    margin-bottom: 20px;
}

.read-more-btn {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    align-self: flex-start;
}

.btn-ia { color: var(--color-ia); }
.btn-excel { color: var(--color-excel); }

.read-more-btn:hover {
    text-decoration: underline;
}

/* ======== FOOTER ======== */
footer {
    text-align: center;
    padding: 40px 20px;
    font-size: 0.9rem;
    color: #888;
    background-color: #eee;
    margin-top: 60px;
}
.disclaimer { font-size: 0.8rem; font-style: italic; }

/* ======== BANNER COOKIES ======== */
.cookie-banner-container {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    background-color: #222;
    color: #fff;
    padding: 20px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    z-index: 9999;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 20px;
    transition: bottom 0.5s ease-in-out;
}
.cookie-banner-container.show { bottom: 0; }
.cookie-content a { color: #4CAF50; }
.cookie-btn {
    background-color: #1D6F42;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
}

/* ======== RESPONSIVE ======== */
@media (max-width: 768px) {
    .hamburger { display: flex; }
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 70px;
        left: 0;
        background-color: #0f121a;
        padding: 20px 0;
        text-align: center;
        border-top: 1px solid #333;
    }
    .nav-links.active { display: flex; }
    .nav-links li { margin: 15px 0; }
    
    .blog-header { height: 300px; }
    .blog-header h1 { font-size: 2.5rem; }
    .cookie-banner-container { flex-direction: column; text-align: center; }
}