/*=== VARIÁVEIS OTIMIZADAS ===*/
:root {
  --primary-color: #667eea;
  --secondary-color: #764ba2;
  --accent-color: #ff6b6b;
  --text-dark: #2d3436;
  --text-light: #636e72;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --shadow: 0 2px 10px rgba(0,0,0,0.1);
  --shadow-hover: 0 8px 25px rgba(0,0,0,0.15);
  --radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1400px;
  --header-height: 140px;
}

/*=== RESET E BASE ===*/
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  font-size: 1rem;
}

/* Fundo gradiente fixo otimizado */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #6c63ff 0%, #7c4dff 35%, #9c27b0 70%, #673ab7 100%);
  z-index: -2;
  will-change: transform;
}

/*=== BOLHAS FLUTUANTES OTIMIZADAS ===*/
.floating-shapes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  opacity: 0.6;
}

.shape {
  position: absolute;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  animation: float 25s infinite linear;
  will-change: transform;
}

.shape:nth-child(1) { width: 80px; height: 80px; left: 10%; animation-delay: 0s; }
.shape:nth-child(2) { width: 50px; height: 50px; left: 20%; animation-delay: 3s; }
.shape:nth-child(3) { width: 100px; height: 100px; left: 50%; animation-delay: 6s; }
.shape:nth-child(4) { width: 65px; height: 65px; left: 80%; animation-delay: 9s; }
.shape:nth-child(5) { width: 110px; height: 110px; left: 70%; animation-delay: 12s; }
.shape:nth-child(6) { width: 75px; height: 75px; left: 30%; animation-delay: 15s; }

@keyframes float {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { transform: translateY(-150px) rotate(360deg); opacity: 0; }
}

/* Reduz animações em dispositivos que preferem menos movimento */
@media (prefers-reduced-motion: reduce) {
  .shape {
    animation-duration: 40s;
  }
  
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/*=== HEADER OTIMIZADO ===*/
.main-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  transition: var(--transition);
  z-index: 1000;


}

.header-top {
  padding: 15px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

/*=== LOGO SEÇÃO ===*/
.logo-section {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
}

.logo-section img {
  height: 90px;
  width: auto;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
  animation: logoFloat 4s ease-in-out infinite;
  transition: var(--transition);
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-5px) scale(1.02); }
}

.logo-text h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  line-height: 1.2;
}

.logo-text p {
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  color: var(--text-light);
  margin-top: 2px;
}

/*=== NAVEGAÇÃO TOPO ===*/
.nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

.search-bar {
  position: relative;
  display: flex;
  align-items: center;
}

.search-bar input {
  padding: 12px 45px 12px 20px;
  width: clamp(200px, 25vw, 300px);
  font-size: 0.95rem;
  border: 2px solid rgba(102, 126, 234, 0.2);
  border-radius: 30px;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  color: rgb(0, 0, 0);
}

.search-bar input:focus {
  outline: none;
  border-color: var(--primary-color);
  width: clamp(250px, 30vw, 350px);
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.search-bar button {
  position: absolute;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  transition: var(--transition);
}

.search-bar button:hover {
  transform: scale(1.1);
}

.btn-login {
  padding: 12px 25px;
  border: 2px solid var(--primary-color);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 30px;
  color: var(--primary-color);
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.btn-login:hover {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #fff;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
  transform: translateY(-2px);
}

/*=== MENU MOBILE ===*/
/*=== BOTÃO HAMBÚRGUER ===*/
.mobile-menu-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(102, 126, 234, 0.3);
  cursor: pointer;
  padding: 10px;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 10001;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, 1);
  border-color: var(--primary-color);
}

/* LINHAS DO HAMBÚRGUER */
.hamburger-line {
  display: block !important;
  width: 22px !important;
  height: 3px !important;
  background-color: #2d3436 !important;
  border-radius: 2px !important;
  transition: all 0.3s ease !important;
  transform-origin: center !important;
  position: relative !important;

}

/* Garante espaçamento entre as linhas */
.hamburger-line:nth-child(1) {
  margin-bottom: 4px !important;
}

.hamburger-line:nth-child(2) {
  margin-bottom: 4px !important;
}

.hamburger-line:nth-child(3) {
  margin-bottom: 0 !important;
}

/* ANIMAÇÃO QUANDO MENU ABERTO */
.menu-open .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px) !important;
}

