/* Portada de una canción (cancion.php): ilustración, juegos y fichas PDF con candado. */

.cp {
    max-width: 1000px;
    margin: 0 auto;
    padding-top: 14px;
}

.cp-volver {
    margin: 0 0 10px;
    font-weight: 700;
}

.cp-volver a {
    color: #045b82;
    text-decoration: none;
}

.cp-volver a:hover {
    text-decoration: underline;
}

/* ---------- cabecera ---------- */
.cp-cabecera {
    background: #fff;
    border: 3px solid #045b82;
    border-radius: 20px;
    padding: 18px 10px;
    margin: 0 0 24px;
    align-items: center;
}

.cp-img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 14px;
    background: #d8eff7;
    margin-bottom: 12px;
}

.cp-h1 {
    font-size: calc(1.6rem + .4vw);
    font-weight: 700;
    color: #1f2d3d;
    margin: 0 0 4px;
    line-height: 1.2;
}

.cp-sub {
    margin: 0 0 12px;
    color: #6b7b88;
    font-size: 1.05rem;
}

.cp-pastillas {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.cp-pastilla {
    padding: 3px 14px;
    border-radius: 14px;
    background: #eef2fa;
    border: 1px solid #c9d6ef;
    color: #2a4a8f;
    font-weight: 700;
    font-size: .92rem;
}

.cp-juegos {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.cp-juego {
    flex: 1 1 220px;
    display: block;
    padding: 14px 20px 16px;
    border-radius: 18px;
    text-decoration: none !important;
    color: #fff;
    box-shadow: 0 5px 0 rgba(0, 0, 0, .18);
    transition: transform .12s ease, box-shadow .12s ease;
}

.cp-juego:hover {
    transform: translateY(-2px);
    color: #fff;
}

.cp-juego:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 rgba(0, 0, 0, .18);
}

.cp-juego b {
    display: block;
    font-size: 1.35rem;
}

.cp-juego span {
    display: block;
    margin-top: 2px;
    font-size: .88rem;
    opacity: .92;
}

.cp-juego--carillon {
    background: #045b82;
}

.cp-juego--flauta {
    background: #e8a30d;
}

/* ---------- fichas PDF ---------- */
.cp-h2 {
    font-size: calc(1.2rem + .3vw);
    font-weight: 700;
    color: #1f2d3d;
    margin: 0 0 12px;
}

.cp-pdfs > [class*="col"] {
    margin-bottom: 14px;
}

.cp-pdf {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 100%;
    padding: 14px 44px 14px 14px;
    background: #fff;
    border: 2px solid #c9d6ef;
    border-radius: 16px;
    color: #2a4a8f;
    text-decoration: none !important;
    transition: border-color .15s ease, transform .15s ease;
}

.cp-pdf:hover {
    border-color: #045b82;
    transform: translateY(-2px);
    color: #2a4a8f;
}

.cp-pdf-ico {
    flex: none;
    width: 34px;
    height: 34px;
    color: #045b82;
}

.cp-pdf-txt {
    text-align: left;
}

.cp-pdf-txt b {
    display: block;
    font-size: 1.05rem;
    color: #1f2d3d;
}

.cp-pdf-txt span {
    display: block;
    font-size: .85rem;
    line-height: 1.3;
    color: #6b7b88;
}

.cp-candado {
    position: absolute;
    right: 14px;
    top: 14px;
    width: 22px;
    height: 22px;
    color: #9a8c7c;
}

/* con acceso, o con sesión mientras se comprueba, no se pinta el candado */
.cp-pdf--abierto .cp-candado,
.cp-pdf--pendiente .cp-candado {
    display: none;
}

.cp-pdf--abierto {
    border-color: #2ea86f;
}

.cp-pdf-nota {
    margin: 4px 0 20px;
    font-size: .88rem;
    color: #6b7b88;
}

/* ---------- ventana de muestra ---------- */
.cp-modal[hidden] {
    display: none;
}

.cp-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .55);
}

.cp-modal-card {
    position: relative;
    display: flex;
    gap: 20px;
    align-items: center;
    max-width: 640px;
    max-height: 100%;
    overflow-y: auto;
    background: #f7f3ee;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, .35);
}

.cp-modal-card img {
    flex: none;
    height: 340px;
    width: auto;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}

.cp-modal-cuerpo {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 190px;
}

.cp-modal-titulo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2a2018;
    padding-right: 22px;
}

.cp-modal-cuerpo p,
.cp-modal-cuerpo ul {
    margin: 0;
    font-size: .92rem;
    line-height: 1.4;
    color: #4a4036;
}

.cp-modal-cuerpo ul {
    padding-left: 20px;
}

.cp-modal-x {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 20px;
    color: #aaa;
    cursor: pointer;
}

.cp-modal-x:hover {
    color: #555;
}

.cp-cta {
    height: 46px;
    padding: 0 22px;
    border: none;
    border-radius: 23px;
    background: #e8731a;
    color: #fff;
    font: 700 16px Arial, sans-serif;
    cursor: pointer;
}

.cp-cta:hover {
    background: #d1650f;
}

.cp-sec {
    background: none;
    border: none;
    padding: 2px 0;
    color: #6b5f54;
    font: 700 13px Arial, sans-serif;
    text-decoration: underline;
    cursor: pointer;
}

.cp-sec[hidden] {
    display: none;
}

@media (max-width: 575.98px) {
    .cp-modal-card {
        flex-direction: column;
    }

    .cp-modal-card img {
        height: 220px;
    }
}
