/* ==========================================================================
   Content pages: GeneralPage, BlogIndexPage, BlogPost, HistoricalContextPage
   and the image gallery block. Loads after base.css (and prose.css).
   ========================================================================== */

/* Page shell ------------------------------------------------------------- */
.content-page { background-color: var(--white-50); padding-top: 3rem; padding-bottom: 3rem; }
@media (min-width: 640px) { .content-page { padding-top: 4rem; padding-bottom: 4rem; } }
/* HistoricalContextPage never had a page background (bg-white was not in the build) */
.content-page--bare { background-color: transparent; }

.content-container {
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 640px) { .content-container { padding-left: 1.5rem; padding-right: 1.5rem; } }
@media (min-width: 1024px) { .content-container { padding-left: 2rem; padding-right: 2rem; } }

.content-header { margin-bottom: 2rem; }
.content-title {
  margin-bottom: 1rem;
  font-family: var(--font-display);
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 700;
  color: var(--black);
}
@media (min-width: 640px) { .content-title { font-size: 2.25rem; line-height: 2.5rem; } }
.content-title--plain { font-family: inherit; color: var(--gray-900); }
.content-byline { font-size: 1rem; line-height: 1.5rem; color: var(--gray-600); }

/* Body ------------------------------------------------------------------- */
.content-prose { max-width: none; }
.content-paragraph { font-size: 1.125rem; line-height: 1.625; color: var(--black); }

/* Child page listing (GeneralPage) --------------------------------------- */
.content-children { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--gray-200); }
.content-children__section { margin-bottom: 2.5rem; }
.content-children__title {
  margin-bottom: 1rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 700;
  color: var(--black);
}
.content-children__title a { transition: var(--transition-colors) 0.2s var(--ease); }
.content-children__title a:hover { color: var(--burgundy-700); }
.content-children__list { padding-left: 1rem; border-left: 2px solid var(--gray-200); }
.content-children__list > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }
.content-child {
  display: block;
  padding: 1rem;
  border-radius: 0.5rem;
  transition: var(--transition-colors) 0.2s var(--ease);
}
.content-child:hover { background-color: var(--gray-50); }
.content-child__title {
  margin-bottom: 0.25rem;
  font-size: 1.125rem;
  line-height: 1.75rem;
  font-weight: 600;
  color: var(--gray-900);
  transition: var(--transition-colors) 0.2s var(--ease);
}
.content-child:hover .content-child__title { color: var(--burgundy-700); }
.content-child__meta { margin-bottom: 0.5rem; font-size: 0.875rem; line-height: 1.25rem; color: var(--gray-500); }
.content-child__summary { font-size: 1rem; line-height: 1.625; color: var(--gray-600); }

/* Blog ------------------------------------------------------------------- */
.blog-hero { margin-bottom: 2rem; }
.blog-hero__image { width: 100%; height: auto; border-radius: 0.5rem; }
.blog-meta { font-size: 1rem; line-height: 1.5rem; color: var(--gray-500); }

.blog-footer { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--gray-200); }
.blog-back-link {
  font-weight: 500;
  color: var(--mediterranean-600);
  transition: var(--transition-colors) 0.2s var(--ease);
}
.blog-back-link:hover { color: var(--mediterranean-800); }

.blog-card { margin-bottom: 3rem; padding-bottom: 3rem; border-bottom: 1px solid var(--gray-200); }
.blog-card:last-child { border-bottom-width: 0; }
.blog-card__image { width: 100%; height: auto; margin-bottom: 1.5rem; border-radius: 0.5rem; }
.blog-card__title {
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 700;
  color: var(--black);
}
.blog-card__title a { transition: var(--transition-colors) 0.2s var(--ease); }
.blog-card__title a:hover { color: var(--mediterranean-600); }
.blog-card__meta { margin-bottom: 1rem; font-size: 1rem; line-height: 1.5rem; color: var(--gray-500); }
.blog-card__intro { font-size: 1.125rem; line-height: 1.625; color: var(--gray-700); }
.blog-empty { font-size: 1.125rem; line-height: 1.75rem; color: var(--gray-500); }

.blog-pagination { display: flex; justify-content: center; margin-top: 2rem; }
.blog-pagination > :not([hidden]) ~ :not([hidden]) { margin-left: 1rem; }
.blog-pagination__link {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 500;
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
  border-radius: 0.375rem;
}
.blog-pagination__link:hover { background-color: var(--gray-50); }

/* Image gallery block ---------------------------------------------------- */
.gallery { margin-top: 2rem; margin-bottom: 2rem; }
.gallery__title {
  margin-bottom: 1rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 600;
  color: var(--black);
}
.gallery__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (min-width: 768px) { .gallery__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .gallery__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.gallery-item { cursor: pointer; }
.gallery-item__frame {
  position: relative;
  height: 8rem;
  overflow: hidden;
  background-color: var(--white-200);
  border: 1px solid var(--lavender-200);
  border-radius: 0.5rem;
  box-shadow: var(--shadow-amalfi);
  transition: transform 0.2s var(--ease);
}
.gallery-item:hover .gallery-item__frame { transform: scale(1.05); }
.gallery-item__image { display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery-item__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgb(7 89 133 / 0);
  transition: opacity 0.2s var(--ease);
}
.gallery-item:hover .gallery-item__overlay { background-color: rgb(7 89 133 / 0.2); }
.gallery-item__icon {
  width: 2rem;
  height: 2rem;
  color: var(--white-50);
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}
.gallery-item:hover .gallery-item__icon { opacity: 1; }
.gallery-item__caption { margin-top: 0.5rem; font-size: 0.875rem; line-height: 1.25; color: var(--black); }
