.page-list {
  margin-top: 2.5em;
}

.page-list-header {
  margin-left: 10px;
}

.page-list-item {
  margin: 1.5em 0;
}

.page-list-item .image {
  width: 168px;
  /* hack for default theme */
  margin-bottom: 1em;
}

.page-list-item .image a {
  display: block;
  height: 136px;
  background-position: center center;
  background-size: cover;
}

/* Featured image fallback sizing when server-side resize is unavailable */
.page-featured-thumb {
  display: block;
  width: 100%;
  max-width: 980px;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

/* Wrapper for <img> to enforce 16:9 crop using object-fit */
.page-featured-wrapper {
  width: 100%;
  max-width: 980px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f8f8f8;
  border: 1px solid #ddd;
}
.page-featured-wrapper > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.page-list-item h3 a {
  display: block;
}

.pages-form .form-actions {
  margin-top: 10px;
}

/* Responsive embeds on rendered pages */
.ckanext-pages-content iframe,
.ckanext-pages-content video,
.ckanext-pages-content [data-oembed-url] iframe {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important; /* fallback for browsers without aspect-ratio */
  display: block;
}

/* Prefer proper aspect ratio for media (16:9 default) */
.ckanext-pages-content iframe,
.ckanext-pages-content video {
  aspect-ratio: 16 / 9;
}

/* If oEmbed wrapper is present, force iframe to fill wrapper with 16:9 ratio */
.ckanext-pages-content [data-oembed-url] {
  position: relative;
  width: 100%;
  max-width: 100%;
}
.ckanext-pages-content [data-oembed-url]::before {
  content: '';
  display: block;
  padding-top: 56.25%; /* 16:9 */
}
.ckanext-pages-content [data-oembed-url] > iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
}
iframe {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9;
}