/* ==========================================================
   CONTRASTE DEFINITIVO - CARREGADO POR ÚLTIMO
   Fundo claro = texto preto. Fundo escuro = texto branco.
   A cor da categoria fica só no menu e nas etiquetas dos cards.
   ========================================================== */

:root{
  --rev-text-dark:#111827;
  --rev-text-dark-soft:#374151;
  --rev-text-light:#ffffff;
  --rev-text-light-soft:rgba(255,255,255,.88);
}

/* BASE DO SITE */
body.rev-theme-light,
body.rev-theme-light main{
  color:var(--rev-text-dark)!important;
  background:#fff!important;
}
body.rev-theme-dark,
body.rev-theme-dark main{
  color:var(--rev-text-light)!important;
}

/* ÁREAS CLARAS: texto e títulos PRETOS */
body :is(.rev-section,.rev-section.soft,.rev-about-band,.rev-page-filter,.rev-filter-box,.rev-empty,.rev-home-partners-slide-section,.rev-home-partners-slider,.rev-home-partner-card,.rev-timeline-filter,.rev-article-body,.rev-timeline-card,.rev-newsletter-card):not(.dark):not(.red):not(.rev-hero):not(.rev-page-hero):not(.rev-article-hero){
  color:var(--rev-text-dark)!important;
}
body :is(.rev-section,.rev-section.soft,.rev-about-band,.rev-page-filter,.rev-filter-box,.rev-empty,.rev-home-partners-slide-section,.rev-home-partners-slider,.rev-home-partner-card,.rev-timeline-filter,.rev-article-body,.rev-timeline-card,.rev-newsletter-card):not(.dark):not(.red):not(.rev-hero):not(.rev-page-hero):not(.rev-article-hero) :is(h1,h2,h3,h4,h5,h6,.rev-title,.rev-page-title,.rev-section-title,.rev-post-title,.rev-content-title,.rev-section-head,.rev-section-head h1,.rev-section-head h2,.rev-section-head h3,.rev-kicker,.rev-link-more,label,legend,strong,b):not(.rev-tag):not(.rev-btn):not(.rev-cat-menu-link){
  color:var(--rev-text-dark)!important;
  text-shadow:none!important;
}
body :is(.rev-section,.rev-section.soft,.rev-about-band,.rev-page-filter,.rev-filter-box,.rev-empty,.rev-home-partners-slide-section,.rev-home-partners-slider,.rev-home-partner-card,.rev-timeline-filter,.rev-article-body,.rev-timeline-card,.rev-newsletter-card):not(.dark):not(.red):not(.rev-hero):not(.rev-page-hero):not(.rev-article-hero) :is(p,li,small,span,.rev-meta,.rev-card-meta,.rev-breadcrumb,.rev-breadcrumb a,.rev-breadcrumb span,.rev-empty,.rev-section-head p):not(.rev-tag):not(.rev-btn):not(.rev-cat-menu-link):not(.rev-badge){
  color:var(--rev-text-dark-soft)!important;
  text-shadow:none!important;
}
body :is(.rev-section,.rev-section.soft,.rev-about-band,.rev-page-filter,.rev-filter-box,.rev-empty,.rev-home-partners-slide-section,.rev-home-partners-slider,.rev-home-partner-card,.rev-timeline-filter,.rev-article-body,.rev-timeline-card,.rev-newsletter-card):not(.dark):not(.red):not(.rev-hero):not(.rev-page-hero):not(.rev-article-hero) :is(a):not(.rev-btn):not(.rev-cat-menu-link):not(.rev-tag):not(.rev-card):not(.rev-home-destaques-slide){
  color:var(--rev-text-dark)!important;
  text-shadow:none!important;
}

