/* Desktop */
.mdf-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, 1fr);
  padding: 25px;
    /* garante que os filhos empurrem os debaixo */
  align-items: start;
}

/* Tablet */
@media (max-width: 1024px) {
  .mdf-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 768px) {
  .mdf-grid {
    grid-template-columns: 1fr;
  }
}

#pacotes {
  display: block;        /* garante que se comporte como bloco */
  width: 100%;
  height: auto !important;
  min-height: 0;
  overflow: visible;     /* deixa crescer conforme os filhos */
}

/* se o pai do #pacotes for flex, isso ajuda */
#pacotes {
  align-self: stretch;
  flex: 0 0 auto;
}


.mdf-card {
  position: relative;
  border-radius: 3px;
  background-size: cover;
  background-position: center;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  aspect-ratio: 1 / 1; /* mantém quadrado */
  overflow: hidden;

  /* força o grid a respeitar a altura */
  min-height: 0;
}

.mdf-card h3 {
    margin: 0 0 10px;
    text-align: center;
    background: #FFF;
    width: 80%;
    border-radius: 4px;
    text-shadow: none;
    padding: 5px 8px;
    bottom: 10px;
    position: absolute;
    font-family: "Fredoka", sans-serif;
    color: #8445FF;
    font-size: 20px;  
}
