/* =====================================================================
   app.css — Estilos do Feed Vertical + Web Rádio (Portal Minas)
   ===================================================================== */

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { width: 100%; height: 100%; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; background-color: #000; overflow: hidden; }

.page-header { position: fixed; top: 0; left: 0; width: 100%; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.15) 60%, transparent 100%); z-index: 1000; pointer-events: none; }
.page-header a, .page-header button, .page-header form { pointer-events: auto; }
.page-header img { max-height: 32px; width: auto; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-btn { background: rgba(0,0,0,0.7); border: 1px solid rgba(255,255,255,0.35); color: #fff; padding: 7px 14px; border-radius: 20px; font-size: 0.82rem; font-weight: 600; cursor: pointer; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: flex; align-items: center; gap: 5px; text-decoration: none; }
.header-btn svg { width: 14px; height: 14px; fill: currentColor; }

.search-bar-dropdown { position: fixed; top: 60px; left: 16px; right: 16px; z-index: 1001; background: rgba(15,17,21,0.96); border: 1px solid rgba(255,255,255,0.25); border-radius: 30px; padding: 6px 14px; display: none; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 8px 25px rgba(0,0,0,0.8); }
.search-bar-dropdown.active { display: flex; }
.search-bar-dropdown form { display: flex; width: 100%; align-items: center; gap: 8px; }
.search-bar-dropdown input[type="text"] { flex: 1; background: transparent; border: none; color: #fff; font-size: 0.95rem; outline: none; padding: 6px 0; }
.search-bar-dropdown input[type="submit"] { background: #fe2c55; color: #fff; border: none; padding: 8px 16px; border-radius: 20px; font-weight: bold; font-size: 0.85rem; cursor: pointer; }

.swiper { width: 100%; height: 100%; }
.swiper-slide { position: relative; width: 100%; height: 100%; background: #000; overflow: hidden; }

.video-bg-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; z-index: 1; background: #000; filter: brightness(1.16) contrast(1.04) saturate(1.12); -webkit-filter: brightness(1.16) contrast(1.04) saturate(1.12); will-change: filter; }
.video-bg-container iframe { position: absolute; top: 50%; left: 50%; width: 100vw; height: 56.25vw; min-height: 100vh; min-width: 177.77vh; transform: translate(-50%, -50%); border: none; z-index: 1; opacity: 1; image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges; pointer-events: none; }
.video-bg-container .video-thumb { position: absolute; top: 50%; left: 50%; width: 100vw; height: 56.25vw; min-height: 100vh; min-width: 177.77vh; transform: translate(-50%, -50%) translateZ(0); object-fit: cover; z-index: 2; opacity: 1; transition: opacity 0.3s ease-out; image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges; pointer-events: none; filter: brightness(0.96) saturate(1.05); -webkit-filter: brightness(0.96) saturate(1.05); backface-visibility: hidden; -webkit-backface-visibility: hidden; will-change: opacity; }
.video-bg-container .video-thumb.thumb-escondida { opacity: 0; }

/* ---------- 🎯 OPÇÃO A: PAUSE COM BLUR NO FRAME REAL + BOTÃO SOBREPOSTO ---------- */
.pause-clean-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.swiper-slide.is-paused .pause-clean-overlay {
    opacity: 1;
}
.pause-clean-btn {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: rgba(254, 44, 85, 0.96);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 35px rgba(254, 44, 85, 0.7), 0 8px 30px rgba(0, 0, 0, 0.85);
    border: 3px solid rgba(255, 255, 255, 0.5);
    transform: scale(0.85);
    transition: transform 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.swiper-slide.is-paused .pause-clean-btn {
    transform: scale(1);
}
.pause-clean-btn svg {
    width: 40px;
    height: 40px;
    fill: #fff;
    margin-left: 5px;
}

/* ---------- STORY / ESTÁTICA IMAGEM ---------- */
.story-bg-container {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: #000;
    overflow: hidden;
}
.story-bg-container img {
    position: absolute;
    top: 50%;
    left: 50%;
    height: auto;
    max-height: 78vh;
    width: auto;
    max-width: 88vw;
    transform: translate(-50%, -55%);
    object-fit: contain;
    z-index: 1;
    border-radius: 8px;
}

.audio-hint-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.35);
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.4s ease;
}
.audio-hint-overlay.escondido { opacity: 0; }
.audio-hint-box {
    background: rgba(0,0,0,0.78);
    padding: 16px 22px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 600;
    font-size: 0.88rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    animation: pulseHint 2s ease-in-out infinite;
    text-align: center;
    max-width: 90%;
}
.audio-hint-icon {
    width: 44px;
    height: 44px;
    fill: #fe2c55;
}
@keyframes pulseHint {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.tap-detector {
    position: absolute;
    inset: 0;
    z-index: 3;
    cursor: pointer;
    touch-action: pan-y;
    -webkit-touch-callout: none;
    user-select: none;
    -webkit-user-select: none;
}

.overlay-shadow { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 70%, rgba(0,0,0,0.08) 78%, rgba(0,0,0,0.5) 86%, rgba(0,0,0,0.9) 95%, rgba(0,0,0,0.98) 100%); z-index: 4; pointer-events: none; }

.side-actions-bar { position: absolute; right: 14px; bottom: 35px; z-index: 20; display: flex; flex-direction: column; align-items: center; gap: 16px; pointer-events: auto; }
.side-action-item { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: #fff; background: none; border: none; cursor: pointer; gap: 4px; }
.side-action-btn { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 15px rgba(0,0,0,0.5); transition: transform 0.2s ease, opacity 0.2s ease; }
.side-action-btn:active { transform: scale(0.9); opacity: 0.85; }
.side-action-btn.btn-side-whatsapp { background: #25D366; }
.side-action-btn.btn-side-whatsapp svg { width: 26px; height: 26px; fill: #fff; }
.side-action-btn.btn-side-pwa {
    background: linear-gradient(135deg, #1DB954 0%, #158f3f 100%);
    border: 2px solid rgba(255,255,255,0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.side-action-btn.btn-side-pwa svg { width: 24px; height: 24px; fill: #fff; }

.side-action-btn.btn-side-radio {
    background: linear-gradient(135deg, #1DB954 0%, #158f3f 100%);
    border: 2px solid rgba(255,255,255,0.5);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-side-radio .radio-waves {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 100%;
    height: 100%;
}

.btn-side-radio .radio-waves span {
    display: block;
    width: 3px;
    background: #fff;
    border-radius: 2px;
    height: 20%;
    transition: height 0.2s ease;
}

.btn-side-radio .radio-waves span:nth-child(1) { height: 30%; }
.btn-side-radio .radio-waves span:nth-child(2) { height: 55%; }
.btn-side-radio .radio-waves span:nth-child(3) { height: 80%; }
.btn-side-radio .radio-waves span:nth-child(4) { height: 55%; }
.btn-side-radio .radio-waves span:nth-child(5) { height: 30%; }

.btn-side-radio.tocando .radio-waves span:nth-child(1) { animation: ondaSom 0.9s ease-in-out infinite; animation-delay: 0s; }
.btn-side-radio.tocando .radio-waves span:nth-child(2) { animation: ondaSom 0.9s ease-in-out infinite; animation-delay: 0.15s; }
.btn-side-radio.tocando .radio-waves span:nth-child(3) { animation: ondaSom 0.9s ease-in-out infinite; animation-delay: 0.3s; }
.btn-side-radio.tocando .radio-waves span:nth-child(4) { animation: ondaSom 0.9s ease-in-out infinite; animation-delay: 0.15s; }
.btn-side-radio.tocando .radio-waves span:nth-child(5) { animation: ondaSom 0.9s ease-in-out infinite; animation-delay: 0s; }

@keyframes ondaSom {
    0%, 100% { height: 20%; }
    50%      { height: 85%; }
}

.btn-side-radio.tocando { animation: pulsarRadioBotao 1.8s ease-out infinite; }

@keyframes pulsarRadioBotao {
    0%   { box-shadow: 0 0 0 0 rgba(29,185,84,0.7); }
    100% { box-shadow: 0 0 0 14px rgba(29,185,84,0); }
}

.side-action-label { font-size: 0.68rem; font-weight: 700; text-shadow: 0 1px 4px rgba(0,0,0,0.95); color: #fff; letter-spacing: 0.2px; white-space: nowrap; }

.article-info { position: absolute; bottom: 30px; left: 16px; right: 86px; z-index: 10; color: #fff; display: flex; flex-direction: column; gap: 8px; pointer-events: auto; }
.meta-tag { align-self: flex-start; background: #0d47a1; color: #fff; font-size: 0.72rem; font-weight: 700; padding: 4px 10px; border-radius: 4px; text-transform: uppercase; }
.meta-tag.busca-tag { background: #fe2c55; }
.meta-tag.story-tag { background: linear-gradient(135deg, #6f42c1 0%, #4a2b8a 100%); }
.article-title { font-size: 1.15rem; font-weight: 700; line-height: 1.35; text-shadow: 1px 1px 4px rgba(0,0,0,0.9); }
.action-buttons { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.btn-ler-artigo { background: #fe2c55; color: #fff; text-decoration: none; font-weight: 700; font-size: 0.92rem; padding: 11px 22px; border-radius: 30px; display: inline-flex; align-items: center; gap: 6px; box-shadow: 0 4px 14px rgba(254,44,85,0.4); }

.empty-search-slide { display: flex; flex-direction: column; justify-content: center; align-items: center; background: #0f1115; padding: 30px 20px; text-align: center; color: #fff; height: 100vh; }
.empty-search-slide h2 { font-size: 1.4rem; margin-bottom: 10px; }
.empty-search-slide p { font-size: 0.95rem; color: #aaa; margin-bottom: 20px; }

.sound-toast { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.6); background: rgba(0,0,0,0.85); color: #fff; padding: 16px 24px; border-radius: 40px; font-size: 1rem; font-weight: 600; display: flex; align-items: center; gap: 10px; z-index: 2000; opacity: 0; pointer-events: none; transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.25); }
.sound-toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.pwa-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.75); z-index: 3000; display: none; justify-content: center; align-items: flex-end; backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.pwa-modal-overlay.active { display: flex; }
.pwa-modal-box { background: #181a20; border-top: 1px solid rgba(255,255,255,0.2); border-radius: 24px 24px 0 0; padding: 24px 20px; width: 100%; max-width: 480px; color: #fff; text-align: center; animation: slideUp 0.3s ease; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.pwa-modal-box h3 { font-size: 1.25rem; margin-bottom: 12px; }
.pwa-modal-box p { font-size: 0.95rem; color: #ccc; line-height: 1.5; margin-bottom: 20px; }
.pwa-modal-box strong { color: #fe2c55; }
.btn-modal-fechar { background: #fe2c55; color: #fff; border: none; padding: 12px 28px; border-radius: 25px; font-weight: bold; font-size: 0.95rem; cursor: pointer; width: 100%; }

.radio-slide {
    background: linear-gradient(135deg, #0d47a1 0%, #001a4d 50%, #000 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    touch-action: pan-y;
}

.radio-content { text-align: center; color: #fff; max-width: 420px; width: 100%; touch-action: pan-y; -webkit-touch-callout: none; }
.radio-logo-wrapper { position: relative; display: inline-block; margin-bottom: 25px; }
.radio-logo { width: 180px; height: 180px; border-radius: 50%; box-shadow: 0 0 50px rgba(254,44,85,0.5); position: relative; z-index: 2; background: #0d47a1; object-fit: contain; padding: 10px; box-sizing: border-box; display: block; margin: 0 auto; }
.radio-pulso { position: absolute; inset: -10px; border-radius: 50%; border: 3px solid #fe2c55; opacity: 0; z-index: 1; }
.radio-slide.tocando .radio-pulso { animation: pulsarRadio 1.8s ease-out infinite; }
@keyframes pulsarRadio {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.4); opacity: 0; }
}

.radio-titulo { font-size: 1.6rem; font-weight: 900; letter-spacing: 1.5px; margin-bottom: 12px; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.radio-status { font-size: 0.95rem; color: #bbb; margin-bottom: 30px; min-height: 22px; }

.btn-radio-play { background: #fe2c55; color: #fff; border: none; padding: 18px 45px; border-radius: 50px; font-size: 1.15rem; font-weight: 900; letter-spacing: 1px; cursor: pointer; box-shadow: 0 8px 30px rgba(254,44,85,0.5); transition: transform 0.15s, box-shadow 0.2s, background-color 0.2s; display: inline-flex; align-items: center; gap: 10px; }
.btn-radio-play:active { transform: scale(0.95); }
.btn-radio-play.tocando { background: #333; box-shadow: 0 4px 15px rgba(0,0,0,0.4); }

.radio-volume-wrapper { display: flex; align-items: center; gap: 12px; margin-top: 25px; width: 100%; max-width: 320px; margin-left: auto; margin-right: auto; padding: 10px 18px; background: rgba(0,0,0,0.35); border-radius: 50px; border: 1px solid rgba(255,255,255,0.15); }
.radio-volume-icon { font-size: 1.2rem; color: #fff; user-select: none; flex-shrink: 0; }
.radio-volume-slider { flex: 1; -webkit-appearance: none; appearance: none; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.2); outline: none; cursor: pointer; }
.radio-volume-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fe2c55; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.5); border: 2px solid #fff; }
.radio-volume-slider::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fe2c55; cursor: pointer; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.5); }

.btn-voltar-videos { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.35); padding: 12px 24px; border-radius: 50px; font-size: 0.95rem; font-weight: 600; cursor: pointer; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: background-color 0.2s, transform 0.15s; }
.btn-voltar-videos:hover { background: rgba(255,255,255,0.22); }
.btn-voltar-videos:active { transform: scale(0.96); }

/* ---------- 🎬 OVERLAY "FIM DO VÍDEO" ---------- */
.video-ended-overlay {
    position: absolute;
    inset: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    background: linear-gradient(
        180deg,
        rgba(0,0,0,0.35) 0%,
        rgba(0,0,0,0.55) 50%,
        rgba(0,0,0,0.78) 100%
    );
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    touch-action: pan-y;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}
.video-ended-overlay.ativo {
    opacity: 1;
    pointer-events: auto;
}

.video-ended-arrow {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(254, 44, 85, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(254,44,85,0.6);
    animation: arrowBounce 1.6s ease-in-out infinite;
    flex-shrink: 0;
}
.video-ended-arrow svg {
    width: 28px;
    height: 28px;
    fill: #fff;
}

@keyframes arrowBounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-14px); }
}

.video-ended-text {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0,0,0,0.9);
    text-align: center;
    letter-spacing: 0.3px;
    padding: 0 24px;
    animation: textPulse 2s ease-in-out infinite;
}
@keyframes textPulse {
    0%, 100% { opacity: 0.85; }
    50%      { opacity: 1; }
}

.video-ended-subtext {
    color: rgba(255,255,255,0.65);
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    margin-top: -14px;
    padding: 0 24px;
}