/*
 * Responsive improvements over the original WordPress theme.
 * Desktop (>= 1200px) is left untouched so it stays identical to the old site.
 * The page builder writes inline styles, so overrides here need !important.
 */

/* ===== Tablet + small desktop (<= 1199px) ===== */
@media (max-width: 1199px) {
  /* Image columns pulled upward with negative margins overlapped the text above them
     (home "Why Choose Us", Investment Criteria). Keep them inside their own section. */
  #gdlr-core-column-95210 > .gdlr-core-pbf-column-content-margin,
  #gdlr-core-column-43742 > .gdlr-core-pbf-column-content-margin {
    margin-top: 0 !important;
  }
}

/* ===== Tablet (768 - 999px) ===== */
@media (min-width: 768px) and (max-width: 999px) {
  /* Home service cards: less inner padding so three titles fit without 4-line wraps */
  #gdlr-core-column-33471 > .gdlr-core-pbf-column-content-margin,
  #gdlr-core-column-64150 > .gdlr-core-pbf-column-content-margin,
  #gdlr-core-column-4809 > .gdlr-core-pbf-column-content-margin {
    padding: 50px 10px 40px 25px !important;
  }
}

/* Decorative grey boxes / guide lines are drawn as one big PNG laid out for the
   1280px desktop grid. On smaller screens they land off-centre, so drop them. */
@media (max-width: 999px) {
  .gdlr-core-pbf-background[style*="hp2-about-bg.png"],
  .gdlr-core-pbf-background[style*="about-top-bg-1.png"],
  .gdlr-core-pbf-background[style*="about-2-about-bg.png"],
  .gdlr-core-pbf-background[style*="square00.png"] {
    display: none !important;
  }
}

/* ===== Phones, portrait + landscape (<= 767px) ===== */
@media (max-width: 767px) {
  /* Theme capped content at 500px, leaving wide empty gutters on landscape phones.
     Use the full width with a consistent 24px gutter instead. */
  body.corzo-body-front .corzo-container,
  body.corzo-body-front .gdlr-core-container,
  body .gdlr-core-container-custom {
    max-width: none !important;
    padding-left: 4px !important;
    padding-right: 4px !important;
  }
  .corzo-mobile-header-container.corzo-container {
    padding-left: 4px !important;
    padding-right: 4px !important;
  }

  /* Forced line breaks in small caption labels wrap awkwardly on narrow screens */
  .gdlr-core-title-item br {
    display: none;
  }

  /* --- Home --- */
  /* service cards: stacked, so trim the desktop padding that created big gaps */
  #gdlr-core-column-33471 > .gdlr-core-pbf-column-content-margin,
  #gdlr-core-column-64150 > .gdlr-core-pbf-column-content-margin,
  #gdlr-core-column-4809 > .gdlr-core-pbf-column-content-margin {
    padding: 34px 0 6px !important;
  }
  #gdlr-core-column-33471 > .gdlr-core-pbf-column-content-margin { padding-top: 40px !important; }
  /* decorative circle sat low in the PNG and got clipped by the shorter cards; lift it behind icon + title */
  .gdlr-core-pbf-background[style*="hp2-icon-bg-1.png"] {
    background-position: 0 -30px !important;
  }
  #gdlr-core-column-4809 > .gdlr-core-pbf-column-content-margin { padding-bottom: 30px !important; }

  /* financing image: no offset frame, natural spacing */
  #gdlr-core-column-50548 > .gdlr-core-pbf-column-content-margin {
    padding: 0 0 36px !important;
  }

  /* "Why Choose Us" photo: a sensible photo ratio instead of 580px of padding */
  #gdlr-core-column-95210 > .gdlr-core-pbf-column-content-margin {
    padding: 0 0 72% !important;
    margin-top: 0 !important;
  }

  /* --- Services --- */
  #gdlr-core-column-48620 > .gdlr-core-pbf-column-content-margin {
    padding-top: 56px !important;
    padding-bottom: 40px !important;
  }

  /* image with grey offset frame (frame is a bg photo that bleeds to the right edge) */
  .gdlr-core-pbf-background[style*="talk-bg00.jpg"] {
    display: none !important;
  }
  #gdlr-core-column-45754 > .gdlr-core-pbf-column-content-margin {
    padding: 8px 0 44px !important;
  }

  /* --- About --- */
  #gdlr-core-column-12748 > .gdlr-core-pbf-column-content-margin {
    margin-bottom: 0 !important;
  }

  /* --- Footer: tighter, more even rhythm --- */
  .corzo-footer-wrapper {
    padding-top: 56px !important;
  }
  .corzo-footer-wrapper .corzo-footer-column {
    margin-bottom: 36px;
  }
  .corzo-footer-wrapper #block-2 img {
    width: 170px !important;
  }
  .corzo-footer-wrapper #block-4 {
    margin-bottom: 28px;
  }
  .corzo-copyright-wrapper .corzo-copyright-container {
    padding-top: 28px !important;
    padding-bottom: 36px !important;
  }
}
