/* --- Variables & Reset --- */
:root {
  --white: hsl(0, 0%, 100%);
  --light-gray: hsl(212, 45%, 89%);
  --grayish-blue: hsl(216, 15%, 48%);
  --dark-blue: hsl(218, 44%, 22%);
  --link: hsl(228, 45%, 44%);
  --transparent-0: transparent;
  --transparent-1: rgba(255, 255, 255, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Outfit", sans-serif;
  background-color: var(--light-gray);
  display: grid;
  justify-items: center;
  padding: 20px;
}

/* --- Card Styling --- */
.card {
  background-color: var(--white);
  border: 2px solid var(--light-gray);
  border-radius: 20px;
  box-shadow: 0px 15px 30px rgba(0, 0, 0, 0.08);
  /* Responsive grid layout Start */
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin: 0 auto;
  width: min(100%, 240px);
  /* Responsive grid layout End */
  padding: 12px;
  text-align: center;
  transition: transform 2s ease-in-out;
}

/* On mouse-over, add a deeper shadow */
.card:hover {
  box-shadow: 0 20px 40px 0 var(--grayish-blue);
  -webkit-transform: translateZ(-1000px) rotateY(90deg);
  -moz-transform: translateZ(-1000px) rotateY(90deg);
  -ms-transform: translateZ(-1000px) rotateY(90deg);
  -o-transform: translateZ(-1000px) rotateY(90deg);
  transform: translateZ(0px) rotateY(360deg);
  transition: transform 2s ease-in-out;
}

/* .card:hover::before {
  top: 100%;
  left: 100%;
} */

.card::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    var(--transparent-0),
    var(--transparent-1),
    var(--transparent-0)
  );
  top: -100%;
  left: -100%;
  transition: all 0.5s ease;
}

.card img {
  border-radius: 10px;
  display: block;
  width: 100%;
}

/* Add some padding inside the card container */
/* .container p:first-child,
.container p:nth-child(1) {
  font-weight: 700;
  padding: 10px 0;
}

.container p:nth-child(2) {
  color: hsl(216, 15%, 48%);
  font-size: 12px;
  font-weight: 400;
} */

.title {
  color: var(--dark-blue);
  font-weight: 700;
  line-height: 1.2;
  padding: 10px;
}

.description {
  color: var(--grayish-blue);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}

/* --- Footer --- */
.attribution {
  font-size: 11px;
  margin-top: 20px;
  bottom: 10px;
  position: absolute;
}

.attribution a {
  color: var(--link);
}

/* --- Responsive Design Start --- */

/* Adjust card width for extra extra extra large screens (extra-extra-extra-large/desktop) */
@media (min-width: 1920px) {
  .card {
    width: 16%;
  }
  .title {
    font-size: 1.1vw;
    padding: 20px 10px;
  }
  .description {
    font-size: 0.82vw;
    padding: 0 22px 20px;
  }
}

/* --- Responsive Design End --- */
