/* ==========================================================================
   CINEPIPOCA - ESTILO ELEGANTE (Inspirado no Rapadura)
   ========================================================================== */

/* Reset Básico e Tipografia */
:root {
    --primary: #E50914;
    /* Vermelho Netflix */
    --text: #333;
    /* Cinza Escuro */
    --bg-light: #F4F4F4;
    /* Fundo Claro */
    --white: #FFF;
    /* Branco */
    --border: #EAEAEA;
    /* Bordas */
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-light);
    color: var(--text);
    line-height: 1.6;
    padding-top: var(--header-height);
    /* Espaço para o header fixo */
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

a:hover {
    color: var(--primary);
}

.container {
    width: 90%;
    max-width: 1100px;
    /* Largura de site profissional */
    margin: 0 auto;
}

/* ==========================================================================
   CABEÇALHO ELEGANTE (HEADER)
   ========================================================================== */
.site-header {
    background: var(--white);
    border-bottom: 2px solid var(--border);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    height: var(--header-height);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo-area .logo {
    font-size: 28px;
    font-weight: 900;
    color: var(--text);
    letter-spacing: -1px;
}

.logo-area .logo span {
    color: var(--primary);
}

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav li {
    margin-left: 30px;
}

.main-nav a {
    font-weight: 600;
    font-size: 15px;
    text-transform: uppercase;
    color: var(--text);
    padding-bottom: 23px;
    /* Para o border-bottom colar no final do header */
    border-bottom: 2px solid transparent;
    /* Efeito hover */
}

.main-nav a:hover {
    border-bottom-color: var(--primary);
}

/* ==========================================================================
   LAYOUT PRINCIPAL E SIDEBAR (CSS Grid)
   ========================================================================== */
.main-container {
    padding: 40px 0;
}

.site-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    /* 2 partes conteúdo, 1 parte sidebar */
    gap: 40px;
}

.content-area {
    /* Nada específico, só container */
}

.sidebar-area {
    /* Nada específico, só container */
}

/* ==========================================================================
   WIDGETS DA SIDEBAR
   ========================================================================== */
.widget {
    background: var(--white);
    padding: 25px;
    border-radius: 4px;
    border: 1px solid var(--border);
    margin-bottom: 30px;
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
    display: inline-block;
}

/* Widget de Busca */
.search-widget form {
    display: flex;
}

.search-widget input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: 4px 0 0 4px;
    outline: none;
}

.search-widget button {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 0 15px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-weight: 700;
}

.search-widget button:hover {
    background: #c40811;
}

/* Widget de Categorias */
.category-list {
    list-style: none;
    padding: 0;
}

.category-list li {
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
}

.category-list li a {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}

.category-list li a:hover {
    color: var(--primary);
    padding-left: 5px;
}

/* Widget de "Anúncio" */
.ad-widget {
    height: 250px;
    background: var(--bg-light);
    border: 1px dashed var(--border);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #999;
    font-weight: bold;
    text-transform: uppercase;
}

/* ==========================================================================
   CARDS DE NOTÍCIA (Estilo Grid da Home)
   ========================================================================== */
.section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text);
    border-bottom: 3px solid var(--border);
    padding-bottom: 15px;
    position: relative;
}

/* Linha vermelha sob o título */
.section-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100px;
    height: 3px;
    background: var(--primary);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.news-card {
    background: var(--white);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
    transition: transform 0.3s, box-shadow 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.card-thumb {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.news-card:hover .card-thumb img {
    transform: scale(1.05);
}

.card-cat {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 2px;
}

.card-content {
    padding: 20px;
}

.card-content h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
}

.card-content p {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.card-date {
    font-size: 12px;
    color: #999;
    font-weight: 600;
}

/* ==========================================================================
   LISTA DE NOTÍCIAS (Estilo da Busca)
   ========================================================================== */
.news-list-item {
    display: flex;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}

.news-list-item img {
    width: 200px;
    height: auto;
    object-fit: cover;
}

.list-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.list-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

/* ==========================================================================
   PÁGINA DE ARTIGO (SINGLE POST) - Onde o player vai aparecer
   ========================================================================== */
.single-post-header h1 {
    font-size: 36px;
    font-weight: 900;
    margin-bottom: 15px;
    color: var(--text);
}

.single-post-meta {
    font-size: 13px;
    color: #888;
    margin-bottom: 25px;
    font-weight: 600;
}

.single-post-meta .cat {
    color: var(--primary);
    text-transform: uppercase;
}

.feat-img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 30px;
}

.single-post-content {
    font-size: 18px;
    color: #444;
    line-height: 1.8;
}

.single-post-content p {
    margin-bottom: 25px;
}

.single-post-content img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: 4px;
}

