/*
Theme Name: Cine Noir Cinema
Author: Tema personalizado
Description: Catálogo de filmes e séries em layout cinema, importadores TMDb e compatibilidade com posts antigos.
Version: 1.0.16
Requires at least: 6.2
Requires PHP: 8.0
Text Domain: cine-noir
*/

/* =========================================================
   01. VARIÁVEIS, BASE E ACESSIBILIDADE
   ========================================================= */

:root {
    --bg: #03182a;
    --bg-deep: #001322;
    --panel: #06263b;
    --panel-light: #0a314a;
    --lime: #70e02e;
    --lime-bright: #9bec35;
    --cyan: #24afe4;
    --series-blue: #00a7e8;
    --green: #39a84c;
    --text: #f4f8fb;
    --muted: #9cb4c1;
    --white-panel: #fdfdfd;
    --dark-text: #1d2630;
    --shadow: 0 16px 36px rgba(0, 0, 0, .2);
    --radius: 11px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: radial-gradient(ellipse at 5% 5%, #0a4260 0, transparent 25%), radial-gradient(ellipse at 95% 25%, #05405c 0, transparent 22%), var(--bg);
    font: 15px/1.55 Arial, Helvetica, sans-serif;
}

img, video, iframe {
    max-width: 100%;
}

img {
    height: auto;
}

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

a:hover {
    color: var(--lime-bright);
}

button, input {
    font: inherit;
}

button {
    cursor: pointer;
}

svg {
    display: inline-block;
    flex-shrink: 0;
    vertical-align: middle;
}

:focus-visible {
    outline: 3px solid var(--cyan);
    outline-offset: 3px;
}

.cn-container {
    width: min(94%, 1410px);
    margin-inline: auto;
}

.cn-muted {
    color: var(--muted);
}

.cn-skip-link {
    position: fixed;
    z-index: 9999;
    left: 10px;
    top: -100px;
    color: #111;
    background: white;
    padding: 8px 12px;
}

.cn-skip-link:focus {
    top: 10px;
}

/* =========================================================
   02. CABEÇALHO, LOGO, MENU COM ÍCONES E PESQUISA
   ========================================================= */

.cn-site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #02121fee;
    border-bottom: 1px solid #1a4960;
    box-shadow: 0 7px 25px #0003;
}

/*
 * Menu fixo durante a rolagem (sem JS).
 * O WordPress desloca o cabeçalho quando sua barra admin está ativa.
 * O layout da logo/ícones/busca permanece o mesmo.
 */

.admin-bar .cn-site-header {
    top: 32px;
}

@media (max-width: 782px) and (min-width: 601px) {
    .admin-bar .cn-site-header {
        top: 46px;
    }

}

@media (max-width: 600px) {
    .admin-bar .cn-site-header {
        top: 0;
    }

}

/* Âncoras da index e do trailer não ficam encobertas pelo menu fixo. */

html {
    scroll-padding-top: 115px;
}

/* Alinhamento: as bordas da logo/pesquisa seguem o mesmo recuo dos pôsteres na index. */

.cn-header-inner {
    width: min(94%, 1410px);
    margin-inline: auto;
    padding: 6px clamp(18px, 3.2vw, 48px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.cn-brand {
    display: flex;
    align-items: center;
    flex: 0 0 260px;
    min-width: 0;
}

.cn-brand .custom-logo-link {
    display: flex;
    align-items: center;
    max-width: 100%;
}

.cn-brand__text {
    font-weight: 900;
    font-size: 26px;
    letter-spacing: -.8px;
    color: white;
    line-height: 1.18;
    text-transform: uppercase;
}

.cn-brand__text::first-letter {
    color: var(--lime);
}

/* Ampliada em relação à v1.0.2, sem distorcer a proporção do PNG transparente. */

.cn-brand .custom-logo {
    display: block;
    width: 300px;
    max-width: 100%;
    height: 80px;
    max-height: 80px;
    object-fit: contain;
    object-position: left center;
}

.cn-main-nav {
    flex: 1;
    min-width: 0;
}

.cn-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: clamp(4px, .7vw, 14px);
    align-items: stretch;
}

.cn-menu > li {
    position: relative;
}

.cn-menu > li > a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 3px 7px;
    border-radius: 8px;
    text-align: center;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .15px;
    white-space: nowrap;
    transition: .2s;
}

