/* ==========================================================================
   HOMEPAGE CONTAINER & EXACT CANVAS PROPORTIONS
   ========================================================================== */
.home-page-wrapper {
    width: 100%;
    max-width: 1152px;
    margin: 0 auto;
    padding: 24px 20px 64px 20px;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

@media (min-width: 1024px) {
    .home-page-wrapper {
        padding: 36px 48px 80px 48px;
    }
}

/* Common Section Headers */
.home-section-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(69, 26, 3, 0.1);
    padding-bottom: 16px;
}

@media (min-width: 768px) {
    .home-section-header {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }
}

.home-section-eyebrow {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #6B1226;
    display: block;
    margin-bottom: 4px;
}

.home-section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.85rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.15;
}

@media (min-width: 768px) {
    .home-section-title {
        font-size: 2.25rem;
    }
}

.home-section-link {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6B1226;
    text-decoration: none;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.home-section-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   SECTION 1: HERO FEATURED PRÉDICA (MIN-HEIGHT 500PX MATCH)
   ========================================================================== */
.home-hero-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    background-color: #1A0308;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin-bottom: 48px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
    width: 100%;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

@media (min-width: 768px) {
    .home-hero-card {
        min-height: 500px;
    }
}

.home-hero-overlay {
    position: relative;
    z-index: 2;
    background: linear-gradient(180deg, rgba(44, 8, 17, 0) 0%, rgba(44, 8, 17, 0.8) 60%, rgba(44, 8, 17, 0.98) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 28px 24px;
    box-sizing: border-box;
    width: 100%;
}

@media (min-width: 768px) {
    .home-hero-overlay {
        padding: 48px 48px;
    }
}

.home-hero-badge {
    display: inline-block;
    background-color: rgba(251, 191, 36, 0.95);
    color: #020617;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 12px;
    width: fit-content;
}

.home-hero-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.1rem;
    font-weight: 700;
    color: #FFFBEB;
    margin: 0 0 16px 0;
    line-height: 1.15;
}

@media (min-width: 768px) {
    .home-hero-title {
        font-size: 3.25rem;
        max-width: 80%;
        margin-bottom: 20px;
    }
}

.home-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #6B1226;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 12px;
    border: 1px solid rgba(252, 211, 77, 0.3);
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
    width: fit-content;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.home-hero-btn:hover {
    background-color: #80162E;
    transform: translateY(-2px);
}

/* ==========================================================================
   SECTION 2: PUERTAS DE LA ETERNIDAD
   ========================================================================== */
.home-puertas-section {
    margin-bottom: 48px;
}

.home-puertas-header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.home-puertas-btn-pill {
    background-color: #6B1226;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 10px 18px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease;
    display: inline-block;
}

.home-puertas-btn-pill:hover {
    background-color: #80162E;
}

.home-puertas-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 24px;
}

@media (min-width: 768px) {
    .home-puertas-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 32px;
    }
}

.home-puerta-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(180, 83, 9, 0.1);
    background-color: #ffffff;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 320px;
}

.home-puerta-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.home-puerta-card:hover img {
    transform: scale(1.05);
}

.home-puerta-overlay {
    position: relative;
    z-index: 10;
    background: linear-gradient(to top, rgba(30, 15, 20, 0.92) 0%, rgba(30, 15, 20, 0.35) 60%, rgba(0, 0, 0, 0) 100%);
    padding: 32px 24px 24px 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-sizing: border-box;
}

.home-puerta-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 12px 0;
    line-height: 1.2;
}

