/* ==========================================================================
   ESTILOS PREMIUM CORARIO - COMPOSICIÓN ALTA FIDELIDAD BIBLIOTECA
   ========================================================================== */
body {
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(rgba(24, 26, 38, 0.88), rgba(24, 26, 38, 0.88)), 
                url('https://unsplash.com') no-repeat center center;
    background-attachment: fixed !important;
    background-size: cover !important;
    color: #ffffff;
    min-height: 100vh;
}

.corario-section {
    padding: 60px 20px;
}

.corario-container {
    max-width: 680px; 
    margin: 0 auto;   
    width: 100%;
    padding: 0 15px; /* 🟩 Protege los bordes para que no se peguen a la pantalla del celular */
    box-sizing: border-box;
}

.corario-header {
    text-align: center;
    margin-bottom: 50px;
}

.corario-title {
    font-family: 'Playfair Display', serif;
    font-size: 52px;
    font-weight: 400;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
    color: #cbd5e1;
}

.corario-subtitle {
    font-size: 18px;
    color: #cbd5e1;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* --- ESTILOS DE LA PLANTILLA INDIVIDUAL DE LA CANCIÓN --- */
.song-view-container {
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14px;
    margin: 0 auto 30px auto; /* 🟩 CENTRADO: Márgenes automáticos a los lados */
    transition: color 0.2s;
    
    /* Forzamos a que el contenedor padre lo trate como un elemento en el centro */
    width: max-content;
    align-self: center;
}

.back-link:hover {
    color: #8b5cf6; /* Tono morado de realce al pasar el cursor */
}

.song-title-block {
    text-align: center;
    margin-bottom: 40px;
}

.song-main-title {
    font-family: 'Playfair Display', serif;
    font-size: 54px;
     color: #cbd5e1;
    margin-bottom: 5px;
}

.song-author-text {
    font-size: 16px;
    font-weight: 600;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Caja de Letra Estilo Visor de Versículos */
.song-lyrics-card {
    background-color: #141724; /* Tono oscuro profundo exacto */
    border-radius: 6px;
    padding: 45px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    font-size: 18px;
    line-height: 1;
    color: #e2e8f0;
    text-align: center; /* Letra de alabanza centrada */
    white-space: pre-line;
    margin-bottom: 40px;
}

/* Botonera de Redes / Recursos Multimedia */
.song-media-footer {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.media-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color 0.2s, transform 0.1s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.parasha-row {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-bottom: 16px;
    text-decoration: none;
}

.box-name {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    justify-content: center; 
    text-align: center;
    padding: 18px 20px !important; /* Reducido sutilmente para celulares */
    font-size: 18px;
    display: flex;
    align-items: center;
    word-break: break-word; /* 🟩 Rompe palabras largas si el título de la canción es muy extenso */
}

.box-name::before {
    content: none !important; /* 🟩 Elimina por completo el pergamino residual anterior */
}

.media-btn:active { transform: scale(0.97); }
.media-btn.btn-youtube { background-color: #ff0000; color: #ffffff; }
.media-btn.btn-youtube:hover { background-color: #cc0000; }
.media-btn.btn-karaoke { background-color: #5c62d6; color: #ffffff; }
.media-btn.btn-karaoke:hover { background-color: #474cb8; }

@media (max-width: 768px) {
    .corario-title {
        font-size: 36px !important; /* Título más cómodo para celulares */
    }
    
    .search-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 5px; /* Pequeño colchón de aire a los extremos del teléfono */
        box-sizing: border-box !important;
    }
    
    .box-name {
        font-size: 16px !important; /* Letra un poco más pequeña para que quepa todo el título */
        padding: 15px 15px !important;
    }
}

.search-wrapper {
    position: relative;
    max-width: 520px; /* Ancho corto ideal para computadoras */
    width: 100%;      /* Elástico por defecto */
    margin: 30px auto 25px auto; 
    box-sizing: border-box !important;
}

.search-wrapper .search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 16px;
}


#songs-search-input {
    width: 100%;
    max-width: 100%;
    background-color: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 30px; 
    padding: 12px 20px 12px 45px; 
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: #ffffff;
    outline: none;
    box-sizing: border-box !important; /* Evita que el padding ensanche la caja en celulares */
    transition: all 0.25s ease;
}

/* Efecto de iluminación morada al hacer clic para escribir */
#songs-search-input:focus {
    border-color: #8b5cf6;
    background-color: rgba(139, 92, 246, 0.04);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.25);
}

#songs-search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.study-nav-btn {
    background-color: #ffffff;
    color: #1a1d24;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    padding: 12px 30px;
    border-radius: 8px;
    min-width: 140px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.2s, color 0.2s;
    border: none;
    cursor: pointer;
}

.study-nav-btn.center-btn {
    min-width: 160px;
    letter-spacing: 1px;
  
}
.study-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
    max-width: 1050px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

.study-content-container {
    width: 100%;
    max-width: 100% !important;
    margin: 0 auto;
    padding: 40px 0 0 0;
    
    /* 🟩 CORREGIDO: Mantiene el tamaño y posición, pero la URL se inyecta desde PHP */
    background-repeat: no-repeat;
    background-position: center top;
    background-size: 100% auto; 
}