/* =========================================================
   PTK HOME BLOCKS v1.2.16 — MOBILE CONTENT TITLE CLEANUP
   Keeps Thai vowels and tone marks intact inside clamped card titles.
   Section headings and desktop typography remain untouched.
   ========================================================= */

@media (max-width: 768px) {
  /* Shared Thai-safe rendering for every content title in the plugin. */
  .ptk-home-categories .ptk-home-cat-card strong,
  .ptk-home-categories .ptk-home-cat-card strong > span,
  .ptk-home-posts .ptk-home-card-body h3,
  .ptk-home-amulets .ptk-amulet-shop__title,
  .ptk-home-amulets .ptk-amulet-shop__title a,
  .ptk-home-forum-rooms .ptk-home-forum-room-card strong,
  .ptk-home-topics .ptk-home-forum-item strong,
  .ptk-home-vip-shops .ptk-home-shop-card strong,
  .ptk-home-tags .ptk-home-tag-cloud > a {
    letter-spacing: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
    line-break: auto;
    hyphens: none !important;
    font-kerning: normal;
    font-synthesis: none;
    text-shadow: none !important;
    -webkit-text-stroke: 0 transparent !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  /* Standard weights avoid synthetic 760/820/850 glyphs on mobile Thai fonts. */
  .ptk-home-posts .ptk-home-card-body h3,
  .ptk-home-amulets .ptk-amulet-shop__title,
  .ptk-home-amulets .ptk-amulet-shop__title a,
  .ptk-home-topics .ptk-home-forum-item strong,
  .ptk-home-tags .ptk-home-tag-cloud > a {
    font-weight: 700 !important;
  }

  .ptk-home-categories .ptk-home-cat-card strong,
  .ptk-home-forum-rooms .ptk-home-forum-room-card strong,
  .ptk-home-vip-shops .ptk-home-shop-card strong {
    font-weight: 800 !important;
  }

  /* Article titles: one two-line clamp with enough vertical room for Thai marks. */
  .ptk-home-posts .ptk-home-card-body h3 {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    line-height: 1.5 !important;
    min-height: 3em !important;
    max-height: 3em !important;
    overflow: hidden !important;
  }

  .ptk-home-posts .ptk-home-card-body p {
    letter-spacing: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
    line-break: auto;
    hyphens: none !important;
    font-synthesis: none;
  }

  /*
   * Amulet titles previously had a second overflow crop on the H3. Keep that
   * outer element as a height holder only; the inner link is the single crop.
   */
  .ptk-home-section.ptk-home-amulets .ptk-amulet-shop__title {
    display: block !important;
    -webkit-box-orient: initial !important;
    -webkit-line-clamp: initial !important;
    line-height: 1.55 !important;
    min-height: 3.1em !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .ptk-home-section.ptk-home-amulets .ptk-amulet-shop__title a {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    line-height: 1.55 !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
  }

  /* Forum and category cards also use line clamp; give Thai marks headroom. */
  .ptk-home-topics .ptk-home-forum-item strong {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    line-height: 1.5 !important;
    max-height: 3em !important;
    overflow: hidden !important;
  }

  /*
   * Category names use a dedicated inner clamp. The STRONG no longer crops
   * Thai upper/lower marks at an exact max-height boundary.
   */
  .ptk-home-categories .ptk-home-cat-card strong {
    display: block !important;
    line-height: 1.55 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .ptk-home-categories .ptk-home-cat-card strong > span {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    line-height: 1.55 !important;
    max-height: none !important;
    overflow: hidden !important;
  }

  .ptk-home-forum-rooms .ptk-home-forum-room-card strong,
  .ptk-home-vip-shops .ptk-home-shop-card strong {
    line-height: 1.45 !important;
  }
}