.cn-menu > li > a svg {
    width: 25px;
    height: 25px;
}

.cn-menu > li > a:hover, .cn-menu > li.current-menu-item > a, .cn-menu > li.current-menu-ancestor > a {
    color: var(--lime);
    background: #10405d;
}

.cn-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 40;
    width: 210px;
    max-height: 60vh;
    overflow: auto;
    background: #06283b;
    border: 1px solid #1b516d;
    box-shadow: var(--shadow);
    border-radius: 7px;
    padding: 8px;
    margin: 0;
    list-style: none;
}

.cn-menu li:hover > .sub-menu, .cn-menu li:focus-within > .sub-menu {
    display: block;
}

.cn-menu .sub-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    font-size: 13px;
    border-radius: 5px;
}

.cn-menu .sub-menu a svg {
    width: 17px;
    height: 17px;
    color: var(--lime);
}

.cn-menu .sub-menu a:hover {
    background: #16445d;
}

/* Caixa de pesquisa encostada à mesma borda direita dos cartões da index. */

.cn-search {
    display: flex;
    align-items: center;
    flex: 0 0 195px;
    background: #102f42;
    border: 1px solid #275369;
    border-radius: 7px;
    min-width: 175px;
    width: 195px;
    margin-left: auto;
}

.cn-search input {
    padding: 8px 10px;
    width: 100%;
    min-width: 0;
    border: 0;
    outline: none;
    color: white;
    background: transparent;
    font-size: 12px;
}

.cn-search input::placeholder {
    color: #a6b5c0;
}

.cn-search button {
    color: var(--lime);
    border: 0;
    background: none;
    padding: 8px 10px 8px 2px;
}

.cn-search button svg {
    width: 22px;
    height: 22px;
}

.cn-search:focus-within {
    border-color: var(--lime);
    box-shadow: 0 0 0 1px #64ca27;
}

.cn-mobile-toggle {
    display: none;
    align-items: center;
    gap: 7px;
    border: 1px solid #2c6475;
    background: #0a314a;
    color: white;
    border-radius: 7px;
    padding: 9px 12px;
}

/* =========================================================
   03. TÍTULOS DAS SEÇÕES E SETAS
   ========================================================= */

.cn-section-heading {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 17px;
}

.cn-section-heading h2 {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: clamp(18px, 1.6vw, 24px);
    line-height: 1.25;
    text-transform: uppercase;
    font-style: italic;
    margin: 0;
    font-weight: 800;
    color: white;
}

.cn-section-heading h2 svg {
    color: var(--lime);
}

.cn-view-all {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--lime);
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
}

.cn-arrows {
    display: flex;
    gap: 8px;
}

.cn-arrow {
    background: #0c3750;
    color: white;
    border: 1px solid #2c6175;
    border-radius: 5px;
    width: 38px;
    height: 34px;
}

.cn-arrow[data-slide="prev"] svg {
    transform: rotate(180deg);
}

.cn-arrow:hover {
    color: var(--lime);
    border-color: var(--lime);
}

/* =========================================================
   04. INDEX: 5 COLUNAS, CARROSSEL E CARDS
   ========================================================= */

