/* ==========================================================================
   MAGTEK - CLONE VISUAL ZERO-LEGACY (PERFORMANCE 95+)
   Construído a partir de uma "lousa em branco" sem heranças.
========================================================================== */

/* 1. RESET BÁSICO E VARIÁVEIS DO TEMA (V2 - IDENTITY) */
:root {
  --primary: #005CB8; /* Azul Oficial PDF */
  --primary-hover: #004285;
  --secondary: #ED8600; /* Laranja Oficial PDF */
  --secondary-hover: #c46d00;
  --bg-topbar: #f5f5f5;
  --bg-footer: #222222;
  --bg-footer-bottom: #111111;
  --text-dark: #333333;
  --text-light: #555555;
  --border-light: #eaeaea;
  --container-w: 1440px;
  --font-main: 'Montserrat', sans-serif;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

:target {
  scroll-margin-top: 130px;
}

body {
  font-family: var(--font-main);
  background-color: #ffffff;
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

/* 2. ESTRUTURA GLOBAL */
.container {
  max-width: var(--container-w);
  width: 92%;
  margin: 0 auto;
}

/* 3. TOP BAR (Faixa cinza superior) */
.topbar {
  background-color: var(--bg-topbar);
  font-size: 13px;
  color: var(--text-light);
  border-bottom: 1px solid var(--border-light);
  padding: 8px 0;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.topbar-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-item a {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-item a:hover {
  color: var(--primary);
}

.topbar-btn {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  padding: 6px 14px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.topbar-btn:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.topbar-icon {
  width: 16px;
  height: auto;
  opacity: 0.75;
}

/* 4. HEADER PRINCIPAL (Branco) */
.header {
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.03);
  position: relative;
  z-index: 1000;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0; /* Restaurado o respiro normal */
  gap: 30px;
}

/* Base Style Extra: Contact CTA Desktop */
.header-contact {
  display: flex;
  align-items: center;
}

.btn-orcamento-header {
  display: inline-block;
  text-align: center;
  background-color: var(--primary);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
  transition: background 0.3s, transform 0.2s, color 0.3s;
  box-shadow: 0 4px 10px rgba(240,125,0,0.2);
  letter-spacing: 0.5px;
}

.btn-orcamento-header:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  color: #ffffff;
}

/* Header Bottom Row (Categories) */
.header-bottom {
  background-color: #ffffff;
  border-top: 1px solid var(--border-light);
  border-bottom: 2px solid var(--primary); /* Laranja base */
}

/* Logo */
.logo img {
  max-width: 220px; /* Retornado ao tamanho ideal */
  transition: max-width 0.3s ease;
}

/* Navegação Principal Desktop */
.nav-list {
  display: flex;
  justify-content: center; /* Centralize megamenu */
  align-items: center;
  gap: 35px; /* Mais espaço para respirar */
  list-style: none;
}

.nav-item {
  position: relative;
}

.nav-link {
  font-size: 15px; /* Fonte maior para aproveitar a nova largura */
  font-weight: 600;
  color: var(--text-dark);
  padding: 12px 0; /* Respiro confortável */
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link:hover {
  color: var(--primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--primary);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.has-dropdown:hover > .nav-link::after {
  width: 100%;
}

.has-dropdown:hover > .nav-link {
  color: var(--primary);
}

/* Carets (Setinhas de Nível) */
.caret {
  border: solid var(--text-dark);
  border-width: 0 2px 2px 0;
  display: inline-block;
  padding: 3px;
  transform: rotate(45deg);
  margin-bottom: 3px;
  transition: transform 0.3s;
}
.nav-link:hover .caret, .has-dropdown:hover > .nav-link .caret {
  border-color: var(--primary);
  transform: rotate(-135deg); /* Gira para cima */
}

.caret-right {
  border: solid #555;
  border-width: 0 2px 2px 0;
  display: inline-block;
  padding: 3px;
  transform: rotate(-45deg); /* Gira pra direita */
  margin-left: auto;
}

/* Base dos Dropdowns B2B (E-commerce Style) */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: -20px;
  background-color: #ffffff;
  min-width: 250px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  border-top: 2px solid var(--primary);
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 1010;
}

.has-dropdown:hover > .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li {
  position: relative;
}

.dropdown-menu li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 25px;
  font-size: 14px;
  color: #555;
  transition: all 0.2s ease;
  border-bottom: 1px solid #f9f9f9;
  white-space: nowrap; /* Evita quebra de linha no hover quando o padding cresce */
}
.dropdown-menu li:last-child > a { border-bottom: none; }

.dropdown-menu li a:hover, .dropdown-submenu:hover > a {
  background-color: #fcfcfc;
  color: var(--primary);
  padding-left: 30px; /* Animação sutil B2B */
}

/* Multi-level Dropdown (Nível 3) */
.dropdown-submenu > .dropdown-menu {
  top: -12px; /* Remove a 'escadinha' compensando o padding: 10px do pai + 2px da borda */
  left: 100%;
  transform: translateX(10px); /* Transição suave direita */
}
.dropdown-submenu:hover > .dropdown-menu {
  transform: translateX(0);
}

/* Barra de Busca E-commerce (Input Completo) */
.header-search-container {
  flex: 1; /* Força ocupação de espaço no meio */
  max-width: 650px;
  margin: 0 20px;
}

.header-search {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-light);
  border-radius: 6px; /* Mais arredondado B2B Moderno */
  overflow: hidden;
  background-color: #fcfcfc;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.header-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(240, 125, 0, 0.1);
  background-color: #ffffff;
}

.header-search input {
  border: none;
  background: transparent;
  padding: 10px 18px; /* Reduzido para afinar a altura global da barra */
  flex: 1; /* Forces input to take available space */
  width: 100%; 
  font-family: var(--font-main);
  font-size: 14px;
  outline: none;
  color: var(--text-dark);
}

.header-search button {
  background: var(--text-dark);
  border: none;
  padding: 8px 20px; /* Reduzido verticalmente para afinar o botão e a barra */
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
  flex-shrink: 0; /* Prevents button from being sized down by flexbox */
}

.header-search button:hover {
  background: #111111;
}

.header-search button img {
  filter: brightness(0) invert(1) drop-shadow(0 0 0.5px #fff);
  width: 24px; /* Tamanho ajustado (era 28px que deixava a barra muito alta, e 18px era muito pequeno) */
  height: 24px; 
  display: block;
}

/* Botão Mobile Hamburger */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.hamburger-icon {
  width: 30px;
  height: 2px;
  background: var(--text-dark);
  position: relative;
}
.hamburger-icon::before, .hamburger-icon::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background: var(--text-dark);
  left: 0;
}
.hamburger-icon::before { top: -8px; }
.hamburger-icon::after { bottom: -8px; }

/* 5. RESPONSIVO MOBILE FIRST (Header) */
@media (max-width: 991px) {
  .topbar {
    display: none; /* Oculta topbar no celular para limpar tela */
  }
  
  .header-top {
    flex-wrap: wrap;
    padding: 20px 0 22px 0; /* Mais espaço para respirar e dar harmonia */
    gap: 15px;
  }
  
  .logo { order: 1; }
  .logo img { max-width: 180px; } /* Logo com mais presença, sem parecer espremido */
  
  .mobile-actions { order: 2; margin-left: auto; }
  
  .header-contact { display: none; } /* Esconde desktop CTA no mobile */
  
  .header-search-container { 
    order: 3; 
    flex: 0 0 100%; 
    max-width: 100%; 
    margin: 15px 0 0; /* Descola bem a barra do topo */
  }

  .header-search {
    box-shadow: 0 4px 12px rgba(0,0,0,0.03); /* Eleva levemente a barra no mobile */
  }
  
  .header-bottom { padding: 0; }
  
  .nav-main {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    
    /* Estado Oculto Seguro */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition: all 0.3s ease;
  }
  
  .nav-main.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
  
  .nav-list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
  }

  .nav-item {
    width: 100%;
  }

  .nav-link {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-light);
  }

  /* Reset Dropdowns for Mobile */
  .dropdown-menu {
    position: static;
    box-shadow: none;
    border-top: none;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: none; /* Only open when parent is active */
    background-color: #fafafa;
    min-width: 100%;
    padding: 0;
  }

  /* Removemos a redundância do :hover no celular porque ele prende o estado ativo após o clique */
  .has-dropdown.touch-expanded > .dropdown-menu {
    display: block; /* Apenas JS controla a sanfona agora! */
  }

  .dropdown-menu li a {
    padding: 12px 20px 12px 40px; /* Indent mobile submenus */
    white-space: normal; /* Restaura quebra de linha no celular para não exceder a tela */
  }

  .dropdown-submenu > .dropdown-menu li a {
    padding-left: 60px; /* Deep indent */
  }
  
  .mobile-toggle {
    display: block;
  }
  
  .header-actions {
    display: none; 
  }

  /* Botões principais viram Full-Width (App-like) no celular para não quebrar o texto e facilitar o toque */
  .btn-orcamento-header {
    display: block;
    width: 100%;
    padding: 16px 20px;
    font-size: 14px;
    letter-spacing: 1px;
  }
}

