/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* BODY */
body {
  font-family: 'Inter', sans-serif; 
  background-color: #f4f6f8;
  color: #333;
}

/* HEADER */
.header {
  background-color: #2D5F66;
  color: white;
  position: relative;
  height: 150px;

  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* LOGOS */
.logo {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: auto;
}

.logo.left {
  left: 20px;
  width: 180px;
}

.logo.right {
  right: 40px;
  width: 120px;
}

/* TEXTO CENTRAL */
.header-text {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.header-text h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 28px;
  font-weight: 600;
}

.header-text p {
  font-size: 14px;
  opacity: 0.9;
}

/* BUSCA */
.search-container {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.search-input,
.search-date {
  padding: 12px 16px;
  border-radius: 40px;
  border: none;
  outline: none;

  font-size: 14px;
  background-color: white;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);

  width: 100%;
  max-width: 280px;
}

.search-input:focus,
.search-date:focus {
  box-shadow: 0 0 0 2px #2D5F6655;
}

/* MAIN CENTRALIZADO */
main {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* GRID */
.grid {
  display: grid;
  gap: 20px;
  justify-content: center;

  grid-template-columns: repeat(4, 280px);

  width: 100%;
  padding: 10px;
}

/* CARD */
.card {
  background-color: white;
  border-radius: 15px;
  padding: 20px;

  box-shadow: 0 4px 10px rgba(0,0,0,0.08);

  display: flex;
  flex-direction: column;
  justify-content: space-between;

  min-height: 230px;

  /* animação */
  opacity: 0;
  transform: translateY(10px);
  animation: fadeIn 0.4s ease forwards;
}

/* ANIMAÇÃO ENTRADA */
@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* CONTEÚDO */
.card-content {
  flex: 1;
}

/* NOME */
.nome {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 8px;
}

/* INFO */
.info {
  font-size: 13px;
  color: #555;
  margin: 3px 0;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* BOTÃO */
.button {
  margin-top: auto;

  display: inline-block;
  width: fit-content;

  background-color: #20877c;
  color: white;
  padding: 8px 14px;

  border-radius: 20px;
  font-size: 13px;
  text-decoration: none;

  border: none;
  outline: none;

  transition: all 0.2s ease;
}

.button:hover {
  background-color: #256e58;
  transform: scale(1.05);
}

/* PAGINAÇÃO */
.paginacao {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin: 20px 0;
}

/* TEXTO "Página X de Y" */
#pageInfo {
  font-size: 13px;
  color: #444;
  font-weight: 500;
}

.paginacao button {
  background-color: #2D5F66;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 20px; /* seta maior */
  font-weight: 750; /* seta mais forte */

  display: flex;
  align-items: center;
  justify-content: center;

  min-width: 32px;
  height: 32px;

  transition: all 0.2s ease;
}

.paginacao button:hover {
  transform: scale(1.1);
}

/* HOVER */
.paginacao button:hover {
  transform: translateY(-1px) scale(1.05);
  background-color: #256e58;
}

/* BOTÃO DESATIVADO */
.paginacao button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* ANIMAÇÃO TROCA DE PÁGINA (ADICIONADO) */
.fade-out {
  animation: fadeOut 0.2s ease forwards;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* FIX GLOBAL DE BOTÃO (ADICIONADO) */
button {
  border: none;
  outline: none;
}

/* MODAL */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;

  background: rgba(0,0,0,0.5);

  display: flex;
  align-items: center;
  justify-content: center;
}

.hidden {
  display: none;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 15px;
  width: 90%;
  max-width: 400px;
  position: relative;
  z-index: 10000;
}

/* RESPONSIVO */

/* NOTEBOOK */
@media (max-width: 1200px) {
  .grid {
    grid-template-columns: repeat(3, 280px);
  }
}

/* TABLET */
@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(2, 280px);
  }
}

/* MOBILE */
@media (max-width: 768px) {

  .header{
    height:auto;
    min-height:130px;
    padding:20px 15px 25px;
  }

  .logo.left{
    left:15px;
    width:85px;
  }

  .logo.right{
    right:15px;
    width:70px;
  }

  .header-text{
    position:static;
    transform:none;
    text-align:center;
    padding:0 80px;
  }

  .header-text h1{
    font-size:22px;
  }

  .header-text p{
    font-size:12px;
    line-height:1.4;
  }

  .search-container{
    flex-direction:column;
    align-items:center;
    gap:12px;
    padding:0 14px;
  }

  .search-input,
  .search-date{
    width:100%;
    max-width:none;
  }

  .grid{
    grid-template-columns:1fr;
    gap:18px;
    padding:16px;
  }

  .card{
    width:100%;
    max-width:420px;
    margin:0 auto;
    min-height:auto;
    padding:18px;
  }

  .nome{
    font-size:18px;
    line-height:1.3;
  }

  .info{
    font-size:14px;
  }

  .button{
    width:100%;
    text-align:center;
    font-size:15px;
    padding:12px;
  }

  .paginacao{
    margin:30px 0;
  }

  .whatsapp-btn{
    width:58px;
    height:58px;
  }

  .whatsapp-tooltip{
    display:none;
  }
}

