/* Home page: News & Upcoming Events */
main.pt-20 > section:nth-of-type(4) {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 16%, hsl(38 55% 57% / 0.13), transparent 23rem),
    radial-gradient(circle at 92% 82%, hsl(185 30% 34% / 0.1), transparent 26rem),
    linear-gradient(180deg, hsl(42 30% 98%) 0%, hsl(42 25% 96%) 100%);
}

main.pt-20 > section:nth-of-type(4)::before,
main.pt-20 > section:nth-of-type(4)::after {
  content: "";
  position: absolute;
  width: 18rem;
  height: 18rem;
  border: 1px solid hsl(38 55% 57% / 0.16);
  border-radius: 50%;
  pointer-events: none;
}

main.pt-20 > section:nth-of-type(4)::before {
  top: -12rem;
  left: -8rem;
}

main.pt-20 > section:nth-of-type(4)::after {
  right: -10rem;
  bottom: -13rem;
}

main.pt-20 > section:nth-of-type(4) > .container-wide {
  position: relative;
  z-index: 1;
}

main.pt-20 > section:nth-of-type(4) > .container-wide > div:first-child {
  max-width: 46rem;
  margin-right: auto;
  margin-left: auto;
}

main.pt-20 > section:nth-of-type(4) > .container-wide > div:first-child::after {
  content: "Celebrating our community, faith and shared mission.";
  display: block;
  margin-top: 1rem;
  color: hsl(200 10% 42%);
  font-size: 1rem;
  line-height: 1.7;
}

main.pt-20 > section:nth-of-type(4) > .container-wide > div:last-child {
  gap: 1.5rem;
}

main.pt-20 > section:nth-of-type(4) > .container-wide > div:last-child > div {
  position: relative;
  min-height: 13.5rem;
  overflow: hidden;
  padding: 2rem;
  border: 1px solid hsl(38 30% 78% / 0.75);
  border-radius: 1rem;
  background: hsl(0 0% 100% / 0.92);
  box-shadow: 0 12px 34px hsl(210 25% 18% / 0.08);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

main.pt-20 > section:nth-of-type(4) .event-card-enhanced {
  display: flex;
  min-height: 27rem;
  flex-direction: column;
  padding: 0 !important;
}

main.pt-20 > section:nth-of-type(4) .event-card-image {
  position: relative;
  height: 12rem;
  flex: 0 0 auto;
  overflow: hidden;
  margin: 0;
  background: hsl(185 22% 88%);
}

main.pt-20 > section:nth-of-type(4) .event-card-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 58%, hsl(var(--navy-dark) / 0.2));
  pointer-events: none;
}

main.pt-20 > section:nth-of-type(4) .event-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 450ms ease;
}

main.pt-20 > section:nth-of-type(4) .event-card-enhanced:hover .event-card-image img {
  transform: scale(1.045);
}

main.pt-20 > section:nth-of-type(4) .events-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.75rem;
}

main.pt-20 > section:nth-of-type(4) .events-card-date {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid hsl(185 30% 34% / 0.16);
  border-radius: 999px;
  color: hsl(var(--accent));
  background: hsl(185 30% 34% / 0.08);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

main.pt-20 > section:nth-of-type(4) .events-card-date svg {
  width: 1rem;
  height: 1rem;
}

main.pt-20 > section:nth-of-type(4) .event-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.9rem;
  margin-top: auto;
  padding-top: 1rem;
  color: hsl(200 12% 48%);
  font-size: 0.84rem;
}

main.pt-20 > section:nth-of-type(4) .events-read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 1.1rem;
  color: hsl(var(--primary));
  font-size: 0.9rem;
  font-weight: 700;
}

main.pt-20 > section:nth-of-type(4) .events-read-more::after {
  content: "→";
  transition: transform 180ms ease;
}

main.pt-20 > section:nth-of-type(4) .event-card-enhanced:hover .events-read-more::after {
  transform: translateX(0.25rem);
}

