@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400;
    src: url('https://static.acernuda.com/fonts/montserrat-v30-latin-regular.woff2') format('woff2');
    font-display: swap;
} 
.book-card {
     /* Contenedor principal para el hover */
     background-color: #141414; /* Fondo oscuro */
     color: white; /* Texto blanco */
     border: none;
     transition: transform 0.3s ease-in-out;
     margin: 10px;
     height: 100%;
     overflow: hidden;
     position: relative;
     cursor: pointer;
     /* Aseguramos que solo el contenido del card-body se vea afectado por el scroll si la descripciÃ³n es muy larga */
     display: flex;
     flex-direction: column;
 }

 .card-link-wrapper {
     text-decoration: none; /* Quita el subrayado */
     color: inherit; /* Hereda el color del texto */
     display: block; /* Asegura que ocupe todo el espacio de la columna */
     height: 100%; /* Asegura que se estire al 100% de la columna */
 }
 /* ------------------------------------------- */
 /* LÃ“GICA DE HOVER DE IMAGEN (ZOOM) */
 /* ------------------------------------------- */
 .imagen-contenedor {
     /* Nuevo contenedor para la imagen para gestionar el overflow del zoom */
     overflow: hidden;
 }

 .card-img-top {
     /* Estilo inicial de la imagen */
     width: 100%;
     height: 300px;
     object-fit: cover;
     transition: transform 0.3s ease-in-out; /* TransiciÃ³n para un zoom suave */
 }

 .book-card:hover .card-img-top {
     /* Estado al pasar el ratÃ³n: la imagen se agranda (e.g., 10%) */
     transform: scale(1.1);
 }


 /* ------------------------------------------- */
 /* LÃ“GICA DE HOVER DE TARJETA COMPLETA */
 /* ------------------------------------------- */

 .book-card:hover {
     transform: scale(1.05); /* Agranda ligeramente la tarjeta */
     z-index: 10; /* Asegura que la tarjeta ampliada quede por encima de las otras */
     box-shadow: 0 0 15px rgba(255, 255, 255, 0.4); /* Sombra blanca sutil */
 }

 .informacion-detalle {
     /* Ocultar inicialmente la informaciÃ³n */
     max-height: 0;
     opacity: 0;
     padding: 0 10px;
     transition: max-height 0.4s ease-out, opacity 0.4s ease-out; /* TransiciÃ³n suave */
     text-align: center;
 }

 .book-card:hover .informacion-detalle {
     /* Mostrar al pasar el ratÃ³n */
     max-height: 200px; /* Un valor grande para la descripciÃ³n */
     opacity: 1;
     padding: 10px; /* Padding vertical al mostrar */
 }
 
   .book-detail-card { 
      border: none;
      max-width: 1200px; /* Limita el ancho en pantallas muy grandes */
      margin: 40px auto 6.5rem; /* Centra la ficha en la pÃ¡gina y deja espacio para el navbar fijo */
  }

  .book-bottom-navbar {
      position: fixed;
      left: 50%;
      bottom: 1rem;
      transform: translateX(-50%);
      width: min(96%, 760px);
      z-index: 1100;
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 0.5rem;
      padding: 0.55rem;
      border-radius: 16px;
      background: transparent;
     /* backdrop-filter: blur(10px);
      box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);*/
  }

.book-bottom-navbar__item {
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 60px;
    background: #f0cddc;
    color: #8c204f;
    min-height: 3.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    text-decoration: none;
    font-weight: 600;
    /*font-size: 0.86rem;*/
    transition: background-color 0.18s ease, transform 0.18s ease;
    padding: 0.5rem;
}

  .book-bottom-navbar__item i {
      font-size: 1rem;
  }

    .book-bottom-navbar__item:hover {
        background: #8c204f;
        color: #ffffff;
        transform: translateY(-1px);
    }

  .book-bottom-navbar__item.is-disabled {
      opacity: 0.45;
      cursor: not-allowed;
  }

  
  .detail-cover-image {
      /* Fija una altura mÃ¡xima para que la imagen no sea gigante en desktop */
      max-height: 450px;
      width: auto; /* Permite que el ancho se ajuste proporcionalmente */
      object-fit: cover;
      box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); /* Sombra para darle profundidad */
  }

  /* Mejorar la legibilidad de la descripciÃ³n */
  .book-description {
      line-height: 1.6; /* Mayor espacio entre lÃ­neas */
  }


