/*
Theme Name: Serivia Cinema
Theme URI: https://wordpress.org/
Author: Projeto Serivia;
Description: Tema cinematográfico responsivo, compatível com conteúdos legados dos importadores TMDB.;
Version: 1.0.12;
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: serivia-cinema
*/
:root {
    --bg: #111c20;
    --panel: #141e22;
    --surface: #202b30;
    --hover: #303a3e;
    --muted: #9aa6ab;
    --text: #f7f9f9;
    --accent: #ffc72c;
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: radial-gradient(circle at 18% 6%,#344950,#16272e 45%,#0d171b 85%);
    color: var(--text);
    font: 15px/1.55 system-ui,-apple-system,'Segoe UI',sans-serif;
}

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

button,input,select {
    font: inherit;
}

button {
    cursor: pointer;
}

img {
    max-width: 100%;
}

.site-shell {
    max-width: 1540px;
    min-height: calc(100vh - 80px);
    margin: 45px auto;
    background: linear-gradient(130deg,#19252a,#0c1519 75%);
    border-radius: 25px;
    box-shadow: 0 35px 75px #0007;
    display: grid;
    grid-template-columns: 235px minmax(0,1fr);
    overflow: hidden;
}

.sidebar {
    padding: 28px 18px 32px 30px;
    min-width: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.7px;
    margin-bottom: 46px;
}

.brand-icon {
    color: var(--accent);
    font-size: 28px;
}

.brand img {
    max-width: 158px;
    max-height: 55px;
    object-fit: contain;
}

.side-nav {
    display: grid;
    gap: 9px;
}

.side-nav a,.sidebar-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 8px;
    color: var(--muted);
    border-radius: 11px;
}

.side-nav a:hover,.side-nav .current-menu-item>a,.side-nav a.active {
    color: white;
    background: #ffffff0d;
}

.side-nav svg,.sidebar-label svg {
    width: 18px;
    height: 18px;
    flex: none;
}

.sidebar-group {
    margin-top: 45px;
}

.sidebar-heading {
    font-size: 13px;
    color: #d4dadd;
    font-weight: 700;
    margin: 0 0 12px;
}

.continue-list {
    display: grid;
    gap: 12px;
}

.continue-card {
    height: 96px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 15px;
    padding: 12px;
    background-position: center;
    background-size: cover;
    overflow: hidden;
    position: relative;
}

.continue-card:before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg,#000c,#0001);
}

.continue-card>* {
    position: relative;
}

.continue-card strong {
    font-size: 12px;
    line-height: 1.3;
}

.progress-track {
    background: #ffffff66;
    height: 4px;
    border-radius: 20px;
}

.progress-track span {
    display: block;
    width: 45%;
    height: 100%;
    background: var(--accent);
    border-radius: 20px;
}

.main {
    min-width: 0;
    padding: 28px 32px 40px 10px;
}

.topbar {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 27px;
}

.type-picker {
    padding: 13px 18px;
    background: #ffffff12;
    border: 1px solid #ffffff08;
    border-radius: 14px;
    white-space: nowrap;
}

.search-form {
    height: 49px;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 70px;
    background: #ffffff12;
    border: 1px solid #ffffff08;
    border-radius: 14px;
}

.search-form svg {
    width: 21px;
    height: 21px;
    color: #9aa6ab;
    margin: 0 14px;
}

.search-form input {
    background: transparent;
    outline: 0;
    border: 0;
    min-width: 0;
    flex: 1;
    color: #fff;
}

.search-form input::placeholder {
    color: #89989d;
}

.search-form button {
    height: 100%;
    background: transparent;
    color: #b8c0c2;
    border: 0;
    padding: 0 16px;
    border-left: 1px solid #ffffff12;
}

.top-user {
    white-space: nowrap;
    background: #ffffff12;
    border: 0;
    border-radius: 13px;
    padding: 12px 16px;
    color: #fff;
}

.hero-wrap {
    display: grid;
    grid-template-columns: minmax(0,1fr) 75px;
    gap: 12px;
    margin-bottom: 27px;
}

.hero {
    height: 388px;
    background-size: cover;
    background-position: center;
    border-radius: 22px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 25px;
}