main.pt-20 > section:nth-of-type(4) .event-card-link {
  position: absolute;
  inset: 0;
  z-index: 5;
  border-radius: inherit;
}

main.pt-20 > section:nth-of-type(4) .event-card-link:focus-visible {
  outline: 3px solid hsl(var(--gold));
  outline-offset: 4px;
}

main.pt-20 > section:nth-of-type(4) > .container-wide > div:last-child > div::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, hsl(38 55% 57%), hsl(38 68% 72%));
}

main.pt-20 > section:nth-of-type(4) > .container-wide > div:last-child > div:hover {
  transform: translateY(-6px);
  border-color: hsl(38 55% 57% / 0.75);
  box-shadow: 0 20px 45px hsl(210 25% 18% / 0.13);
}

main.pt-20 > section:nth-of-type(4) > .container-wide > div:last-child > div > div:first-child {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 1.25rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid hsl(185 30% 34% / 0.16);
  border-radius: 999px;
  background: hsl(185 30% 34% / 0.08);
  letter-spacing: 0.01em;
}

main.pt-20 > section:nth-of-type(4) > .container-wide > div:last-child > div h3 {
  margin-bottom: 0.75rem;
  font-size: 1.35rem;
  line-height: 1.35;
}

main.pt-20 > section:nth-of-type(4) > .container-wide > div:last-child > div p {
  line-height: 1.7;
}

@media (max-width: 767px) {
  main.pt-20 > section:nth-of-type(4) > .container-wide > div:last-child > div {
    min-height: 0;
    padding: 1.5rem;
  }

  main.pt-20 > section:nth-of-type(4) .event-card-enhanced {
    min-height: 0;
    padding: 0;
  }

  main.pt-20 > section:nth-of-type(4) .event-card-image {
    height: 13rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  main.pt-20 > section:nth-of-type(4) > .container-wide > div:last-child > div {
    transition: none;
  }
}

/* News and Events layout matched to lcm.org.au */
main.pt-20 > section.reference-news-section {
  overflow: visible;
  padding: 40px 0;
  background: #f4f4f4;
}

main.pt-20 > section.reference-news-section::before,
main.pt-20 > section.reference-news-section::after {
  content: none;
}

main.pt-20 > section.reference-news-section > .reference-news-inner {
  display: grid;
  width: min(100% - 40px, 1024px);
  max-width: 1024px;
  grid-template-columns: 197px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
  margin: 0 auto;
  padding: 0;
}

main.pt-20 > section.reference-news-section .reference-news-intro {
  max-width: none;
  margin: 0;
  text-align: left;
}

main.pt-20 > section.reference-news-section .reference-news-intro::after {
  content: none;
}

main.pt-20 > section.reference-news-section .reference-news-intro h2 {
  margin: 0 0 24px;
  color: #007da4;
  font-size: 35px;
  font-weight: 700;
  line-height: 42px;
  text-align: left;
}

.reference-news-discover {
  display: block;
  width: 100%;
  padding: 10px 12px;
  color: #007da4;
  background: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  text-align: center;
  text-decoration: none;
  transition: color 180ms ease, background-color 180ms ease;
}

.reference-news-discover:hover,
.reference-news-discover:focus-visible {
  color: #fff;
  background: #007da4;
}

main.pt-20 > section.reference-news-section .reference-news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  margin: 0;
}

main.pt-20 > section.reference-news-section .reference-news-card {
  display: flex;
  min-width: 0;
  min-height: 460px !important;
  flex-direction: column;
  overflow: visible;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  transition: transform 180ms ease;
}

main.pt-20 > section.reference-news-section .reference-news-card::before {
  content: none;
}

main.pt-20 > section.reference-news-section .reference-news-card:hover {
  border-color: transparent;
  box-shadow: none;
  transform: translateY(-4px);
}