/* MODAL MELHORADO */
.modal-content {
  background: white;
  padding: 25px;
  border-radius: 20px;
  width: 90%;
  max-width: 420px;

  box-shadow: 0 10px 30px rgba(0,0,0,0.2);

  animation: modalFade 0.3s ease;
}

@keyframes modalFade {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* TÍTULO */
.modal-content h2 {
  font-family: 'Poppins', sans-serif;
  margin-bottom: 20px;
  text-align: center;
}

/* FORM */
.form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* INPUT GROUP (efeito flutuante) */
.input-group {
  position: relative;
}

.input-group input,
.input-group textarea {
  width: 100%;
  padding: 14px 12px;
  border-radius: 10px;
  border: 1px solid #ccc;
  outline: none;

  font-size: 14px;
  background: #f9fafb;

  transition: all 0.2s ease;
}

.input-group textarea {
  min-height: 80px;
  resize: none;
}

/* FOCO */
.input-group input:focus,
.input-group textarea:focus {
  border-color: #20877c;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(32,135,124,0.15);
}

/* LABEL FLUTUANTE */
.input-group label {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: #777;
  pointer-events: none;

  background: white;
  padding: 0 5px;

  transition: 0.2s ease;
}

/* QUANDO DIGITA */
.input-group input:focus + label,
.input-group input:valid + label,
.input-group textarea:focus + label,
.input-group textarea:valid + label {
  top: -6px;
  font-size: 11px;
  color: #20877c;
}

/* LGPD */
.lgpd {
  display: flex;
  align-items: flex-start;
  gap: 8px;

  font-size: 12px;
  color: #555;
}

.lgpd input {
  margin-top: 3px;
}

.lgpd a {
  color: #20877c;
  text-decoration: none;
  font-weight: 500;
}

/* BOTÃO ENVIAR */
.button.enviar {
  width: 100%;
  padding: 12px;
  border-radius: 25px;
  font-size: 14px;

  background: linear-gradient(135deg, #20877c, #2D5F66);
}

.button.enviar:hover {
  transform: scale(1.03);
}

/* BOTÃO FECHAR */
.close {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
  color: #666;
  z-index: 10;
  transition: all 0.2s ease; 
}

.close:hover {
  color: #333;
}

/* MOBILE */
@media (max-width: 600px) {
  .modal-content {
    padding: 20px;
  }

  .input-group input,
  .input-group textarea {
    font-size: 13px;
  }
}

/* MODAL SUCESSO */
.sucesso-box {
  text-align: center;
  padding: 30px 20px;
  animation: popIn 0.3s ease;
}

.sucesso-box h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: #20877c;
}

.sucesso-box p {
  font-size: 14px;
  color: #555;
  margin-bottom: 20px;
}

/* ANIMAÇÃO */
@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* WHATSAPP FLOAT */
.whatsapp-container {
  position: fixed;
  bottom: 20px;
  right: 16px;
  z-index: 9999;

  display: flex;
  align-items: center;
  gap: 10px;
}

/*  SEGREDO: inverter a ordem visual */
.whatsapp-tooltip {
  order: -1;
}

/* BOTÃO */
.whatsapp-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;

  background: #20877c;
  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow:0 10px 28px rgba(0,0,0,.28);

  transition:all .35s cubic-bezier(.22,1,.36,1);
}

.whatsapp-btn:hover {
  transform: scale(1.08);
  background: #256e58;
}

/* TOOLTIP */
.whatsapp-tooltip {
  background: white;
  color: #333;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 8px;

  box-shadow: 0 4px 12px rgba(0,0,0,0.1);

  opacity: 0;
  transform: translateX(10px);

  transition: all 0.3s ease;
  pointer-events: none;
}

/* APARECE NO HOVER (desktop) */
.whatsapp-container:hover .whatsapp-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* MOBILE: aparece sozinho por 3s */
@media (max-width: 600px) {
  .whatsapp-tooltip {
    opacity: 1;
    transform: translateX(0);
    animation: hideTooltip 4s forwards;
  }

  @keyframes hideTooltip {
    0% { opacity: 0; }
    10% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
  }
}