/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Estilos generales */
body {
    font-family: 'Arial', sans-serif;
    color: #fff;
    background-color: #1c1c1c;
    line-height: 1.6;
    user-select: none;
    --sb-track-color: #232E33;
    --sb-thumb-color: #f0c040;
    --sb-size: 15px;
}

body::-webkit-scrollbar {
    width: var(--sb-size);
}

body::-webkit-scrollbar-track {
    background: var(--sb-track-color);
    border-radius: 12px;
}

body::-webkit-scrollbar-thumb {
    background: var(--sb-thumb-color);
    border-radius: 12px;
    border: 1px solid #232E33;
}

@supports not selector(::-webkit-scrollbar) {
    body {
        scrollbar-color: var(--sb-thumb-color) var(--sb-track-color);
    }
}

/* Encabezado */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 50px;
    background-color: #333;
}

header .logo-container {
    display: flex;
    align-items: center;
}

header .logo {
    margin-right: 15px; /* Espacio entre el logo y el título */
}

header .logo img {
    width: 50px;
}

header .title h1 {
    font-size: 1.5em; /* Ajusta el tamaño del texto según sea necesario */
    color: #fff; /* Color del texto para que contraste con el fondo */
    margin: 0; /* Elimina el margen por defecto */
}

header .title h1 a {
    text-decoration: none;
    color: #fff;
}

header .title h1 a:hover {
    color: #f0c040;
}

/* Nav */
header nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

header nav a {
    text-decoration: none;
    color: #fff;
    font-weight: bold;
    transition: color 0.3s ease;
}

header nav a:hover {
    color: #f0c040;
}

/* Sección de Historias */
#historias {
    padding: 50px 20px;
    text-align: center;
}

#historias h2 {
    margin-bottom: 20px;
    font-size: 2em;
}

/* Contenedor de la galería */
.gallery-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem; /* Espacio entre los elementos de la galería */
    justify-content: space-between;
    padding: 1rem;
}

/* Elemento individual de la galería */
.gallery-item {
    flex: 1 1 calc(33% - 1rem); /* Ajusta el ancho de cada ítem para que se ajusten en filas */
    box-sizing: border-box;
    border-radius: 5px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem; /* Espacio inferior para separar filas */
}

.book-cover{
    transform-style: preserve-3d;
    transform: rotateY(0deg);
    transition: transform 1s;
}
/* Imagen de la portada del libro */
.book-cover img {
    height: auto;
    object-fit: cover;
}

.gallery-item:hover .book-cover {
    transform: rotateY(-20deg);
}

/* Información del libro */
.book-info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

/* Estilo del párrafo dentro de book-info */
.book-info p {
    margin-top: 30px;
    font-size: 20px; /* Ajusta el tamaño de la fuente aquí */
    line-height: 1.2; /* Puedes ajustar el interlineado si es necesario */
    color: #ffffff;
    text-decoration: wavy;
    text-align: justify;
}

.book-info p strong {
    color:rgb(255, 185, 32);
    text-align: center;
}

.book-info h3{
    color: #f0c040;
    font-size: 40px;
}

/* Botón de Leer Más */
.btn {
    padding: 10px 20px;
    color: #f0c040;
    text-decoration: none;
    font-weight: bold;
    margin: 20px;
    transition: background-color 0.3s ease;
}

/* Flecha hacia arriba */
#back-to-top {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    background-color: #f0c040; 
    color: rgb(0, 0, 0); 
    border-radius: 50%;
    text-align: center;
    line-height: 2rem;
    width: 2rem;
    height: 2rem;
}

#back-to-top a {
    text-decoration: none;
    color: #000000; 
}

#back-to-top:hover {
    background-color: #555; 
    transform: scale(1.1);
}

#back-to-top:hover a {
    color: #fff; 
}

/* Footer */
footer {
    background-color: #504f4f;
    padding: 20px;
    text-align: center;
}

footer p {
    margin-bottom: 10px;
}

footer .social {
    margin-top: 0.5rem;
}

footer .social a {
    margin: 0 0.5rem;
    display: inline-block;
}

footer .social img {
    width: 30px;
    transition: transform 0.3s ease;
}

footer .social img:hover {
    transform: scale(1.2);
}
