/* Homepage right-hand column: announcements above the full daily-reading text.
   News remains the left column. Keep all cards in the markup until visual review. */

/* Prevent a long Scripture text from stretching the news card to an empty height. */
.home-main .home-dynamic-content .two-columns {
  align-items: start;
}
.home-main .home-right-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 18px;
  min-width: 0;
}

.home-main .home-dynamic-content .home-right-column > .announce-panel {
  min-height: 0;
  min-width: 0;
  padding: 22px;
}

.home-main .home-readings-panel {
  min-width: 0;
  min-height: 0;
  padding: 24px;
}

.home-main .home-readings-panel__header {
  margin-bottom: 16px;
}

.home-main .home-readings-panel__date {
  margin: 0 0 9px;
  color: #7b6457;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.home-main .home-readings-panel__header h2 {
  margin: 0;
  color: var(--red);
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 500;
  line-height: 1.25;
  text-transform: uppercase;
}

.home-main .home-readings-text {
  color: #46382f;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: normal;
}

/* The existing mobile placement script moves the entire paired column.
   Both cards are immediately below the hero, before the quick links. */
@media (max-width: 760px) {
  .home-main .mobile-announcements-after-hero .home-right-column {
    width: 100%;
    gap: 14px;
  }

  .home-main .mobile-announcements-after-hero .home-right-column > .announce-panel {
    min-height: 0;
    padding: 16px;
    border-radius: 20px;
  }

  .home-main .mobile-announcements-after-hero .home-readings-panel {
    padding: 20px 18px;
    border-radius: 20px;
  }

  .home-main .mobile-announcements-after-hero .home-readings-panel__header h2 {
    font-size: 21px;
  }

  .home-main .mobile-announcements-after-hero .home-readings-text {
    font-size: 15px;
    line-height: 1.6;
  }
}

/* CSS-only desktop alignment: the news card defines the row's natural height.
   Size containment prevents a long reading or many announcements from forcing
   the news row taller. The right column fills this row; the reading stays at
   its bottom, with intentionally blank space below a short announcement.
   Content is never silently cut: overflowing panels are independently scrollable. */
@media (min-width: 901px) {
  .home-main .home-dynamic-content .two-columns {
    align-items: stretch;
  }

  .home-main .home-dynamic-content .two-columns > .news-panel {
    align-self: start;
  }

  .home-main .home-dynamic-content .two-columns > .home-right-column {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-self: stretch;
    contain: size;
    min-height: 0;
    gap: 18px;
  }

  .home-main .home-dynamic-content .home-right-column > .announce-panel {
    flex: 0 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .home-main .home-dynamic-content .home-right-column > .home-readings-panel {
    display: flex;
    flex: 0 1 auto;
    flex-direction: column;
    max-height: 48%;
    min-height: 0;
    overflow: hidden;
  }

  .home-main .home-dynamic-content .home-right-column .home-readings-text {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}