/* Esconder itens do menu no desktop que já são cobertos por CTAs (ex: Orçamento) */
@media (min-width: 992px) {
  .hide-on-desktop {
    display: none !important;
  }
}

/* ==========================================================================
   6. HOMEPAGE COMPONENTS (Zero Legacy)
========================================================================== */

.section-spacing {
  padding: 40px 0; /* Diminuído globalmente para um site mais dinâmico e enxuto */
}

.bg-light {
  background-color: #f9f9f9;
}

/* 6.1 HERO BENTO GRID */
.hero-bento {
  padding-top: 25px; 
  padding-bottom: 25px; 
  /* margin: 0 retirado para não conflitar com o margin: 0 auto da classe .container, e voltar a centralizar */
}

.bento-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 320px; /* Restaurado o tamanho original do desktop */
  gap: 20px;
}

.bento-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0,0,0,0.06);
  display: block;
  height: 100%; /* Força o card a assumir apenas os 320px da linha do grid e não vazar */
  width: 100%;
}

.bento-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

@media (hover: hover) and (pointer: fine) {
  .bento-card:hover img {
    transform: scale(1.05);
  }
}

.bento-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 40px 30px 30px;
  background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
  color: #fff;
}

.bento-small .bento-overlay {
  padding: 20px 20px 15px;
}

.bento-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.2;
}

.bento-large .bento-title {
  font-size: 32px;
}

.bento-btn {
  display: inline-block;
  background-color: var(--primary);
  color: #ffffff; /* Texto branco como definido no PDF para Botão Primário Azul */
  padding: 8px 24px;
  border-radius: 4px;
  font-weight: 800; /* Mais espesso para melhorar leitura */
  font-size: 14px;
  margin-top: 10px;
  transition: all 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
  .bento-btn:hover {
    background-color: var(--primary-hover); /* Azul escuro */
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 92, 184, 0.3);
  }
}

.bento-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.bento-small {
  flex: 1;
}

@media (max-width: 991px) {
  .hero-bento {
    padding-top: 10px; /* Cola no cabeçalho */
    padding-bottom: 5px; 
  }

  /* Transforma de Grid Estático para Slider Dinâmico Nativo */
  .bento-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-left: -4vw; 
    margin-right: -4vw;
    padding-left: 4vw; 
    padding-right: 4vw;
    padding-bottom: 25px; /* Respiro pro scroll invisível e pro dedo do usuário */
    -webkit-overflow-scrolling: touch;
    scroll-padding-left: 4vw;
    height: auto;
    gap: 15px; /* Define o respiro entre os 3 banners na fila */
  }
  
  /* Oculta barra de rolagem mas mantém UX nativa fluida */
  .bento-grid::-webkit-scrollbar { display: none; }
  .bento-grid { -ms-overflow-style: none; scrollbar-width: none; }

  /* Mágica do UX: desempacota os cards menores de dentro da div lado, transformando-os em itens diretos do carrossel horizontal */
  .bento-side {
    display: contents; 
  }

  /* Todo card (Grande e Menores) assume as mesmas proporções na fila do mobile */
  .bento-card {
    flex: 0 0 88%; /* Exibe 12% da próxima foto para instigar a rolagem */
    scroll-snap-align: start;
    height: 380px; /* Altura unificada e imponente para todos eles */
    min-height: 380px;
    width: auto;
  }

  /* Ajustes finos de tipografia e overlay para os textos grandes adicionados */
  .bento-overlay {
    padding: 25px 20px 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.85) 45%, rgba(0,0,0,0.3) 80%, transparent);
  }

  .bento-large .bento-title {
    font-size: 22px !important;
    line-height: 1.2;
    margin-bottom: 8px !important;
  }

  .bento-subtitle {
    font-size: 14px !important;
    line-height: 1.35 !important;
    margin-bottom: 15px !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .bento-actions {
    gap: 10px !important;
    flex-wrap: nowrap !important; /* Tenta forçar eles lado a lado */
    flex-direction: column; /* Mas na verdade empilha para facilitar clique */
  }

  .bento-actions .bento-btn {
    font-size: 13px !important;
    padding: 10px 16px !important;
    width: 100%;
    text-align: center;
    margin-top: 0 !important;
  }
}

/* 6.2 DIFFERENCIAIS */
.differentials-bar {
  margin-bottom: 40px;
}

.diff-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 25px 40px;
  background-color: var(--surface-bg, #fff);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
  gap: 20px;
}

.diff-item {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 15px;
  color: var(--text-dark);
}