.lector-responsive-container {    
    max-width: 768px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 15px;                    
}

.scroll-container {
    height: 90vh; 
    overflow-y: scroll;   
}


.lector-contenido {
    
    -webkit-user-select: none;
    -moz-user-select: none; 
    -ms-user-select: none;
    user-select: none; 
}


.card-title {
    color: #bb1655;
    font-weight: bold;
}

.notice {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-weight: bold;
    font-size: large;
}



.notice, .noticeSeen {
    border-radius: 10px;
    color: black;
    font-family: Montserrat;
    margin: 1rem;
}

.article {
    margin-bottom: 3%;
}

.center-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 100vh;
}

@media (max-width: 767px) {
    .detail-cover-image {
        max-height: 300px; /* Reducir la altura mÃ¡xima en mÃ³viles */
        margin-bottom: 20px;
    }

    .book-detail-card {
        padding: 20px;
        margin-bottom: 7.25rem;
    }

    .book-bottom-navbar {
        width: calc(100% - 1rem);
        bottom: 0.5rem;
        gap: 0.35rem;
        padding: 0.45rem;
    }

    .book-bottom-navbar__item {
        min-height: 2.85rem;
        font-size: 0.75rem;
        gap: 0.25rem;
    }

    .book-bottom-navbar__item i {
        font-size: 0.9rem;
    }

    .lector-contenido {
        font-size: 1rem; /* Un poco mÃ¡s pequeÃ±a en mÃ³viles */
    }

    .card-title {
        font-size: 1rem;
    }

    .card-text {
        font-size: 0.9rem;
    }

    .center-screen {
        margin: 0.1rem;
    }
}

