/* Divi Blog Module – Shared Post Archive Style

   Usage:
   - Add the CSS class "post-archive" to any Divi Blog / Divi Pixel Blog module
     that should use this card layout.
   - Add an additional class such as "newsletter-archive" only when a module
     needs newsletter/project-specific CSS overrides.
*/

.post-archive article {
    display: flex;
    flex-direction: row !important;
    align-items: stretch !important;
    height: auto !important;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 2rem;
    box-shadow: #000 0 1px 20px -14px;
    overflow: hidden;
}

.post-archive article .blog-image-wrap {
    display: flex !important;
    width: 40%;
    height: auto;
    overflow: hidden;
    align-self: stretch !important;
    flex: 0 0 40%;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    aspect-ratio: 16 / 10;
}

.post-archive .blog-image-wrap .entry-featured-image-url {
    display: flex !important;
    width: 100%;
    height: 100%;
    flex: 1 1 auto !important;
}

.post-archive .blog-image-wrap .entry-featured-image-url img {
    display: block;
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    flex: 1 1 auto !important;
    max-height: none !important;
}

.et_pb_blog.post-archive article .blog-content-wrap {
    width: 100%;
    height: auto;
    padding: 40px;
    align-content: center;
}

/* Stack layout under 1500px */
@media (max-width: 1499px) {

  .post-archive article {
    flex-direction: column !important;
  }

  .post-archive article .blog-image-wrap {
    flex: none;
    width: 100%;
    height: 260px;
    position: relative;
  }

  .post-archive article .blog-content-wrap {
    width: 100%;
    padding: 2.5rem;
  }

}

/* Support Divi Pixel structure */
.post-archive article .dipi-post-wrap {
  display: flex;
  flex-direction: row !important;
  align-items: stretch !important;
  width: 100%;
  height: auto !important;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 2rem;
  box-shadow: #000 0 1px 20px -14px;
  overflow: hidden;
}

/* Prevent double styling when Divi Pixel wrapper exists */
.post-archive article:has(.dipi-post-wrap) {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

/* Image wrapper inside Divi Pixel */
.post-archive article .dipi-post-wrap .blog-image-wrap {
  display: flex !important;
  width: 40%;
  flex: 0 0 40%;
  overflow: hidden;
  align-self: stretch !important;
  position: relative;
  aspect-ratio: 16 / 10;
}

/* Content wrapper inside Divi Pixel */
.post-archive article .dipi-post-wrap .blog-content-wrap {
  width: 100%;
  padding: 40px;
  align-content: center;
}

/* Responsive Divi Pixel structure */
@media (max-width: 1499px) {
  .post-archive article .dipi-post-wrap {
    flex-direction: column !important;
  }

  .post-archive article .dipi-post-wrap .blog-image-wrap {
    width: 100%;
    flex: none;
    height: 260px;
  }

  .post-archive article .dipi-post-wrap .blog-content-wrap {
    width: 100%;
    padding: 2.5rem;
  }
}

/* --------------------------------------------------
   Newsletter / Project Archive Specific Overrides
   --------------------------------------------------

   Add both classes to the module when needed:
   post-archive newsletter-archive

   Keep shared post/archive styling above. Add only true
   newsletter/project-specific differences in this section.
-------------------------------------------------- */

.post-archive.newsletter-archive article {
    /* Newsletter/project-specific styles can go here. */
}
