/* Keep Events Calendar cards and featured images inside small screens */
@media (max-width: 767px) {
  body .tribe-common .tribe-events-l-container,
  body .tribe-common .tribe-events-calendar-list,
  body .tribe-common .tribe-events-calendar-list__event-row,
  body .tribe-common .tribe-events-calendar-list__event-wrapper,
  body .tribe-common .tribe-events-calendar-list__event,
  body .tribe-common .tribe-events-calendar-list__event-featured-image-wrapper {
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
  }

  body .tribe-common .tribe-events-calendar-list__event-row,
  body .tribe-common .tribe-events-calendar-list__event {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body .tribe-common .tribe-events-calendar-list__event {
    flex-direction: column;
  }

  body .tribe-common .tribe-events-calendar-list__event-wrapper,
  body .tribe-common .tribe-events-calendar-list__event-featured-image-wrapper {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body .tribe-common img.tribe-events-calendar-list__event-featured-image {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain;
  }
}

/* Mobile homepage hero: compact membership banner and full-width actions */
@media (max-width: 767px) {
  body.home .entry-content > .wp-block-group:first-child > .wp-block-buttons .wp-block-button,
  body.home .entry-content > .wp-block-group:first-child .wp-block-columns .wp-block-buttons .wp-block-button {
    box-sizing: border-box;
    width: 100%;
  }

  body.home .entry-content > .wp-block-group:first-child > .wp-block-buttons .wp-block-button__link,
  body.home .entry-content > .wp-block-group:first-child .wp-block-columns .wp-block-buttons .wp-block-button__link {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    padding: 14px 18px !important;
    text-align: center;
    line-height: 1.25;
  }

  body.home .entry-content > .wp-block-group:first-child > .wp-block-buttons .wp-block-button__link {
    border-width: 0 !important;
  }

  body.home .entry-content > .wp-block-group:first-child .wp-block-buttons {
    gap: 12px;
  }
}


/* Single event pages: keep featured images visible on phones */
@media (max-width: 767px) {
  body.single-tribe_events .tribe-block.tec-block__single-event,
  body.single-tribe_events .tribe-events-pg-template,
  body.single-tribe_events .tribe-events-single,
  body.single-tribe_events .tribe-events-single > .tribe_events,
  body.single-tribe_events .tribe-events-event-image {
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
  }

  body.single-tribe_events .tribe-events-single > .tribe_events {
    flex-direction: column;
  }

  body.single-tribe_events .tribe-events-event-image img {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain;
  }
}
