.body-membros {
  background-color: black;
}

#foto-fundo-membros {
  position: fixed;
  top: 0;
  width: 100%;
  height: 100vh;
  object-fit: cover;
  z-index: 0;
  -webkit-tap-highlight-color: transparent;

  /* filter: 
  brightness(0.8)
  saturate(1.1) */
}

#main-block {
  position: relative;
  z-index: 2;
  /* background-color: #5858585b; */
  background-color: #66604f7c;
  backdrop-filter: blur(4px);  
  transform: translateZ(0);
  box-shadow: 0 -10px 20px rgba(0, 0, 0, 0.35);

  border-radius: 20px 20px 0px 0px;
  padding: 30px;
  margin: 300px 0px 0px;
  /* max-width: 1200px;  */
  
  display: flex;
  flex-direction: column;
}

/* Título */
#title-membros {
  font-weight: bold;
  font-size: 30px;
  margin-bottom: 20px;
  /* color: #ff7e00; */
  color: whitesmoke;
  text-align: center;
  order: 2;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
  order: 1;
  -webkit-tap-highlight-color: transparent;
}

/* Esconde o checkbox padrão */
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* Trilho do switch */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: white;
  transition: 0.4s;
  border-radius: 34px;
  -webkit-tap-highlight-color: transparent;
}

/* Ícone dentro da bolinha */
.slider-icon {
  position: absolute;
  height: 30px;
  width: 30px;
  left: 3px;
  bottom: 3px;
  border-radius: 50%;
  transition: 0.4s;
  pointer-events: none;
  -webkit-tap-highlight-color: transparent;
}

/* Cor de fundo quando ativo */
.toggle-switch input:checked + .slider {
  background-color: #ff7e00;
}

/* Move o ícone para a direita */
.toggle-switch input:checked + .slider .slider-icon {
  transform: translateX(24px);
}

/* === efeito bubbly === */
.confetti-button:before, .confetti-button:after {
  position: absolute;
  content: '';
  display: block;
  width: 140%;
  height: 100%;
  left: -20%;
  z-index: -1000;
  transition: all ease-in-out 0.5s;
  background-repeat: no-repeat;
  -webkit-tap-highlight-color: transparent;
}

