:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --muted: #9ca3af;
  --accent: #E30613;
  --accent-2: #E30613;
  --glass: rgba(255, 255, 255, 0.03);
  --header-offset: 92px;
}

body.theme-light {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --muted: #4b5563;
  --accent: #E30613;
  --accent-2: #E30613;
  --glass: rgba(15, 23, 32, 0.06);
  color: #000000;
  background: linear-gradient(180deg, var(--bg), #e9edf5);
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 8px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.theme-toggle:focus-visible {
  outline: 2px solid rgba(255, 179, 71, 0.45);
  outline-offset: 2px;
}

body.theme-light .topbar {
  background: transparent !important;
  box-shadow: none !important;
  border-bottom: none !important;
}

body.theme-light .nav-list a {
  color: #374151;
}

body.theme-light .nav-list a:hover {
  color: #000000;
  background: rgba(0, 0, 0, 0.05);
}

body.theme-light .theme-toggle {
  border-color: rgba(15, 23, 32, 0.14);
  background: rgba(15, 23, 32, 0.03);
  color: #374151;
}

body.theme-light .theme-toggle:hover {
  color: #000000;
  border-color: rgba(15, 23, 32, 0.28);
}

body.theme-light .search {
  background: rgba(255, 255, 255, 0.78);
  color: #000000;
  border-color: rgba(15, 23, 42, 0.18);
}

@media (max-width: 700px) {
  :root {
    --header-offset: 106px;
  }

  .topbar nav {
    gap: 8px;
  }

  .theme-toggle {
    width: 34px;
    height: 34px;
  }
}

/* Stronger light theme overrides for contrast across all pages */
body.theme-light .nav-list {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

body.theme-light .content h1,
body.theme-light .content h2,
body.theme-light .preview-title,
body.theme-light .hero-content h1,
body.theme-light .noticia-info h3,
body.theme-light .sobre h1,
body.theme-light .sobre h2,
body.theme-light .sobre h3 {
  color: #0f172a;
}

body.theme-light .content p,
body.theme-light .hero-content p,
body.theme-light .noticia-info p,
body.theme-light .sobre p,
body.theme-light .sobre .contacto p,
body.theme-light .missao p,
body.theme-light .membro p {
  color: #334155;
}

body.theme-light .preview-section,
body.theme-light .videos-row,
body.theme-light .noticias-lista,
body.theme-light .sobre,
body.theme-light .sobre-container,
body.theme-light .contacto,
body.theme-light .carousel-item,
body.theme-light .video-info,
body.theme-light .details,
body.theme-light .about-text,
body.theme-light .about-card,
body.theme-light .membro,
body.theme-light .player-content {
  background: #ffffff;
  color: #0f172a;
}

body.theme-light .preview-section {
  border: 1px solid rgba(15, 23, 42, 0.08);
}

body.theme-light .hero-overlay {
  background: rgba(255, 255, 255, 0.58);
}

body.theme-light .noticia-card,
body.theme-light .episode,
body.theme-light .search-results-active .episodes .episode {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.08);
}

body.theme-light .episode h3,
body.theme-light .search-results-active .episodes h3 {
  color: #0f172a;
}

body.theme-light .carousel-item:not(.active) {
  filter: brightness(0.92);
}

body.theme-light .dot {
  background-color: #9ca3af;
}

body.theme-light .dot.active {
  background-color: #0f172a;
}

body.theme-light .footer {
  background: #f8fafc;
  color: #334155;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

body.theme-light .footer-section h2,
body.theme-light .footer-section h3 {
  color: #E30613;
}

body.theme-light .footer-section p,
body.theme-light .footer-section ul li a,
body.theme-light .footer-bottom {
  color: #475569;
}

body.theme-light .footer-section ul li a:hover {
  color: #0f172a;
}

body.theme-light .footer-bottom a:hover,
body.theme-light .footer-bottom a:focus-visible {
  color: #E30613;
}

body.theme-light .btn-secondary,
body.theme-light .load-more,
body.theme-light .btn-logout {
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

body.theme-light .btn-secondary:hover,
body.theme-light .load-more:hover,
body.theme-light .btn-logout:hover {
  background: #e2e8f0;
}

body.theme-light .close-btn {
  background: #E30613;
  color: #ffffff;
}

body.theme-light .sociais-icones a {
  color: #475569;
}

body.theme-light .sociais-icones a:hover {
  color: #E30613;
}

@media (max-width: 700px) {
  body.theme-light .nav-list {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }
}

/* Main logo prominence and positioning */
.topbar {
  position: relative;
  width: 100%;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  min-height: 72px;
  padding: 14px 28px;
  flex-wrap: nowrap;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  border-bottom: none !important;
  transform: none !important;
  transition: none !important;
}

.navbar.topbar {
  position: relative !important;
  width: 100% !important;
  z-index: 1100 !important;
  transform: none !important;
  transition: none !important;
}

#site-header {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  width: 100% !important;
  z-index: 1200 !important;
  transform: none !important;
  transition: none !important;
}

body:not(.home-page) {
  padding-top: 0;
}

@keyframes pageFadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body[data-page="index.html"] .home-main,
body[data-page="episodios.html"] main,
body[data-page="artigos.html"] main,
body[data-page="artigo.html"] .news-article-main {
  animation: pageFadeInUp 0.9s ease both;
}


.logo {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex-shrink: 0;
  gap: 16px;
  padding: 0;
  margin-left: 12px;
}

.logo-img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  display: block;
}

.logo-inline-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
  margin: 0;
  transform: none;
  vertical-align: middle;
}

.logo-text {
  font-family: Montserrat, sans-serif;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.1;
  margin-left: 0;
}

.logo-word-primary {
  color: #E30613;
}

.logo-word-secondary {
  color: #ffffff;
}

body.theme-dark .logo-word-secondary {
  color: #ffffff;
}

.typing-text {
  color: #E30613 !important;
  text-shadow: 0 0 10px rgba(220, 38, 38, 0.4);
}

body.theme-light .logo-word-secondary {
  color: #000000;
}

@media (max-width: 700px) {
  .logo {
    margin-left: 10px;
    gap: 14px;
  }

  .logo-img {
    width: 70px;
    height: 70px;
  }

  .logo-text {
    font-size: 1rem;
  }

  .logo-inline-icon {
    width: 28px;
    height: 28px;
  }
}

/* Navigation and search improvements */
.topbar nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

.topbar .topbar-nav-wrap {
  display: flex;
  align-items: center;
  margin-left: auto;
  flex: 0 0 auto;
  padding-right: 12px;
}

.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
}