.diff-item img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .differentials-bar {
    margin-bottom: 20px;
  }
  
  .diff-wrapper {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 10px 20px 20px 20px; /* Padding modificado para acomodar scrolls */
    margin: 0 -20px; /* Sangra a tela para rolar suavemente */
    justify-content: flex-start;
    align-items: stretch;
    -webkit-overflow-scrolling: touch;
    
    /* Remove a "caixa aprisionadora" do layout mobile */
    border: none;
    box-shadow: none;
    background: transparent;
  }
  .diff-wrapper::-webkit-scrollbar { display: none; }
  .diff-wrapper { -ms-overflow-style: none; scrollbar-width: none; }
  
  .diff-item {
    flex: 0 0 75%;
    scroll-snap-align: center;
    white-space: normal;
    
    /* Transforma os itens individuais em Cards independentes */
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 15px 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
  }
}

.sobre-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: stretch;
}

.sobre-texto p {
  font-size: 16px;
  color: var(--text-light);
  margin-bottom: 18px;
  line-height: 1.7;
}

.sobre-lista {
  margin-top: 25px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.sobre-lista li {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  font-size: 15px;
  color: var(--text-dark);
  line-height: 1.5;
}

.sobre-lista li img {
  margin-top: 2px;
  opacity: 0.9;
}

.sobre-imagem {
  position: relative;
  height: 100%;
  width: 100%;
}

.sobre-imagem img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

@media (max-width: 991px) {
  .sobre-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .sobre-imagem {
    order: -1;
    min-height: 250px;
  }
}

/* 6.4 SECTIONS HEADER */
.section-titling {
  text-align: center;
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-h2 {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-dark);
}

.section-divider {
  width: 60px;
  height: 3px;
  background-color: var(--primary);
  margin: 15px 0;
}

.section-sub {
  color: var(--text-light);
  font-size: 16px;
}

/* 6.4 GRID DE CATEGORIAS (Ímãs, Equipamentos, Segmentos) */
.imas-grid {
  display: grid;
  grid-template-columns: repeat(4, calc((100% - 80px) / 5));
  justify-content: center;
  gap: 20px;
}
.segmentos-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.equipamentos-grid {
  display: grid;
  grid-template-columns: repeat(4, calc((100% - 80px) / 5));
  justify-content: center;
  gap: 20px;
}

.ima-grid-card {
  position: relative;
  border-radius: 12px; /* Mantém o formato arredondado atual */
  overflow: hidden;
  height: 380px; /* Altura fixa baseada na screenshot */
  display: flex;
  flex-direction: column;
}

.ima-card-main-link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
}

.ima-bg-img {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
  transition: transform 0.5s ease;
}

.ima-grid-card:hover .ima-bg-img {
  transform: scale(1.05);
}

.ima-overlay-content {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.1) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 30px 20px;
  color: #fff;
  text-align: center;
}

.ima-overlay-content h3 {
  font-size: 22px; /* Reduzido ligeiramente para acomodar 5 colunas sem quebrar */
  font-weight: 700;
  margin-bottom: 5px;
}

.ima-confira {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #ddd;
  position: relative;
  padding-bottom: 8px;
}

.ima-confira::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 40px;
  height: 2px;
  background-color: var(--primary);
  transform: translateX(-50%);
}

@media (max-width: 1100px) {
  .imas-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
  .segmentos-grid { grid-template-columns: repeat(3, 1fr); gap: 15px; }
  .equipamentos-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; justify-content: start; }
}
@media (max-width: 991px) {
  .sobre-grid { grid-template-columns: 1fr; gap: 40px; }
  .sobre-imagem { order: -1; min-height: 250px; }
}
@media (max-width: 768px) {
  /* Transforma de Grid para Scroll Horizontal nativo em TODAS as categorias e Blog */
  .imas-grid, .equipamentos-grid, .segmentos-grid, .blog-grid { 
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    gap: 15px !important;
    padding-bottom: 30px !important; 
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    padding-left: 4vw !important;
    padding-right: 4vw !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-padding-left: 4vw !important;
    justify-content: flex-start !important;
  }
  
  /* Esconde a barrinha de rolagem em todos os browsers */
  .imas-grid::-webkit-scrollbar, .equipamentos-grid::-webkit-scrollbar, .segmentos-grid::-webkit-scrollbar, .blog-grid::-webkit-scrollbar { display: none !important; }
  .imas-grid, .equipamentos-grid, .segmentos-grid, .blog-grid { -ms-overflow-style: none !important; scrollbar-width: none !important; }

  .ima-grid-card, .blog-card {
    flex: 0 0 82% !important; /* Preview da próxima foto garantido para instigar rolagem */
    min-width: 82% !important; /* Ignora bug do WebKit onde fotos alargam a div */
    max-width: 82% !important;
    scroll-snap-align: start !important;
    height: auto !important; 
    min-height: 400px;
  }
}
@media (max-width: 600px) {
  .ima-grid-card {
    height: 360px; 
  }
}

/* 6.5 MARQUEE CLIENTES */
.marquee-track-container {
  overflow: hidden;
  white-space: nowrap;
  padding: 15px 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.marquee-track {
  display: inline-flex;
  gap: 50px;
  align-items: center;
  animation: scroll-left 40s linear infinite;
}

.marquee-track img {
  --base-scale: 1; /* Padrão matemático para todos */
  max-width: 140px; 
  height: 45px;     
  width: auto;
  object-fit: contain; 
  filter: grayscale(100%) opacity(0.5); 
  transition: all 0.3s ease;
  transform: scale(var(--base-scale)) translateZ(0); /* translateZ(0) otimiza anti-aliasing no Chrome durante o scale */
}

.marquee-track img:hover {
  filter: grayscale(0%) opacity(1);
  transform: scale(calc(var(--base-scale) * 1.05)) translateZ(0); /* Aumenta +5% baseado na própria escala corrigida */
}

/* =========================================================
   COMPENSAÇÃO ÓPTICA DE LOGOS (Harmonização de Proporção)
   Muitos dos arquivos PNG originais têm espaços vazios transparentes 
   (whitespace) ao redor das marcas. O scale() burla esse espaço 
   dando 'zoom' e resgatando a autoridade da marca sem estragar o grid.
   ========================================================= */
.marquee-track img[alt="Camil"],
.marquee-track img[alt="Cargill"] {
  --base-scale: 1.6; /* Arquivos menores/achatados */
}

.marquee-track img[alt="Mars"] {
  --base-scale: 1.8; /* Mars tem uma borda transparente imensa */
}

.marquee-track img[alt="Valeo"] {
  --base-scale: 1.15; /* Aumento manual de proporção da Valeo */
}

.marquee-track img[alt="VDO"],
.marquee-track img[alt="JBS"] {
  --base-scale: 0.85; /* Vetores svg sem margem que ficavam monstruosamente agressivos */
}

@keyframes scroll-left {
  0% { transform: translateX(0); }
  /* Para que -50% seja matemático, o container deve ter EXATAMENTE 2 grupos idênticos de imagens e gaps constantes */
  100% { transform: translateX(calc(-50% - 25px)); } /* Compensa metade do gap do meio do loop (50px / 2 = 25px) para não dar tranco */
}

/* 6.6 BLOG GRID */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.blog-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  box-shadow: 0 10px 25px rgba(0,0,0,0.08); /* Suave destaque visual no hover */
  transform: translateY(-4px); /* Elevação 3D moderna */
}

