@import url('https://fonts.googleapis.com/css?family=Roboto:300,400,400i,500');

/* ===== RESETEO GENERAL ===== */
* {
    padding: 0;
    margin: 0;
    list-style: none;
    text-decoration: none;
    box-sizing: border-box;
}

/* ===== TIPOGRAFÍA Y COLORES ===== */
body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(to bottom, #fe042a, #36052c);
    background-attachment: fixed;
    color: #fff;
}

/* ===== MEDIA QUERIES ===== */
@media (max-width: 1400px) { html { font-size: 25px; } }
@media (max-width: 768px) { html { font-size: 18px; } }
@media (max-width: 450px) { html { font-size: 14px; } }

/* ===== SIDEBAR (MENÚ) ===== */
.sidebar {
    position: fixed;
    left: -250px;
    width: 250px;
    height: 100%;
    background: #36052c;
    transition: all .5s ease;
    z-index: 999;
}
.sidebar header {
    font-size: 28px;
    color: #36052c;
    font-weight: bold;
    line-height: 70px;
    text-align: center;
    background: #fe042a;
    user-select: none;
}
.sidebar ul a {
    display: block;
    width: 100%;
    line-height: 65px;
    font-size: 20px;
    color: #fff;
    padding-left: 40px;
    border-bottom: 1px solid black;
    border-top: 1px solid rgba(255,255,255,.1);
    transition: padding-left .3s ease;
}
.sidebar ul a:hover {
    padding-left: 50px;
    background: rgba(255,255,255,0.05);
}
.sidebar ul a i {
    margin-right: 16px;
}

/* ===== BOTONES DE MENÚ ===== */
#check { display: none; }
label #btn, label #cancel {
    position: fixed;
    background: #36052c;
    border-radius: 3px;
    cursor: pointer;
    z-index: 1000;
}
label #btn {
    left: 20px;
    top: 20px;
    font-size: 28px;
    color: #fe042a;
    padding: 8px 12px;
    transition: all .5s;
}
label #cancel {
    left: -195px;
    top: 20px;
    font-size: 28px;
    color: #fe042a;
    padding: 8px 12px;
    transition: all .5s ease;
}
#check:checked ~ .sidebar { left: 0; }
#check:checked ~ label #btn {
    left: 250px;
    opacity: 0;
    pointer-events: none;
}
#check:checked ~ label #cancel { left: 210px; }
#check:checked ~ main { margin-left: 250px; }

/* ===== SECCIONES GENERALES ===== */
main section {
    padding: 20px;
    transition: all .5s;
    border-top: 3px solid rgba(102,102,102,0.8);
}
.container_box {
    border: 8px solid #36052c;
    border-radius: 17px;
    font-size: 20px;
    margin: 40px 20px;
    padding: 15px;
    background: rgba(0,0,0,0.2);
}

/* ===== TÍTULOS ===== */
h2 {
    color: #36052c;
    background-color: #fff;
    border: 5px solid #36052c;
    border-radius: 17px;
    font-size: 28px;
    margin: 10px auto;
    padding: 8px;
    text-align: center;
    font-weight: bold;
}
h3 {
    color: #fe042a;
    background-color: #fff;
    border: 5px solid #36052c;
    border-radius: 17px;
    font-size: 20px;
    margin: 5px auto;
    padding: 5px;
    text-align: center;
    font-weight: bold;
}

/* ===== LISTAS DE LIBROS ===== */
.columns {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px;
    background: #ffffffaf;
    border-radius: 8px;
}
.columns a {
    flex: 1 1 calc(33% - 10px);
    background: transparent;
    color: #000;
    padding: 5px;
    border-radius: 5px;
    transition: background .3s;
}
.columns a:hover {
    background: rgba(254,4,42,0.2);
}
@media (max-width: 768px) {
    .columns a { flex: 1 1 calc(50% - 10px); }
}
@media (max-width: 450px) {
    .columns a { flex: 1 1 100%; }
}

/* ===== BLOQUES DESTACADOS ===== */
/* Contenedor de portadas en fila */
.fila {
  display: flex;
  flex-wrap: wrap;     /* permite que bajen si no caben */
  justify-content: center;
  gap: 20px;           /* espacio entre portadas */
  margin: 25px 0;
}

/* Cada columna (libro individual) */
.columna {
  flex: 1 1 200px;     /* ancho flexible, mínimo 200px */
  max-width: 250px;    /* límite para que no sean gigantes */
  text-align: center;
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: transform .3s;
}

.columna:hover {
  transform: translateY(-5px);
}

/* Imagen del libro */
.columna img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  aspect-ratio: 2/3;
}



/* ===== FOOTER ===== */
footer {
    text-align: center;
    padding: 15px;
    font-size: 14px;
    background: #36052c;
    color: #fff;
}
