/* Shared illustration layout, based on en/traffic-rules.html. */
.page .rule-block.has-image,
.page .marking-card {
  flex-direction: column;
}

/* Keep the frame above the text at every viewport width, including RTL pages. */
.page .rule-block.has-image .img-slot,
.page .marking-card .marking-img,
.page .sign-card .sign-img,
.page .gesture-card .gesture-img {
  order: -1;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  flex: none;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: clamp(12px, 2vw, 20px);
  background: linear-gradient(135deg, #f6f0e5 0%, #e9dfce 52%, #fbf8f2 100%);
  border: 0;
  border-bottom: 1px solid var(--border);
}

.page .rule-block.has-image .img-slot img,
.page .marking-card .marking-img img,
.page .sign-card .sign-img img,
.page .gesture-card .gesture-img img {
  width: 100%;
  max-width: none;
  height: auto;
  object-fit: contain;
  display: block;
  padding: 0;
  border: 4px solid rgba(255, 255, 255, .9);
  border-radius: 7px;
  box-shadow: 0 5px 16px rgba(24, 18, 14, .16), 0 1px 3px rgba(24, 18, 14, .12);
}

.page .rule-block.has-image .img-slot .image-placeholder {
  width: 100%;
  max-width: none;
  height: auto;
  min-height: clamp(140px, 25vw, 220px);
  border: 1px dashed rgba(168, 116, 36, .35);
  border-radius: 7px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .5), rgba(240, 234, 216, .65));
}

/* Standalone image blocks keep the separate sizing used in the reference. */
.page .img-block img {
  width: 100%;
  max-width: 600px;
  height: auto;
  object-fit: contain;
  display: block;
}
