@import url('https://fonts.googleapis.com/css2?family=Cardo:wght@700&display=swap');

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

body {
  /* margin: 40px; */
  font-family: "Cardo", "serif";
  background: #fff;
  color: #000;
}

/* make a grid */

.wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, 400px);
  grid-auto-rows: 400px;
  /* grid-gap: 5px; */
  justify-content: center;
}

.wrapper > * {
  background-color: #fff;
  color: #000;
  /* border-radius: 4px; */
  overflow: hidden;
}

img, div.story {
  width: 400px;
}

div.story {
  padding: 5px;
  font-size: 16.9px;
  text-align: center;
  letter-spacing: 0em;
}

div.story[data-cursor="true"]::after {
  content: "";
  border-right: 8px solid black;
  margin-left: 3px;
}

.fade-in {
  transition: all 1.5s ease-in-out;
}

/*  Card  */

.card {
  display: flex;
  background-color: #ffffff;
  color: #000000;
  border-radius: 8px;
  /* box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); */
  margin-bottom: 5px;
  max-height: 124px;
  overflow: hidden;
  border: 1px solid black;
}

a {
  text-decoration: none;
}

.card-image {
  width: 30%;
  position: relative;
  overflow: hidden;
}

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

.card-content {
  flex: 1;
  padding: 5px;
}

.card-heading {
  font-size: 20px;
  margin: 0;
  margin-bottom: 5px;
}

.card-text {
  font-size: 13.6px;
  margin: 0;
}

@media screen and (min-width: 280px) and (max-width: 320px) {
  .wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, 250px);
    grid-auto-rows: 250px;
    /* grid-gap: 5px; */
    justify-content: center;
  }

  img, div.story {
    width: 250px;
    font-size: 14.8px;
  }

  div.story {
    padding: 5px;
  }

  .img-next {
    width: 232px;
    /* padding: 2px; */
    border: 1px solid gray;
  }
  .card {
    max-height: 76px;
    width: 100%;
  }
}

@media screen and (min-width: 320px) and (max-width: 360px) {
  .wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, 350px);
    grid-auto-rows: 350px;
    /* grid-gap: 5px; */
    justify-content: center;
  }

  img, div.story {
    width: 350px;
    font-size: 18.8px;
  }

  div.story {
    padding: 25px;
  }

  .img-next {
    width: 332px;
    /* padding: 2px; */
    border: 1px solid gray;
  }
  .card {
    max-height: 112px;
    width: 95%;
  }
}

@media screen and (min-width: 360px) and (max-width: 375px) {
  .wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, 350px);
    grid-auto-rows: 350px;
    /* grid-gap: 5px; */
    justify-content: center;
  }

  img, div.story {
    width: 350px;
    font-size: 18.8px;
  }

  div.story {
    padding: 25px;
  }

  .img-next {
    width: 332px;
    /* padding: 2px; */
    border: 1px solid gray;
  }
  .card {
    max-height: 112px;
    width: 100%;
  }
}

@media screen and (min-width: 375px) and (max-width: 414px) {
  .wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, 400px);
    grid-auto-rows: 400px;
    justify-content: center;
  }

  img, div.story {
    width: 400px;
    font-size: 21.9px;
  }

  div.story {
    padding: 25px;
  }

  .img-next {
    width: 380px;
    /* padding: 2px; */
    border: 1px solid gray;
  }
  .card {
    max-height: 112px;
    width: 96%;
  }
}

@media screen and (min-width: 414px) and (max-width: 420px) {
  .wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, 400px);
    grid-auto-rows: 400px;
    justify-content: center;
  }

  img, div.story {
    width: 400px;
    font-size: 21.9px;
  }

  div.story {
    padding: 25px;
  }

  .img-next {
    width: 380px;
    /* padding: 2px; */
    border: 1px solid gray;
  }
  .card {
    max-height: 112px;
    width: 100%;
  }
}

@media screen and (min-width: 420px) and (max-width: 480px) {
  .wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, 400px);
    grid-auto-rows: 400px;
    justify-content: center;
  }

  img, div.story {
    width: 400px;
    font-size: 22.9px;
  }

  div.story {
    padding: 25px;
  }

  .img-next {
    width: 395px;
    /* padding: 2px; */
    border: 1px solid gray;
  }
  .card {
    max-height: 112px;
    width: 100%;
  }
}

@media screen and (min-width: 480px) and (max-width: 540px) {
  .wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, 350px);
    grid-auto-rows: 350px;
    /* grid-gap: 5px; */
    justify-content: center;
  }

  img, div.story {
    width: 350px;
    font-size: 20.6px;
  }

  div.story {
    padding: 25px;
  }

  .img-next {
    width: 326px;
    /* padding: 2px; */
    border: 1px solid gray;
  }
  .card {
    max-height: 112px;
    width: 95%;
  }
}

@media screen and (min-width: 540px) and (max-width: 780px) {
  .wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, 450px);
    grid-auto-rows: 450px;
    /* grid-gap: 5px; */
    justify-content: center;
  }

  img, div.story {
    width: 450px;
    font-size: 21.6px;
  }

  div.story {
    padding: 25px;
  }
  .img-next {
    width: 432px;
    /* padding: 2px; */
    border: 1px solid gray;
  }
  .card {
    max-height: 112px;
    width: 95%;
  }
}

@media screen and (min-width: 780px) {
  .wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, 400px);
    grid-auto-rows: 400px;
    justify-content: center;
  }

  img, div.story {
    width: 400px;
    font-size: 21.6px;
  }

  div.story {
    padding: 20px;
  }
  .img-next {
    width: 380px;
    /* padding: 2px; */
    border: 1px solid gray;
  }
  .card {
    max-height: 112px;
    width: 100%;
  }
}

@media print {
  div.story {
    padding: 25px;
    font-size: 21.9px;
  }
  img {
    height: 100mm;
  }
}