/*
 * The few rules WordPress needs that the design has no reason to carry.
 * Everything else comes from style.css, copied from the static design
 * untouched.
 */

/* What the contact form says when a submission did not go through. */
.rm-form__note {
  margin: 0;
  padding: 14px 18px;
  border-radius: 10px;
  background: rgba(201, 32, 42, 0.1);
  color: #8a1c1c;
  font-weight: 600;
  line-height: 1.45;
}

/* A page the client adds: the blue band with its title and no
   photograph, then the page's own content. */
/* The inner heroes place their words against a photograph; a plain band has
   none, so the words go back into the flow and the band is as tall as they
   need. */
.rm-hero--plain .rm-hero__band {
  min-height: 0;
  container-type: normal;
}

.rm-hero--plain .rm-hero__inner {
  position: relative;
  display: block;
}

.rm-hero--plain .rm-hero__copy {
  position: static;
  width: auto;
  max-width: 760px;
  margin: 0;
  padding-block: 64px 56px;
  transform: none;
}

.rm-hero--plain .rm-hero__title {
  font-size: clamp(34px, 4.2vw, 54px);
}

/* A post's title sits over the middle of the page, like the words under it. */
.rm-hero--post .rm-hero__copy {
  max-width: 900px;
  margin-inline: auto;
  text-align: center;
}

.rm-hero--post .rm-post-meta {
  justify-content: center;
}

.rm-prose {
  max-width: 820px;
  font-size: 18px;
  line-height: 1.75;
}

.rm-prose h2,
.rm-prose h3 {
  margin: 1.6em 0 0.6em;
  font-family: var(--rm-font-head);
  line-height: 1.25;
  color: var(--rm-ink);
}

.rm-prose h2 {
  font-size: clamp(24px, 2.4vw, 30px);
}

.rm-prose h3 {
  font-size: 22px;
}

.rm-prose a {
  color: var(--rm-pink-deep);
  font-weight: 600;
}

.rm-prose ul,
.rm-prose ol {
  margin: 0 0 1em;
  padding-left: 1.3em;
}

.rm-prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--rm-radius-photo);
}

.rm-prose > :first-child {
  margin-top: 0;
}

/* The blog. The cards, the labels above them and the post itself are in the
   design's stylesheet; these are the pieces only WordPress brings. */

/* The menu item for the blog stays pink while a post or a category is being
   read, without claiming to be the page the visitor is on. */
.rm-nav__list a[aria-current="true"] {
  color: var(--rm-pink);
}

/* The date and category line over the title of a post. */
.rm-hero--plain .rm-post-meta {
  margin: 0 0 10px;
}

.rm-post__figure figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: #6b6e77;
  text-align: center;
}

.rm-empty .rm-btn {
  margin-top: 6px;
}

/* What the editor puts in a post: floated pictures and their captions. */
.rm-prose .alignleft {
  float: left;
  margin: 6px 24px 16px 0;
}

.rm-prose .alignright {
  float: right;
  margin: 6px 0 16px 24px;
}

.rm-prose .aligncenter {
  display: block;
  margin-inline: auto;
}

.rm-prose .wp-caption {
  max-width: 100%;
}

.rm-prose .wp-caption-text {
  margin-top: 8px;
  font-size: 14px;
  color: #6b6e77;
  text-align: center;
}

.rm-prose blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 22px;
  border-left: 4px solid var(--rm-pink-soft);
  font-size: 19px;
}

@media (max-width: 620px) {
  .rm-prose .alignleft,
  .rm-prose .alignright {
    float: none;
    margin: 16px auto;
  }
}

/* A post's gallery (an Instagram carousel, say), from the Gallery box under
   the editor or a Gallery block in the words: the pictures side by side at
   Instagram's 4:5, three across, one under the other on a phone. */
.rm-gallery,
.rm-prose .wp-block-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 2em 0 0;
  padding: 0;
}

.rm-gallery__item,
.rm-prose .wp-block-gallery .wp-block-image {
  margin: 0;
}

.rm-gallery img,
.rm-prose .wp-block-gallery img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--rm-radius-photo);
}

@media (max-width: 620px) {
  .rm-gallery,
  .rm-prose .wp-block-gallery {
    grid-template-columns: 1fr;
  }
}

/* A story's extra photographs, the way a shop shows a product: a column of
   small pictures beside the big one, the one in the frame ringed in pink. A
   column reads well with two pictures as with eight. */
.rm-story__media:has(.rm-story__thumbs) {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  max-width: 500px;
}

.rm-story__media:has(.rm-story__thumbs) > img {
  grid-column: 2;
  grid-row: 1;
}

.rm-story__thumbs {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rm-story__thumb {
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

.rm-story__thumb:hover,
.rm-story__thumb[aria-pressed="true"] {
  opacity: 1;
}

.rm-story__thumb img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 8px;
}

.rm-story__thumb[aria-pressed="true"] img {
  outline: 3px solid var(--rm-pink-deep);
  outline-offset: 2px;
}

@media (max-width: 620px) {
  .rm-story__media:has(.rm-story__thumbs) {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
  }
}

/* Share row under a post and under each success story. */
.rm-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 40px;
}

.rm-post .rm-share {
  justify-content: center;
}

.rm-story .rm-share {
  margin-top: 24px;
}

.rm-share__label {
  margin: 0;
  font-family: var(--rm-font-head);
  font-size: 15px;
  font-weight: 700;
  color: var(--rm-ink);
}

.rm-share__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.rm-share__btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--rm-blue-pale);
  color: var(--rm-ink);
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.rm-share__btn[hidden] {
  display: none;
}

.rm-share__btn:hover,
.rm-share__btn:focus-visible {
  background: var(--rm-blue);
  transform: translateY(-2px);
}

.rm-share__btn svg {
  width: 20px;
  height: 20px;
}

.rm-share__done {
  font-size: 14px;
  font-weight: 600;
  color: var(--rm-pink-deep);
}