.blog-img {
  width: 100%;
  height: 190px;
  overflow: hidden;
  border-bottom: 1px solid #f0f0f0; /* Limite visual clássico do print */
  background-color: #f7f7f7; /* Fundo suave para contrastar caso a foto tenha fundo branco */
}

.blog-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.blog-card:hover .blog-img img {
  transform: scale(1.05); /* Pequeno life-breath */
}

.blog-content {
  padding: 24px 24px 30px;
  display: flex;
  flex-direction: column;
  flex-grow: 1; /* Preenche o resto do card, empurrando o clique pra baixo */
}

.blog-content h3 {
  font-size: 15px;
  font-weight: 800; /* Título mais expressivo como no design legado */
  color: #111;
  margin-bottom: 10px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Sempre 2 linhas */
  line-clamp: 2;
  -webkit-box-orient: vertical;  
  overflow: hidden;
  min-height: 42px; /* Garante que 1 linha ocupe o espaço de 2 */
}

.blog-content p {
  color: #555; /* Cinza mais escuro para alcançar ratio > 4.5:1 no WCAG AA */
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 20px; /* Margem até o link */
  display: -webkit-box;
  -webkit-line-clamp: 3; /* Sempre 3 linhas */
  line-clamp: 3;
  -webkit-box-orient: vertical;  
  overflow: hidden;
  flex-grow: 1; /* Segura o texto lá no topo do box */
}

.blog-link {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin-top: auto; /* Empurra pro final certinho */
  transition: color 0.3s;
}

.blog-card:hover .blog-link {
  color: var(--primary-hover);
}

/* 6.7 CAROUSEL DOTS (Indicador de Scroll Mobile) */
.carousel-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 25px;
}

.carousel-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--secondary, #ED8600);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dots .dot.active {
  background: var(--secondary, #ED8600);
  width: 20px; /* Formato pílula como no print do cliente */
  border-radius: 10px;
}

/* Oculta no desktop exceto se precisar (a gente usa `hide-on-desktop` no HTML direto) */
@media (max-width: 991px) and (min-width: 769px) {
  .blog-card { height: auto; }
}

@media (max-width: 768px) {
  /* Força a reescrita do Blog Grid no Mobile pois ele era definido no meio do arquivo */
  .blog-grid { 
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 15px;
    padding-bottom: 30px; 
    margin-left: -4vw; 
    margin-right: -4vw;
    padding-left: 4vw; 
    padding-right: 4vw;
    -webkit-overflow-scrolling: touch;
    scroll-padding-left: 4vw;
  }
  .blog-grid::-webkit-scrollbar { display: none; }
  .blog-grid { -ms-overflow-style: none; scrollbar-width: none; }

  .blog-card {
    flex: 0 0 85%; /* 85% para o preview da proxima foto */
    scroll-snap-align: start;
    height: auto; 
    min-height: 400px;
  }
}

/* ==========================================================================
   7. FOOTER & WHATSAPP (DARK THEME)
========================================================================== */
.footer {
  background-color: #222222; /* Fundo puro tipo print legado */
  color: #dddddd;
  padding-top: 60px;
  font-size: 14px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: 120px; /* Muito mais respiro entre colunas conforme pedido */
  margin-bottom: 50px;
}

.footer-logo {
  margin-bottom: 25px;
  /* Foi removido o filter brightess pois agora a logo oficial branca rodape.webp já tem a cor correta */
}

.footer-badges {
  display: flex;
  gap: 15px;
}

.footer-title {
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 25px;
}

.footer-links li, .footer-contact li {
  margin-bottom: 12px;
}

.footer-links a, .footer-contact a {
  color: #cccccc; /* Clareado de aaa para ccc (Forte ratio contra #222) */
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-links a:hover, .footer-contact a:hover {
  color: var(--primary);
}

.footer-address-text {
  color: #cccccc; /* Legibilidade elevada */
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.6;
  margin-bottom: 15px;
}

.footer-note {
  font-size: 13px;
  color: #999999; /* Escapando do WCAG warning (antes 777) */
  margin-bottom: 20px;
}

.footer-social {
  display: flex;
  gap: 15px;
}

.footer-social img {
  filter: brightness(0) invert(1) opacity(0.5);
  transition: all 0.3s;
}

.footer-social a:hover img {
  filter: brightness(0) invert(1) opacity(1);
}

.footer-bottom {
  background-color: #1c1c1c; /* Sub-footer escurecido de contraste */
  padding: 20px 0;
  border-top: 1px solid #333333;
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.payment-icons {
  display: flex;
  gap: 15px;
  align-items: center;
}

.floating-whatsapp {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #075E54; /* Verde Escuro Oficial WhatsApp (Contraste AAA + Contraste c/ Laranja) */
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 5px 20px rgba(7, 94, 84, 0.3);
  z-index: 9999;
  transition: transform 0.3s, background-color 0.3s, box-shadow 0.3s;
}

.floating-whatsapp img {
  filter: brightness(0) invert(1);
}

.floating-whatsapp:hover {
  transform: translateY(-5px);
  background-color: #054c44; /* Verde ainda mais denso no hover */
  color: #ffffff;
  box-shadow: 0 8px 25px rgba(7, 94, 84, 0.5);
}

@media (max-width: 991px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 50px; }
}

@media (max-width: 768px) {
  .footer-bottom-inner {
    flex-direction: column;
    gap: 20px;
    align-items: center !important; /* Centraliza no Tablet */
  }
}

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom-left { flex-direction: column !important; align-items: center !important; gap: 15px; text-align: center; }
  
  /* Botão flutuante encolhe pro celular pra evitar tampar conteúdo */
  .floating-whatsapp {
    bottom: 20px;
    right: 20px;
    padding: 15px;
    border-radius: 50%;
  }
  .floating-whatsapp .fw-text { display: none; }
}

/* ==========================================================================
   7. CATEGORY PAGE (B2B E-COMMERCE)
========================================================================== */

/* Breadcrumb */
.breadcrumb-bar {
  background-color: var(--bg-topbar);
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}
.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-light);
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 6px;
}
.breadcrumb-list::-webkit-scrollbar {
  height: 3px;
}
.breadcrumb-list::-webkit-scrollbar-track {
  background: transparent;
}
.breadcrumb-list::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15);
  border-radius: 4px;
}
.breadcrumb-list a:hover {
  color: var(--primary);
}
.breadcrumb-list .active {
  color: var(--text-dark);
  font-weight: 600;
}
.breadcrumb-list .separator {
  opacity: 0.5;
}

/* Category Header */
.category-header {
  background-color: #ffffff;
  padding: 40px 0 20px;
  border-bottom: 1px solid var(--border-light);
}
.cat-title {
  font-size: 36px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 15px;
}
.cat-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--primary);
  margin-top: 15px;
}
.cat-desc {
  font-size: 16px;
  color: var(--text-light);
  max-width: 800px;
  line-height: 1.6;
}