.subscribe-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 114px;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none !important;
  white-space: nowrap;
  font-size: 0.9rem;
  line-height: 1;
  letter-spacing: 0.01em;
  font-weight: 700;
  color: #ffffff;
  background: rgba(227, 6, 19, 0.92);
  box-shadow: 0 8px 18px rgba(227, 6, 19, 0.22);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.subscribe-link:hover,
.subscribe-link:focus-visible {
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(227, 6, 19, 0.28);
}

.nav-list li {
  list-style: none;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 20px;
}

.nav-list a {
  position: relative;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 8px 4px;
  font-size: 0.88rem;
  color: #f8fafc;
  text-decoration: none !important;
  border: none;
  border-radius: 10px;
  outline: none;
  box-shadow: none;
  transition: all 0.22s ease;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: #E30613 !important;
  background: transparent !important;
  box-shadow: none;
  transform: none;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.55);
  outline: none !important;
}

.nav-list a[aria-current="page"] {
  color: #E30613 !important;
  background: transparent !important;
  text-shadow: 0 0 10px rgba(227, 6, 19, 0.38);
}

.subscribe-link,
.subscribe-link:hover,
.subscribe-link:focus-visible,
.subscribe-link[aria-current="page"] {
  color: #ffffff !important;
  text-shadow: none !important;
}

.nav-list a:focus,
.nav-list a:active {
  outline: none !important;
  box-shadow: none !important;
}

