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

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
    font-size: 16px;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 100px; /* más espacio para header de dos líneas */
}

/* Contenedor general limitado */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    box-sizing: border-box;
}

/* Header negro fijo, DOS LÍNEAS */
header {
    background: #000;
    color: #fff;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    padding: 0.8rem 0; /* padding vertical para las dos líneas */
}

/* Contenedor interno del header - ANCHO COMPLETO */
.header-container {
    width: 100%; /* ancho completo, no limitado a 1000px */
    padding: 0 2rem; /* padding desde los extremos de pantalla */
    box-sizing: border-box;
}

/* PRIMERA LÍNEA: Solo el nombre */
.header-top {
    display: flex;
    justify-content: flex-start; /* solo alineado a la izquierda */
    align-items: center;
    margin-bottom: 0.1rem; /* separación mínima */
}

/* Estilo del título */
.header-top h1 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
    color: #fff;
    line-height: 1.2;
}

/* SEGUNDA LÍNEA: Subtítulo y navegación */
.header-subtitle {
    display: flex;
    justify-content: space-between; /* subtítulo izq, nav der */
    align-items: center;
    width: 100%;
}

.header-subtitle .subtitle {
    font-size: 0.95rem;
    font-weight: 400;
    color: #ccc;
    margin: 0;
    line-height: 1.2;
}

/* NAVEGACIÓN movida a la segunda línea */
.header-nav {
    display: flex;
    gap: 0;
    align-items: center;
}

.header-nav a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 4px;
    margin-left: 0.2rem;
}

.header-nav a:hover {
    background: #fff;
    color: #000;
}

/* Para compatibility con el HTML existente */
.main-nav {
    margin: 0;
}

.main-nav ul {
    display: flex;
    flex-wrap: nowrap;
    list-style: none;
    border-bottom: none;
    padding: 0;
    margin: 0;
}

.main-nav li {
    margin: 0 0 0 1.5rem;
}

.main-nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    padding: 0.3rem 0;
    transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: #1a73e8;
    border-bottom: 2px solid #1a73e8;
}

/* SECCIONES DE CONTENIDO */
.section {
    margin-bottom: 2.5rem;
}

.section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #222;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eaeaea;
}

/* MODIFICACIÓN PRINCIPAL: Layout para items con imagen */
.item {
    margin-bottom: 1.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.item:last-child {
    border-bottom: none;
}

.year {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
    display: block;
    margin-bottom: 0.3rem;
}

/* Contenedor para imagen y texto */
.content-wrapper {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

/* Imagen de portada */
.book-cover {
    width: auto;
    height: 140px; /* duplicado: altura fija para cubrir aprox 6 líneas */
    object-fit: cover;
    border-radius: 3px;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Contenedor del texto */
.text-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.title {
    font-weight: 600;
    color: #222;
    font-size: 1.1rem;
    line-height: 1.3;
}

.description {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.4;
}

.publisher {
    color: #666;
}

.isbn {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #888;
    line-height: 1.3;
}

.highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.highlight-item {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
}

.highlight-item h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #222;
}

.highlight-item ul {
    list-style: none;
    margin-bottom: 1.5rem;
}

.highlight-item li {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.highlight-item li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #000;
}

.btn {
    display: inline-block;
    background: #000;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s ease;
}

.btn:hover {
    background: #333;
    text-decoration: none;
}

/* Links generales (fuera del header) */
a {
    color: #000;
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.contact {
    margin-top: 2rem; /* reducido de 3rem */
    padding-top: 1rem; /* reducido de 1.5rem */
    border-top: 1px solid #eaeaea;
    text-align: center;
}

.contact a {
    margin: 0 0.8rem;
    font-weight: 500;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 1rem; /* reducido de 3rem */
    padding-top: 1rem; /* reducido de 1.5rem */
    border-top: 1px solid #eaeaea;
    color: #666;
    font-size: 0.9rem;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

footer p {
    text-align: center;
    margin: 0;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    body {
        padding-top: 110px; /* ajuste para header más compacto */
    }
    
    .container {
        padding: 1.5rem;
    }
    
    /* Header responsive - mantener ancho completo */
    .header-container {
        padding: 0 1rem; /* menos padding en móvil */
    }
    
    .header-top h1 {
        font-size: 1.1rem;
    }
    
    .header-top .subtitle {
        font-size: 0.85rem;
    }
    
    .header-nav {
        flex-wrap: wrap;
        gap: 0.2rem;
    }
    
    .header-nav a {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
    
    .section h2 {
        font-size: 1.3rem;
    }
    
    .highlights {
        grid-template-columns: 1fr;
    }
    
    .contact a {
        display: block;
        margin: 0.5rem 0;
    }

    /* Responsive para las portadas */
    .content-wrapper {
        gap: 0.8rem;
    }

    .book-cover {
        height: 120px; /* duplicado en móvil también */
    }
}