/* Blog section heading, desktop timeline metadata, and mobile modal refinements. */
.page__content .blog-journal-section {
  margin: 0 0 1.4rem;
}

.page__content .blog-section-title {
  margin: 0 0 0.72rem !important;
  padding: 0 !important;
  border: 0 !important;
  color: #202327 !important;
  font-size: 1.02em !important;
  font-weight: 300 !important;
  line-height: 1.45 !important;
}

.page__content .blog-section-rule {
  width: 100%;
  height: 0;
  margin: 0;
  border: 0;
  border-top: 0.5px solid #e6eaf0;
}

/* Pull the timeline up to the section rule instead of leaving a second large gap. */
html body .page__content .news-list {
  margin-top: 0 !important;
}

/* Travel captions align with the left edge of each photograph. */
html body .page__content .blog-travel-item figcaption {
  text-align: left !important;
}

/* Desktop timeline: date and place on separate lines left of the axis. */
@media (min-width: 769px) {
  html body .page__content .news-list {
    position: relative !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1.05rem !important;
    max-width: 930px !important;
    margin-right: auto !important;
    margin-left: auto !important;
    padding-left: 12.4rem !important;
  }

  html body .page__content .news-list::before {
    left: 10.15rem !important;
  }

  html body .page__content .news-card {
    position: relative !important;
    grid-template-columns: minmax(0, 1fr) 210px !important;
    width: 100% !important;
    min-height: 148px !important;
  }

  html body .page__content .news-card::before {
    left: -2.56rem !important;
  }

  html body .page__content .news-content {
    justify-content: center !important;
    align-items: center !important;
    padding: 1.05rem 1.25rem !important;
    text-align: center !important;
  }

  html body .page__content .news-content h3 {
    width: 100% !important;
    margin: 0 !important;
    font-size: 0.96em !important;
    line-height: 1.5 !important;
    text-align: center !important;
  }

  html body .page__content .news-meta {
    position: absolute !important;
    top: 50% !important;
    right: calc(100% + 3.35rem) !important;
    width: 9.25rem !important;
    margin: 0 !important;
    color: #737980 !important;
    font-size: 0.96em !important;
    font-weight: 300 !important;
    line-height: 1.42 !important;
    text-align: right !important;
    white-space: normal !important;
    transform: translateY(-50%) !important;
  }

  html body .page__content .news-meta-date,
  html body .page__content .news-meta-place {
    display: block !important;
  }

  html body .page__content .news-meta-place {
    margin-top: 0.12rem !important;
  }

  html body .page__content .news-meta-separator {
    display: none !important;
  }
}

@media (max-width: 768px) {
  /* Leave a generous tappable frame around the modal so tapping outside closes it. */
  html body .page__content .modal-overlay {
    align-items: center !important;
    padding: 3.5rem 1.25rem !important;
    cursor: pointer;
  }

  html body .page__content .modal-content {
    width: min(92vw, 560px) !important;
    max-height: calc(100svh - 7rem) !important;
    margin: 0 !important;
    cursor: default;
    overflow-y: auto !important;
  }

  html body .page__content .modal-image-wrap img {
    max-height: 28vh !important;
  }

  html body .page__content .modal-text {
    padding: 1.2rem 1.25rem 1.35rem !important;
  }

  /* Refined mobile close control: geometrically centered thin X in a subtle circle. */
  html body .page__content .close-button {
    display: block !important;
    position: absolute !important;
    width: 2.2rem !important;
    height: 2.2rem !important;
    top: 0.45rem !important;
    right: 0.45rem !important;
    padding: 0 !important;
    border: 0.5px solid rgba(79, 89, 100, 0.12) !important;
    border-radius: 50% !important;
    color: transparent !important;
    background: rgba(255, 255, 255, 0.78) !important;
    box-shadow: none !important;
    font-size: 0 !important;
    line-height: 0 !important;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
  }

  html body .page__content .close-button::before,
  html body .page__content .close-button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0.92rem;
    height: 1px;
    background: #56616c;
    transform-origin: center;
  }

  html body .page__content .close-button::before {
    transform: translate(-50%, -50%) rotate(45deg);
  }

  html body .page__content .close-button::after {
    transform: translate(-50%, -50%) rotate(-45deg);
  }
}
