/* ════════════════════════════════════════════
   TABELÃO DE MAIO — Estilos
   Arquivo: tabelao.css
   ════════════════════════════════════════════ */

/* ── SEÇÃO GERAL ── */
.tabelao-section {
  padding: 60px 20px;
  background: linear-gradient(to bottom, #f8fafc, white);
}

/* ── BOTÃO DE ABERTURA ── */
.tabelao-trigger-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 0;
}

.tabelao-trigger-wrapper h2 {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 32px;
  color: #181616;
  margin: 0;
  text-align: center;
}

.tabelao-subtitle {
  font-size: 16px;
  color: #1e3a8a;
  font-weight: 500;
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  text-align: center;
  letter-spacing: 0.5px;
  opacity: 0.9;
  transition: opacity 0.3s ease;
}
.tabelao-subtitle:hover {
  opacity: 1;
}

.btn-abrir-tabelao {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 40px;
  background: linear-gradient(135deg, #ff5e00, #bd5713);
  color: rgb(255, 255, 255);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 700;
  font-size: 18px;
  font-family: 'Segoe UI', sans-serif;
  letter-spacing: 0.5px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 8px 24px rgba(30, 58, 138, 0.35),
    0 4px 12px rgba(255, 94, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  perspective: 1000px;
  animation: techGlow 3s ease-in-out infinite alternate, float 4s ease-in-out infinite;
}

@keyframes techGlow {
  0% { box-shadow: 
         0 8px 24px rgba(30, 58, 138, 0.35),
         0 4px 12px rgba(255, 94, 0, 0.4),
         inset 0 1px 0 rgba(255, 255, 255, 0.2),
         inset 0 -1px 0 rgba(0, 0, 0, 0.1); }
  100% { box-shadow: 
          0 12px 32px rgba(30, 58, 138, 0.5),
          0 6px 16px rgba(255, 94, 0, 0.6),
          0 0 20px rgba(255, 94, 0, 0.8),
          inset 0 1px 0 rgba(255, 255, 255, 0.3),
          inset 0 -1px 0 rgba(0, 0, 0, 0.2); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
}

.btn-abrir-tabelao::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.8s ease;
  border-radius: 50px;
}
.btn-abrir-tabelao:hover::before { left: 100%; }

.btn-abrir-tabelao::after {
  content: '';
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  background: linear-gradient(45deg, rgba(255,94,0,0.5), rgba(245,158,11,0.5), rgba(255,94,0,0.5));
  border-radius: 52px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.btn-abrir-tabelao:hover::after { opacity: 1; }

.btn-abrir-tabelao:hover {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  box-shadow: 
    0 16px 40px rgba(245, 158, 11, 0.5),
    0 8px 20px rgba(255, 94, 0, 0.7),
    0 0 30px rgba(255, 94, 0, 1),
    inset 0 2px 0 rgba(255, 255, 255, 0.3),
    inset 0 -2px 0 rgba(0, 0, 0, 0.2);
  transform: translateY(-6px) scale(1.05) rotateX(5deg) rotateY(-5deg);
  animation-play-state: paused;
}

.btn-abrir-tabelao .btn-icon {
  font-size: 22px;
  transition: transform 0.4s ease;
  display: inline-block;
}
.btn-abrir-tabelao.aberto .btn-icon { transform: rotate(180deg); }

.btn-abrir-tabelao .btn-badge {
  background: rgba(255,255,255,0.25);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
}

/* ── ANEL DE PULSO ── */
.btn-pulse-ring {
  position: absolute;
  inset: 0;
  border-radius: 50px;
  animation: pulseRing 2.5s ease-out infinite;
  border: 2px solid rgba(30, 58, 138, 0.4);
  pointer-events: none;
}
.btn-pulse-ring::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50px;
  border: 2px solid rgba(255, 94, 0, 0.6);
  animation: pulseRingInner 2.5s ease-out infinite 0.5s;
}
.btn-pulse-ring::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  animation: pulseRingOuter 2.5s ease-out infinite 1s;
}
@keyframes pulseRing {
  0%   { transform: scale(1);    opacity: 0.7; }
  70%  { transform: scale(1.08); opacity: 0;   }
  100% { transform: scale(1.08); opacity: 0;   }
}
@keyframes pulseRingInner {
  0%   { transform: scale(1);    opacity: 0.5; }
  70%  { transform: scale(1.12); opacity: 0;   }
  100% { transform: scale(1.12); opacity: 0;   }
}
@keyframes pulseRingOuter {
  0%   { transform: scale(1);    opacity: 0.3; }
  70%  { transform: scale(1.15); opacity: 0;   }
  100% { transform: scale(1.15); opacity: 0;   }
}

/* ── PAINEL COLAPSÁVEL ── */
.tabelao-collapsible {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.5s ease, margin 0.4s ease;
  opacity: 0;
  margin-top: 0;
}
.tabelao-collapsible.aberto {
  max-height: 9000px;
  opacity: 1;
  margin-top: 40px;
}

.tabelao-maio {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 10px 30px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ── ABAS ── */
.tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 14px 28px;
  background: #f59e0b;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
  font-family: 'Segoe UI', sans-serif;
}
.tab-btn:hover {
  background: #ffd000;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.4);
}
.tab-btn.active {
  background: #1e3a8a;
  box-shadow: 0 6px 16px rgba(30, 58, 138, 0.4);
}

.tab-btn.oportunidades-btn {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.35);
  position: relative;
}
.tab-btn.oportunidades-btn::after {
  content: '🔥';
  position: absolute;
  top: -8px; right: -6px;
  font-size: 14px;
}
.tab-btn.oportunidades-btn:hover {
  background: linear-gradient(135deg, #15803d, #16a34a);
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.5);
}
.tab-btn.oportunidades-btn.active {
  background: linear-gradient(135deg, #14532d, #166534);
  box-shadow: 0 6px 16px rgba(20, 83, 45, 0.5);
}

/* ── CONTEÚDO DAS ABAS ── */
.tab-content { position: relative; }
.tab-pane { display: none; }
.tab-pane.active {
  display: block;
  animation: fadeInUp 0.5s ease-out;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0);    }
}

