/* NIGHTSHOT V44 — definitive responsive flow correction
   Scope: Home hero / filters only. Keeps desktop identity and functionality intact. */

@media (max-width: 760px) {
  html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }

  /* Remove legacy full-viewport hero sizing inherited from app.css/nightshot-v9/home-v32. */
  body main > .hero {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    display: block !important;
    place-items: initial !important;
    align-items: initial !important;
    justify-content: initial !important;
    margin: 0 !important;
    padding: clamp(22px, 6vw, 30px) 0 clamp(24px, 7vw, 34px) !important;
    overflow: hidden !important;
  }

  body main > .hero > .hero-inner {
    box-sizing: border-box !important;
    width: calc(100% - 28px) !important;
    max-width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }

  body main > .hero .eyebrow {
    margin: 0 0 10px !important;
  }

  body main > .hero h1 {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 14px !important;
    font-size: clamp(2.65rem, 14.2vw, 4.15rem) !important;
    line-height: .82 !important;
    overflow-wrap: normal !important;
  }

  body main > .hero h1 span,
  body main > .hero h1 strong {
    display: block !important;
    white-space: nowrap !important;
  }

  body main > .hero .hero-subtitle {
    margin: 0 !important;
    font-size: clamp(.66rem, 2.8vw, .78rem) !important;
    line-height: 1.35 !important;
  }

  /* Filters remain in normal document flow directly below the hero copy. */
  body main > .hero .search-shell {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    margin: clamp(20px, 5vw, 26px) 0 0 !important;
    padding: 0 !important;
    transform: none !important;
  }

  body main > .hero .search-panel,
  body main > .hero .ns-filters-panel {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    transform: none !important;
  }

  body main > .hero .filters-grid,
  body main > .hero .filter-control,
  body main > .hero .filter-input,
  body main > .hero .filter-select {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Prevent the following section from inheriting desktop offsets. */
  body main > .hero + .events-section {
    margin-top: 0 !important;
  }

  /* Floating Portfolio CTA: respect iPhone home indicator / Safari chrome. */
  body .portfolio-fab,
  body .ns-portfolio-fab,
  body .floating-portfolio,
  body a[href="/foto.php"].floating-action {
    max-width: calc(100vw - 28px) !important;
    bottom: max(16px, env(safe-area-inset-bottom)) !important;
  }
}

@media (max-width: 390px) {
  body main > .hero {
    padding-top: 20px !important;
  }

  body main > .hero h1 {
    font-size: clamp(2.45rem, 13.7vw, 3.65rem) !important;
  }
}

/* Portrait tablets: remove old fixed/min hero heights without changing desktop. */
@media (min-width: 761px) and (max-width: 1024px) {
  body main > .hero {
    min-height: 0 !important;
    height: auto !important;
    display: block !important;
    place-items: initial !important;
    padding: 38px 0 36px !important;
  }

  body main > .hero > .hero-inner {
    min-height: 0 !important;
    height: auto !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
}
