/* ============================================
   DARK MODE - SANEFRAI (VERSÃO COMPLETA E CORRIGIDA)
   ============================================ */

body.dark-mode {
  --bg-primary: #0f0f12;
  --bg-secondary: #18181e;
  --bg-card: #22222b;
  --bg-input: #2a2a33;
  --bg-hover: #2f2f3a;
  --text-primary: #f0f0f0;
  --text-secondary: #c8c8d4;
  --text-muted: #9999aa;
  --border-color: #3a3a48;
  --shadow-color: rgba(0, 0, 0, 0.7);
  --accent-blue: #4dd0e1;
  --accent-green: #7dbf4d;
  --accent-orange: #f9c440;
  --link-color: #4dd0e1;
  --link-hover: #7dbf4d;
}

body.dark-mode {
  background-color: var(--bg-primary) !important;
  color: var(--text-primary) !important;
}

/* Links principais da sidebar mobile */
body.dark-mode .te-menu-sidebar-area .te-mobile-nav-menu ul li a,
body.dark-mode .te-menu-sidebar-area .te-mobile-nav-menu ul li span {
    color: #f0f0f0 !important;
}

body.dark-mode .te-menu-sidebar-area .te-mobile-nav-menu ul li a:hover {
    color: #ffffff !important;
    background: rgba(255,255,255,0.05) !important;
}

/* Subitens (dropdown) */
body.dark-mode .te-menu-sidebar-area .te-mobile-nav-menu ul li ul li a {
    color: #d0d0d0 !important;
}

body.dark-mode .te-menu-sidebar-area .te-mobile-nav-menu ul li ul li a:hover {
    color: #ffffff !important;
    background: rgba(255,255,255,0.03) !important;
}

/* Se houver divisórias ou bordas */
body.dark-mode .te-menu-sidebar-area .te-mobile-nav-menu ul li {
    border-bottom-color: rgba(255,255,255,0.08) !important;
}

/* Caso o MeanMenu gere classes próprias (fallback) */
body.dark-mode .mean-container .mean-nav ul li a,
body.dark-mode .mean-container .mean-nav ul li span {
    color: #f0f0f0 !important;
}

body.dark-mode .mean-container .mean-nav ul li a:hover {
    color: #ffffff !important;
    background: rgba(255,255,255,0.05) !important;
}

body.dark-mode .mean-container .mean-nav ul li li a {
    color: #d0d0d0 !important;
}

body.dark-mode .mean-container .mean-nav ul li li a:hover {
    color: #ffffff !important;
}

/* ============================================
   FUNDO DE ÁREAS PRINCIPAIS
   ============================================ */

body.dark-mode .blog-area,
body.dark-mode .page-area,
body.dark-mode .te-post-content-wrapper {
  background-color: var(--bg-card) !important;
}

body.dark-mode .container {
  background-color: transparent !important;
}

/* ============================================
   SLIDER MOBILE - GRADIENTE MAIS ESCURO
   ============================================ */

@media only screen and (min-width: 0px) and (max-width: 767px) {
  body.dark-mode .slider-area.style-2 .te-single-slider .slider-feature-img .slider-feature-img-overlay {
    background: -webkit-gradient(linear, left top, left bottom, from(rgba(10,20,30,0.85)), to(rgba(20,30,40,0.70))) !important;
    background: linear-gradient(180deg, rgba(10,20,30,0.85) 0%, rgba(20,30,40,0.70) 100%) !important;
  }
}

/* ============================================
   HEADER / MENU (INCLUINDO MOBILE)
   ============================================ */

body.dark-mode .header-area.style-2 .te-header-menu-area .menu-wrapper {
  background-color: var(--bg-card) !important;
  border-color: var(--border-color) !important;
}

@media (max-width: 991px) {
  body.dark-mode .header-area.style-2 .te-header-menu-area .menu-wrapper {
    background-color: var(--bg-secondary) !important;
  }
}

body.dark-mode .te-header-menu-area.te-sticky_menu {
  background-color: var(--bg-secondary) !important;
  box-shadow: 0 4px 20px var(--shadow-color);
}

body.dark-mode .te-main-menu ul li a {
  color: var(--text-primary);
}

body.dark-mode .download-button .docs {
    background-color: #1a1a1a;
    border-color: #444;
}