.nav-list a::after {
  content: none;
  display: none !important;
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 2px;
  height: 2px;
  background: #E30613;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.8);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.22s ease;
}

.nav-list a:hover::after,
.nav-list a:focus-visible::after {
  transform: scaleX(0);
}

.nav-list a[aria-current="page"]::after {
  transform: scaleX(0);
}

.menu-toggle,
.theme-toggle {
  border: none !important;
  outline: none;
  box-shadow: none;
}

.menu-toggle:hover {
  color: #ffffff;
  background: #E30613;
  box-shadow: 0 0 14px rgba(220, 38, 38, 0.65);
}

.theme-toggle {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
}

.theme-toggle:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.search-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 280px;
  flex: 1 1 340px;
  max-width: 460px;
  margin-left: 0;
  margin-right: 0;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.search {
  width: 100%;
  max-width: 460px;
  padding: 10px 14px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: all 0.22s ease;
}

.search::placeholder {
  color: #94a3b8;
}

.search:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.65), 0 0 16px rgba(220, 38, 38, 0.3);
}

body.theme-light .menu-toggle:hover {
  color: #ffffff;
}

body.theme-light .theme-toggle {
  color: #000000;
  background: rgba(15, 23, 42, 0.08);
}

body.theme-light .theme-toggle:hover {
  color: #000000;
  background: rgba(15, 23, 42, 0.16);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.2);
}

body.theme-light .search {
  background: rgba(255, 255, 255, 0.78);
  color: #000000;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.18);
}

body.theme-light .subscribe-link {
  color: #ffffff;
  background: #E30613;
}

body.theme-light .nav-list a {
  color: #111827;
}

body.theme-dark .nav-list a {
  color: #f8fafc;
}

body[data-page="episodios.html"] .topbar,
body[data-page="episodios.html"] .navbar.topbar,
body[data-page="studio-episodios.html"] .topbar,
body[data-page="studio-episodios.html"] .navbar.topbar {
  background: rgba(6, 6, 8, 0.28) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
}

body[data-page="episodios.html"] .logo-word-secondary,
body[data-page="episodios.html"] .nav-list a,
body[data-page="episodios.html"] .theme-toggle,
body[data-page="episodios.html"] .search,
body[data-page="studio-episodios.html"] .logo-word-secondary,
body[data-page="studio-episodios.html"] .nav-list a,
body[data-page="studio-episodios.html"] .theme-toggle,
body[data-page="studio-episodios.html"] .search {
  color: #f8fafc !important;
}

body[data-page="episodios.html"] .theme-toggle,
body[data-page="studio-episodios.html"] .theme-toggle {
  background: rgba(255, 255, 255, 0.08) !important;
}

/* Episódios é sempre escura: o botão fica sem ícone (é a entrada discreta
   do estúdio — 5 cliques, ver episodios.js). Toques rápidos sem zoom. */
body[data-page="episodios.html"] .theme-toggle .theme-icon {
  display: none !important;
}

body[data-page="episodios.html"] .theme-toggle {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

body[data-page="episodios.html"] .search,
body[data-page="studio-episodios.html"] .search {
  background: rgba(255, 255, 255, 0.08) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
}

body[data-page="episodios.html"] .search::placeholder,
body[data-page="studio-episodios.html"] .search::placeholder {
  color: #cbd5e1 !important;
}

body[data-page="sobre.html"] .search-container {
  min-width: 300px;
  max-width: 420px;
}

body[data-page="sobre.html"] .search {
  max-width: 420px;
  padding: 9px 12px;
}

body[data-page="sobre.html"] .theme-toggle {
  width: 36px;
  height: 36px;
}

body.theme-light .search::placeholder {
  color: #6b7280;
}

body.theme-light .search:focus {
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.6), 0 0 14px rgba(220, 38, 38, 0.25);
}