.cn-home {
    background: linear-gradient(180deg, #031d2e 0, #021928 100%);
    padding: 32px clamp(18px, 3.2vw, 48px) 70px;
    min-height: 80vh;
}

.cn-catalog-section {
    margin-top: 48px;
}

.cn-shelf {
    padding-bottom: 14px;
}

.cn-shelf__scroll {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    scroll-snap-type: x mandatory;
    padding: 0 0 12px;
    scrollbar-width: thin;
    scrollbar-color: #1e5367 transparent;
}

.cn-shelf__scroll .cn-card {
    flex: 0 0 calc((100% - 5 * 15px) / 6);
    min-width: 130px;
    scroll-snap-align: start;
}

.cn-shelf__scroll .cn-card__picture {
    border-color: #5bc717;
}

.cn-shelf__scroll .cn-card--series .cn-card__picture {
    border-color: var(--series-blue);
}

.cn-shelf__scroll .cn-card__name {
    font-size: 12px;
}

.cn-shelf__scroll .cn-card__meta {
    font-size: 10px;
}

.cn-shelf__scroll .cn-card__audio, .cn-shelf__scroll .cn-card__imdb {
    font-size: 9px;
}

.cn-poster-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 25px 18px;
}

/* Os pôsteres da index mantêm 2:3 e acompanham a largura das 5 colunas. */

.cn-card {
    min-width: 0;
}

.cn-card__link {
    display: block;
}

