@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap");

:root {
  --primary-color: hsl(215, 51%, 70%);
  --secondary-color: hsl(178, 100%, 50%);
  --bg-dark: hsl(217, 54%, 11%);
  --bg-medium: hsl(216, 50%, 16%);
  --bg-light: hsl(215, 32%, 27%);
}

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

body {
  height: 100vh;
  font-family: "Outfit", sans-serif;
  color: var(--primary-color);
  background: var(--bg-dark);
  display: flex;
  justify-content: center;
  align-items: center;
}

.card-container {
  background: var(--bg-medium);
  max-width: 350px;
  border-radius: 1rem;
  padding: 1.5rem;
  margin: 0 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.img-container {
  position: relative;
  width: 100%;
  border-radius: 1rem;
  transition: all 0.1s ease-in-out;
}

.img-container .main-img {
  display: block;
  width: 100%;
  border-radius: 1rem;
  margin: 0 auto;
}

.img-container .active-state-img {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3rem;
}

.img-container:hover {
  background: var(--secondary-color);
}
.img-container:hover .main-img {
  filter: opacity(0.5);
}
.img-container:hover .active-state-img {
  display: block;
}

h1 {
  font-size: 1.5rem;
  margin: 1rem 0;
}

h1 a {
  color: #f1f1f1;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease-in-out;
}

h1 a:hover {
  color: var(--secondary-color);
}

p {
  font-weight: 300;
  line-height: 1.5rem;
}

.utility {
  display: flex;
  justify-content: space-between;
  margin: 1rem 0;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--primary-color);
}

.utility img {
  height: 1.5rem;
}

.utility p,
.utility time {
  line-height: 1.5rem;
  text-align: center;
}

.date {
  display: flex;
}

.date time {
  margin-left: 0.5rem;
}

.price {
  display: flex;
  width: 40%;
}

.price p {
  margin-left: 0.5rem;
  font-weight: 600;
  color: var(--secondary-color);
}

.credit {
  display: flex;
  align-items: center;
}

.credit img {
  width: 3rem;
  border: 2px solid #f1f1f1;
  border-radius: 50%;
}

.credit p {
  margin-left: 1rem;
}

.credit a {
  text-decoration: none;
  color: #f1f1f1;
  transition: color 0.2s ease-in-out;
}

.credit a:hover {
  color: var(--secondary-color);
}

.attribution {
  position: absolute;
  bottom: 0;
  text-align: center;
  margin-bottom: 1rem;
}

@media screen and (min-width: 375px) {
  .card-container {
    max-width: 360px;
  }
}
