@font-face {
    font-family: "Rodondo";
    src: url(font/Rodondo.otf) format(truetype);
}

header{
  text-align: center;
  background-color: #b6b2b2;
  padding: 1.1rem;
  font-size: 1.5rem;
  border-radius: 10px;
}

body{
  margin: 0;
  background-image: url(img/bg/bg.webp);
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
}

html{
    font-family: "Rodondo", sans-serif;
    font-size: large;
}

p{
    font-size: 1.4rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem 2rem;
  padding: 2rem;
  justify-content: center;
  justify-items: center;
}

.card {
  perspective: 1000px;
  width: 300px;
  height: 400px;
  position: relative;
}

.card-front, .card-back {
  color: white;
  border-radius: 10px;
  padding: 1rem;
  backface-visibility: hidden;
  transition: transform 0.6s ease;
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.card-front img{
    width: 90%;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    
}

.card-front {
  z-index: 2;
}

.card-back {
  transform: rotateY(180deg);
}

.card:hover .card-front {
  transform: rotateY(180deg);
}

.card:hover .card-back {
  transform: rotateY(0deg);
}

footer{
  background-color: #222;
  padding: 1.2rem;
  color: white;
}

footer p{
  font-size: 1rem;
  text-align: left;
}

@media (max-width: 600px) {
  html {
    font-size: medium;
    line-height: 1;
  }

  header {
    font-size: 1.1rem;
    padding: 0.7rem;
  }

  .gallery {
    grid-template-columns: 1fr;
    gap: 2.8rem 2rem;
    padding: 0.7rem;
    margin: 0 auto;
  }

  .card {
    width: 95vw;
    max-width: 340px;
    height: 320px;
    margin-left: auto;
    margin-right: auto;
  }

  .card-front img {
    width: 90%;
    max-height: 200px;
    object-fit: cover;
  }

  p {
    font-size: 1.1rem;
  }

  footer {
    font-size: 0.9rem;
    padding: 0.7rem;
  }
}