.reader-shell {
    --reader-bg: #f4efe6;
    --reader-surface: rgba(255, 252, 246, 0.92);
    --reader-surface-strong: #fffdf8;
    --reader-paper-shadow: 0 24px 60px rgba(60, 41, 20, 0.08);
    --reader-text: #2a2118;
    --reader-muted: #7b6a58;
    --reader-accent: #8a5a2b;
    --reader-accent-soft: rgba(138, 90, 43, 0.12);
    --reader-border: rgba(110, 82, 50, 0.14);
    --reader-divider: rgba(110, 82, 50, 0.18);
    background: radial-gradient(circle at top, rgba(255, 255, 255, 0.72), transparent 28%), linear-gradient(180deg, #f7f2e8 0%, #f2eadf 100%);
    color: var(--reader-text);
    min-height: 100vh;
    padding: 1.5rem 1rem 7rem;
}

.reader-shell.theme-sepia {
    --reader-surface: rgba(250, 243, 230, 0.94);
    --reader-surface-strong: #fcf7ee;
    --reader-text: #3c2f22;
    --reader-muted: #75624e;
    --reader-accent: #9a6232;
    --reader-accent-soft: rgba(154, 98, 50, 0.14);
    --reader-border: rgba(130, 93, 56, 0.16);
    --reader-divider: rgba(130, 93, 56, 0.2);
    background: radial-gradient(circle at top, rgba(255, 250, 241, 0.68), transparent 28%), linear-gradient(180deg, #f4ead8 0%, #eadbc3 100%);
}

.reader-shell.theme-dark {
    --reader-surface: rgba(24, 28, 35, 0.82);
    --reader-surface-strong: #181c23;
    --reader-paper-shadow: 0 24px 60px rgba(3, 7, 18, 0.35);
    --reader-text: #e7dccb;
    --reader-muted: #b0a58f;
    --reader-accent: #d4a373;
    --reader-accent-soft: rgba(212, 163, 115, 0.14);
    --reader-border: rgba(212, 163, 115, 0.12);
    --reader-divider: rgba(212, 163, 115, 0.18);
    background: radial-gradient(circle at top, rgba(32, 37, 48, 0.62), transparent 28%), linear-gradient(180deg, #10141b 0%, #161b22 100%);
}

.reader-header,
.reader-summary-strip,
.reader-loading-card {
    max-width: 1040px;
    margin: 0 auto;
}

.reader-header {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.8fr);
    gap: 1rem;
    align-items: start;
    margin-bottom: 1rem;
}

.reader-book-meta,
.reader-progress-panel,
.reader-summary-strip,
.reader-loading-card {
    background: var(--reader-surface);
    border: 1px solid var(--reader-border);
    border-radius: 20px;
    box-shadow: var(--reader-paper-shadow);
}

.reader-book-meta {
    padding: 1.5rem 1.6rem;
}

.reader-eyebrow,
.reader-summary-label,
.reader-progress-label,
.reader-loading-badge,
.reader-metric-label {
    display: inline-flex;
    align-items: center;
    color: var(--reader-accent);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.reader-title,
.reader-loading-title {
    margin: 0.65rem 0 0.9rem;
    font-size: clamp(2rem, 3vw, 2.8rem);
    line-height: 1.08;
    font-weight: 700;
}

.reader-description,
.reader-loading-copy {
    margin: 0;
    color: var(--reader-muted);
    line-height: 1.75;
    max-width: 64ch;
}

.reader-progress-panel {
    padding: 1.35rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.reader-progress-copy {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
}

.reader-progress-copy strong {
    font-size: 1.25rem;
    line-height: 1;
}

.reader-progress-track {
    position: relative;
    overflow: hidden;
    background: rgba(127, 102, 75, 0.12);
    border-radius: 999px;
    height: 0.5rem;
}

.reader-progress-value {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--reader-accent), color-mix(in srgb, var(--reader-accent) 74%, white));
}

.reader-progress-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.reader-metric {
    display: grid;
    gap: 0.25rem;
    color: var(--reader-muted);
}

.reader-metric strong {
    color: var(--reader-text);
    font-size: 1rem;
}

.reader-summary-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 0.9rem 1.1rem;
    margin-bottom: 1.25rem;
}

.reader-summary-item {
    padding: 0.45rem 0.55rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.26);
}

.reader-summary-item strong {
    display: block;
    margin-top: 0.3rem;
    font-size: 1rem;
}

.reader-viewport-wrapper {
    max-width: 980px;
    margin: 0 auto;
}

.reader-viewport {
    height: calc(100vh - 18rem);
    min-height: 34rem;
    overflow-y: auto;
    border-radius: 28px;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0 0 8rem;
    outline: none;
    scroll-behavior: smooth;
}

.reader-viewport:focus-visible {
    box-shadow: 0 0 0 3px var(--reader-accent-soft);
}

.reader-viewport.reader-width-compact {
    max-width: 760px;
}

.reader-viewport.reader-width-comfortable {
    max-width: 880px;
}

.reader-viewport.reader-width-wide {
    max-width: 980px;
}

.reader-page {
    padding: 0;
}

.reader-paper {
    background: var(--reader-surface-strong);
    border: 1px solid var(--reader-border);
    border-radius: 26px;
    box-shadow: var(--reader-paper-shadow);
    padding: clamp(1.5rem, 4vw, 3rem);
}

.reader-shell .lector-contenido {
    white-space: normal;
    font-family: 'Montserrat', sans-serif;
    font-size: var(--reader-font-size, 18px);
    line-height: var(--reader-line-height, 1.75);
    color: var(--reader-text);
    display: block;
    max-width: 66ch;
    margin: 0 auto;
    text-wrap: pretty;
}