body.dark-mode .download-button:hover .docs {
    background-color: #2a2a2a;
}

body.dark-mode .te-main-menu ul li a:hover,
body.dark-mode .te-main-menu ul li.te-active > a {
  color: var(--accent-blue);
}

body.dark-mode .te-main-menu ul ul {
  background-color: var(--bg-card);
  border-color: var(--accent-blue);
}

body.dark-mode .te-main-menu ul ul li a {
  color: var(--text-primary);
  border-color: var(--border-color);
}

body.dark-mode .te-main-menu ul ul li a:hover {
  background-color: var(--accent-blue);
  color: #fff;
}

/* Top bar */
body.dark-mode .header-top {
  background-color: var(--bg-card) !important;
}

body.dark-mode .header-top .te-header-contact-info span,
body.dark-mode .header-top .te-header-contact-info span a {
  color: var(--text-secondary);
}

body.dark-mode .header-top .te-social-profile a {
  background-color: var(--bg-input);
  color: var(--text-primary);
}

body.dark-mode .header-top .te-social-profile a:hover {
  background-color: var(--accent-blue);
  color: #fff;
}

/* Menu mobile hambúrguer */
body.dark-mode .te-mobile-menu-bar a i {
  color: var(--text-primary) !important;
}

/* ============================================
   CARDS DE NOTÍCIAS
   ============================================ */

body.dark-mode .te-post-card .content .title,
body.dark-mode .te-post-card .content .title a,
body.dark-mode .te-post-item .te-post-title,
body.dark-mode .te-post-item .te-post-title a,
body.dark-mode .te-post-item .te-post-title a:hover {
  color: var(--text-primary) !important;
}

body.dark-mode .te-post-card .content .te-post-meta-info .te-single-meta span,
body.dark-mode .te-post-card .content .te-post-meta-info .te-single-meta a,
body.dark-mode .te-post-item .te-post-meta span,
body.dark-mode .te-post-item .te-post-meta span a,
body.dark-mode .te-post-item .te-post-meta span i,
body.dark-mode .te-post-item .te-post-meta span a i {
  color: var(--text-secondary) !important;
}

body.dark-mode .te-post-card .content p,
body.dark-mode .te-post-item .te-post-content p,
body.dark-mode .te-post-item .te-post-content,
body.dark-mode .te-post-card .content .desc {
  color: var(--text-secondary) !important;
}

body.dark-mode .te-post-card .content a.read-btn,
body.dark-mode .te-post-item .te-read-more a.te-theme-btn {
  color: var(--accent-blue) !important;
  background-color: transparent !important;
}

body.dark-mode .te-post-card .content a.read-btn:hover,
body.dark-mode .te-post-item .te-read-more a.te-theme-btn:hover {
  color: var(--accent-green) !important;
}

body.dark-mode .te-post-card .image .te-post-date span {
  color: #fff !important;
}

body.dark-mode .te-post-card.style-1,
body.dark-mode .te-post-item {
  background-color: var(--bg-card) !important;
  border-color: var(--border-color) !important;
  box-shadow: 0 8px 30px var(--shadow-color) !important;
}

body.dark-mode .te-post-item .te-post-content-wrapper {
  background-color: var(--bg-card) !important;
}

body.dark-mode .te-post-item .te-read-more a {
  background-color: var(--accent-blue) !important;
  color: #fff !important;
}

body.dark-mode .te-post-item .te-read-more a:hover {
  background-color: var(--accent-green) !important;
  color: #111 !important;
}

/* ============================================
   TEXTOS EM GERAL (INCLUINDO INLINE)
   ============================================ */

body.dark-mode p,
body.dark-mode span:not(.counter):not(.number):not(.sv-line1):not(.sv-line2):not(.te-text):not(.te-title),
body.dark-mode div:not(.sv-drop-content):not(.te-counter-title):not(.te-content),
body.dark-mode li,
body.dark-mode label,
body.dark-mode .desc,
body.dark-mode .text,
body.dark-mode .short-title,
body.dark-mode .te-section-desc,
body.dark-mode .te-post-content,
body.dark-mode .content,
body.dark-mode .te-accordion-title,
body.dark-mode .te-accordion-body p,
body.dark-mode .te-list-item .text,
body.dark-mode .te-info-card .content .desc,
body.dark-mode .te-icon-card .content .desc,
body.dark-mode .te-testimonial-card .content,
body.dark-mode .te-process-step .content .desc {
  color: var(--text-primary) !important;
}

