﻿/* Clone-specific fixes: static Load More, responsive grid, forms, 404. */

/* The original EAEL grid used JS masonry. A CSS grid keeps appended cards aligned
   without any admin-ajax dependency and behaves well down to mobile. */
.eael-post-grid.eael-post-appender {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 30px !important;
  position: static !important;
  height: auto !important;
  column-count: unset !important;
}
.eael-post-grid .eael-grid-post {
  position: static !important;
  top: auto !important;
  left: auto !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  float: none !important;
  display: flex;
  flex-direction: column;
}
.eael-post-grid .eael-grid-post-holder,
.eael-post-grid .eael-grid-post-holder-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.eael-post-grid .eael-entry-media {
  overflow: hidden;
}
.eael-post-grid .eael-entry-thumbnail.eael-image-ratio {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}
.eael-post-grid .eael-entry-thumbnail.eael-image-ratio img {
  position: absolute;
  inset: 0;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: none;
}
.eael-post-grid .eael-entry-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}
.eael-post-grid .eael-entry-wrapper {
  flex: 1 1 auto;
}
.eael-post-grid .eael-grid-post-excerpt p {
  margin-bottom: 0;
}

/* Load More state */
.eael-load-more-button[disabled],
.eael-load-more-button.is-loading {
  opacity: 0.65;
  cursor: progress;
  pointer-events: none;
}
.eael-load-more-button .eael-btn-loader {
  display: none;
}
.eael-load-more-button.is-loading .eael-btn-loader {
  display: inline-block;
  animation: clone-spin 0.9s linear infinite;
}
@keyframes clone-spin {
  to { transform: rotate(360deg); }
}

/* Forms */
.clone-form-status.is-success { color: #1f6b3b; }
.clone-form-status.is-error { color: #a3261b; }
.clone-form-status.is-pending { color: #555; }

/* Keep grid cards and archive cards from overflowing on small screens. */
@media (max-width: 767px) {
  .eael-post-grid.eael-post-appender {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  .nv-post-thumbnail-wrap img,
  .eael-entry-thumbnail img {
    max-width: 100%;
    height: auto;
  }
}

/* Inline image dimensions from the old WP markup should never force overflow. */
img {
  max-width: 100%;
  height: auto;
}


/* Prevent long unbroken strings (emails, URLs) from causing horizontal overflow. */
main, .elementor-widget-text-editor, .elementor-widget-container { overflow-wrap: anywhere; }
.elementor-section, .elementor-container { max-width: 100%; }

