/* ================================================
   O Popular — Folha de estilos principal
   Inspirado no design do opopular.com.br
   ================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    line-height: 1.15;
}

:root {
    --red:       #c8102e;
    --dark-red:  #8b0000;
    --dark:      #1a1a1a;
    --dark2:     #2d2d2d;
    --gray:      #555;
    --light-gray:#f4f4f4;
    --border:    #e0e0e0;
    --white:     #ffffff;
    --font:      'Merriweather', Georgia, serif;
    --font-ui:   'Source Sans Pro', Arial, sans-serif;
}

body {
    font-family: var(--font-ui);
    background: var(--white);
    color: var(--dark);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button,
input,
select,
textarea {
    font: inherit;
}

img {
    border-style: none;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ── Topbar ── */
.topbar {
    background: var(--dark2);
    color: #aaa;
    font-size: 12px;
}
.topbar .inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 6px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.topbar .partners a {
    color: #bbb;
    margin-right: 14px;
    font-size: 11px;
    letter-spacing: .5px;
    text-transform: uppercase;
}
.topbar .partners a:hover { color: var(--white); text-decoration: none; }
.topbar .date-time { font-size: 11px; color: #fff; }


/* ── Header principal ── */
.site-header {
    background: var(--white);
    border-bottom: 3px solid var(--red);
    height: 61px;
    box-sizing: border-box;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 6px rgba(0,0,0,.12);
}

@supports not (position: sticky) {
    .site-header {
        position: static;
    }
}
.site-header .inner {
    max-width: 1280px;
    margin: 0 auto;
    height: 100%;
    padding: 0 16px;
    display: grid;
    grid-template-columns: 1fr 316px 1fr;
    align-items: center;
    gap: 16px;
}
.site-logo img { height: 40px; width: auto; }
.site-logo h1 {
    font-size: 28px;
    font-family: var(--font);
    font-weight: 900;
    color: var(--red);
    letter-spacing: -1px;
}
.site-logo {
    text-decoration: none;
    justify-self: start;
}
.site-logo:hover {
    text-decoration: none;
}
.header-center-ad {
    width: 316px;
    height: 58px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    align-self: start;
}
.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    justify-self: end;
    width: 100%;
}
.header-search-form {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 316px;
}
.header-search-input {
    height: 34px;
    width: 220px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0 10px;
    font-size: 13px;
    background: #fff;
    flex: 0 0 220px;
}
.header-search-input:focus {
    outline: none;
    border-color: var(--red);
}
.header-search-btn {
    height: 34px;
    width: 90px;
    border: 1px solid var(--red);
    background: var(--red);
    color: #fff;
    border-radius: 4px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.header-search-btn:hover {
    background: var(--dark-red);
    border-color: var(--dark-red);
}
.btn-assine {
    background: var(--red);
    color: var(--white);
    border: none;
    border-radius: 4px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: .5px;
    text-transform: uppercase;
}
.btn-assine:hover { background: var(--dark-red); }

/* ── Navegação ── */
.main-nav {
    background: var(--dark);
    position: sticky;
    top: 61px;
    z-index: 95;
    overflow: visible;
}

@supports not (position: sticky) {
    .main-nav {
        position: static;
    }
}
.main-nav .inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    overflow: visible;
    scrollbar-width: none;
}
.main-nav .inner::-webkit-scrollbar { display: none; }
.main-nav a {
    color: #ddd;
    display: inline-block;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .3px;
    text-transform: uppercase;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: color .2s, border-color .2s;
}
.main-nav a:hover, .main-nav a.active {
    color: var(--white);
    border-bottom-color: var(--cat-color, var(--red));
    text-decoration: none;
}
.main-nav .nav-item-with-submenu {
    position: relative;
    display: inline-flex;
    flex-direction: column;
}
.main-nav .nav-item-with-submenu > a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.main-nav .nav-caret {
    font-size: 10px;
    line-height: 1;
    opacity: .85;
    transition: transform .2s ease;
}
.main-nav .nav-item-with-submenu:hover .nav-caret,
.main-nav .nav-item-with-submenu:focus-within .nav-caret {
    transform: rotate(180deg);
}
.main-nav .nav-submenu {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 230px;
    background: #1f1f1f;
    border: 1px solid #343434;
    border-top: 0;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .25);
    z-index: 120;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transform: translateY(-4px);
    transition: max-height .2s ease, opacity .18s ease, transform .18s ease;
}
.main-nav .nav-item-with-submenu:hover .nav-submenu,
.main-nav .nav-item-with-submenu:focus-within .nav-submenu {
    max-height: 120px;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.main-nav .nav-submenu a {
    display: block;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: .1px;
    border-bottom: 1px solid #2e2e2e;
    border-left: 3px solid transparent;
    border-top: 0;
    border-right: 0;
    color: #e4e4e4;
}
.main-nav .nav-submenu a:last-child {
    border-bottom: 0;
}
.main-nav .nav-submenu a:hover,
.main-nav .nav-submenu a.active {
    border-left-color: var(--cat-color, var(--red));
    border-bottom-color: #2e2e2e;
    color: #fff;
}

@media (max-width: 1024px) {
    .main-nav .inner {
        overflow-x: auto;
        overflow-y: hidden;
    }
}

/* ── Layout principal ── */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Bloco semântico para área de destaque no topo */
.destaque-topo {
    width: 100%;
    display: block;
}

/* ── Destaque (hero) ── */
.hero-section {
    padding: 28px 0 0;
}
.hero-caption .categoria-tag,
.topo-card-body .categoria-tag,
.topo-circular-text .categoria-tag {
    display: inline-block;
    background: var(--red);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 2px;
    margin-bottom: 8px;
}

.destaque-topo-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 18px;
    align-items: start;
}
.topo-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    grid-auto-rows: 1fr;
}
.topo-cards-grid .topo-image-wrap {
    height: 260px;
    min-height: 260px;
    padding-bottom: 0;
}
.topo-cards-grid .topo-card:not(.topo-card-charge) .topo-image-wrap {
    flex: 1;
    height: auto;
}
.topo-cards-grid .topo-card-charge .topo-image-wrap {
    height: 260px;
}
.topo-cards-grid .topo-card-charge .topo-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.topo-card {
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}
.topo-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.topo-image-wrap {
    display: block;
    width: 100%;
    height: 0;
    padding-bottom: 58%;
    position: relative;
    overflow: hidden;
}
.topo-image-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.topo-card-body {
    padding: 10px 14px 10px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-height: 88px;
}
.topo-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.topo-card-body .topo-title-lg,
.topo-card-body .topo-title-md {
    align-self: stretch;
}
.topo-card-body .topo-title-lg,
.topo-card-body .topo-title-md {
    margin: auto 0 0;
}
.topo-card-charge {
    position: relative;
}
.topo-card-charge .topo-card-body {
    display: none;
}
.topo-card-charge .topo-image-wrap {
    flex: 1;
    padding-bottom: 0;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}
