/* ==================================================== */
/*  NEWS PAGE STYLES                                    */
/*  Page: News                                          */
/*  Scope: #news-grid archive section + EAEL Post Grid  */
/* ==================================================== */

/* ============ */
/* GRID SECTION */
/* ============ */

#news-grid {
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}

@media (max-width: 767px) {
  #news-grid {
    padding-top: 1rem;
    padding-bottom: 2rem;
  }
}

/* ================== */
/* EA POST GRID CARDS */
/* ================== */

/* Post grid wrapper */
#news-grid .eael-post-grid-container {
  width: 100%;
  margin-top: 0.5rem !important; /* restore missing top spacing */
}

/* Each post item wrapper */
#news-grid .eael-grid-post {
  margin-bottom: 1.5rem !important;
}

/* Card surface */
#news-grid .eael-grid-post-holder {
  background: #ffffff !important;
  border-radius: 12px !important; /* fix rounded corners */
  border: 1px solid var(--bering-dark-grey) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06) !important;
  overflow: hidden !important;
  height: 100%;
  transition: transform 0.45s ease, box-shadow 0.45s ease !important;
}

/* Inner vertical layout */
#news-grid .eael-grid-post-holder-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Hover lift */
#news-grid .eael-grid-post-holder:hover {
  transform: translateY(-6px) scale(1.03) !important;
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.16) !important;
}

/* ============================= */
/* Rectangle Thumbnail Images (4:3) */
/* ============================= */

/* 1) Create a rectangle container (4:3) */
#news-grid .eael-entry-thumbnail {
  position: relative !important;
  width: 100%;
  padding-bottom: 75% !important; /* 4:3 aspect ratio */
  overflow: hidden !important;
}

/* 2) Make image fill the rectangle */
#news-grid .eael-entry-thumbnail img {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
}

/* ===================== */
/* CARD CONTENT TYPOGRAPHY */
/* ===================== */

#news-grid .eael-entry-wrapper {
  padding: 1.25rem 1.25rem 1rem !important;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

/* Card Title */
#news-grid .eael-entry-title {
  margin: 0 0 0.5rem !important;
  font-family: "Roboto Slab", serif !important;
  font-weight: 600 !important;
  font-size: 1.05rem !important;
  line-height: 1.4 !important;
  min-height: 2.94rem; /* 2 lines × line-height */
}

#news-grid .eael-entry-title a {
  color: #303c42 !important;
  text-decoration: none !important;
}

#news-grid .eael-entry-title a:hover {
  color: var(--bering-accent-hover) !important;
}

/* Excerpt */
#news-grid .eael-grid-post-excerpt p {
  margin: 0 0 0.75rem !important;
  font-size: 0.95rem !important;
  line-height: 1.6 !important;
  color: var(--bering-text) !important;
}

/* Footer meta (date, categories) */
#news-grid .eael-entry-header-after {
  margin-top: auto !important;
  padding-top: 0.75rem !important;
  border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
  font-size: 0.8rem !important;
  color: #999999 !important;
}

/* =========== */
/* Mobile tweaks */
/* =========== */

@media (max-width: 767px) {
  #news-grid .eael-grid-post-holder {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1) !important;
  }

  #news-grid .eael-entry-title {
    font-size: 1rem !important;
  }
}

/* =================== */
/* LOAD MORE BUTTON     */
/* =================== */

#news-grid button.eael-load-more-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  padding: 0.55rem 1.9rem !important;

  background-color: var(--bering-accent) !important;
  border: 1px solid var(--bering-accent) !important;
  color: #ffffff !important;
  border-radius: 999px !important;

  cursor: pointer;
  font-size: 0.95rem !important;
  font-weight: 600 !important;

  transition: background-color 0.25s ease, transform 0.15s ease !important;
}

/* Hover */
#news-grid button.eael-load-more-button:hover {
  background-color: var(--bering-accent-hover) !important;
  border-color: var(--bering-accent-hover) !important;
  transform: translateY(-2px) !important;
}

/* ===================== */
/* NUMBERED PAGINATION   */
/* ===================== */

#news-grid .eael-pagination {
  margin-top: 1.8rem !important;
  text-align: center !important;
}

#news-grid .eael-pagination .page-numbers {
  display: inline-block !important;
  padding: 0.35rem 0.85rem !important;
  margin: 0 0.12rem !important;
  border-radius: 999px !important;
  border: 1px solid transparent !important;
  font-size: 0.9rem !important;
}

#news-grid .eael-pagination .page-numbers.current {
  background-color: var(--bering-accent) !important;
  border-color: var(--bering-accent) !important;
  color: #ffffff !important;
}

#news-grid .eael-pagination a.page-numbers:hover {
  border-color: var(--bering-accent-hover) !important;
  color: var(--bering-accent-hover) !important;
}

/* ================ */
/* TITLE LINE CLAMP */
/* ================ */

/* Default = 2 lines */
#news-grid .eael-entry-title,
#news-grid .eael-entry-title a {
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}



/* Mobile Portrait = allow 3 lines */
@media (max-width: 767px) {
  #news-grid .eael-entry-title,
  #news-grid .eael-entry-title a {
    -webkit-line-clamp: 3 !important;
  }
}

