/*
 * Travel Biblical mobile conversion layer.
 * Loaded after the shared and page-specific styles so the narrow-screen
 * corrections stay isolated from the established desktop layout.
 */

@media (max-width: 767px) {
  :root {
    --tb-shell: min(100% - 32px, 1224px);
  }

  html {
    scroll-padding-bottom: calc(84px + env(safe-area-inset-bottom));
    scroll-padding-top: calc(var(--tb-wp-admin-bar-height, 0px) + 62px);
  }

  body {
    font-size: 16px;
    line-height: 1.65;
  }

  body,
  button,
  input,
  select,
  textarea {
    letter-spacing: 0;
  }

  a:focus-visible,
  button:focus-visible,
  input:focus-visible,
  select:focus-visible,
  textarea:focus-visible,
  summary:focus-visible {
    outline: 3px solid var(--tb-gold-500, #b7852c);
    outline-offset: 3px;
  }

  /* Compact header, but a full-height, scrollable mobile menu. */
  .site-header {
    --tb-header-height: 62px;
  }

  .site-header__inner {
    min-height: var(--tb-header-height);
  }

  .site-branding__name {
    font-size: 1.35rem;
  }

  .site-nav {
    align-items: stretch;
    max-height: calc(100svh - var(--tb-header-height));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: .75rem 16px 1rem;
    -webkit-overflow-scrolling: touch;
  }

  .site-nav__list a {
    align-items: center;
    display: flex;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0;
    min-height: 48px;
    padding: .55rem 0;
    text-transform: none;
  }

  .button--header-mobile {
    font-size: 15px;
    letter-spacing: .02em;
    min-height: 52px;
  }

  /* Homepage first screen and conversion landmarks. */
  .home-single-hero,
  .home-single-hero .hero__content {
    min-height: clamp(520px, 72svh, 620px);
  }

  .home-single-hero .hero__content {
    justify-content: flex-end;
    padding: 2rem 0 1.75rem;
  }

  .home-single-hero__media img {
    object-position: 68% center;
  }

  .hero--reference h1,
  .home-single-hero h1 {
    font-size: clamp(2.375rem, 10.8vw, 3rem);
    line-height: 1.02;
    margin-bottom: .8rem;
    max-width: 100%;
    overflow-wrap: normal;
    text-wrap: pretty;
    word-break: normal;
  }

  .hero--reference .hero__copy,
  .home-single-hero .hero__copy {
    font-size: 16px;
    line-height: 1.65;
    max-width: 36ch;
  }

  .home-single-hero .hero__planning-signal,
  .home-single-hero .hero__cta-note {
    font-size: 14px;
    letter-spacing: .03em;
    line-height: 1.45;
    text-transform: none;
  }

  .home-single-hero .hero__planning-signal {
    margin-top: .65rem;
  }

  .home-single-hero .hero__actions {
    align-items: stretch;
    display: grid;
    gap: .6rem;
    margin-top: 1rem;
    max-width: 100%;
  }

  .home-single-hero .hero__actions .button--primary {
    min-height: 52px;
    width: 100%;
  }

  .home-single-hero .hero__secondary-action {
    align-items: center;
    display: inline-flex;
    justify-content: flex-start;
    min-height: 44px;
  }

  .hero-proof-strip {
    padding: 0;
  }

  .hero-proof-strip .layout-shell {
    width: 100%;
  }

  .hero-proof-strip .hero__proof {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-proof-strip .hero__proof li,
  .hero-proof-strip .hero__proof li:first-child,
  .hero-proof-strip .hero__proof li:last-child {
    align-items: center;
    border: 0;
    font-size: 14px;
    gap: .45rem;
    line-height: 1.35;
    min-height: 64px;
    padding: .65rem .7rem;
  }

  .hero-proof-strip .hero__proof li:nth-child(odd) {
    border-right: 1px solid var(--tb-border);
  }

  .hero-proof-strip .hero__proof li:nth-child(n + 3) {
    border-top: 1px solid var(--tb-border);
  }

  .hero-proof-strip .hero__proof a {
    text-decoration-thickness: 2px;
  }

  .hero-proof__icon {
    flex: 0 0 auto;
    font-size: 1rem;
  }

  .home-mobile-shortcuts {
    border-top: 1px solid var(--tb-border);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-mobile-shortcuts a {
    align-items: center;
    border-bottom: 1px solid var(--tb-border);
    color: var(--tb-green-900);
    display: flex;
    font-size: 14px;
    font-weight: 700;
    justify-content: space-between;
    min-height: 48px;
    padding: .55rem .7rem;
  }

  .home-mobile-shortcuts a:nth-child(odd) {
    border-right: 1px solid var(--tb-border);
  }

  .home-mobile-shortcuts a::after {
    color: var(--tb-gold-600, #8a641f);
    content: "→";
    font-size: 1rem;
    margin-left: .35rem;
  }

  .home-journeys,
  .home-group-leader,
  .reference-process,
  .home-price-guide,
  .planning-faq--home,
  .home-inquiry,
  .home-resources,
  .home-final-cta {
    padding-bottom: 48px;
    padding-top: 48px;
  }

  .home-section-heading,
  .home-section-heading--wide {
    margin-left: 0;
    margin-right: 0;
    max-width: none;
    text-align: left;
  }

  .home-section-heading .eyebrow {
    justify-content: flex-start;
  }

  .home-section-heading h2 {
    font-size: clamp(2rem, 9vw, 2.45rem);
    line-height: 1.02;
  }

  .home-section-heading__copy {
    font-size: 16px;
    line-height: 1.65;
    margin-left: 0;
    margin-right: 0;
    max-width: 38ch;
  }

  .home-journeys__swipe-hint {
    color: var(--tb-muted);
    display: block;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 .75rem;
  }

  .home-tour-grid {
    display: flex;
    gap: 1rem;
    margin-right: 0;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 0 .25rem .5rem 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .home-tour-grid::-webkit-scrollbar {
    display: none;
  }

  .home-tour-card {
    flex: 0 0 82vw;
    max-width: 360px;
    min-width: 0;
    scroll-snap-align: start;
    width: 82vw;
  }

  .home-tour-card__body {
    padding: 1rem .95rem .9rem;
  }

  .home-tour-card h3 {
    font-size: 1.5rem;
    line-height: 1.02;
  }

  .home-tour-card__meta li {
    font-size: 13px;
    letter-spacing: 0;
  }

  .home-tour-card__summary {
    font-size: 16px;
    line-height: 1.6;
  }

  .home-tour-card__link,
  .home-journeys__action .button {
    font-size: 14px;
    letter-spacing: .02em;
    min-height: 44px;
  }

  .home-journeys__action {
    text-align: left;
  }

  .home-journeys__action .button {
    width: 100%;
  }

  .reference-process h3,
  .reference-process p,
  .home-price-guide__intro > p:not(.eyebrow),
  .home-final-cta p:not(.eyebrow) {
    font-size: 16px;
    line-height: 1.65;
    max-width: 38ch;
  }

  .reference-process h3 {
    font-size: 1.2rem;
    line-height: 1.2;
  }

  .home-price-guide__grid {
    gap: 1.5rem;
  }

  .home-price-guide__intro h2 {
    font-size: clamp(2rem, 9vw, 2.5rem);
    line-height: 1.02;
  }

  .home-price-guide__factors {
    gap: .75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }

  .home-price-guide__factors li {
    font-size: 15px;
    line-height: 1.4;
    min-height: 88px;
    padding: .9rem;
  }

  .home-price-guide__intro .button,
  .home-final-cta__action .button {
    font-size: 15px;
    letter-spacing: .03em;
    min-height: 52px;
    width: 100%;
  }

  .planning-faq--home .planning-faq__title {
    margin-left: 0;
    margin-right: 0;
    text-align: left;
  }

  .planning-faq--home .planning-faq__item summary {
    font-size: 15px;
    min-height: 44px;
    padding-top: .6rem;
    padding-bottom: .6rem;
  }

  .planning-faq--home .planning-faq__item p {
    font-size: 15px;
    line-height: 1.6;
  }

  .home-final-cta__action {
    align-items: stretch;
    max-width: none;
    text-align: left;
  }

  .home-final-cta__action span {
    font-size: 14px;
    text-align: left;
  }

  /* Shared form geometry: 16px prevents iOS focus zoom. */
  .group-inquiry-form input,
  .group-inquiry-form select,
  .group-inquiry-form textarea {
    box-sizing: border-box;
    font-size: 16px !important;
    line-height: 1.5;
    min-height: 52px;
    width: 100%;
  }

  .group-inquiry-form textarea {
    min-height: 128px;
  }

  .tour-single .group-inquiry-form input,
  .tour-single .group-inquiry-form select,
  .tour-single .group-inquiry-form textarea {
    min-height: 52px !important;
  }

  .tour-single .group-inquiry-form textarea {
    min-height: 128px !important;
  }

  .group-inquiry-form label {
    font-size: 15px !important;
    line-height: 1.4;
    margin-bottom: .4rem;
  }

  .group-inquiry-form .form-help,
  .form-help {
    font-size: 14px !important;
    line-height: 1.55;
  }

  .group-inquiry-form .form-privacy,
  .form-privacy {
    align-items: flex-start;
    font-size: 13px !important;
    justify-content: flex-start;
    line-height: 1.5;
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: none;
    text-align: left !important;
  }

  .group-inquiry-form button[type="submit"] {
    font-size: 15px;
    letter-spacing: .03em;
    min-height: 52px;
    width: 100%;
  }

  .form-field-error,
  .form-notice--error {
    font-size: 14px;
    line-height: 1.5;
  }

  /* Tours: keep the section index visible and reachable under the header. */
  .tour-single,
  .ephesus-landing {
    --tour-header-height: 62px;
    --tour-section-nav-height: 50px;
    --tour-scroll-offset: calc(var(--tour-admin-bar-height, 0px) + var(--tour-header-height) + var(--tour-section-nav-height) + 12px);
  }

  .tour-section-nav {
    display: block;
    height: var(--tour-section-nav-height);
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .tour-section-nav::-webkit-scrollbar {
    display: none;
  }

  .tour-section-nav .layout-shell {
    align-items: stretch;
    display: flex;
    margin: 0;
    max-width: none;
    min-height: var(--tour-section-nav-height);
    padding: 0 16px;
    width: max-content;
  }

  .tour-section-nav .layout-shell > a,
  .tour-section-nav .layout-shell > a:first-child {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 15px;
    letter-spacing: 0;
    min-height: var(--tour-section-nav-height);
    padding: 0 .85rem;
    white-space: nowrap;
  }

  .tour-section-nav .layout-shell > a:first-child {
    padding-left: 0;
  }

  .tour-section-nav a::after,
  .tour-section-nav a:first-child::after {
    bottom: 0;
    left: .85rem;
    right: .85rem;
  }

  .tour-section-nav a:first-child::after {
    left: 0;
  }

  .tour-section-nav a[aria-current="location"] {
    color: var(--tour-forest);
    font-weight: 800;
  }

  .tour-section-nav__cta {
    color: #735217 !important;
  }

  .tour-section,
  .tour-inquiry,
  .tour-inline-inquiry,
  .tour-journey__route {
    scroll-margin-top: var(--tour-scroll-offset);
  }

  .tour-hero {
    min-height: clamp(520px, 76svh, 620px);
  }

  .tour-hero__inner {
    min-height: inherit;
    padding-bottom: 2rem;
    padding-top: 1rem;
  }

  .tour-breadcrumbs {
    font-size: 14px;
    margin-bottom: 2.2rem;
  }

  .tour-breadcrumbs > span[aria-hidden="true"]:last-of-type,
  .tour-breadcrumbs > span[aria-current="page"] {
    display: none;
  }

  .tour-hero h1,
  :is(.tour-single--paul-turkey-pilot, .tour-single--seven-churches-rollout) .tour-hero--pilot h1 {
    font-size: clamp(2.375rem, 11.2vw, 3.125rem);
    line-height: 1;
    max-width: 100%;
    overflow-wrap: normal;
    text-wrap: pretty;
    word-break: normal;
  }

  .tour-hero__summary,
  :is(.tour-single--paul-turkey-pilot, .tour-single--seven-churches-rollout) .tour-hero--pilot .tour-hero__summary {
    font-size: 16px;
    line-height: 1.65;
    max-width: 38ch;
  }

  .tour-hero__planning-signal,
  .tour-hero__cta-note,
  :is(.tour-single--paul-turkey-pilot, .tour-single--seven-churches-rollout) .tour-hero__cta-note,
  :is(.tour-single--paul-turkey-pilot, .tour-single--seven-churches-rollout) .tour-hero__planning-signal {
    font-size: 14px;
    letter-spacing: .03em;
    line-height: 1.5;
    text-transform: none;
  }

  .tour-hero__actions .button--primary {
    min-height: 52px;
    width: 100%;
  }

  .tour-hero__actions .tour-text-link {
    min-height: 44px;
  }

  .tour-fact-bar__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tour-fact {
    min-height: 72px;
    padding: .75rem .8rem;
  }

  .tour-fact small {
    font-size: 11px !important;
    letter-spacing: .04em;
  }

  .tour-fact strong {
    font-size: 14px !important;
    line-height: 1.4;
  }

  .tour-trust-strip,
  .tour-trust-strip--has-rating {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0;
  }

  .tour-trust-strip > div,
  .tour-trust-strip--has-rating > div {
    align-items: flex-start;
    border-bottom: 1px solid rgba(255,255,255,.12);
    border-right: 1px solid rgba(255,255,255,.12);
    display: grid;
    justify-items: start;
    min-height: 68px;
    padding: .8rem .7rem;
    text-align: left;
  }

  .tour-trust-strip > div:nth-child(even),
  .tour-trust-strip--has-rating > div:nth-child(even) {
    border-right: 0;
  }

  .tour-trust-strip strong,
  .tour-trust-strip--has-rating strong {
    font-size: 12px !important;
    letter-spacing: .02em;
    line-height: 1.35;
    text-transform: none;
  }

  .tour-trust-strip span,
  .tour-trust-strip--has-rating span {
    display: block;
    font-size: 13px !important;
    line-height: 1.45;
  }

  .tour-section__heading-row,
  .tour-section__heading-row > p,
  .tour-gallery__heading > p {
    text-align: left;
  }

  .tour-section__lede,
  .tour-prose,
  .tour-journey__overview,
  .tour-day__description,
  .tour-route__summary,
  .tour-journey__route-heading > p {
    font-size: 16px;
    line-height: 1.7;
  }

  .tour-itinerary-preview {
    display: block;
  }

  .tour-itinerary-preview__day > p,
  .tour-itinerary__full-label {
    font-size: 13px;
    letter-spacing: .04em;
  }

  .tour-itinerary-preview__day h3 {
    font-size: 1.4rem;
    line-height: 1.08;
  }

  .tour-itinerary-preview__day > span {
    font-size: 15px;
    line-height: 1.55;
  }

  .tour-day__button {
    min-height: 64px;
  }

  .tour-day__title strong {
    font-size: 1.35rem;
  }

  .tour-day__title small,
  .tour-day__summary,
  .tour-day__details dd {
    font-size: 14px;
    line-height: 1.55;
  }

  .tour-day__description {
    font-size: 16px;
    line-height: 1.7;
  }

  .tour-decision__panel > .tour-mobile-disclosure__panel > p:not(.tour-kicker),
  .tour-decision__panel--customization > .tour-mobile-disclosure__panel > p:not(.tour-kicker) {
    font-size: 16px;
    line-height: 1.65;
  }

  .has-mobile-disclosures .tour-mobile-disclosure__button {
    font-size: 16px;
    min-height: 64px;
  }

  .tour-planning__grid li {
    font-size: 15px;
    line-height: 1.6;
  }

  .tour-price-guide {
    margin-left: calc((100% - 100vw) / 2);
    margin-right: calc((100% - 100vw) / 2);
    max-width: 100vw;
    padding: 1.35rem 16px;
  }

  .tour-price-guide__illustration {
    display: none;
  }

  .tour-price-guide__header-copy h3 {
    font-size: clamp(2.05rem, 9vw, 2.7rem);
    line-height: 1;
  }

  .tour-price-guide__header-copy > p:not(.tour-kicker),
  .tour-price-guide__assurance,
  .tour-price-guide__minimum-note p {
    font-size: 15px;
    line-height: 1.6;
  }

  .tour-price-guide__card {
    padding: 1.1rem;
  }

  .tour-price-guide__card-heading {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .tour-price-guide__icon {
    height: 52px;
    width: 52px;
  }

  .tour-price-guide__card h4 {
    font-size: 1.35rem;
    line-height: 1.1;
  }

  .tour-price-guide__from {
    font-size: 2.2rem;
    line-height: 1;
  }

  .tour-price-guide__from > span {
    font-size: 14px;
    letter-spacing: .02em;
  }

  .tour-price-guide__from small {
    display: block;
    font-size: 12px !important;
    margin-top: .25rem;
  }

  .tour-price-guide__basis {
    font-size: 14px;
  }

  .tour-price-guide__table {
    display: block;
  }

  .tour-price-guide__table thead {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
  }

  .tour-price-guide__table tbody {
    display: block;
  }

  .tour-price-guide__table tr {
    align-items: center;
    border-top: 1px solid rgba(13,48,37,.15);
    display: grid;
    gap: .75rem;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 54px;
  }

  .tour-price-guide__table th,
  .tour-price-guide__table td {
    border: 0;
    font-size: 15px;
    padding: .7rem 0;
  }

  .tour-price-guide__table td {
    font-size: 16px;
    text-align: right;
  }

  .tour-price-guide__table td small {
    display: block;
    font-size: 12px;
  }

  .tour-price-guide__cta {
    font-size: 15px;
    letter-spacing: .03em;
    min-height: 52px;
    width: 100%;
  }

  .tour-inquiry,
  .tour-inline-inquiry {
    padding-bottom: calc(48px + var(--tb-mobile-cta-reserve, env(safe-area-inset-bottom)));
    padding-top: 48px;
  }

  /* Existing sticky CTA state logic remains in main.js; only its target size
     and safe-area geometry are corrected here. */
  .tb-mobile-cta,
  .tour-mobile-cta {
    min-height: 52px;
    padding-bottom: calc(.65rem + env(safe-area-inset-bottom));
    padding-top: .65rem;
  }

  .tb-mobile-cta .button,
  .tour-mobile-cta .button {
    font-size: 15px;
    min-height: 52px;
  }

  .site-footer__legal,
  .site-footer__legal a {
    font-size: 13px;
    line-height: 1.5;
  }
}

@media (max-width: 360px) {
  .home-price-guide__factors {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-tour-card {
    flex-basis: 82vw;
    width: 82vw;
  }

  .tour-section-nav .layout-shell {
    padding-left: 14px;
    padding-right: 14px;
  }
}

@media (min-width: 768px) {
  .home-mobile-shortcuts,
  .home-journeys__swipe-hint {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .home-tour-grid {
    scroll-behavior: auto;
  }

  .home-tour-grid *,
  .tour-single *,
  .tour-single *::before,
  .tour-single *::after {
    transition-duration: .01ms !important;
  }
}