body.dark-mode .te-section-desc p,
body.dark-mode .te-post-meta span,
body.dark-mode .te-post-meta span a,
body.dark-mode .te-post-meta span i,
body.dark-mode .te-post-card .content .te-post-meta-info .te-single-meta span,
body.dark-mode .te-post-card .content .te-post-meta-info .te-single-meta a,
body.dark-mode .te-testimonial-card .te-content-wrapper .content,
body.dark-mode .te-footer-widget ul li a,
body.dark-mode .footer-bottom-area .te-copyright-text p,
body.dark-mode .footer-bottom-area .te-copyright-text p a,
body.dark-mode .te-breadcrumb-list ul li,
body.dark-mode .te-breadcrumb-list ul li a {
  color: var(--text-secondary) !important;
}

/* Força sobrescrita de estilos inline comuns */
body.dark-mode [style*="color: #14203A"],
body.dark-mode [style*="color:#14203A"],
body.dark-mode [style*="color: #333"],
body.dark-mode [style*="color:#333"] {
  color: var(--text-primary) !important;
}

body.dark-mode [style*="color: #335371"],
body.dark-mode [style*="color:#335371"] {
  color: var(--text-secondary) !important;
}

/* Força fundo de elementos com inline branco */
body.dark-mode [style*="background: #fff"],
body.dark-mode [style*="background:#fff"],
body.dark-mode [style*="background-color: #ffffff"],
body.dark-mode [style*="background-color:#ffffff"],
body.dark-mode [style*="background: white"],
body.dark-mode [style*="background:white"] {
  background-color: var(--bg-card) !important;
}

/* ============================================
   TÍTULOS (h1-h6)
   ============================================ */

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6,
body.dark-mode .title,
body.dark-mode .te-post-title,
body.dark-mode .te-post-title a,
body.dark-mode .te-cta-title,
body.dark-mode .te-subscribe-title,
body.dark-mode .te-section-title .title,
body.dark-mode .te-footer-widget-title,
body.dark-mode .wp-block-heading,
body.dark-mode .counter-number,
body.dark-mode .number,
body.dark-mode .te-counter-item .number {
  color: var(--text-primary) !important;
}

body.dark-mode .te-page-heading h3,
body.dark-mode .te-page-title {
  color: var(--text-primary) !important;
}

body.dark-mode .te-slider-short-title,
body.dark-mode .short-title {
  color: var(--accent-blue) !important;
}

/* ============================================
   NÚMEROS DOS CONTADORES
   ============================================ */

body.dark-mode .te-counter-item .number {
  color: var(--accent-blue) !important;
}

body.dark-mode .te-counter-item .title {
  color: var(--text-secondary) !important;
}

/* ============================================
   SLIDER
   ============================================ */

body.dark-mode .slider-area {
  background-color: var(--bg-secondary) !important;
}

body.dark-mode .slider-area .te-single-slider .te-slider-content-wrapper .te-slider-content .te-slider-title {
  color: var(--text-primary) !important;
}

body.dark-mode .slider-area .te-single-slider .te-slider-content-wrapper .te-slider-content .te-slider-short-desc {
  color: var(--text-secondary) !important;
}

body.dark-mode .slider-area .te-single-slider .te-slider-content-wrapper .te-slider-content .te-slider-short-title {
  color: var(--accent-blue) !important;
}

body.dark-mode .slider-area .te-slider-wrapper .slick-dots li button {
  background-color: var(--text-muted);
}

body.dark-mode .slider-area .te-slider-wrapper .slick-dots li.slick-active button {
  background-color: var(--accent-blue);
}

body.dark-mode .slider-area .te-single-slider .te-slider-overlay {
  background-color: var(--bg-secondary) !important;
}

/* ============================================
   BOTÃO DE CHAMADA (TELEFONE, PLANTÃO, WHATSAPP)
   ============================================ */

body.dark-mode .te-call-btn .te-content .te-title,
body.dark-mode .te-call-btn .te-content .te-text {
  color: var(--text-primary) !important;
}

body.dark-mode .te-call-btn .te-icon {
  background-color: var(--bg-card);
  border-color: var(--accent-green);
}