.reader-shell .noselect {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.reader-shell .booktext {
    font-family: 'Montserrat', sans-serif;
}

.reader-sentence {
    border: none;
    background: transparent;
    color: inherit;
    display: inline;
    padding: 0;
    margin: 0;
    border-radius: 0.35rem;
    text-align: left;
    line-height: inherit;
    transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.reader-sentence + .reader-sentence {
    margin-left: 0.25rem;
}

.reader-sentence:hover {
    background: var(--reader-accent-soft);
}

.reader-sentence:focus-visible {
    outline: 2px solid var(--reader-accent);
    outline-offset: 2px;
}

.selected-sentence {
    background: color-mix(in srgb, var(--reader-accent) 16%, transparent);
    color: var(--reader-text);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--reader-accent) 22%, transparent);
}

.reader-divider {
    margin: 1.25rem auto 1.5rem;
    width: min(100%, 740px);
    border-top: 1px solid var(--reader-divider);
    opacity: 1;
}

.reader-placeholder {
    color: var(--reader-muted);
    padding: 1rem 0 3rem;
    font-style: italic;
}

@media (max-width: 991.98px) {
    .reader-header {
        /*grid-template-columns: 1fr;*/
    }

    .reader-summary-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .reader-viewport {
        height: calc(100vh - 20rem);
    }
}

@media (max-width: 767.98px) {
    .reader-shell {
        padding: 1rem 0.5rem 7.5rem;
    }

    .reader-summary-strip,
    .reader-progress-metrics,
    .reader-navigation-strip {
      //  grid-template-columns: 1fr;
    }

    .reader-book-meta,
    .reader-progress-panel,
    .reader-summary-strip,
    .reader-paper,
    .reader-navigation-strip {
        border-radius: 20px;
    }

    .reader-navigation-actions,
    .reader-inline-actions,
    .reader-settings-anchor-list {
        flex-direction: column;
    }

    .reader-viewport {
        height: calc(100vh - 22rem);
        min-height: 28rem;
        padding-bottom: 8rem;
        background: var(--reader-surface-strong);
    }

    .reader-page {
        min-height: calc(100vh - 22rem);
        display: flex;
    }

    .reader-paper {
        padding: 1.25rem 1rem 1.5rem;
        flex: 1;
    }
}

.reader-navigation-strip {
    max-width: 1040px;
    margin: 0 auto 1rem;
    display: grid;
    //grid-template-columns: 1.2fr 1fr 1fr;
    gap: 0.75rem;
}

.reader-navigation-actions,
.reader-anchor-card,
.reader-anchor-list {
    background: var(--reader-surface);
    border: 1px solid var(--reader-border);
    border-radius: 20px;
    box-shadow: var(--reader-paper-shadow);
}

.reader-navigation-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    padding: 1rem;
    align-content: start;
}

.reader-nav-button,
.reader-inline-button,
.reader-anchor-pill,
.reader-settings-anchor {
    border: 1px solid var(--reader-border);
    background: rgba(255, 255, 255, 0.55);
    color: var(--reader-text);
    border-radius: 999px;
    padding: 0.7rem 1rem;
    transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.reader-nav-button:hover,
.reader-inline-button:hover,
.reader-anchor-pill:hover,
.reader-settings-anchor:hover {
    background: var(--reader-accent-soft);
    border-color: color-mix(in srgb, var(--reader-accent) 35%, var(--reader-border));
    transform: translateY(-1px);
}

.reader-anchor-card {
    padding: 1rem;
    display: grid;
    gap: 0.6rem;
}

.reader-anchor-card strong {
    font-size: 0.96rem;
    line-height: 1.5;
}

.reader-anchor-meta {
    color: var(--reader-muted);
    font-size: 0.9rem;
}

.reader-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.reader-anchor-list {
    max-width: 1040px;
    margin: 0 auto 1rem;
    padding: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.reader-anchor-pill,
.reader-settings-anchor {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    text-align: left;
}

.reader-anchor-page,
.reader-settings-anchor-page {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--reader-accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.reader-anchor-preview,
.reader-settings-anchor-preview {
    max-width: 28ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reader-anchor-badge {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--reader-accent);
    background: var(--reader-accent-soft);
    border-radius: 999px;
    padding: 0.25rem 0.55rem;
}

.reader-settings-anchor-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}