:root {
    --primary-color: #E60000;
    --bg-dark: #252525;
    --bg-header-footer: #1a1a1a;
    --text-light: #D2C195;
    --accent: #7B6E4A;
}

body {
    /* NOTA: Se aplica imagen de fondo solicitada */
    background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('imagenes/fondos/fondo.png');
    background-attachment: fixed;
    background-size: cover;
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: 'Raleway', sans-serif;
    margin: 0;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2 {
    font-family: 'Cinzel', serif;
    letter-spacing: 2px;
}

/* NAVBAR */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5%;
    background: var(--bg-header-footer);
    position: fixed;
    width: 100%; /* Cambiado de 90% a 100% */
    left: 0;
    top: 0;
    box-sizing: border-box; /* Vital para que el padding no desborde */
    height: 60px;
    z-index: 1000;
}

.logo-img { height: 50px; width: auto; object-fit: contain; }
.nav-links { display: flex; list-style: none; }
.nav-links li a { color: white; text-decoration: none; margin-left: 20px; transition: 0.3s; }
.nav-links li a:hover { color: var(--primary-color); }

/* NOTA: Estilo para el botón hamburguesa (oculto en escritorio) */
.menu-toggle {
    display: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* SLIDER */
.hero-slider {
    height: 100vh;
    display: flex;
    align-items: flex-end; 
    justify-content: space-between;
    background-size: contain; 
    background-repeat: no-repeat;
    background-position: center;
    transition: background-image 0.8s ease-in-out;
    position: relative;
    padding-bottom: 60px;
}

.slide-content {
    flex-grow: 1;
    z-index: 2;
    text-align: center;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 40px 20px;
}

.slide-content h2 { font-size: 3rem; color: var(--primary-color); }

.btn {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 30px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 3px;
}

.prev-btn, .next-btn {
    background: rgba(0,0,0,0.3);
    color: white;
    border: none;
    font-size: 2.5rem;
    padding: 40px 15px;
    cursor: pointer;
    align-self: center;
}

/* SECCION AUTOR */
.section-dark { padding: 100px 0 80px 1%; background: rgba(30, 30, 30, 0.85); }

.author-flex-layout {
    display: flex;
    align-items: stretch;
    gap: 20px;
    justify-content: space-between;
}

.author-text-container {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: 80px;
}

.author-image-container {
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.author-photo {
    width: 100%;
    max-width: 250px;
    height: auto;
    display: block;
    opacity: 0.90; 
    filter: grayscale(20%);
    transition: 0.5s ease;
}

.author-photo:hover {
    opacity: 1;
    filter: grayscale(0%);
}

.quote {
    font-family: 'Special Elite', cursive;
    font-size: 1.3rem;
    color: var(--accent);
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-color);
    padding-left: 15px;
}

/* OBRAS */
.section-gray { padding: 80px 10%; background: rgba(42, 42, 42, 0.85); }

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    justify-items: center;
}

