/* --- VARIÁVEIS GLOBAIS --- */
:root {
  --primary-color: #1e2a4f;
  --primary-hover: #2e3f7f;
  --light-bg: #f4f6fa;
  --gradient-start: #1e2a4f;
  --gradient-end: #5b6a9a;
  --text-color: #4a4a4a;
  --radius: 16px;
}

/* --- KEYFRAMES PARA ANIMAÇÕES --- */
@keyframes cardFadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- BODY E BASE --- */
body {
  background: linear-gradient(to right top, #f4f6fa, #ffffff);
  font-family: 'Poppins', sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  color: var(--text-color);
  padding-top: 70px; /* espaço para navbar fixa */
  overflow-x: hidden; /* Prevenir scroll horizontal dos blobs */
}

/* --- [NOVO] "BLOBS" DE FUNDO DECORATIVOS --- */
body::before, body::after {
  content: '';
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  opacity: 0.5;
  filter: blur(50px);
}

body::before {
  /* Blob sutil no canto superior esquerdo */
  width: 40vw;
  height: 40vw;
  min-width: 300px;
  min-height: 300px;
  top: -15vh;
  left: -15vw;
  background: radial-gradient(circle, rgba(30, 42, 79, 0.07), transparent 70%);
}

body::after {
  /* Blob sutil no canto inferior direito */
  width: 50vw;
  height: 50vw;
  min-width: 400px;
  min-height: 400px;
  bottom: -20vh;
  right: -20vw;
  background: radial-gradient(circle, rgba(91, 106, 154, 0.08), transparent 70%);
}


/* --- NAVBAR --- */
.navbar {
  background: rgba(30, 42, 79, 0.9);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transition: background 0.3s ease;
}

.navbar .nav-link {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  transition: color 0.3s ease;
  
  /* [MELHORIA] Preparação para o sublinhado */
  position: relative;
  padding-bottom: 5px; 
}

/* [MELHORIA] Efeito de sublinhado animado no hover/active */
.navbar .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #ffffff;
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.3s ease-out;
}

.navbar .nav-link:hover::after,
.navbar .nav-link.active::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}


.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: #ffffff;
}

.navbar-brand img {
  filter: brightness(1.1);
  transition: transform 0.3s ease;
}

.navbar-brand img:hover {
  transform: scale(1.05);
}

/* --- TÍTULO PRINCIPAL --- */
.content h1 {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.gradient-text {
  background: linear-gradient(45deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.content p {
  font-size: 1.1rem;
  color: #6c757d;
}

/* --- GRID DE CARDS --- */
.wrapper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  max-width: 1400px;
  margin: 50px auto;
  padding: 0 20px;
}

/* --- ESTILO DOS CARDS --- */
.card {
  border: 2px solid transparent; /* [MELHORIA] Borda transparente para hover */
  border-radius: var(--radius);
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  
  /* [NOVO] Animação de entrada */
  opacity: 0; /* Começa invisível */
  animation: cardFadeInUp 0.6s ease-out forwards;
}

.card:hover {
  transform: translateY(-12px); /* Um pouco mais de elevação */
  box-shadow: 0 16px 45px rgba(30, 42, 79, 0.12); /* Sombra mais forte */
  border-color: var(--primary-hover); /* [MELHORIA] Borda colorida no hover */
}

/* [NOVO] Animação escalonada (staggered) para os cards */
.wrapper .card:nth-child(1) { animation-delay: 0.05s; }
.wrapper .card:nth-child(2) { animation-delay: 0.1s; }
.wrapper .card:nth-child(3) { animation-delay: 0.15s; }
.wrapper .card:nth-child(4) { animation-delay: 0.2s; }
.wrapper .card:nth-child(5) { animation-delay: 0.25s; }
.wrapper .card:nth-child(6) { animation-delay: 0.3s; }
.wrapper .card:nth-child(7) { animation-delay: 0.35s; }
.wrapper .card:nth-child(8) { animation-delay: 0.4s; }
.wrapper .card:nth-child(9) { animation-delay: 0.45s; }
.wrapper .card:nth-child(10) { animation-delay: 0.5s; }
/* Adicione mais se necessário */


.card-img-top {
  height: 180px;
  object-fit: cover;
  filter: brightness(0.95) saturate(1.05);
  transition: filter 0.3s ease, transform 0.3s ease; /* [MELHORIA] Add transform */
}

.card:hover .card-img-top {
  filter: brightness(1.05) saturate(1.1);
  transform: scale(1.03); /* [MELHORIA] Leve zoom na imagem */
}

.card-body {
  padding: 1.5rem;
  /* [MELHORIA] Garante que o card-body se ajuste */
  display: flex;
  flex-direction: column;
  flex-grow: 1; 
}

.card-title {
  color: var(--primary-color);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

/* [MELHORIA] Animação no ícone do título */
.card-title i {
  transition: transform 0.3s ease, color 0.3s ease;
}
.card:hover .card-title i {
  transform: scale(1.1);
  color: var(--primary-hover);
}

.card-text {
  color: #6c757d;
  font-size: 0.96rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
  flex-grow: 1; /* Faz o texto ocupar espaço e empurrar o botão para baixo */
}

.btn-outline-primary {
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  font-weight: 600;
  padding: 10px;
  border-radius: 12px;
  transition: all 0.3s ease;
  margin-top: auto; /* [MELHORIA] Alinha o botão na base */
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  color: #fff;
  transform: translateY(-3px);
  /* [MELHORIA] Sombra no botão para dar profundidade */
  box-shadow: 0 5px 15px rgba(30, 42, 79, 0.3);
}

/* --- MODAL --- */
.modal-content {
  border-radius: var(--radius);
  border: none;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15); /* [MELHORIA] Sombra no modal */
}

.modal-header {
  background: linear-gradient(45deg, var(--gradient-start), var(--gradient-end));
  color: white;
  border-bottom: none;
}

.modal-footer .btn-success {
  background: linear-gradient(45deg, #28a745, #218838);
  border: none;
}

/* --- RODAPÉ --- */
.site-footer {
  background: linear-gradient(135deg, var(--primary-color) 0%, #111a35 100%);
  color: rgba(255, 255, 255, 0.8);
  padding: 40px 0;
  margin-top: auto;
  text-align: center;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.15);
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
}

.footer-content p {
  font-size: 0.95rem;
  margin-bottom: 18px;
}

.team-name {
  color: #a9b8e0;
  font-weight: 600;
}

.social-links a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.5rem;
  margin: 0 15px;
  transition: all 0.3s ease;
  display: inline-block; /* [MELHORIA] Para o transform funcionar bem */
}

.social-links a:hover {
  color: #fff;
  transform: translateY(-5px);
}

/* --- RESPONSIVIDADE --- */
@media (max-width: 1200px) {
  .wrapper { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 992px) {
  .wrapper { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .wrapper { grid-template-columns: 1fr; }
  .content h1 { font-size: 2.3rem; }
  
  /* [MELHORIA] Ajusta os blobs em telas menores */
  body::before, body::after {
    opacity: 0.3;
    filter: blur(30px);
  }
}