/* =====================================================================
   SoftCards v2.3 — Unified Card Display System
   Location: /wp-content/themes/SoftTopsTheme/softcards.css
   ---------------------------------------------------------------------
   🧱 Used by: [articlecards], [albumcards], [eventcards]
   🖌️ Features:
       - 3-across responsive grid (desktop)
       - unified “card” style with subtle shadows
       - dark variant (opt="green")
       - automatic single-item formatting
       - smoother mobile stacking
   ===================================================================== */

/* --- Theme colours --------------------------------------------------- */
:root {
  --soft-green: #1a3b2e;
  --soft-cream: #eae3d1;
  --soft-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

/* --- Wrapper ---------------------------------------------------------- */
.softcards-wrapper {
  max-width: 1400px;
  margin: 0 auto 40px auto;
  padding: 0 16px;
}

/* Optional colour themes */
.softcards-wrapper.opt-green {
  background: var(--soft-green);
  color: var(--soft-cream);
  border-radius: 14px;
  padding: 25px;
}

.softcards-wrapper.opt-cream {
  background: var(--soft-cream);
  color: var(--soft-green);
  border-radius: 14px;
  padding: 25px;
}

/* --- Title ------------------------------------------------------------ */
.softcards-title {
  text-align: center;
  font-weight: 700;
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  margin: 0 0 22px;
  color: var(--soft-green);
}

/* --- Grid ------------------------------------------------------------- */
.softcards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 22px;
  align-items: stretch;
}

.softcards-grid.softcards-single {
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Individual Card -------------------------------------------------- */
.softcard {
  background: var(--soft-cream);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--soft-shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.softcards-wrapper.opt-green .softcard {
  background: #234f3c;
}

.softcard:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26, 59, 46, 0.12);
}

/* --- Image ------------------------------------------------------------ */
.softcard-img {
  aspect-ratio: 16 / 9;
  background: #d8d2bf;
  display: block;
  overflow: hidden;
}

.softcard-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Content ---------------------------------------------------------- */
.softcard-content {
  padding: 14px 16px 16px;
  color: var(--soft-green);
  line-height: 1.55;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.softcards-wrapper.opt-green .softcard-content {
  color: var(--soft-cream);
}

.softcard-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 0 6px 0;
}

.softcard-title a {
  color: inherit;
  text-decoration: none;
}

.softcard-title a:hover {
  text-decoration: underline;
}

.softcard-meta {
  font-size: 0.9rem;
  opacity: 0.85;
  margin: 2px 0 8px;
}

.softcard-excerpt {
  font-size: 0.95rem;
}

/* --- Load More -------------------------------------------------------- */
.softcards-controls {
  text-align: center;
  margin-top: 28px;
}

.softcards-load-more {
  display: inline-block;
  margin: 0 auto;
  padding: 10px 20px;
  border-radius: 10px;
  border: 2px solid var(--soft-green);
  background: var(--soft-cream);
  color: var(--soft-green);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.softcards-load-more:hover {
  background: var(--soft-green);
  color: var(--soft-cream);
}

/* --- Empty Message ---------------------------------------------------- */
.softcards-empty {
  text-align: center;
  color: var(--soft-green);
  opacity: 0.8;
  font-size: 1rem;
  padding: 40px 0;
}

/* --- Responsive ------------------------------------------------------- */
@media (max-width: 768px) {
  .softcards-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .softcards-wrapper.opt-green,
  .softcards-wrapper.opt-cream {
    padding: 18px;
  }
}

/* =====================================================================
   MODULE 2.3F — Grid Density & Column Standardisation
   ===================================================================== */

/* Force consistent 3-column grid on desktop */
.softcards-grid {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 18px; /* reduced vertical gap */
}

/* Single card layout */
.softcards-grid.softcards-single {
  max-width: 760px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .softcards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .softcards-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* ================================================================
   PATCH v2.3F.1 — Grid Gap Refinement for tighter rows
   ================================================================ */
.softcards-grid {
  row-gap: 14px !important;
  column-gap: 18px !important;
}

/* ================================================================
   MODULE 2.3G — Grid Refinement + Forum SoftList Layout
   ================================================================ */

/* --- Tighter gaps for all grid types --- */
.softcards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  column-gap: 16px;
  row-gap: 10px; /* tighter! */
}

/* --- SoftList (Forum layout) --- */
.softlist {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.softlist-item {
  display: flex;
  align-items: center;
  background: #eae3d1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.softlist-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}

.softlist-img {
  width: 120px;
  height: 90px;
  flex-shrink: 0;
  object-fit: cover;
  border-right: 2px solid #1a3b2e;
}

.softlist-content {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.softlist-title {
  font-weight: 700;
  font-size: 1rem;
  color: #1a3b2e;
  margin-bottom: 4px;
}

.softlist-meta {
  font-size: 0.9rem;
  color: #1a3b2e;
  opacity: 0.8;
}

.softlist-status {
  background: #1a3b2e;
  color: #eae3d1;
  padding: 3px 8px;
  font-size: 0.8rem;
  border-radius: 6px;
  margin-left: auto;
}

@media (max-width: 768px) {
  .softlist-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .softlist-img {
    width: 100%;
    height: 160px;
    border-right: none;
    border-bottom: 2px solid #1a3b2e;
  }
  .softlist-status {
    margin-top: 6px;
    align-self: flex-end;
  }
}

/* =======================================================================
   MODULE 2.3H — Forum SoftList Refinements (Hover, Click, Meta)
   ======================================================================= */

/* --- Adjust meta label to read naturally --- */
.softlist-meta {
  font-size: 0.9rem;
  color: #1a3b2e;
  opacity: 0.8;
}

/* --- Hover visual: soft lift + warm highlight --- */
.softlist-item {
  cursor: pointer;
  transition: all 0.25s ease;
}
.softlist-item:hover {
  transform: translateY(-2px);
  background-color: #f2ebd9; /* lighter cream */
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

/* --- Optional sticky topic separator (inactive by default) ---
.softlist-item.sticky::before {
  content: "Pinned";
  background: #1a3b2e;
  color: #eae3d1;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
  position: absolute;
  top: 6px;
  right: 8px;
}
*/

/* --- Status badge link styling --- */
.softlist-status a {
  color: #eae3d1;
  text-decoration: none;
}
.softlist-status a:hover {
  text-decoration: underline;
}

/* --- Optional dark variant base --- */
.softlist.dark .softlist-item {
  background: #1a3b2e;
  color: #eae3d1;
  border-color: rgba(255,255,255,0.1);
}
.softlist.dark .softlist-status {
  background: #eae3d1;
  color: #1a3b2e;
}
.softlist.dark .softlist-item:hover {
  background: #234e3d;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}


