/* styles.css - Versão otimizada para mobile */
:root {
    --vermelho-g1: #d32f2f;
    --vermelho-escuro: #b71c1c;
    --cinza-texto: #333;
    --cinza-secundario: #666;
    --cinza-borda: #e5e5e5;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    background-color: #fff;
    color: var(--cinza-texto);
    line-height: 1.6;
}

/* Menu de Navegação */
.navMenu {
    display: flex;
    align-items: center;
    background: white;
    padding: 5px;
    overflow-x: auto;
    white-space: nowrap;
    scroll-behavior: smooth;
    border-bottom: 2px solid #ddd;
    scrollbar-width: none;
}

.navMenu::-webkit-scrollbar {
    display: none;
}

.navMenu a {
    text-decoration: none;
    font-size: 0.75em;
    text-transform: uppercase;
    font-weight: 600;
    display: inline-block;
    padding: 5px 10px;
    color: var(--item-color, #333);
    transition: all 0.3s;
    position: relative;
    flex-shrink: 0;
}

.navMenu a:last-child {
    margin-left: auto !important;
}

.navMenu a::after {
    content: "";
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--item-color, #333);
    position: absolute;
    bottom: -5px;
    left: 0;
    transition: 0.3s;
    opacity: 0;
}

.navMenu a:hover::after {
    opacity: 1;
}

.login-icon {
    margin-right: 5px;
    vertical-align: middle;
    transition: all 0.3s;
    display: inline-block;
}

.navMenu a:hover .login-icon {
    transform: scale(1.1);
    stroke: var(--item-color);
}

/* Cabeçalho */
header {
    background: var(--vermelho-g1);
    color: #fff;
    padding: 15px;
    text-align: center;
    position: relative;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 15px;
    position: relative;
    gap: 15px;
}

.site-title-link {
    text-decoration: none;
    color: white;
    flex: 1;
    min-width: 0;
}

header h1 {
    margin: 0;
    padding: 0 20px;
    font-size: 1.5rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

/* Formulário de Busca */
.search-form {
    position: relative;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    z-index: 100;
}

.search-form.compact {
    width: auto;
    overflow: hidden;
}

.search-form.compact input {
    display: none;
}

.search-form.compact button {
    background: transparent;
    color: white;
    border: none;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.search-form.compact button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.search-form.expanded {
    width: 250px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.search-form.expanded input {
    display: block;
    padding: 8px 12px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 0.9rem;
    width: 100%;
}

.search-form.expanded button {
    padding: 8px 12px;
    background: var(--vermelho-g1);
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.search-form.expanded button:hover {
    background: var(--vermelho-escuro);
}

.search-icon {
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.search-text {
    display: none;
}

.search-text-mobile {
    display: none;
}

/* Layout Principal */
main {
    max-width: 1000px;
    margin: 20px auto;
    padding: 0 15px;
}

.conteudo-principal {
    display: grid;
    grid-template-areas:
        "noticias tempo";
    grid-template-columns: 1fr 200px;
    gap: 30px;
}

/* Destaque Principal */
.destaque-principal {
    position: relative;
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.destaque-principal a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.destaque-principal img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s;
}

.destaque-principal:hover img {
    transform: scale(1.02);
}

.texto-sobre-imagem {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.4));
    color: white;
    max-height: 30%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.destaque-principal h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    line-height: 1.2;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-align: justify;
    hyphens: auto;
}

.destaque-principal p {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-align: justify;
    hyphens: auto;
}

.destaque-principal .data {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 5px;
}

.leia-mais {
    display: inline-block;
    color: white;
    font-weight: 600;
    text-decoration: none;
    margin-top: 5px;
    border: 1px solid white;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 0.85rem;
    align-self: flex-start;
    background-color: rgba(211, 47, 47, 0.3);
}

.leia-mais:hover {
    background: white;
    color: var(--vermelho-g1);
}

/* Listagem de Notícias */
.noticias {
    grid-area: noticias;
}

.noticias-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.noticia {
    position: relative;
    transition: transform 0.3s ease;
    padding-bottom: 20px;
}

.noticia:not(:last-child)::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--cinza-borda);
}

.noticia:hover {
    transform: translateY(-5px);
}

.noticia-link {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
}

.noticia img {
    width: 250px;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    transition: transform 0.3s;
}

.noticia:hover img {
    transform: scale(1.03);
}

.noticia-content {
    flex: 1;
}

.noticia-titulo {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--vermelho-g1);
    transition: color 0.3s;
    text-align: justify;
    hyphens: auto;
}

.noticia-link:hover .noticia-titulo {
    color: var(--vermelho-escuro);
}

.noticia p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.9rem;
    color: var(--cinza-secundario);
    margin-bottom: 10px;
    text-align: justify;
    hyphens: auto;
}

