/* ===== MOBILE: single post — header + padding ===== */
@media (max-width: 781px) {

  /* 1. Global side padding — block themes set this on <body>, not on the content */
  body {
    --wp--style--root--padding-left: 14px !important;
    --wp--style--root--padding-right: 14px !important;
    --wp--style--root--padding-top: 0 !important;
  }
  .wp-site-blocks,
  .wp-site-blocks > *,
  .entry-content,
  .site-main,
  article {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* 2. Site header (logo / nav strip) */
  header.wp-block-template-part,
  header.wp-block-template-part > .wp-block-group,
  .site-header {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }
  .wp-block-site-title { font-size: 18px !important; line-height: 1.2 !important; }
  .wp-block-navigation { font-size: 15px !important; }

  /* 3. Post header — scoped to single posts only */
  .single-post .entry-header,
  .single-post .wp-block-post-title {
    margin-top: 12px !important;
    margin-bottom: 12px !important;
    padding: 0 !important;
  }
  .single-post .wp-block-post-title,
  .single-post .entry-title {
    font-size: 26px !important;
    line-height: 1.15 !important;
    overflow-wrap: break-word !important;
  }

  /* 4. Vertical spacing between blocks */
  .wp-site-blocks > * { margin-block-start: 16px !important; }
  .entry-content > *  { margin-block-start: 14px !important; }

  /* 5. Overflow guard — stops wide children forcing sideways scroll */
  img, iframe, video, table, pre, figure {
    max-width: 100% !important;
    height: auto;
  }
}

/* ===== MOBILE: home & archive post grid ===== */
@media (max-width: 781px) {

  /* 1. Collapse two columns to one */
  .wp-block-post-template {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
  .wp-block-post-template > li {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* 2. Card titles */
  .wp-block-post-template .wp-block-post-title {
    font-size: 19px !important;
    line-height: 1.25 !important;
    margin: 10px 0 6px !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    hyphens: none !important;
  }
  .wp-block-post-template .wp-block-post-title a {
    text-decoration: none;
  }

  /* 3. Thumbnails full width, flush with text */
  .wp-block-post-featured-image {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
  }
  .wp-block-post-featured-image img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* 4. Excerpt and meta */
  .wp-block-post-excerpt__excerpt { font-size: 15px !important; line-height: 1.55 !important; }
  .wp-block-post-date,
  .wp-block-post-terms { font-size: 13px !important; }

  /* 5. Read more link */
  .wp-block-read-more {
    font-family: 'Inter Tight', sans-serif;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #B8241C !important;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(184,36,28,0.4);
    padding-bottom: 2px;
  }
}

/* ===== Remove the article frame — ALL screen sizes, outside any media query ===== */
.single-post article,
.single-post .wp-block-post-content,
.single-post .entry-content,
.single-post main,
.single-post .site-main,
.single-post .wp-site-blocks > .wp-block-group {
  border: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
}