/* Variables y Reset Básico */
:root {
    --color-fondo: #fcfcfc;
    --color-fondo-alt: #f3f0eb; /* Tono papel antiguo/cálido */
    --color-texto: #333333;
    --color-texto-suave: #555555;
    --color-acento: #8c2a3e; /* Granate elegante basado en la portada de 'El argumento de la realidad' */
    --fuente-titulos: 'Playfair Display', serif;
    --fuente-texto: 'Lora', serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--fuente-texto);
    background-color: var(--color-fondo);
    color: var(--color-texto);
    line-height: 1.7;
    font-size: 1.05rem;
}

/* Tipografía */
h1, h2, h3, h4, .logo-text {
    font-family: var(--fuente-titulos);
    font-weight: 700;
    color: #1a1a1a;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 0.5rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: var(--color-acento);
}

a {
    color: var(--color-acento);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #b0354e;
    text-decoration: underline;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

.seccion {
    padding: 5rem 0;
}

.bg-claro {
    background-color: var(--color-fondo-alt);
}

/* Navegación */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(252, 252, 252, 0.95);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 1000;
    padding: 1rem 0;
}

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

.logo-text {
    font-size: 1.8rem;
    color: var(--color-acento);
    text-decoration: none;
    letter-spacing: 2px;
}

.logo-text:hover {
    text-decoration: none;
}

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

.nav-links a {
    color: var(--color-texto);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--fuente-titulos);
}

.nav-links a:hover {
    color: var(--color-acento);
    text-decoration: none;
}

/* Hero */
.hero {
    height: 30vh;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: var(--color-fondo-alt);
    margin-top: 60px; /* offset navbar */
    border-bottom: 1px solid #e0e0e0;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.hero .subtitle {
    font-size: 1.3rem;
    color: var(--color-texto-suave);
    font-style: italic;
}

/* Biografía */
.bio-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: center;
}

.bio-img img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    filter: grayscale(20%); /* Un toque elegante */
}

.bio-texto p {
    margin-bottom: 1.5rem;
}

/* Libros */
.libros-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.libro-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    text-align: center;
    transition: transform 0.3s ease;
}

.libro-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.libro-card img {
    max-width: 100%;
    height: 250px;
    object-fit: cover;
    margin-bottom: 1.5rem;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.1);
}

.libro-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.libro-meta {
    font-size: 0.9rem;
    color: var(--color-texto-suave);
    margin-bottom: 1rem;
}

.libro-card blockquote {
    font-size: 0.9rem;
    font-style: italic;
    border-top: 1px solid #eee;
    padding-top: 1rem;
    color: var(--color-texto-suave);
}

.otras-publicaciones {
    border-top: 1px solid #ddd;
    padding-top: 3rem;
}

.otras-publicaciones h3 {
    margin-bottom: 2rem;
}

.publicaciones-columnas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.publicaciones-columnas h4 {
    margin-bottom: 1rem;
    color: var(--color-acento);
}

.publicaciones-columnas ul {
    list-style-position: inside;
    color: var(--color-texto-suave);
}

.publicaciones-columnas li {
    margin-bottom: 0.5rem;
}

/* Textos (Escribo) */
.textos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.texto-bloque {
    background: #fff;
    padding: 3rem;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}

.texto-bloque h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.referencia-texto {
    font-size: 0.9rem;
    color: var(--color-texto-suave);
    margin-bottom: 2rem;
    font-style: italic;
}

.versos {
    white-space: pre-line;
    line-height: 2;
    font-style: italic;
}

.prosa p {
    margin-bottom: 1rem;
}

/* Prensa */
.prensa-list ul {
    list-style: none;
}

.prensa-list li {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #ddd;
}

.prensa-list li:last-child {
    border-bottom: none;
}

.prensa-list a {
    font-size: 1.2rem;
    font-family: var(--fuente-titulos);
}

/* Footer */
.footer {
    background-color: #1a1a1a;
    color: #fcfcfc;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
}