/* Layout */
.category-layout {
  display: flex;
  align-items: flex-start;
  gap: 40px;
}

/* Sidebar */
.category-sidebar {
  width: 25%;
  flex-shrink: 0;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}
.widget-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--text-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* NOVO ACORDEÃO DA SIDEBAR (JS) */
.sb-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}
/* Esconder a sub-lista (filhos) por padrão caso NÃO seja ROOT */
.sb-nav-item .sb-nav-list {
  display: none;
}
/* Se houver a classe expanded, mostrar a sublista APENAS 1 nível abaixo */
.sb-nav-item.expanded > .sb-nav-list {
  display: flex;
}
/* Se for a root-list que segura toda a árvore, mostrar sempre */
.sb-nav-list.root-list {
  display: flex !important;
}

.sb-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f8f9fa;
  transition: background-color 0.2s;
}
.sb-nav-row:hover {
  background-color: var(--bg-light);
}
.sb-nav-row.active {
  background-color: var(--bg-light);
  border-left: 3px solid var(--primary);
}

.sb-nav-link {
  flex: 1;
  display: block;
  padding: 10px 0;
  color: var(--text-light);
  text-decoration: none;
  font-size: 13.5px;
  transition: color 0.2s;
}
.sb-nav-link:hover {
  color: var(--primary);
}
.sb-nav-row.active > .sb-nav-link {
  color: var(--primary);
  font-weight: 600;
}

.sb-nav-text {
  display: inline-block;
  line-height: 1.3;
}

.sb-caret-btn {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: #777;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}
.sb-caret-btn:hover {
  color: var(--primary);
}
.sb-caret {
  transition: transform 0.3s ease;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Girar caret pra cima quando expandido */
.sb-nav-item.expanded > .sb-nav-row .sb-caret {
  transform: rotate(180deg);
}

.widget-list a:hover, .widget-list a.active {
  color: var(--primary);
  font-weight: 700;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.filter-label {
  font-size: 14px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.filter-label input[type="checkbox"] {
  accent-color: var(--primary);
}

/* Main Grid */
.category-main {
  width: 100%;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

/* Product Card B2B */
.product-card-b2b {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}
.product-card-b2b .btn-outline-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}
.product-card-b2b:hover {
  border-color: var(--primary);
  box-shadow: 0 10px 25px rgba(0,0,0,0.06);
  transform: translateY(-4px);
}
.pc-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  background-color: #fefefe;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-bottom: 1px solid #f0f0f0;
  overflow: hidden;
}
.pc-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card-b2b:hover .pc-image img {
  transform: scale(1.05);
}
.pc-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background-color: var(--secondary);
  color: var(--text-dark);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  z-index: 2;
}
.pc-badge.badge-alt {
  background-color: var(--text-dark);
  color: #ffffff;
}
.pc-content {
  padding: 25px 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.pc-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
  line-height: 1.4;
}
.pc-sku {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 20px;
}
.btn-outline-primary {
  display: block;
  text-align: center;
  width: 100%;
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
  padding: 10px 15px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  transition: all 0.3s ease;
  margin-top: auto;
}
.product-card-b2b:hover .btn-outline-primary, .btn-outline-primary:hover {
  background: var(--primary);
  color: #fff;
}

/* Mobile Filters */
.mobile-filter-bar {
  margin-bottom: 25px;
}
.btn-filter-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  padding: 12px;
  border-radius: 6px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-dark);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

/* Category Page Responsiveness */
@media (max-width: 1100px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 991px) {
  .category-layout { flex-direction: column; gap: 20px; }
  
  .category-sidebar {
    width: 100%;
    display: none;
  }
  .category-sidebar.active {
    display: block;
    border-color: var(--primary);
  }

  .product-grid { grid-template-columns: 1fr; gap: 15px; }

  .cat-title { font-size: 28px; }
  .breadcrumb-bar { 
    padding: 8px 0; 
    position: relative;
  }
  .breadcrumb-bar::after {
    content: '';
    position: absolute;
    right: 0; top: 0; bottom: 0;
    width: 40px;
    background: linear-gradient(to right, transparent, var(--bg-topbar));
    pointer-events: none;
  }
  .breadcrumb-list {
    padding-right: 45px;
  }
  
  .category-header { padding: 25px 0 15px; }
}

/* ==========================================================================
   8. SEO PILLAR PAGE (CONTENT & TOC)
========================================================================== */
.category-seo-section {
  background-color: var(--bg-topbar);
  border-top: 1px solid var(--border-light);
  margin-top: 20px;
}

.seo-layout {
  display: flex;
  align-items: flex-start;
  gap: 50px;
}

.seo-sidebar {
  width: 25%;
  flex-shrink: 0;
  position: -webkit-sticky;
  position: sticky;
  top: 20px; /* Offset to not touch the top of screen */
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.toc-title {
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 15px;
  color: var(--text-dark);
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toc-link {
  font-size: 14px;
  color: var(--text-light);
  display: block;
  line-height: 1.4;
  transition: all 0.2s ease;
  cursor: pointer;
  padding: 6px 12px;
  border-left: 3px solid transparent;
}

.toc-link:hover, .toc-link.active {
  color: var(--primary);
  font-weight: 700;
  border-left-color: var(--primary);
  background-color: #f8fbff;
  border-radius: 0 4px 4px 0;
}

.seo-article {
  width: 100%;
  background: #ffffff;
  padding: 50px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

/* SEO FAQ Section */
.seo-faq {
  margin-top: 20px;
  margin-bottom: 30px;
}
.faq-item {
  margin-bottom: 12px;
  background: #fdfdfd;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.3s;
}
.faq-item:hover {
  box-shadow: 0 3px 12px rgba(0,0,0,0.03);
}
.faq-question {
  padding: 16px 20px;
  font-weight: 700;
  color: var(--text-dark);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.3s;
}
.faq-question::-webkit-details-marker {
  display: none;
}
.faq-question:hover, .faq-item[open] .faq-question {
  background: var(--bg-topbar);
  color: var(--primary);
}
.faq-question::after {
  content: "+";
  font-size: 20px;
  color: var(--primary);
  transition: transform 0.3s;
}
.faq-item[open] .faq-question::after {
  content: "-";
  transform: rotate(180deg);
}
.faq-answer {
  padding: 5px 20px 20px 20px;
  color: var(--text-light);
  line-height: 1.6;
}

.seo-meta-autor {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
  color: var(--text-light);
}

.meta-autor-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--text-dark);
}

.meta-autor-info img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: #f0f0f0;
}

.meta-date {
  display: flex;
  align-items: center;
  gap: 5px;
}

.meta-verified {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background-color: #E8F5E9;
  color: #2E7D32;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 12px;
}

.meta-verified svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.tts-controls {
  margin-bottom: 30px;
  display: inline-flex;
}

.btn-tts {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--primary);
  color: #ffffff;
  border: none;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.btn-tts:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 92, 184, 0.2);
}