/* ÁREAS ESCURAS: texto e títulos BRANCOS */
body :is(.rev-section.dark,.rev-section.red,.rev-hero,.rev-page-hero,.rev-article-hero,.rev-card,.rev-wide-card,.rev-feature-card,.rev-interview-card,.rev-production-card,.rev-gallery-home-card,.rev-home-destaques-slide,.rev-home-flip-front,.rev-home-flip-back,.rev-menu-panel){
  color:var(--rev-text-light)!important;
}
body :is(.rev-section.dark,.rev-section.red,.rev-hero,.rev-page-hero,.rev-article-hero,.rev-card,.rev-wide-card,.rev-feature-card,.rev-interview-card,.rev-production-card,.rev-gallery-home-card,.rev-home-destaques-slide,.rev-home-flip-front,.rev-home-flip-back,.rev-menu-panel) :is(h1,h2,h3,h4,h5,h6,.rev-title,.rev-page-title,.rev-section-title,.rev-post-title,.rev-content-title,.rev-section-head,.rev-section-head h1,.rev-section-head h2,.rev-section-head h3,.rev-kicker,.rev-title-hero-kicker,.rev-link-more,label,legend,strong,b,a):not(.rev-tag):not(.rev-btn):not(.rev-cat-menu-link){
  color:var(--rev-text-light)!important;
  text-shadow:none!important;
}
body :is(.rev-section.dark,.rev-section.red,.rev-hero,.rev-page-hero,.rev-article-hero,.rev-card,.rev-wide-card,.rev-feature-card,.rev-interview-card,.rev-production-card,.rev-gallery-home-card,.rev-home-destaques-slide,.rev-home-flip-front,.rev-home-flip-back,.rev-menu-panel) :is(p,li,small,span,.rev-meta,.rev-card-meta,.rev-section-head p):not(.rev-tag):not(.rev-btn):not(.rev-cat-menu-link):not(.rev-badge){
  color:var(--rev-text-light-soft)!important;
  text-shadow:none!important;
}

/* DERRUBA AS REGRAS ANTIGAS QUE PINTAVAM TÍTULO COM COR DA CATEGORIA */
body .rev-category-home-section:not(.dark):not(.red) :is(.rev-kicker,.rev-section-head h1,.rev-section-head h2,.rev-section-head h3,.rev-link-more),
body .rev-category-list-section:not(.dark):not(.red) :is(.rev-kicker,.rev-section-head h1,.rev-section-head h2,.rev-section-head h3,.rev-link-more),
body .rev-category-page-hero :is(.rev-title-hero-kicker,h1,h2,h3,p,a){
  color:var(--rev-text-dark)!important;
  text-shadow:none!important;
}
body .rev-category-home-section.dark :is(.rev-kicker,.rev-section-head h1,.rev-section-head h2,.rev-section-head h3,.rev-link-more),
body .rev-category-home-section.red :is(.rev-kicker,.rev-section-head h1,.rev-section-head h2,.rev-section-head h3,.rev-link-more),
body .rev-category-list-section.dark :is(.rev-kicker,.rev-section-head h1,.rev-section-head h2,.rev-section-head h3,.rev-link-more),
body .rev-category-list-section.red :is(.rev-kicker,.rev-section-head h1,.rev-section-head h2,.rev-section-head h3,.rev-link-more),
body .rev-page-hero :is(.rev-title-hero-kicker,h1,h2,h3,p,a),
body .rev-article-hero :is(.rev-title-hero-kicker,h1,h2,h3,p,a){
  color:var(--rev-text-light)!important;
  text-shadow:none!important;
}

/* Linha abaixo dos títulos também acompanha o fundo */
body :is(.rev-section,.rev-section.soft,.rev-about-band,.rev-home-partners-slide-section):not(.dark):not(.red) :is(.rev-section-head h1,.rev-section-head h2,.rev-section-head h3,.rev-title):after{
  background:var(--rev-text-dark)!important;
}
body :is(.rev-section.dark,.rev-section.red,.rev-hero,.rev-page-hero,.rev-article-hero) :is(.rev-section-head h1,.rev-section-head h2,.rev-section-head h3,.rev-title):after{
  background:var(--rev-text-light)!important;
}