@media (max-width: 700px) {
  .topbar nav {
    gap: 8px;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
  }

  .nav-list {
    position: fixed;
    top: 64px;
    right: 12px;
    background: rgba(11, 11, 15, 0.96);
    backdrop-filter: blur(6px);
    padding: 12px;
    border-radius: 10px;
    flex-direction: column;
    display: none;
    z-index: 1300;
    width: min(240px, calc(100vw - 24px));
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
    align-items: stretch;
  }

  body.theme-light .nav-list {
    background: rgba(255, 255, 255, 0.98) !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12) !important;
  }

  body.theme-light .nav-list a {
    color: #111827 !important;
  }

  .nav-list.show {
    display: flex;
  }

  .nav-list li {
    width: 100%;
  }

  .nav-list a,
  .subscribe-link {
    width: 100%;
    justify-content: center;
  }

  .subscribe-link {
    min-width: 0;
    height: 36px;
    padding: 0 14px;
    font-size: 0.84rem;
  }

  .search-container {
    min-width: 0;
    flex: 1;
  }

  .search {
    width: 100%;
    max-width: 190px;
    padding: 8px 12px;
  }
}

/* Legacy home/ads visuals removed from global theme scope to avoid page bleed. */

/* CTA adaptation: Episodios button + icon */
.btn-primary {
  background: linear-gradient(90deg, #E30613, #E30613);
  color: #ffffff !important;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.35);
}

.btn-primary i,
.btn-primary span {
  color: inherit;
}

.btn-primary:hover {
  background: linear-gradient(90deg, #E30613, #E30613);
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.45);
}

body.theme-light .btn-primary {
  background: linear-gradient(90deg, #E30613, #E30613);
  color: #ffffff !important;
  box-shadow: 0 8px 18px rgba(220, 38, 38, 0.25);
}

body.theme-light .btn-primary:hover {
  background: linear-gradient(90deg, #E30613, #E30613);
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.32);
}

.btn-secondary {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5 !important;
}

.btn-secondary i,
.btn-secondary span {
  color: inherit;
}

.btn-secondary:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.85);
  color: #fecaca !important;
  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.28);
}

body.theme-light .btn-secondary {
  background: #ffffff;
  border: 1px solid rgba(185, 28, 28, 0.45);
  color: #E30613 !important;
}

body.theme-light .btn-secondary:hover {
  background: #fef2f2;
  border-color: rgba(185, 28, 28, 0.75);
  color: #E30613 !important;
  box-shadow: 0 8px 16px rgba(185, 28, 28, 0.2);
}

/* Home-specific visual blocks now live in static/css/index.css only. */

/* Theme background fix: keep solid backgrounds and remove split gradients */
html,
body {
  background-image: none !important;
}

body.theme-dark,
html.theme-dark body,
html body.theme-dark {
  background: #000000 !important;
}

body.theme-light,
html.theme-light body,
html body.theme-light {
  background: #ffffff !important;
  background-image: none !important;
}

body.theme-light main,
body.theme-light .preview-section,
body.theme-light .noticias-row,
body.theme-light .news-article-main,
body.theme-light .footer {
  background-image: none !important;
}

/* Global responsive layer */
@media (max-width: 1100px) {
  .topbar {
    padding: 14px 18px;
    gap: 10px;
  }

  .logo {
    margin-left: 0;
  }

  .search-container {
    min-width: 0;
    flex: 1;
    max-width: 360px;
  }

  .search {
    width: 100%;
    max-width: 100%;
  }
}

@media (min-width: 821px) and (max-width: 1100px) {
  .topbar {
    display: grid;
    grid-template-columns: auto minmax(260px, 360px) auto;
    align-items: center;
    gap: 14px;
    padding: 16px 24px;
  }

  .logo {
    margin-left: 4px;
  }

  .logo-inline-icon {
    margin-left: 6px;
  }

  .logo-text {
    font-size: 0.9rem;
  }

  .search-container {
    position: static;
    left: auto;
    transform: none;
    width: 100%;
    min-width: 0;
    max-width: 360px;
    justify-self: center;
    flex: 0 1 auto;
  }

  .search {
    max-width: 360px;
    padding: 10px 14px;
    font-size: 0.94rem;
  }

  .topbar .topbar-nav-wrap {
    margin-left: 0;
    padding-right: 4px;
    justify-self: end;
  }

  .topbar nav {
    gap: 10px;
  }

  .nav-list {
    gap: 14px;
  }

  .nav-list a {
    font-size: 0.84rem;
    padding: 7px 2px;
  }

  .theme-toggle,
  .subscribe-link {
    flex-shrink: 0;
  }

  .subscribe-link {
    height: 34px;
    padding: 0 12px;
    font-size: 0.84rem;
  }
}