/* ============================================
   FUNDOS E SEÇÕES
   ============================================ */

body.dark-mode .background-gray,
body.dark-mode .background-light-gray,
body.dark-mode .background-gradient,
body.dark-mode .page-bg,
body.dark-mode .slider-area,
body.dark-mode .slider-area.style-1 .te-single-slider .te-slider-overlay,
body.dark-mode .slider-area.style-2 .te-single-slider .te-slider-overlay,
body.dark-mode .logos-home,
body.dark-mode .footer.style-1,
body.dark-mode .feature-area.style-1,
body.dark-mode .feature-area.style-2,
body.dark-mode .feature-area.style-3,
body.dark-mode .latest-posts-area.style-1,
body.dark-mode .about-us-area.style-2,
body.dark-mode .counter-up-area.style-1,
body.dark-mode .cta-area {
  background-color: var(--bg-card) !important;
  background-image: none !important;
}

body.dark-mode .page-breadcrumb-area {
  background-color: var(--bg-card) !important;
}

body.dark-mode .te-process-step-area.style-1,
body.dark-mode .te-counter-up-area.style-1 {
  background-color: var(--bg-secondary) !important;
}

/* ============================================
   CARDS, POSTS, WIDGETS
   ============================================ */

body.dark-mode .te-info-card,
body.dark-mode .te-post-item,
body.dark-mode .te-testimonial-card,
body.dark-mode .te-testimonial-card-two,
body.dark-mode .te-process-step,
body.dark-mode .te-process-step.style-2,
body.dark-mode .te-portfolio-card,
body.dark-mode .sidebar__widget,
body.dark-mode .widget,
body.dark-mode .te-comment-respond,
body.dark-mode .comment-respond,
body.dark-mode .te-accordion-list-item,
body.dark-mode .accordion-wrapper .te-accordion-list-item,
body.dark-mode .card-project,
body.dark-mode .popup-card,
body.dark-mode .custom-table,
body.dark-mode .te-team-card.style-2,
body.dark-mode .te-info-card.style-2,
body.dark-mode .te-post-card.style-1 {
  background-color: var(--bg-card) !important;
  border-color: var(--border-color) !important;
}

/* ============================================
   BOTÃO PADRÃO
   ============================================ */

body.dark-mode .te-theme-btn,
body.dark-mode .wp-block-loginout a,
body.dark-mode input.te-theme-btn {
  background-color: var(--accent-blue) !important;
  color: #fff !important;
  border-color: var(--accent-blue) !important;
}

body.dark-mode .te-theme-btn:hover,
body.dark-mode .wp-block-loginout a:hover {
  background-color: var(--accent-green) !important;
  color: #111 !important;
  border-color: var(--accent-green) !important;
}

/* ============================================
   TABELAS
   ============================================ */

body.dark-mode table,
body.dark-mode .table {
  color: var(--text-primary);
}

body.dark-mode table th,
body.dark-mode table td,
body.dark-mode .table th,
body.dark-mode .table td {
  border-color: var(--border-color) !important;
}

body.dark-mode .table thead th {
  background-color: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
}

body.dark-mode .table-bordered,
body.dark-mode .table {
  border-color: var(--border-color) !important;
}

body.dark-mode .table tbody td,
body.dark-mode .table tbody th {
  background-color: var(--bg-card) !important;
  color: var(--text-secondary) !important;
  border-color: var(--border-color) !important;
}

body.dark-mode .table tbody tr:nth-of-type(odd) {
  background-color: var(--bg-secondary) !important;
}

body.dark-mode .table thead[style*="background-color"] th {
  background-color: var(--accent-blue) !important;
  color: #fff !important;
}

body.dark-mode .table tbody td[style*="background-color"],
body.dark-mode .table tbody td[style*="background-color"] em {
  background-color: var(--bg-card) !important;
  color: var(--text-secondary) !important;
}

body.dark-mode .alert-info {
  background-color: var(--bg-card) !important;
  border-color: var(--accent-blue) !important;
  color: var(--text-primary) !important;
}

body.dark-mode .alert-info a {
  color: var(--link-color) !important;
}

body.dark-mode .alert-info i {
  color: var(--accent-blue) !important;
}

/* ============================================
   FORMULÁRIOS
   ============================================ */

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
  background-color: var(--bg-input) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
  color: var(--text-muted);
}

