/* =====================================================================
   Pagina inicial
   - blocos por categoria, gerados pelo admin (Noticia::updateFileHomeCategorias)
   - quadro de previsao do tempo da lateral (res/site/js/previsao-tempo.js)
   ===================================================================== */

/* ---------- Blocos por categoria ---------- */
.home-cats {
    padding-top: 5px;
}

.home-cat {
    margin-bottom: 6px;
}

.home-cat-item {
    margin-bottom: 30px;
}

/* foto como <img loading="lazy">, no lugar do fundo em CSS que baixava tudo de uma vez */
.home-cat-foto {
    overflow: hidden;
    background-color: #eee;
}

.home-cat-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* equivale ao bg-img3: noticia marcada para nao manter a proporcao */
.home-cat-img-esticar {
    object-fit: fill;
}

.home-cat-cidade {
    display: block;
    margin-bottom: 3px;
    font-family: Roboto-Regular, Arial, sans-serif;
    font-size: 13px;
    color: #999;
}

.home-cat-propaganda {
    margin: 4px 0 40px;
}

/* no celular a primeira noticia fica grande e as outras viram lista compacta */
@media (max-width: 575px) {
    .home-cat-item {
        margin-bottom: 18px;
    }

    .home-cat-item + .home-cat-item {
        display: flex;
        align-items: flex-start;
    }

        .home-cat-item + .home-cat-item .size-a-5 {
            flex: 0 0 116px;
            width: 116px;
            height: 78px;
        }

        .home-cat-item + .home-cat-item .home-cat-texto {
            flex: 1 1 auto;
            min-width: 0;
            padding: 0 0 0 12px;
        }

        .home-cat-item + .home-cat-item h5 {
            padding-bottom: 0;
        }

            .home-cat-item + .home-cat-item h5 a {
                font-size: 15px;
                line-height: 1.35;
            }

    .home-cat-propaganda {
        margin-bottom: 26px;
    }
}

/* ---------- Previsao do tempo ---------- */
.tempo {
    margin-top: 30px;
}

.tempo-corpo {
    padding: 18px 18px 14px;
    border: 1px solid #e6e6e6;
    border-top: 0;
}

.tempo-local {
    font-family: Roboto-Medium, Arial, sans-serif;
    font-size: 12px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #888;
}

.tempo-cidade {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
}

/* rotulo so para leitores de tela; o seletor ja mostra a cidade */
.tempo-rotulo {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.tempo-select {
    max-width: 100%;
    padding: 3px 22px 3px 0;
    border: 0;
    border-bottom: 1px dashed #bbb;
    border-radius: 0;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23777' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") no-repeat right 4px center / 10px 6px;
    font-family: Roboto-Medium, Arial, sans-serif;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #555;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

    .tempo-select:focus-visible {
        outline: 2px solid #1d25fa;
        outline-offset: 2px;
    }

.tempo-localizar {
    padding: 0;
    border: 0;
    background: none;
    font-family: Roboto-Regular, Arial, sans-serif;
    font-size: 12px;
    color: #1d25fa;
    text-decoration: underline;
    cursor: pointer;
}

.tempo-aviso {
    margin: 8px 0 0;
    font-family: Roboto-Regular, Arial, sans-serif;
    font-size: 12px;
    color: #8a5a00;
}

/* esqueleto exibido ao trocar de cidade, no lugar da previsao anterior */
.esq {
    display: block;
    border-radius: 4px;
    background: linear-gradient(90deg, #eceef2 25%, #f7f8fa 50%, #eceef2 75%);
    background-size: 200% 100%;
    animation: esq-brilho 1.2s ease-in-out infinite;
}

.esq-icone {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    margin-right: 14px;
    border-radius: 50%;
}

.esq-numero {
    width: 84px;
    height: 36px;
    margin: 6px 0;
}

.esq-linha {
    height: 12px;
    margin-top: 8px;
}

.esq-curta {
    width: 70px;
}

.esq-media {
    width: 60%;
}

.esq-longa {
    width: 90%;
    margin-top: 16px;
}

.esq-fonte {
    width: 55%;
    height: 10px;
    margin: 14px 0 0 auto;
}

.esq-dia-icone {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    margin-right: 8px;
    border-radius: 50%;
}

.esq-dia-textos {
    flex: 1 1 auto;
}

    .esq-dia-textos .esq-linha:first-child {
        margin-top: 0;
    }

.tempo-esqueleto .tempo-temps {
    flex: 1 1 auto;
}

.tempo-esqueleto .tempo-proximos {
    margin-top: 18px;
}

@keyframes esq-brilho {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .esq {
        animation: none;
    }
}

.tempo-hoje {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.tempo-icone {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    margin-right: 14px;
}

    .tempo-icone svg,
    .tempo-dia-icone svg {
        display: block;
        width: 100%;
        height: 100%;
    }

.tempo-temps {
    display: flex;
    flex-direction: column;
}

.tempo-periodo {
    font-family: Roboto-Regular, Arial, sans-serif;
    font-size: 13px;
    color: #666;
}

.tempo-max {
    font-family: Roboto-Bold, Arial, sans-serif;
    font-size: 36px;
    line-height: 1.1;
    color: #222;
}

    .tempo-max small {
        margin-left: 5px;
        font-family: Roboto-Regular, Arial, sans-serif;
        font-size: 13px;
        color: #888;
    }

.tempo-min {
    font-family: Roboto-Regular, Arial, sans-serif;
    font-size: 14px;
    color: #1d25fa;
}

.tempo-resumo {
    margin: 12px 0 0;
    font-family: Roboto-Regular, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.45;
    color: #444;
}

.tempo-extra {
    margin: 6px 0 0;
    font-family: Roboto-Regular, Arial, sans-serif;
    font-size: 13px;
    color: #888;
}

.tempo-proximos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #eee;
}

.tempo-dia {
    display: flex;
    align-items: center;
    min-width: 0;
}

.tempo-dia-icone {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    margin-right: 8px;
}

.tempo-dia-nome {
    display: block;
    font-family: Roboto-Medium, Arial, sans-serif;
    font-size: 13px;
    color: #333;
}

.tempo-dia-temps {
    font-family: Roboto-Regular, Arial, sans-serif;
    font-size: 13px;
    color: #666;
}

.tempo-fonte {
    margin: 12px 0 0;
    font-family: Roboto-Regular, Arial, sans-serif;
    font-size: 11px;
    text-align: right;
    color: #aaa;
}

    .tempo-fonte a {
        color: inherit;
        text-decoration: underline;
    }

        .tempo-fonte a:hover {
            color: #1d25fa;
        }