@media (max-width: 820px) {
  .topbar {
    flex-wrap: wrap;
    align-items: center;
    row-gap: 8px;
    column-gap: 10px;
    padding: 12px 12px 10px;
  }

  .logo {
    order: 1;
  }

  .topbar .topbar-nav-wrap {
    order: 2;
    margin-left: auto;
  }

  .search-container {
    order: 3;
    width: 100%;
    max-width: 100%;
    flex-basis: 100%;
    position: static;
    left: auto;
    transform: none;
  }

  .search {
    width: 100%;
    max-width: 100%;
    padding: 9px 12px;
  }

  .nav-list {
    gap: 12px;
  }

  .nav-list a {
    padding: 6px 6px;
    font-size: 0.95rem;
  }
}

@media (max-width: 560px) {
  .logo-text {
    font-size: 0.92rem;
  }

  .logo-inline-icon {
    width: 22px;
    height: 22px;
  }

  .topbar nav {
    gap: 6px;
  }

  .theme-toggle,
  .menu-toggle {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 480px) {
  .topbar {
    padding: 10px 10px 8px;
  }

  .logo {
    gap: 8px;
  }

  .logo-text {
    font-size: 0.84rem;
  }

  .logo-inline-icon {
    width: 20px;
    height: 20px;
  }

  .search {
    padding: 8px 11px;
    font-size: 0.92rem;
  }

  .nav-list {
    top: 58px;
    right: 8px;
    padding: 10px;
    width: min(220px, calc(100vw - 16px));
  }

  .nav-list a,
  .subscribe-link {
    font-size: 0.86rem;
  }
}






.logo,
.logo:hover,
.logo:focus,
.logo:active,
.logo:visited,
.logo .logo-text,
.logo .logo-word-primary,
.logo .logo-word-secondary {
  text-decoration: none !important;
  border-bottom: 0 !important;
}

body[data-page="episodios.html"] .logo,
body[data-page="episodios.html"] .logo .logo-text,
body[data-page="episodios.html"] .logo .logo-word-secondary,
body[data-page="studio-episodios.html"] .logo,
body[data-page="studio-episodios.html"] .logo .logo-text,
body[data-page="studio-episodios.html"] .logo .logo-word-secondary {
  color: #f8fafc !important;
}


/* Official shared footer */
#site-footer {
  background: #000000;
}

.footer {
  background-color: #000000;
  color: #cccccc;
  padding: 40px 20px 20px;
  margin-top: 50px;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: clamp(32px, 12vw, 200px);
  max-width: 1200px;
  margin: auto;
}

.footer-section {
  flex: 1;
  min-width: 250px;
}

.footer-section h2,
.footer-section h3 {
  color: #E30613;
  margin: 0 0 15px;
  font-family: Montserrat, sans-serif;
}

.footer-section p {
  margin: 0;
  line-height: 1.6;
  font-size: 14px;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section ul li a {
  color: #cccccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section ul li a:hover {
  color: #ffffff;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid #222222;
  margin-top: 30px;
  padding-top: 15px;
  color: #888888;
  font-size: 14px;
}

.footer-bottom a {
  color: inherit;
  text-decoration: none;
  transition: color .2s ease;
}

.footer-bottom a:hover,
.footer-bottom a:focus-visible {
  color: #E30613;
}

body[data-page="episodios.html"] #site-footer,
body[data-page="episodios.html"] .footer {
  display: none !important;
}

@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 28px;
  }

  .footer-section {
    min-width: 100%;
  }
}

