/*
 * Mobile services typography refinement — approved local preview, 2026-08-08.
 * Loaded after the legacy homepage service rules. Desktop is untouched.
 */

@media (max-width: 767px) {
  body.yfg-shell .bde-section-24-325 {
    --yfg-mobile-service-gold-soft: #ecd09f;
    --yfg-mobile-service-copy: rgba(226, 235, 243, 0.76);
    --yfg-mobile-service-rule: rgba(240, 201, 139, 0.17);
  }

  body.yfg-shell .bde-section-24-325 > .section-container {
    min-height: 0 !important;
    padding: 32px 20px 28px !important;
    row-gap: 26px !important;
  }

  body.yfg-shell .bde-section-24-325 .bde-heading-24-326.bde-heading {
    width: 100% !important;
    max-width: none !important;
    color: var(--yfg-service-card-gold) !important;
    font-family: "Libre Baskerville", "Songti SC", "Noto Serif SC", "Noto Serif TC", Georgia, serif !important;
    font-size: clamp(27px, 7.3vw, 30px) !important;
    font-weight: 400 !important;
    letter-spacing: 0.018em !important;
    line-height: 1.28 !important;
    text-wrap: pretty;
  }

  body.yfg-shell .bde-section-24-325 .bde-heading-24-326.bde-heading > span {
    white-space: nowrap;
  }

  body.yfg-shell .bde-section-24-325 .bde-heading-24-326.bde-heading * {
    color: inherit !important;
    font: inherit !important;
    letter-spacing: inherit !important;
    line-height: inherit !important;
  }

  body.yfg-shell .bde-section-24-325 .swiper-wrapper {
    border-top-color: var(--yfg-mobile-service-rule) !important;
  }

  body.yfg-shell .bde-section-24-325 .bde-advancedslide .bde-div {
    padding: 18px 50px 19px 2px !important;
    border-bottom-color: var(--yfg-mobile-service-rule) !important;
    transition: background 220ms ease !important;
  }

  body.yfg-shell .bde-section-24-325 .bde-advancedslide h5 {
    margin-bottom: 3px !important;
    color: var(--yfg-mobile-service-gold-soft) !important;
    font-family: var(--yfg-refine-font) !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    letter-spacing: 0.025em !important;
    line-height: 1.42 !important;
  }

  body.yfg-shell .bde-section-24-325 .bde-advancedslide h5 + .bde-text {
    max-width: 22em !important;
    color: var(--yfg-mobile-service-copy) !important;
    font-family: var(--yfg-refine-font) !important;
    font-size: 13.5px !important;
    font-weight: 400 !important;
    letter-spacing: 0.006em !important;
    line-height: 1.62 !important;
    text-wrap: pretty;
    overflow: visible !important;
    -webkit-line-clamp: unset !important;
  }

  body.yfg-shell .bde-section-24-325 .bde-advancedslide .bde-text:has(a),
  body.yfg-shell .bde-section-24-325 .bde-advancedslide .bde-text:has(a) a {
    width: 32px !important;
    height: 32px !important;
  }

  body.yfg-shell .bde-section-24-325 .bde-advancedslide .bde-text:has(a) a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    color: var(--yfg-service-card-gold) !important;
    border-color: rgba(240, 201, 139, 0.28) !important;
    border-radius: 50% !important;
    background: rgba(240, 201, 139, 0.045) !important;
    font-size: 0 !important;
    line-height: 0 !important;
    transition: color 240ms ease, border-color 240ms ease, background-color 240ms ease, transform 240ms ease !important;
  }

  body.yfg-shell .bde-section-24-325 .bde-advancedslide .bde-text:has(a) a::after {
    display: none !important;
    content: none !important;
  }

  body.yfg-shell .bde-section-24-325 .yfg-mobile-service-arrow {
    display: block !important;
    flex: 0 0 17px !important;
    width: 17px !important;
    height: 17px !important;
    margin: 0 !important;
    transform: none !important;
    stroke-width: 1.55 !important;
  }

  body.yfg-shell .bde-section-24-325 .bde-advancedslide .bde-div:is(:hover, :active, :focus-within) {
    background: linear-gradient(90deg, rgba(7, 54, 85, 0.34), rgba(7, 54, 85, 0.08)) !important;
  }

  body.yfg-shell .bde-section-24-325 .bde-advancedslide .bde-div:is(:hover, :active, :focus-within) .bde-text:has(a) a {
    color: var(--yfg-service-navy) !important;
    border-color: var(--yfg-service-card-gold) !important;
    background: var(--yfg-service-card-gold) !important;
    transform: translateX(4px) !important;
  }

  body.yfg-shell .bde-section-24-325.yfg-mobile-services-list-ready .swiper-slide {
    transform: translate3d(-22px, 0, 0) !important;
  }

  body.yfg-shell .bde-section-24-325.yfg-mobile-services-list-ready.is-visible .swiper-slide {
    transition:
      opacity 500ms ease var(--yfg-mobile-service-delay, 0ms),
      transform 620ms cubic-bezier(0.22, 1, 0.36, 1) var(--yfg-mobile-service-delay, 0ms) !important;
  }
}

@media (max-width: 359px) {
  body.yfg-shell .bde-section-24-325 > .section-container {
    padding-inline: 15px !important;
  }

  body.yfg-shell .bde-section-24-325 .bde-advancedslide .bde-div {
    padding-right: 45px !important;
  }

  body.yfg-shell .bde-section-24-325 .bde-advancedslide h5 {
    font-size: 15.5px !important;
  }

  body.yfg-shell .bde-section-24-325 .bde-advancedslide h5 + .bde-text {
    font-size: 13px !important;
  }

  body.yfg-shell .bde-section-24-325 .bde-advancedslide .bde-text:has(a),
  body.yfg-shell .bde-section-24-325 .bde-advancedslide .bde-text:has(a) a {
    width: 30px !important;
    height: 30px !important;
  }
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  body.yfg-shell .bde-section-24-325.yfg-mobile-services-list-ready .swiper-slide,
  body.yfg-shell .bde-section-24-325.yfg-mobile-services-list-ready.is-visible .swiper-slide {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
