@import "./styles.css";
* {
  margin: 0;
}

body {
  background-color: var(--bgColor);
  font-family: "Poppins";
}

/*Using 'h3' for the title cards*/
main h3,
h1 {
  text-align: center;
  margin-top: auto;
}

h1 {
  text-align: center;
  border-bottom: 2px solid var(--blockColorSecondary);
  color: var(--titleColor);
  background: var(--blockColorPrimaryTransparency);
  padding: 15px;
}

/*Using 'grid' for the cards*/
.gridCard {
  display: grid;
  flex-direction: row;
  padding: 1rem 0;
  justify-content: center;
  flex-wrap: wrap;
  grid-template-columns: repeat(auto-fit, minmax(240px, 300px));
  margin: 10% 10%;
}

/*One card block*/
.card {
  position: relative;
  width: 300px;
  height: 300px;
  border-radius: 100%;
  overflow: hidden;
  margin-bottom: 1rem;
  background-color: #aaa;
  box-shadow: -2px 5px 10px var(--blockColorSecondary);
}

.cardPicture img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.cardTitle {
  position: absolute;
  bottom: 0;
  height: 50px;
  width: 100%;
  padding-top: 10px;
  background-color: var(--blockColorPrimaryTransparency);
  text-align: center;
  color: var(--titleColorTransparency);
}

.postCardDescription {
  background-color: var(--titleColorTransparency);
  color: var(--blockColorPrimaryTransparency);
  font-size: 16px;
  padding: 16px 32px;
  border: 1px solid var(--blockColorPrimaryTransparency);
  border-radius: 15px;
  margin-bottom: 5rem;
}

.middle {
  visibility: hidden;
  display: none;
}

@media screen and (min-width: 768px) {
  .boxCard {
    margin: 10% 10%;
    border: 1px solid var(--blockColorSecondary);
    border-radius: 15px;
    box-shadow: -2px 5px 10px var(--blockColorSecondary);
  }

  .gridCard {
    display: flex;
    gap: 5rem;
    margin: 5% 15%;
  }

  .boxCard h1 {
    text-align: center;
    color: var(--titleColor);
    background: var(--blockColorPrimaryTransparency);
    border-radius: 14px;
    border-bottom-left-radius: 0px;
    border-bottom-right-radius: 0px;
    padding: 15px 15px 0 0;
  }

  .cardDescription {
    background-color: var(--titleColorTransparency);
    color: var(--blockColorPrimaryTransparency);
    font-size: 16px;
    padding: 16px;
  }

  /*Using middle for hover*/
  .middle {
    display: block;
    transition: 0.5s ease;
    opacity: 0;
    visibility: visible;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    text-align: left;
  }

  /*Style for hover card*/
  .card:hover .image {
    opacity: 0.3;
  }

  /*Style for hover card*/
  .card:hover .middle {
    opacity: 1;
  }

  .postCardDescription {
    visibility: hidden;
    display: none;
  }
}