/* responsive-header-wide-menu: hamburger antes da navegação colidir */
@media (max-width: 1280px) {
  .topbar {
    display: grid !important;
    grid-template-columns: minmax(180px, auto) minmax(240px, 360px) auto;
    align-items: center;
    gap: 14px;
  }

  .topbar .topbar-nav-wrap {
    margin-left: 0 !important;
    padding-right: 0 !important;
    justify-self: end;
  }

  .topbar nav {
    gap: 10px;
  }

  .menu-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08) !important;
    color: currentColor;
    cursor: pointer;
  }

  .nav-list {
    display: none !important;
    position: fixed;
    top: 74px;
    right: 18px;
    width: min(280px, calc(100vw - 36px));
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px;
    border-radius: 20px;
    background: rgba(11, 11, 15, 0.96) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.28) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    z-index: 1800;
  }

  .nav-list.show {
    display: flex !important;
  }

  .nav-list li,
  .nav-list a,
  .subscribe-link {
    width: 100%;
  }

  .nav-list a,
  .subscribe-link {
    min-height: 42px;
    justify-content: center;
    border-radius: 14px;
  }

  body.theme-light .nav-list {
    background: rgba(255, 255, 255, 0.98) !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
    box-shadow: 0 24px 54px rgba(15, 23, 42, 0.16) !important;
  }

  .search-container {
    min-width: 0 !important;
    width: 100%;
    max-width: 360px;
  }
}

@media (max-width: 820px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .search-container {
    grid-column: 1 / -1;
    justify-self: stretch;
    max-width: none;
  }
}
/* ===== Barra de rolagem personalizada (site inteiro) ===== */

html {
  scrollbar-width: thin;
  scrollbar-color: rgba(227, 6, 19, 0.55) rgba(255, 255, 255, 0.06);
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

*::-webkit-scrollbar-thumb {
  background-color: rgba(227, 6, 19, 0.5);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background-color: rgba(227, 6, 19, 0.75);
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

body.theme-light {
  scrollbar-color: rgba(227, 6, 19, 0.5) rgba(15, 23, 42, 0.08);
}

body.theme-light *::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.06);
}

/* ------------------------------------------------------------------
   Botão de tema: sol (tema claro) e lua (tema escuro) em SVG, com
   troca animada, e transição suave da página ao mudar de tema.
   ------------------------------------------------------------------ */
.theme-toggle {
  position: relative;
  overflow: hidden;
}

.theme-toggle .theme-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 19px;
  height: 19px;
  margin: -9.5px 0 0 -9.5px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.theme-toggle .theme-icon-sun circle {
  fill: currentColor;
  fill-opacity: 0.18;
}

.theme-toggle .theme-icon-moon path {
  fill: currentColor;
  fill-opacity: 0.18;
}

/* Por omissão (e no tema escuro) vê-se a lua; no tema claro, o sol. */
.theme-toggle .theme-icon-sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0.4);
}

.theme-toggle .theme-icon-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.theme-toggle.is-light .theme-icon-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.theme-toggle.is-light .theme-icon-moon {
  opacity: 0;
  transform: rotate(90deg) scale(0.4);
}

/* As animações só ligam depois do primeiro desenho (classe theme-ready),
   para a página não abrir com o ícone a rodar. */
.theme-ready .theme-toggle .theme-icon {
  transition:
    transform 0.55s cubic-bezier(0.34, 1.4, 0.64, 1),
    opacity 0.35s ease;
}

.theme-ready .theme-toggle {
  transition:
    background-color 0.45s ease,
    color 0.45s ease,
    box-shadow 0.3s ease,
    transform 0.2s ease;
}

.theme-toggle:active {
  transform: scale(0.92);
}

@media (max-width: 700px) {
  .theme-toggle .theme-icon {
    width: 17px;
    height: 17px;
    margin: -8.5px 0 0 -8.5px;
  }
}

/* Troca de tema com a View Transitions API: esbatimento suave da página
   inteira (cores, fundos, logótipos e imagens ao mesmo tempo). */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.52s;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  }
}

/* Alternativa para navegadores sem View Transitions: durante a troca,
   as cores de tudo fazem transição em vez de mudarem de repente. */
