/*
Theme Name: Portal V7 Notícias
Theme URI: https://portalv7.com.br
Author: Portal V7
Description: Tema jornalístico responsivo com destaques, notícias recentes e espaços publicitários.
Version: 1.0.1
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: portal-v7
*/

/* CONFIGURAÇÕES GERAIS */
:root {
    --ink: #142235;
    --red: #d72231;
    --muted: #64748b;
    --line: #e5e9ef;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    font: 16px/1.55 system-ui, -apple-system, Segoe UI, sans-serif;
    background: #fff;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: var(--red);
}

img {
    max-width: 100%;
    height: auto;
}

.wrap {
    width: min(1200px, calc(100% - 36px));
    margin: auto;
}

/* BARRA SUPERIOR */
.topbar {
    background: #101c2c;
    color: #dbe3ed;
    font-size: 12px;
    padding: 7px 0;
}

.topbar .wrap,
.brandrow,
.navinner,
.section-heading,
.footerinner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* LOGO E CABEÇALHO */
.brandrow {
    padding: 24px 0;
}

.brand {
    font-size: 36px;
    letter-spacing: -1.8px;
    font-weight: 900;
}

.brand span {
    color: var(--red);
}

.tagline {
    color: var(--muted);
    font-size: 12px;
}

/* MENU */
.nav {
    background: #17273b;
    color: white;
}

.navinner {
    min-height: 48px;
}

.nav ul {
    display: flex;
    gap: 25px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.nav a {
    font-size: 14px;
    font-weight: 700;
}

.nav a:hover {
    color: #ff9ca3;
}

/* PESQUISA */
.searchform {
    display: flex;
}

.searchform input {
    max-width: 150px;
    border: 0;
    border-radius: 4px 0 0 4px;
    padding: 8px;
}

.searchform button {
    background: var(--red);
    border: 0;
    color: white;
    padding: 8px 12px;
    cursor: pointer;
}

/* PUBLICIDADE */
.ad {
    display: grid;
    place-items: center;
    color: #8b96a4;
    background: #f3f5f8;
    border: 1px dashed #d8dfe7;
    font-size: 12px;
    min-height: 90px;
    text-align: center;
    margin: 22px auto;
}

.ad img {
    display: block;
    max-width: 100%;
    height: auto;
}

.ad-side {
    min-height: 250px;
}

/* TÍTULOS DAS SEÇÕES */
.section-heading {
    border-bottom: 2px solid #15253b;
    margin: 28px 0 18px;
}

.section-heading h2 {
    background: #15253b;
    color: white;
    font-size: 15px;
    padding: 9px 15px;
    margin: 0;
}

/* DESTAQUES */
.hero {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 22px;
}

.hero-feature {
    position: relative;
    min-height: 385px;
    background: #17273b;
    overflow: hidden;
    color: white;
}

.hero-feature img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}

.hero-feature:after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        transparent 25%,
        rgba(0, 0, 0, .85)
    );
}

.hero-copy {
    position: absolute;
    z-index: 1;
    bottom: 0;
    padding: 25px;
}

.hero-copy h2 {
    font-size: 30px;
    line-height: 1.2;
    margin: 10px 0;
}

.hero-copy a:hover {
    color: white;
}

.hero-side {
    display: grid;
    gap: 15px;
}

.hero-small {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 14px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
}

.hero-small img {
    width: 130px;
    height: 100px;
    object-fit: cover;
}

.hero-small h3 {
    font-size: 17px;
    line-height: 1.3;
    margin: 4px 0;
}

/* CATEGORIAS E DATAS */
.label {
    color: var(--red);
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 800;
}

.date {
    font-size: 12px;
    color: var(--muted);
}

/* CONTEÚDO */
.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 36px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.news-card {
    border-bottom: 1px solid var(--line);
    padding-bottom: 18px;
}

.news-card img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    background: #e6eaf0;
}

.news-card h3 {
    font-size: 20px;
    line-height: 1.3;
    margin: 10px 0;
}

.news-card p {
    font-size: 14px;
    color: #526173;
    margin: 8px 0;
}

/* BARRA LATERAL */
.sidebar-list {
    display: grid;
    gap: 15px;
}

.sidebar-item {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 12px;
}

.sidebar-item img {
    width: 90px;
    height: 70px;
    object-fit: cover;
}

.sidebar-item h3 {
    font-size: 14px;
    line-height: 1.3;
    margin: 0;
}

/* RODAPÉ */
.footer {
    background: #101c2c;
    color: white;
    margin-top: 55px;
    padding: 36px 0;
}

.footer p {
    color: #bdc8d7;
    font-size: 13px;
}

