/* ========================================
   JURIMETRIA - PÁGINA ESPECÍFICA
======================================== */

.hero-jurimetria {
    position: relative;
    height: 40vh;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Overlay com gradiente mais suave para destacar o texto */
    background: linear-gradient(135deg, 
        rgba(0, 109, 119, 0.85), 
        rgba(0, 109, 119, 0.7),
        rgba(52, 58, 64, 0.6)), 
                /* Nova imagem: dados e tecnologia jurídica */
                url('https://images.unsplash.com/photo-1551288049-bebda4e38f71?w=1920&auto=format&fit=crop&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    margin-top: 80px;
}

/* Para garantir contraste perfeito do texto */
.hero-jurimetria .hero-title {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.hero-jurimetria .hero-subtitle {
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

/* Ajuste no conteúdo do hero para garantir contraste */
.hero-jurimetria .hero-content {
    text-align: center;
    color: #ffffff;
    padding: 0 20px;
    z-index: 1;
    max-width: 800px;
}

.hero-jurimetria .hero-title {
    font-family: var(--font-serif, 'Playfair Display', serif);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-jurimetria .hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    line-height: 1.6;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Main content */
.jurimetria-main {
    padding: 4rem 0 2rem;
    max-width: 900px;
    margin: 0 auto;
    background: var(--light-gray, #f8f9fa); /* Fundo claro para destacar o conteúdo */
}

/* Tabs - Padronizadas com a cor primária */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: var(--primary-color, #006d77);
    padding: 0.5rem;
    border-radius: 12px; /* Bordas arredondadas no container */
    box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,0.1));
}

.tab-btn {
    flex: 1;
    padding: 0.9rem 1rem;
    border: none;
    border-radius: 8px; /* Arredondamento nos botões */
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition, all 0.3s ease);
    text-align: center;
    white-space: nowrap;
}

.tab-btn i {
    margin-right: 8px;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.tab-btn.active {
    background: #ffffff;
    color: var(--primary-color, #006d77);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Conteúdo das abas */
.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

/* Seções de Upload e Busca */
.upload-section,
.search-section {
    background: var(--white, #ffffff);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md, 0 4px 16px rgba(0,0,0,0.1));
    margin-bottom: 2rem;
    border: 1px solid rgba(0,0,0,0.05);
}

.upload-section h2,
.search-section h2 {
    font-family: var(--font-serif, 'Playfair Display', serif);
    font-size: 1.75rem;
    color: var(--text-dark, #2c3e50);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.upload-section p,
.search-section p {
    color: var(--text-light, #6c757d);
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Formulário de Upload */
#upload-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
}

#documento-upload {
    width: 100%;
    padding: 1rem;
    border: 2px dashed var(--primary-color, #006d77);
    border-radius: 8px;
    background: var(--light-gray, #f8f9fa);
    cursor: pointer;
    font-family: var(--font-sans, 'Inter', sans-serif);
    font-size: 0.95rem;
    transition: var(--transition, all 0.3s ease);
}

#documento-upload:hover {
    border-color: var(--secondary-color, #8a9a5b);
    background: #e9f2f2; /* Tom mais claro do primary */
}

/* Estilo para o botão de análise - Usando a classe .btn do style.css */
#upload-form .btn-primary {
    background: var(--primary-color, #006d77);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: var(--transition, all 0.3s ease);
    font-weight: 600;
}

#upload-form .btn-primary:hover {
    background: var(--secondary-color, #8a9a5b);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md, 0 4px 16px rgba(0,0,0,0.15));
}

#upload-form .btn-primary i {
    font-size: 1.2rem;
}

/* Área de Resultado da Análise */
.analise-resultado {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 10px;
    background: #f0f9ff; /* Tom claro para destaque */
    border-left: 4px solid var(--primary-color, #006d77);
    max-width: 800px;
    margin: 2rem auto 0;
    box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,0.05));
}

.analise-resultado h3 {
    font-family: var(--font-serif, 'Playfair Display', serif);
    color: var(--text-dark, #2c3e50);
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* Classes de probabilidade */
.alta { 
    color: #2e7d32; 
    font-weight: 700; 
    background: rgba(46, 125, 50, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.moderada { 
    color: #f57f17; 
    font-weight: 700;
    background: rgba(245, 127, 23, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.baixa { 
    color: #d32f2f; 
    font-weight: 700;
    background: rgba(211, 47, 47, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

/* Ajustes para o Google Custom Search */
.gcse-search {
    width: 100%;
    margin-top: 1rem;
}

.gsc-control-cse {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
}

/* Animação */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   RESPONSIVIDADE
======================================== */
@media (max-width: 992px) {
    .hero-jurimetria {
        margin-top: 70px; /* Ajuste fino para telas médias */
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    .hero-jurimetria {
        height: 50vh;
        min-height: 280px;
        background-attachment: scroll; /* Remove parallax em mobile para performance */
    }

    .hero-jurimetria .hero-title {
        font-size: 1.8rem;
    }

    .hero-jurimetria .hero-subtitle {
        font-size: 1rem;
    }

    .tabs {
        flex-direction: column;
        gap: 0.25rem;
    }

    .tab-btn {
        white-space: normal;
        text-align: left;
        padding: 0.8rem 1rem;
    }

    .upload-section,
    .search-section {
        padding: 1.5rem;
        margin: 0 1rem 2rem;
    }

    .upload-section h2,
    .search-section h2 {
        font-size: 1.5rem;
    }

    #upload-form {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-jurimetria .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-jurimetria .hero-subtitle {
        font-size: 0.95rem;
    }
}
/* ========================================
   CTA SECTION
======================================== */

.cta-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--primary-color), var(--dark-gray));
    text-align: center;
}

.cta-content h2 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: var(--white);
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 2rem;
}

.cta-content .btn {
    background: var(--white);
    color: var(--primary-color);
}

.cta-content .btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}
/* ========================================
   FOOTER
======================================== */

.footer {
    background: var(--dark-gray);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-col h3,
.footer-col h4 {
    font-family: var(--font-serif);
    margin-bottom: 1.5rem;
    color: var(--white);
}

.footer-col p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 1.5rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--white);
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.contact-info li span {
    text-align: justify;
    line-height: 1.6;
}

.contact-info i {
    color: var(--primary-color);
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
}

/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 1200px) {
    .tool-wrapper {
        grid-template-columns: 350px 1fr;
    }
    
    .nav-list {
        gap: 1rem;
    }
    
    .contact-buttons {
        gap: 0.5rem;
        margin-left: 0.75rem;
    }
    
    .btn-contact {
        min-width: 100px;
        padding: 0.4rem 0.6rem;
    }
}

/* ========================================
   CORREÇÃO CRÍTICA DO MENU MOBILE - JURIMETRIA
======================================== */
@media (max-width: 992px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    /* ✅ MENU MOBILE - ESTADO INICIAL FECHADO */
    .nav {
        position: fixed;
        top: 80px;
        left: -100%; /* Fechado por padrão */
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--white, #ffffff);
        flex-direction: column;
        padding: 2rem;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: var(--shadow-md, 0 4px 16px rgba(0,0,0,0.1));
        overflow-y: auto;
        z-index: 999;
    }
    
    /* Garante que o menu aparece mesmo se o JS falhar */
.nav {
    display: flex !important; /* Força visibilidade */
}

@media (max-width: 992px) {
    .nav {
        display: none !important; /* Esconde em mobile até JS ativar */
    }
    
    .nav.active {
        display: flex !important; /* Mostra quando ativo */
    }
    
    /* Loading indicator */
    .js-loading .jurimetria-main {
        opacity: 0.5;
        pointer-events: none;
        position: relative;
    }
    
    .js-loading .jurimetria-main::after {
        content: "Carregando recursos...";
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: white;
        padding: 1rem;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        z-index: 1000;
    }
}
    /* ✅ MENU ABERTO - FORÇADO */
    .nav.active {
        left: 0 !important;
        display: flex !important;
    }
    
    /* ✅ BODY COM MENU ABERTO */
    body.menu-open {
        overflow: hidden !important;
        height: 100vh !important;
        position: relative;
    }
    
    /* Lista de navegação */
    .nav-list {
        flex-direction: column;
        width: 100%;
        gap: 1.5rem;
    }
    
    .nav-link {
        font-size: 1.1rem;
        padding: 1rem 0;
        border-bottom: 1px solid var(--light-gray, #f8f9fa);
    }
    
    /* ✅ DROPDOWN - ESTADO FECHADO */
    .dropdown-menu {
        position: static;
        box-shadow: none;
        transform: none;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        padding-left: 1rem;
        max-height: 0;
        overflow: hidden;
        transition: all 0.3s ease;
        background: transparent;
    }
    
    /* ✅ DROPDOWN ABERTO */
    .nav-dropdown.active .dropdown-menu {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        max-height: 500px !important;
    }
    
    /* ✅ ÍCONE DO DROPDOWN */
    .nav-dropdown .dropdown-icon {
        transition: transform 0.3s ease;
    }
    
    .nav-dropdown.active .dropdown-icon {
        transform: rotate(180deg);
    }
    
    /* WhatsApp no menu */
    .nav-whatsapp {
        margin-top: auto;
        padding-top: 2rem;
        border-top: 1px solid var(--light-gray, #f8f9fa);
    }
    
    .contact-buttons {
        flex-direction: column;
        width: 100%;
        margin-left: 0;
        margin-top: 2rem;
        gap: 1rem;
    }
    
    .btn-contact {
        width: 100%;
        min-width: unset;
        padding: 1rem;
        justify-content: center;
    }
}



/* ===== CORREÇÃO DO DROPDOWN MOBILE ===== */
@media (max-width: 992px) {
  .nav-dropdown.active .dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
  
  .nav-dropdown .dropdown-icon {
    transition: transform 0.3s ease;
  }
  
  .nav-dropdown.active .dropdown-icon {
    transform: rotate(180deg);
  }
}
/* ========================================
   ANÁLISE COMPLETA ESTILO STF
   Adicionar ao FINAL do jurimetria.css
======================================== */

.analise-completa {
  font-family: inherit;
}

.analise-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #e2e8f0;
}

.analise-header h3 {
  margin: 0;
  font-size: 1.3rem;
  color: #1a365d;
}

.probabilidade-badge {
  font-size: 1.1rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 20px;
}

.probabilidade-badge.alta {
  background: #c6f6d5;
  color: #276749;
}

.probabilidade-badge.moderada {
  background: #fefcbf;
  color: #744210;
}

.probabilidade-badge.baixa {
  background: #fed7d7;
  color: #822727;
}

.analise-secao {
  margin-bottom: 20px;
}

.analise-secao h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #e2e8f0;
}

.analise-secao p {
  color: #4a5568;
  line-height: 1.7;
  margin: 0;
}

.analise-secao ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.analise-secao ul li {
  padding: 6px 0;
  color: #4a5568;
  line-height: 1.6;
  border-bottom: 1px solid #f7fafc;
}

.tese-destaque {
  font-style: italic;
  font-size: 1.05rem;
  color: #2b6cb0 !important;
  background: #ebf8ff;
  padding: 12px 16px;
  border-left: 4px solid #3182ce;
  border-radius: 4px;
}

.analise-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 600px) {
  .analise-grid {
    grid-template-columns: 1fr;
  }
}

.estrategia {
  background: #f0fff4;
  border: 1px solid #9ae6b4;
  border-radius: 8px;
  padding: 16px;
}

.estrategia h4 {
  color: #276749;
  border-bottom-color: #9ae6b4;
}

.analise-fonte {
  margin-top: 16px;
  color: #a0aec0 !important;
  font-size: 0.8rem;
  text-align: right;
}

/* Loading state no botão */
#analyze-btn:disabled,
#search-form button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}
/* ========================================
   ANÁLISE COMPLETA ESTILO STF
   Adicionar ao FINAL do jurimetria.css
======================================== */

.analise-completa {
  font-family: inherit;
}

.analise-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #e2e8f0;
}

.analise-header h3 {
  margin: 0;
  font-size: 1.3rem;
  color: #1a365d;
}

.probabilidade-badge {
  font-size: 1.1rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 20px;
}

.probabilidade-badge.alta {
  background: #c6f6d5;
  color: #276749;
}

.probabilidade-badge.moderada {
  background: #fefcbf;
  color: #744210;
}

.probabilidade-badge.baixa {
  background: #fed7d7;
  color: #822727;
}

.analise-secao {
  margin-bottom: 20px;
}

.analise-secao h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #e2e8f0;
}

.analise-secao p {
  color: #4a5568;
  line-height: 1.7;
  margin: 0;
}

.analise-secao ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.analise-secao ul li {
  padding: 6px 0;
  color: #4a5568;
  line-height: 1.6;
  border-bottom: 1px solid #f7fafc;
}

.tese-destaque {
  font-style: italic;
  font-size: 1.05rem;
  color: #2b6cb0 !important;
  background: #ebf8ff;
  padding: 12px 16px;
  border-left: 4px solid #3182ce;
  border-radius: 4px;
}

.analise-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 600px) {
  .analise-grid {
    grid-template-columns: 1fr;
  }
}

.estrategia {
  background: #f0fff4;
  border: 1px solid #9ae6b4;
  border-radius: 8px;
  padding: 16px;
}

.estrategia h4 {
  color: #276749;
  border-bottom-color: #9ae6b4;
}

.analise-fonte {
  margin-top: 16px;
  color: #a0aec0 !important;
  font-size: 0.8rem;
  text-align: right;
}

/* Jurisprudência */
.jurisp-lista {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.jurisp-item {
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
}

.jurisp-tribunal {
  display: inline-block;
  background: #1a365d;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}

.jurisp-item strong {
  display: block;
  color: #2d3748;
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.jurisp-item p {
  color: #718096 !important;
  font-size: 0.9rem;
  margin: 0 !important;
  line-height: 1.5;
}

/* Resumo da tese */
.resumo-tese p {
  color: #4a5568;
  line-height: 1.8;
  margin-bottom: 12px;
  text-align: justify;
}

.resumo-tese p:last-child {
  margin-bottom: 0;
}

/* Visão diferencial */
.visao-diferencial {
  background: #fffaf0;
  border: 1px solid #f6ad55;
  border-radius: 8px;
  padding: 16px;
}

.visao-diferencial h4 {
  color: #c05621;
  border-bottom-color: #f6ad55;
}

.visao-diferencial p {
  color: #744210 !important;
}

/* Loading state no botão */
#analyze-btn:disabled,
#search-form button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}
/*========================================
   BOTÃO ANALISAR - DESTAQUE & HOVER
======================================== */

#analyze-btn {
  position: relative;
  background: var(--primary-color, #006d77);
  color: #ffffff;
  border: none;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 4px 14px rgba(0, 109, 119, 0.35),
    0 2px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  z-index: 1;
}

/* Efeito de brilho sutil no estado normal */
#analyze-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.15),
    transparent
  );
  transition: left 0.6s ease;
  z-index: -1;
}

/* Hover: elevação + brilho + cor secundária */
#analyze-btn:hover {
  background: var(--secondary-color, #8a9a5b);
  transform: translateY(-3px);
  box-shadow: 
    0 12px 24px rgba(138, 154, 91, 0.4),
    0 6px 12px rgba(0, 0, 0, 0.15);
}

#analyze-btn:hover::before {
  left: 100%;
}

/* Active: feedback de clique */
#analyze-btn:active {
  transform: translateY(-1px);
  box-shadow: 
    0 6px 16px rgba(138, 154, 91, 0.3),
    0 3px 8px rgba(0, 0, 0, 0.1);
}

/* Focus para acessibilidade */
#analyze-btn:focus-visible {
  outline: 3px solid rgba(138, 154, 91, 0.5);
  outline-offset: 2px;
}

/* Ícone com micro-animação no hover */
#analyze-btn i {
  transition: transform 0.3s ease;
}

#analyze-btn:hover i {
  transform: scale(1.1) rotate(2deg);
}

/* Efeito de pulsação sutil para chamar atenção (opcional) */
@keyframes pulse-soft {
  0%, 100% { box-shadow: 0 4px 14px rgba(0, 109, 119, 0.35), 0 2px 6px rgba(0,0,0,0.1); }
  50% { box-shadow: 0 6px 20px rgba(0, 109, 119, 0.5), 0 4px 10px rgba(0,0,0,0.15); }
}

#analyze-btn.pulse {
  animation: pulse-soft 2.5s infinite ease-in-out;
}
/* ========================================
   TEXTAREA APRIMORADO - JURIMETRIA
======================================== */

#texto-caso {
  width: 100%;
  min-height: 150px;
  max-height: 300px;
  padding: 1rem 1.25rem;
  border: 2px solid var(--light-gray, #e2e8f0);
  border-radius: 12px;
  background: var(--white, #ffffff);
  font-family: var(--font-sans, 'Inter', sans-serif);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-dark, #2c3e50);
  resize: vertical;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

#texto-caso::placeholder {
  color: var(--text-light, #94a3b8);
  opacity: 1;
}

#texto-caso:hover {
  border-color: var(--primary-color, #006d77);
  box-shadow: 0 4px 12px rgba(0, 109, 119, 0.15);
}

#texto-caso:focus {
  outline: none;
  border-color: var(--primary-color, #006d77);
  box-shadow: 
    0 0 0 3px rgba(0, 109, 119, 0.15),
    0 4px 16px rgba(0, 109, 119, 0.2);
  background: #fafdff;
}

#texto-caso.error {
  border-color: #ef4444;
  animation: shake 0.4s ease;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* Container do textarea com label flutuante (opcional) */
.textarea-wrapper {
  position: relative;
  margin-bottom: 1.5rem;
}

.textarea-wrapper label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-dark, #2c3e50);
  font-size: 0.95rem;
}

/* Contador de caracteres */
.textarea-counter {
  display: block;
  text-align: right;
  font-size: 0.8rem;
  color: var(--text-light, #94a3b8);
  margin-top: 0.5rem;
  transition: color 0.2s ease;
}

#texto-caso:focus + .textarea-counter {
  color: var(--primary-color, #006d77);
}

/* ========================================
   BARRA DE PROGRESSO - BOTÃO ANALISAR
======================================== */

#analyze-btn {
  position: relative;
  background: var(--primary-color, #006d77);
  color: #ffffff;
  border: none;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 4px 14px rgba(0, 109, 119, 0.35),
    0 2px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  z-index: 1;
  min-width: 180px;
}

#analyze-btn .btn-content {
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 2;
  position: relative;
}

#analyze-btn .progress-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 0;
}

#analyze-btn .progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(
    90deg,
    var(--secondary-color, #8a9a5b),
    var(--primary-color, #006d77),
    var(--secondary-color, #8a9a5b)
  );
  background-size: 200% 100%;
  animation: gradient-shift 2s linear infinite;
  transition: width 0.3s ease;
  border-radius: 12px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.15);
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

#analyze-btn.loading .btn-content {
  opacity: 0;
  visibility: hidden;
  transform: scale(0.98);
}

#analyze-btn.loading .progress-container {
  opacity: 1;
  visibility: visible;
}