.home-puerta-link {
    font-size: 0.75rem;
    font-weight: 700;
    color: #FCD34D;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* ==========================================================================
   SECTION 3: RADIO BETANIA BANNER (INFO LEFT, GRAPHIC RIGHT)
   ========================================================================== */
.home-radio-banner {
    background-color: #ffffff !important;
    border: 1px solid rgba(180, 83, 9, 0.1) !important;
    border-radius: 20px !important;
    margin-bottom: 48px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04) !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

@media (min-width: 768px) {
    .home-radio-banner {
        flex-direction: row !important; /* Left to right */
        align-items: center !important;
        justify-content: space-between !important;
        padding: 20px 28px !important;
        gap: 20px !important;
    }
}

.home-radio-info {
    order: 1 !important;
    flex: 1 1 0% !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    padding: 20px !important;
    overflow: hidden !important;
}

@media (min-width: 768px) {
    .home-radio-info {
        padding: 0 !important;
    }
}

.home-radio-eyebrow {
    font-size: 0.7rem !important;
    font-weight: 800 !important;
    color: #6B1226 !important;
    display: block !important;
    margin-bottom: 4px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.home-radio-title {
    font-family: 'Playfair Display', Georgia, serif !important;
    font-size: clamp(1.4rem, 2.3vw, 2.2rem) !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 0 12px 0 !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.home-radio-player-row {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
}

/* Play Button */
.home-radio-play-btn {
    width: 52px !important;
    height: 52px !important;
    background-color: #6B1226 !important;
    color: #ffffff !important;
    border: 3px solid #ffffff !important;
    border-radius: 50% !important;
    box-shadow: 0 0 0 2px #C39953, 0 4px 10px rgba(107, 18, 38, 0.2) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease, transform 0.2s ease !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    outline: none !important;
    font-size: 1.15rem !important;
}

.home-radio-play-btn:hover {
    background-color: #4A0D1B !important;
    transform: scale(1.05) !important;
}

#home-radio-play-icon {
    display: inline-block !important;
    margin-left: 3px !important;
    line-height: 1 !important;
}

/* Equalizer */
.home-radio-equalizer {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    height: 32px !important;
    flex: 1 1 0% !important;
    min-width: 0 !important;
    overflow: hidden !important;
}

.home-radio-equalizer span {
    width: 3px !important;
    background-color: #00BCD4 !important;
    border-radius: 2px !important;
    transition: height 0.15s ease !important;
    flex-shrink: 0 !important;
}

/* Paused Waveform */
.home-radio-equalizer span:nth-child(3n+1) { height: 4px !important; }
.home-radio-equalizer span:nth-child(3n+2) { height: 12px !important; }
.home-radio-equalizer span:nth-child(3n) { height: 18px !important; }

/* Playing Animation */
.home-radio-banner.playing .home-radio-equalizer span {
    animation: eqBounce 0.8s ease-in-out infinite alternate !important;
}

.home-radio-banner.playing .home-radio-equalizer span:nth-child(3n+1) { animation-duration: 0.6s !important; animation-delay: 0s !important; }
.home-radio-banner.playing .home-radio-equalizer span:nth-child(3n+2) { animation-duration: 0.9s !important; animation-delay: -0.3s !important; }
.home-radio-banner.playing .home-radio-equalizer span:nth-child(3n) { animation-duration: 1.1s !important; animation-delay: -0.5s !important; }

@keyframes eqBounce {
    0% { height: 4px; }
    100% { height: 26px; } 
}

/* Right-aligned Graphic Container */
.home-radio-graphic {
    order: 2 !important;
    width: 100% !important;
    height: auto !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 12px !important;
    overflow: hidden !important;
}

@media (min-width: 768px) {
    .home-radio-graphic {
        width: 280px !important;
        max-width: 40% !important;
        height: 155px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
}

.home-radio-graphic img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

/* ==========================================================================
   SECTION 4: HISTORIAS DE HIMNOS
   ========================================================================== */
.home-himnos-section {
    margin-bottom: 48px;
}

.home-himnos-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 24px;
}

@media (min-width: 768px) {
    .home-himnos-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.home-himno-card {
    background-color: #ffffff;
    border: 1px solid rgba(180, 83, 9, 0.1);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-himno-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
}

.home-himno-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}

.home-himno-badge {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #6B1226;
    margin-bottom: 4px;
}

.home-himno-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px 0;
}

.home-himno-sub {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 16px;
}

.home-himno-btn {
    display: inline-block;
    background-color: #6B1226;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 12px;
    text-decoration: none;
    width: fit-content;
    transition: background-color 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.home-himno-btn:hover {
    background-color: #80162E;
}

.home-himno-thumb {
    width: 128px;
    height: 128px;
    border-radius: 12px;
    overflow: hidden;
    background-color: #1a0308;
    flex-shrink: 0;
    border: 1px solid rgba(180, 83, 9, 0.1);
}

@media (min-width: 640px) {
    .home-himno-thumb {
        width: 144px;
        height: 144px;
    }
}

.home-himno-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   SECTION 5: ESCRITORIO DEL PASTOR
   ========================================================================== */
.home-pastor-section {
    margin-bottom: 40px;
}

.home-pastor-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 24px;
}

@media (min-width: 640px) {
    .home-pastor-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .home-pastor-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 24px;
    }
}

.home-pastor-card {
    background: #ffffff;
    border: 1px solid rgba(180, 83, 9, 0.1);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    height: 100%;
}

.home-pastor-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
}

.home-pastor-thumb {
    width: 100%;
    height: 144px;
    overflow: hidden;
    background-color: #1a0308;
}

.home-pastor-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-pastor-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.home-pastor-date {
    font-size: 0.65rem;
    color: #94a3b8;
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.home-pastor-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    margin: 0 0 8px 0;
}

.home-pastor-excerpt {
    font-size: 0.75rem;
    color: #475569;
    line-height: 1.5;
    margin: 0 0 16px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-pastor-link {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6B1226;
}