/* ASSZ Joomla Migration Helper V3 — Divi 4
 * Responsive imported media + featured/content lightbox compatibility.
 */
.et_pb_post_content img.assz-imported-image,
.entry-content img.assz-imported-image,
.et_pb_post_content img,
.entry-content img {
  max-width: 100%;
  height: auto !important;
}

/* Do not let a legacy fixed width force an image wider than its container. */
.et_pb_post_content .assz-lightbox-image,
.entry-content .assz-lightbox-image {
  display: inline-block;
  max-width: 100%;
  line-height: 0;
}

/* Keep old centered Joomla paragraphs visually centered. */
.et_pb_post_content p[style*="text-align: center"] .assz-lightbox-image,
.entry-content p[style*="text-align: center"] .assz-lightbox-image,
.et_pb_post_content p[align="center"] .assz-lightbox-image,
.entry-content p[align="center"] .assz-lightbox-image {
  display: inline-block;
}


/* Featured image shown by Divi Theme Builder. */
.assz-featured-lightbox {
  display: inline-block;
  max-width: 100%;
  line-height: 0;
}
.assz-featured-lightbox img,
img.assz-featured-image {
  max-width: 100%;
  height: auto !important;
}

/* WordPress gallery output created by the migration helper. */
.et_pb_post_content .gallery, .entry-content .gallery {
  display: grid !important;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 14px;
  margin: 20px 0 30px;
}
.et_pb_post_content .gallery .gallery-item, .entry-content .gallery .gallery-item {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  max-width: 100%;
}
.et_pb_post_content .gallery .gallery-icon img, .entry-content .gallery .gallery-icon img {
  width: 100%;
  height: auto !important;
  max-width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border: 0 !important;
  border-radius: 4px;
}
.et_pb_post_content .gallery .gallery-caption,.entry-content .gallery .gallery-caption {
  margin-top: 6px;
  font-size: .85em;
  line-height: 1.4;
}

/* Fallback date inserted only for imported Posts when enabled in Tools > ASSZ Migration. */
.assz-post-date {
  margin: 0 0 1.25em;
  font-size: .95em;
  line-height: 1.4;
  opacity: .75;
}
.assz-post-date time { white-space: nowrap; }

@media (max-width:767px){
  .et_pb_post_content .gallery, .entry-content .gallery {grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
}
@media (max-width:480px){
  .et_pb_post_content .gallery, .entry-content .gallery {grid-template-columns:1fr}
}
