/* Phone layout for the whole site (screens up to 767px wide).
   Page-specific values (each photo's shape, banner colours, heading sizes) are written into
   each page by tools/postbuild.py as --ss-ratio / --ss-band and a <style id="ss-mobile">. */
@media (max-width: 767px) {

  /* ---- Banners whose subject sits at one side (home hero, Time2Bloom shop banner):
          show the whole picture as a strip, with the text on a band of its colour below */
  .ss-page-header.ss-stack-banner .ss-page-header__bg {
    height: auto !important; min-height: 0 !important; aspect-ratio: var(--ss-ratio);
  }
  .ss-page-header.ss-stack-banner .ss-page-header__bg--image:after { display: none; }
  .ss-page-header.ss-stack-banner .ss-page-header__content-wrapper {
    position: relative !important; height: auto !important; background: var(--ss-band);
    padding: 28px 0 32px;
  }
  .ss-page-header.ss-stack-banner .ss-page-header__content-wrapper__content__inner { width: 100% !important; }

  /* ---- Other page banners: a little shorter than a full square */
  .ss-page-header:not(.ss-stack-banner) .ss-page-header__bg { height: 80vw !important; min-height: 300px !important; }
  .ss-page-header__content__inner--title { font-size: 32px !important; line-height: 1.2 !important; }
  /* Home "Get Inspired. Start Shopping." uses Bishail Script, which runs larger */
  .ss-page-header--m17936437694365 .ss-page-header__content__inner--title { font-size: 24px !important; line-height: 1.35 !important; }
  .ss-page-header__content__inner--description,
  .ss-page-header__content__inner--sub-heading { font-size: 16px !important; }

  /* ---- Photo cards, book video, previous/next cards: the box takes the photo's own shape */
  .ss-ratio.ss-services2__item .ss-services2__item__content { min-height: 0 !important; aspect-ratio: var(--ss-ratio); height: auto !important; }
  .ss-ratio.ss-video-popup__bg { height: auto !important; min-height: 0 !important; aspect-ratio: var(--ss-ratio); }
  .ss-ratio.ss-prev-next-pages__prev .ss-prev-next-pages__prev__content,
  .ss-ratio.ss-prev-next-pages__next .ss-prev-next-pages__next__content { min-height: 0 !important; aspect-ratio: var(--ss-ratio); height: auto !important; }
  .ss-video-popup__content--heading { font-size: 30px !important; line-height: 1.2 !important; }

  /* ---- Text: no words split mid-way, comfortable reading size */
  h1, h2, h3, h4 { overflow-wrap: normal; word-break: normal; hyphens: manual; }
  .ss-custom-header--heading span { display: inline; }

  /* ---- Footer: readable small print (the theme sets 10px with an id rule, so this rule
          borrows an id's weight through :is() to win) */
  .ss-footer :is(.hs_cos_wrapper_type_module, #ss-never),
  .ss-footer :is(.hs_cos_wrapper_type_module, #ss-never) * { font-size: 12px !important; line-height: 1.5 !important; }

  /* ---- Blog listing: read-time labels at a readable size */
  .ss-blog-listing1__content--time { font-size: 12px !important; }

  /* ---- Embeds never wider than the screen */
  iframe, video, embed, object { max-width: 100% !important; }
  .hs-responsive-embed-wrapper, .hs-embed-wrapper { max-width: 100% !important; }

  /* ---- Comfortable tap targets for carousel / slider arrows */
  .flickity-prev-next-button, .flickity-button { width: 44px !important; height: 44px !important; }
  .flickity-page-dots .dot { width: 12px !important; height: 12px !important; margin: 0 7px !important; }
  .splide__arrow { width: 44px !important; height: 44px !important; }
  .splide__toggle { width: 44px !important; height: 44px !important; }
}

/* ---- Sections with large desktop side padding (e.g. Lében's book section: 248px on the right)
   would squeeze their content into a sliver on phones; the columns' own 10px gutters are enough there. */
@media (max-width: 767px) {
  .ss-section[class*="-padding"] { padding-left: 0 !important; padding-right: 0 !important; }
}