html.theme-switching,
html.theme-switching *,
html.theme-switching *::before,
html.theme-switching *::after {
  transition:
    background-color 0.52s ease,
    color 0.52s ease,
    border-color 0.52s ease,
    fill 0.52s ease,
    stroke 0.52s ease,
    box-shadow 0.52s ease !important;
}

@media (prefers-reduced-motion: reduce) {
  .theme-ready .theme-toggle .theme-icon,
  .theme-ready .theme-toggle {
    transition: none;
  }
}

/* Sobre: em tablet e telemóvel a pesquisa ocupa a largura toda, como nas
   restantes páginas (a regra da página limitava-a a 420px). */
@media (max-width: 820px) {
  body[data-page="sobre.html"] .search-container,
  body[data-page="sobre.html"] .search {
    min-width: 0;
    max-width: 100%;
  }
}

/* Hover do botão do menu (hambúrguer) e do "Subscrever": ficam sempre
   vermelhos com ícone/texto branco. Antes, uma regra com !important
   mantinha o fundo do menu quase transparente e a regra geral dos links
   do menu tirava o fundo ao "Subscrever" — no tema claro ficava branco
   sobre branco e desapareciam. */
.topbar .menu-toggle:hover,
.topbar .menu-toggle:focus-visible,
#site-header .menu-toggle:hover,
#site-header .menu-toggle:focus-visible {
  color: #ffffff !important;
  background: #E30613 !important;
  box-shadow: 0 0 14px rgba(220, 38, 38, 0.45);
}

.nav-list a.subscribe-link:hover,
.nav-list a.subscribe-link:focus-visible,
#site-header .nav-list a.subscribe-link:hover,
#site-header .nav-list a.subscribe-link:focus-visible {
  color: #ffffff !important;
  background: #c10510 !important;
  text-shadow: none !important;
}

/* Tudo o que é clicável mostra o ponteiro de mão (ex.: o botão
   "Subscrever" ao lado do campo de e-mail na página inicial); botões
   desactivados mostram que não se podem usar. */
button:not(:disabled),
[type="submit"]:not(:disabled),
[type="button"]:not(:disabled),
[role="button"],
.btn,
#newsletter-start-form .btn.btn-main {
  cursor: pointer;
}

button:disabled,
[type="submit"]:disabled,
.btn:disabled,
.btn[aria-disabled="true"],
#newsletter-start-form .btn.btn-main:disabled {
  cursor: not-allowed;
}

/* "Subscrever" no menu do tema claro: texto sempre branco sobre o
   vermelho. No menu de telemóvel/tablet, a regra
   "body.theme-light .nav-list a { color: #111827 !important }" é mais
   específica e deixava o texto preto. */
body.theme-light .nav-list a.subscribe-link,
body.theme-light #site-header .nav-list a.subscribe-link,
body.theme-light .nav-list a.subscribe-link[aria-current="page"] {
  color: #ffffff !important;
}

/* ------------------------------------------------------------------
   A troca de tema não pode mudar medidas: algumas bordas só existiam no
   tema claro (cartões de episódio, pré-visualização, rodapé) e o menu
   de tablet só tinha borda no escuro — ao mudar de tema tudo o que
   estava abaixo andava 1 px. Agora o contorno do tema claro é desenhado
   com outline/sombra, que não ocupam espaço.
   ------------------------------------------------------------------ */
body.theme-light .noticia-card,
body.theme-light .episode,
body.theme-light .search-results-active .episodes .episode {
  border: 0;
  outline: 1px solid rgba(15, 23, 42, 0.1);
  outline-offset: -1px;
}

body.theme-light .preview-section {
  border: 0;
  outline: 1px solid rgba(15, 23, 42, 0.08);
  outline-offset: -1px;
}

body.theme-light .footer {
  border-top: 0;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.08);
}

@media (min-width: 701px) and (max-width: 1100px) {
  body.theme-light .nav-list {
    border: 1px solid rgba(15, 23, 42, 0.1) !important;
  }
}
