/*
 * WordPress adaptations on top of sm88.css (which is the stylesheet of the original static site).
 * Keep everything WordPress-specific here so sm88.css stays a faithful copy of the original design.
 */

/* The kicker is a <p class="mma-kicker"> in the editor (it was a <span>). Undo the generic ".mma-long-section p" rules. */
.mma-long-section p.mma-kicker {
  margin: 0 0 8px;
  font-size: 9px;
  line-height: inherit;
  color: var(--mma-cyan);
}

/* Sticky header must sit below the WordPress admin bar for logged-in users. */
body.admin-bar .mma-header { top: 32px; }
@media (max-width: 782px) {
  body.admin-bar .mma-header { top: 46px; }
}

/* WordPress helpers */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}
.screen-reader-text:focus {
  clip: auto !important;
  clip-path: none;
  background: #fff;
  color: #111;
  display: block;
  font-size: 14px;
  height: auto;
  left: 8px;
  padding: 12px 18px;
  top: 8px;
  width: auto;
  z-index: 100000;
}

/* Images/alignments the editor may add to new content */
.mma-long-section .alignleft { float: left; margin: 0 18px 12px 0; }
.mma-long-section .alignright { float: right; margin: 0 0 12px 18px; }
.mma-long-section .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.mma-long-section .wp-block-image img { height: auto; }
.mma-long-section::after { content: ""; display: table; clear: both; }

/* Plain list of posts on the fallback template */
.sm88-entry > *:last-child { margin-bottom: 0; }

/* Topic images (800x400) placed inside the sections they illustrate, and the deposit/withdraw gallery on the homepage */
.sm88-topic-image {
  display: block;
  width: min(100%, 640px);
  margin: 18px auto 22px;
  overflow: hidden;
  border-radius: 14px;
  background: #111;
}
.sm88-topic-image img { display: block; width: 100%; height: auto; margin: 0; }
.sm88-topic-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 24px;
}
.sm88-topic-gallery .sm88-topic-image { width: 100%; margin: 0; }
@media (max-width: 760px) {
  .sm88-topic-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .sm88-topic-image { margin: 16px auto 20px; border-radius: 10px; }
}
