/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
1.0 Blog Posts
  1.1 Layout
  1.2 Post Content
  1.3 Post Excerpt
  1.4 Sidebar
2.0 Lyrics Page
  2.1 Layout
--------------------------------------------------------------*/

/*--------------------------------------------------------------
1.0 Blog Posts
--------------------------------------------------------------*/

/** 
  * 1.1 Layout
  *
  */

.blog-container {
  margin-top: var(--spacing-m);
  margin-bottom: var(--spacing-m);
}

/* Desktop Only */
@media (min-width: 1024px) {
  .blog__content {
    grid-area: content;
    justify-self: end;
    margin-inline: auto;
  }

  .has-sidebar {
    display: grid;
    grid-template-columns: auto 0.7fr;
    grid-template-areas: "content sidebar";
  }
}

/** 
  * 1.2 Post Content
  *
  */
.post {
  display: flex;
  flex-direction: column;
  align-items: center;

  width: 100%;
}

.post__image {
  width: 100vw;
  max-width: 1000px;
  height: 300px;

  object-fit: cover;

  background-position: center center;
  background-repeat: no-repeat;

  clip-path: inset(1em 1em 2em round 1.5em);
}

.post__content {
  width: calc(100% - 3.2rem);
  margin-inline: auto;
}

/* Fix too much space on top of post heading*/
.post__content h1 {
  margin-top: 2rem;
}

.post__author-img {
  grid-area: author-img;

  margin-right: 2.8rem;
  max-width: 10rem;
  height: auto;
}

.post__author-name {
  grid-area: author-name;
  align-self: flex-end;

  font-size: var(--ff-h4);
  font-family: var(--font-heading);
  color: var(--clr-text);

  line-height: 1;
}

.post__date {
  grid-area: date;
  align-self: flex-start;

  font-size: var(--ff-p);
  font-family: var(--font-text);
  color: var(--clr-text);
}

.post__meta {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-areas:
    "author-img author-name"
    "author-img date";

  justify-content: start;
  align-items: center;

  max-width: 40rem;
}

.post__tags {
  display: flex;
  flex-direction: row;
  gap: 10px;

  font-family: var(--font-heading);
  font-size: var(--ff-p);
  color: var(--clr-text);
}

.tag--hashtag::before {
  content: "#";
}

.post-share {
  width: calc(100% - var(--spacing-s));

  margin-top: var(--spacing-s);

  padding-top: 1rem;
  padding-bottom: 1rem;
  border-top: 4px solid var(--clr-brand-primary);
  border-bottom: 4px solid var(--clr-brand-primary);
}

.post-share__icon-container {
  display: flex;
  gap: 1rem;
}

.post-share__heading {
  font-size: var(--ff-h2);
  margin-top: 0;
  margin-bottom: 0;
}

.post-share__icon {
  font-size: var(--ff-h3);
  color: var(--clr-brand-primary);
}

.related-posts {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.related-posts__container {
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  gap: 20px;

  margin-top: var(--section-margin-top-bottom);
}

/* Desktop + Pad only styling */
@media (min-width: 768px) {
  .post__image {
    width: 100vw;
    height: 550px;
  }
}

/** 
  * 1.3 Post Excerpt
  *
  */
.post-excerpt__card h2,
.post-excerpt__card h3,
.post-excerpt__card p,
.post-excerpt__date,
.post-excerpt__button {
  margin-left: var(--section-margin-left-right);
  margin-right: var(--section-margin-left-right);
}

.post-excerpt__card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  max-width: 35rem;
  border-radius: 1em;
}

.post-excerpt__card h2,
.post-excerpt__card h3 {
  margin-top: 0;
}

.post-excerpt__image {
  width: 100%;
  height: 150px;

  overflow: hidden;

  object-fit: cover;

  background-position: center center;
  background-repeat: no-repeat;

  margin-bottom: 2.4rem;

  border-top-left-radius: 1em;
  border-top-right-radius: 1em;
}

.post-excerpt__button {
  display: block;
  margin-bottom: 3.2rem;
  max-width: fit-content;
}

.post-excerpt__date {
  font-family: var(--font-text);
  color: var(--clr-text-primary);
}

/** 
  * 1.3 Sidebar
  *
  */

.blog__sidebar {
  display: none;
  font-family: var(--font-text);
}

.blog__sidebar ul {
  list-style: none;
  padding: 0;
}

@media (min-width: 1024px) {
  .blog__sidebar {
    display: flex;
    grid-area: sidebar;

    max-width: 20rem;

    margin-left: 3.2rem;
  }
}