.btn-tts svg {
  fill: currentColor;
  width: 20px;
  height: 20px;
}

.seo-text-body h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-dark);
  margin-top: 40px;
  margin-bottom: 20px;
}

.seo-text-body h2:first-child {
  margin-top: 0;
}

.seo-text-body h3 {
  font-size: 22px;
  margin-top: 30px;
  margin-bottom: 15px;
}

.seo-text-body p {
  font-size: 16px;
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 20px;
}

.seo-text-body ul { list-style: disc; list-style-position: inside; margin-bottom: 20px; padding-left: 10px; color: var(--text-light); line-height: 1.8; }
.seo-text-body ol { list-style: decimal; list-style-position: inside; margin-bottom: 20px; padding-left: 10px; color: var(--text-light); line-height: 1.8; }
.seo-text-body li {
  margin-bottom: 8px;
}

/* ToC Social Share Buttons */
.toc-share {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px dashed var(--border-light);
}

.share-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 12px;
}

.share-buttons {
  display: flex;
  gap: 12px;
}

.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: #f5f5f5;
  color: var(--text-dark);
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  z-index: 10;
}

.share-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.share-btn.share-link svg {
  fill: none;
  width: 18px;
  height: 18px;
}

.share-btn.share-linkedin:hover {
  background-color: #0e76a8;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(14, 118, 168, 0.3);
}

.share-btn.share-whatsapp:hover {
  background-color: #25D366;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
}

.share-btn.share-link:hover {
  background-color: var(--primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 92, 184, 0.3);
}

.share-btn.share-facebook:hover {
  background-color: #1877F2;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(24, 119, 242, 0.3);
}

.share-btn.share-instagram:hover {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(220, 39, 67, 0.3);
  border: none;
}

.article-share-footer {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px dashed var(--border-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 25px;
  left: 25px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--secondary);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 9900;
}
.back-to-top:hover {
  background: var(--secondary-hover);
  transform: translateY(-3px);
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

/* Mobile ToC Sidebar Toggle */
.toc-toggle-btn {
  position: fixed;
  top: 50%;
  left: auto;
  right: 0;
  transform: translateY(-50%);
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 15px 6px;
  border-radius: 8px 0 0 8px;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.15);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 2px;
  display: none;
  transition: background 0.3s;
}
.toc-toggle-btn:hover {
  background: var(--primary-hover);
}
.toc-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 9997;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.toc-overlay.active {
  display: block;
  opacity: 1;
}

@media (max-width: 991px) {
  .seo-layout {
    flex-direction: column;
    gap: 30px;
  }
  .seo-sidebar {
    position: fixed !important;
    top: 0;
    left: auto;
    right: -320px;
    width: 280px !important;
    height: 100vh;
    z-index: 9998;
    background: #ffffff;
    margin: 0;
    padding: 30px 20px;
    box-shadow: -2px 0 15px rgba(0,0,0,0.15);
    transition: right 0.3s ease;
    overflow-y: auto;
    border-radius: 0;
    border: none;
  }
  .seo-sidebar.open {
    right: 0;
  }
  .toc-toggle-btn {
    display: flex;
    align-items: center;
  }
  .seo-article {
    padding: 30px 20px;
  }
  .hide-on-mobile {
    display: none !important;
  }
}

/* ==============================================================
   6. PAGINA DE PRODUTO B2B (NOVO TEMPLATE MAGTEK)
   ============================================================== */

/* 6.1 Subprodutos / Variations Bar */
.product-variations-bar {
  background-color: var(--surface-bg);
  border-bottom: 1px solid var(--border-light);
  padding: 15px 0;
}
.variations-scroll {
  display: flex;
  gap: 15px;
  padding: 5px 0; /* Previne corte do hover shadow/transform */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.variations-scroll::-webkit-scrollbar { display: none; }
.variation-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 50px;
  white-space: nowrap;
  font-weight: 600;
  color: var(--text-dark);
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.02);
  text-decoration: none;
}
.variation-card:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 92, 184, 0.15);
}
.variation-card:hover .vc-icon {
  color: #ffffff;
}
.vc-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--primary);
}

/* 6.2 The Buy Box (Topo do Produto) */
.buy-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 40px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.03);
  position: relative;
}

/* Galeria com Lupa Interativa */
.product-gallery {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.main-image-container {
  position: relative;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
  background: #fafafa;
  cursor: crosshair; /* Cursor Lupa */
}
.main-image {
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: contain;
  display: block;
}
.zoom-lens {
  position: absolute;
  border: 1px solid #d4d4d4;
  width: 150px;
  height: 150px;
  background-color: rgba(255, 255, 255, 0.4);
  background-image: radial-gradient(circle, transparent 70%, rgba(200,200,200,0.5) 100%);
  border-radius: 5px;
}
.zoom-result {
  border: 1px solid var(--border-light);
  width: 115%;
  height: 105%;
  position: absolute;
  top: -2.5%;
  left: 104%; /* Joga o zoom box para a direita da foto */
  background-color: #fff;
  border-radius: 8px;
  z-index: 100;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.gallery-thumbnails {
  display: flex;
  gap: 10px;
  overflow-x: auto;
}
.gallery-thumbnails .thumb {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border: 2px solid var(--border-light);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  opacity: 0.7;
}
.gallery-thumbnails .thumb.active,
.gallery-thumbnails .thumb:hover {
  border-color: var(--primary);
  opacity: 1;
}

/* Resumo Técnico e CTA */
.product-tech-overview {
  display: flex;
  flex-direction: column;
}
.pt-title {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-dark);
  margin-bottom: 12px;
}
.pt-sku {
  font-size: 16px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 25px;
}
.pt-tech-list {
  list-style: none;
  padding: 0;
  margin: 0 0 30px 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}
.pt-tech-list li {
  padding: 12px 0;
  border-bottom: 1px dashed var(--border-light);
  font-size: 15px;
  color: var(--text-dark);
}
.pt-tech-list li:last-child {
  border-bottom: none;
}
.pt-tech-list strong {
  color: #333;
  display: inline-block;
  min-width: 150px;
}

/* Action CTA B2B */
.pt-action {
  background: var(--surface-bg);
  padding: 25px;
  border-radius: 8px;
  border-left: 4px solid var(--primary);
}
.btn-buy-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  padding: 16px 24px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.3s;
  width: 100%;
}
.btn-buy-box:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 92, 184, 0.4);
  color: #fff;
}
.pt-notice {
  font-size: 12px;
  color: #666;
  margin-top: 15px;
  text-align: center;
  line-height: 1.4;
}