.topo-card-charge .topo-image-wrap img {
    position: static;
    width: 100%;
    height: auto;
    object-fit: contain;
}
.topo-title-lg {
    font-size: 20px;
    line-height: 1.25;
    font-family: var(--font);
    font-weight: 800;
}
.topo-title-lg a,
.topo-title-md a,
.topo-circular-text h4 a {
    color: var(--dark);
    text-decoration: none;
}
.topo-title-md {
    font-size: 20px;
    line-height: 1.25;
    font-family: var(--font);
    font-weight: 800;
}
.topo-title-lg a:hover,
.topo-title-md a:hover,
.topo-circular-text h4 a:hover {
    color: var(--red);
}
.topo-card-summary {
    margin-top: 8px;
    color: #4c4c4c;
    font-size: 14px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.topo-circulares {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
.topo-circular-item {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: flex-start;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}
.topo-circular-item:last-child { border-bottom: none; padding-bottom: 0; }
.topo-circular-thumb {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    overflow: hidden;
    display: block;
    border: 2px solid #efefef;
}
.topo-circular-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    width: 316px;
}
.topo-circular-text h4 {
    font-size: 14px;
    line-height: 1.35;
    font-family: var(--font);
    font-weight: 700;
}
.topo-circular-text {
    flex: 1;
    flex: 0 0 220px;
    min-width: 0;
}
.topo-circular-manual-ad {
    width: 100%;
    margin-top: 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}
.topo-circular-manual-ad-link {
    display: block;
}
.topo-circular-manual-ad-link:hover {
    text-decoration: none;
}
.topo-circular-manual-ad-link img {
    width: 100%;
    height: auto;
    display: block;
}

/* ── Publicidades da home ── */
.ad-slot {
    margin: 22px 0;
}
.ad-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #7a7a7a;
    letter-spacing: .7px;
    margin-bottom: 6px;
}
.ad-box {
    border: 1px solid #ddd;
    background: repeating-linear-gradient(
        45deg,
        #f4f4f4,
        #f4f4f4 10px,
        #efefef 10px,
        #efefef 20px
    );
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}
.ad-box span {
    font-size: 13px;
    color: #707070;
    font-weight: 700;
    background: rgba(255,255,255,.78);
    padding: 6px 10px;
    border-radius: 4px;
}
.managed-ad {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.managed-ad img,
.managed-ad iframe {
    display: block;
    max-width: 100%;
    margin: 0 auto;
}
.managed-ad script {
    max-width: 100%;
}
.managed-ad-header_center_search_316x34 {
    width: 316px;
    height: 61px;
    margin: 0;
    padding: 0;
}
.managed-ad-header_center_search_316x34 img,
.managed-ad-header_center_search_316x34 iframe,
.managed-ad-header_center_search_316x34 a {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}
.managed-ad-header_center_search_316x34 img {
    object-fit: cover;
}
.ad-box-970x150 {
    width: 100%;
    max-width: 970px;
    height: 150px;
    margin: 0 auto;
}
.ad-box-728x90 {
    width: 100%;
    max-width: 728px;
    height: 90px;
    margin: 0 auto;
}
.ad-box-300x250 {
    width: 100%;
    max-width: 300px;
    height: 250px;
}
.ad-box-300x600 {
    width: 100%;
    max-width: 300px;
    height: 600px;
}
.ad-box-header-search {
    width: 316px;
    max-width: 316px;
    height: 61px;
    margin: 0;
    padding: 0;
    border-radius: 0;
}

/* ── Widget de Charge no rail lateral ─────────────── */
.charge-ad-slot {
    padding: 0 !important;
}
.charge-ad-widget {
    display: block;
    width: 100%;
    max-width: 300px;
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none;
    border: 1px solid #e8e8e8;
    transition: opacity .2s;
}
.charge-ad-widget:hover {
    opacity: .88;
}
.charge-ad-widget img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
}

