/* ------------ Blog Listing --------------- */

.blog-listing {
  width: 100%;
}

.blog-listing__container {
  width: 100%;
}

.blog-listing__title {
  margin-bottom: 2rem;
}

.blog-listing__title--center {
  text-align: center;
  display: block;
}

.blog-listing__posts {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.blog-listing__post {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.blog-listing__post:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.blog-listing__image-wrapper {
  width: 100%;
  flex-shrink: 0;
}

.blog-listing__image-link {
  display: block;
  width: 100%;
  overflow: hidden;
}

.blog-listing__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  aspect-ratio: 4 / 3;
  transition: transform 0.3s ease;
}

/* .blog-listing__image-link:hover .blog-listing__image {
  transform: scale(1.05);
} */

.blog-listing__content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.blog-listing__post-title {
  margin: 0;
}

.blog-listing__post-link {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

.blog-listing__post-link:hover {
  color: var(--btn-colour, #000);
}

.blog-listing__subtitle {
  margin: 0;
  color: rgba(0, 0, 0, 0.7);
}

.blog-listing__meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: rgba(0, 0, 0, 0.6);
  margin-top: 0.5rem;
}

.blog-listing__date,
.blog-listing__author {
  display: inline-block;
}

.blog-listing__button-wrapper {
  margin-top: 1rem;
}

.blog-listing__read-more {
  display: inline-block;
}

.blog-listing__empty {
  text-align: center;
  padding: 3rem 0;
  color: rgba(0, 0, 0, 0.6);
}

/* Desktop Layout - Image Left, Content Right */
@media screen and (min-width: 1024px) {
  .blog-listing__post {
    flex-direction: row;
    gap: 2rem;
    align-items: flex-start;
    padding-bottom: 2.5rem;
    margin-bottom: 2.5rem;
  }

  .blog-listing__image-wrapper {
    width: 40%;
    max-width: 500px;
    flex-shrink: 0;
  }

  .blog-listing__image {
    aspect-ratio: 16 / 10;
  }

  .blog-listing__content {
    width: 60%;
    flex: 1;
    justify-content: flex-start;
  }

  .blog-listing__meta {
    flex-direction: row;
    gap: 0.5rem;
  }

  .blog-listing__meta::before {
    content: '';
    display: none;
  }
}

/* ------------ Blog Entry --------------- */

.blog-entry {
  width: 100%;
  padding-bottom: 2rem;
}

.blog-entry__container {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
}

.blog-entry__hero-image {
  width: 100%;
  max-width: 100%;
  margin: 0 auto 2rem;
  overflow: hidden;
  border-radius: 8px;
}

.blog-entry__hero-image--full-width {
  width: 100vw;
  /* height: 50vh; */
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-bottom: 2rem;
  overflow: hidden;
  border-radius: 0;
}

.blog-entry__image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: center;
}

.blog-entry__header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.blog-entry__title {
  margin-bottom: 1rem;
}

.blog-entry__subtitle {
  margin: 0;
  color: rgba(0, 0, 0, 0.7);
  font-size: 1.125rem;
  line-height: 1.6;
}

.blog-entry__meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: rgba(0, 0, 0, 0.6);
  margin-top: 1rem;
}

.blog-entry__date,
.blog-entry__author {
  display: inline-block;
}

.blog-entry__content {
  line-height: 1.8;
  color: rgba(0, 0, 0, 0.85);
}

/* Tablet breakpoint */
@media screen and (min-width: 503px) and (max-width: 1023px) {
  
  .blog-entry__hero-image {
    max-width: 60%;}

    .blog-entry__hero-image--full-width {
      height: 50vh;
    }
}

/* Desktop Layout */
@media screen and (min-width: 1024px) {
  .blog-entry__container {
    max-width: 600px;
  }

  .blog-entry__hero-image {
    max-width: 40%;
    margin-bottom: 3rem;
  }

  .blog-entry__hero-image--full-width {
    height: 50vh;
  }


  .blog-entry__header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
  }

  .blog-entry__subtitle {
    font-size: 1.25rem;
  }

  .blog-entry__meta {
    flex-direction: row;
    gap: 1rem;
  }

  .blog-entry__content {
    font-size: 1.0625rem;
  }
}

/* Blog Entry Navigation */
.blog-entry__navigation {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 2rem;
}




/* ============================================
   BLOG ENTRY MATRIX BLOCKS STYLES
   ============================================ */

/* Rich Text Block */
.blog-entry__rich-text {
  margin-bottom: 2rem;
  line-height: 1.8;
  color: rgba(0, 0, 0, 0.85);
}

.blog-entry__rich-text p {
  margin-bottom: 1.5rem;
}

.blog-entry__rich-text p:last-child {
  margin-bottom: 0;
}

.blog-entry__rich-text h2,
.blog-entry__rich-text h3,
.blog-entry__rich-text h4 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.blog-entry__rich-text h2:first-child,
.blog-entry__rich-text h3:first-child,
.blog-entry__rich-text h4:first-child {
  margin-top: 0;
}

.blog-entry__rich-text a {
  color: var(--btn-colour, #000);
  text-decoration: underline;
  transition: opacity 0.2s ease;
}

.blog-entry__rich-text a:hover {
  opacity: 0.7;
}

/* ============================================
   IMAGE ENTRY BLOCK STYLES
   ============================================ */

.blog-entry__image-entry {
  margin: 2rem 0;
  padding: 0;
  border: none;
}

.blog-entry__image-entry-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: center;
  margin-bottom: 0;
  border-radius: 8px;
}

/* Desktop - Add more breathing room for images */
@media screen and (min-width: 1024px) {
  .blog-entry__image-entry {
    margin: 3rem 0;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
  }

  .blog-entry__image-entry-img {
    border-radius: 8px;
  }
}

/* ============================================
   VIDEO ENTRY BLOCK STYLES
   ============================================ */

.blog-entry__video-title {
  margin-bottom: 1.5rem;
  font-size: var(--font-size-h3);
  font-family: var(--font-heading);
  font-weight: var(--font-weight-h3);
}

.blog-entry__video-embed {
  margin: 2rem 0;
  width: 100%;
}

/* The video-embed-wrapper is already defined in global styles */

@media screen and (min-width: 1024px) {
  .blog-entry__video-embed {
    margin: 3rem 0;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ============================================
   IMAGE STRIP BLOCK WITHIN BLOG ENTRY
   ============================================ */

.image-strip {
  margin: 2rem 0;
  width: 100%;
}

@media screen and (min-width: 1024px) {
  .image-strip {
    margin: 3rem 0;
  }
}

/* ============================================
   BLOCK SPACING UTILITIES
   ============================================ */

/* Spacing between matrix blocks */
.blog-entry__content > * + * {
  margin-top: 1rem;
}

@media screen and (min-width: 1024px) {
  .blog-entry__content > * + * {
    margin-top: 1.5rem;
  }
}

/* Remove double margins between consecutive rich text blocks */
.blog-entry__rich-text + .blog-entry__rich-text {
  margin-top: 0;
}