/* 6.3 Tech Matrix (Tabela McMaster) */
.product-matrix-section {
  margin-bottom: 60px;
}
.matrix-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--text-dark);
}
.table-responsive {
  overflow-x: auto;
  border: 1px solid var(--border-light);
  border-radius: 8px;
}
.tech-matrix, .custom-admin-table-wrapper table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  background: #fff;
}
.tech-matrix th, .custom-admin-table-wrapper th {
  background: #f4f7f9;
  padding: 15px 20px;
  font-weight: 700;
  font-size: 13px;
  color: #444;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #ddd;
}
.tech-matrix td, .custom-admin-table-wrapper td {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border-light);
  font-size: 14px;
  color: #555;
  vertical-align: middle;
}
.tech-matrix tr:last-child td, .custom-admin-table-wrapper tr:last-child td {
  border-bottom: none;
}
.tech-matrix tr:hover td, .custom-admin-table-wrapper tr:hover td {
  background-color: #fcfcfc;
}
.tech-matrix .highlight td, .custom-admin-table-wrapper .highlight td {
  background-color: #fff5eb;
}

/* 6.4 Responsivo Mobile Produto */
@media (max-width: 991px) {
  .buy-box {
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 20px;
  }
  .pt-title {
    font-size: 26px;
  }
  .zoom-result {
    display: none !important; /* Desabilita preview flutuante no mobile */
  }
  .pt-tech-list strong {
    display: block;
    margin-bottom: 4px;
  }
}

/* ==============================================================
   7. BLOG & POST SETTINGS (MAGTEK)
   ============================================================== */
.post-content-formatted p {
  font-size: 1.15rem;
  line-height: 1.8;
  color: #444;
  margin-bottom: 25px;
}
.post-content-formatted h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-top: 50px;
  margin-bottom: 25px;
}
.post-content-formatted h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-top: 40px;
  margin-bottom: 20px;
}
.post-content-formatted ul,
.post-content-formatted ol {
  font-size: 1.15rem;
  line-height: 1.8;
  color: #444;
  margin-bottom: 25px;
  padding-left: 40px;
}
.post-content-formatted ul {
  list-style-type: disc;
}
.post-content-formatted ol {
  list-style-type: decimal;
}
.post-content-formatted ul li,
.post-content-formatted ol li {
  margin-bottom: 10px;
}
.post-content-formatted blockquote {
  border-left: 4px solid var(--primary);
  background-color: #fcfcfc;
  padding: 20px 25px;
  margin-bottom: 25px;
  font-style: italic;
  font-size: 1.25rem;
  color: #555;
  border-radius: 0 8px 8px 0;
}
.post-image-wrapper {
  margin: 40px 0;
  text-align: center;
}
.post-image-wrapper img {
  max-width: 100%;
  max-height: 500px;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.06);
  display: inline-block;
}
.post-image-wrapper figcaption {
  font-size: 13px;
  color: #777;
  margin-top: 15px;
  font-style: italic;
}

/* ==============================================================
   8. COMPONENTES BLOG/FILTRAGEM
   ============================================================== */
.blog-categories ul {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.filter-btn {
  display: inline-block;
  padding: 8px 18px;
  background-color: transparent;
  color: var(--text-dark);
  font-weight: 600;
  border-radius: 50px;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
  border: 1px solid var(--border-light);
  white-space: nowrap;
}
.filter-btn:hover {
  background-color: rgba(0, 92, 184, 0.05);
  color: var(--primary);
  border-color: rgba(0, 92, 184, 0.3);
  transform: translateY(-2px);
}
.filter-btn.active {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 10px rgba(0, 92, 184, 0.2);
}

.blog-tools-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  background: var(--light, #f8f9fa);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
}
.blog-search {
  flex: 1;
  min-width: 250px;
  max-width: 500px;
}
.blog-form-wrapper {
  display: flex;
  gap: 10px;
  width: 100%;
}
.blog-input-wrapper {
  position: relative;
  width: 100%;
}
#blog-search-input {
  padding: 12px 40px 12px 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 15px;
}
#blog-search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 92, 184, 0.1);
}
#blog-clear-search {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: #eee;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 16px;
  color: #555;
  display: none;
  align-items: center;
  justify-content: center;
}
#blog-clear-search.visible {
  display: flex;
}
#blog-clear-search:hover {
  background: #ddd;
  color: #333;
}
.blog-search-btn {
  border: none;
  cursor: pointer;
  border-radius: 8px;
  padding: 12px 25px;
}

@media (max-width: 991px) {
  .blog-tools-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 15px;
    gap: 15px;
  }
  .blog-search {
    max-width: 100%;
    min-width: 100%;
  }
  .blog-form-wrapper {
    flex-direction: row;
    flex-wrap: nowrap;
  }
  .blog-input-wrapper {
    flex: 1;
  }
  .blog-search-btn {
    width: auto;
    padding: 12px 15px;
    white-space: nowrap;
  }
  .blog-categories {
    width: 100%;
    margin: 0;
  }
  .blog-categories ul {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Sangria negativa para as beiradas permitirem rolagem limpa e pegarem o margin do container pai */
    margin: 0 -15px;
    padding: 5px 15px 10px 15px;
    width: calc(100% + 30px);
  }
  .blog-categories ul::-webkit-scrollbar {
    display: none;
  }
}


/* ==========================================================================

   BLOG MOBILE LIST UX (LCP OPTIMIZATION)

========================================================================== */

@media (max-width: 768px) {

  .blog-grid.blog-list-mobile {

    display: flex !important;

    flex-direction: column !important;

    gap: 16px !important;

    padding: 0 !important;

    margin: 0 !important;

    overflow: visible !important;

    scroll-snap-type: none !important;

  }

  .blog-list-mobile .blog-card {

    flex-direction: row !important;

    height: auto !important;

    width: 100% !important;

    flex: 0 0 100% !important;

    scroll-snap-align: none !important;

    box-shadow: 0 2px 6px rgba(0,0,0,0.06) !important;

    align-items: stretch;

    background: #fff;

    border: 1px solid #eaeaea;

  }

  .blog-list-mobile .blog-card > a {

    display: flex !important;

    flex-direction: row !important;

    height: auto !important;

    width: 100% !important;

  }

  .blog-list-mobile .blog-img {

    width: 120px !important;

    height: auto !important;

    min-width: 120px !important;

    min-height: 120px !important;

    border-bottom: none !important;

    border-right: 1px solid #f0f0f0 !important;

    border-radius: 12px 0 0 12px !important;

  }

  .blog-list-mobile .blog-content {

    padding: 12px 14px !important;

    display: flex !important;

    flex-direction: column !important;

    justify-content: center !important;

  }

  .blog-list-mobile .blog-content h2.post-title {

    font-size: 15px !important;

    font-weight: 700 !important;

    margin-bottom: 6px !important;

    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;

    line-height: 1.3 !important;

  }

  .blog-list-mobile .blog-content p {

    font-size: 12px !important;

    margin-bottom: 6px !important;

    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;

    line-height: 1.4 !important;

  }

  .blog-list-mobile .blog-date {

    font-size: 11px !important;

    margin-bottom: 6px !important;

  }

  .blog-list-mobile .blog-link {

    font-size: 12px !important;

    margin-top: auto !important;

  }

  /* Oculta os pontos de navegação porque virou lista vertical */

  #blog-grid-container + .carousel-dots {

    display: none !important;

  }

}





/* MAGTEK FORMS & SEARCH B2B */