.menu-open .hamburger-line:nth-child(2) {
  opacity: 0 !important;
  transform: scale(0) !important;
}

.menu-open .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px) !important;
}


/*=== MENU PRINCIPAL ===*/
.main-nav {
  background: linear-gradient(135deg, #667eea, #764ba2) !important;
  position: relative;
  overflow: visible; /* Mudança importante aqui */
  z-index: 999;
}

/* Garante que o shimmer continue funcionando */
.main-nav::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: shimmer 3s infinite;
  opacity: 0.5;
  z-index: 1; /* Bem baixo */
}


@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/*=== CORREÇÃO PARA MENU HORIZONTAL ===*/

.nav-menu {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  list-style: none;
  display: flex !important; /* Força ficar horizontal */
  flex-direction: row !important; /* Garante direção horizontal */
  position: relative;
  z-index: 2;
  gap: 5px;
  align-items: center; /* Alinha verticalmente */
}

/* Garante que os itens fiquem lado a lado */
.nav-item {
  position: relative;
  z-index: 1;
  flex-shrink: 0; /* Não permite encolher */
}

/* Para tablets menores, permite wrap se necessário */
@media (max-width: 1024px) {
  .nav-menu {
    flex-wrap: wrap; /* Permite quebrar linha se necessário */
    justify-content: center; /* Centraliza se quebrar */
  }
}


.nav-item:hover,
.nav-item:focus-within {
  z-index: 1003; /* Maior que o main-nav */
}


.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border-radius: 8px;
  margin: 5px 2px;
  font-size: 0.95rem;
}

.nav-link:hover,
.nav-link:focus {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  outline: none;
}

.nav-icon {
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
}

.arrow {
  font-size: 0.75rem;
  margin-left: auto;
  transition: var(--transition);
}

.dropdown-parent:hover .arrow {
  transform: rotate(180deg);
}

/*=== DROPDOWNS ===*/
.dropdown {
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 280px;
  padding: 15px 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  border-radius: 15px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 1004 !important; /* Força aparecer na frente */
}

/* Mostra o dropdown no hover */
.dropdown-parent:hover .dropdown,
.dropdown-parent:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  z-index: 1004 !important; /* Confirma que fica na frente */
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 25px;
  color: var(--text-dark);
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.95rem;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: rgba(102, 126, 234, 0.1);
  color: var(--primary-color);
  outline: none;
}

.dropdown-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border-radius: 8px;
  font-size: 1rem;
  flex-shrink: 0;
}

/*=== HERO SEÇÃO ===*/
.hero-section {
  background: transparent;
  padding: clamp(25px, 5vw, 40px) 20px clamp(20px, 4vw, 35px);
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: clamp(2rem, 6vw, 3rem);
  margin-bottom: clamp(10px, 1vw, 10px);
  animation: fadeInUp 0.8s ease-out;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  font-weight: 800;
  line-height: 1.2;

}

.hero-subtitle {
  font-size: clamp(1rem, 3vw, 1.2rem);
  margin-bottom: clamp(20px, 4vw, 30px);
  opacity: 0.95;
  animation: fadeInUp 0.8s 0.2s both;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: clamp(20px, 5vw, 40px);
  margin-top: clamp(25px, 5vw, 35px);
  animation: fadeInUp 0.8s 0.4s both;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  min-width: 120px;
}

.stat-number {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  display: block;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  line-height: 1.2;
}

.stat-label {
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  opacity: 0.9;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
  margin-top: 5px;
}

/*=== CONTAINER PRINCIPAL ===*/
.main-container {
  max-width: var(--max-width);
  margin: 1px auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

.section {
  margin-bottom: clamp(40px, 8vw, 60px);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  gap: 20px;
  flex-wrap: wrap;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: white;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  flex: 1;
  min-width: 250px;
}

.section-icon {
  width: clamp(40px, 8vw, 50px);
  height: clamp(40px, 8vw, 50px);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
  backdrop-filter: blur(10px);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.feature-badge {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
  color: white;
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  white-space: nowrap;
}

/*=== ACESSO RÁPIDO ===*/
.quick-access {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  border-radius: 25px;
  padding: clamp(30px, 6vw, 40px);
  margin-bottom: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.section-heading {
  text-align: center;
  margin-bottom: 30px;
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--text-dark);
  font-weight: 700;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: clamp(15px, 3vw, 25px);
  max-width: 800px;
  margin: 0 auto;
}

.quick-item {
  padding: clamp(20px, 4vw, 25px) 15px;
  border-radius: 18px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: transparent;
  border: none;
  font-family: inherit;
}

.quick-item:hover,
.quick-item:focus {
  background: rgba(102, 126, 234, 0.1);
  transform: translateY(-5px);
  outline: none;
}

.quick-icon {
  width: clamp(60px, 12vw, 70px);
  height: clamp(60px, 12vw, 70px);
  margin: 0 auto 15px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: clamp(1.5rem, 3vw, 1.8rem);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
  transition: var(--transition);
}

.quick-item:hover .quick-icon {
  transform: scale(1.1);
}

.quick-label {
  font-size: clamp(0.9rem, 2vw, 1rem);
  font-weight: 600;
  color: var(--text-dark);
}

/*=== GRID DE CARDS ===*/
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: clamp(20px, 4vw, 30px);
}

.tool-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
}

