/* Central de Documentários — layout simples mobile-first */

.doc-header {
  position: sticky;
  top: 0;
  z-index: 100;
}

.doc-header.site-header {
  border-bottom: 1px solid var(--border);
}

/* Faixa PT — imagem full-width, altura 30px */
.site-pt-strip {
  width: 100%;
  height: 30px;
  max-height: 30px;
  overflow: hidden;
  line-height: 0;
  background: #020305;
}

.site-pt-strip__img {
  display: block;
  width: 100%;
  height: 30px;
  max-height: 30px;
  object-fit: cover;
  object-position: center center;
}

.site-build-banner {
  position: relative;
  margin: 0;
  padding: 0.14rem 0.4rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.1;
  overflow: hidden;
  border-bottom: 1px solid rgba(0, 0, 0, 0.5);
  box-shadow: none;
}

.site-build-banner__green {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 50%;
  background: linear-gradient(90deg, #006600 0%, #004400 35%, #001a00 65%, #000000 100%);
  z-index: 0;
}

.site-build-banner__red {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 50%;
  background: linear-gradient(270deg, #e8002a 0%, #9a0018 35%, #2a0008 65%, #000000 100%);
  z-index: 0;
}

.site-build-banner__text {
  position: relative;
  z-index: 1;
  color: #fff;
  text-shadow:
    0 0 8px rgba(0, 0, 0, 0.9),
    0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Faixa hacker topo — largura total do site */
.site-hacker-topband {
  position: relative;
  width: 100%;
  height: clamp(30px, 4vw, 38px);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(0, 18, 10, 0.95) 0%, rgba(3, 5, 8, 0.88) 100%);
  border-bottom: 1px solid rgba(0, 255, 136, 0.1);
  box-shadow: none;
}

.site-hacker-topband__grid {
  position: absolute;
  inset: 0;
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(0, 255, 136, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 136, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.site-hacker-topband__network {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
  pointer-events: none;
}

.site-hacker-topband__code-row {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.2rem;
  display: flex;
  width: max-content;
  gap: 3rem;
  white-space: nowrap;
  animation: topband-code-slide 120s linear infinite;
}

.site-hacker-topband__code-line {
  font-family: var(--font-mono);
  font-size: clamp(0.48rem, 0.65vw, 0.58rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(0, 255, 136, 0.22);
}

@keyframes topband-code-slide {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .site-hacker-topband__code-row {
    animation: none;
  }
}

/* Banner topo — largura total */
.doc-top-banner {
  display: block;
  position: relative;
  width: 100%;
  text-decoration: none;
  background: #000;
}

.doc-top-banner-img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 72px;
  max-height: 110px;
  object-fit: cover;
  object-position: center;
}

/* Tabs principais */
.doc-main-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.22rem;
  padding: 0.28rem 0.4rem;
  background: rgba(8, 14, 20, 0.98);
}

.doc-main-tabs .doc-tab {
  flex: 1 1 calc(25% - 0.22rem);
  min-width: 64px;
}

.doc-lang-switch__label {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.doc-main-tabs .doc-lang-switch {
  margin-left: 0;
}

@media (max-width: 520px) {
  .doc-main-tabs .doc-tab {
    flex: 1 1 calc(50% - 0.22rem);
  }
  .doc-main-tabs .doc-lang-switch {
    flex: 1 1 auto;
    justify-content: flex-end;
  }
}

.doc-tab {
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg-card);
  color: var(--text);
  font-weight: 700;
  font-size: 0.66rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.doc-tab.is-active {
  border-color: var(--green);
  color: var(--green);
  background: rgba(0, 255, 136, 0.1);
}

.doc-tab:hover,
.doc-tab:focus-visible {
  border-color: var(--cyan);
  outline: none;
}

.hub-panel[hidden] {
  display: none !important;
}

.hub-view-toggle {
  display: none !important;
}

.hub-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.hub-view-btn:hover,
.hub-view-btn:focus-visible {
  border-color: var(--green);
  color: var(--green);
  background: rgba(0, 255, 136, 0.08);
  outline: none;
}

.hub-panel.is-detail-mode .hub-view-toggle {
  display: none;
}

/* Lista = só capas/índice; detalhe = só o item escolhido; todos = tudo seguido */
.hub-panel.is-list-mode .doc-menu,
.hub-panel.is-list-mode .curto-menu,
.hub-panel.is-list-mode .artigo-menu {
  display: none;
}

.hub-panel.is-all-mode .doc-pick-grid,
.hub-panel.is-all-mode .curto-pick-list,
.hub-panel.is-all-mode .arquivo-index-wrap {
  display: none !important;
}

.hub-panel.is-all-mode .hub-view-all-btn {
  display: none;
}

.hub-panel.is-all-mode .hub-view-list-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hub-panel.is-list-mode .hub-view-list-btn,
.hub-panel.is-detail-mode .hub-view-list-btn {
  display: none !important;
}

.hub-panel.is-all-mode #docs-container > *:not(.is-hidden),
.hub-panel.is-all-mode #arquivo-container > *:not(.is-hidden),
.hub-panel.is-all-mode #curtos-container > *:not(.is-hidden),
.hub-panel.is-all-mode #artigos-container > *:not(.is-hidden) {
  display: block !important;
}

.hub-panel.is-list-mode #docs-container > *,
.hub-panel.is-list-mode #arquivo-container > *,
.hub-panel.is-list-mode #curtos-container > *,
.hub-panel.is-list-mode #artigos-container > * {
  display: none !important;
}

.hub-panel.is-detail-mode .doc-pick-grid,
.hub-panel.is-detail-mode .curto-pick-list,
.hub-panel.is-detail-mode .arquivo-index-wrap,
.hub-panel.is-detail-mode .doc-menu,
.hub-panel.is-detail-mode .curto-menu,
.hub-panel.is-detail-mode .artigo-menu,
.hub-panel.is-detail-mode .doc-featured-mount,
.hub-panel.is-all-mode .doc-featured-mount {
  display: none !important;
}

.doc-featured-mount[hidden] {
  display: none !important;
}

.doc-featured-mount:not([hidden]) + .doc-pick-grid {
  margin-top: 0.4rem;
}

.doc-featured {
  width: min(100%, 420px);
  max-width: 420px;
  margin: 0 auto 0.45rem;
  padding: 0.5rem 0.55rem 0.55rem;
  border: 1px solid rgba(0, 255, 136, 0.28);
  border-radius: 10px;
  background: rgba(8, 14, 22, 0.92);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
}

.doc-featured__head {
  margin-bottom: 0.4rem;
}

.doc-featured__eyebrow {
  margin: 0 0 0.15rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
}

.doc-featured__title {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.25;
  color: var(--text);
}

.doc-featured__player {
  border-radius: 8px;
  overflow: hidden;
}

.doc-featured__player .embed-open-bar {
  padding-top: 0.35rem;
}

.doc-featured__player .embed-open-btn {
  min-height: 1.75rem;
  padding: 0.28rem 0.5rem;
  font-size: 0.62rem;
}

.doc-featured__cta {
  display: inline-flex;
  margin-top: 0.45rem;
  min-height: 30px;
  align-items: center;
  padding: 0.3rem 0.6rem;
  border: 1px solid rgba(0, 255, 136, 0.35);
  border-radius: 999px;
  background: rgba(0, 255, 136, 0.08);
  color: var(--green);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.doc-featured__cta:hover,
.doc-featured__cta:focus-visible {
  border-color: var(--green);
  background: rgba(0, 255, 136, 0.14);
  outline: none;
}

.doc-featured__cta--primary {
  display: flex;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  margin-top: 0.55rem;
  font-size: 0.68rem;
}

@media (min-width: 720px) {
  .doc-featured {
    max-width: 400px;
  }
}

.hub-panel.is-detail-mode #docs-container > *:not(.is-active-detail),
.hub-panel.is-detail-mode #arquivo-container > *:not(.is-active-detail),
.hub-panel.is-detail-mode #curtos-container > *:not(.is-active-detail),
.hub-panel.is-detail-mode #artigos-container > *:not(.is-active-detail) {
  display: none !important;
}

.hub-panel.is-detail-mode .is-active-detail {
  display: block !important;
}

.doc-top-banner[hidden] {
  display: none !important;
}

.doc-top-banner-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.45rem 0.75rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--amber);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.88));
  text-shadow: 0 0 16px rgba(255, 176, 32, 0.5);
}

