/* ==========================================================
   Sprockett's — Community Custom CSS  (v5 — no :has(), broad fallback)
   Replaces v4. Removes :has() for maximum browser compatibility.
   Paste in: Settings → Branding → Custom CSS — then Save and Cmd+Shift+R.
   ========================================================== */

/* --- Brand typography --- */
body, button, input, textarea, select {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif !important;
}
h1, h2, h3, h4 {
  font-family: 'Outfit', sans-serif !important;
  font-weight: 800 !important;
  color: #1a1a2e !important;
}

/* --- Brand buttons --- */
button[class*="primary"],
.btn-primary,
button[type="submit"] {
  background-color: #1974CE !important;
  border-color: #1974CE !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
}
button[class*="primary"]:hover { background-color: #0d4f8a !important; }


/* ==========================================================
   POST FEED — full-width image on top of card
   No :has() — works on all browsers.
   ========================================================== */

/* 1. Stack post container vertically, image goes on top */
.post_container {
  flex-direction: column-reverse !important;
  gap: 14px !important;
  width: 100% !important;
}

/* 2. Force EVERY direct child of post_container to full width.
      This catches the right-column image wrap without :has(). */
.post_container > div {
  width: 100% !important;
  max-width: 100% !important;
  align-items: stretch !important;
  justify-content: stretch !important;
}

/* 3. Exception: the absolute "..." menu — keep it pinned top-right */
.post_container > div[class*="absolute"] {
  width: auto !important;
  max-width: none !important;
}

/* 4. Override the hard-coded h-[72px]/w-[72px] (mobile) and
      lg:h-[104px]/lg:w-[104px] (desktop) on the image wrapper */
.post_container [class*="border-communities-border"] {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9 !important;
  max-height: 460px !important;
  border-radius: 14px !important;
}

/* 5. Make wrapper inner divs fill */
.post_container [class*="border-communities-border"] > div,
.post_container [class*="border-communities-border"] > div > div {
  width: 100% !important;
  height: 100% !important;
}

/* 6. The image itself */
.post_container img[alt="Thumbnail"],
.post_container [class*="border-communities-border"] img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
}

/* 7. Force the inner flex containers around the image to also stretch */
.post_container [class*="flex-col"][class*="items-end"],
.post_container [class*="items-start"][class*="justify-end"] {
  width: 100% !important;
  align-items: stretch !important;
  justify-content: stretch !important;
}

/* 8. Post card visual polish */
.hl-card-content {
  border-radius: 16px !important;
  border: 1px solid #e5e5e5 !important;
  box-shadow: 0 1px 2px rgba(25,116,206,0.04) !important;
}

/* 9. Post title styling */
.post_container h2,
.post_container h3 {
  font-family: 'Outfit', sans-serif !important;
  font-weight: 800 !important;
  color: #1a1a2e !important;
}