/* ── SEÇÃO POR ZONA ── */
.zona-section { margin-bottom: 50px; }
.zona-section h3 {
  color: #1e3a8a;
  font-size: 26px;
  font-weight: bold;
  margin-bottom: 22px;
  text-align: center;
  position: relative;
}
.zona-section h3::after {
  content: '';
  display: block;
  width: 70px; height: 5px;
  background: linear-gradient(to right, #f59e0b, #fbbf24);
  margin: 10px auto 0;
  border-radius: 3px;
}
.oportunidades-zona h3 { color: #166534; }
.oportunidades-zona h3::after {
  background: linear-gradient(to right, #16a34a, #4ade80);
}

/* ════════════════════════════════════════════
   BLOCO POR PROJETO
   ════════════════════════════════════════════ */

.projetos-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.projeto-block {
  box-shadow: 0 12px 40px rgba(0,0,0,0.10);
  border-radius: 16px;
  background: white;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

/* ── cabeçalho: altura fixa = nomes sempre na mesma linha ── */
.projeto-header {
  background: linear-gradient(to right, #f59e0b, #fbbf24);
  color: white;
  font-weight: bold;
  font-size: 18px;
  height: 52px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
}
.projeto-header:hover {
  background: linear-gradient(to right, #d97706, #f59e0b);
}

.oportunidades-header {
  background: linear-gradient(to right, #16a34a, #4ade80);
}
.oportunidades-header:hover {
  background: linear-gradient(to right, #15803d, #16a34a);
}

/* nome ocupa o espaço livre, trunca se necessário */
.projeto-nome {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* badge sempre à direita, largura mínima fixa */
.projeto-counter {
  flex-shrink: 0;
  min-width: 100px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  background: rgba(255,255,255,0.22);
  border-radius: 20px;
  padding: 3px 10px;
  white-space: nowrap;
}

/* ── THEAD fixo ── */
/* ── WRAPPER ÚNICO COM SCROLL HORIZONTAL ── */
.table-scroll-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #f59e0b #f1f5f9;
}
.table-scroll-wrapper::-webkit-scrollbar { height: 6px; }
.table-scroll-wrapper::-webkit-scrollbar-track { background: #f1f5f9; }
.table-scroll-wrapper::-webkit-scrollbar-thumb { background: #f59e0b; border-radius: 3px; }

/* tbody com scroll vertical quando muitas linhas */
.tbody-scroll {
  display: block;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #f59e0b #f1f5f9;
}
.tbody-scroll tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}
.tbody-scroll::-webkit-scrollbar { width: 6px; }
.tbody-scroll::-webkit-scrollbar-track { background: #f1f5f9; }
.tbody-scroll::-webkit-scrollbar-thumb { background: #f59e0b; border-radius: 3px; }

/* ── TABELAS ── */
.projeto-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  table-layout: fixed;
}

.projeto-table th:nth-child(1), .projeto-table td:nth-child(1) { width: 14%; }
.projeto-table th:nth-child(2), .projeto-table td:nth-child(2) { width: 18%; }
.projeto-table th:nth-child(3), .projeto-table td:nth-child(3) { width: 13%; }
.projeto-table th:nth-child(4), .projeto-table td:nth-child(4) { width: 8%;  }
.projeto-table th:nth-child(5), .projeto-table td:nth-child(5) { width: 18%; }
.projeto-table th:nth-child(6), .projeto-table td:nth-child(6) { width: 13%; }
.projeto-table th:nth-child(7), .projeto-table td:nth-child(7) { width: 16%; }

.head-table th {
  background: linear-gradient(to right, #1e3a8a, #1e40af);
  color: white;
  padding: 13px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.oportunidades-zona .head-table th {
  background: linear-gradient(to right, #166534, #16a34a);
}

.inner-table td {
  padding: 14px 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  font-size: 13px;
  word-break: break-word;
}

.data-row {
  cursor: pointer;
  transition: all 0.25s ease;
}
.data-row:hover {
  background-color: #fef3c7;
  border-left: 4px solid #f59e0b;
}
.oportunidades-zona .data-row:hover {
  background-color: #dcfce7;
  border-left: 4px solid #16a34a;
}

.data-row .strike {
  text-decoration: line-through;
  color: #d10505;
  font-size: 12px;
}

.price {
  font-weight: bold;
  color: #1e3a8a;
  font-size: 15px;
}
.oportunidades-zona .price { color: #166534; }

.badge-oportunidade {
  display: inline-block;
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.details-row { background: linear-gradient(to right, #f0f9ff, #e0f2fe); }
.details-row.hidden { display: none; }
.details-row td {
  padding: 18px 16px !important;
  font-style: italic;
  color: #1e40af;
  border-top: 3px solid #1e3a8a;
  font-size: 14px;
  word-break: break-word;
  white-space: normal;
}
.oportunidades-zona .details-row { background: linear-gradient(to right, #f0fdf4, #dcfce7); }
.oportunidades-zona .details-row td { color: #166534; border-top: 3px solid #16a34a; }

/* ── CARD HERO DE OPORTUNIDADES ── */
.oportunidades-hero {
  background: linear-gradient(135deg, #14532d, #166534);
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 20px;
  color: white;
}
.oportunidades-hero .hero-icon { font-size: 48px; flex-shrink: 0; }
.oportunidades-hero h4 { margin: 0 0 6px; font-size: 22px; font-weight: 700; }
.oportunidades-hero p  { margin: 0; font-size: 14px; opacity: 0.85; }

/* ════════════════════════════════════════════
   RESPONSIVO — MOBILE
   ════════════════════════════════════════════ */
@media (max-width: 640px) {

  /* Container com scroll horizontal suave */
 /* ── WRAPPER ÚNICO COM SCROLL HORIZONTAL ── */
.table-scroll-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #f59e0b #f1f5f9;
}
.table-scroll-wrapper::-webkit-scrollbar { height: 6px; }
.table-scroll-wrapper::-webkit-scrollbar-track { background: #f1f5f9; }
.table-scroll-wrapper::-webkit-scrollbar-thumb { background: #f59e0b; border-radius: 3px; }

/* tbody com scroll vertical quando muitas linhas */
.tbody-scroll {
  display: block;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #f59e0b #f1f5f9;
}
.tbody-scroll tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}
.tbody-scroll::-webkit-scrollbar { width: 6px; }
.tbody-scroll::-webkit-scrollbar-track { background: #f1f5f9; }
.tbody-scroll::-webkit-scrollbar-thumb { background: #f59e0b; border-radius: 3px; }

  /* Tabela mantém estrutura, só reduz o min-width */
  .projeto-table {
    min-width: 520px;
    font-size: 12px;
  }

  /* Cabeçalhos e células menores */
  .head-table th {
    padding: 10px 8px;
    font-size: 11px;
    letter-spacing: 0;
  }

  .inner-table td {
    padding: 11px 8px;
    font-size: 12px;
  }

  /* Preço um pouco menor mas ainda destacado */
  .price {
    font-size: 13px;
  }

  /* Header do projeto */
  .projeto-header {
    height: auto;
    min-height: 48px;
    padding: 10px 14px;
    font-size: 14px;
    flex-wrap: wrap;
  }

  .projeto-nome {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .projeto-counter {
    min-width: auto;
    font-size: 10px;
  }

  /* Detalhes expandidos */
  .details-row td {
    font-size: 12px;
    padding: 14px 10px !important;
    white-space: normal;
  }

  /* Título da seção */
  .tabelao-trigger-wrapper h2 { font-size: 24px; }

  /* Botão */
  .btn-abrir-tabelao {
    font-size: 15px;
    padding: 14px 24px;
    gap: 8px;
  }

  /* Abas em coluna */
  .tabs {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  .tab-btn {
    width: 260px;
    font-size: 15px;
  }

  .zona-section h3 { font-size: 20px; }

  /* Hero de oportunidades */
  .oportunidades-hero {
    flex-direction: column;
    text-align: center;
    padding: 22px 20px;
  }
  .oportunidades-hero .hero-icon { font-size: 36px; }
  .oportunidades-hero h4 { font-size: 18px; }
}

.table-wrapper-head,
.tbody-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* esconde barra no head */
}
.table-wrapper-head::-webkit-scrollbar { display: none; }

/* ── CONTAINER COM SCROLL A PARTIR DO 4º PROJETO ── */
.projetos-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-height: 1800px; /* altura de ~3 projetos */
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: #f59e0b #f1f5f9;
  scroll-behavior: smooth;
}
.projetos-container::-webkit-scrollbar { width: 6px; }
.projetos-container::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 3px; }
.projetos-container::-webkit-scrollbar-thumb { background: #f59e0b; border-radius: 3px; }

.projeto-body {
  transition: none;
}

.table-wrapper-head,
.tbody-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* esconde barra no head */
}
.table-wrapper-head::-webkit-scrollbar { display: none; }