/* ==========================================================================
   HISTORIAS DE HIMNOS - MAIN STYLESHEET
   ========================================================================== */
.himnos-page-wrapper {
    max-width: 1152px;
    margin: 0 auto;
    padding: 32px 20px 80px 20px;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Page Header */
.himnos-header {
    text-align: center;
    margin-bottom: 32px;
}

.himnos-header-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.75rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 12px 0;
    line-height: 1.2;
}

.himnos-header-divider {
    width: 60px;
    height: 4px;
    background-color: #6B1226;
    margin: 0 auto;
    border-radius: 999px;
}

/* Search & Filter Bar */
.himnos-filter-bar {
    background-color: #ffffff;
    border: 1px solid rgba(180, 83, 9, 0.15);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 36px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 1024px) {
    .himnos-filter-bar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.himnos-search-box {
    position: relative;
    width: 100%;
}

@media (min-width: 1024px) {
    .himnos-search-box {
        width: 320px;
    }
}

.himnos-search-input {
    width: 100%;
    background-color: #FDFBF7;
    border: 1px solid rgba(180, 83, 9, 0.15);
    border-radius: 12px;
    padding: 10px 40px 10px 16px;
    font-size: 0.875rem;
    outline: none;
    box-sizing: border-box;
}

.himnos-search-input:focus {
    border-color: #6B1226;
}

.himnos-search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: rgba(180, 83, 9, 0.4);
    display: flex;
    align-items: center;
}

.himnos-dial-container {
    background-color: #F4EFE6;
    border: 1px solid rgba(180, 83, 9, 0.15);
    padding: 6px 12px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
}

.himnos-reset-btn {
    background: none;
    border: none;
    color: #6B1226;
    font-weight: 700;
    font-size: 0.75rem;
    cursor: pointer;
    margin-right: 4px;
}

.himnos-dial-box {
    position: relative;
    height: 40px;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(180, 83, 9, 0.1);
}

.himnos-dial-scroll {
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    text-align: center;
    padding: 8px 0;
    scrollbar-width: none;
}
.himnos-dial-scroll::-webkit-scrollbar { display: none; }

.himnos-dial-item {
    scroll-snap-align: center;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    color: #6B1226;
    padding: 0 10px;
}

.himnos-dial-sep {
    color: rgba(180, 83, 9, 0.3);
    font-weight: bold;
    font-size: 0.75rem;
}

/* 3-Column Square Grid */
.himnos-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 28px;
}

@media (min-width: 768px) {
    .himnos-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .himnos-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.himno-card {
    background: #ffffff;
    border: 1px solid rgba(180, 83, 9, 0.12);
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.himno-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.himno-card-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: #1a0308;
}

.himno-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.himno-card:hover .himno-card-thumb img {
    transform: scale(1.05);
}

.himno-card-body {
    padding: 24px 22px 20px 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.himno-card-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    margin: 0 0 10px 0;
}

.himno-card-excerpt {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.55;
    margin: 0 0 20px 0;
    font-style: italic;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.himno-card-footer {
    border-top: 1px solid #f1f5f9;
    padding-top: 14px;
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.himno-play-btn {
    background: none;
    border: none;
    font-size: 0.8rem;
    font-weight: 700;
    color: #6B1226;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 0;
}

.himno-play-btn:hover {
    color: #4A0D1B;
}

.himno-card-duration {
    font-size: 0.7rem;
    color: #94a3b8;
    font-family: monospace;
}

/* Audio Player Modal */
.himnos-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.himnos-modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.himnos-modal-container {
    width: 100%;
    max-width: 500px;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}

.himnos-modal-header {
    background-color: #3B0A15;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.himnos-modal-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #F3E5AB;
    margin: 0;
}

.himnos-modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.himnos-modal-body {
    padding: 24px;
}

.himnos-audio-player-box {
    margin-top: 16px;
    background: #FDFBF7;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(180, 83, 9, 0.1);
}