body.dark-mode input:focus,
body.dark-mode textarea:focus {
  border-color: var(--accent-blue) !important;
  box-shadow: 0 0 0 0.2rem rgba(77, 208, 225, 0.25);
}

/* ============================================
   ACCORDION
   ============================================ */

body.dark-mode .accordion-wrapper .te-accordion-head:before {
  background-color: var(--bg-input);
  color: var(--accent-blue);
}

body.dark-mode .accordion-wrapper .te-accordion-head.collapsed:before {
  background-color: var(--bg-input);
  color: var(--accent-green);
}

body.dark-mode .te-accordion-body {
  border-color: var(--border-color) !important;
}

/* ============================================
   SIDEBAR
   ============================================ */

body.dark-mode .sidebar__widget,
body.dark-mode .widget {
  background-color: var(--bg-card) !important;
}

body.dark-mode .widget ul li,
body.dark-mode .sidebar__widget ul li {
  border-color: var(--border-color) !important;
}

body.dark-mode .widget ul li a,
body.dark-mode .sidebar__widget ul li a {
  color: var(--text-secondary) !important;
}

body.dark-mode .widget ul li a:hover,
body.dark-mode .sidebar__widget ul li a:hover {
  color: var(--link-color) !important;
}

/* ============================================
   BREADCRUMB
   ============================================ */

body.dark-mode .page-breadcrumb-area {
  background-color: var(--bg-card) !important;
}

body.dark-mode .te-page-heading h3,
body.dark-mode .te-breadcrumb-list ul li {
  color: var(--text-primary);
}

body.dark-mode .te-breadcrumb-list ul li a {
  color: var(--text-secondary);
}

/* ============================================
   FOOTER
   ============================================ */

body.dark-mode .footer.style-1 {
  background-color: var(--bg-secondary) !important;
  background-image: none !important;
}

body.dark-mode .footer.style-1 .te-footer-sec {
  background-color: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
}

body.dark-mode .te-footer-widget-title,
body.dark-mode .footer .wp-block-heading {
  color: var(--text-primary) !important;
}

body.dark-mode .te-footer-widget-info p {
  color: var(--text-secondary) !important;
}

body.dark-mode .te-footer-widget.te_widget_nav_menu ul li a {
  color: var(--text-secondary) !important;
}

body.dark-mode .te-footer-widget.te_widget_nav_menu ul li a:hover {
  color: var(--link-color) !important;
}

body.dark-mode .te-subscribe-form-widget .mc4wp-form-fields .single-field a.te-theme-btn {
  background-color: var(--accent-green) !important;
  border-color: var(--accent-green) !important;
  color: #fff !important;
}

body.dark-mode .te-subscribe-form-widget .mc4wp-form-fields .single-field a.te-theme-btn:hover {
  background-color: var(--accent-blue) !important;
  border-color: var(--accent-blue) !important;
  color: #0b1c27 !important;
}

body.dark-mode .te-social-profile a {
  background-color: var(--bg-input) !important;
  color: var(--text-primary) !important;
}

body.dark-mode .te-social-profile a:hover {
  background-color: var(--accent-blue) !important;
  color: #fff !important;
}

body.dark-mode .footer-bottom-area {
  background-color: var(--bg-primary) !important;
  border-top: 1px solid var(--border-color) !important;
}

body.dark-mode .footer-bottom-area .te-copyright-text p,
body.dark-mode .footer-bottom-area .te-copyright-text p a {
  color: var(--text-secondary) !important;
}

body.dark-mode .footer-bottom-area .te-copyright-text p a:hover {
  color: var(--link-color) !important;
}

body.dark-mode .te-footer-bottom-menu ul li a {
  color: var(--text-secondary) !important;
}

body.dark-mode .te-footer-bottom-menu ul li a:hover {
  color: var(--link-color) !important;
}

body.dark-mode .footer .te-footer-sec {
  border-bottom: 1px solid var(--border-color) !important;
}

body.dark-mode .te-footer-widget a[style*="color"] {
  color: var(--link-color) !important;
}

body.dark-mode .te-footer-widget a[style*="color"]:hover {
  color: var(--link-hover) !important;
}

body.dark-mode .te-footer-logo img {
  filter: brightness(0.9) invert(0.9) hue-rotate(180deg) saturate(0.8);
  transition: filter 0.3s;
}

