/* ==========================================================================
   SAJ Our Treatments — Elementor widget additions
   our-treatments.css is an unchanged copy of the original; this file only
   adds what the widget needs on top of it.
   ========================================================================== */

/* ---- Elementor's global image reset ---------------------------------------
   Elementor's frontend.css has `.elementor img { height: auto; ... }`
   (specificity 0,1,1), which beats the original single-class rule and would
   leave the absolutely positioned photo short of its curved frame. */
.saj-treatments .saj-treatments__image {
  height: 100%;
}

/* Elementor also has `.elementor .elementor-widget:not(…):not(…) figure
   { margin: 0 }` (0,4,1), which removes the white rim around the photo.
   Same declaration as the original, with enough specificity to win. */
.saj-treatments[data-saj-treatments] .saj-treatments__grid .saj-treatments__card figure.saj-treatments__media {
  margin: var(--t-media-inset) var(--t-media-inset) var(--t-media-inset) 0;
}

/* Elementor's `.elementor a { box-shadow: none }` (0,1,1) removes the
   button's orange glow; restore the original value. */
.saj-treatments .saj-treatments__cta {
  box-shadow: 0 18px 34px -18px rgba(255, 90, 10, 0.8);
}

/* ---- Cards with optional parts left empty ---------------------------------
   The original card grid is icon | text | image. Without an icon the text
   moves into the first column, without an image the text takes its room. */
.saj-treatments__card--no-icon {
  grid-template-columns: minmax(0, 1fr) 42%;
  padding-left: 22px;
}

.saj-treatments__card--no-media {
  grid-template-columns: var(--t-icon-size) minmax(0, 1fr);
  padding-right: 22px;
}

.saj-treatments__card--no-icon.saj-treatments__card--no-media {
  grid-template-columns: minmax(0, 1fr);
}

/* ---- Button without a tagline stays on the right, as in the design ------- */
.saj-treatments__footer > .saj-treatments__cta:only-child {
  margin-left: auto;
}

@media (max-width: 767.98px) {
  .saj-treatments__footer > .saj-treatments__cta:only-child {
    margin-left: 0;
  }
}
