/* 1. RESET GENERAL */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: #e2d1b3;
    font-family: 'Lora', serif;
    color: #222;
    line-height: 1.8;
}

/* 2. CABECERA (EL LOGO) */
.cabecera-arte {
    width: 100%;
    height: 420px;
    background: url('logo.jpg') center/cover no-repeat;
    position: relative;
    border-bottom: 4px solid #b8860b;
    display: flex;
    flex-direction: column;
    align-items: center; /* Centra el H1 horizontalmente */
}

/* 3. MENÚ: MINI, A LA DERECHA Y LIMPIO */
.menu-pequeno {
    position: relative !important;
    top: 20px !important;
    right: 30px !important;
    left: auto !important;
}

.menu-pequeno ul {
    display: flex !important;
    list-style: none !important;
    gap: 15px !important;
}

.menu-pequeno a {
    color: white !important;
    background: none !important;
    border: none !important;
    text-decoration: none !important;
    font-weight: bold !important;
    font-family: 'Times New Roman', serif !important;
    font-size: 13px !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,1) !important;
}

/* 4. TÍTULO: BLANCO NUCLEAR Y CENTRADO */
.titulo-principal {
    color: #ffffff !important; /* Blanco total */
    font-family: 'Times New Roman', serif !important;
    font-size: 45px !important;
    text-align: center !important;
    text-transform: uppercase !important;
    text-shadow: 3px 3px 12px rgba(0,0,0,0.9) !important;
    width: 100% !important;
    margin: 0 !important;
    padding-top: 110px !important; /* Lo baja al sitio justo */
    display: block !important;
}

/* 5. CONTENIDO: FOTO Y TEXTO CENTRADOS */
.contenedor-biografia, main {
    max-width: 850px !important;
    margin: 0 auto !important;
    padding: 60px 20px !important;
    text-align: center !important;
    display: block !important;
    float: none !important;
}

/* Forzamos que la foto no flote y se centre */
.foto-julio-central, img[src*="PAGINA"], img[src*="PRUEBA"] {
    width: 280px !important;
    height: auto !important;
    border-radius: 15px !important;
    margin: 0 auto 30px auto !important;
    display: block !important;
    float: none !important; /* Matamos el float aquí también */
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
}

/* Texto centrado */
.texto-presentacion p, p {
    font-size: 19px !important;
    margin-bottom: 25px !important;
    text-align: center !important;
    line-height: 1.8 !important;
}

/* 6. RESPONSIVE MÓVIL */
@media (max-width: 768px) {
    .cabecera-arte { height: 280px !important; }
    
    .menu-pequeno {
        right: 0 !important;
        left: 0 !important;
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        top: 10px !important;
    }

    .titulo-principal {
        font-size: 24px !important;
        padding-top: 80px !important;
    }

    .foto-julio-central, img[src*="PAGINA"] {
        width: 75% !important;
    }
}

/* --- ARREGLO PARA RUTI 2, 3, 4 y 5 (NAV DE LOS HUEVOS) --- */

/* Forzamos a que cualquier nav o lista de menú se ponga a la derecha y en fila */
nav, .menu, header ul {
    position: absolute !important;
    top: 25px !important;
    right: 30px !important;
    left: auto !important;
    display: flex !important;
    list-style: none !important; /* Quita los puntos negros */
    padding: 0 !important;
    margin: 0 !important;
    z-index: 1000 !important;
}

/* Forzamos a que los elementos de la lista no tengan puntos y estén en fila */
nav li, .menu li, header li {
    list-style-type: none !important;
    margin-left: 20px !important;
    display: inline-block !important;
}

/* Ponemos los enlaces blancos, pequeños y con sombra como en el Inicio */
nav a, .menu a, header ul a {
    color: white !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: bold !important;
    font-family: 'Times New Roman', serif !important;
    text-transform: uppercase !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,1) !important;
}

/* Arreglamos el título de esas páginas que ahora sale negro y mal puesto */
header h1, .titulo-ruti {
    color: white !important;
    text-align: center !important;
    width: 100% !important;
    padding-top: 100px !important;
    font-size: 35px !important;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.8) !important;
    display: block !important;
}

/* En móvil, que no se amontone */
@media (max-width: 768px) {
    nav, .menu, header ul {
        position: absolute !important;
        top: 10px !important;
        right: 0 !important;
        left: 0 !important;
        width: 100% !important;
        justify-content: center !important;
    }
    
    header h1 {
        font-size: 20px !important;
        padding-top: 70px !important;
    }
}

/* EL BLOQUE BLANCO DEFINITIVO (SIN CAPAS RARAS) */
footer, .pie-pagina {
    width: 100% !important;
    padding: 80px 0 !important;
    display: flex !important;
    justify-content: center !important;
    background-color: transparent !important; /* QUITAMOS EL BLANCO DE AQUÍ */
    clear: both !important;
}

footer p, .pie-pagina p, .copyright p {
    background-color: #ffffff !important; /* EL BLANCO SOLO AQUÍ */
    color: #000000 !important;
    padding: 20px 50px !important; 
    border-radius: 12px !important; /* Esquinas más suaves */
    box-shadow: 0 8px 25px rgba(0,0,0,0.12) !important;
    display: inline-block !important;
    font-size: 17px !important;
    border: 1px solid #eee !important;
    margin: 0 !important;
    font-family: Arial, sans-serif !important;
}

footer strong, .pie-pagina strong {
    color: #000000 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}

/* --- DISEÑO DE TARJETAS DE LIBROS (VUELVEN LAS TARJETAS) --- */
.grid-libros {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px; 
    max-width: 1200px; 
    margin: 40px auto; 
    padding: 0 20px;
}

.libro-card {
    background: white !important; /* El fondo blanco para que resalten */
    border-radius: 15px; 
    padding: 25px; 
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1); 
    border: 1px solid #d4c1a1;
    display: flex; 
    flex-direction: column; 
    align-items: center;
}

.portada-libro { 
    width: 100%; 
    max-width: 190px; 
    height: 270px; 
    object-fit: cover; 
    border-radius: 5px; 
    margin-bottom: 20px; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.2); 
}

.btn-comprar {
    background: #003366 !important; 
    color: white !important; 
    text-decoration: none; 
    padding: 12px 25px;
    border-radius: 5px; 
    font-weight: bold; 
    text-transform: uppercase; 
    font-family: sans-serif;
    display: inline-block;
}

/* EL FAMOSO BLOQUE BLANCO DEL FOOTER */
.pie-pagina {
    width: 100% !important;
    padding: 80px 0 !important;
    display: flex !important;
    justify-content: center !important;
    background-color: transparent !important;
}

.pie-pagina p {
    background-color: #ffffff !important;
    color: #000000 !important;
    padding: 20px 50px !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
    display: inline-block !important;
    border: 1px solid #eee !important;
}