.tool-card:hover,
.tool-card:focus {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 1);
  outline: none;
}

.card-image {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: var(--bg-light);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.tool-card:hover .card-image img {
  transform: scale(1.1);
}

.card-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #28a745;      /* Popular */
  color: #fff;
  padding: 0.15rem 0.45rem; /* menor */
  border-radius: 999px;
  font-size: .65rem;        /* menor */
  font-weight: 700;
  line-height: 1;
  letter-spacing: .02em;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.card-content {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: var(--text-dark);
  font-weight: 600;
  line-height: 1.3;
}

.card-description {
  color: var(--text-light);
  font-size: 1rem;
  flex: 1;
  margin-bottom: 20px;
  line-height: 1.6;
}

/*=== KARAOKÊ CARD ===*/
.special-section {
  margin-bottom: 60px;
}

.karaoke-card {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 25px;
  padding: clamp(25px, 5vw, 40px);
  box-shadow: 0 8px 40px rgba(102, 126, 234, 0.15);
  color: #2d3436;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(15px);
}

.karaoke-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.karaoke-icon {
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  background: rgba(102, 126, 234, 0.15);
  width: clamp(70px, 15vw, 90px);
  height: clamp(70px, 15vw, 90px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3b4cca;
  backdrop-filter: blur(8px);
  flex-shrink: 0;
}

.karaoke-text {
  flex: 1;
  font-weight: 700;
  text-align: left;
  min-width: 250px;
}

.karaoke-text h3 {
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  margin-bottom: 10px;
  color: #2d3436;
  line-height: 1.3;
}

.karaoke-text p {
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  opacity: 0.85;
  line-height: 1.5;
  color: #2d3436;
  font-weight: 400;
}

.btn-karaoke {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-radius: 25px;
  padding: 12px 30px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
  transition: var(--transition);
  border: none;
  white-space: nowrap;
  font-size: 0.95rem;
  min-width: 140px;
}

.btn-karaoke:hover,
.btn-karaoke:focus {
  background: linear-gradient(135deg, #5a67d8, #6b46c1);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
  outline: none;
}

/*=== ANIMAÇÕES ===*/
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/*=== UTILIDADES ===*/
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/*=== RESPONSIVIDADE ===*/
/* ===== MOBILE E TABLET UNIFICADOS (até 1024px) ===== */
@media (max-width: 1024px) {
  .mobile-menu-toggle {
    display: flex !important;
    z-index: 1000 !important;
  }
  
  .mobile-menu-toggle .hamburger-line {
    background: #2d3436 !important;
  }

  .nav-actions {
    display: none !important;
  }
  
  .main-nav {
    display: none !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(15px) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
    z-index: 1000 !important;
  }
  
  .menu-open .main-nav {
    display: block !important;
  }
  
  .nav-menu {
    flex-direction: column !important;
    padding: 20px !important;
    gap: 0 !important;
    align-items: stretch !important;
  }
  
  .nav-link {
    color: var(--text-dark) !important;
    padding: 15px 0 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
    margin: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
  }
  
  .nav-link:hover {
    background: rgba(102, 126, 234, 0.1) !important;
    transform: none !important;
    color: var(--primary-color) !important;
  }
  
  .nav-icon {
    color: var(--text-dark) !important;
  }
  
  .arrow {
    color: var(--text-dark) !important;
  }
  
  /* DROPDOWNS - FORÇA COMPORTAMENTO MOBILE */
  .dropdown {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    box-shadow: none !important;
    background: rgba(102, 126, 234, 0.05) !important;
    margin: 10px 0 !important;
    border-radius: 10px !important;
    display: none !important;
    z-index: auto !important;
  }
  
  /* BLOQUEIA QUALQUER HOVER/FOCUS */
  .dropdown-parent:hover .dropdown,
  .dropdown-parent:focus-within .dropdown {
    display: none !important;
  }
  
  /* SÓ JAVASCRIPT CONTROLA */
  .dropdown-parent.mobile-open .dropdown {
    display: block !important;
  }
  
  .nav-item:hover,
  .nav-item:focus-within {
    z-index: auto !important;
  }

  .logo-section img {
    height: 70px;
  }
  
  .cards-grid {
    grid-template-columns: 1fr;
  }
  
  .quick-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .section-header {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }
  
  .feature-badge {
    align-self: flex-start;
  }
  
  .karaoke-content {
    flex-direction: column;
    text-align: center;
    gap: 25px;
  }
  
  .karaoke-text {
    text-align: center;
    min-width: auto;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 20px;
    align-items: center;
  }
  
  .stat-item {
    min-width: auto;
  }
  
  .main-container {
    margin-top: 15px;
  }
}

/* Mobile pequeno */
@media (max-width: 480px) {
  .header-container {
    padding: 0 10px;
  }
  
  .main-container {
    padding: 0 10px;
  }
  
  .quick-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .quick-access {
    padding: 20px 15px;
  }
  
  .karaoke-card {
    padding: 20px;
  }
  
  .logo-section {
    gap: 10px;
  }
  
  .logo-section img {
    height: 60px;
  }
}



/* Alto contraste */
@media (prefers-contrast: high) {
  .tool-card {
    border: 2px solid rgba(0, 0, 0, 0.2);
  }
  
  .btn-login,
  .btn-karaoke {
    border: 2px solid currentColor;
  }
}

/* Print styles */
@media print {
  .floating-shapes,
  .mobile-menu-toggle,
  .search-bar {
    display: none;
  }
  
  .main-header {
    position: static;
    box-shadow: none;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .hero-section,
  .section-title {
    color: black;
  }
}

/* Isola o header e evita que efeitos por trás interfiram */
.main-header { isolation: isolate; }

/* Botão sempre no topo e com fundo sólido p/ contraste */
.mobile-menu-toggle {
  position: relative;
  z-index: 10010;            /* acima de nav/shimmer */
  background: #fff;          /* sólido no mobile */
  overflow: visible;         /* garante que nada seja cortado */
}

/* Desenha as 3 linhas como background do próprio botão (fallback robusto) */
.mobile-menu-toggle::before {
  content: "";
  display: block;
  width: 22px;
  height: 18px;              /* espaço para 3 linhas */
  /* 3 faixas (topo, meio, baixo) */
  background:
    linear-gradient(#2d3436 0 0) 0 0/22px 3px no-repeat,
    linear-gradient(#2d3436 0 0) 0 50%/22px 3px no-repeat,
    linear-gradient(#2d3436 0 0) 0 100%/22px 3px no-repeat;
  margin: 0 auto;            /* centraliza no botão */
}

/* Garante que o shimmer da nav não cubra nada nem pegue clique */
.main-nav::before { pointer-events: none; }

/* Modo aberto: anima o "X" usando transform só no pseudo (sem spans) */
.menu-open .mobile-menu-toggle::before {
  background:
    linear-gradient(#2d3436 0 0) 0 50%/22px 3px no-repeat;
  transform: rotate(45deg);
}
.menu-open .mobile-menu-toggle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 3px;
  background: #2d3436;
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* (Opcional) esconde os spans antigos para não interferirem */
.mobile-menu-toggle .hamburger-line { display: none !important; }



/*=== FILTROS DA PÁGINA INICIAL ===*/

/* Seção de Filtros */
.filters-section {
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  border: 1px solid #e9ecef;
}

/* Header dos Filtros */
.filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.results-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

#results-count {
  font-weight: 600;
  color: #495057;
  font-size: 0.95rem;
}

.logic-toggle {
  display: flex;
  gap: 0.5rem;
}

.toggle-switch {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: #6c757d;
}

.toggle-switch input[type="radio"]:checked + span {
  color: #007bff;
  font-weight: 600;
}

.filters-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.sort-select {
  padding: 0.5rem 1rem;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  background: white;
  font-size: 0.9rem;
}

.clear-btn, .reset-btn {
  background: #7c3aed;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.clear-btn:hover, .reset-btn:hover {
  background: #5a6268;
  transform: translateY(-1px);
}

/* Busca */
.search-container {
  margin-bottom: 1.5rem;
}

.search-wrapper {
  position: relative;
  max-width: 500px;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.search-input:focus {
  border-color: #007bff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Autocomplete */
.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #dee2e6;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.autocomplete-item {
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid #f8f9fa;
  font-size: 0.9rem;
}

.autocomplete-item:hover, .autocomplete-item.selected {
  background: #f8f9fa;
}

.autocomplete-item strong {
  color: #007bff;
}

/* Grid de Filtros */
.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.filter-group h4 {
  margin: 0 0 0.75rem 0;
  color: #343a40;
  font-size: 1rem;
  font-weight: 600;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 20px;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.85rem;
}

.chip input {
  display: none;
}

.chip:hover {
  border-color: #007bff;
  transform: translateY(-1px);
}

.chip input:checked + span {
  color: white;
}

.chip:has(input:checked) {
  background: #007bff;
  border-color: #007bff;
}



.range-filter {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.range-filter label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.range-filter select {
  padding: 0.4rem;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  background: white;
}

/* Cards Grid Existente - Apenas Ajustes */
.cards-grid .tool-card {
  transition: all 0.3s ease;
  position: relative;
}

.tool-card:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

/* Badges nos Cards */
.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #28a745;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
}

.card-badge.new {
  background: #0dcaf0;   
}
/* Tags nos Cards */
.card-tags {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}


.card-tag {
  background: #e9ecef;
  color: #495057;
  padding: 0.15rem 0.4rem;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 500;
}

.card-tag.materia { background: #e3f2fd; color: #1565c0; }
.card-tag.serie { background: #f3e5f5; color: #7b1fa2; }
.card-tag.tipo { background: #e8f5e8; color: #2e7d32; }
.card-tag.dificuldade { background: #fff3e0; color: #ef6c00; }

/* Highlight de Busca */
mark {
  background: #fff3cd;
  padding: 0.1rem 0.2rem;
  border-radius: 3px;
  font-weight: 600;
}

/* Estado Vazio */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #6c757d;
}

.empty-content svg {
  opacity: 0.3;
  margin-bottom: 1rem;
}

.empty-content h3 {
  margin: 0 0 0.5rem 0;
  color: #495057;
}

.empty-content p {
  margin: 0 0 1.5rem 0;
  font-size: 0.95rem;
}

/* Utilitários */
.hidden {
  display: none !important;
}
/* === Desktop/Notebook: 4 colunas fluidas que NUNCA estouram o container === */
@media (min-width: 1100px) {
  .filters-grid{
    /* 1ª coluna 1.7x maior, restantes iguais */
    grid-template-columns: 2.1fr 1fr 1fr 1fr;
    column-gap: 1 rem;
    row-gap: 1.5rem;
    align-items: start;
  }

  .range-filter{
    display:grid;
    grid-template-columns:auto minmax(140px,1fr) auto minmax(140px,1fr);
    gap:.75rem 1rem;
    align-items:center;
  }

  .range-filter select {
    min-width: 180px;   /* pode reduzir para 130 se precisar caber mais */
    max-width: 200px;   /* evita alongar demais */
  }

  /* chips podem quebrar linha dentro da coluna sem estourar */
  .filter-chips {
    flex-wrap: wrap;
    gap: .6rem;
  }
}

/* Ultra-wide: um pouco mais de respiro, mas ainda em 1 linha */
@media (min-width: 1600px) {
  .filters-grid { column-gap: 2.5rem; row-gap: 2rem; }
}

/* Responsividade */
@media (max-width: 768px) {
  .filters-section {
    padding: 1.5rem 1rem;
  }
  
  .filters-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .filters-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .filter-chips {
    gap: 0.3rem;
  }
  
  .chip {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
  }
  
  .range-filter {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .search-wrapper {
    max-width: 100%;
  }
  
  .results-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* ====== SEPARAÇÃO ENTRE SEÇÕES ====== */
.filters-section {
  margin-bottom: 3rem; /* mais respiro abaixo dos filtros */
  
}



/* ====== GRID DE CARDS PADRONIZADO ====== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;                     /* espaço entre cards */
  align-items: stretch;          /* alturas consistentes */
  margin-top: 2rem;
}

/* ====== CARD COM ALTURA CONSISTENTE ====== */
.tool-card {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  overflow: hidden;
  display: flex;                 /* para igualar alturas */
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}

.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}

/* Imagem com proporção fixa */
.tool-card > img {
  width: 100%;
  aspect-ratio: 16 / 9;          /* padroniza altura da imagem */
  object-fit: cover;             /* corta/ajusta mantendo imagem cheia */
  display: block;
}

/* Conteúdo flexível e “trancado” */
.tool-card .card-content {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: .9rem 1rem;
  flex: 1;                       /* ocupa o restante do card */
}

/* Título e texto com line-clamp pra evitar alturas malucas */
/* ===== Clamp com padrão + webkit (recomendado) ===== */
.tool-card h3,
.tool-card p {
  display: -webkit-box;          /* necessário pro clamp no webkit */
  -webkit-box-orient: vertical;  /* idem */
  overflow: hidden;
  text-overflow: ellipsis;
}

.tool-card h3 {
  line-clamp: 2;                 /* padrão */
  -webkit-line-clamp: 2;         /* compatibilidade */
}

.tool-card p {
  line-clamp: 3;                 /* padrão */
  -webkit-line-clamp: 3;         /* compatibilidade */
}

/* ===== Fallback (quando line-clamp não for suportado) ===== */
@supports not (line-clamp: 2) {
  .tool-card h3 {
    /* 2 linhas x line-height do h3 */
    max-height: calc(1.3em * 2);
  }
  .tool-card p {
    /* 3 linhas x line-height do p */
    max-height: calc(1.4em * 3);
  }
}


/* Tags empurradas pro rodapé do card */
.card-tags {
  margin-top: auto;              /* joga as tags pro final do conteúdo */
}

/* Badge acima da imagem continua ok */
.card-badge { top: 10px; right: 10px; }

/* ====== RESPONSIVIDADE ====== */
@media (max-width: 1200px) {
  .cards-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

@media (max-width: 992px) {
  .cards-section { padding: 1rem; }
  .cards-grid { gap: .9rem; }
}

@media (max-width: 768px) {
  .cards-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}

@media (max-width: 560px) {
  .cards-grid { grid-template-columns: 1fr; } /* 1 por linha no mobile menor */
}

/* Acessibilidade: reduz animação pra quem prefere menos movimento */
@media (prefers-reduced-motion: reduce) {
  .tool-card { transition: none; }
  .tool-card:hover { transform: none; box-shadow: none; }
}

/* Descrição SEM clamp/fade */
.tool-card .desc {
  display: block;
  overflow: visible;
  text-overflow: initial;
  max-height: none;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  -webkit-box-orient: initial;
}

/* Remove qualquer gradiente/fade */
.tool-card .desc.fade::after { display: none !important; }

/* Some com a área do botão, se existir */
.card-actions { display: none !important; }

/* (opcional) manter o título com 2 linhas para não estourar o card */
.tool-card h3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}


/* Estilos para os codigos da BNCC */
/* Chips BNCC */
.bncc-list {
  margin-top: .5rem;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.bncc-chip {
  padding: .2rem .55rem;
  border-radius: 999px;
  border: 1px solid #bbdefb;
  background: #e3f2fd;
  color: #1565c0;
  font-size: .75rem;
  font-weight: 600;
  cursor: pointer;
}
.bncc-chip:hover { background: #d6ecff; }

/* Modal BNCC */
.bncc-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.bncc-modal-backdrop.show { display: flex; }

.bncc-modal {
  width: calc(100% - 2rem);
  max-width: 560px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e9ecef;
  box-shadow: 0 12px 30px rgba(0,0,0,.12);
  padding: 1rem 1.25rem 1.25rem;
  position: relative;
}
.bncc-modal h4 {
  margin: 0 0 .5rem 0;
  font-size: 1.05rem;
}
.bncc-modal .bncc-code {
  font-weight: 700;
  color: #0d6efd;
}
.bncc-modal .bncc-desc {
  margin: 0;
  color: #495057;
  line-height: 1.5;
}
.bncc-close {
  position: absolute;
  top: .5rem; right: .5rem;
  border: 0;
  background: #f1f3f5;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.bncc-close:hover { background: #e9ecef; }


/*Estilos para o titulo  antes dos cards*/
/* Título acima dos cards */
.cards-intro {
  text-align: center;
  margin-top: 1.5rem;
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
}

.cards-intro h2 {
  margin: 0;
  font-weight: 800;
  line-height: 1.2;
  /* escala bem do mobile ao desktop */
  font-size: clamp(2rem, 4vw, 3rem);
  color: #2b3035;
}

/* Se quiser mais respiro entre filtros e cards, aumente aqui: */
.filters-section {
  margin-bottom: clamp(2.5rem, 6vw, 5rem);
}

/* opcional: subtítulo menor */
.cards-subtitle {
  margin: .35rem 0 0;
  color: #6c757d;
  font-size: .95rem;
}


/* Tablet */
@media (max-width: 1024px) {
  .cards-intro { 
    margin-bottom: .75rem;   /* menos espaço abaixo do título */
    text-align: center;
  }
  .cards-section {
    padding-top: .25rem;     /* encosta um pouco mais os cards no título */
    margin-top: 0;
  }
    .filters-section {
    margin-top: -20px; 
}
}

/* Mobile */
@media (max-width: 768px) {
  .cards-intro { 
    margin-top: 6px;
    margin-bottom: .5rem;    /* ainda mais perto no mobile */
  }
  .cards-section {
    padding-top: 0.35;          /* cola de vez no título */
  }
  .cards-section .cards-grid {
    margin-top: 0;
  }
  .filters-section {
    margin-top: -20px; 
  }

}


/* ===== Mobile/Tablet filtros como accordion ===== */
/* Esconde o toggle no desktop por padrão */
.filters-mobile-toggle { display: none; }

/* ===== Mobile/Tablet ===== */
@media (max-width: 1024px) {
  .filters-section {
    background: transparent;
    border: 0;
    padding: 1rem 0 .5rem;
    margin-bottom: .75rem;
  }

  .filters-mobile-toggle {
    display: block;
    position: sticky;
    top: 64px;             /* ajuste conforme seu header */
    z-index: 20;
    margin-bottom: .5rem;
  }

  .btn-filters {
    width: 100%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: .5rem;
    padding: .55rem .9rem;
    border-radius: 999px;
    border: 1px solid #dee2e6;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    font-weight: 700;
    line-height: 1.1;
  }
  .btn-filters .badge {
    font-size: .75rem;
    background: #0d6efd;
    color: #fff;
    padding: .1rem .45rem;
    border-radius: 999px;
  }
  /* foco acessível sem “borda amarela enorme” */
  .btn-filters:focus-visible {
    outline: 3px solid #0d6efd;
    outline-offset: 2px;
    box-shadow: none;
  }

  /* Painel recolhível: card branco bonito */
  .filters-content.is-collapsed { display: none; }
  .filters-content {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 16px rgba(0,0,0,.04);
    margin-bottom: .75rem;
  }

  /* compactar itens dentro do painel */
  .filters-grid { grid-template-columns: 1fr; gap: 1rem; }
  .filter-chips { gap: .4rem; }
  .chip { font-size: .85rem; padding: .35rem .7rem; }
  .range-filter { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }

  /* aproximar título e cards */
  .cards-intro { margin-bottom: .5rem; text-align: center; }
  .cards-section { padding-top: 0; }
}


/*Ajustes para os filtros em telas menores celular/tablet */
/* ===== Mobile/Tablet refinado ===== */
@media (max-width: 1024px) {
  /* seção vira um cartão leve p/ facilitar leitura sobre o gradiente */
  .filters-section {
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(6px);
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: .75rem;
    box-shadow: 0 6px 18px rgba(0,0,0,.06);
  }

  /* header dos filtros em grid elegante */
  .filters-header {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: .75rem 1rem;
  }
  /* em telas menores: tudo em uma coluna */
  @media (max-width: 768px) {
    .filters-header { grid-template-columns: 1fr; }
  }

  /* contador + lógica alinhados */
  .results-info {
    display: flex;
    align-items: center;
    gap: .5rem .75rem;
    flex-wrap: wrap;
  }

  /* segmented control para E/OU */
  .logic-toggle {
    display: inline-flex;
    border: 1px solid #dee2e6;
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
  }
  .logic-toggle .toggle-switch { margin: 0; }
  .logic-toggle input { display: none; }
  .logic-toggle .toggle-switch span {
    display: inline-block;
    padding: .4rem .75rem;
    font-size: .9rem;
    line-height: 1;
    color: #495057;
  }
  .logic-toggle input:checked + span {
    background: #0d6efd;
    color: #fff;
    font-weight: 700;
  }

  /* select + botão alinhados, mesma altura */
  .filters-actions {
    display: inline-flex;
    gap: .5rem;
    justify-self: end;
  }
  .sort-select,
  .clear-btn {
    height: 38px;
    padding: 0 .9rem;
    border-radius: 8px;
  }
  /* em telas bem pequenas: ocupam 100% */
  @media (max-width: 768px) {
    .filters-actions {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: .5rem;
      width: 100%;
      justify-self: stretch;
    }
    .sort-select, .clear-btn { width: 100%; }
  }

  /* busca full-width com toque confortável */
  .search-wrapper { max-width: none; }
  .search-input {
    height: 42px;
    font-size: 1rem;
  }

  /* botão “Filtros (N)” já existente — visual discreto */
  .filters-mobile-toggle {
    display: block;
    position: sticky;
    top: 64px;
    z-index: 20;
    margin: .5rem 0;
  }
  .btn-filters {
    width: 100%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: .5rem;
    padding: .55rem .9rem;
    border-radius: 999px;
    border: 1px solid #dee2e6;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    font-weight: 700;
    line-height: 1.1;
  }
  .btn-filters .badge {
    font-size: .75rem;
    background: #0d6efd;
    color: #fff;
    padding: .1rem .45rem;
    border-radius: 999px;
  }
  .btn-filters:focus-visible {
    outline: 3px solid #0d6efd;
    outline-offset: 2px;
    box-shadow: none;
  }

  /* painel recolhível como cartão */
  .filters-content.is-collapsed { display: none; }
  .filters-content {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 16px rgba(0,0,0,.04);
    margin-bottom: .75rem;
  }

  /* grid de chips mais “arrumadinho” */
  .filters-grid { grid-template-columns: 1fr; gap: 1rem; }
  .filter-chips {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: .5rem;
  }
  .chip { 
    justify-content: center;
    font-size: .9rem; 
    padding: .4rem .6rem; 
  }

  /* selects “De/Até” bem alinhados */
  .range-filter {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
  }
  .range-filter select {
    width: 100%;
    height: 38px;
    border-radius: 8px;
  }

  /* respiro entre título e cards */
  .cards-intro { margin-bottom: .5rem; text-align: center; }
  .cards-section { padding-top: 0; }
}
/* Paleta do tema (ajuste se já tiver essas vars) */
:root{
  --brand: var(--primary-color, #7c3aed);      /* roxo principal */
  --brand-2: var(--primary-color-2, #8b5cf6);  /* roxo secundário */
}

/* Container do toggle */
.logic-toggle{
  display:inline-flex;
  align-items:center;
  gap:0;
  padding:2px;
  border:1px solid #e2e8f0;
  border-radius:999px;
  background:#f8fafc; /* cinza bem claro p/ contraste */
}

/* Botões (labels) */
.logic-toggle .toggle-switch{
  margin:0;
}
.logic-toggle .toggle-switch span{
  display:inline-block;
  padding:.42rem .8rem;
  line-height:1;
  border-radius:999px;
  color:#475569;              /* texto inativo */
  background:transparent;
  transition:background .2s,color .2s, box-shadow .2s;
  user-select:none;
}

/* Estado selecionado → roxinho */
.logic-toggle input[type="radio"]{ display:none; }
.logic-toggle input[type="radio"]:checked + span{
  color:#fff;
  /* use 1 das opções abaixo */

  /* 1) Roxo sólido */
  background: var(--brand);

  /* 2) (opcional) Degradê do seu herói
     background: linear-gradient(135deg, var(--brand), var(--brand-2)); */
  box-shadow: 0 1px 0 rgba(0,0,0,.04) inset, 0 0 0 2px rgba(124,58,237,.12);
  font-weight:700;
}

/* Acessibilidade no foco do label */
.logic-toggle .toggle-switch span:focus-visible{
  outline: 3px solid rgba(124,58,237,.35); /* roxo */
  outline-offset: 2px;
}
#toggle-filters[aria-expanded="true"] .label::after {
  content: " ▲";
}
#toggle-filters[aria-expanded="false"] .label::after {
  content: " ▼";
}

/* Visualização do item ativo no menu de dropdown */
.main-header .dropdown .dropdown-item.active {
  font-weight: 700;
  color: var(--primary-color, #7c3aed);
}