body.dark-mode .te-footer-logo img:hover {
  filter: brightness(1) invert(0) hue-rotate(0) saturate(1);
}

body.dark-mode .te-footer-bg img {
  opacity: 0.15;
  filter: grayscale(1) brightness(0.5);
}

/* ============================================
   SEÇÃO DE TÍTULOS
   ============================================ */

body.dark-mode .te-section-title .short-title::before,
body.dark-mode .te-section-title .short-title::after {
  border-color: var(--accent-blue);
}

body.dark-mode .te-section-title .title span {
  color: var(--accent-blue);
}

body.dark-mode .te-section-title .short-title.only-divider {
  color: var(--accent-blue) !important;
}

body.dark-mode .te-section-title .short-title.only-divider::before,
body.dark-mode .te-section-title .short-title.only-divider::after {
  border-color: var(--accent-blue) !important;
}

/* ============================================
   ABOUT
   ============================================ */

body.dark-mode .te-about-info-card .te-about-info-content .te-section-desc p {
  color: var(--text-secondary);
}

body.dark-mode .te-list-item .text {
  color: var(--text-secondary);
}

body.dark-mode .te-list-item .icon {
  background-color: var(--accent-blue);
}

body.dark-mode .about-us-area.style-2 {
  background-color: var(--bg-card) !important;
}

/* ============================================
   TESTEMUNHOS
   ============================================ */

body.dark-mode .te-testimonial-card .te-content-wrapper .content {
  color: var(--text-secondary);
}

body.dark-mode .te-testimonial-card .te-content-wrapper .te-user-meta .te-user-info .name {
  color: var(--text-primary);
}

body.dark-mode .te-testimonial-card .te-content-wrapper .te-user-meta .te-user-info .designation {
  color: var(--text-secondary);
}

/* ============================================
   PROCESS STEPS
   ============================================ */

body.dark-mode .te-process-step .counter-number {
  color: var(--accent-blue);
}

body.dark-mode .te-process-step .te-title-wrapper .title {
  color: var(--text-primary);
}

body.dark-mode .te-process-step .content .desc {
  color: var(--text-secondary);
}

/* ============================================
   SIDEBAR (MENU LATERAL)
   ============================================ */

body.dark-mode .te-menu-sidebar-area {
  background-color: var(--bg-secondary);
}

body.dark-mode .te-menu-sidebar-area .te-menu-sidebar-close .te-menu-sidebar-close-btn {
  background-color: var(--accent-blue);
  color: #fff;
}

body.dark-mode .te-menu-sidebar-area .te-menu-sidebar-content .te-menu-sidebar-single-widget .te-header-contact-info span {
  color: var(--text-secondary);
}

body.dark-mode .te-menu-sidebar-area .te-menu-sidebar-content .te-menu-sidebar-single-widget .te-header-contact-info span a {
  color: var(--text-secondary);
}

body.dark-mode .te-menu-sidebar-area .te-menu-sidebar-content .te-menu-sidebar-single-widget .te-social-profile a {
  color: var(--text-primary);
  background-color: var(--bg-input);
}

body.dark-mode .te-menu-sidebar-area .te-menu-sidebar-content .te-menu-sidebar-single-widget .te-social-profile a:hover {
  background-color: var(--accent-blue);
  color: #fff;
}

/* ============================================
   BOTÃO FLUTUANTE 2ª VIA
   ============================================ */

body.dark-mode .sv-drop-wrap {
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.9));
}

body.dark-mode .sv-drop-content .sv-line1,
body.dark-mode .sv-drop-content .sv-line2 {
  color: #fff !important;
}

/* ============================================
   POPUP
   ============================================ */

body.dark-mode .popup-overlay {
  background: rgba(0, 0, 0, 0.85);
}

body.dark-mode .popup-card {
  background: var(--bg-card);
  color: var(--text-primary);
}

body.dark-mode .popup-title {
  color: var(--text-primary);
}

body.dark-mode .popup-desc {
  color: var(--text-secondary);
}

body.dark-mode .popup-close {
  color: var(--text-muted);
}

body.dark-mode .popup-close:hover {
  color: var(--text-primary);
}

body.dark-mode .popup-btn {
  background: var(--accent-blue);
  color: #fff;
}