.footer-col h3 {
    color: #fcfcfc;
    margin-bottom: 1rem;
}

.footer-col p {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: #ccc;
}

.footer-col a:hover {
    color: #fff;
}

.footer-legal {
    border-top: 1px solid #333;
    padding-top: 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: #888;
}

.legal-links {
    margin-top: 0.5rem;
}

.legal-links a {
    color: #888;
    margin: 0 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* En versión simple móvil ocultamos el menú o se haría un burger menu */
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .bio-grid, .textos-grid, .publicaciones-columnas, .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-content {
        flex-direction: column;
    }
}


/* =========================================
   SECCIÓN DE EVENTOS
   ========================================= */
.mensaje-eventos {
    background-color: #fff;
    border-left: 4px solid var(--color-acento);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    font-style: italic;
    color: var(--color-texto-suave);
}

.eventos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.evento-card {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    position: relative;
    display: flex;
    flex-direction: column;
}

.evento-cancelado-card {
    opacity: 0.7;
    filter: grayscale(80%);
}

.cartel-cancelado {
    position: absolute;
    top: 20px;
    right: -35px;
    background-color: #d32f2f;
    color: #fff;
    font-weight: bold;
    padding: 5px 40px;
    transform: rotate(45deg);
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    letter-spacing: 2px;
}

.img-cartel {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
}

.evento-info {
    padding: 1.8rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.evento-info h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--color-acento);
}

.evento-fecha, .evento-lugar, .evento-direccion {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.evento-texto {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #eee;
    font-size: 0.9rem;
    color: var(--color-texto-suave);
    margin-bottom: 1.5rem;
}

.btn-mapa {
    display: inline-block;
    margin-top: auto; /* Empuja el botón al final de la tarjeta */
    padding: 0.6rem 1.2rem;
    background-color: var(--color-texto);
    color: #fff;
    text-align: center;
    border-radius: 4px;
    font-family: var(--fuente-titulos);
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.btn-mapa:hover {
    background-color: var(--color-acento);
    color: #fff;
    text-decoration: none;
}

/* =========================================
   SECCIÓN DE EVENTOS (Mejoras)
   ========================================= */

/* 1. Destacamos la fecha dándole aspecto de caja resaltada */
.evento-fecha {
    font-size: 1.15rem; /* Letra un poco más grande */
    color: var(--color-acento); 
    background-color: var(--color-fondo-alt); /* Fondo sutil */
    padding: 0.8rem 1.2rem;
    border-radius: 4px;
    border-left: 4px solid var(--color-acento);
    margin-bottom: 1.2rem;
    font-family: var(--fuente-titulos); /* Usamos la fuente de los títulos para darle elegancia */
}

.evento-fecha strong {
    color: var(--color-texto);
    font-family: var(--fuente-texto);
}

/* 2. Disposición horizontal EXCLUSIVA para cuando solo hay UN evento (en escritorio) */
@media (min-width: 768px) {
    .evento-card:only-child {
        grid-column: 1 / -1; /* Ocupa todo el ancho de la fila */
        flex-direction: row; /* Pone imagen a la izq y texto a la der */
        max-width: 850px;
        margin: 0 auto; /* Lo centra en la pantalla */
    }

    .evento-card:only-child .img-cartel {
        width: 40%; /* La imagen ocupa el 40% del espacio */
        height: auto;
        min-height: 100%;
        border-bottom: none;
        border-right: 1px solid #eee;
    }

    .evento-card:only-child .evento-info {
        width: 60%; /* El texto ocupa el 60% restante */
        padding: 2.5rem; /* Le damos un poco más de aire interior */
        justify-content: center;
    }
    
    /* Movemos la banda de CANCELADO a la izquierda para que no pise el texto en horizontal */
    .evento-card:only-child .cartel-cancelado {
        right: auto;
        left: -35px;
        transform: rotate(-45deg);
    }
}