/* Header/footer shell safeguards. Scoped to avoid changing article layouts. */
.yuda-site-header,
.yuda-site-header *,
.yc-footer,
.yc-footer *,
#index_cta_bottom,
#index_cta_bottom * {
  box-sizing: border-box;
}

.yuda-site-header img,
.yc-footer img {
  max-width: 100%;
  height: auto;
}

/* Fixed CTA icons must retain their compact legacy size.
   A generic #index_cta_bottom img { max-width:100% } rule overrides
   .img_icon { max-width:1em } because the ID selector is more specific,
   which makes the SVG icons expand to the full CTA button width. */
#index_cta_bottom img {
  height: auto;
}

#index_cta_bottom .img_icon {
  display: inline-block;
  width: 1em;
  max-width: 1em;
  height: 1em;
  margin-right: 5px;
  object-fit: contain;
  flex: 0 0 auto;
  vertical-align: middle;
}

.yuda-site-header a,
.yc-footer a,
#index_cta_bottom a {
  -webkit-tap-highlight-color: transparent;
}

/* v2.6 — fixed CTA unified site-wide
   - Desktop: show the same fixed CTA on every standard page.
   - Mobile: use the compact lower-page CTA design on every page, including home.
   - This file is loaded after wp_head(), so it is the single source of truth for CTA sizing.
*/

/* Common fixed behavior */
#index_cta_bottom {
  display: block !important;
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  margin: 0 !important;
  z-index: 9999 !important;
  background: url(../../../_common/img/img_index_cta_bottom_bg.webp) no-repeat center center / cover !important;
  transform: none !important;
}

#index_cta_bottom .index_cta_bottom_text {
  color: #fff !important;
  text-align: center !important;
}

#index_cta_bottom .index_cta_bottom_text span {
  color: #ddb97a !important;
}

#index_cta_bottom .bn_cta {
  color: #fff !important;
  text-decoration: none !important;
  background: linear-gradient(to right, #855d23 0%, #c09044 100%) !important;
  border: 0 !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.10)) !important;
}

@media screen and (min-width: 768px) {
  body {
    padding-bottom: 94px !important;
  }

  #index_cta_bottom {
    min-height: 88px !important;
    padding: 10px 8px 12px !important;
  }

  #index_cta_bottom .index_cta_bottom_text {
    display: block !important;
    margin: 0 0 7px !important;
    font-size: 16px !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
  }

  #index_cta_bottom .index_cta_bottom_text span {
    display: inline-block !important;
    margin: 0 5px 0 0 !important;
  }

  #index_cta_bottom .index_cta_bn_wrap {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    width: 100% !important;
    margin: 0 !important;
  }

  #index_cta_bottom .bn_cta {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 38px !important;
    margin: 0 !important;
    padding: 8px 15px !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
  }

  #index_cta_bottom .img_icon {
    width: 17px !important;
    max-width: 17px !important;
    height: 17px !important;
    margin: 0 5px 0 0 !important;
  }
}

@media screen and (max-width: 767px) {
  body {
    padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px)) !important;
  }

  #index_cta_bottom {
    min-height: 0 !important;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)) !important;
  }

  #index_cta_bottom .index_cta_bottom_text {
    display: block !important;
    margin: 0 0 5px !important;
    font-size: 10px !important;
    line-height: 1.25 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
  }

  #index_cta_bottom .index_cta_bottom_text span {
    display: inline-block !important;
    margin-right: 2px !important;
  }

  #index_cta_bottom .index_cta_bn_wrap {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
    width: 100% !important;
    margin: 0 !important;
  }

  #index_cta_bottom .bn_cta {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 42px !important;
    margin: 0 !important;
    padding: 7px 4px !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
  }

  #index_cta_bottom .img_icon {
    width: 14px !important;
    max-width: 14px !important;
    height: 14px !important;
    margin: 0 4px 0 0 !important;
  }
}

@media screen and (max-width: 374px) {
  #index_cta_bottom .index_cta_bottom_text {
    display: none !important;
  }

  body {
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)) !important;
  }

  #index_cta_bottom .bn_cta {
    min-height: 44px !important;
    font-size: 13px !important;
  }
}

/* v2.3 — keep reCAPTCHA badge above the mobile CTA. */
@media screen and (max-width: 767px) {
  .grecaptcha-badge {
    bottom: calc(82px + env(safe-area-inset-bottom, 0px)) !important;
  }
}