.magtek-form-container { background: #fff; padding: 40px; border-radius: 8px; box-shadow: 0 5px 20px rgba(0,0,0,0.05); box-sizing: border-box; width: 100%; max-width: 100%; overflow-x: hidden; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.form-group { display: flex; flex-direction: column; }

.form-group.full-width { grid-column: 1 / -1; }

.form-label { font-size: 14px; font-weight: 600; color: var(--text-dark); margin-bottom: 8px; }

.form-input, .form-select, .form-textarea { padding: 12px 15px; border: 1px solid var(--border-light); border-radius: 6px; font-size: 15px; font-family: 'Inter', sans-serif; transition: 0.3s; background-color: var(--bg-light); color: var(--text-dark); width: 100%; box-sizing: border-box; }

.form-textarea { min-height: 120px; resize: vertical; }

.form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: var(--primary); background-color: #fff; box-shadow: 0 0 0 3px rgba(11, 61, 145, 0.1); }

.form-checkbox-group { display: flex; align-items: flex-start; gap: 10px; margin-top: 5px; }

.form-checkbox-group input { margin-top: 4px; }



/* Upload custom style */

.file-upload-wrapper { position: relative; width: 100%; border: 2px dashed var(--border-light); border-radius: 6px; padding: 25px; text-align: center; background-color: var(--bg-topbar); cursor: pointer; transition: 0.3s; box-sizing: border-box; }

.file-upload-wrapper:hover { border-color: var(--primary); background-color: rgba(11,61,145,0.02); }

.file-upload-input { position: absolute; margin: 0; padding: 0; width: 100%; height: 100%; outline: none; opacity: 0; cursor: pointer; top:0; left:0; z-index: 2; }

.file-upload-text { font-size: 14px; color: var(--text-light); font-weight: 600; }



/* Live Search Dropdown */

.search-dropdown { position: absolute; top: calc(100% + 5px); left: 0; width: 100%; background: #fff; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); z-index: 1000; border: 1px solid var(--border-light); display: none; flex-direction: column; overflow: hidden; }

.search-dropdown.active { display: flex; }

.search-dropdown-item { padding: 12px 15px; border-bottom: 1px solid var(--border-light); text-decoration: none; color: var(--text-dark); display: flex; justify-content: space-between; align-items: center; transition: 0.2s; }

.search-dropdown-item:last-child { border-bottom: none; }

.search-dropdown-item:hover { background-color: var(--bg-topbar); }

.sdi-title { font-weight: 500; font-size: 14px; }

.sdi-title strong { color: var(--primary); }

.sdi-category { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--text-light); background: var(--bg-light); padding: 4px 8px; border-radius: 4px; }



@media (max-width: 768px) {

  .form-grid { grid-template-columns: 1fr; }

  .magtek-form-container { padding: 25px 20px; }

}


/* ==========================================================================
   FORMATA��O DE CONTE�DO RICO (Tabelas do Editor, etc)
========================================================================== */
.post-content-formatted table, .seo-text-body table, .custom-admin-table-wrapper table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 14px;
    background-color: #ffffff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border-radius: 8px;
    overflow: hidden;
}

.post-content-formatted th, .seo-text-body th, .custom-admin-table-wrapper th {
    background-color: var(--bg-topbar);
    color: var(--text-dark);
    font-weight: 700;
    text-align: left;
    padding: 15px 20px;
    border-bottom: 2px solid var(--border-light);
}

.post-content-formatted td, .seo-text-body td, .custom-admin-table-wrapper td {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-light);
}

.post-content-formatted tr:last-child td, .seo-text-body tr:last-child td, .custom-admin-table-wrapper tr:last-child td {
    border-bottom: none;
}

.post-content-formatted tr:nth-child(even), .seo-text-body tr:nth-child(even), .custom-admin-table-wrapper tr:nth-child(even) {
    background-color: #fafafa;
}

.post-content-formatted tr:hover, .seo-text-body tr:hover, .custom-admin-table-wrapper tr:hover {
    background-color: #f8fbff;
}

@media (max-width: 768px) {
  .post-content-formatted table, .seo-text-body table, .custom-admin-table-wrapper table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
}

.sb-nav-list {
    display: none;
    flex-direction: column;
    width: 100%;
}
.sb-nav-item.expanded > .sb-nav-list,
.widget-list > .sb-nav-item > .sb-nav-list,
.sb-nav-list.root-list { 
    display: flex; /* Mostra filhos se expandido */
}

.sb-nav-item {
    width: 100%;
}

.sb-nav-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    border-radius: 0 4px 4px 0;
}

.sb-nav-row:hover {
    background-color: var(--bg-topbar);
}

.sb-nav-row.active {
    background-color: #f4f8fc;
    border-left-color: var(--primary);
}

.sb-nav-link {
    flex: 1;
    padding: 10px 15px; /* Será sobrescrito pelo style inline */
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14.5px; /* Reduzido levemente p/ fit na linha */
    font-weight: 500;
    line-height: 1.35;
    display: flex;
    align-items: center;
}

.sb-nav-row:hover .sb-nav-link {
    color: var(--primary);
}

.sb-nav-row.active .sb-nav-link {
    color: var(--primary);
    font-weight: 700;
}

.sb-nav-text {
    flex: 1;
    padding-right: 5px;
}

/* Botão do Caret p/ Acordeão */
.sb-caret-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px 15px 10px 5px; /* Hitbox generoso */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    transition: transform 0.3s;
}

.sb-caret-btn:hover {
    color: var(--primary);
}

.sb-caret {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.6;
    transition: transform 0.2s ease;
}

.sb-nav-row:hover .sb-caret, .sb-nav-row.active .sb-caret {
    opacity: 1;
}

.sb-nav-item.expanded > .sb-nav-row .sb-caret {
    transform: rotate(90deg); /* Faz a setinha apontar pra cima/baixo quando aberto */
}

/* Ajustes de widget */
.category-sidebar .widget-list ul {
    margin-top: 0;
    padding-left: 0;
}

/* ==========================================================================
   FORMATAÇÃO DE VÍDEOS (iFrames) NOS TEXTOS (16:9 Automático e Shorts)
========================================================================== */
.seo-text-body iframe,
.post-content-formatted iframe {
    width: 100% !important;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    height: auto !important;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.seo-text-body iframe.iframe-shorts,
.post-content-formatted iframe.iframe-shorts {
    aspect-ratio: 9 / 16 !important;
    width: 100% !important;
    max-width: 320px !important;
    margin: 20px auto !important;
    display: block;
}

/* SEO RAG Links Styling */
.seo-text-body p a, .seo-text-body li a, .post-content-formatted p a, .post-content-formatted li a {
    color: var(--primary, #0056b3);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 0.2s, text-decoration-color 0.2s;
}
.seo-text-body p a:hover, .seo-text-body li a:hover, .post-content-formatted p a:hover, .post-content-formatted li a:hover {
    color: var(--primary-dark, #004494);
    text-decoration-thickness: 2px;
}
