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

:root {
  --Soft-Blue: hsl(215, 51%, 70%);
  --Cyan: hsl(178, 100%, 50%);
  --Very-dark-blue-1: hsl(217, 54%, 11%);
  --Very-dark-blue-2: hsl(216, 50%, 16%);
  --Very-dark-blue-3: hsl(215, 32%, 27%);
  --White: hsl(0, 0%, 100%);
}

body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Outfit", sans-serif;
  background-color: var(--Very-dark-blue-1);
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.container {
  max-width: 350px;
  min-height: 580px;
  background-color: var(--Very-dark-blue-2);
  display: flex;
  flex-direction: column;
  border-radius: 0.7rem;
  box-shadow: 0 0 30px 5px rgba(0, 0, 0, 0.75);
}

.img-container {
  position: relative;
  width: 86%;
  margin: 0 auto;
  margin-top: 1.4rem;
}

.main-image {
  width: 100%;
  height: 280px;
  border-radius: 0.5rem;
  object-fit: cover;
}

.icon-view-container {
  position: absolute;
  width: 100%;
  height: 98.5%;
  top: 0;
  left: 0;
  background-color: hsla(178, 100%, 50%, 0.5);
  border-radius: 0.5rem;
  display: none;
  animation: anim 1.2s;
}

@keyframes anim {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}


.view-img {
  position: absolute;
  width: 3rem;
  height: 3rem;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.img-container:hover .icon-view-container {
  display: block;
  cursor: pointer;
}

.text-container {
  margin: 0 1.6rem 0 1.6rem;
}

h1 {
  font-size: 1.4rem;
  color: var(--White);
  margin-top: 1.5rem;
  width: 62%;
}

h1:hover {
  cursor: pointer;
  color: var(--Cyan);
}

.description {
  color: var(--Soft-Blue);
  line-height: 1.4rem;
  font-size: 1.1rem;
}

.price-section {
  display: flex;
  justify-content: space-between;
  margin-top: 1.6rem;
}

.icon {
  padding: 0 0.3rem 0 0;
  margin-bottom: -0.1rem;
}

.price {
  color: var(--Cyan);
  font-weight: 600;
}

.time {
  color: var(--Soft-Blue);
}

hr {
  border: none;
  border-top: 1Q solid rgba(85, 84, 84, 0.8);
  margin: 1.6rem 0;
}

.author-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.avatar-img {
  width: 2rem;
  height: 2rem;
  border: 1.9px solid white;
  border-radius: 50%;
}

.author-text {
  color: var(--Soft-Blue);
}

.author-text a {
  color: var(--White);
  text-decoration: none;
}

.author-text a:hover {
  color: var(--Cyan);
}

.attribution {
  color: var(--White);
  position: absolute;
  bottom: 0;
  font-size: 0.97rem;
  line-height: 0.8rem;
}

.attribution p a {
  color: var(--Soft-Blue);
}

.attribution p a:hover {
  opacity: 0.4;
}

@media (max-height: 720px) {
  .attribution {
    display: none;
  }
}

@media (max-width: 240px) {
  .attribution {
    display: none;
  }
}

@media (max-height: 590px) {
  body {
    height: auto;
    margin: 1.4rem;
  }
}

@media (max-width: 400px) {
  .author-container {
    margin-bottom: 1.4rem;
  }

  .img-container {
    width: 86%;
    margin: 0 auto;
    margin-top: 1.4rem;
  } 
}
