/* Mobile presentation, shared by the existing Elementor widgets. */
.gr-slider-controls { display: none; }

@media (max-width: 900px) {
  body .elementor-location-header {
    position: relative;
    z-index: 1000;
    overflow: visible;
  }
  body .gr-header {
    position: relative;
    z-index: 1000;
    overflow: visible !important;
    isolation: isolate;
    background-color: #faf9f8;
  }
  body .gr-header .gr-navigation-wrap,
  body .gr-header .gr-navigation-wrap > .elementor-widget-container,
  body .gr-header .gr-navigation {
    position: static;
    overflow: visible;
  }
  body .gr-header .gr-nav {
    position: absolute;
    z-index: 1001;
    top: 100%;
    left: 0;
    right: 0;
    width: auto;
    max-height: calc(100vh - 150px);
    max-height: calc(100dvh - 150px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 18px 22px 24px;
    gap: 6px;
    background: #faf9f8 !important;
    color: #292a26;
    opacity: 1 !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 18px 28px rgb(32 35 32 / 16%);
  }
  body .gr-header .gr-nav > a {
    display: flex;
    align-items: center;
    min-height: 48px;
    white-space: normal;
  }
  body .gr-header .gr-nav .gr-nav-cta { margin-top: 10px; }
  body .gr-menu-toggle { min-width: 48px; min-height: 48px; color: #292a26; }
}

@media (max-width: 767px) {
  body .elementor-widget-gr-projects,
  body .elementor-widget-gr-project-gallery,
  body .gh-featured-projects { min-width: 0; max-width: 100%; }

  body.home .gr-project-grid,
  body .gr-home-v2 .gh-featured-projects .gr-project-grid,
  body .gr-gallery {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 12px !important;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #8a4a1c #e5e1d8;
    padding-block: 0 10px;
  }
  body.home .gr-project-grid > .gr-project-card,
  body .gr-home-v2 .gh-featured-projects .gr-project-grid > .gr-project-card,
  body .gr-gallery > .gr-lightbox-link {
    flex: 0 0 calc(100% - 28px);
    min-width: 0;
    max-width: none;
    margin: 0 !important;
    padding: 0 !important;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
  body.home .gr-project-grid > .gr-project-card:last-child,
  body .gr-home-v2 .gh-featured-projects .gr-project-grid > .gr-project-card:last-child,
  body .gr-gallery > .gr-lightbox-link:last-child { margin-right: 28px !important; }
  body.home .gr-project-grid > .gr-project-card:only-child,
  body .gr-home-v2 .gh-featured-projects .gr-project-grid > .gr-project-card:only-child,
  body .gr-gallery > .gr-lightbox-link:only-child { flex-basis: 100%; margin-right: 0 !important; }
  body .gr-gallery > .gr-lightbox-link {
    display: block;
    aspect-ratio: 4 / 3;
    background: #e9e5dc;
  }
  body .gr-gallery > .gr-lightbox-link img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  body .gr-mobile-slider:focus-visible,
  body .gr-mobile-slider > a:focus-visible,
  body .gr-mobile-slider > article > a:focus-visible { outline-offset: -3px; }
  body .gr-slider-controls:not([hidden]) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    color: #62665f;
    font-size: 12px;
  }
  body .gr-slider-controls button {
    appearance: none;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 10px 4px;
    min-height: 44px;
    color: #292a26;
    font: inherit;
    cursor: pointer;
  }
  body .gr-slider-controls button:disabled { opacity: .4; cursor: default; }
  body .gr-slider-controls span { font-variant-numeric: tabular-nums; }
}
@media (prefers-reduced-motion: reduce) {
  body .gr-mobile-slider { scroll-behavior: auto; }
}

/* Keep the project call-to-action inside narrow mobile viewports. */
@media (max-width: 767px) {
  body.gr-site-v3 .gx-cta .gx-heading .elementor-heading-title {
    font-size: clamp(26px, 7.8vw, 32px) !important;
    overflow-wrap: anywhere;
  }
}

/* One photograph at a time on larger screens. A gallery with one photo needs no controls. */
@media (min-width: 768px) {
  body .elementor-widget-gr-project-gallery { min-width: 0; max-width: 100%; }
  body .gr-gallery.gr-mobile-slider {
    display: flex !important; flex-flow: row nowrap; align-items: stretch; gap: 16px;
    width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: thin;
    scrollbar-color: #8a4a1c #e5e1d8; background: transparent;
  }
  body .gr-gallery.gr-mobile-slider > .gr-lightbox-link {
    flex: 0 0 100%; min-width: 0; max-width: none; margin: 0; padding: 0;
    display: grid; place-items: center; height: clamp(310px,62vh,690px);
    background: #efeeea; scroll-snap-align: start; scroll-snap-stop: always;
  }
  body .gr-gallery.gr-mobile-slider > .gr-lightbox-link img {
    width: 100%; height: 100%; min-height: 0; object-fit: contain; aspect-ratio: auto;
  }
  body .gr-gallery + .gr-slider-controls:not([hidden]) {
    display: flex; align-items: center; justify-content: flex-end; gap: 16px;
    padding-block: 12px; color: #353631; font-size: 14px;
  }
  body .gr-gallery + .gr-slider-controls button {
    appearance: none; min-height: 44px; padding: 7px 16px; cursor: pointer;
    background: transparent; border: 1px solid #b5b4ac; border-radius: 4px;
    color: #292a26; font: inherit;
  }
  body .gr-gallery + .gr-slider-controls button:not(:disabled):hover { border-color: #4c4d46; background: #f2f0eb; }
  body .gr-gallery + .gr-slider-controls button:disabled { opacity: .4; cursor: default; }
  body .gr-gallery + .gr-slider-controls span { min-width: 5ch; text-align: center; font-variant-numeric: tabular-nums; }
  body .gr-gallery.gr-mobile-slider:focus-visible, body .gr-gallery.gr-mobile-slider > a:focus-visible { outline-offset: -3px; }
}

/* Direct WhatsApp links remain ordinary links even with scripts disabled. */
body a.gr-wa-button, body.gr-footer-design-2 .gf-contact .gr-contact a.gr-wa-button {
  box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; width: max-content; min-height: 44px; margin-block-start: 8px; padding: 9px 14px;
  border: 1px solid transparent; border-radius: 24px; background: #116047; color: #fff;
  font: 600 14px/1.2 Montserrat, Arial, sans-serif; text-decoration: none;
}
body a.gr-wa-button:hover, body.gr-footer-design-2 .gf-contact .gr-contact a.gr-wa-button:hover { background: #094c37; color: white; }
body .gr-wa-button svg { display: block; flex: none; }
body a.gr-wa-float {
  position: fixed; z-index: 90; inset-inline-end: max(18px,env(safe-area-inset-right));
  bottom: max(18px,env(safe-area-inset-bottom)); box-shadow: 0 3px 13px #163b2e35; margin: 0;
}
body:has(.gr-consent-panel:not([hidden]),dialog[open],.gr-nav.is-open) .gr-wa-float,
body .gr-wa-float[hidden] { display:none!important; }
@media (max-width: 767px) {
  body a.gr-wa-float { padding: 0; width: 48px; height: 48px; }
  body a.gr-wa-float span { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media print { body a.gr-wa-float { display: none!important; } }

.gr-site-v3 .gr-case-inquiry { margin:clamp(26px,4vw,48px) 0 12px; padding:clamp(18px,3vw,30px); background:#f0eee9; border-inline-start:3px solid #b85f26; color:#242622; }
.gr-site-v3 .gr-case-inquiry h2 { margin:0 0 10px; font-size:clamp(21px,2.6vw,30px); line-height:1.2; letter-spacing:-.035em; }
.gr-site-v3 .gr-case-inquiry p { margin:0 0 12px; max-width:65ch; }
.gr-site-v3 .gr-case-inquiry .gr-text-link { display:inline-flex; align-items:center; min-height:44px; white-space:normal; }