/* HEADER/TOPO: se a cor do site for clara, texto preto; se for escura, texto branco */
body.rev-theme-light :is(.rev-header,.rev-topbar,.rev-brandbar,.rev-sticky-mainnav):not(.rev-mainnav-row){
  color:var(--rev-text-dark)!important;
  background:#fff!important;
}
body.rev-theme-light :is(.rev-header,.rev-topbar,.rev-brandbar,.rev-sticky-mainnav) :is(a,span,div,button,svg):not(.rev-cat-menu-link):not(.rev-menu-home-icon){
  color:var(--rev-text-dark)!important;
}
body.rev-theme-dark :is(.rev-header,.rev-topbar,.rev-brandbar,.rev-sticky-mainnav):not(.rev-mainnav-row){
  color:var(--rev-text-light)!important;
  background:#0b0f14!important;
}
body.rev-theme-dark :is(.rev-header,.rev-topbar,.rev-brandbar,.rev-sticky-mainnav) :is(a,span,div,button,svg):not(.rev-cat-menu-link):not(.rev-menu-home-icon){
  color:var(--rev-text-light)!important;
}

/* MENU CATEGORIA: mantém a cor da categoria e texto com contraste próprio */
body :is(.rev-mainnav-row .rev-menu-main > a.rev-cat-menu-link,.rev-sticky-menu-main > a.rev-cat-menu-link,.rev-menu-grid-pro a.rev-cat-menu-link,.rev-menu-grid-pro a.rev-cat-menu-link span,.rev-menu-grid-pro a.rev-cat-menu-link small){
  color:var(--category-text-color,#fff)!important;
}
body :is(.rev-mainnav-row .rev-menu-main > a.rev-cat-menu-link:hover,.rev-mainnav-row .rev-menu-main > a.rev-cat-menu-link.active,.rev-sticky-menu-main > a.rev-cat-menu-link:hover,.rev-sticky-menu-main > a.rev-cat-menu-link.active,.rev-menu-grid-pro a.rev-cat-menu-link:hover,.rev-menu-grid-pro a.rev-cat-menu-link:focus,.rev-menu-grid-pro a.rev-cat-menu-link:hover span,.rev-menu-grid-pro a.rev-cat-menu-link:hover small){
  color:var(--category-text-color-hover,#fff)!important;
}

/* ETIQUETAS DE CATEGORIA NOS CARDS: mantém cor cadastrada e contraste próprio */
body :is(.rev-tag,.rev-card .rev-tag,.rev-wide-card .rev-tag,.rev-feature-card .rev-tag,.rev-interview-card .rev-tag,.rev-production-card .rev-tag,.rev-gallery-home-card .rev-tag,.rev-related-grid .rev-card .rev-tag,.rev-home-destaques-cards .rev-card .rev-tag,.rev-home-destaques-slide-content span){
  background:var(--card-category-color,var(--category-color,var(--rev-primary)))!important;
  color:var(--card-category-text-color,var(--category-text-color,#fff))!important;
  border-color:var(--card-category-color,var(--category-color,var(--rev-primary)))!important;
}

/* RODAPÉ: se a cor principal for clara, tudo preto. Se for escura, tudo branco. */
body.rev-theme-light .rev-footer,
body.rev-theme-light .rev-footer-pro,
body.rev-theme-light .rev-footer-clean{
  background:linear-gradient(135deg,var(--rev-primary) 0%,#f5f5f5 100%)!important;
  color:var(--rev-text-dark)!important;
}
body.rev-theme-light .rev-footer-pro-bg{
  background:linear-gradient(180deg,rgba(255,255,255,.18),rgba(0,0,0,.06))!important;
}
body.rev-theme-light .rev-footer :is(h1,h2,h3,h4,h5,h6,strong,b,a,p,span,small,div):not(button):not(.rev-btn),
body.rev-theme-light .rev-footer-pro :is(h1,h2,h3,h4,h5,h6,strong,b,a,p,span,small,div):not(button):not(.rev-btn),
body.rev-theme-light .rev-footer-clean :is(h1,h2,h3,h4,h5,h6,strong,b,a,p,span,small,div):not(button):not(.rev-btn){
  color:var(--rev-text-dark)!important;
  text-shadow:none!important;
}
body.rev-theme-light .rev-footer-pro-brand p,
body.rev-theme-light .rev-footer-pro-news p,
body.rev-theme-light .rev-footer-pro-nav a,
body.rev-theme-light .rev-footer-pro-nav span,
body.rev-theme-light .rev-footer-pro-bottom,
body.rev-theme-light .rev-footer-info-item{
  color:var(--rev-text-dark-soft)!important;
}
body.rev-theme-light .rev-footer-pro-news,
body.rev-theme-light .rev-footer-pro-social a{
  background:rgba(0,0,0,.05)!important;
  border-color:rgba(0,0,0,.12)!important;
}
body.rev-theme-light .rev-footer-pro-news input{
  background:#fff!important;
  color:var(--rev-text-dark)!important;
  border-color:rgba(0,0,0,.18)!important;
}
body.rev-theme-light .rev-footer-pro-news input::placeholder{
  color:#6b7280!important;
}
body.rev-theme-light .rev-footer-pro-news button,
body.rev-theme-light .rev-footer-info-right a{
  background:#111827!important;
  color:#fff!important;
}
body.rev-theme-light .rev-footer svg{
  fill:currentColor!important;
}

body.rev-theme-dark .rev-footer,
body.rev-theme-dark .rev-footer-pro,
body.rev-theme-dark .rev-footer-clean{
  background:linear-gradient(135deg,var(--rev-primary) 0%,#05070a 100%)!important;
  color:var(--rev-text-light)!important;
}
body.rev-theme-dark .rev-footer :is(h1,h2,h3,h4,h5,h6,strong,b,a,p,span,small,div):not(button):not(.rev-btn),
body.rev-theme-dark .rev-footer-pro :is(h1,h2,h3,h4,h5,h6,strong,b,a,p,span,small,div):not(button):not(.rev-btn),
body.rev-theme-dark .rev-footer-clean :is(h1,h2,h3,h4,h5,h6,strong,b,a,p,span,small,div):not(button):not(.rev-btn){
  color:var(--rev-text-light)!important;
  text-shadow:none!important;
}
body.rev-theme-dark .rev-footer-pro-brand p,
body.rev-theme-dark .rev-footer-pro-news p,
body.rev-theme-dark .rev-footer-pro-nav a,
body.rev-theme-dark .rev-footer-pro-nav span,
body.rev-theme-dark .rev-footer-pro-bottom,
body.rev-theme-dark .rev-footer-info-item{
  color:var(--rev-text-light-soft)!important;
}
body.rev-theme-dark .rev-footer svg{
  fill:currentColor!important;
}

/* LOGO: tema claro original; tema escuro branca/invertida */
body.rev-theme-light :is(.rev-brand,.rev-sticky-logo,.rev-footer-pro-logo,.rev-footer-clean-logo) img.rev-auto-logo{
  filter:none!important;
}
body.rev-theme-dark :is(.rev-brand,.rev-sticky-logo,.rev-footer-pro-logo,.rev-footer-clean-logo) img.rev-auto-logo{
  filter:brightness(0) invert(1) grayscale(1) contrast(1.15)!important;
}

/* FORMULÁRIOS EM FUNDO CLARO */
body :is(.rev-page-filter,.rev-filter-box,.rev-section:not(.dark):not(.red)) :is(input,select,textarea){
  background:#fff!important;
  color:var(--rev-text-dark)!important;
  border-color:#d1d5db!important;
}
body :is(.rev-page-filter,.rev-filter-box,.rev-section:not(.dark):not(.red)) :is(input,select,textarea)::placeholder{
  color:#6b7280!important;
}
