@import url("standard.css");

#cast_container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

article {
  display: flex;
  flex-direction: column;
  width: 100%;
  background-color: var(--text-bg);
  place-self: center;
}

h2 {
  font-size: clamp(1.4rem, 8vw, 2.5rem);
}

h2,
p {
  color: var(--white);
  padding: 1rem;
}

p:nth-last-child(2) {
  display: none;
}

p:nth-last-child(2).active {
  display: block;
}

.read_more {
  padding: 0 1rem 1rem;
  font-style: italic;
}

img {
  object-fit: cover;
  object-position: left;
}

/* MEDIA QUERIES */
/* TABLET */
@media screen and (min-width: 600px) {
  main {
    padding: 7rem 7rem;
  }

  article img {
    width: 80%;
  }

  article p {
    font-size: 1.1rem;
  }

  picture {
    display: flex;
    justify-content: center;
    padding: 2rem 0 1rem;
  }

  p:nth-last-child(2) {
    display: block;
  }

  .read_more {
    display: none;
  }
}

/* DESKTOP */

@media screen and (min-width: 1024px) {
  article {
    display: grid;
    max-width: 999px;
    grid-template-columns: auto;
    grid-template-rows: repeat(3, 1fr);
  }

  article picture {
    grid-area: 1 / 1 / -1 / 2;
    padding: 1rem 0 1rem;
  }

  article:nth-of-type(even) picture {
    grid-area: 1 / 2 / -1 / 3;
  }

  article h2 {
    grid-area: 1 / 2 / 2 / 3;
    justify-self: center;
    align-self: end;
  }

  article:nth-of-type(even) h2 {
    grid-area: 1 / 1 / 2 / 2;
  }

  article p {
    grid-area: 2 / 2 / 3 / 3;
    place-self: center;
  }

  article:nth-of-type(even) p {
    grid-area: 2 / 1 / 3 / 2;
  }

  article p:nth-last-child(2) {
    grid-area: 3 / 2 / -1 / 3;
    place-self: start;
    padding-top: 0;
  }

  article:nth-of-type(even) p:nth-last-child(2) {
    grid-area: 3 / 1 / -1 / 2;
    place-self: start;
    padding-top: 0;
  }
}