.book-card {
    background: #1a1a1a;
    padding: 20px;
    border-bottom: 4px solid var(--primary-color);
    max-width: 200px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.book-card img.book-cover {
    width: 100%;
    height: 280px;      
    object-fit: cover;  
    border-radius: 3px;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}

/* SECCION HISTORIA */
.container-history {
    padding: 80px 10%;
    max-width: 1200px;
    margin: 0 auto;
}

.history-title {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 40px;
}

.history-content {
    display: flex;
    flex-direction: column; /* Coloca imágenes arriba y texto abajo, o viceversa */
    gap: 40px;
}

.history-images {
    display: flex;
    justify-content: center; 
    align-items: center;
    width: 100%;
    padding: 0;           /* Quitamos paddings extra que puedan achicar la imagen */
}

.history-img {
    width: 100%;          /* En móviles debe ocupar todo el ancho disponible */
    max-width: 400px;     /* Pero en PC no queremos que sea gigante */
    height: auto;         /* ¡IMPORTANTE! Esto mantiene la proporción y evita que se vea flaca */
    object-fit: cover;
    border-radius: 5px;
    border-left: 3px solid var(--primary-color);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
    display: block;
    margin: 0 auto;       /* La centra */
}

.history-text {
    font-size: 1.1rem;
    color: var(--text-light);
    text-align: justify;
}

.history-text p {
    margin-bottom: 20px;
}

/* Ajuste Responsivo para Historia */
@media (max-width: 768px) {
    /* ... otros estilos que ya tienes ... */

    .history-content {
        flex-direction: column; /* Imagen arriba, texto abajo */
        gap: 20px;
    }

    .history-img {
        width: 90%;       /* Un poco de margen a los lados en el cel */
        height: auto;     /* Refuerza que no se estire */
    }
    
    .history-text {
        text-align: left; /* En celular el 'justify' a veces deja huecos feos */
    }
}

/* EVENTOS */
.event-subsection { margin-bottom: 60px; }
.event-subsection h3 { font-family: 'Cinzel', serif; color: var(--accent); margin-bottom: 30px; border-bottom: 1px solid #444; padding-bottom: 10px; }

.events-grid-large { display: flex; justify-content: center; gap: 20px; }
.events-grid-large img { width: 100%; max-width: 800px; height: auto; border-radius: 5px; box-shadow: 0 10px 20px rgba(0,0,0,0.5); }

.events-grid-small { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; }
.events-grid-small img { width: 100%; height: auto; filter: sepia(30%); transition: 0.3s; }

.interview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.interview-card { background: #1a1a1a; display: flex; align-items: center; padding: 15px; border-radius: 5px; }
.interview-card img { width: 100px; height: auto; margin-right: 15px; border: 1px solid var(--accent); }

/* FOOTER */
footer { background-color: var(--bg-header-footer); padding: 20px 0; text-align: center; }
.social-links { display: flex; justify-content: center; gap: 30px; margin-bottom: 15px; }
.social-links a { color: white; font-size: 1.5rem; transition: 0.3s; }
.social-links a:hover { color: var(--primary-color); }

/* --- NOTA: AJUSTES RESPONSIVOS Y MENÚ HAMBURGUESA --- */
@media (max-width: 768px) {
    .navbar { width: 100%; padding: 10px 20px; box-sizing: border-box; }
    
    .menu-toggle { display: block; order: 2; }
    .logo { order: 1; }

    .nav-links {
        position: absolute;
        top: 60px;
        left: -100%;
        flex-direction: column;
        background: var(--bg-header-footer);
        width: 100%;
        text-align: center;
        transition: 0.5s;
        padding: 20px 0;
        box-shadow: 0 10px 10px rgba(0,0,0,0.5);
    }

    .nav-links.active { left: 0; }
    .nav-links li { margin: 15px 0; }
    .nav-links li a { margin-left: 0; font-size: 1.2rem; }

    .hero-slider { background-size: cover; }
    .slide-content h2 { font-size: 2rem; }
    
    .author-flex-layout { flex-direction: column; text-align: center; padding-left: 0; padding-right: 0; }
    .section-dark { padding: 80px 5%; }
    .author-image-container { justify-content: center; margin-top: 20px; }
    
    .events-grid-large { padding: 0 10px; }
    .interview-card { flex-direction: column; text-align: center; }
    .interview-card img { margin-right: 0; margin-bottom: 10px; }
}

/* Esto hará que TODOS los enlaces de la página sean rojos por defecto */
a {
    color: var(--primary-color); /* Usa el rojo que ya definiste en tus variables */
    text-decoration: none;       /* Quita el subrayado si lo deseas */
    transition: 0.3s;
}

/* Color cuando pasas el mouse por encima (opcional) */
a:hover {
    color: white; 
}

/* Específicamente para los enlaces dentro de las tarjetas de libros */
.book-card a {
    color: var(--primary-color);
    font-weight: bold;
}