/*
 * NETZ-TRENDS mobile-only fixes
 * Applied only up to the WordPress mobile breakpoint (782px).
 * Desktop/tablet layouts above this breakpoint are intentionally untouched.
 */
@media (max-width: 782px) {
  /* 1) Ticker: compact enough for phone viewports. */
  .ticker {
    font-size: 11px !important;
    line-height: 1.25;
  }

  .ticker-inner {
    min-height: 34px !important;
    gap: 10px !important;
  }

  .ticker-label {
    padding: 4px 8px !important;
    font-size: 10px !important;
    line-height: 1.2;
  }

  .ticker-items {
    gap: 18px !important;
  }

  .ticker-items span:before {
    width: 4px !important;
    height: 4px !important;
    margin-right: 6px !important;
    vertical-align: 2px;
  }

  /* 2) Featured images: preserve the complete source image on mobile. */
  .hero-figure {
    width: 100%;
    max-width: 100% !important;
    overflow: visible;
  }

  .hero-image {
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
    overflow: hidden;
  }

  .hero-image img {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center center !important;
  }

  /* Keep images inside the article content inside the viewport as well. */
  .article-body figure,
  .article-body .wp-block-image,
  .article-body .alignwide,
  .article-body .alignfull {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .article-body img,
  .article-body figure img,
  .article-body .wp-block-image img {
    display: block;
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    object-position: center center !important;
  }

  /*
   * 3) Tables: never squeeze columns down to one-character widths.
   * Gutenberg table blocks and raw HTML tables use a horizontal scroll area
   * when their natural column width exceeds the phone viewport.
   */
  .article-body .wp-block-table,
  .article-body .nt-mobile-table-scroll {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }

  .article-body .wp-block-table table,
  .article-body .nt-mobile-table-scroll table {
    display: table !important;
    width: max-content !important;
    min-width: 100% !important;
    max-width: none !important;
    table-layout: auto !important;
    border-collapse: collapse;
  }

  .article-body .wp-block-table th,
  .article-body .wp-block-table td,
  .article-body .nt-mobile-table-scroll th,
  .article-body .nt-mobile-table-scroll td {
    min-width: 110px;
    padding: 10px 12px;
    vertical-align: top;
    font-size: 14px;
    line-height: 1.4;
    white-space: normal;
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: auto;
  }

  .article-body .wp-block-table th:first-child,
  .article-body .wp-block-table td:first-child,
  .article-body .nt-mobile-table-scroll th:first-child,
  .article-body .nt-mobile-table-scroll td:first-child {
    min-width: 150px;
  }
}