.noticia-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.data {
    font-size: 0.8rem;
    color: var(--cinza-secundario);
}

.noticia .leia-mais {
    display: inline;
    color: var(--vermelho-g1);
    font-weight: 600;
    text-decoration: none;
    margin-top: 0;
    border: none;
    padding: 0;
    border-radius: 0;
    background-color: transparent;
    transition: color 0.3s;
}

.noticia .leia-mais:hover {
    color: var(--vermelho-escuro);
    background-color: transparent;
    text-decoration: underline;
}

/* Previsão do Tempo */
.previsao-tempo {
    grid-area: tempo;
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 20px;
    align-self: start;
    width: 200px;
    margin-left: auto;
}

.previsao-tempo h3 {
    color: #d32f2f;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e5e5;
    font-size: 1rem;
}

#ww_98360fdba7797 {
    width: 100% !important;
    border-radius: 6px;
    overflow: hidden;
}

/* Paginação */
.paginacao {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
    gap: 15px;
}

.paginacao a {
    color: var(--vermelho-g1);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 15px;
    border-radius: 4px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.paginacao a:hover {
    background-color: #f5f5f5;
}

.pagina-atual {
    font-weight: 600;
    color: var(--cinza-secundario);
}

/* Rodapé */
.rodape {
    background: #333;
    color: #fff;
    padding: 30px 0;
    text-align: center;
    margin-top: 50px;
    border-top: 4px solid var(--vermelho-g1);
}

.rodape .container {
    max-width: 1000px;
    margin: 0 auto;
}

.rodape-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.rodape-links a {
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    transition: opacity 0.3s;
}

.rodape-links a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.rodape p {
    margin: 5px 0;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
}

/* Responsividade */
@media (max-width: 900px) {
    .conteudo-principal {
        grid-template-areas:
            "noticias"
            "tempo";
        grid-template-columns: 1fr;
    }
    
    .previsao-tempo {
        position: static;
        margin: 30px auto;
        width: 80%;
        max-width: 360px;
        padding: 20px;
    }
    
    #ww_98360fdba7797 {
        min-height: 180px;
        margin: 0 auto;
    }
    
    .destaque-principal img {
        height: 350px;
    }
    
    .texto-sobre-imagem {
        max-height: 35%;
    }
    
    header h1 {
        padding: 0 20px;
    }
}