body.dark-mode .popup-btn:hover {
  background: var(--accent-green);
  color: #111;
}

/* ============================================
   LOGOS PARCEIROS
   ============================================ */

body.dark-mode .logos-home {
  border-color: var(--border-color) !important;
}

body.dark-mode .logos-home .item img {
  filter: brightness(0.8) invert(0.9) hue-rotate(180deg) saturate(0.7);
  transition: filter 0.3s;
}

body.dark-mode .logos-home .item img:hover {
  filter: brightness(1) invert(0) hue-rotate(0) saturate(1);
}

/* ============================================
   SWITCH (TOGGLE)
   ============================================ */

body.dark-mode .switch .slider {
  background-color: #555;
}

body.dark-mode .switch input:checked + .slider {
  background-color: var(--accent-blue);
}

body.dark-mode .switch .slider:before {
  box-shadow: inset 8px -4px 0px 0px #ccc;
}

body.dark-mode .switch input:checked + .slider:before {
  box-shadow: inset 15px -4px 0px 15px #ffcf48;
}

/* ============================================
   AJUSTES EM ELEMENTOS ESPECÍFICOS DA HOME
   ============================================ */

body.dark-mode .te-info-card.style-2 .te-title-wrapper .title {
  color: var(--text-primary);
}

body.dark-mode .te-info-card.style-2 .content .desc {
  color: var(--text-secondary);
}

body.dark-mode .cta-area .te-content-wrapper .short-title {
  color: var(--text-secondary);
}

body.dark-mode .cta-area .te-content-wrapper .te-cta-title {
  color: var(--text-primary);
}

body.dark-mode .cta-area .te-content-wrapper .text {
  color: var(--text-secondary);
}

/* ============================================
   ACESSIBILIDADE E OUTROS
   ============================================ */

body.dark-mode .link-transparencia {
  color: var(--link-color);
}

body.dark-mode .link-transparencia::after {
  background-color: var(--accent-green);
}

body.dark-mode .link-transparencia:hover {
  color: var(--link-hover);
}

/* ============================================
   CORREÇÃO PARA TEXTOS EM CARDS DE CONTATO
   ============================================ */

body.dark-mode .te-icon-card.style-2 .content .title {
  color: var(--text-primary);
}

body.dark-mode .te-icon-card.style-2 .content .desc,
body.dark-mode .te-icon-card.style-2 .content .desc a {
  color: var(--text-secondary);
}

body.dark-mode .te-icon-card.style-2 .content .desc a:hover {
  color: var(--link-color);
}

/* ============================================
   TRANSIÇÃO SUAVE
   ============================================ */