.reference-news-image {
  position: relative;
  height: 177px;
  flex: 0 0 177px;
  overflow: hidden;
  margin: 0 !important;
  padding: 0 !important;
  background-color: #d9e3e7;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.reference-news-image-cover {
  position: absolute;
  inset: 0;
  background: rgba(0, 91, 121, 0.08);
  transition: background-color 180ms ease;
}

.reference-news-image > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reference-news-card[data-news-item="true"] .reference-news-image {
  height: auto;
  flex-basis: auto;
  aspect-ratio: 16 / 9;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
}

.reference-news-card[data-news-item="true"] .reference-news-image > img {
  border: 0;
  border-radius: 0 !important;
  object-fit: cover;
}

.reference-news-read-more {
  position: absolute;
  right: 15px;
  bottom: 0;
  left: 15px;
  z-index: 1;
  padding: 10px 0;
  color: #007da4;
  background: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  text-align: center;
  transform: translateY(100%);
  transition: transform 180ms ease;
}

.reference-news-card:hover .reference-news-image-cover,
.reference-news-card:focus-within .reference-news-image-cover {
  background: rgba(0, 91, 121, 0.28);
}

.reference-news-card:hover .reference-news-read-more,
.reference-news-card:focus-within .reference-news-read-more {
  transform: translateY(0);
}

main.pt-20 > section.reference-news-section .reference-news-content {
  display: block;
  min-height: 268px;
  flex: 1;
  margin-top: 15px;
  padding: 20px 15px;
  background: #fff;
}

main.pt-20 > section.reference-news-section .reference-news-content > div:first-child {
  display: block;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #686868;
  background: transparent;
  font-size: 14px;
  font-weight: 400;
  line-height: 24px;
}

main.pt-20 > section.reference-news-section .reference-news-content h3 {
  min-height: 58px;
  margin: 0;
  padding: 0 0 10px;
  color: #007da4;
  font-size: 18px !important;
  font-weight: 700;
  line-height: 24px !important;
}

main.pt-20 > section.reference-news-section .reference-news-content p {
  margin: 0;
  color: #686868;
  font-size: 16px;
  line-height: 24px;
}

main.pt-20 > section.reference-news-section .event-card-meta {
  margin-top: 12px;
  padding-top: 0;
  color: #686868;
}

main.pt-20 > section.reference-news-section .event-card-link {
  border-radius: 0;
}

main.pt-20 > section.reference-news-section .no-upcoming-events {
  grid-column: 1 / -1;
  display: flex;
  min-height: 220px;
  align-items: center;
  justify-content: center;
  padding: 32px;
  color: #686868;
  background: #fff;
  font-size: 16px;
  line-height: 24px;
  text-align: center;
}

@media (max-width: 900px) {
  main.pt-20 > section.reference-news-section > .reference-news-inner {
    grid-template-columns: 1fr;
  }

  main.pt-20 > section.reference-news-section .reference-news-intro {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
  }

  main.pt-20 > section.reference-news-section .reference-news-intro h2 {
    max-width: 18rem;
    margin-bottom: 0;
  }

  .reference-news-discover {
    width: auto;
    min-width: 160px;
  }
}

@media (max-width: 700px) {
  main.pt-20 > section.reference-news-section > .reference-news-inner {
    width: min(100% - 32px, 34rem);
  }

  main.pt-20 > section.reference-news-section .reference-news-intro {
    display: block;
  }

  main.pt-20 > section.reference-news-section .reference-news-intro h2 {
    margin-bottom: 20px;
  }

  .reference-news-discover {
    width: 100%;
  }

  main.pt-20 > section.reference-news-section .reference-news-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  main.pt-20 > section.reference-news-section .reference-news-card {
    min-height: 0;
  }

  .reference-news-image {
    height: 220px;
    flex-basis: 220px;
  }

  main.pt-20 > section.reference-news-section .reference-news-content {
    min-height: 0;
  }

  main.pt-20 > section.reference-news-section .reference-news-content h3 {
    min-height: 0;
  }
}