#analyze-btn .progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 2;
  pointer-events: none;
}

#analyze-btn.show-percent.loading .progress-text {
  opacity: 1;
}

#analyze-btn:not(.loading):hover {
  background: var(--secondary-color, #8a9a5b);
  transform: translateY(-3px);
  box-shadow: 
    0 12px 24px rgba(138, 154, 91, 0.4),
    0 6px 12px rgba(0, 0, 0, 0.15);
}

#analyze-btn:not(.loading):active {
  transform: translateY(-1px);
}

#analyze-btn:disabled {
  cursor: not-allowed;
  opacity: 1;
}

#analyze-btn:focus-visible {
  outline: 3px solid rgba(138, 154, 91, 0.6);
  outline-offset: 2px;
}

/* ========================================
   RESPONSIVIDADE
======================================== */

@media (max-width: 768px) {
  #texto-caso {
    min-height: 120px;
    font-size: 0.95rem;
    padding: 0.875rem 1rem;
  }
  
  #analyze-btn {
    width: 100%;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
  
  .textarea-counter {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  #texto-caso {
    min-height: 100px;
    font-size: 0.9rem;
  }
  
  #analyze-btn .progress-text {
    font-size: 0.8rem;
  }
}
/* Badge do reCAPTCHA v3 sempre visível */
.grecaptcha-badge { 
  visibility: visible !important; 
  z-index: 9999 !important;
  bottom: 12px !important;
  right: 12px !important;
  transition: opacity 0.3s ease;
}

/* Evita que outros elementos cubram o badge */
.jurimetria-main, .footer, .header {
  position: relative;
  z-index: auto;
}