/* =========================================================
   MOBILE OVERRIDES — vesztergom.com static export
   Targets viewports up to 767px wide.
   The original layout is a fixed 980px Wix desktop build;
   this file makes the text content readable on phones.
   ========================================================= */

@media (max-width: 767px) {

  /* --- 1. Prevent horizontal scroll, remove 980px min-width --- */

  html,
  body {
    overflow-x: hidden;
  }

  body:not(.responsive) #site-root {
    min-width: 0 !important;
    width: 100% !important;
  }

  /* --- 2. Reset calc((100% - 980px) * 0.5) centering margins ---
     On viewports narrower than 980px these produce a negative
     margin-left (~-300px on a 375px phone) that pushes content
     off-screen to the left.                                       */

  [data-mesh-id$="inlineContent-gridContainer"] > * {
    margin-left: 0 !important;
    left: 0 !important;
  }

  /* --- 3. All column strips: fill viewport width --- */

  .CohWsy,
  .wixui-column-strip {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* --- 4. Stack columns vertically --- */

  body:not(.device-mobile-optimized) .V5AUxf {
    display: block !important;
  }

  .YzqVVZ,
  .wixui-column-strip__column {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    box-sizing: border-box !important;
  }

  /* --- 5. All rich-text / text blocks: fluid width --- */

  .HcOXKn,
  .c9GqVL,
  .QxJLC3 {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  /* Named text blocks that have hard-coded pixel widths */
  #comp-k2lxwymn,
  #comp-k2yo4art,
  #comp-k2lykb98,
  #comp-k2lyqtv0,
  #comp-k2lyyxqi,
  #comp-kiox84kn,
  #comp-kiq6fyke,
  #comp-kiq6evlc,
  #comp-kioi440x,
  #comp-k2m1xyci,
  #comp-k2n1hgn1,
  #comp-kigfzif8 {
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  /* --- 6. Scale down large Wix font variables ---
     Original sizes: font_0=94px (hero h1), font_2=46px (section h2),
     font_5=27px (quote), font_4=17px (cards/nav — keep as-is).     */

  :root {
    --font_0: normal normal normal 30px/1.2em lulo-clean-w01-one-bold, sans-serif;
    --font_2: normal normal normal 22px/1.3em lulo-clean-w01-one-bold, sans-serif;
    --font_5: normal normal normal 17px/1.5em caudex, serif;
    --font_3: normal normal normal 11px/1.4em lulo-clean-w01-one-bold, sans-serif;
  }

  /* --- 7. Header: reduce height, hide empty nav column --- */

  /* Remove the 251px min-height from the header grid */
  [data-mesh-id=SITE_HEADERinlineContent-gridContainer] {
    min-height: auto !important;
  }

  /* The header column strip */
  #comp-k2m1z8uu {
    min-width: 0 !important;
    width: 100% !important;
  }

  /* Hide the empty right column (navigation placeholder) */
  #comp-k2m20flb {
    display: none !important;
  }

  /* Logo column fills remaining width */
  #comp-k2m1z8vu {
    width: 100% !important;
    min-width: 0 !important;
  }

  /* Scale the logo down */
  #comp-kr0lfmjy {
    width: 180px !important;
    height: auto !important;
  }

  #comp-kr0lfmjy img {
    width: 180px !important;
    height: auto !important;
  }

  /* Reduce top/bottom padding inside logo column */
  [data-mesh-id=comp-k2m1z8vuinlineContent-gridContainer] > * {
    margin-top: 12px !important;
    margin-bottom: 12px !important;
  }

  /* --- 8. Hero section: fix negative margin-top and large spacing ---
     The -279px is a parallax overlap effect with the header,
     not meaningful without the background image.                       */

  [data-mesh-id=comp-lhf8lxtainlineContent-gridContainer] {
    margin-top: 0 !important;
  }

  /* Reduce the 201px top margin on the hero h1 */
  [data-mesh-id=comp-k2lxlinpinlineContent-gridContainer] > * {
    margin-top: 24px !important;
  }

  /* --- 9. Sections: full viewport width --- */

  .Oqnisf,
  .wixui-section {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  /* --- 10. Service cards repeater: full width per card --- */

  [id*="comp-kivlys"] {
    width: 100% !important;
    min-width: 0 !important;
  }

  /* --- 11. Testimonial and footer image columns ---
     Make tall column images and text stack cleanly.              */

  /* Clamp column/image heights so they don't dominate on mobile */
  .YzqVVZ [data-testid="bgLayers"],
  .YzqVVZ .MW5IWV {
    max-height: 280px !important;
  }

  /* --- 12. Footer columns: ensure they stack --- */

  #SITE_FOOTER .V5AUxf {
    display: block !important;
  }

  #SITE_FOOTER .YzqVVZ {
    width: 100% !important;
    max-width: 100% !important;
    text-align: center !important;
    padding-top: 16px !important;
    padding-bottom: 16px !important;
  }

}
