/* Configurações Gerais e Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #fcfcfc;
    color: #1a1a1a;
    line-height: 1.6;
}

/* Header do Portal */
.header {
    background-color: #c4170c;
    color: #ffffff;
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-container {
    max-width: 1200px; /* Expandido para acomodar o novo layout */
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.portal-logo {
    font-weight: 900;
    font-size: 1.4rem;
    letter-spacing: -1px;
    color: #ffffff;
    text-decoration: none;
}

.menu-check, .hamburger {
    display: none;
}

.nav-categories a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    margin-left: 15px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.2s;
}

.nav-categories a:hover, .nav-categories a.active {
    color: #ffffff;
}

/* ==========================================================================
   ESTRUTURA DE GRADES (PC / LAYOUT TRI-COLUNA)
   ========================================================================== */
.page-layout-grid {
    display: grid;
    grid-template-columns: 160px 1fr 300px; /* Esquerda(Anúncio), Centro(Notícia), Direita(Fotos) */
    gap: 40px;
    max-width: 1300px;
    margin: 40px auto;
    padding: 0 20px;
}

/* ANÚNCIO DA ESQUERDA */
.advertisement-left {
    position: sticky;
    top: 90px; /* Segue a tela ao rolar a página */
    height: 600px;
}

.ad-box {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #777;
    font-size: 0.8rem;
}

.ad-box span {
    font-weight: bold;
    font-size: 0.7rem;
    letter-spacing: 1px;
    color: #bbb;
    margin-bottom: 10px;
}

/* BARRA LATERAL DA DIREITA (FOTOS) */
.sidebar-right {
    position: sticky;
    top: 90px;
    height: fit-content;
}

.sidebar-widget h3 {
    font-size: 0.9rem;
    color: #c4170c;
    border-bottom: 2px solid #c4170c;
    padding-bottom: 5px;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.related-post {
    margin-bottom: 20px;
}

.related-post img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
    margin-bottom: 6px;
    object-fit: cover;
}

.related-post h4 {
    font-size: 0.9rem;
    line-height: 1.3;
    font-weight: 700;
    color: #333;
}

/* Container da Matéria (Ajustado para o meio da Grid) */
.main-container {
    max-width: 700px;
    margin: 0;
    padding: 0;
}

/* Detalhes do Artigo */
.article-category {
    color: #c4170c;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 10px;
}

.article-title {
    font-size: 2.5rem;
    line-height: 1.15;
    font-weight: 800;
    color: #111111;
    letter-spacing: -0.5px;
    margin-bottom: 15px;
}

.article-subtitle {
    font-size: 1.25rem;
    color: #555555;
    line-height: 1.4;
    margin-bottom: 20px;
}

/* Metadados */
.article-meta {
    font-size: 0.85rem;
    color: #666666;
    margin-bottom: 15px;
}

.author-info strong {
    color: #333333;
}

.date-info {
    margin-top: 4px;
}

.separator {
    color: #ccc;
    margin: 0 5px;
}

.divider {
    border: 0;
    height: 1px;
    background-color: #e0e0e0;
    margin-bottom: 25px;
}

/* Imagem e Legenda */
.image-container {
    margin-bottom: 30px;
}

.image-container img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
}

.image-caption {
    font-size: 0.8rem;
    color: #666666;
    margin-top: 8px;
    line-height: 1.3;
    border-left: 2px solid #ccc;
    padding-left: 8px;
}

.article-body p {
    font-size: 1.15rem;
    line-height: 1.65;
    color: #222222;
    margin-bottom: 22px;
    text-align: justify;
}

.footer {
    background-color: #f0f0f0;
    color: #666666;
    text-align: center;
    padding: 30px 20px;
    font-size: 0.85rem;
    margin-top: 60px;
    border-top: 1px solid #e0e0e0;
}

/* ANÚNCIO DA ESQUERDA (DESIGN PREMIUM) */
.advertisement-left {
    position: sticky;
    top: 90px; /* Segue a tela ao rolar a página */
    height: 450px;
}

.premium-ad-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 24px 16px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.ad-badge {
    background-color: #c4170c;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 1px;
}

.ad-title {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 800;
    margin-top: 15px;
    line-height: 1.2;
}

.ad-description {
    color: #cccccc;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 20px 0;
}

.ad-description strong {
    color: #ffffff;
    font-size: 1.1rem;
    display: block;
    margin-top: 8px;
}

.ad-button {
    background-color: #ffffff;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 12px 20px;
    border-radius: 4px;
    width: 100%;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Efeito de passar o mouse no botão do anúncio */
.ad-button:hover {
    background-color: #c4170c;
    color: #ffffff;
    transform: translateY(-2px);
}

/* ==========================================================================
   CONFIGURAÇÃO RESPONSIVA (MOBILE / ADAPTAÇÃO AUTOMÁTICA)
   ========================================================================== */
@media (max-width: 1024px) {
    /* Em telas médias ou de tablets, desfaz as 3 colunas e foca na matéria */
    .page-layout-grid {
        display: block;
        max-width: 760px;
        margin: 20px auto;
    }
    
    /* Esconde as barras laterais que não cabem no mobile */
    .advertisement-left, .sidebar-right {
        display: none;
    }

    .main-container {
        padding: 0 20px;
    }
}

@media (max-width: 600px) {
    .article-title {
        font-size: 1.85rem;
    }
    
    .article-subtitle {
        font-size: 1.1rem;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 24px;
        height: 18px;
        cursor: pointer;
    }

    .hamburger span {
        display: block;
        height: 3px;
        width: 100%;
        background-color: #ffffff;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .nav-categories {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: #b0120a;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-in-out;
    }

    .nav-categories a {
        margin: 0;
        padding: 15px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .menu-check:checked ~ .nav-categories {
        max-height: 200px;
    }

    .menu-check:checked ~ .hamburger span:nth-child(1) {
        transform: translateY(7.5px) rotate(45deg);
    }
    .menu-check:checked ~ .hamburger span:nth-child(2) {
        opacity: 0;
    }
    .menu-check:checked ~ .hamburger span:nth-child(3) {
        transform: translateY(-7.5px) rotate(-45deg);
    }
}