.home-with-ads {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    align-items: start;
}
.home-main-sections {
    min-width: 0;
}
.home-ads-rail {
    position: sticky;
    top: 88px;
}
.ad-slot-rail {
    margin-top: 0;
    margin-bottom: 18px;
}
.ad-slot-inline {
    padding: 8px 0 2px;
    border-bottom: 1px solid #ececec;
}

/* ── Seção de categoria ── */
.section-block { padding: 28px 0; border-top: 3px solid var(--light-gray); }
.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}
.section-header h2 {
    font-size: 18px;
    font-family: var(--font);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .5px;
    border-left: 4px solid var(--red);
    padding-left: 10px;
}
.section-header a.ver-mais {
    margin-left: auto;
    font-size: 12px;
    color: var(--red);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.section-header a.ver-mais:hover { text-decoration: underline; }

/* Grid de cards ── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
.card {
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: box-shadow .2s;
}
.card:hover { box-shadow: 0 4px 18px rgba(0,0,0,.12); }
.card-img { position: relative; overflow: hidden; height: 180px; background: var(--light-gray); }
.card-img img { width: 100%; height: 180px; object-fit: cover; transition: transform .3s; }
.card:hover .card-img img { transform: scale(1.04); }
.card-body { padding: 14px; }
.card-category {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--red);
    letter-spacing: .5px;
    margin-bottom: 6px;
}
.card-title {
    font-size: 15px;
    font-family: var(--font);
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 8px;
}
.card-title a { color: var(--dark); }
.card-title a:hover { color: var(--red); text-decoration: none; }
.card-subtitle {
    font-size: 13px;
    color: var(--gray);
    line-height: 1.4;
}
.card-date {
    font-size: 11px;
    color: #999;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.card-date-author {
    margin-left: auto;
    text-align: right;
    white-space: nowrap;
}

/* ── Sem imagem ── */
.no-image-placeholder {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #c8102e22, #c8102e11);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--red);
    font-size: 40px;
    opacity: .5;
}

/* ── Footer ── */
.site-footer {
    background: var(--dark);
    color: #aaa;
    padding: 40px 0 20px;
    margin-top: 40px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}
.footer-col h4 {
    color: var(--white);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .8px;
    margin-bottom: 14px;
    border-bottom: 1px solid #444;
    padding-bottom: 8px;
}
.footer-col a {
    display: block;
    color: #999;
    font-size: 13px;
    margin-bottom: 6px;
}
.footer-col a:hover { color: var(--white); text-decoration: none; }
.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 16px;
    text-align: center;
    font-size: 12px;
    color: #666;
}

/* ── Institucional ── */
.institucional-page {
    padding-top: 32px;
    padding-bottom: 46px;
}
.institucional-grid {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}
.institucional-sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fb 100%);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    position: sticky;
    top: 110px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}