/* PAGINAÇÃO */
.pagination {
    margin: 30px 0;
}

.pagination .page-numbers {
    padding: 8px 12px;
    border: 1px solid var(--line);
    display: inline-block;
}

.pagination .current {
    background: #15253b;
    color: white;
}

/* PÁGINA DA NOTÍCIA */
.single {
    max-width: 820px;
    margin: 35px auto;
}

.single h1 {
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.15;
}

.single .featured {
    width: 100%;
    height: auto;
}

.single-content {
    font-size: 18px;
    line-height: 1.8;
}

.single-content p {
    margin-bottom: 1.3em;
}

/* MENU MOBILE */
.menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid #8794a5;
    color: white;
    padding: 6px 12px;
}

.screen-reader-text {
    position: absolute;
    left: -9999px;
}

.skip-link:focus {
    left: 10px;
    top: 10px;
    background: white;
    padding: 10px;
    z-index: 999;
}

/* TABLETS E CELULARES */
@media (max-width: 800px) {

    .hero,
    .content-grid {
        grid-template-columns: 1fr;
    }

    .hero-feature {
        min-height: 310px;
    }

    .hero-copy h2 {
        font-size: 24px;
    }

    .sidebar {
        margin-top: 20px;
    }

    .brandrow {
        flex-wrap: wrap;
        gap: 10px;
        padding: 14px 0;
    }

    .brandrow > * {
        min-width: 0;
    }

    .brandrow .ad {
        margin: 8px auto 4px;
        min-height: 0;
    }

    .menu-toggle {
        display: block;
    }

    .navinner {
        flex-wrap: wrap;
        padding: 10px 0;
    }

    .nav ul {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 10px;
        padding: 10px 0;
    }

    .nav ul.open {
        display: flex;
    }
}

/* AJUSTES EXCLUSIVOS PARA CELULARES */
@media (max-width: 540px) {

    .wrap {
        width: calc(100% - 28px);
    }

    /* CABEÇALHO MAIS COMPACTO */
    .brandrow {
        padding: 12px 0;
        gap: 8px;
    }

    .brand {
        font-size: 30px;
        line-height: 1.15;
    }

    .tagline {
        margin-top: 3px;
    }

    /* BANNER SUPERIOR */
    .brandrow .ad {
        width: 100%;
        margin: 6px 0 2px;
        min-height: 0;
    }

    .brandrow .ad img {
        width: 100%;
        height: auto;
    }

    /* MENU E PESQUISA */
    .navinner {
        padding: 8px 0;
        gap: 10px;
    }

    .searchform input {
        max-width: 110px;
    }

    /* DESTAQUE PRINCIPAL */
    .hero {
        gap: 16px;
    }

    .hero-feature {
        min-height: 290px;
    }

    .hero-copy {
        padding: 16px;
    }

    .hero-copy h2 {
        font-size: 21px;
        line-height: 1.22;
        margin: 7px 0;
        overflow-wrap: break-word;
    }

    /* DESTAQUES SECUNDÁRIOS */
    .hero-small {
        grid-template-columns: 110px minmax(0, 1fr);
        gap: 12px;
    }

    .hero-small img {
        width: 110px;
        height: 85px;
    }

    .hero-small h3 {
        font-size: 15px;
    }

    /* ÚLTIMAS NOTÍCIAS E EDITORIAS */
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .news-card h3 {
        font-size: 19px;
    }

    /* TÍTULOS DAS SEÇÕES */
    .section-heading {
        margin: 22px 0 16px;
    }

    .section-heading h2 {
        font-size: 14px;
        padding: 8px 12px;
    }

    /* ESPAÇAMENTO INFERIOR */
    .pagination {
        margin: 22px 0;
    }

    .footer {
        margin-top: 35px;
    }
}

/* PORTAL V7 - CABEÇALHO MOBILE COMPACTO */
@media (max-width: 800px) {

    .brandrow {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 12px;
        padding: 16px 0;
    }

    .header-ad {
        width: 100%;
        min-width: 0;
        margin: 0;
        padding: 0;
    }

    .header-ad .ad {
        width: 100%;
        min-height: 0;
        margin: 0;
        padding: 0;
    }

    .header-ad .v7-banner-rotator,
    .header-ad .v7-banner-slide {
        width: 100%;
    }

    .header-ad img {
        display: block;
        width: 100%;
        height: auto;
    }
}

@media (max-width: 540px) {

    .brandrow {
        gap: 10px;
        padding: 12px 0;
    }

    .brand {
        font-size: 30px;
    }

    .tagline {
        margin-top: 3px;
    }
}