.confetti-button:before {
  display: none;
  top: -75%;
  background-image: radial-gradient(circle, #ffc400 20%, transparent 20%), radial-gradient(circle, transparent 20%, #fffb00 20%, transparent 30%), radial-gradient(circle, #ff0081 20%, transparent 20%), radial-gradient(circle, #ff7300 20%, transparent 20%), radial-gradient(circle, transparent 10%, #9dff00 15%, transparent 20%), radial-gradient(circle, #dfd32d 20%, transparent 20%), radial-gradient(circle, #ff0081 20%, transparent 20%), radial-gradient(circle, #ffbb00 20%, transparent 20%), radial-gradient(circle, #008cff 20%, transparent 20%);
  background-size: 30% 30%, 20% 20%, 15% 15%, 30% 30%, 18% 18%, 20% 20%, 15% 15%, 20% 20%, 18% 18%;
}

.confetti-button:after {
  display: none;
  bottom: -75%;
  background-image: radial-gradient(circle, #00aeff 20%, transparent 20%), radial-gradient(circle, #ff7300 20%, transparent 20%), radial-gradient(circle, transparent 10%, #ffae00 15%, transparent 20%), radial-gradient(circle, #ffae00 20%, transparent 20%), radial-gradient(circle, #ff0081 20%, transparent 20%), radial-gradient(circle, #ffee51 20%, transparent 20%), radial-gradient(circle, #e5ff00 20%, transparent 20%);
  background-size: 15% 15%, 20% 20%, 18% 18%, 20% 20%, 15% 15%, 10% 10%, 30% 30%;
}

.confetti-button:active {
  transform: scale(0.9);
  background-color: #e60074;
  box-shadow: 0 2px 25px rgba(255, 0, 130, 0.2);
}

.confetti-button.animate:before {
  display: block;
  animation: topBubbles ease-in-out 0.75s forwards;
} 

.confetti-button.animate:after {
  display: block;
  animation: bottomBubbles ease-in-out 0.75s forwards;
}
 @keyframes
topBubbles {  0% {
 background-position: 5% 90%, 10% 90%, 10% 90%, 15% 90%, 25% 90%, 25% 90%, 40% 90%, 55% 90%, 70% 90%;
}
 50% {
 background-position: 0% 80%, 0% 20%, 10% 40%, 20% 0%, 30% 30%, 22% 50%, 50% 50%, 65% 20%, 90% 30%;
}
 100% {
 background-position: 0% 70%, 0% 10%, 10% 30%, 20% -10%, 30% 20%, 22% 40%, 50% 40%, 65% 10%, 90% 20%;
 background-size: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%;
}
}
@keyframes
bottomBubbles {  0% {
 background-position: 10% -10%, 30% 10%, 55% -10%, 70% -10%, 85% -10%, 70% -10%, 70% 0%;
}
 50% {
 background-position: 0% 80%, 20% 80%, 45% 60%, 60% 100%, 75% 70%, 95% 60%, 105% 0%;
}
 100% {
 background-position: 0% 90%, 20% 90%, 45% 70%, 60% 110%, 75% 80%, 95% 70%, 110% 10%;
 background-size: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%;
}
}

/* Container para os filtros */
.filters-container {
  display: flex;
  gap: 10px; 
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
  order:3;
}

/* Botões de filtro */
.filter-button {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  border: none;
  background-color: white;
  color: #ff7e00;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;
  width: 180px; /* garante o mesmo tamanho */
}

.filter-button:hover {
  background-color: #ff7e00;
  color: white;
}

/* Grid responsivo para membros */
#team-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center; 
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  order:4;
}

.member-card {
  position: relative;
  flex: 0 0 170px;
  height: 250px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  text-align: center;
  overflow: hidden;
  padding: 15px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  contain: layout;
  backface-visibility: hidden;
}

.member-photo-wrapper {
  width: 150px;
  height: 150px;
  margin: 0 auto 10px auto;
  border-radius: 50%;
  overflow: hidden;
  background-color: #e6e6e6; 
  flex-shrink: 0;
}

.member-foto {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.member-foto.animate-change {
  opacity: 0;
  transform: scale(0.8);
}

.departamento-icon {
  position: relative;
  z-index: 5;
  bottom: 20px;
  width: 35px;
}

.member-card h3 {
  margin-top: -15px;
  font-size: 20px;
  color: #000;
}

.member-nome {
  margin-bottom: 5px;
  color: #333;
}

.member-info {
  position: absolute;
  inset: 0;

  background: white;
  color: #555;
  padding: 14px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;

  transform: translateY(100%);
  transition: transform 0.35s ease-in-out;

  z-index: 10;
  will-change: transform;
}

.member-card:hover .member-info {
  transform: translateY(0);
}

.member-info h4 {
  color: black;
  margin-bottom: 10px;
}

.member-role {
  font-style: italic;
  margin-bottom: 8px;
}

.member-meta {
  display: block;
}

.member-info img {
  width: 30px;
  margin-top: 20px;
}

@media (max-width: 1024px) {
    #main-block{
      align-items: center;
    }

  .filters-container {
    align-items: stretch;
    position: relative;
    top: 0;
    right: 0;
    margin-bottom: 20px;
    justify-content: center;
  }
  
  .filter-button {
    font-size: 12px;
  }

    .toggle-switch {
    display: block;
    margin: 0 auto 20px auto; 
    order: 2;
  }

  #title-membros {
    margin-top: 10px; 
    order: 1;
  }
}

@media (max-width: 430px) {
    .filters-container {
        flex-direction: column;
    }
    .filter-button{
        width: 100%;
    }
    #team-container {
        gap: 20px;
    }
    .member-card {
        max-width: 160px;
    }

  .toggle-switch {
    margin-bottom: 20px; 
  }
}