.elementor-widget-html .tfys-services, .elementor-widget-shortcode .tfys-services,
  .elementor-widget-html .tfys-services *, .elementor-widget-shortcode .tfys-services *,
  .tfys-modal,
  .tfys-modal * {
    box-sizing: border-box;
  }

  .tfys-services {
    --tfys-cream: #f8f6df;
    --tfys-card: #f3f0e4;
    --tfys-text: #4A4540;
    --tfys-text-mid: #6D6560;
    --tfys-ocher: #C28E4D;
    --tfys-ocher-hover: #A87638;
    --tfys-sage: #5C6652;
    --tfys-sage-hover: #4A5343;
    --tfys-sage-dark: #3E4A3A;
    --tfys-max: 1680px;
    --tfys-h2: clamp(2.275rem, 3.9vw, 2.86rem);
    --tfys-h3: clamp(1.27rem, 1.43vw, 1.4rem);
    --tfys-body: clamp(0.84rem, 0.94vw, 0.91rem);
    --tfys-line: 1.5;
    --tfys-img-h: 153px;
    position: relative;
    isolation: isolate;
    width: 100%;
    max-width: var(--tfys-max);
    margin: 0 auto;
    padding: 62px 26px 73px;
    font-family: 'Montserrat', Arial, sans-serif !important;
    color: var(--tfys-text);
    background: transparent !important;
  }

  .tfys-services h2,
  .tfys-services h3,
  .tfys-services p,
  .tfys-services a,
  .tfys-modal h2,
  .tfys-modal h3,
  .tfys-modal p,
  .tfys-modal a,
  .tfys-modal button {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  .tfys-modal ul,
  .tfys-modal li {
    border: 0 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  .tfys-services__header {
    text-align: center;
    margin-bottom: 36px;
  }

  .tfys-services__heading {
    font-family: 'Playfair Display', Georgia, serif !important;
    font-size: var(--tfys-h2) !important;
    font-weight: 400 !important;
    line-height: 1.25 !important;
    color: var(--tfys-sage-dark) !important;
  }

  .tfys-services__line {
    display: block;
    width: 62px;
    height: 2px;
    margin: 26px auto 0 !important;
    background: var(--tfys-ocher) !important;
    border-radius: 2px;
  }

  .tfys-services__grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
  }

  .tfys-services__card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: transparent !important;
    border: 0 !important;
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.4s ease;
  }

  .tfys-services__card:hover {
    transform: translateY(-3px);
  }

  .tfys-services__media {
    position: relative;
    flex-shrink: 0;
  }

  .tfys-services__img-wrap {
    position: relative;
    height: var(--tfys-img-h);
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    background: var(--tfys-card);
  }

  .tfys-services__img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    object-fit: cover !important;
    object-position: center center !important;
    pointer-events: none;
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  .tfys-services__card:hover .tfys-services__img {
    transform: scale(1.03);
  }

  .tfys-services__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 16px 18px;
    background: var(--tfys-card) !important;
    border-radius: 0 0 12px 12px;
  }

  .tfys-services__title {
    margin: 0 0 8px !important;
    font-family: 'Playfair Display', Georgia, serif !important;
    font-size: var(--tfys-h3) !important;
    font-weight: 500 !important;
    line-height: 1.25 !important;
    color: var(--tfys-text) !important;
  }

  .tfys-services__text {
    flex: 1;
    margin: 0 0 0.95em !important;
    font-family: 'Montserrat', Arial, sans-serif !important;
    font-size: var(--tfys-body) !important;
    font-weight: 300 !important;
    line-height: 1.5 !important;
    color: var(--tfys-text-mid) !important;
  }

  .tfys-services__more {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.4em;
    margin-top: auto !important;
    padding: 12px 21px !important;
    font-family: 'Montserrat', Arial, sans-serif !important;
    font-size: 1.1rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.02em;
    line-height: 1.2 !important;
    color: var(--tfys-ocher) !important;
    text-decoration: none !important;
    background: transparent !important;
    border: 1px solid rgba(194, 142, 77, 0.55) !important;
    border-radius: 8px !important;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
  }

  .tfys-services__more:hover,
  .tfys-services__more:focus {
    color: var(--tfys-ocher-hover) !important;
    border-color: var(--tfys-ocher-hover) !important;
    background: rgba(194, 142, 77, 0.08) !important;
    text-decoration: none !important;
    transform: translateY(-1px);
  }

  .tfys-services__more-arrow {
    transition: transform 0.25s ease;
  }

  .tfys-services__more:hover .tfys-services__more-arrow {
    transform: translateX(3px);
  }

  /* ── Modal ── */
  .tfys-modal {
    --tfys-cream: #f8f6df;
    --tfys-card: #f3f0e4;
    --tfys-text: #4A4540;
    --tfys-text-mid: #6D6560;
    --tfys-ocher: #C28E4D;
    --tfys-sage: #5C6652;
    --tfys-sage-hover: #4A5343;
    --tfys-sage-dark: #3E4A3A;
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    width: 100vw !important;
    height: 100% !important;
    height: 100dvh !important;
    max-width: none !important;
    margin: 0 !important;
    z-index: 2147483000 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 24px 16px !important;
    font-family: 'Montserrat', Arial, sans-serif !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    box-sizing: border-box !important;
  }

  .tfys-modal.is-open,
  .tfys-modal.is-open[hidden] {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  .tfys-modal__backdrop {
    position: absolute !important;
    inset: 0 !important;
    background: rgba(62, 74, 58, 0.55) !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    cursor: pointer;
  }

  .tfys-modal__dialog {
    position: relative !important;
    z-index: 1 !important;
    width: min(730px, 100%) !important;
    max-height: min(88vh, 820px) !important;
    max-height: min(88dvh, 820px) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    background: var(--tfys-cream) !important;
    border-radius: 18px !important;
    box-shadow: 0 24px 64px rgba(62, 74, 58, 0.28) !important;
    transform: translateY(18px) scale(0.97);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .tfys-modal.is-open .tfys-modal__dialog {
    transform: translateY(0) scale(1);
  }

  .tfys-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    width: 40px;
    height: 40px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
    border: 0 !important;
    background: rgba(248, 246, 223, 0.88) !important;
    color: var(--tfys-sage-dark) !important;
    font-size: 1.35rem !important;
    line-height: 1 !important;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease;
  }

  .tfys-modal__close:hover {
    background: #fff !important;
    transform: rotate(90deg);
  }

  @media (max-width: 760px) {
    .tfys-modal.is-open {
      align-items: center !important;
      padding: max(12px, env(safe-area-inset-top, 0px)) 10px max(12px, env(safe-area-inset-bottom, 0px)) !important;
    }

    .tfys-modal.is-open .tfys-modal__dialog {
      width: 100% !important;
      max-width: 100% !important;
      max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
      max-height: calc(100vh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
      border-radius: 16px !important;
      transform: translateY(0) scale(1) !important;
    }

    .tfys-modal.is-open .tfys-modal__close {
      position: sticky !important;
      top: 0 !important;
      right: auto !important;
      align-self: flex-end;
      flex-shrink: 0;
      margin: 8px 8px 0 auto !important;
      width: 44px !important;
      height: 44px !important;
      background: rgba(248, 246, 223, 0.98) !important;
      box-shadow: 0 2px 10px rgba(62, 74, 58, 0.18) !important;
      z-index: 6 !important;
    }

    .tfys-modal.is-open .tfys-modal__media {
      margin-top: 0;
    }

    .tfys-modal.is-open .tfys-modal__content {
      min-height: 0;
      overscroll-behavior: contain;
    }
  }

  .tfys-modal__media {
    position: relative;
    flex-shrink: 0;
    height: 220px;
    overflow: hidden;
    background: var(--tfys-card);
  }

  .tfys-modal__img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    border: 0 !important;
    margin: 0 !important;
  }

  .tfys-modal__media-fade {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 72px;
    background: linear-gradient(to top, var(--tfys-cream), transparent);
    pointer-events: none;
  }

  .tfys-modal__content {
    overflow-y: auto;
    padding: 16px 40px 44px;
    -webkit-overflow-scrolling: touch;
  }

  .tfys-modal p.tfys-modal__eyebrow {
    margin: 0 0 8px !important;
    font-size: clamp(0.75rem, 1.15vw, 0.875rem) !important;
    font-weight: 500 !important;
    letter-spacing: 0.32em;
    line-height: 1.3 !important;
    text-transform: uppercase;
    color: var(--tfys-ocher) !important;
  }

  .tfys-modal h2.tfys-modal__title {
    margin: 0 0 10px !important;
    max-width: 650px;
    font-family: 'Playfair Display', Georgia, serif !important;
    font-size: clamp(1.9rem, 4.6vw, 2.95rem) !important;
    font-weight: 400 !important;
    line-height: 1.08 !important;
    color: var(--tfys-sage-dark) !important;
    text-wrap: balance;
  }

  .tfys-modal__line {
    display: block;
    width: clamp(48px, 8vw, 58px);
    height: 2px;
    margin: 0 0 30px !important;
    background: var(--tfys-ocher) !important;
    border-radius: 2px;
  }

  .tfys-modal p.tfys-modal__lead {
    margin: 0 0 10px !important;
    max-width: 635px;
    font-size: clamp(1.0625rem, 1.35vw, 1.1875rem) !important;
    font-weight: 300 !important;
    line-height: 1.6 !important;
    color: var(--tfys-text-mid) !important;
    text-wrap: pretty;
  }

  .tfys-modal p.tfys-modal__text {
    margin: 0 !important;
    max-width: 635px;
    font-size: clamp(1.0625rem, 1.35vw, 1.1875rem) !important;
    font-weight: 300 !important;
    line-height: 1.6 !important;
    color: var(--tfys-text-mid) !important;
    text-wrap: pretty;
  }

  .tfys-modal h3.tfys-modal__list-title {
    margin: 22px 0 8px !important;
    font-family: 'Playfair Display', Georgia, serif !important;
    font-size: clamp(1.2rem, 1.9vw, 1.4rem) !important;
    font-weight: 500 !important;
    line-height: 1.25 !important;
    color: var(--tfys-text) !important;
  }

  .tfys-modal__list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: 635px;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .tfys-modal__list li {
    position: relative;
    margin: 0 !important;
    padding: 0 0 0 16px !important;
    font-size: clamp(1.0625rem, 1.35vw, 1.1875rem) !important;
    font-weight: 300 !important;
    line-height: 1.6 !important;
    color: var(--tfys-text-mid) !important;
    list-style: none !important;
    text-wrap: pretty;
  }

  .tfys-modal__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.58em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--tfys-ocher);
    opacity: 0.85;
  }

  .tfys-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 18px;
    align-items: center;
    margin-top: 2.6em !important;
    padding-top: 0;
  }

  .tfys-modal a.tfys-modal__btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.4em !important;
    width: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 12px 21px !important;
    font-family: 'Montserrat', Arial, sans-serif !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.02em !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    text-transform: none !important;
    text-align: center !important;
    border-radius: 8px !important;
    border: 1px solid rgba(194, 142, 77, 0.55) !important;
    cursor: pointer !important;
    color: var(--tfys-ocher) !important;
    background: transparent !important;
    box-shadow: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease, transform 0.25s ease !important;
  }

  .tfys-modal a.tfys-modal__btn:hover,
  .tfys-modal a.tfys-modal__btn:focus {
    color: var(--tfys-ocher-hover) !important;
    border-color: var(--tfys-ocher-hover) !important;
    background: rgba(194, 142, 77, 0.08) !important;
    transform: translateY(-1px);
    box-shadow: none !important;
    text-decoration: none !important;
  }

  .tfys-modal__btn-arrow {
    display: inline-block;
    transition: transform 0.25s ease;
  }

  .tfys-modal a.tfys-modal__btn:hover .tfys-modal__btn-arrow {
    transform: translateX(3px);
  }

  body.tfys-modal-open {
    overflow: hidden !important;
  }

  @media (max-width: 1100px) {
    .tfys-services__grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 21px;
    }

    .tfys-services {
      --tfys-img-h: 169px;
    }
  }

  @media (max-width: 760px) {
    .tfys-services {
      padding: 52px 20px 62px;
      --tfys-img-h: 182px;
    }

    .tfys-services__grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 18px;
    }

    .tfys-modal__content {
      padding: 12px 24px 36px;
    }

    .tfys-modal p.tfys-modal__eyebrow {
      letter-spacing: 0.26em;
    }

    .tfys-modal h2.tfys-modal__title {
      font-size: clamp(1.75rem, 7vw, 2.35rem) !important;
    }

    .tfys-modal__media {
      height: 180px;
    }
  }

  @media (max-width: 480px) {
    .tfys-services {
      --tfys-img-h: 234px;
    }

    .tfys-services__grid {
      grid-template-columns: 1fr;
      max-width: 494px;
      margin: 0 auto;
      gap: 36px;
    }
  }

/* Legacy double-X / force-x: never show */
.tfys-modal > .tfys-modal__x,
[id$="-force-x"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