/* Menu = só nomes dos filmes */
.doc-menu {
  border-top: 1px solid var(--border);
  background: rgba(8, 14, 20, 0.98);
}

.doc-menu-list {
  list-style: none;
  margin: 0;
  padding: 0.4rem 0.5rem;
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.doc-menu-list::-webkit-scrollbar {
  display: none;
}

.doc-menu-list a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  white-space: nowrap;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.doc-menu-list a:hover,
.doc-menu-list a:focus-visible,
.doc-menu-list a.is-active {
  border-color: var(--green);
  color: var(--green);
  background: rgba(0, 255, 136, 0.08);
  outline: none;
}

.doc-menu-list li.is-hidden {
  display: none;
}

/* Pesquisa — só visível ao pesquisar */
.doc-search-toggle {
  min-height: 36px;
  width: 34px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.doc-search-toggle:hover,
.doc-search-toggle[aria-expanded="true"] {
  border-color: var(--green);
  color: var(--green);
  background: rgba(0, 255, 136, 0.06);
}

/* Tags — sempre visíveis */
.doc-tag-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.28rem;
  padding: 0.35rem 0.45rem 0.4rem;
  background: rgba(8, 14, 20, 0.98);
  border-top: 1px solid var(--border);
  overflow-x: hidden;
}

.doc-tag-chip {
  flex: 0 0 auto;
  min-height: 24px;
  padding: 0.12rem 0.5rem;
  border: 1px solid rgba(0, 229, 255, 0.28);
  border-radius: 999px;
  background: rgba(0, 229, 255, 0.05);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.doc-tag-chip:hover,
.doc-tag-chip:focus-visible {
  border-color: var(--cyan);
  color: var(--cyan);
  outline: none;
}

.doc-tag-chip.is-active {
  border-color: var(--green);
  background: rgba(0, 255, 136, 0.14);
  color: var(--green);
}

.tag-view-header {
  margin: 0.5rem 0 1rem;
}

.tag-view-title {
  margin: 0 0 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--green);
  letter-spacing: 0.04em;
}

.tag-view-meta {
  margin: 0;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.tag-result-group {
  margin-bottom: 1.35rem;
}

.tag-result-group__title {
  margin: 0 0 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--cyan);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tag-result-group__count {
  color: var(--text-muted);
  font-weight: 400;
}

.tag-result-list {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.tag-result-item {
  display: flex;
  align-items: center;
  gap: 0;
  min-height: 2.5rem;
  max-width: 100%;
  text-decoration: none;
  color: inherit;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.15s, background 0.15s;
}

.tag-result-item:hover,
.tag-result-item:focus-visible {
  border-color: var(--green);
  background: rgba(0, 255, 136, 0.04);
  outline: none;
}

.tag-result-item__media {
  flex: 0 0 2.5rem;
  width: 2.5rem;
  align-self: stretch;
  min-height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  border-right: 1px solid rgba(0, 255, 136, 0.12);
  overflow: hidden;
}

.tag-result-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tag-result-item__placeholder {
  font-size: 0.75rem;
  color: var(--cyan);
  opacity: 0.75;
}

.tag-result-item__info {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.2rem 0.35rem;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.3rem;
}

.tag-result-item__info strong {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.74rem;
  line-height: 1.2;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tag-result-item__info .doc-pick-card__meta {
  flex-direction: row;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
}

.tag-result-item__duration {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--green);
}

.tag-result-item__type {
  flex: 0 0 auto;
  align-self: center;
  padding: 0 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  white-space: nowrap;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.tag-result-empty {
  margin: 1rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.doc-search-bar {
  padding: 0.28rem 0.4rem 0.32rem;
  background: rgba(8, 14, 20, 0.98);
  border-top: 1px solid var(--border);
}

.doc-search-bar[hidden] {
  display: none !important;
}

.doc-search-input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg-card);
  color: var(--text);
  padding: 0.35rem 0.6rem;
  font-size: 0.82rem;
  outline: none;
}

.doc-search-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.12);
}

.doc-search-meta {
  margin: 0.2rem 0 0 0.1rem;
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* Cartões — escolher filme (substitui índice) */
.doc-pick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 1.25rem 0 2rem;
}

.doc-pick-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.15s;
}