.hero:before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg,#000b 0%,#0000 63%),linear-gradient(90deg,#0004,transparent);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 80%;
}

.pills {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.pill {
    border-radius: 999px;
    background: #0006;
    backdrop-filter: blur(7px);
    color: white;
    font-size: 12px;
    padding: 6px 11px;
}

.hero h1 {
    margin: 0 0 9px;
    font-size: clamp(21px,3.1vw,35px);
    line-height: 1.17;
}

.hero p {
    margin: 0;
    color: #e3e3e3;
    font-size: 13px;
    max-width: 520px;
}

.hero-cta {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.btn {
    background: var(--accent);
    color: #172023;
    border: 0;
    border-radius: 999px;
    padding: 10px 19px;
    font-weight: 750;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary {
    background: #ffffff27;
    color: #fff;
}

.hero-next {
    border-radius: 20px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.hero-next:after {
    content: '';
    position: absolute;
    inset: 0;
    background: #0004;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 13px;
    justify-content: space-between;
    margin: 0 0 15px;
}

.section-header h2 {
    font-size: 19px;
    margin: 0;
    letter-spacing: -.4px;
}

.more-link {
    font-size: 13px;
    color: var(--accent);
}

.genres {
    display: flex;
    gap: 8px;
    overflow: auto;
    scrollbar-width: none;
    margin: 0 0 18px;
    padding: 0 0 4px;
}

.genres a {
    padding: 9px 18px;
    white-space: nowrap;
    border-radius: 28px;
    background: #ffffff13;
    font-size: 13px;
}

.genres a:hover,.genres a.active {
    background: white;
    color: #12191c;
}

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

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

.poster-image {
    display: block;
    aspect-ratio: 2/3;
    border-radius: 16px;
    background: #293339;
    overflow: hidden;
    position: relative;
}

.poster-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .25s;
}

.poster-image:hover img {
    transform: scale(1.06);
}

.poster-placeholder {
    height: 100%;
    display: grid;
    place-items: center;
    color: #b9c1c5;
    text-align: center;
    padding: 12px;
}

.version-tag {
    position: absolute;
    left: 7px;
    bottom: 7px;
    padding: 3px 7px;
    background: #13191ce8;
    border: 1px solid #ffffff32;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 700;
}

.poster-title {
    font-size: 13px;
    font-weight: 650;
    display: block;
    margin-top: 9px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.poster-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #95a0a4;
    font-size: 12px;
}

.stars {
    color: var(--accent);
    font-weight: 750;
}

.content-panel {
    padding: 22px;
    border-radius: 18px;
    background: #ffffff08;
}

.archive-intro {
    margin-bottom: 22px;
}

.archive-intro h1 {
    margin: 0;
    font-size: 24px;
}

.archive-intro p {
    color: var(--muted);
    margin: 5px 0 0;
}

.pager {
    display: flex;
    gap: 9px;
    justify-content: center;
    margin-top: 29px;
}

.pager .page-numbers {
    padding: 8px 14px;
    border-radius: 9px;
    background: #ffffff14;
}

.pager .current {
    background: var(--accent);
    color: #132026;
}

.single-back {
    display: block;
    margin-bottom: 15px;
    color: #adb8ba;
}

.single-hero {
    height: 290px;
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    margin-bottom: 24px;
    position: relative;
}

.single-hero:after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg,#10191d,transparent);
    border-radius: 20px;
}

.single-header {
    display: grid;
    grid-template-columns: 190px minmax(0,1fr);
    gap: 23px;
    margin-top: -105px;
    position: relative;
    z-index: 2;
    padding: 0 22px 18px;
}

.single-cover img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-radius: 15px;
}

.single-cover .fallback {
    aspect-ratio: 2/3;
    background: #344047;
    display: grid;
    place-items: center;
    border-radius: 15px;
}

.single-details h1 {
    font-size: clamp(23px,3vw,35px);
    line-height: 1.15;
    margin: 6px 0 12px;
}

.single-overview {
    color: #bdc7ca;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 8px 18px;
    margin: 18px 0;
}

.detail {
    border-bottom: 1px solid #ffffff14;
    padding-bottom: 7px;
    font-size: 13px;
}

.detail b {
    color: #8e9ea4;
    font-weight: 500;
    margin-right: 7px;
}

.single-block {
    margin: 22px 0;
}

.single-block h2 {
    font-size: 19px;
    margin: 0 0 13px;
}

.synopsis {
    white-space: normal;
    color: #cbd2d4;
}

.download-groups {
    display: grid;
    gap: 13px;
}

.download-group {
    border-radius: 16px;
    background: #ffffff0d;
    border: 1px solid #ffffff13;
    padding: 16px;
}

.download-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.download-group-head h3 {
    font-size: 15px;
    margin: 0;
}

.download-items {
    display: grid;
    gap: 9px;
}

.download-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #0003;
    border-radius: 11px;
    padding: 10px 12px;
    flex-wrap: wrap;
}

