﻿/* ========================================
   Importação de Fonte e Reset Básico
======================================== */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

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

/* ========================================
   Base do Body
======================================== */
body {
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
}

/* ========================================
   Cabeçalho
======================================== */
header {
    background-color: #000;
    color: #fff;
    text-align: center;
    padding: 15px;
    position: relative;
}

    header h1 {
        margin: 0;
        font-size: 1.8rem;
        font-weight: 700;
    }

        header h1 a {
            color: #fff;
            text-decoration: none;
            transition: color 0.3s ease;
        }

            header h1 a:hover {
                color: #ddd;
            }

/* ========================================
   Layout Principal
======================================== */
.content {
    max-width: 1200px;
    margin: 20px auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 0 15px;
}

/* ========================================
   Artigo (Notícia com Imagem)
======================================== */
.article {
    flex: 2;
    background: #fff;
    padding: 20px;
    margin-right: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

    .article h2 {
        font-size: 1.6rem;
        color: #000;
        font-weight: bold;
        margin-bottom: 10px;
    }

.metadata {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.article p {
    font-size: 1rem;
    color: #333;
    text-align: justify;
    margin-bottom: 15px;
}

/* ========================================
   Imagem dentro da Notícia
======================================== */
.news-image {
    width: 100%;
    margin: 15px 0;
    border-radius: 8px;
    overflow: hidden;
}

    .news-image img {
        width: 100%;
        height: auto;
        max-height: 500px;
        object-fit: cover;
        display: block;
        border-radius: 8px;
    }

/* ========================================
   Notícias sem Imagem (Cartão)
======================================== */
.news-item {
    background: #fff;
    font-size: 1.8rem;
    font-weight: bold;
    line-height: 1.4;
    color: #000;
    border: 1px solid #ddd;
    padding: 15px;
    margin: 10px 0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

    .news-item a {
        text-decoration: none;
        color: #000;
    }

        .news-item a:hover {
            color: #007bff;
        }

/* ========================================
   Botões de Compartilhamento
======================================== */
.share-buttons {
    margin: 20px 0;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

    .share-buttons button {
        background: #000;
        color: #fff;
        border: none;
        padding: 10px 20px;
        margin: 5px;
        border-radius: 5px;
        cursor: pointer;
        font-size: 1rem;
        white-space: nowrap;
    }

        .share-buttons button:hover {
            background: #444;
        }

/* ========================================
   Banners Laterais
======================================== */
.banners {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.banner-google {
    background: #ddd;
    padding: 10px;
    margin-bottom: 20px;
    text-align: center;
    width: 100%;
    max-width: 728px;
}

/* ========================================
   Footer e grid de Ads
======================================== */
footer {
    background: #000;
    color: #fff;
    text-align: center;
    padding: 20px;
    margin-top: 20px;
}

    footer p {
        margin: 0;
    }

.footer-ads .row {
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.footer-ads .col-md-3 {
    padding: 0 10px;
}

/* ========================================
   Sticky Sidebar
======================================== */
.sticky-sidebar {
    position: sticky;
    top: 20px;
}

/* ========================================
   Responsividade
======================================== */
/* Até 1024px (desktops menores) */
@media (max-width: 1024px) {
    header h1 {
        font-size: 1.6rem;
    }

    .article h2 {
        font-size: 1.5rem;
    }

    .metadata {
        font-size: 0.85rem;
    }

    .article p {
        font-size: 0.95rem;
    }
}

/* Até 768px (tablets e phones landscape) */
@media (max-width: 768px) {
    .content {
        flex-direction: column;
        padding: 0 10px;
    }

    .article {
        width: 100%;
        margin-right: 0;
    }

    .banners {
        width: 100%;
        min-width: auto;
        margin-top: 20px;
    }

    .banner-google {
        max-width: 100%;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .article h2 {
        font-size: 1.4rem;
    }

    .metadata {
        font-size: 0.8rem;
    }

    .article p {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .share-buttons button {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}

/* Até 480px (phones portrait) */
@media (max-width: 480px) {
    header h1 {
        font-size: 1.3rem;
        padding: 10px;
    }

    .article h2 {
        font-size: 1.3rem;
    }

    .metadata {
        font-size: 0.75rem;
    }

    .article p {
        font-size: 0.85rem;
    }

    .share-buttons button {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .banner-google {
        width: 200px;
        height: auto;
    }

        .banner-google ins {
            width: 100% !important;
            height: auto !important;
        }
}

/* Até 360px (telas muito pequenas) */
@media (max-width: 360px) {
    header h1 {
        font-size: 1.1rem;
    }

    .share-buttons button {
        padding: 4px 8px;
        font-size: 0.75rem;
    }

    .article {
        padding: 15px;
    }

    .banner-google {
        padding: 5px;
    }
}

/*banner flutuante */


.news-image {
    position: relative; /* necessário para posicionar o banner dentro dela */
}

.banner-sobre-imagem {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 85px 30px;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.5s ease;
}

    .banner-sobre-imagem img {
        max-width: 100%;
        height: auto;
    }

    .banner-sobre-imagem.visivel {
        opacity: 1;
    }

.fechar-banner {
    position: absolute;
    top: 4px;
    right: 8px;
    background: transparent;
    border: none;
    font-size: 20px;
    color: #000;
    cursor: pointer;
}


@media (max-width: 768px) {
    .banner-sobre-imagem {
        position: absolute;
        top: 0; /* começa no topo da imagem */
        left: 0;
        width: 100%; /* largura total da imagem/tela */
        height: 100%; /* mesma altura da imagem */
        padding: 0; /* remove espaços internos */
        background-color: rgba(255, 255, 255, 0.7); /* transparente p/ não cobrir a foto */
        display: none;
        justify-content: center;
        align-items: center;
    }

        .banner-sobre-imagem.visivel {
            opacity: 1; /* garante que fique visível */
        }

        .banner-sobre-imagem ins.banner-anuncio {
            display: block;
            width: 100% !important;
            height: 100% !important;
            max-width: none !important;
        }

    .fechar-banner {
        top: 8px; /* ajusta o “✕” dentro do novo container */
        right: 12px;
    }
}

