/* KSEZ public mobile QA fixes — 2026-10-19 */
@media (max-width: 767px) {
  html, body { max-width: 100%; overflow-x: clip; }
  .wrapper, #page-content, #page-content .container, #page-content article { min-width: 0; max-width: 100%; }

  /* Public editorial copy: balanced on both edges without altering labels or controls. */
  .page-sub-page #page-content article > p,
  .page-sub-page #page-content section > p,
  .page-sub-page #page-content .section-heading > p,
  .page-sub-page #page-content .cms-section-body,
  .page-sub-page #page-content .advantages-hero-copy > p,
  .page-sub-page #page-content .advantage-card > p,
  .page-sub-page #page-content .policy-introduction p,
  .page-sub-page #page-content .incentive-feature-card > p,
  .page-sub-page #page-content .industry-card__body > p,
  .page-sub-page #page-content .recognition-hero-copy > p,
  .page-sub-page #page-content .leadership-message-copy p {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
  }

  /* SOP reader: compact controls and fast image-page canvas on phones. */
  .sop-library-page { min-width: 0; }
  .ksez-pdf-reader { width: 100%; border-radius: 11px; }
  .ksez-pdf-toolbar { gap: 11px; padding: 13px; }
  .ksez-pdf-brand { width: 100%; }
  .ksez-pdf-brand strong { white-space: normal; line-height: 1.3; }
  .ksez-pdf-controls {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    gap: 7px;
  }
  .ksez-pdf-controls .ksez-pdf-button { width: 100%; min-width: 0; padding: 0; }
  .ksez-pdf-page-control { grid-column: span 2; justify-content: center; min-width: 0; padding: 0 7px; }
  .ksez-pdf-zoom-value { display: grid; min-width: 0; place-items: center; }
  .ksez-pdf-actions { display: grid; grid-template-columns: repeat(3, 42px); gap: 8px; width: 100%; justify-content: center; }
  .ksez-pdf-actions .ksez-pdf-button,
  .ksez-pdf-actions .ksez-pdf-download { width: 42px; min-width: 42px; padding: 0; }
  .ksez-pdf-stage { min-height: 360px; padding: 10px; overscroll-behavior: contain; }
  .ksez-pdf-loading, .ksez-pdf-empty { min-height: 360px; padding: 36px 18px; }
  .ksez-pdf-help { gap: 8px; padding: 12px 14px; }
  .ksez-pdf-shortcuts { gap: 8px 12px; }

  /* Competitive Advantages: contain 3D decoration and prevent sideways page drag. */
  .advantages-page { width: 100%; overflow: clip; }
  .advantages-hero { width: 100%; margin-right: 0; margin-left: 0; overflow: hidden; border-radius: 10px; }
  .advantages-hero-copy, .advantages-scorecard, .investment-3d-parent { min-width: 0; max-width: 100%; }
  .advantages-hero h1 { overflow-wrap: anywhere; }
  .advantages-hero-tags { max-width: 100%; }

  /* Incentive descriptions need readable contrast on dark cards. */
  .incentive-feature-card > p { color: rgba(255,255,255,.88) !important; opacity: 1; }

  /* Leadership directory: cards use their full width when photos are not shown. */
  .leadership-card-grid { grid-template-columns: 1fr; gap: 13px; }
  .leadership-card { display: block; min-height: 0; width: 100%; }
  .leadership-card-body { width: 100%; min-height: 0; padding: 17px 18px; }
  .leadership-card h3 { max-width: none; font-size: 17px; line-height: 1.35; overflow-wrap: break-word; }
  .leadership-card-role { font-size: 11px; line-height: 1.45; }
  .leadership-read-button { margin-top: 12px; font-size: 11px; }
  .leadership-message-panel { padding: 20px 16px; }
  .leadership-message-brand { justify-content: flex-start; min-height: 38px; padding-right: 96px; }
  .leadership-message-brand img { width: 108px; height: 38px; padding: 4px 7px; }
  .leadership-slider-controls { top: 18px; right: 16px; }
  .leadership-message-heading { margin-top: 18px; }
  .leadership-message-frame { width: 100%; box-sizing: border-box; }

  /* Public bill download experience. */
  .billing-public-showcase { width: 100%; min-width: 0; margin: 28px 0; padding: 24px 18px; gap: 24px; }
  .billing-public-copy, .billing-dashboard-preview { min-width: 0; max-width: 100%; }
  .billing-public-copy h2 { font-size: 25px; line-height: 1.2; overflow-wrap: anywhere; }
  .billing-public-copy > p { text-align: justify; }
  .billing-public-copy > a { max-width: 100%; white-space: normal; text-align: center; }
  .billing-dashboard-preview { min-height: 275px; padding: 13px; }
  .billing-preview-current { padding: 16px; }
  .billing-preview-current > div { align-items: flex-start; flex-direction: column; gap: 10px; }

  /* About SEZMC route becomes a vertical story on mobile. */
  .sez-connectivity { padding: 24px 18px 22px; }
  .sez-connectivity__viewport { margin-right: 0; overflow: visible; padding: 0; }
  .sez-connectivity__track { display: grid; grid-template-columns: 72px minmax(0,1fr); gap: 18px; min-width: 0; align-items: start; }
  .sez-connectivity__sea { width: 72px; height: 72px; margin-top: 4px; }
  .sez-connectivity__sea figcaption { bottom: 8px; font-size: 8px; }
  .sez-connectivity__stops { display: grid; grid-template-columns: 1fr; gap: 0; height: auto; padding: 0; }
  .sez-connectivity__stops::before { width: 1px; height: auto; left: 7px; right: auto; top: 8px; bottom: 8px; background: linear-gradient(180deg,var(--connectivity-teal),#65bfb4 75%,var(--connectivity-amber)); }
  .sez-connectivity__stops::after { display: none; }
  .sez-connectivity__stop { min-height: 62px; align-items: flex-start; padding: 0 0 14px 31px; text-align: left; }
  .sez-connectivity__point { width: 13px; height: 13px; left: 7px; top: 7px; transform: translate(-50%,-50%); }
  .sez-connectivity__stop h3 { min-height: 0; margin: 0 0 3px; font-size: 12px; }
  .sez-connectivity__stop p { font-size: 9px; text-align: left !important; }
  .sez-connectivity__road { position: static; transform: none; order: 3; margin-top: 5px; padding: 3px 7px; font-size: 7px; }
  .sez-connectivity__note { margin-top: 12px; }
  .sezmc-page-atlas { width: 100%; overflow: hidden; }
  .sezmc-page-atlas-header { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; }
  .sezmc-page-atlas-header h2 { overflow-wrap: anywhere; }
  .sezmc-atlas-fullscreen-button { position: static; max-width: 118px; white-space: normal; }
  .sezmc-page-atlas--network .sezmc-page-atlas-frame { width: 100%; height: 760px; min-height: 0; overflow: hidden; }
  .sezmc-page-atlas-frame iframe { width: 100%; max-width: 100%; }

  /* Staff Motivation hero: restore a true single-column mobile layout. */
  .recognition-hero { display: grid; grid-template-columns: minmax(0,1fr) !important; gap: 24px; padding: 28px 21px; }
  .recognition-hero-copy { min-width: 0; width: 100%; }
  .recognition-hero h1 { font-size: clamp(32px,10vw,40px); line-height: 1.08; white-space: normal !important; overflow-wrap: normal; }
  .recognition-hero h2 { font-size: 20px; line-height: 1.25; }
  .recognition-hero p { width: 100%; font-size: 13px; line-height: 1.7; }
  .recognition-quick-nav { width: 100%; overflow-x: auto; padding-bottom: 4px; }
  .recognition-hero-image { width: 100%; min-width: 0; min-height: 0; }
  .recognition-hero-image img { width: min(100%,430px); max-height: none; margin: 0 auto; }

  /* Industry cards: reserve a reliable visible media area on mobile. */
  .industry-card__image { height: 190px; min-height: 190px; background: #dce9e2; }
  .industry-card__image img { display: block !important; width: 100%; height: 100%; opacity: 1 !important; visibility: visible !important; object-fit: cover; }
  .industry-card__body > p { overflow: visible; display: block; }

  /* Homepage gallery centered and chart cards separated. */
  .ksez-authorities-gallery-row .ksez-gallery-column,
  .ksez-authorities-gallery-row.ksez-gallery-only-layout .ksez-gallery-column { float: none; width: 100%; margin: 0 auto; }
  #gallery .gallery-list { display: grid !important; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; width: min(100%,540px); margin: 0 auto; padding: 0; justify-content: center; }
  #gallery .gallery-list > li { float: none !important; width: auto !important; margin: 0 !important; }
  #gallery .gallery-list img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
  #gallery .gallery-action-row { align-items: center; flex-direction: column; gap: 12px; text-align: center; }
  .ksez-impact-suite-row > .ksez-impact-column,
  .ksez-impact-suite-row > .ksez-growth-column,
  .ksez-impact-suite-row > .ksez-documentary-column { float: none; width: 100% !important; margin-bottom: 26px; }
  .ksez-impact-suite-row > :last-child { margin-bottom: 0; }
}

@media (max-width: 420px) {
  .ksez-pdf-controls { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .ksez-pdf-page-control { grid-column: span 2; }
  .sezmc-page-atlas--network .sezmc-page-atlas-frame { height: 720px; }
}