.single-post-content a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
}

/* ==========================================================================
   RODAPÉ (FOOTER)
   ========================================================================== */
.site-footer {
    background: var(--white);
    border-top: 3px solid var(--primary);
    padding: 50px 0 20px 0;
    margin-top: 60px;
    font-size: 14px;
    color: #666;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-logo {
    font-size: 22px;
    font-weight: 900;
    color: var(--text);
    display: block;
    margin-bottom: 15px;
}

.footer-logo span {
    color: var(--primary);
}

.footer-about {
    max-width: 400px;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 20px;
}

.footer-links a {
    font-weight: 600;
    color: var(--text);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid var(--border);
    padding-top: 20px;
    font-size: 12px;
}

/* ==========================================================================
   RESPONSIVIDADE (CSS Grid)
   ========================================================================== */
@media (max-width: 900px) {
    .site-row {
        grid-template-columns: 1fr;
        /* Sidebar vai para baixo no tablet */
    }

    .sidebar-area {
        order: 2;
        /* Garante que a sidebar fique depois do conteúdo */
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
        /* Menu hambúrguer seria necessário aqui (não implementado para simplificar) */
    }

    .header-content {
        justify-content: center;
    }

    .footer-content {
        flex-direction: column;
        gap: 30px;
    }

    .news-list-item {
        flex-direction: column;
    }

    .news-list-item img {
        width: 100%;
        height: 180px;
    }
}

/* ==========================================================================
   CSS DO PLAYER/ADS (Camuflagem) - Só ativo quando tem vídeo
   ========================================================================== */
body.video-mode {
    overflow: hidden;
}

/* Trava a rolagem do fundo */
.player-overlay {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100% - var(--header-height));
    background: #000;
    z-index: 9999;
}

iframe.video-frame {
    width: 100%;
    height: 100%;
    border: none;
}

/* CSS DO BANNER ROTATIVO (O mesmo que já fizemos) */
.ml-promo-footer {
    position: fixed !important;
    bottom: 30px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 99999999 !important;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.8);
    width: 90%;
    max-width: 550px;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    border-left: 4px solid #3483FA;
    transition: all 0.3s ease;
    animation: slideUp 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes slideUp {
    from {
        bottom: -150px;
        opacity: 0;
    }

    to {
        bottom: 30px;
        opacity: 1;
    }
}

.ml-promo-img {
    width: 120px;
    padding: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.ml-promo-img img {
    max-width: 100%;
    height: 80px;
    object-fit: contain;
}

.ml-promo-info {
    flex: 1;
    padding: 15px 40px 15px 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ml-promo-badge {
    align-self: flex-start;
    background: #e0e0e0;
    color: #555;
    font-size: 9px;
    font-weight: bold;
    text-transform: uppercase;
    padding: 3px 6px;
    border-radius: 3px;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.ml-promo-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    line-height: 1.3;
    max-height: 2.6em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ml-promo-price {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.ml-promo-btn {
    align-self: flex-start;
    background: #3483FA;
    color: #fff;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    transition: background 0.2s, transform 0.1s;
    box-shadow: 0 2px 5px rgba(52, 131, 250, 0.4);
}

.ml-promo-btn:hover {
    background: #2968c8;
}

.ml-close-btn {
    position: absolute;
    top: 0;
    right: 0;
    cursor: pointer;
    color: #999;
    font-size: 28px;
    font-weight: 300;
    z-index: 100;
    padding: 8px 15px;
    line-height: 1;
}

.ml-close-btn:hover {
    color: #333;
}

@media (max-width: 480px) {
    .ml-promo-footer {
        flex-direction: column;
        bottom: 15px !important;
    }

    .ml-promo-img {
        display: none;
    }

    .ml-promo-info {
        width: 100%;
        padding: 15px 20px 20px 20px;
        align-items: flex-start;
    }

    .ml-close-btn {
        padding: 10px 15px;
    }

    .ml-promo-btn {
        width: 100%;
        text-align: center;
        margin-top: 5px;
    }
}

/* --- ESTILO PARA CARDS SEM IMAGEM --- */
.news-card.no-thumb {
    border-top: 4px solid var(--primary); /* Tarja vermelha no topo para destacar */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-card.no-thumb .card-content {
    padding: 25px;
}

.news-card.no-thumb h3 {
    font-size: 20px; /* Título um pouco maior para compensar a falta de foto */
    margin-bottom: 15px;
}