.institucional-sidebar h2 {
    font-family: var(--font);
    font-size: 22px;
    margin-bottom: 14px;
}
.institucional-sidebar a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    font-weight: 700;
    color: var(--dark2);
    border: 1px solid transparent;
    transition: background .2s, color .2s, border-color .2s;
}
.institucional-sidebar a.active,
.institucional-sidebar a:hover {
    background: #fff5f6;
    color: var(--red);
    border-color: #f0b8c1;
    text-decoration: none;
}
.institucional-content {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
}
.institucional-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 12px;
    color: #70757d;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: .4px;
}
.institucional-breadcrumb a {
    color: #565c65;
    font-weight: 700;
}
.institucional-breadcrumb a:hover {
    color: var(--red);
    text-decoration: none;
}
.institucional-kicker {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 12px;
}
.institucional-content h1 {
    font-family: var(--font);
    font-size: 34px;
    line-height: 1.12;
    margin-bottom: 12px;
}
.institucional-lead {
    font-size: 19px;
    color: #4f5966;
    margin-bottom: 22px;
}
.institucional-content p {
    font-size: 17px;
    line-height: 1.75;
    margin-bottom: 15px;
    color: #2c2c2c;
}
.institucional-box {
    margin-top: 24px;
    border: 1px solid #e4e9ef;
    border-top: 4px solid var(--red);
    border-radius: 10px;
    background: linear-gradient(180deg, #fbfcfe 0%, #f5f7fa 100%);
    padding: 20px;
}
.institucional-box h3 {
    font-size: 22px;
    margin-bottom: 10px;
    font-family: var(--font);
}

.institucional-content-contato .institucional-box {
    margin-top: 18px;
}

.institucional-form-note {
    margin-bottom: 12px;
    font-size: 13px;
    color: #667081;
}

.institucional-alert {
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 12px;
}

.institucional-alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c2c7;
}

.institucional-alert-success {
    background: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.institucional-form-contato {
    margin-top: 14px;
}

.institucional-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.institucional-form-contato .form-group {
    margin: 0;
}

.institucional-form-contato label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #4a5563;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.institucional-form-contato input {
    width: 100%;
    height: 42px;
    border: 1px solid #cad3dd;
    border-radius: 8px;
    padding: 0 12px;
    background: #fff;
    font-size: 15px;
}

.institucional-form-contato input:focus {
    outline: 0;
    border-color: #9ab0c4;
    box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.12);
}

