/* Progressive mobile layout. Feature flags add the corresponding mp-* class. */
.mp-call, .mp-quick-contacts, .mp-tour-facts, .mp-tour-cta, .mp-tour-price,
.mp-catalog-tools, .mp-field-label, .mp-country-search, .mp-visa-jump, .mp-tour-nav, .mp-office-actions, .mp-contact-actions, .mp-file-type { display: none; }
.mp-toggle { display: block; width: 100%; border: 0; padding: 0; text-align: left; font: inherit; color: inherit; background: transparent; }
.mp-disclosure > .mp-toggle-head { margin: 0; }
.mp-map-toggle, .mp-flight-progress, .mp-flight-next, .mp-flight-back { display: none; }
.mp-service-details > summary { display: none; }
.mp-map-box[hidden], .mp-flight-step[hidden], .mp-disclosure-body[hidden], .mp-mobile-only[hidden] { display: none; }

@media (max-width: 768px) {
  /* Shell */
  .mp-shell .site-header .header-inner { height: 66px; min-height: 66px; gap: 8px; }
  .mp-shell .logo img { width: 134px; height: auto; }
  .mp-shell .nav-burger { margin-left: 0; }
  .mp-shell .mp-call { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 44px; height: 44px; margin-left: auto; border: 1px solid #ffe0c5; border-radius: 12px; background: #fff3e9; color: var(--orange); }
  .mp-shell .mp-call svg { width: 20px; height: 20px; }
  .mp-shell .mobile-menu { top: 66px; max-height: calc(100dvh - 66px); overflow-y: auto; overscroll-behavior: contain; }
  .mp-shell .page-banner { padding-top: 94px; padding-bottom: 24px; min-height: 0; }
  .mp-shell .page-banner h1 { font-size: clamp(28px, 7.7vw, 35px); line-height: 1.15; margin-bottom: 10px; overflow-wrap: anywhere; }
  .mp-shell .page-banner p { font-size: 14px; line-height: 1.55; }
  .mp-shell .section { padding-top: 28px; padding-bottom: 28px; }
  .mp-shell .section--no-top { padding-top: 0; }
  .mp-shell h2 { font-size: clamp(24px, 6.5vw, 29px); line-height: 1.2; }
  .mp-shell .section-head { margin-bottom: 20px; gap: 12px; }
  .mp-shell .breadcrumb { font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
  .mp-shell .mp-quick-contacts { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; padding: 14px 0; }
  .mp-shell .mp-quick-contacts a { display: block; margin: 0; font-size: 13px; line-height: 1.6; color: var(--navy); }
  .mp-shell .mp-quick-contacts a:first-child { font-size: 21px; font-weight: 600; }
  .mp-shell .mp-quick-contacts .mp-office-link { color: var(--orange); }
  .mp-shell .footer-grid > .mp-original-contacts { display: none; }
  .mp-shell .footer-grid { gap: 0; }
  .mp-shell .footer-grid > div:first-child { margin-bottom: 14px; }
  .mp-shell .cta-btn { min-height: 44px; }
  .mp-shell :is(h2,h3,[id],section) { scroll-margin-top: 82px; }

  /* Catalogs */
  .mp-catalog .mp-catalog-tools { display: block; margin: 14px 0 20px; }
  .mp-catalog .section-head:has(#toursHeading) > p { display: none; }
  .mp-catalog .mp-filter-panel { border: 1px solid var(--line); border-radius: 15px; background: var(--card); }
  .mp-catalog .mp-filter-panel > summary { padding: 15px; min-height: 48px; font-weight: 600; font-size: 14px; color: var(--navy); cursor: pointer; }
  .mp-catalog .mp-filter-panel > section { padding: 12px 0; }
  .mp-catalog .mp-filter-panel .container { width: calc(100% - 28px); }
  .mp-catalog .mp-filter-panel .section-head { margin-bottom: 12px; }
  .mp-catalog .mp-filter-panel h2 { font-size: 20px; }
  .mp-catalog .mp-filter-panel .section-head p { display: none; }
  .mp-catalog .mp-filter-panel .tag-columns { display: flex; flex-wrap: wrap; gap: 7px; }
  .mp-catalog .mp-filter-panel .tag-item { flex: 1 1 135px; min-height: 44px; padding: 10px; font-size: 13px; }
  .mp-catalog .mp-empty-tag { display: none !important; }
  .mp-catalog .mp-filter-chip { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--soft); font-size: 13px; }
  .mp-catalog .mp-filter-chip[hidden] { display: none; }
  .mp-catalog .mp-filter-chip button { min-height: 36px; background: transparent; border: 0; color: var(--orange); font: inherit; }
  .mp-catalog .tours-grid { grid-template-columns: 1fr; gap: 16px; }
  .mp-catalog .tour-card { border-radius: 18px; }
  .mp-catalog .tour-media { aspect-ratio: 16 / 10; }
  .mp-catalog .tour-body { padding: 17px; }
  .mp-catalog .tour-card h3 { font-size: 22px; line-height: 1.2; margin-bottom: 10px; }
  .mp-catalog .tour-card .tour-body > p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font-size: 14px; line-height: 1.55; }
  .mp-catalog .tour-foot { flex-wrap: wrap; gap: 12px; padding-top: 14px; }
  .mp-catalog .tour-foot-info { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; }
  .mp-catalog .mp-tour-price { display: inline; font-size: 14px; font-weight: 600; color: var(--navy); }
  .mp-catalog .tour-cta, .mp-catalog .tour-more { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; }
  .mp-catalog .about-intro-grid { gap: 20px; }
  .mp-catalog .about-intro-grid h2 { font-size: 25px; }
  .mp-catalog .about-intro-photo { height: 180px; }

  /* Tour details */
  .mp-tour .tour-page { padding-top: 88px; }
  .mp-tour .tour-main h1 { font-size: clamp(27px, 7.4vw, 34px); line-height: 1.17; overflow-wrap: anywhere; }
  .mp-tour .tour-summary { font-size: 15px; line-height: 1.6; margin-bottom: 16px; }
  .mp-tour .mp-tour-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; padding: 0; }
  .mp-tour .mp-tour-facts > div { border-radius: 12px; background: var(--soft); padding: 10px 13px; flex: 1 1 130px; }
  .mp-tour .mp-tour-facts dt { font-size: 11px; color: var(--muted); margin-bottom: 5px; }
  .mp-tour .mp-tour-facts dd { margin: 0; font-size: 14px; line-height: 1.4; font-weight: 600; }
  .mp-tour .mp-tour-nav { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0 18px; }
  .mp-tour .mp-tour-nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--navy); font-size: 12px; line-height: 1.4; }
  .mp-tour .tour-gallery-stage { height: auto; aspect-ratio: 4 / 3; }
  .mp-tour .tour-gallery-img { object-fit: contain; }
  .mp-tour .tour-cover img { width: 100%; height: auto; max-height: none; }
  .mp-tour .tour-content { font-size: 16px; line-height: 1.7; }
  .mp-tour .tour-content h2 { font-size: 24px; margin-top: 26px; }
  .mp-tour .tour-content h3 { font-size: 20px; }
  .mp-tour .tour-content table { display: block; max-width: 100%; overflow-x: auto; }
  .mp-tour .tour-aside-title { font-size: 23px; }
  .mp-tour.mp-has-tour-cta { padding-bottom: 88px; }
  .mp-tour .mp-tour-cta { display: flex; align-items: center; justify-content: center; position: fixed; inset: auto 0 0; z-index: 990; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; box-shadow: 0 -8px 24px #2038640a; }
  .mp-tour .mp-tour-cta button { width: min(100%, 460px); min-height: 46px; }
  .mp-tour.tour-modal-open .mp-tour-cta, .mp-tour:has(.cc-banner.is-visible) .mp-tour-cta { display: none; }
  .mp-tour .chat-consent-btn { bottom: calc(88px + env(safe-area-inset-bottom)); }

  /* Visa list and detailed country pages */
  .mp-visas .mp-country-search { display: block; margin: 0 0 18px; font-size: 13px; color: var(--navy); }
  .mp-visas .mp-country-search input { display: block; width: 100%; margin-top: 8px; padding: 13px; min-height: 48px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; font-size: 16px; }
  .mp-visas .visa-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .mp-visas .visa-card { min-width: 0; padding: 14px 10px; gap: 10px; font-size: 14px; }
  .mp-visas .visa-card[hidden] { display: none; }
  .mp-visas .visa-card .icon-circle-outline { width: 36px; height: 36px; flex-shrink: 0; }
  .mp-visas .mp-country-empty { grid-column: 1 / -1; font-size: 14px; line-height: 1.6; }
  .mp-visas .visa-detail { padding: 0; font-size: 16px; line-height: 1.7; }
  .mp-visas .visa-detail .visa-lead { font-size: 14px; line-height: 1.6; margin-bottom: 20px; }
  .mp-visas .mp-disclosure { border-bottom: 1px solid var(--line); padding: 18px 0; }
  .mp-visas .mp-disclosure h2 { font-size: 21px; }
  .mp-visas .mp-toggle { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; min-height: 44px; line-height: 1.35; cursor: pointer; }
  .mp-visas .mp-toggle::after { content: '+'; color: var(--orange); font-family: Inter,sans-serif; font-size: 24px; font-weight: 400; }
  .mp-visas .mp-toggle[aria-expanded="true"]::after { content: '−'; }
  .mp-visas .mp-disclosure-body { padding-top: 14px; }
  .mp-visas .mp-visa-jump { display: block; margin: 16px 0; color: var(--navy); font-size: 13px; }
  .mp-visas .mp-visa-jump select { width: 100%; margin-top: 8px; min-height: 46px; font: inherit; font-size: 15px; border-radius: 12px; padding: 10px; border: 1px solid var(--line); background: #fff; color: var(--navy); }

  /* Offices and contacts */
  .mp-offices .offices-layout { display: block; }
  .mp-offices .offices-list { display: flex; flex-direction: column; gap: 10px; max-height: none; overflow: visible; padding: 0; scroll-snap-type: none; }
  .mp-offices .office-row { flex: none; width: 100%; min-width: 0; min-height: 0; padding: 16px; }
  .mp-offices .office-row h3 { font-size: 18px; }
  .mp-offices .office-row p { font-size: 13px; line-height: 1.6; }
  .mp-offices .offices-swipe-hint { display: none !important; }
  .mp-offices .offices-map-panel { min-height: 0; }
  .mp-offices .offices-selected-card { padding: 17px; margin-bottom: 8px; }
  .mp-offices .offices-card-title { font-size: 22px; line-height: 1.3; }
  .mp-offices .offices-detail-list { gap: 14px; }
  .mp-offices .contact-item-text p { font-size: 14px; line-height: 1.6; }
  .mp-offices .mp-office-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
  .mp-offices .mp-office-actions a, .mp-offices .mp-map-toggle { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--navy); font: inherit; font-size: 13px; line-height: 1.4; }
  .mp-offices .mp-map-box { width: 100%; }
  .mp-offices .mp-map-box .map-embed, .mp-offices .mp-map-box iframe { width: 100%; height: 300px; min-height: 0; }
  .mp-offices .mp-contact-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 20px; }
  .mp-offices .mp-contact-actions a, .mp-offices .mp-contact-actions button { min-height: 46px; padding: 12px; text-align: center; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--navy); font: inherit; font-size: 14px; }
  .mp-offices .contacts-grid { gap: 28px; }
  .mp-offices .contact-info-list { padding: 0; }
  .mp-offices .contact-item { gap: 12px; }

  /* Forms keep their field names, values and original submit handlers. */
  .mp-forms :is(.flight-form,.contact-form,.review-form,.tour-modal-window,.trip-modal-window,.service-modal-window) { padding: 18px; border-radius: 18px; }
  .mp-forms :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),select,textarea) { max-width: 100%; font-size: 16px; }
  .mp-forms textarea { min-height: 120px; }
  .mp-forms .mp-field-label { display: block; font-size: 13px; color: var(--navy); margin: 8px 0 6px; }
  .mp-forms .flight-row { gap: 12px; margin-bottom: 14px; }
  .mp-forms .flight-field { min-width: 0; }
  .mp-forms .flight-row:has([name="adults"]) { display: grid; grid-template-columns: 1fr 1fr; }
  .mp-forms #flightAgesField { grid-column: 1 / -1; }
  .mp-forms .mp-flight-progress { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-bottom: 15px; margin-bottom: 16px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
  .mp-forms .mp-flight-progress strong { color: var(--navy); }
  .mp-forms .mp-flight-next { display: block; width: 100%; }
  .mp-forms .mp-flight-back { display: inline-block; margin: 0 0 14px; padding: 8px 0; background: transparent; border: 0; color: var(--navy); font: inherit; font-size: 13px; min-height: 40px; }
  .mp-forms .flight-foot { display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
  .mp-forms .flight-consent { font-size: 12px; line-height: 1.6; }
  .mp-forms .flight-foot .cta-btn { width: 100%; }
  .mp-forms .tour-modal-window { max-height: calc(100dvh - 32px); overflow-y: auto; }

  /* Editorial and service pages */
  .mp-content .about-intro-grid, .mp-content .history-grid, .mp-content .callback-section { gap: 22px; }
  .mp-content :is(.about-intro-grid,.page-content,.news-content,.service-body,.mice-intro) p { font-size: 15px; line-height: 1.75; overflow-wrap: anywhere; }
  .mp-content :is(.page-main,.news-main) h1 { font-size: clamp(28px,7.8vw,35px); line-height: 1.17; }
  .mp-content :is(.why-grid,.docs-grid,.requisites-grid) { gap: 14px; }
  .mp-content .why-card { padding: 21px; }
  .mp-content .services-nav { display: flex; flex-wrap: wrap; gap: 7px; }
  .mp-content .services-nav a { flex: 1 1 135px; padding: 11px; min-height: 44px; font-size: 13px; }
  .mp-content .service-section { padding: 20px 0; }
  .mp-content .service-head { gap: 12px; margin-bottom: 15px; }
  .mp-content .service-head h2 { font-size: 25px; }
  .mp-content .service-head p { font-size: 13px; }
  .mp-content .service-body > .cta-btn { margin: 15px 0; width: 100%; }
  .mp-content .mp-service-details { margin: 14px 0; }
  .mp-content .mp-service-details > summary { display: list-item; min-height: 40px; padding: 10px 0; color: var(--orange); font-size: 13px; cursor: pointer; }
  .mp-content .mp-service-details > div { padding-top: 8px; }
  .mp-content .mp-file-type { display: inline-block; margin-top: 7px; font-size: 11px; color: var(--muted); }
  .mp-content .doc-card { min-width: 0; }
  .mp-content .doc-title { font-size: 14px; line-height: 1.5; }
  .mp-content .review-card-photo { height: 130px; }
  .mp-content .review-card { padding: 0; overflow: hidden; }
}

/* Native hidden must win over grids and flex layouts. */
.mp-mobile-only[hidden], .mp-flight-next[hidden], .mp-flight-back[hidden], .mp-flight-step[hidden], .mp-map-box[hidden], .mp-country-empty[hidden], .mp-offices .mp-map-toggle[hidden], .mp-offices .offices-selected-card[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .mp-shell * { scroll-behavior: auto !important; } }