@media (max-width: 768px) {
    /* Header otimizado para mobile */
    header {
        padding: 10px 15px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: auto;
        min-height: 60px;
    }
    
    .header-container {
        flex-direction: row;
        width: 100%;
        padding: 0;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }
    
    header h1 {
        margin: 0;
        padding: 0;
        font-size: 1.2rem;
        text-align: left;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: calc(100% - 50px);
        line-height: 1.3;
    }
    
    .search-form {
        position: static;
        margin: 0;
        transform: none;
        width: auto;
    }
    
    .search-form.compact {
        width: auto;
    }
    
    .search-form.compact .search-text-mobile {
        display: none;
    }
    
    .search-form.compact button {
        padding: 8px;
        background: transparent !important;
        color: white !important;
        border: none !important;
    }
    
    .search-form.compact button:hover {
        background: rgba(255, 255, 255, 0.1) !important;
    }
    
    .search-icon {
        font-size: 1.1rem;
        margin: 0 !important;
    }
    
    /* Estilo para o campo expandido em mobile */
    .search-form.expanded {
        position: fixed;
        top: 60px;
        right: 15px;
        left: 15px;
        width: auto;
        z-index: 1000;
        background: white;
        border-radius: 4px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    }
    
    .search-form.expanded input {
        display: block;
        width: 100%;
    }
    
    .search-form.expanded button {
        background: var(--vermelho-g1) !important;
        color: white !important;
    }
    
    /* Outros ajustes para mobile */
    .destaque-principal img {
        height: 300px;
    }
    
    .destaque-principal h2 {
        font-size: 1.3rem;
    }
    
    .destaque-principal p {
        font-size: 0.9rem;
    }
    
    .texto-sobre-imagem {
        padding: 12px 15px;
    }
    
    .noticia-link {
        flex-direction: column;
    }
    
    .noticia img {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .destaque-principal img {
        height: 250px;
    }
    
    .destaque-principal h2 {
        font-size: 1.1rem;
        -webkit-line-clamp: 1;
    }
    
    .destaque-principal p {
        font-size: 0.8rem;
        -webkit-line-clamp: 1;
    }
    
    .leia-mais {
        padding: 3px 6px;
        font-size: 0.75rem;
    }
    
    .texto-sobre-imagem {
        max-height: 40%;
    }
    
    .paginacao {
        flex-direction: column;
    }
    
    .navMenu a {
        font-size: 0.65em;
        padding: 4px 8px;
    }
    
    .previsao-tempo {
        width: 85%;
        padding: 15px;
    }
    
    #ww_98360fdba7797 {
        min-height: 160px;
    }
}
/* ========== ESTILOS PARA NOTICIA.PHP ========== */
.noticia-completa {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.noticia-completa h2 {
    font-size: 1.8rem;
    color: var(--vermelho-g1);
    margin-bottom: 10px;
    line-height: 1.3;
    text-align: left;
}

.noticia-completa .data {
    display: block;
    font-size: 0.9rem;
    color: var(--cinza-secundario);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--cinza-borda);
}

.imagem-destaque {
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.imagem-destaque img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    transition: transform 0.3s;
}

.imagem-destaque:hover img {
    transform: scale(1.02);
}

.conteudo-noticia {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--cinza-texto);
    margin: 30px 0;
    text-align: justify;
}

.conteudo-noticia p {
    margin-bottom: 20px;
}

.voltar-link {
    display: inline-block;
    color: var(--vermelho-g1);
    font-weight: 600;
    text-decoration: none;
    margin-top: 30px;
    padding: 8px 15px;
    border: 1px solid var(--vermelho-g1);
    border-radius: 4px;
    transition: all 0.3s;
}

.voltar-link:hover {
    background-color: var(--vermelho-g1);
    color: white;
}

.noticia-nao-encontrada {
    max-width: 800px;
    margin: 50px auto;
    padding: 30px;
    text-align: center;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.noticia-nao-encontrada h2 {
    color: var(--vermelho-g1);
    margin-bottom: 20px;
}

.noticia-nao-encontrada p {
    margin-bottom: 20px;
    color: var(--cinza-secundario);
}

/* Responsividade para noticia.php */
@media (max-width: 768px) {
    .noticia-completa {
        padding: 15px;
    }
    
    .noticia-completa h2 {
        font-size: 1.5rem;
    }
    
    .imagem-destaque img {
        max-height: 350px;
    }
    
    .conteudo-noticia {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .noticia-completa h2 {
        font-size: 1.3rem;
    }
    
    .imagem-destaque img {
        max-height: 250px;
    }
    
    .conteudo-noticia {
        font-size: 0.95rem;
    }
    
    .voltar-link {
        width: 100%;
        text-align: center;
    }
}