@media (max-width: 768px) {

  /* Mobile only: remove the duplicate desktop nav bar so the hamburger is unobstructed. */
  body > nav{
    display: none !important;
  }

  html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;

  /* --- Mobile sizing: prevent oversized text/cards/images --- */
  *, *::before, *::after { box-sizing: border-box; }

  body{
    font-size: 15px;
    line-height: 1.55;
  }

  header{
    padding: 8px 12px !important;
  }
  header .logo h1{
    font-size: 14px !important;
    line-height: 1.15 !important;
    margin: 0 !important;
  }
  header .logo-img{
    width: 38px !important;
    height: auto !important;
  }

  /* Make page containers fit the screen */
  main{
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  /* Replace large desktop paddings/margins with compact mobile spacing */
  main, section, .page, .content, .content-box, .hero, .hero-card,
  [class$="-layout"], [class*="-layout"],
  [class$="-page"], [class*="-page"]{
    max-width: 100% !important;
  }
  [class$="-layout"], [class*="-layout"],
  .contact-page, .workshops-layout{
    padding: 16px 12px 22px !important;
    margin-top: 90px !important;
  }

  /* Cards/tiles: no fixed widths on mobile */
  .card, .tile, .box, .panel, .hero-card,
  [class*="card"], [class*="tile"], [class*="box"], [class*="panel"]{
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Media inside main content should never overflow */
  main img, main video, main iframe{
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }
  }

  img, video, iframe {
    max-width: 100%;
    height: auto;
    display: block;
  }

  .container, .content, .wrapper, .row, .columns {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto;
    margin-right: auto;
  }

  .row, .flex, .grid {
    flex-direction: column !important;
  }

  /* Mobile only: turn all split (text + fixed images) pages into a single scrolling column.
     This overrides the desktop "fixed right image stack" system in style.css.
  */
  main [class$="-layout"],
  main [class*="-layout"]{
    padding-right: 20px !important;   /* undo room reserved for the fixed right column */
  }

  main [class$="-images"],
  main [class*="-images"]{
    position: static !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 18px 0 0 !important;
    pointer-events: auto !important;
    z-index: auto !important;
  }

  /* Kill decorative absolute stacking on mobile: show images as a normal vertical list. */
  main [class$="-images"] *,
  main [class*="-images"] *{
    position: static !important;
    transform: none !important;
  }

  main [class$="-images"] img,
  main [class*="-images"] img{
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 0 14px 0 !important;
    display: block !important;
  }

  /* خنثی کردن absolute های مخرب فقط در موبایل */
  img, .image, .photo, .floating,
  [style*="position:absolute"],
  [style*="position: absolute"] {
    position: static !important;
    transform: none !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
  }
}