.doc-pick-card:hover,
.doc-pick-card:focus-visible {
  border-color: var(--green);
  transform: translateY(-2px);
  outline: none;
}

.doc-pick-card.is-hidden {
  display: none;
}

.doc-pick-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  background: #000;
}

.doc-pick-card:not(:has(img)) .doc-pick-card-body {
  min-height: 7.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Curtos + Arquivo — lista compacta (mesmo layout) */
.curto-pick-list,
.arquivo-pick-list {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  margin: 0.65rem 0 1.25rem;
  width: 100%;
  max-width: 100%;
}

.curto-pick-card--list,
.arquivo-pick-card--list {
  flex-direction: row;
  align-items: center;
  border-width: 1px;
  border-radius: 8px;
  min-height: 2.5rem;
  max-width: 100%;
  overflow: hidden;
  text-align: left;
}

.curto-pick-card--list:hover,
.curto-pick-card--list:focus-visible,
.arquivo-pick-card--list:hover,
.arquivo-pick-card--list:focus-visible {
  transform: none;
  background: rgba(0, 255, 136, 0.05);
}

.arquivo-pick-card--list.is-active {
  border-color: var(--green);
  background: rgba(0, 255, 136, 0.08);
}

.curto-pick-card__media,
.arquivo-pick-card__media {
  flex: 0 0 2.5rem;
  width: 2.5rem;
  align-self: stretch;
  min-height: 2.5rem;
  background: rgba(0, 0, 0, 0.4);
  border-right: 1px solid rgba(0, 255, 136, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.curto-pick-card__media img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
}

.curto-pick-card__placeholder,
.arquivo-pick-card__placeholder {
  font-size: 0.75rem;
  line-height: 1;
  color: var(--cyan);
  opacity: 0.75;
}

.arquivo-pick-card__year {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--amber);
  text-align: center;
  line-height: 1.1;
  padding: 0 0.1rem;
}

.curto-pick-card__info,
.arquivo-pick-card__info {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.2rem 0.35rem;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.3rem;
}

.curto-pick-card__info strong,
.arquivo-pick-card__info strong {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.2;
  color: #fff;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.curto-pick-card--list .doc-pick-card__meta,
.arquivo-pick-card--list .doc-pick-card__meta {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  margin: 0;
}

.curto-pick-card--list .doc-pick-card__formats,
.arquivo-pick-card--list .doc-pick-card__formats {
  color: var(--green);
  font-size: 0.58rem;
  white-space: nowrap;
}

.curto-pick-card--list .lang-flag-img--pick,
.arquivo-pick-card--list .lang-flag-img--pick {
  width: 20px;
  height: 15px;
}

.curto-pick-card__action,
.arquivo-pick-card__action {
  flex: 0 0 auto;
  align-self: center;
  padding: 0 0.45rem 0 0.15rem;
  font-size: 0.62rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.curto-section.is-hidden {
  display: none;
}

.doc-pick-card-body {
  padding: 0.65rem 0.55rem 0.75rem;
  text-align: center;
}

.doc-pick-card-body strong {
  display: block;
  font-size: 0.82rem;
  line-height: 1.25;
  color: #fff;
  margin-bottom: 0.25rem;
}

.doc-pick-card__meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  margin: 0.1rem 0 0.35rem;
}

.doc-pick-card__flags {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.doc-pick-card__flag {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.lang-flag-img {
  display: inline-block;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
  vertical-align: middle;
}

.lang-flag-img--pick {
  width: 32px;
  height: 24px;
}

.lang-flag-img--badge {
  width: 27px;
  height: 20px;
}

.lang-flag-img--extra,
.lang-flag-img--mirror {
  width: 27px;
  height: 20px;
}

.doc-pick-card__formats {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.doc-pick-card-body span:last-child {
  font-size: 0.72rem;
  color: var(--green);
  font-weight: 700;
}

/* Secção de cada filme */
.doc-section {
  margin-bottom: 2.5rem;
  padding: 1rem;
  background: rgba(8, 14, 22, 0.97);
  border: 1px solid rgba(0, 255, 136, 0.22);
  border-radius: 12px;
  scroll-margin-top: 8.5rem;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(0, 255, 136, 0.06);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.doc-section.is-hidden {
  display: none;
}

.doc-section h2 {
  margin: 0 0 0.25rem;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: #fff;
}

.doc-section .doc-subtitle {
  margin: 0 0 1rem;
  color: var(--amber);
  font-size: 0.8rem;
}

/* Sinopse dentro de cada item */
.doc-comment {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 10px;
}

.doc-section .doc-comment:last-child,
.curto-section .doc-comment:last-child {
  margin-top: 1.25rem;
  margin-bottom: 0;
}

.doc-comment h3 {
  margin: 0 0 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--cyan);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.synopsis-layout {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.synopsis-layout--stack {
  gap: 1rem;
}

.synopsis-cover {
  flex: 0 0 auto;
  width: 100%;
}

.synopsis-cover--hero {
  max-width: 100%;
}

.synopsis-cover img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid rgba(0, 229, 255, 0.22);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  object-fit: cover;
}

.synopsis-cover--hero img {
  max-height: 320px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.25);
}

.synopsis-text {
  flex: 1 1 auto;
  min-width: 0;
}

@media (min-width: 520px) {
  .synopsis-cover--hero img {
    max-height: 380px;
  }
}

@media (min-width: 720px) {
  .synopsis-cover--hero img {
    max-height: 420px;
  }
}

.doc-comment p {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.doc-comment p:last-child {
  margin-bottom: 0;
}

.synopsis-body {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.synopsis-body h4 {
  margin: 1rem 0 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cyan);
}

.synopsis-body h4:first-child {
  margin-top: 0;
}

.synopsis-body ul {
  margin: 0 0 0.75rem;
  padding-left: 1.15rem;
}

.synopsis-body li {
  margin-bottom: 0.45rem;
  line-height: 1.5;
}

.synopsis-lead {
  margin: 0 0 0.75rem !important;
  font-size: 0.95rem !important;
  font-weight: 700;
  color: var(--text) !important;
  line-height: 1.4 !important;
}

.synopsis-note {
  margin: 0.75rem 0 !important;
  padding: 0.65rem 0.75rem;
  background: rgba(255, 176, 32, 0.08);
  border: 1px solid rgba(255, 176, 32, 0.28);
  border-radius: 8px;
  color: var(--amber) !important;
  font-size: 0.86rem !important;
}

.synopsis-closing {
  margin-top: 0.85rem !important;
  font-style: italic;
}

.synopsis-divider {
  margin: 1.1rem 0;
  border: none;
  border-top: 1px solid rgba(0, 229, 255, 0.2);
}

.synopsis-lang-tag {
  margin: 0 0 0.5rem !important;
  font-family: var(--font-mono);
  font-size: 0.72rem !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan) !important;
}

/* Arquivo — índice em lista (igual aos curtos) */
.arquivo-index-wrap {
  margin: 0 0 1.5rem;
}

.arquivo-index-title {
  margin: 0 0 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
}

.arquivo-pick-card.is-hidden {
  display: none;
}

.arquivo-section.is-hidden {
  display: none;
}

.arquivo-pending {
  margin: 0.5rem 0 0;
  padding: 0.75rem;
  border-radius: 10px;
  background: rgba(255, 176, 32, 0.08);
  border: 1px solid rgba(255, 176, 32, 0.25);
  color: var(--amber);
  font-size: 0.84rem;
}

/* Textos / Artigos — detalhe (lista = doc-pick-grid como vídeos) */
.text-body h3 {
  margin: 1.25rem 0 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--cyan);
}

.text-body ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.text-body li {
  margin-bottom: 0.4rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.text-body .artigo-divider {
  margin: 1.5rem 0;
  border: none;
  border-top: 1px solid var(--border);
}

.text-body .artigo-callout {
  margin: 0.85rem 0;
  padding: 0.7rem 0.75rem;
  background: rgba(255, 176, 32, 0.08);
  border: 1px solid rgba(255, 176, 32, 0.3);
  border-radius: 10px;
  color: var(--amber);
  font-weight: 700;
  font-size: 0.84rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.text-body ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.text-section .doc-comment {
  margin-bottom: 0.85rem;
  padding: 0.7rem 0.75rem;
}

.text-section .doc-comment p {
  font-size: 0.84rem;
}

.text-section h2 {
  font-size: clamp(0.82rem, 3.8vw, 1.05rem);
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.text-body {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.text-body a {
  color: var(--cyan);
}

.text-body a.artigo-doc-link {
  color: var(--green);
  font-weight: 700;
  text-decoration: none;
}

.text-body a.artigo-doc-link:hover,
.text-body a.artigo-doc-link:focus-visible {
  color: #7dffb8;
  text-decoration: underline;
  outline: none;
}

.text-body p {
  margin: 0 0 0.75rem;
}

.mirror-block {
  margin-top: 1rem;
}

.mirror-block h3 {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: var(--cyan);
  font-family: var(--font-mono);
}

.mirror-block-collapsible {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  background: rgba(8, 14, 20, 0.55);
}

.mirror-block-collapsible summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--cyan);
  min-height: 44px;
  display: flex;
  align-items: center;
}

.mirror-block-collapsible summary::-webkit-details-marker {
  display: none;
}

.mirror-block-collapsible summary::before {
  content: "▸ ";
  color: var(--green);
  margin-right: 0.25rem;
}

.mirror-block-collapsible[open] summary::before {
  content: "▾ ";
}

.mirror-block-collapsible .mirror-list {
  margin-top: 0.55rem;
}

.doc-extras {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.9rem;
}

.doc-extras__sep {
  height: 0.35rem;
  border: 0;
}

/* Esconde separadores quando filtro está activo (não há grupos misturados) */
.doc-section[data-lang-filter] .doc-extras__sep,
.curto-section[data-lang-filter] .doc-extras__sep {
  display: none;
}

.doc-extra-block {
  margin: 0;
}

.doc-extra-block > summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.doc-extra-block__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  font-size: 0.55rem;
  line-height: 1;
  flex-shrink: 0;
}

.doc-extra-block__icon--trailer {
  color: var(--green, #00ff88);
  border: 1px solid rgba(0, 255, 136, 0.4);
  background: rgba(0, 255, 136, 0.1);
}

.doc-extra-block__icon--full {
  color: var(--gold-armilar, #c9a227);
  border: 1px solid rgba(201, 162, 39, 0.45);
  background: rgba(201, 162, 39, 0.1);
  font-size: 0.42rem;
}

.doc-extra-block__flag {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.doc-extra-block__title {
  color: var(--cyan);
}

.doc-extra-block__duration {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.doc-extra-block__lang {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  padding: 0.12rem 0.45rem;
  border: 1px solid rgba(201, 162, 39, 0.45);
  border-radius: 999px;
  background: rgba(201, 162, 39, 0.08);
  color: var(--gold-armilar, #c9a227);
}


.doc-extra-block--version .doc-extra-block__title {
  color: var(--gold-armilar, #c9a227);
}

.doc-extra-block--trailer .doc-extra-block__title {
  color: var(--green, #00ff88);
}

.doc-extra-block__video {
  margin-top: 0.6rem;
}

.doc-extra-block__links {
  margin-top: 0.75rem;
}

.doc-extra-block__links-title {
  margin: 0 0 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.doc-original-note {
  margin: 0.4rem 0 0.8rem;
  padding: 0.45rem 0.7rem;
  border-left: 3px solid var(--gold-armilar, #c9a227);
  background: rgba(201, 162, 39, 0.06);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.is-translating {
  position: relative;
  opacity: 0.7;
}

.is-translating::after {
  content: "…";
  display: inline-block;
  margin-left: 0.35rem;
  font-family: var(--font-mono);
  color: var(--gold-armilar, #c9a227);
  animation: pt-translate-pulse 1.2s ease-in-out infinite;
}

@keyframes pt-translate-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.doc-detail-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin: 0.35rem 0 0.55rem;
}

.doc-detail-toolbar .doc-langs {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.doc-langs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0.35rem 0 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.doc-langs__head {
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-right: 0.15rem;
}

.doc-langs__hint {
  flex: 1 1 100%;
  margin: 0;
  padding: 0.35rem 0.5rem;
  border-left: 2px solid rgba(201, 162, 39, 0.5);
  background: rgba(201, 162, 39, 0.06);
  color: var(--text-muted);
  font-size: 0.65rem;
  line-height: 1.35;
}

.doc-langs__hint-dismiss {
  margin-left: 0.35rem;
  padding: 0 0.25rem;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  vertical-align: middle;
}

.doc-langs__hint-dismiss:hover,
.doc-langs__hint-dismiss:focus-visible {
  color: var(--cyan);
  outline: none;
}

.lang-badge .lang-flag-img--badge {
  flex-shrink: 0;
}

.lang-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(8, 14, 20, 0.55);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, background 0.15s, color 0.15s;
}

.lang-badge:hover {
  border-color: var(--cyan);
  transform: translateY(-1px);
}

.lang-badge--pt { border-color: rgba(0, 255, 136, 0.45); color: var(--green, #00ff88); }
.lang-badge--ua { border-color: rgba(0, 168, 255, 0.5);  color: #5ec4ff; }
.lang-badge--en { border-color: rgba(255, 255, 255, 0.35); color: #fff; }
.lang-badge--all { border-color: rgba(201, 162, 39, 0.45); color: var(--gold-armilar, #c9a227); }

.lang-badge.is-active {
  background: rgba(0, 255, 136, 0.12);
  box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.15);
}
.lang-badge--ua.is-active  { background: rgba(0, 168, 255, 0.14);  box-shadow: 0 0 0 2px rgba(0, 168, 255, 0.18); }
.lang-badge--en.is-active  { background: rgba(255, 255, 255, 0.1); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15); }
.lang-badge--all.is-active { background: rgba(201, 162, 39, 0.12); box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.18); }

/* Filtro por língua dentro de um vídeo */
.doc-section[data-lang-filter="pt"] .video-wrap[data-lang]:not([data-lang="pt"]),
.doc-section[data-lang-filter="pt"] .doc-extra-block[data-lang]:not([data-lang="pt"]),
.doc-section[data-lang-filter="pt"] .mirror-block--lang:not([data-lang="pt"]),
.doc-section[data-lang-filter="ua"] .video-wrap[data-lang]:not([data-lang="ua"]),
.doc-section[data-lang-filter="ua"] .doc-extra-block[data-lang]:not([data-lang="ua"]),
.doc-section[data-lang-filter="ua"] .mirror-block--lang:not([data-lang="ua"]),
.doc-section[data-lang-filter="en"] .video-wrap[data-lang]:not([data-lang="en"]),
.doc-section[data-lang-filter="en"] .doc-extra-block[data-lang]:not([data-lang="en"]),
.doc-section[data-lang-filter="en"] .mirror-block--lang:not([data-lang="en"]),
.curto-section[data-lang-filter="pt"] .video-wrap[data-lang]:not([data-lang="pt"]),
.curto-section[data-lang-filter="pt"] .doc-extra-block[data-lang]:not([data-lang="pt"]),
.curto-section[data-lang-filter="pt"] .mirror-block--lang:not([data-lang="pt"]),
.curto-section[data-lang-filter="ua"] .video-wrap[data-lang]:not([data-lang="ua"]),
.curto-section[data-lang-filter="ua"] .doc-extra-block[data-lang]:not([data-lang="ua"]),
.curto-section[data-lang-filter="ua"] .mirror-block--lang:not([data-lang="ua"]) {
  display: none !important;
}

.mirror-block__count {
  font-size: 0.72em;
  color: var(--text-muted);
  font-weight: 600;
}

.lang-badge__txt {
  font-family: var(--font-mono);
}

/* Selector de língua no header */
.doc-lang-switch {
  display: flex;
  align-items: center;
  gap: 0.18rem;
  padding: 0;
}

.doc-lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-height: 36px;
  padding: 0.2rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg-card);
  color: var(--text);
  line-height: 0;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}

.doc-lang-btn__flag {
  display: block;
  width: 24px;
  height: 18px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.doc-lang-btn:hover {
  border-color: var(--cyan);
}

.doc-lang-btn.is-active {
  border-color: var(--green);
  background: rgba(0, 255, 136, 0.1);
  transform: translateY(-1px);
}

.mirror-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.4rem;
}

.mirror-list a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 44px;
  padding: 0.5rem;
  text-decoration: none;
  color: var(--text);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
}

.mirror-list__item--primary a {
  border-color: rgba(0, 255, 136, 0.42);
  background: rgba(0, 255, 136, 0.07);
}

.mirror-rec-badge {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green);
}

.mirror-list a:hover,
.mirror-list a:focus-visible {
  border-color: var(--green);
  color: var(--green);
  outline: none;
}

.mirror-list .label {
  display: inline;
}

.doc-back-top {
  display: inline-flex;
  margin-top: 1rem;
  min-height: 44px;
  align-items: center;
  padding: 0.5rem 0.85rem;
  color: var(--cyan);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.doc-back-top--toolbar {
  margin-top: 0;
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  border: 1px solid rgba(0, 229, 255, 0.28);
  border-radius: 999px;
  background: rgba(0, 229, 255, 0.06);
}

.doc-back-top--toolbar:hover,
.doc-back-top--toolbar:focus-visible {
  color: var(--green);
  border-color: rgba(0, 255, 136, 0.45);
  background: rgba(0, 255, 136, 0.08);
  outline: none;
}

@media (max-width: 640px) {
  .site-hacker-topband {
    display: none;
  }

  .site-pt-strip,
  .site-pt-strip__img {
    height: 22px;
    max-height: 22px;
  }

  .site-build-banner {
    padding: 0.08rem 0.35rem;
    font-size: 0.52rem;
  }

  .doc-top-banner-img {
    min-height: 48px;
    max-height: 64px;
  }

  .doc-main-tabs {
    padding: 0.2rem 0.35rem;
    gap: 0.18rem;
  }

  .doc-tab {
    min-height: 32px;
    font-size: 0.62rem;
  }

  .doc-lang-btn {
    width: 30px;
    min-height: 32px;
    font-size: 0.9rem;
  }

  .doc-lang-switch__label {
    font-size: 0.56rem;
  }

  .doc-featured {
    width: 100%;
    max-width: none;
    padding: 0.45rem 0.5rem 0.5rem;
  }
}

@media (min-width: 600px) {
  .text-body {
    font-size: 0.92rem;
  }

  .text-body .artigo-callout {
    font-size: 0.9rem;
    padding: 0.85rem 1rem;
  }

  .doc-top-banner-img {
    max-height: 130px;
  }

  .doc-pick-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
  }

  .curto-pick-list,
  .arquivo-pick-list {
    margin-left: 0;
    margin-right: 0;
  }

  .mirror-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Contador de visitas — discreto */
.site-footer-minimal {
  margin-top: 2rem;
  padding: 0.85rem 1rem calc(0.85rem + var(--safe-bottom));
  border-top: none;
  background: transparent;
}

.visit-counter {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  opacity: 0.38;
  letter-spacing: 0.05em;
  user-select: none;
}

@media (min-width: 900px) {
  .doc-menu-list {
    justify-content: center;
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .doc-search-bar {
    max-width: 1200px;
    margin: 0 auto;
  }
}
