/* Blog cards */
/* ======================================
   BLOG POST CARD VARIABLES
====================================== */
/* ======================================
   SHARED BLOG POST GRID
====================================== */
.blog-post-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  width: 100%; }

@media (width >= 768px) {
  .blog-post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)); } }

@media (width >= 992px) {
  .blog-post-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ======================================
   BLOG POST CARD
====================================== */
.news-card {
  position: relative;
  min-width: 0;
  height: 100%;
  margin: 0;
  background: #ffffff;
  border: 2px solid var(--brand-teal);
  box-shadow: 0 8px 24px rgb(var(--secondary-rgb) / 12%);
  transition: transform 0.25s ease, box-shadow 0.25s ease; }
  .news-card:hover, .news-card:focus-within {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgb(var(--secondary-rgb) / 12%); }

.news-card__link {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  height: 100%;
  padding: 10px;
  color: var(--brand-purple);
  text-decoration: none; }
  .news-card__link:hover, .news-card__link:focus {
    color: var(--brand-purple);
    text-decoration: none; }
  .news-card__link:focus-visible {
    outline: 3px solid var(--brand-purple);
    outline-offset: 3px; }

/* ======================================
   BLOG POST IMAGE
====================================== */
.news-card__image {
  position: relative;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--brand-purple); }
  .news-card__image img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.35s ease; }

.news-card:hover .news-card__image img,
.news-card:focus-within .news-card__image img {
  transform: scale(1.08); }

/* ======================================
   BLOG POST CONTENT
====================================== */
.news-card__title {
  padding: 0.25rem 0.75rem 0;
  margin: 0;
  color: var(--brand-purple);
  font-family: "Manrope", sans-serif;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  overflow-wrap: break-word; }

.news-card__excerpt {
  display: -webkit-box;
  padding: 0 0.75rem;
  margin: 0;
  overflow: hidden;
  color: var(--brand-purple);
  font-family: "Manrope", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  text-align: left;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4; }

  .news-card__read-more {
  display: block;
  padding: 0 0.75rem;
  margin: 0;
  color: var(--brand-purple);
  font-family: "Manrope", sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  text-align: left; }

/* ======================================
   BLOG POST FOOTER
====================================== */
.news-card__footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0 0.75rem;
  margin-top: auto;
  margin-bottom: 0.75rem;
  color: var(--brand-purple);
  font-family: "Manrope", sans-serif;
  font-size: 14px;
  font-weight: 600; }

.news-card__profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0; }
  .news-card__profile img {
    display: block;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center; }

.news-card__author {
  overflow-wrap: break-word; }

.news-card__date {
  flex: 0 0 auto;
  margin: 0;
  font-weight: 400; }

@media (width >= 576px) {
  .news-card__footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem; } }

@media (width >= 768px) {
  .news-card__title {
    padding-right: 1rem;
    padding-left: 1rem;
    font-size: 28px; }
  .news-card__excerpt {
    padding-right: 1rem;
    padding-left: 1rem;
    font-size: 18px; }
  .news-card__read-more {
    padding-right: 1rem;
    padding-left: 1rem;
    font-size: 18px; }
  .news-card__footer {
    padding-right: 1rem;
    padding-left: 1rem;
    margin-bottom: 1rem;
    font-size: 16px; } }

/* ======================================
   REDUCED MOTION
====================================== */
@media (prefers-reduced-motion: reduce) {
  .news-card,
  .news-card__image img {
    transition: none; }
  .news-card:hover,
  .news-card:focus-within {
    transform: none; }
  .news-card:hover .news-card__image img,
  .news-card:focus-within .news-card__image img {
    transform: none; } }

/* Blog filters */

.donation-v2-amounts .custom-control:last-child,
.blog-filter .custom-control:last-child,
.donation-v2-electorate-amounts .custom-control:last-child {
  width: 100%;
}

/* CSS for the filtered Blog - largely copied from the donation amount buttons. */
.blog-filter a.primary {
  background-color: var(--primary); }

.blog-filter a.btn {
  width: auto; }

.blog-filter .custom-control:last-child {
  width: auto !important; }

/* Keep blog feature images consistently landscape without distorting them. */
.page-type-blog-post #page-features {
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.page-type-blog-post #page-features .carousel-inner,
.page-type-blog-post #page-features .carousel-item,
.page-type-blog-post #page-features .carousel-item > a {
  height: 100% !important;
}

/* Preserve full feature images; vendor CSS previously cropped them with cover. */
.carousel-item img {
  object-fit: contain;
}