.cn-card__picture {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    border: 3px solid #5bc717;
    border-radius: 7px;
    overflow: hidden;
    background: #0e3548;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}

.cn-card__picture img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cn-card__picture:hover {
    border-color: var(--lime-bright);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px #0007;
}

/* Selos apenas da versão de áudio e da nota IMDb dentro da capa. */

.cn-card__audio, .cn-card__imdb {
    position: absolute;
    z-index: 1;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 10px;
    line-height: 1.35;
    font-weight: 800;
    max-width: calc(100% - 16px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 1px 6px #0008;
}

.cn-card__audio {
    bottom: 7px;
    left: 7px;
    color: #f5fff0;
    background: #0b693bdc;
    text-transform: uppercase;
}

.cn-card__imdb {
    top: 7px;
    right: 7px;
    color: #ffeaa0;
    background: #021725e8;
}

.cn-card__imdb > span {
    color: #ffce39;
}

/* Ano à esquerda e resolução à direita, ambos abaixo do título. */

.cn-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
    margin: 3px 2px 0;
    min-height: 18px;
}

.cn-card__quality {
    flex: 0 0 auto;
    color: #c2e7e5;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
}

.cn-card__quality::before {
    content: "▣";
    color: var(--lime);
    margin-right: 4px;
}

/* Séries azuis em todos os cartões (index, carrossel, buscas e arquivos). */

.cn-card--series .cn-card__picture {
    border-color: var(--series-blue);
}

.cn-card--series .cn-card__picture:hover {
    border-color: #54d0ff;
    box-shadow: 0 8px 25px rgba(0,167,232,.25);
}

.cn-card--series .cn-card__quality::before {
    color: var(--series-blue);
}

.cn-card--series .cn-card__audio {
    background: #006c9bef;
}

.cn-card--series .cn-card__quality {
    color: #8bdfff;
}

.cn-card--series .cn-card__link:hover .cn-card__name {
    color: #56ccfb;
}

#series .cn-section-heading h2 svg, #series .cn-view-all,
.category-series .cn-page-heading h1 svg {
    color: var(--series-blue);
}

.cn-card__name {
    color: white;
    display: block;
    font-size: 13px;
    line-height: 1.3;
    margin: 9px 2px 0;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cn-card__year {
    display: block;
    color: #97b0bd;
    font-size: 11px;
}

.cn-no-poster {
    width: 100%;
    height: 100%;
    min-height: 130px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg,#13455e, #071d2b 68%);
    color: #85b6cc;
}

.cn-pagination, .nav-links {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin-top: 35px;
    flex-wrap: wrap;
}

.cn-pagination a, .nav-links .page-numbers {
    background: #0b3b55;
    border: 1px solid #26586d;
    border-radius: 6px;
    padding: 9px 14px;
    color: white;
}

.cn-pagination a:hover, .nav-links .page-numbers.current {
    background: #74d738;
    color: #052415;
}

/* =========================================================
   05. SINGLE: DUAS SIDEBARS E FICHA CENTRAL BRANCA
   ========================================================= */

/* Área central até 700px; laterais maiores sem alargar a ficha. */

.cn-single {
    position: relative;
    width: min(96%, 1260px);
    padding: 32px 0 74px;
    min-height: 75vh;
}

.cn-single::before {
    content: "";
    position: fixed;
    inset: 80px 0 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(#031827dd,#031827f9), var(--cn-backdrop, none) center/cover no-repeat;
}

.cn-single-grid {
    display: grid;
    grid-template-columns: minmax(0, 235px) minmax(0, 700px) minmax(0, 235px);
    gap: 18px;
    justify-content: center;
    align-items: start;
}

.cn-single-main {
    min-width: 0;
    width: 100%;
    max-width: 700px;
}

.cn-single-article {
    padding: 23px 25px 34px;
    border-radius: 10px;
    background: var(--white-panel);
    color: var(--dark-text);
    box-shadow: var(--shadow);
}

.cn-single-title {
    text-align: center;
    padding: 2px 6px 15px;
    border-bottom: 1px solid #e0e3e6;
    margin-bottom: 19px;
}

.cn-single-title h1 {
    font-size: clamp(22px, 2vw, 29px);
    color: #1b2834;
    line-height: 1.3;
    margin: 8px auto 0;
    max-width: 670px;
}

.cn-content-tag {
    color: #157c36;
    text-transform: uppercase;
    display: inline-flex;
    gap: 6px;
    font-weight: 900;
    font-size: 12px;
    align-items: center;
}

/* SINGLE: pôster com 348px de altura no desktop (232 x 348, proporção 2:3).
   As imagens não são deformadas, e a ficha ocupa o espaço restante. */

.cn-ficha {
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.cn-ficha-poster {
    width: 232px;
    height: 348px;
    max-width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid #d8e0e4;
    background: #d3dee4;
}

.cn-ficha-poster > img {
    position: static;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.cn-ficha-data {
    min-width: 0;
}

/* Na single de séries, detalhes e títulos em azul; botões magnet permanecem verdes. */

.cn-single--series .cn-content-tag,
.cn-single--series .cn-ficha-data h2,
.cn-single--series .cn-synopsis h2,
.cn-single--series .cn-cast h2,
.cn-single--series .cn-ficha-row dd a {
    color: var(--series-blue);
}

.cn-ficha-data h2 {
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    color: #208d39;
    font-style: italic;
    letter-spacing: .4px;
    margin: 0 0 11px;
    font-size: 16px;
}

.cn-ficha-data dl {
    margin: 0;
}

/* Ficha limpa, sem linhas entre campos; altura compactada. */

.cn-ficha-row {
    padding: 2.5px 0;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    border: 0;
    line-height: 1.38;
}

.cn-ficha-row:last-child {
    border: none;
}

.cn-ficha-row dt {
    font-size: 14px;
    font-weight: 800;
    color: #24333e;
}

.cn-ficha-row dd {
    margin: 0;
    font-size: 14px;
    color: #32414e;
    overflow-wrap: anywhere;
}

.cn-ficha-row dd a {
    color: #167f38;
}

.cn-synopsis, .cn-trailer, .cn-downloads, .cn-comments {
    margin-top: 29px;
}

.cn-cast {
    margin-top: 24px;
}

.cn-synopsis h2, .cn-cast h2, .cn-trailer h2 {
    margin: 0 0 9px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    color: #208d39;
    text-transform: uppercase;
}

.cn-synopsis p, .cn-cast p {
    font-size: 15px;
    line-height: 1.65;
    margin: 0;
    color: #25323d;
    text-align: left;
    white-space: pre-line;
}

.cn-trailer h2 {
    text-transform: none;
    color: #1d2936;
    font-size: 16px;
}

.cn-trailer__frame {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: #000;
}

.cn-trailer__frame iframe {
    position: absolute;
    border: 0;
    width: 100%;
    height: 100%;
    inset: 0;
}

/* O título do trailer e o de download usam ícones centralizados. */

.cn-trailer h2 {
    justify-content: center;
    text-align: center;
    font-size: 16px;
    font-weight: 800;
}

.cn-trailer h2 svg {
    width: 32px;
    height: 32px;
    padding: 5px;
    flex-shrink: 0;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #63cc21, #138c4d);
    box-shadow: 0 3px 9px #157d3d55;
}

.cn-single--series .cn-trailer h2 svg {
    background: linear-gradient(135deg, #00a7e8, #00628c);
    box-shadow: 0 3px 9px #008ac055;
}

.cn-downloads > .cn-section-heading {
    justify-content: center;
}

.cn-downloads .cn-section-heading h2 {
    justify-content: center;
    text-align: center;
}

.cn-downloads .cn-section-heading h2 svg {
    color: #38a848;
}

.cn-single--series .cn-downloads .cn-section-heading h2 svg {
    color: var(--series-blue);
}

/* Frase simples entre o trailer (quando existir) e os downloads. */

.cn-download-intro {
    margin: 25px 0 6px;
    color: #293b46;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    line-height: 1.6;
}

.cn-download-intro + .cn-downloads {
    margin-top: 16px;
}

/* =========================================================
   06. DOWNLOADS — BOTÕES VERDES / EPISÓDIOS
   ========================================================= */

.cn-downloads > .cn-section-heading {
    border-bottom: 1px solid #e3e7e9;
    padding: 0 0 13px;
    margin-bottom: 15px;
}

.cn-downloads .cn-section-heading h2 {
    color: #18343e;
    font-size: 20px;
    font-style: normal;
}

.cn-download-group {
    margin: 18px 0;
    padding: 19px 13px 23px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
}

.cn-download-group h3 {
    color: #212b31;
    text-transform: uppercase;
    font-size: 15px;
    margin: 0 0 16px;
    text-align: center;
    line-height: 1.4;
}

.cn-download-rows {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.cn-download-row {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 7px;
    text-align: center;
    border-bottom: 1px solid #ebebeb;
    padding-bottom: 15px;
}

.cn-download-row:last-child {
    padding-bottom: 0;
    border: 0;
}

.cn-download-row__desc {
    color: #087c1d;
    font-weight: 900;
    font-style: italic;
    line-height: 1.35;
    font-size: 14px;
}

.cn-download-row__episode {
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
}

.cn-download-row__quality {
    color: #238b30;
    font-size: 14px;
}

.cn-download-row--episode {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 5px;
    border: 0;
    padding: 0;
    font-size: 15px;
}

.cn-download-row--episode .cn-download-row__episode {
    font-size: 15px;
}

.cn-download-group:has(.cn-download-row--episode) > h3 {
    color: #068c23;
    font-style: italic;
}

.cn-episode-quality {
    color: #309329;
    font-size: 15px;
    text-decoration: none;
}

.cn-episode-quality:hover {
    color: #176b23;
    text-decoration: underline;
}

.cn-episode-size {
    color: #298b25;
    font-size: 13px;
}

/* As qualidades e os episódios de séries ganham o destaque azul. */

.cn-single--series .cn-download-row__desc,
.cn-single--series .cn-download-row__quality,
.cn-single--series .cn-download-group:has(.cn-download-row--episode) > h3,
.cn-single--series .cn-episode-quality,
.cn-single--series .cn-episode-size {
    color: #008cc7;
}

.cn-download-button {
    min-width: 214px;
    min-height: 52px;
    padding: 12px 22px;
    background: linear-gradient(#55b862, #37a047);
    color: #fff;
    border-radius: 6px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 9px;
    font-size: 16px;
    font-weight: 850;
    line-height: 1.2;
    box-shadow: inset 0 1px #ffffff55;
}

.cn-download-button:hover {
    background: #2b8f3b;
    color: white;
    transform: translateY(-1px);
}

.cn-download-button--online {
    background: #2176bd;
}

.cn-subtitle {
    border: 1px solid #d5e6d9;
    border-radius: 6px;
    background: #f2fbf3;
    padding: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: #286d39;
}

.cn-subtitle span, .cn-subtitle a {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.cn-subtitle a {
    font-weight: 800;
    text-decoration: underline;
}

.cn-legacy-content {
    color: #252525;
    border: 1px solid #d4d8dc;
    border-radius: 6px;
    padding: 10px;
    overflow-wrap: anywhere;
}

.cn-legacy-content summary {
    cursor: pointer;
    font-weight: 800;
}

.cn-legacy-content > div {
    overflow: hidden;
    padding: 12px 4px;
}

.cn-legacy-content a {
    color: #128334;
}

/* =========================================================
   07. SIDEBARS: RELACIONADOS POR GÊNERO (SEM DESTAQUES)
   ========================================================= */

.cn-related {
    background: #052436;
    border: 1px solid #1b586b;
    border-radius: 8px;
    overflow: hidden;
}

.cn-related h2 {
    margin: 0;
    padding: 12px 8px;
    text-align: center;
    font-size: 13px;
    color: #fff;
    text-transform: uppercase;
    background: linear-gradient(#8ae827,#3aaf18);
    text-shadow: 0 1px 1px #154d12;
    line-height: 1.25;
}

.cn-single--series .cn-related {
    border-color: #0076a3;
}

.cn-single--series .cn-related h2 {
    background: linear-gradient(#1dc2ff, #007bb4);
    text-shadow: 0 1px 1px #004365;
}

.cn-single--series .cn-related .cn-card--series .cn-card__picture {
    outline: 2px solid var(--series-blue);
    outline-offset: -2px;
}

.cn-related__list {
    padding: 7px;
    display: grid;
    gap: 15px;
}

.cn-related .cn-card__picture {
    border: 0;
    border-radius: 4px;
}

.cn-related .cn-card__name {
    white-space: normal;
    text-align: center;
    font-size: 12px;
    line-height: 1.32;
    max-height: 3em;
}

.cn-related .cn-card__quality {
    font-size: 9px;
}

.cn-related .cn-card__meta {
    gap: 4px;
}

.cn-related .cn-card__year {
    text-align: left;
}

.cn-related .cn-card__audio, .cn-related .cn-card__imdb {
    font-size: 8px;
    padding: 2px 4px;
}

.cn-related .cn-muted {
    margin: 5px;
    text-align: center;
    font-size: 12px;
}

/* =========================================================
   08. GÊNEROS COM FUNDOS EXCLUSIVOS E ÍCONES
   ========================================================= */

.cn-page-heading {
    margin: 3px 0 26px;
}

.cn-page-heading h1 {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 28px;
    margin: 0 0 8px;
}

.cn-page-heading h1 svg {
    color: var(--lime);
}

.cn-page-heading p {
    color: var(--muted);
    margin: 5px 0 0;
}

.cn-genres-page, .cn-archive {
    padding: 39px 0 80px;
    min-height: 70vh;
}

.cn-genre-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 17px;
}

.cn-genre {
    min-height: 180px;
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: end;
    padding: 19px;
    gap: 2px;
    border: 1px solid #21617b;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(150deg,#155574,#072339);
}

.cn-genre::before {
    content: "";
    position: absolute;
    z-index: -2;
    inset: 0;
    background: var(--cn-genre-image, none) center 30% / cover no-repeat;
    opacity: .6;
    transition: .25s;
}

.cn-genre::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(0deg, #001624f5 0%, #00203020 90%);
}

.cn-genre:hover {
    border-color: var(--lime);
    color: white;
}

.cn-genre:hover::before {
    transform: scale(1.08);
    opacity: .85;
}

.cn-genre__icon {
    color: var(--lime-bright);
    margin-bottom: auto;
    filter: drop-shadow(1px 1px 2px #000);
}

.cn-genre__title {
    font-size: 23px;
    font-weight: 900;
    line-height: 1.2;
}

.cn-genre__count {
    font-size: 12px;
    color: #d1e0e4;
}

/* =========================================================
   09. PÁGINAS, COMENTÁRIOS E RODAPÉ
   ========================================================= */

.cn-page {
    min-height: 68vh;
    padding: 42px 30px;
}

.cn-page article {
    margin: auto;
    max-width: 920px;
    border-radius: 9px;
    background: #fefefe;
    color: #1c2835;
    padding: 30px;
}

.cn-page h1 {
    margin-top: 0;
}

.cn-comments {
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.cn-comments h2, .cn-comments h3 {
    font-size: 18px;
}

.cn-comments textarea, .cn-comments input:not([type="submit"]) {
    border: 1px solid #cad4d9;
    padding: 10px;
    border-radius: 4px;
    max-width: 100%;
}

.cn-comments textarea {
    width: 100%;
}

.cn-comments input[type="submit"] {
    background: #42a74a;
    color: white;
    border: 0;
    border-radius: 5px;
    padding: 10px 18px;
}

.cn-footer {
    border-top: 1px solid #23506a;
    background: #00111f;
    color: #bfd3dd;
}

.cn-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-block: 22px;
    font-size: 12px;
}

.cn-footer-menu {
    display: flex;
    padding: 0;
    margin: 0;
    gap: 13px;
    list-style: none;
}

.cn-footer__note {
    color: #7999a9;
}

/* =========================================================
   09A. FONTE MODERNA DA SINGLE — TÍTULOS E DOWNLOADS
   Escopo restrito à single: menu, títulos do WordPress e cards intactos.
   ========================================================= */

.cn-single-article .cn-ficha-data h2,
.cn-single-article .cn-synopsis h2,
.cn-single-article .cn-cast h2,
.cn-single-article .cn-trailer h2,
.cn-single-article .cn-downloads .cn-section-heading h2,
.cn-single-article .cn-download-group h3,
.cn-single-article .cn-download-row__desc {
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    font-style: normal;
    letter-spacing: .1px;
}

.cn-single-article .cn-ficha-data h2,
.cn-single-article .cn-synopsis h2,
.cn-single-article .cn-cast h2,
.cn-single-article .cn-trailer h2 {
    font-size: 17px;
    font-weight: 800;
}

.cn-single-article .cn-download-group h3 {
    font-size: 16px;
    font-weight: 800;
}

.cn-single-article .cn-download-row__desc {
    font-size: 15px;
    font-weight: 800;
}

/* Elenco: herda o estilo da sinopse, com cor explícita por tipo de post. */
.cn-single .cn-single-article .cn-cast > h2 {
    color: #208d39;
    font-size: 17px;
    font-weight: 800;
    text-transform: uppercase;
}

.cn-single.cn-single--series .cn-single-article .cn-cast > h2 {
    color: var(--series-blue);
}

.cn-single .cn-single-article .cn-cast > h2 svg {
    color: inherit;
    stroke: currentColor;
}

/* =========================================================
   10. RESPONSIVIDADE (DESKTOP / TABLET / CELULAR)
   ========================================================= */

@media (max-width: 1240px) {
    html {
        scroll-padding-top: 155px;
    }

    .cn-header-inner {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .cn-brand {
        flex-basis: 260px;
    }

    .cn-main-nav {
        order: 3;
        flex-basis: 100%;
    }

    .cn-menu {
        justify-content: space-around;
    }

    .cn-search {
        flex-basis: 215px;
        width: 215px;
        margin-left: auto;
    }

    .cn-single-grid {
        grid-template-columns: minmax(140px, 205px) minmax(0, 700px) minmax(140px, 205px);
        gap: 14px;
    }

    .cn-single-article {
        padding: 20px 18px;
    }

    /* Mantém 348px nas telas desktop intermediárias quando houver espaço. */

    .cn-ficha {
        gap: 13px;
    }

    .cn-poster-grid {
        gap: 20px 14px;
    }

}

@media (max-width: 940px) {
    /* Em larguras menores, evita comprimir a ficha técnica. */

    .cn-ficha {
        grid-template-columns: minmax(150px, 34%) minmax(0, 1fr);
    }

    .cn-ficha-poster {
        width: 100%;
        height: auto;
    }

    .cn-poster-grid {
        grid-template-columns: repeat(4, minmax(0,1fr));
    }

    .cn-shelf__scroll .cn-card {
        flex-basis: calc((100% - 4 * 15px) / 5);
    }

    .cn-single-grid {
        grid-template-columns: minmax(0,1fr) 200px;
    }

    .cn-single-aside--left {
        display: none;
    }

    .cn-genre-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

}

@media (max-width: 700px) {
    html {
        scroll-padding-top: 185px;
    }

    .cn-header-inner {
        gap: 12px;
    }

    .cn-brand__text {
        font-size: 23px;
    }

    .cn-brand {
        flex: 1 1 auto;
        min-width: 0;
    }

    .cn-brand .custom-logo {
        width: 210px;
        height: 62px;
        max-height: 62px;
    }

    .cn-mobile-toggle {
        display: inline-flex;
    }

    .cn-main-nav {
        display: none;
        order: 4;
        flex: 0 0 100%;
    }

    .cn-main-nav.cn-main-nav--open {
        display: block;
        max-height: 55vh;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .cn-menu {
        flex-wrap: wrap;
        justify-content: start;
        gap: 5px;
    }

    .cn-menu > li {
        width: calc((100% - 10px) / 3);
    }

    .cn-menu > li > a {
        font-size: 11px;
        white-space: normal;
    }

    .cn-menu .sub-menu {
        position: static;
        max-height: none;
        width: 100%;
    }

    .cn-search {
        order: 3;
        width: 100%;
        flex-basis: 100%;
        min-width: 0;
        margin-left: 0;
    }

    .cn-container {
        width: min(94%, 680px);
    }

    .cn-home {
        padding: 25px 14px 50px;
    }

    .cn-poster-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 17px 10px;
    }

    .cn-shelf__scroll .cn-card {
        flex-basis: calc((100% - 3 * 12px) / 3.4);
    }

    .cn-section-heading h2 {
        font-size: 17px;
    }

    .cn-single-grid {
        display: flex;
        flex-direction: column;
    }

    .cn-single-main {
        order: 0;
        width: 100%;
    }

    .cn-single-aside--right {
        order: 1;
        width: 100%;
    }

    .cn-single-aside--left {
        display: none;
    }

    .cn-related__list {
        grid-template-columns: repeat(3,minmax(0,1fr));
    }

    .cn-genre-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

}

@media (max-width: 560px) {
    .cn-poster-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cn-shelf__scroll .cn-card {
        flex-basis: 42%;
    }

    .cn-single {
        padding-top: 14px;
    }

    .cn-single-article {
        padding: 17px 13px 25px;
    }

    .cn-ficha {
        grid-template-columns: minmax(0,1fr);
    }

    .cn-ficha-poster {
        width: min(72%, 232px);
        height: auto;
        margin-inline: auto;
        aspect-ratio: 2 / 3;
    }

    .cn-ficha-data h2 {
        margin-top: 10px;
    }

    .cn-related__list {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

    .cn-genre-grid {
        grid-template-columns: 1fr;
    }

    .cn-genre {
        min-height: 160px;
    }

    .cn-footer__inner {
        justify-content: center;
        text-align: center;
    }

}