.download-name {
    font-size: 13px;
    font-weight: 650;
    flex: 1;
    min-width: 135px;
}

.download-size {
    font-weight: 800;
    color: #fff;
}

.download-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    border-radius: 9px;
    background: linear-gradient(120deg,#f8c43d,#d6a011);
    color: #1b2123;
    font-size: 12px;
    font-weight: 750;
}

.magnet-icon {
    color: #b52731;
    font-size: 18px;
}

.download-empty {
    font-size: 13px;
    color: #aeb9bb;
}

.trailer-frame {
    width: 100%;
    aspect-ratio: 16/9;
    border: 0;
    border-radius: 17px;
}

.related-grid {
    grid-template-columns: repeat(6,minmax(0,1fr));
}

.footer {
    border-top: 1px solid #ffffff12;
    padding: 22px 0 0;
    margin-top: 28px;
    color: #8d9da3;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.mobile-nav-toggle {
    display: none;
}

.sr-only {
    position: absolute!important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
}

@media(max-width:1180px) {
    .site-shell {
        margin: 14px;
        grid-template-columns: 190px minmax(0,1fr);
    }
    .sidebar {
        padding: 24px 12px 20px 16px;
    }
    .main {
        padding-right: 20px;
    }
    .poster-grid {
        grid-template-columns: repeat(5,minmax(0,1fr));
    }
}

@media(max-width:850px) {
    .site-shell {
        display: block;
    }
    .sidebar {
        padding: 16px;
        display: flex;
        align-items: center;
        gap: 14px;
        flex-wrap: wrap;
    }
    .brand {
        margin: 0;
    }
    .side-nav {
        display: flex;
        gap: 6px;
        flex-wrap: wrap;
    }
    .side-nav a {
        padding: 7px;
    }
    .sidebar-group {
        display: none;
    }
    .main {
        padding: 12px 18px 28px;
    }
    .hero {
        height: 320px;
    }
    .poster-grid {
        grid-template-columns: repeat(4,minmax(0,1fr));
    }
    .top-user {
        display: none;
    }
}

@media(max-width:580px) {
    .site-shell {
        margin: 0;
        border-radius: 0;
    }
    .sidebar {
        display: block;
    }
    .side-nav {
        margin-top: 12px;
    }
    .side-nav a {
        font-size: 12px;
    }
    .main {
        padding: 12px;
    }
    .topbar {
        gap: 7px;
    }
    .type-picker {
        padding: 11px;
    }
    .hero-wrap {
        display: block;
    }
    .hero {
        height: 290px;
        padding: 16px;
    }
    .hero-next {
        display: none;
    }
    .hero-content {
        max-width: 100%;
    }
    .poster-grid {
        grid-template-columns: repeat(3,minmax(0,1fr));
        gap: 14px 9px;
    }
    .related-grid {
        grid-template-columns: repeat(3,minmax(0,1fr));
    }
    .single-hero {
        height: 190px;
    }
    .single-header {
        grid-template-columns: 115px minmax(0,1fr);
        gap: 14px;
        padding: 0 8px 15px;
        margin-top: -50px;
    }
    .single-details h1 {
        font-size: 22px;
    }
    .details-grid {
        grid-template-columns: 1fr;
    }
    .footer {
        display: block;
    }
    .topbar {
        margin-bottom: 16px;
    }
    .poster-title {
        font-size: 12px;
    }
}

