body {
  background: #b7caf8;
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h2 {
    border: 2px dashed #b7caf8;
    background: #b7caf8;
    font-size: 2em;
    text-transform: capitalize;
    white-space: normal; /* Permite que el texto se ajuste automáticamente */
    word-wrap: break-word; /* Divide palabras largas */
    overflow-wrap: break-word; /* Compatibilidad adicional */
    margin: 10px auto; /* Centra el margen */
    text-align: center; /* Centra el texto */
    border-radius: 40px; /* Añade bordes redondeados */
    padding: 0.5em 2em;  /* Espacio interno para mejorar el efecto */
}

h2 a {
    background: #638be7;
    font-size: 0.8em;
    text-decoration: none; /* quita subrayado */
    color: inherit; /* usa el color heredado del h2 */
    display: inline-block; /* se adapta al padding */
    margin: 10px auto; /* Centra el margen */
    text-align: center; /* Centra el texto */
    border-radius: 40px; /* Añade bordes redondeados */
    padding: 0.5em 2em;  /* Espacio interno para mejorar el efecto */
}

h4 {
    text-align: left;
    font-weight: bold;
}

.detalle-libro-media h4 {
    align-self: flex-start;
    text-align: left;
}

.detalle-libro-media h5 {
    align-self: flex-start;
    text-align: left;
    font-style: italic;
    font-size: 0.95em;
    margin-bottom: 0.1em; /* Reduce el espacio debajo del h5 */
    margin-top: 0.4em;    /* Opcional: ajusta si quieres menos espacio arriba */
}

main {
  display: flex;
  justify-content: center;
  align-items: center; /* centrado vertical */
  padding-top: 5px;
  flex-direction: column;
}

.pushbutton {
  display: inline-block; /* Asegura que la transformación funcione bien */
  transition: transform 0.2s ease, box-shadow 0.2s ease; /* Suavidad */
  cursor: pointer;
}

.pushbutton:hover {
  transform: scale(1.2); /* Aumenta el tamaño */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Opcional: sombra al pasar */
}

/* Estilos para el widget de goodreads */
.gr_container {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

@media (max-width: 1024px) {
  .gr_container {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .gr_container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .gr_container {
    grid-template-columns: 1fr;
  }
}

.gr_book_container {
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 10px;
  background: #fafafa;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: transform 0.2s ease;
}

.gr_book_container:hover {
  transform: translateY(-5px);
}

.gr_book_image img {
  max-width: 100px;
  height: auto;
  margin-bottom: 10px;
  border-radius: 4px;
}

.gr_book_title {
  display: block;
  text-decoration: none !important;
  color: #222 !important;
  font-style: italic;
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 1em;
  line-height: 1.3;
  margin-top: 5px;
}

.gr_book_title:hover {
  color: #b22222 !important; /* tono vino elegante al pasar el mouse */
}

.gr_review_stats {
  font-family: 'Georgia', 'Times New Roman', serif;
  color: #666;
  font-size: 0.85em;
  margin-top: 5px;
}

/* Media queries para pantallas pequeñas */
@media (max-width: 768px) {
    h2 {
        font-size: 1.5rem; /* Reduce el tamaño de la fuente */
        padding: 0 10px; /* Agrega un padding para evitar que el texto toque los bordes */
    }
}
.hero {
    position: relative;
    width: 100%;
    height: 70vh; /* 50% del alto de la ventana */
    background: url('../img/portadaWeb.jpg') no-repeat center center;
    border-radius: 30px; /* Más redondeado */
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    display: flex;
    align-items: flex-start; /* Alinea arriba */
    justify-content: flex-start; /* Alinea a la izquierda */
}

.imagenLuis {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-left: 20px;
    margin-right: 0;
    float: right;
    transition: transform 0.2s;
}

.imagenLuis:hover {
    transform: scale(1.3);
}
.cursiva {
  font-style: italic;
}

.right-section img {
    width: 40px;
    height: 65px;
    object-fit: cover;
}

.right-section img:hover {
    transform: scale(1.3);
    transition: transform 0.2s;
}

.right-section .iconoCarro {
    width: 24px;
    height: 24px;
    object-fit: contain;
    transition: transform 0.2s;
}

.icono-lista {
    width: 24px;
    height: 24px;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.icono-lista:hover {
    transform: scale(1.3); /* 1.3 = 130% del tamaño original */
}

.left-section {
    text-align: justify;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.1rem;
    color: #222;
}

.landing-container {
    display: flex;
    align-items: flex-start;
    min-height: 420px;
}

.left-section, .right-section {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
}

.right-section {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
    align-items: center;
}

.right-section .imagenes-libros {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}

.right-section .imagenes-libros img {
    margin: 0;
}

.detalle-libro-img {
    width: 80px;
    height: 100px;
    object-fit: cover;
    transition: transform 0.2s;
}

.detalle-libro-img:hover {
    transform: scale(1.5);
}

.detalle-libro-img-carrito {
    width: 60px;
    height: 60px;
    object-fit: cover;
    transition: transform 0.2s;
}

.detalle-libro-img-carrito:hover {
    transform: scale(1.3);
}

.detalle-libro-sinopsis {
    text-align: justify;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.1rem;
    color: #222;
}

.btn-cerrar-modal {
    background-color: #007bff;
    color: #fff;
    font-size: 1.1rem;
    padding: 0.6em 1.4em;
    border-radius: 6px;
    border: none;
    transition: transform 0.2s, background 0.2s;
}

.btn-cerrar-modal:hover {
    background-color: #0056b3;
    transform: scale(1.15);
}

.botonDeco {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 0.7em 2em;
    border-radius: 8px;
    font-size: 1.1rem;
    transition: transform 0.2s, background 0.2s;
    cursor: pointer;
}

.botonDeco:hover {
    transform: scale(1.15);
    background-color: #0056b3;
}

a.botonDeco {
    text-decoration: none;
}

.botonSecundario {
    background-color: #6c757d; /* gris */
    color: #fff;
    border: none;
    padding: 0.7em 2em;
    border-radius: 8px;
    font-size: 1.1rem;
    transition: transform 0.2s, background 0.2s;
    cursor: pointer;
}

.botonSecundario:hover {
    transform: scale(1.15);
    background-color: #5a6268; /* gris más oscuro */
}


.detalle-libro-container {
    background: #aeb0b6;
    border-radius: 18px;
    padding: 2em 2em 4em 2em;
    margin: 2em auto 0 auto;
    max-width: 950px;
    min-height: 500px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    font-family: 'Georgia', 'Times New Roman', serif;
    color: #222;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Antes: space-between */
    min-height: 100%; /* asegura que ocupe toda la altura disponible */
}
.detalle-libro-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 2em;
    align-items: flex-start;
    justify-content: space-between;
}
.detalle-libro-media {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1em;
    min-width: 300px;
    max-width: 350px;
    flex: 1 1 320px;
}
.detalle-libro-info {
    flex: 2 1 400px;
    min-width: 320px;
    text-align: justify;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.1rem;
}
.detalle-libro-img {
    width: 120px;
    height: 160px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 1em;
}
.detalle-libro-video {
    width: 320px;
    height: 180px;
    border-radius: 10px;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    background: #000;
}
.detalle-libro-video-index {
    width: 420px;
    height: 280px;
    border-radius: 20px;
    border: navy;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    background: #000;
    margin-top: 8em;
}
.detalle-libro-adquirir {
    margin-top: 7em; /* Empuja hacia el final */
    text-align: right;
}
.footer-fixed {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    z-index: 100;
}

.audiolibro-container audio {
    width: 100%;
    max-width: 600px;
}

/* Todas las tablas: que ocupen el ancho disponible y se vean bien */
table {
  width: 100%;
  border-collapse: collapse; /* Unifica bordes */
}

/* Cabecera con azul clarito */
table thead {
  background-color: #cce5ff; /* Azul clarito */
}

table thead th {
  color: #000; /* Texto oscuro para contraste */
  font-weight: bold;
  padding: 8px;
  text-align: left;
}

/* Bordes y espaciado de celdas */
table td, table th {
  border: 1px solid #ddd;
  padding: 8px;
}

table td {
  text-align: justify;
}

table td img {
  max-width: 80px;
  height: auto;
  display: block;
  margin: 0 auto; /* Centra la imagen */
}

/* Responsive: en pantallas pequeñas, permitir scroll horizontal */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; /* Desplazamiento suave en móviles */
}

/* Opcional: rayas alternas para filas */
table tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

.alert {
    position: relative;
    top: 0;
    margin: 1rem auto 0 auto;
    max-width: 800px;
}

/* Mejoras responsive generales */
@media (max-width: 1200px) {
    .container-fluid,
    .detalle-libro-container {
        max-width: 98vw;
        padding: 1em;
    }
    .landing-container {
        flex-direction: column;
        align-items: stretch;
    }
    .left-section, .right-section {
        width: 100%;
        min-width: 0;
        margin-bottom: 2em;
    }
    .right-section {
        align-items: stretch;
    }
}

@media (max-width: 900px) {
    .menu {
        display: none;
    }
    .menu.menu-abierto {
        display: flex;
        flex-direction: column;
    }
    .menu-toggle {
        display: block;
    }
}
@media (min-width: 901px) {
    .menu {
        display: flex !important;
    }
    .menu-toggle {
        display: none;
    }
}

@media (max-width: 600px) {
    .container-fluid,
    .detalle-libro-container {
        padding: 0.5em;
        margin: 0.5em auto;
    }
    .detalle-libro-img {
        width: 60px;
        height: 80px;
    }
    .detalle-libro-video,
    .detalle-libro-video-index {
        height: 140px;
    }
    .btn-cerrar-modal,

    .footer-fixed {
        position: static;
        width: 100%;
    }
}

/* Contenedor formulario centrado y decorado */
.form-container {
    max-width: 500px;
    margin: 3em auto;
    background: #fff;
    padding: 2em;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.form-label {
    font-weight: bold;
    margin-bottom: 0.5em;
    display: block;
}

.password-group {
    display: flex;
    align-items: center;
}

.password-group input {
    flex: 1;
    padding-right: 2.5em; /* espacio para el botón ojo */
}

.toggle-password {
    background: none;
    border: none;
    cursor: pointer;
    margin-left: -2.2em;
    padding: 0;
    outline: none;
}

.toggle-password svg {
    width: 20px;
    height: 20px;
    fill: #555;
}

.toggle-password:hover svg {
    fill: #000;
}

.btn-row {
    display: flex;
    justify-content: center;
    gap: 1em;
    margin-top: 2em;
}
