/* =========================================================
   Oficinas Online — tokens locais (mesma linguagem visual de
   ajude.css / acoes.css / voluntario.css / apoiadores.css / fbcast.css)
   ========================================================= */
.ofi-hero,
.ofi-playlist{
    --of-forest: #12403A;
    --of-forest-2: #1E6E5C;
    --of-verde: #4CAF50;
    --of-cream: #FBF8F2;
    --of-ink: #182420;
    --of-ink-soft: #52605B;
    --of-line: #E4DFD2;
    --of-radius: 14px;
}

/* ---------- HERO ---------- */
.ofi-hero{
    position: relative;
    overflow: hidden;
    padding: clamp(3rem, 8vw, 6rem) 0 clamp(4rem, 9vw, 7rem);
    background:
        radial-gradient(60% 90% at 85% 0%, rgba(76,175,80,.35), transparent 60%),
        linear-gradient(160deg, #0E332E 0%, #12403A 55%, #1E6E5C 100%);
    color: #fff;
    text-align: center;
}

.ofi-hero-overlay{
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(14, 51, 46, .15);
}

.ofi-hero .icones-flutuantes{ z-index: 1; }

.ofi-hero-content{
    position: relative;
    z-index: 3;
    max-width: 760px;
    margin: 0 auto;
}

.ofi-hero-content .tag-date{
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 999px;
    padding: .3rem .9rem;
    font-size: .8rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.ofi-hero-content h1{
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1.2;
    margin: 0 0 1rem;
}

.ofi-hero-sub{
    font-size: 1rem;
    line-height: 1.65;
    opacity: .92;
    margin: 0 0 1.75rem;
}

.ofi-hero-buttons{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .9rem;
}

.ofi-hero-buttons .btn-outline{
    border: 2px solid #fff;
    color: #fff;
    background: transparent;
    padding: .75rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: .03em;
    text-decoration: none;
    transition: background .18s ease, color .18s ease;
}

.ofi-hero-buttons .btn-outline:hover{
    background: #fff;
    color: var(--of-forest);
}

.ofi-hero-buttons .btn-whatsapp{
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: #FF0000;
    color: #fff;
    padding: .75rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    transition: filter .18s ease, transform .18s ease;
}

.ofi-hero-buttons .btn-whatsapp:hover{
    filter: brightness(1.1);
    transform: translateY(-2px);
}

/* ---------- Onda ---------- */
.ofi-wave{
    line-height: 0;
    position: relative;
    z-index: 2;
}

.ofi-wave svg{
    display: block;
    width: 100%;
    height: clamp(50px, 7vw, 90px);
}

.ofi-wave-front{
    fill: var(--of-cream);
}

/* ---------- VÍDEOS (grid de cards) ---------- */
.ofi-videos{
    padding: clamp(2rem, 5vw, 4rem) 0;
    background: var(--of-cream);
}

.ofi-videos-grid{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.ofi-video-card{
    display: flex;
    flex-direction: column;
    gap: .75rem;
    background: #fff;
    border: 1px solid var(--of-line);
    border-radius: var(--of-radius);
    padding: .9rem;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
}

.ofi-video-card:hover{
    transform: translateY(-3px);
    box-shadow: 0 14px 28px -20px rgba(18,64,58,.4);
}

.ofi-video-thumb{
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    background: #eee;
    border: 2px dashed var(--of-line);
    color: var(--of-forest-2);
    font-size: 1.6rem;
}

.ofi-video-thumb img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ofi-video-play{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--of-forest);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
}

/* Quando a miniatura real (buscada pelo ID do YouTube) for inserida via JS,
   a moldura tracejada de "aguardando vídeo" desaparece sozinha */
.ofi-video-thumb.ofi-video-thumb-pronta{
    border-style: solid;
    border-color: var(--of-line);
}

.ofi-video-card p{
    margin: 0;
    font-size: .92rem;
    font-weight: 600;
    color: var(--of-ink);
    line-height: 1.4;
}

/* Cards ainda sem vídeo cadastrado (data-yt vazio) */
.ofi-video-card[data-yt=""]{
    cursor: default;
}

.ofi-video-card[data-yt=""]:hover{
    transform: none;
    box-shadow: none;
}

.ofi-video-card[data-yt=""] p{
    color: var(--of-ink-soft);
    font-weight: 500;
}

/* ---------- MODAL DE VÍDEO ---------- */
.video-modal{
    position: fixed;
    inset: 0;
    background: rgba(10, 20, 20, .9);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-modal[hidden]{
    display: none;
}

.video-modal-close{
    position: absolute;
    top: 22px;
    right: 22px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--of-forest);
    color: #fff;
    border: 2px solid #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,.4);
    font-size: 1.15rem;
    cursor: pointer;
    transition: 0.3s;
}

.video-modal-close:hover{
    background: var(--of-verde);
    transform: scale(1.08);
}

.video-modal-body{
    width: min(900px, 92vw);
    aspect-ratio: 16 / 9;
}

.video-modal-body iframe{
    width: 100%;
    height: 100%;
    border-radius: 10px;
    background: #000;
}

@media (max-width: 640px){
    .video-modal-close{
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
    }
}

/* ---------- BANNER WHATSAPP ---------- */
.whatsapp-banner{
    background: #12403A;
    padding: 2.5rem 0;
}

.whatsapp-banner-content{
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    color: #fff;
}

.whatsapp-banner-content i{
    font-size: 2.4rem;
    color: #25D366;
    flex: 0 0 auto;
}

.whatsapp-banner-content div{
    flex: 1 1 260px;
}

.whatsapp-banner-content h2{
    margin: 0 0 .25rem;
    font-size: 1.25rem;
}

.whatsapp-banner-content p{
    margin: 0;
    opacity: .85;
    font-size: .92rem;
}

.whatsapp-banner-content a{
    flex: 0 0 auto;
    background: #25D366;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    padding: .7rem 1.4rem;
    border-radius: 999px;
    transition: filter .18s ease, transform .18s ease;
}

.whatsapp-banner-content a:hover{
    filter: brightness(1.08);
    transform: translateY(-2px);
}

/* ---------- Responsivo ---------- */
@media (max-width: 640px){
    .ofi-player-wrap{
        aspect-ratio: 9 / 14; /* dá mais altura no celular pra caber o painel de miniaturas do YouTube ao lado */
    }

    .whatsapp-banner-content{
        text-align: center;
        justify-content: center;
    }
}
