/* layout general */

.books-page {
    width: 100%;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 var(--container-padding) 3rem;
    color: var(--text-color);
}

.books-hero {
    margin-bottom: clamp(20px, 4vw, 34px);
    padding: clamp(24px, 5vw, 42px);
    overflow: hidden;
    border: 1px solid var(--item-border);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, .16), transparent 42%),
        var(--surface-soft);
    box-shadow: var(--shadow-soft);
}

.books-eyebrow {
    display: block;
    margin-bottom: 8px;
    color: var(--accent-color);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.books-hero h1 {
    margin: 0 0 8px;
    font-size: clamp(1.65rem, 4vw, 2.3rem);
    letter-spacing: -.035em;
}

.books-hero p {
    /* max-width: 650px; */
    margin: 0;
    color: var(--muted);
}

.books-container {
    width: 100%;
}

.books-grid {
    display: grid;
    gap: var(--grid-gap);
}

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

@media (min-width:641px) and (max-width:1024px) {
    .books-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width:1025px) {
    .books-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.book-card {
    cursor: pointer;
    background: var(--item-bg);
    border: 1px solid var(--item-border);
    border-radius: var(--card-radius);
    height: 100%;
    padding: 22px;
    box-shadow: var(--item-shadow);

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        border-color .2s ease;
}

.book-card:hover {
    cursor: pointer;
    transform: translateY(-4px);
    border-color: var(--item-hover-border);
    box-shadow: var(--item-shadow-hover);
}

.card-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.book-icon {
    width: 38px;
    height: 38px;
    padding: 8px;
    border-radius: 12px;
    background: rgba(37, 99, 235, .12);
    color: var(--text-color);
    opacity: .8;
}

.book-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-color);
}

.book-description {
    font-size: .9rem;
    margin: 0;
    color: var(--text-color);
    opacity: .7;
}

.songs-badge {
    margin-top: 8px;
    width: fit-content;

    padding: 6px 14px;
    border-radius: 999px;

    font-size: .85rem;

    background: var(--accent-color);
    color: white;

    display: flex;
    align-items: center;
    gap: 6px;

    transition: background .2s ease;
}

.songs-badge:hover {
    background: var(--accent-hover);
}

.book-link {
    text-decoration: none;
    color: inherit;
    display: block;
    border-radius: var(--card-radius);
}

.book-link:focus-visible {
    outline-offset: 4px;
}


/* lyrics */

.lyrics-hero {
    text-align: center;
    margin-bottom: clamp(20px, 4vw, 34px);
    padding: clamp(24px, 5vw, 42px);
    /* overflow: hidden; */
    border: 1px solid var(--item-border);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, .16), transparent 42%),
        var(--surface-soft);
    box-shadow: var(--shadow-soft);
}

.lyrics-content {
    white-space: pre-line;
}

.lyric-title {
    color: var(--text-color);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.lyrics-section {
    margin-bottom: 2rem;
}

.lyrics-content-bold {
    white-space: pre-line;
    font-weight: bold;
}


.export-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    /* centra en desktop */
    flex-wrap: wrap;
    gap: 12px;
    margin: 24px auto;
    width: 100%
}

/* Estilo base de todos los botones */
.action-btn {
    border: none;
    outline: none;
    cursor: pointer;
    min-height: 44px;
    padding: 11px 18px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    background: #111827;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 8px 20px rgba(17, 24, 39, 0.18);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(17, 24, 39, 0.24);
}

.action-btn:active {
    transform: translateY(0);
    opacity: 0.85;
}

.action-btn img {
    display: block;
}

/* Botón PDF */
.btn-pdf {
    background: linear-gradient(135deg, #dc2626, #ef4444);
}

/* Botón PowerPoint */
.btn-ppt {
    background: linear-gradient(135deg, #ea580c, #f97316);
}

/* Botón video */
.btn-video {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
}

/* Botón compartir */
.btn-share {
    background: linear-gradient(135deg, #16a34a, #22c55e);
}

/* Contenedor del botón compartir + menú */
.share-wrapper {
    position: relative;
    display: inline-block;
}

/* Menú oculto por defecto */
.share-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    padding: 10px;
    border-radius: 14px;
    background: var(--bg-color);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
    display: none;
    z-index: 1000;
    margin-bottom: 100000px;
}

/* Clase que JS activa para mostrar el menú */
.share-menu.active {
    display: grid;
    gap: 8px;
    animation: shareFade 0.18s ease;
}

/* Links de redes sociales */
.share-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.share-link:hover {
    background: var(--item-shadow-hover);
    transform: translateX(3px);
}

.share-link img {
    display: block;
    flex-shrink: 0;
}

/* Pequeña animación */
@keyframes shareFade {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 520px) {
    .export-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .action-btn {
        width: 100%;
    }

    .share-wrapper {
        width: 100%;
    }

    .share-menu {
        left: 0;
        right: auto;
        width: 100%;
    }
}

.pdf-clone-wrapper {
  position: fixed;
  left: -99999px;
  top: 0;
  width: 900px;
  background: #ffffff;
  z-index: -1;
  pointer-events: none;
  text-align: center;
}

.pdf-clone-content {
  background: #ffffff;
  color: #000000 !important;
}

.is-exporting-pdf #share-fallback {
  display: none !important;
}