.institucional-form-contato .btn-primary {
    margin-top: 6px;
    width: 100%;
    max-width: 260px;
    height: 44px;
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

@media (max-width: 900px) {
    .institucional-grid {
        grid-template-columns: 1fr;
    }

    .institucional-sidebar {
        position: static;
        padding: 16px;
    }

    .institucional-content {
        padding: 22px 16px;
    }

    .institucional-content h1 {
        font-size: 28px;
    }

    .institucional-lead {
        font-size: 17px;
    }

    .institucional-form-grid {
        grid-template-columns: 1fr;
    }

    .institucional-form-contato .btn-primary {
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .institucional-page {
        padding-top: 20px;
    }

    .institucional-content h1 {
        font-size: 25px;
    }

    .institucional-lead {
        font-size: 16px;
    }

    .institucional-content p {
        font-size: 15px;
        line-height: 1.62;
    }

    .institucional-box {
        padding: 16px;
    }
}

/* ── Página de artigo ── */
.article-page { max-width: 820px; margin: 32px auto; padding: 0 16px; }
.article-page .categoria-tag {
    display: inline-block;
    background: var(--red);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 2px;
    margin-bottom: 12px;
}
.article-page h1 {
    font-family: var(--font);
    font-size: 30px;
    font-weight: 900;
    line-height: 1.25;
    margin-bottom: 12px;
}
.article-headline-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.article-headline-row h1 {
    margin-bottom: 0;
}
.article-edit-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: .3px;
    color: #fff;
    background: #222;
    border-radius: 4px;
    padding: 8px 10px;
    transition: background .2s ease;
}
.article-edit-link:hover {
    background: var(--red);
}
.article-admin-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.article-recapture-btn {
    border: 0;
    cursor: pointer;
    background: #0d4b8f;
}
.article-recapture-btn:hover {
    background: #0a3b72;
}
.article-recapture-notice {
    margin: 14px 0 0;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    border: 1px solid #d5d5d5;
    background: #f6f6f6;
    color: #1f1f1f;
}
.article-recapture-notice.is-ok {
    border-color: #9ed3b1;
    background: #ebf8f0;
    color: #1c5c33;
}
.article-recapture-notice.is-error {
    border-color: #e7b5b5;
    background: #fff0f0;
    color: #8d2323;
}
.article-page .article-subtitle {
    font-size: 17px;
    color: var(--gray);
    line-height: 1.55;
    margin-bottom: 18px;
    font-style: italic;
}
.article-meta { font-size: 12px; color: #999; margin-bottom: 22px; border-bottom: 1px solid var(--border); padding-bottom: 16px; }
.article-meta span { margin-right: 14px; }
.article-hero-img { border-radius: 4px; margin-bottom: 24px; }
.article-hero-img img { width: 100%; max-height: 460px; object-fit: cover; border-radius: 4px; }
.article-content { font-family: var(--font); font-size: 17px; line-height: 1.75; color: #222; }
.article-content p { margin-bottom: 1.2em; }
.article-content h2 { font-size: 22px; margin: 1.4em 0 .6em; }
.article-content h3 { font-size: 18px; margin: 1.2em 0 .5em; }
.article-content blockquote {
    border-left: 4px solid var(--red);
    margin: 1.4em 0;
    padding: 10px 20px;
    color: var(--gray);
    background: var(--light-gray);
    font-style: italic;
}

/* ── Admin ── */
.admin-wrapper { min-height: 100vh; display: grid; grid-template-columns: 220px 1fr; }
.admin-sidebar {
    background: var(--dark);
    color: var(--white);
    padding: 0;
}
.admin-sidebar .brand {
    background: var(--red);
    padding: 16px 20px;
    font-weight: 900;
    font-size: 15px;
    letter-spacing: .5px;
    text-transform: uppercase;
}
.admin-sidebar nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ccc;
    padding: 12px 20px;
    font-size: 14px;
    border-left: 3px solid transparent;
    transition: all .2s;
}
.admin-sidebar nav a:hover, .admin-sidebar nav a.active {
    color: var(--white);
    border-left-color: var(--red);
    background: rgba(255,255,255,.06);
    text-decoration: none;
}
.admin-main {
    background: #f7f8fa;
    min-width: 0;
    width: 98%;
    max-width: 98%;
}
.admin-topbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.admin-topbar h1 { font-size: 18px; font-weight: 700; }
.admin-topbar .logout { font-size: 13px; color: var(--red); font-weight: 600; }
.admin-content { padding: 28px; }

/* Evita barra de rolagem horizontal no admin */
.admin-main,
.admin-content {
    overflow-x: hidden;
}

/* Cards do dashboard */
.dashboard-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; margin-bottom: 30px; }
.stat-card {
    background: var(--white);
    border-radius: 6px;
    padding: 22px 20px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.stat-card .number { font-size: 36px; font-weight: 900; color: var(--red); }
.stat-card .label  { font-size: 13px; color: var(--gray); margin-top: 4px; }

/* Tabela admin */
.admin-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: 6px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.admin-table th {
    background: var(--dark);
    color: var(--white);
    text-align: left;
    padding: 12px 14px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.admin-table td { padding: 11px 14px; font-size: 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #fafafa; }

/* Ajustes específicos da listagem de postagens para evitar overflow horizontal */
.postagens-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    align-items: start;
}
.postagens-main,
.postagens-sidebar {
    min-width: 0;
}
.postagens-sidebar {
    display: grid;
    gap: 18px;
}
.postagens-sidebar-title,
.postagens-summary-title {
    margin-bottom: 16px;
    font-size: 15px;
    font-weight: 700;
}
.postagens-filter-form {
    display: grid;
    gap: 12px;
}
.postagens-filter-actions,
.postagens-toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.postagens-filter-actions {
    margin-top: 4px;
    flex-wrap: nowrap;
    overflow-x: auto;
}
.postagens-toolbar {
    margin-top: 16px;
}
.postagens-filter-actions .btn-primary,
.postagens-filter-actions .btn-secondary {
    flex: 0 0 auto;
}
.postagens-new-button {
    background: #1a6b3c;
}
.postagens-summary-total {
    margin-bottom: 8px;
    color: #555;
    font-size: 14px;
}
.postagens-summary-page {
    margin: 0;
    color: #666;
    font-size: 12px;
    line-height: 1.6;
}
.postagens-summary-card {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    margin-bottom: 18px;
}
.postagens-summary-card .postagens-summary-title,
.postagens-summary-card .postagens-summary-total,
.postagens-summary-card .postagens-summary-page {
    margin: 0;
    flex: 0 0 auto;
}
.postagens-table-card {
    padding: 0;
    overflow: hidden;
}
.postagens-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}
.postagens-admin-table {
    width: 100%;
    min-width: 0;
    table-layout: auto;
}
.postagens-admin-table th {
    padding: 12px 14px;
    font-size: 12px;
    letter-spacing: .5px;
    line-height: 1.2;
    text-align: left;
    position: relative;
    cursor: default;
}
.postagens-admin-table td {
    padding: 11px 14px;
    font-size: 14px;
    line-height: 1.35;
    word-break: break-word;
    text-align: left;
}
.postagens-admin-table th,
.postagens-admin-table td {
    overflow: hidden;
    text-overflow: ellipsis;
}
.postagens-admin-table .action-btns {
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
}
.postagens-admin-table .badge {
    white-space: nowrap;
}
.postagens-admin-table .btn-sm {
    line-height: 1.25;
}
.postagens-admin-table form {
    margin: 0;
}
.postagens-cell-title {
    max-width: 220px;
}
.postagens-cell-origin {
    max-width: 140px;
    color: #666;
    line-height: 1.35;
}
.postagens-cell-photo {
    width: 56px;
    text-align: left;
}
.postagens-cell-date {
    color: #888;
    font-size: 12px;
    line-height: 1.35;
}
.postagens-empty-state {
    text-align: center;
    color: #666;
}
.postagens-audit-card {
    background: #fafafa;
}
.postagens-audit-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.postagens-audit-note {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}
.postagens-audit-list {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    line-height: 1.5;
    max-height: 220px;
    overflow: auto;
}
.postagens-audit-list li + li {
    margin-top: 6px;
}
.postagens-audit-list a {
    margin-left: 6px;
}
.postagens-main .pagination {
    max-width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    overflow-x: auto;
    padding-bottom: 4px;
}
.postagens-main .pagination a,
.postagens-main .pagination span {
    flex: 0 0 auto;
}
.postagens-admin-table .col-resizer {
    display: none;
}
.postagens-admin-table th.is-dragging-col {
    opacity: .6;
}
.postagens-admin-table th.is-drag-over-col {
    outline: 1px dashed rgba(200, 16, 46, 0.7);
    outline-offset: -2px;
}
body.is-resizing-columns {
    cursor: col-resize;
    user-select: none;
}
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}
.badge-green { background: #d4edda; color: #155724; }
.badge-gray  { background: #e9ecef; color: #495057; }
.badge-red   { background: #f8d7da; color: #721c24; }
.badge-blue  { background: #dbeafe; color: #1e40af; }

/* Ações da tabela */
.action-btns { display: flex; gap: 8px; }
.btn-sm {
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
.btn-edit   { background: #d4edda; color: #155724; }
.btn-delete { background: #f8d7da; color: #721c24; }
.btn-edit:hover   { background: #c3e6cb; text-decoration: none; }
.btn-delete:hover { background: #f5c6cb; text-decoration: none; }

/* Botão primário */
.btn-primary {
    background: var(--red);
    color: var(--white);
    padding: 10px 22px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
.btn-primary:hover { background: var(--dark-red); text-decoration: none; }
.btn-secondary {
    background: #6c757d;
    color: var(--white);
    padding: 10px 22px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
.btn-secondary:hover { background: #545b62; text-decoration: none; }

/* Formulários admin */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--dark); }
.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-family: var(--font-ui);
    background: var(--white);
    transition: border-color .2s;
}
.form-control:focus { outline: none; border-color: var(--red); }
textarea.form-control { min-height: 300px; resize: vertical; }
select.form-control { appearance: auto; }
.form-check { display: flex; align-items: center; gap: 8px; }
.form-check input { width: 18px; height: 18px; cursor: pointer; }

/* Card form */
.form-card {
    background: var(--white);
    border-radius: 6px;
    padding: 28px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.anuncios-ref-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.anuncios-layout-main,
.anuncios-layout-side {
    min-width: 0;
}
.anuncios-layout-side {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    align-items: start;
}
.anuncios-layout-full {
    grid-column: 1 / -1;
    min-width: 0;
}
.anuncios-slots-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.anuncios-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}
.anuncios-admin-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}
.anuncios-admin-table th,
.anuncios-admin-table td {
    word-break: break-word;
    overflow-wrap: anywhere;
    vertical-align: top;
}
.anuncios-admin-table details {
    width: 100%;
}
.anuncios-admin-table details form,
.anuncios-admin-table form {
    max-width: 100%;
}
.anuncios-admin-table textarea.form-control {
    min-height: 140px;
}
.anuncios-slots-table th:nth-child(1),
.anuncios-slots-table td:nth-child(1) { width: 24%; }
.anuncios-slots-table th:nth-child(2),
.anuncios-slots-table td:nth-child(2) { width: 18%; }
.anuncios-slots-table th:nth-child(3),
.anuncios-slots-table td:nth-child(3) { width: 12%; }
.anuncios-slots-table th:nth-child(4),
.anuncios-slots-table td:nth-child(4) { width: 10%; }
.anuncios-slots-table th:nth-child(5),
.anuncios-slots-table td:nth-child(5) { width: 36%; }
.anuncios-list-table th:nth-child(1),
.anuncios-list-table td:nth-child(1) { width: 18%; }
.anuncios-list-table th:nth-child(2),
.anuncios-list-table td:nth-child(2) { width: 14%; }
.anuncios-list-table th:nth-child(3),
.anuncios-list-table td:nth-child(3) { width: 10%; }
.anuncios-list-table th:nth-child(4),
.anuncios-list-table td:nth-child(4) { width: 16%; }
.anuncios-list-table th:nth-child(5),
.anuncios-list-table td:nth-child(5) { width: 10%; }
.anuncios-list-table th:nth-child(6),
.anuncios-list-table td:nth-child(6) { width: 32%; }

/* Página assine */
.assine-page {
    padding: 36px 0 48px;
}
.assine-container {
    max-width: 760px;
}
.assine-card {
    border-top: 4px solid var(--red);
}
.assine-title {
    margin-bottom: 8px;
    font-family: var(--font);
    font-size: 34px;
    line-height: 1.12;
}
.assine-lead {
    color: #4f5966;
    margin-bottom: 16px;
    font-size: 18px;
    line-height: 1.45;
}
.assine-alert {
    margin-bottom: 12px;
}
.assine-form-group {
    margin-bottom: 10px;
}
.assine-form-group-last {
    margin-bottom: 16px;
}
.assine-submit-btn {
    background: #1f8f3a;
    color: #ffd600;
    border: none;
    border-radius: 6px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}
.assine-submit-btn:hover {
    background: #19742f;
}

/* Login page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark2) 100%);
}
.login-box {
    background: var(--white);
    border-radius: 8px;
    padding: 40px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 10px 40px rgba(0,0,0,.3);
}
.login-box .brand {
    text-align: center;
    margin-bottom: 28px;
}
.login-box .brand h1 { font-size: 26px; font-family: var(--font); color: var(--red); font-weight: 900; }
.login-box .brand p  { font-size: 12px; color: var(--gray); margin-top: 4px; }

/* Alertas */
.alert {
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 16px;
}
.alert-danger  { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-info    { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* Paginação */
.pagination { display: flex; gap: 6px; margin-top: 30px; justify-content: center; }
.pagination a, .pagination span {
    display: inline-block;
    padding: 7px 13px;
    border-radius: 4px;
    font-size: 13px;
    border: 1px solid var(--border);
    color: var(--dark);
}
.pagination a:hover     { background: var(--light-gray); text-decoration: none; }
.pagination .current    { background: var(--red); color: var(--white); border-color: var(--red); }

/* Mobile responsivo */
@media (max-width: 900px) {
    .destaque-topo-grid { grid-template-columns: 1fr; }
    .topo-cards-grid { grid-template-columns: 1fr; }
    .topo-cards-grid .topo-image-wrap { height: 220px; }
    .topo-circulares { grid-template-columns: 1fr; }
    .topo-title-lg { font-size: 22px; }
    .topo-title-md { font-size: 22px; }
    .home-with-ads { grid-template-columns: 1fr; }
    .home-ads-rail { position: static; display: none; }
    .ad-box-970x150 { height: 110px; }
    .ad-box-728x90  { height: 84px; }
    .footer-grid      { grid-template-columns: 1fr; }
    .admin-wrapper    { grid-template-columns: 1fr; }
    .admin-sidebar    { display: none; }
    .admin-main       { max-width: 100vw; }
    .form-row         { grid-template-columns: 1fr; }
    .cards-grid       { grid-template-columns: 1fr 1fr; }
    .site-header .inner {
        display: flex;
        justify-content: space-between;
        flex-wrap: wrap;
    }
    .header-center-ad {
        order: 3;
        width: 100%;
        max-width: 316px;
        margin: 6px auto 0;
    }
    .header-search-form {
        width: 286px;
    }
    .header-search-input {
        width: 190px;
        flex-basis: 190px;
    }
    .header-search-btn {
        width: 90px;
    }
    .assine-title { font-size: 28px; }
    .assine-lead { font-size: 17px; }
}
@media (max-width: 560px) {
    .cards-grid { grid-template-columns: 1fr; }
    .article-page h1 { font-size: 22px; }
    .article-headline-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .article-admin-actions {
        width: 100%;
    }
    .ad-box-970x150 { height: 96px; }
    .ad-box-728x90  { height: 78px; }
    .header-center-ad {
        max-width: 100%;
        width: 100%;
        height: 61px;
        margin: 6px 0 0;
    }
    .header-actions {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
    }
    .header-search-form {
        order: 2;
        width: 100%;
    }
    .header-search-input {
        width: 100%;
        min-width: 0;
        flex: 1;
    }
    .assine-page {
        padding: 24px 0 40px;
    }
    .assine-title {
        font-size: 24px;
    }
    .assine-lead {
        font-size: 15px;
    }
    .assine-card {
        padding: 18px;
    }
}

@media (max-width: 900px) {
    .postagens-layout {
        grid-template-columns: 1fr;
    }
    .anuncios-ref-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .anuncios-admin-table {
        min-width: 640px;
    }
}

@media (max-width: 640px) {
    .admin-content {
        padding: 16px;
    }
    .form-card {
        padding: 18px;
    }
    .postagens-table-card {
        padding: 0;
    }
    .anuncios-layout-side {
        gap: 16px;
    }
    .postagens-toolbar {
        flex-direction: column;
    }
    .postagens-toolbar .btn-primary,
    .postagens-toolbar .btn-secondary,
    .postagens-filter-actions .btn-primary,
    .postagens-filter-actions .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    .anuncios-admin-table {
        min-width: 560px;
    }
}

.charge-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.72);
    padding: 16px;
}
.charge-modal.is-open {
    display: flex;
}
.charge-modal-dialog {
    position: relative;
    background: transparent;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    line-height: 0;
}
.charge-modal-image-wrap {
    display: block;
    background: transparent;
}
.charge-modal-image-wrap img {
    display: block;
    width: auto;
    height: auto;
    max-width: min(92vw, 1200px);
    max-height: 86vh;
    object-fit: contain;
}
.charge-modal-close {
    position: absolute;
    top: -18px;
    right: -18px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: #c8102e;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.charge-modal-close:hover {
    filter: brightness(1.05);
}
@media (max-width: 900px) {
    .charge-modal-image-wrap img {
        max-width: 96vw;
        max-height: 82vh;
    }
    .charge-modal-close {
        top: 8px;
        right: 8px;
    }
}




.humor-destaque-card {
    border: 1px solid var(--border);
}
.humor-destaque-image {
    height: auto;
    padding-bottom: 0;
    position: relative;
    overflow: hidden;
}
.humor-destaque-image img {
    position: static;
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}
.humor-anteriores-thumb {
    height: auto;
    background: transparent;
}
.humor-anteriores-thumb img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    display: block;
    transition: none;
}
.humor-anteriores-card:hover .humor-anteriores-thumb img {
    transform: none;
}











.cards-grid.categoria-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.careca-cia-feed {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.careca-cia-card {
    border: 1px solid var(--border);
    width: 100%;
    display: flex;
    flex-direction: column;
    height: auto;
}
.careca-cia-feed .topo-card-charge .topo-card-body {
    display: flex;
}
.careca-cia-body {
    order: -1;
}
.careca-cia-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: auto;
    overflow: visible;
    background: #f6f6f6;
    position: static;
    padding-bottom: 0;
}
.careca-cia-thumb img {
    position: static;
    inset: auto;
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    display: block;
}

@media (max-width: 900px) {
    .cards-grid.categoria-grid-3 {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 560px) {
    .cards-grid.categoria-grid-3 {
        grid-template-columns: 1fr;
    }
}


.topo-meta-row .categoria-tag,
.topo-meta-row .badge {
    margin-bottom: 0;
    line-height: 1.1;
    display: inline-flex;
    align-items: center;
}



.article-signature {
    margin-top: 28px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}
.article-signature-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #ddd;
}
.article-signature-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1f1f1;
    color: #555;
    font-weight: 700;
    font-size: 16px;
}
.article-signature-text {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.2;
}
.article-signature-name {
    font-size: 14px;
    font-weight: 700;
    color: #333;
}
.article-signature-subs {
    margin-top: 3px;
    font-size: 12px;
    font-style: italic;
    color: #666;
}
