/* ==================== BG LEVE & ANIMADO (EFEITO DA HOME) ==================== */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, #6a00ff30, transparent),
    radial-gradient(circle at 80% 80%, #00ffd530, transparent);
  background-repeat: no-repeat;
  background-size: 50% 50%;
  animation: moveBackground 25s linear infinite;
  z-index: -1;
  filter: blur(80px);
}

@keyframes moveBackground {
  0%,
  100% {
    background-position: left top, right bottom;
  }
  50% {
    background-position: center center, center center;
  }
}

/* ==================== ESTILO APPLE UI ==================== */
/* O body já tem background-color: #000; definido em Global.css */
/* PROJETOS */
#projetos {
  padding: 80px 20px;
  text-align: center;
}

.container-principal h2 {
  font-size: 2.5rem;
  color: #fff;
  font-weight: 700;
  margin-bottom: 50px;
}

/* Grid cards */
.grade-projetos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Card */
.mini-card {
  background: rgba(29, 29, 31, 0.7); /* Cor de card do dark mode da Apple */
  border-radius: 20px;
  padding: 18px;
  -webkit-backdrop-filter: blur(20px); /* Para compatibilidade com Safari */
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: hidden; /* Garante que a imagem não ultrapasse o card no zoom */
  will-change: transform; /* Otimização de performance para a animação */
}

.mini-card:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.3);
}

.mini-card:hover img {
  transform: scale(1.05);
}

.mini-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 12px; /* Cantos mais arredondados */
  margin-bottom: 12px;
  transition: transform 0.4s ease, filter 0.3s ease;
}

.mini-card h3 {
  font-size: 1.2rem;
  margin-bottom: 6px;
}
.mini-card p {
  font-size: 0.9rem;
  margin-bottom: 12px;
  color: #ccc;
  flex-grow: 1; /* Garante que o botão fique alinhado na base */
}
.mini-card .destaque {
  color: #e5e5e7;
  font-weight: 600;
}

/* Botões do Card */
.card-buttons {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  width: 100%;
}

.btn {
  flex: 1; /* Faz os botões ocuparem o espaço igualmente */
  background: #0a84ff; /* Cor de destaque da Apple */
  color: #fff;
  padding: 10px 22px;
  border-radius: 50px; /* Estilo "pílula" */
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  text-align: center;
  font-size: 0.9rem;
}

.btn:hover {
  filter: brightness(1.1);
  transform: scale(1.03);
}

/* Botão secundário (README) */
.btn.btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
}

/* ==================== MODAL README ==================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(10px); /* Para compatibilidade com Safari */
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: #1d1d1f;
  padding: 30px 40px;
  border-radius: 18px;
  max-width: 600px;
  width: 90%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  color: #f5f5f7;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.modal-content h3 {
  font-size: 1.8rem;
  margin-bottom: 25px;
  color: #fff;
}

.modal-content h4 {
  font-size: 1.1rem;
  color: #0a84ff;
  margin-top: 20px;
  margin-bottom: 8px;
}

.modal-content p {
  font-size: 1rem;
  line-height: 1.7;
  color: #d2d2d7;
}

.close-button {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.close-button:hover {
  opacity: 1;
}

/* RESPONSIVO */
@media (min-width: 901px) {
  .grade-projetos {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }
  .mini-card img {
    height: 180px;
  }
  .mini-card h3 {
    font-size: 1.3rem;
  }
  .mini-card p {
    font-size: 1rem;
  }
}

@media (max-width: 900px) {
  .grade-projetos {
    gap: 20px;
  }
  #projetos {
    padding: 60px 20px;
  }
}

@media (max-width: 600px) {
  .grade-projetos {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .container-principal h2 {
    font-size: 2rem;
  }
  .mini-card img {
    height: 150px;
  }
  .mini-card h3 {
    font-size: 1.1rem;
  }
  .mini-card p {
    font-size: 0.9rem;
  }
  .btn {
    padding: 8px 18px;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  #projetos {
    padding: 40px 15px;
  }
  .container-principal h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
  }
  .mini-card img {
    height: 130px;
  }
  .mini-card h3 {
    font-size: 1rem;
  }
  .mini-card p {
    font-size: 0.85rem;
  }
}