/* ===== Faixa de gêneros: menu WordPress e setas ===== */
.genres-wrap {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    margin: 0 0 18px;
}

.genres-wrap .genres {
    min-width: 0;
    flex: 1;
    margin: 0;
    padding: 3px 0 5px;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}

.genres-wrap .genres::-webkit-scrollbar {
    display: none;
}

.genres-items {
    display: flex;
    align-items: center;
    gap: 8px;
    width: max-content;
    min-width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.genres-items li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.genres-items a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 39px;
    white-space: nowrap;
    padding: 9px 18px;
    border-radius: 28px;
    background: #ffffff13;
    font-size: 13px;
    color: var(--text);
    transition: background .18s,color .18s;
}

.genres-items a:hover,.genres-items a.active,.genres-items .current-menu-item>a,.genres-items .current-menu-ancestor>a {
    background: white;
    color: #12191c;
}

.genres-arrow {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 13px;
    background: #ffffff17;
    color: #f8f9f9;
    transition: background .2s,opacity .2s;
    font-size: 27px;
    line-height: 1;
    padding: 0 0 3px;
}

.genres-arrow:hover:not(:disabled) {
    background: var(--accent);
    color: #172023;
}

.genres-arrow:disabled {
    opacity: .25;
    cursor: default;
}

.genres-wrap .genres:focus-visible,.genres-arrow:focus-visible,.genres-items a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

@media(max-width:580px) {
    .genres-wrap {
        gap: 5px;
    }
    .genres-arrow {
        flex-basis: 32px;
        width: 32px;
        height: 35px;
    }
    .genres-items a {
        padding: 8px 13px;
        font-size: 12px;
    }
}

/* v1.0.2 — Logo maior e imagem já recortada (sem bordas vazias da arte original). */
.sidebar .brand {
    width: 100%;
    min-height: 120px;
    margin-bottom: 25px;
    justify-content: center;
    overflow: hidden;
}

.sidebar .brand img,.sidebar .brand .brand-image {
    display: block;
    width: 100%;
    max-width: 220px;
    height: auto;
    max-height: none;
    object-fit: contain;
}

@media(max-width:850px) {
    .sidebar .brand {
        width: auto;
        min-height: 0;
        margin-bottom: 0;
        max-width: 195px;
    }
    .sidebar .brand img {
        width: 180px;
    }
}

@media(max-width:580px) {
    .sidebar .brand {
        max-width: 100%;
        justify-content: flex-start;
    }
    .sidebar .brand img {
        width: 190px;
    }
}

/* v1.0.4 - Logo compacta sem fundo e sem margens, ampliada no menu lateral. */
@media(min-width:1181px) {
    .site-shell {
        grid-template-columns: 255px minmax(0,1fr);
    }
    .sidebar {
        padding-left: 19px;
        padding-right: 19px;
    }
}

.sidebar .brand {
    width: 100%;
    min-height: 0;
    margin: 0 0 30px;
    justify-content: center;
    overflow: visible;
    line-height: 1;
}

.sidebar .brand img,.sidebar .brand .brand-image {
    display: block;
    width: 100%;
    max-width: 235px;
    height: auto;
    max-height: none;
    object-fit: contain;
}

@media(max-width:1180px) {
    .sidebar .brand img,.sidebar .brand .brand-image {
        max-width: 100%;
    }
}

@media(max-width:850px) {
    .sidebar .brand {
        margin: 0;
        max-width: 175px;
    }
    .sidebar .brand img,.sidebar .brand .brand-image {
        width: 175px;
        max-width: 100%;
    }
}

@media(max-width:580px) {
    .sidebar .brand {
        max-width: 225px;
    }
    .sidebar .brand img,.sidebar .brand .brand-image {
        width: 225px;
    }
}

/* v1.0.5: a imagem enviada em Identidade do site tem prioridade absoluta. */
.sidebar .brand .brand-image {
    height: auto;
    object-fit: contain;
    object-position: center;
    max-height: none;
}