body.dark-mode * {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ============================================
   CORREÇÕES PARA PÁGINA "CONSUMO CONSCIENTE"
   ============================================ */

body.dark-mode .te-info-card.style-2 {
  background-color: var(--bg-card) !important;
  border-color: var(--border-color) !important;
}

body.dark-mode .te-info-card.style-2 .te-title-wrapper .title {
  color: var(--text-primary) !important;
}

body.dark-mode .te-info-card.style-2 .content .desc {
  color: var(--text-secondary) !important;
}

body.dark-mode .te-info-card.style-2 .te-content-wrapper .icon i {
  color: var(--accent-blue) !important;
}

body.dark-mode .te-icon-card.style-2 {
  background-color: var(--bg-card) !important;
  border-color: var(--border-color) !important;
  border-radius: 12px;
  padding: 10px 18px;
  margin-bottom: 0;
}

body.dark-mode .te-icon-card.style-2 .content .icon i {
  color: var(--accent-blue) !important;
}

body.dark-mode .te-icon-card.style-2 .content .icon .fa-toilet {
  color: #7dbf4d !important;
}

body.dark-mode .te-icon-card.style-2 .content .icon .fa-filter {
  color: #f9c440 !important;
}

/* ============================================
   CORREÇÕES PARA DÉBITO AUTOMÁTICO / LOCAIS DE PAGAMENTO
   ============================================ */

body.dark-mode h4[style*="color: #14203A"] {
  color: var(--text-primary) !important;
}

body.dark-mode p[style*="color"] {
  color: var(--text-secondary) !important;
}

body.dark-mode div[style*="background-color: #f9f9f9"] {
  background-color: var(--bg-card) !important;
}

body.dark-mode div[style*="background-color: #f9f9f9"] h5,
body.dark-mode div[style*="background-color: #f9f9f9"] p {
  color: var(--text-primary) !important;
}

body.dark-mode div[style*="background-color: #f9f9f9"] h5[style*="color"] {
  color: var(--text-primary) !important;
}

body.dark-mode div[style*="background-color: #f9f9f9"] p[style*="color"] {
  color: var(--text-secondary) !important;
}

body.dark-mode div[style*="background-color: #f0fdff"] {
  background-color: var(--bg-card) !important;
}

body.dark-mode div[style*="background-color: #f0fdff"] h4,
body.dark-mode div[style*="background-color: #f0fdff"] p,
body.dark-mode div[style*="background-color: #f0fdff"] a {
  color: var(--text-primary) !important;
}

body.dark-mode div[style*="background-color: #f0fdff"] a[style*="color"] {
  color: var(--link-color) !important;
}

body.dark-mode .fa-circle-info {
  color: var(--accent-blue) !important;
}

/* ============================================
   CORREÇÕES PARA PÁGINA HIDRÔMETROS
   ============================================ */

body.dark-mode div[style*="background-color: #f0f7ff"] {
  background-color: var(--bg-card) !important;
  border-color: var(--border-color) !important;
}

body.dark-mode div[style*="background-color: #f0f7ff"] h4,
body.dark-mode div[style*="background-color: #f0f7ff"] p,
body.dark-mode div[style*="background-color: #f0f7ff"] strong {
  color: var(--text-primary) !important;
}

body.dark-mode .fa-bahai[style*="color: #26b9dcff"] {
  color: var(--accent-blue) !important;
}

body.dark-mode .fa-bahai[style*="color: #7dbf4d"] {
  color: var(--accent-green) !important;
}

body.dark-mode .fa-bahai[style*="color: #f5a623"] {
  color: #f5a623 !important;
}

body.dark-mode .fa-bahai[style*="color: #af0707"] {
  color: #af0707 !important;
}

body.dark-mode .te-icon-card.style-2 .content h5.title {
  color: var(--text-primary) !important;
}

body.dark-mode .te-icon-card.style-2 .content p.desc {
  color: var(--text-secondary) !important;
}

body.dark-mode .te-theme-btn[style*="display: inline-flex"] {
  background-color: var(--accent-blue) !important;
  border-color: var(--accent-blue) !important;
  color: #fff !important;
}

body.dark-mode .te-theme-btn[style*="display: inline-flex"]:hover {
  background-color: var(--accent-green) !important;
  border-color: var(--accent-green) !important;
  color: #111 !important;
}

/* ============================================
   CORREÇÕES PARA LEGISLAÇÃO (links e cards)
   ============================================ */

body.dark-mode div[style*="background: #f9fbfd"] a,
body.dark-mode div[style*="background:#f9fbfd"] a {
  color: var(--link-color) !important;
}

body.dark-mode div[style*="background: #f9fbfd"] a:hover,
body.dark-mode div[style*="background:#f9fbfd"] a:hover {
  color: var(--link-hover) !important;
}

body.dark-mode div[style*="background: #f9fbfd"] {
  background-color: var(--bg-card) !important;
  border-color: var(--border-color) !important;
}

body.dark-mode a[style*="color: #335371"],
body.dark-mode a[style*="color:#335371"] {
  color: var(--link-color) !important;
}

body.dark-mode a[style*="color: #335371"]:hover,
body.dark-mode a[style*="color:#335371"]:hover {
  color: var(--link-hover) !important;
}

body.dark-mode .te-portfolio-filter li {
  background-color: var(--bg-card) !important;
  color: var(--text-secondary) !important;
  border-color: var(--border-color) !important;
}

body.dark-mode .te-portfolio-filter li.active,
body.dark-mode .te-portfolio-filter li:hover {
  background-color: var(--accent-blue) !important;
  color: #fff !important;
  border-color: var(--accent-blue) !important;
}

/* ============================================
   CORREÇÕES PARA AUTOTENDIMENTO E PÁGINAS SIMILARES
   ============================================ */

body.dark-mode .blog-area {
  background-color: var(--bg-card) !important;
}

body.dark-mode .te-single-slider {
  background-color: var(--bg-secondary) !important;
}
