/* Telegram base */
a.icon.telegram-icon::before { display:none !important; }
a.icon.telegram-icon .telegram-logo { display:inline-flex; align-items:center; justify-content:center; width:2.6em; height:2.6em; border-radius:50%; box-shadow:inset 0 0 0 1px rgba(0,0,0,.2); color:inherit; vertical-align:middle; }
a.icon.telegram-icon .telegram-logo svg { width:1.05em; height:1.05em; display:block; }
/* UFIMCEV legacy gallery fixes — mobile sizing + Telegram */
@media screen and (max-width: 767px) {
  html { font-size: 16px !important; }
  body, body input, body select, body textarea { font-size: 1rem !important; }
  h1 { font-size: 2.3rem !important; }
  h2 { font-size: 2rem !important; }
  h3 { font-size: 1.3rem !important; }
  .wrapper.style11 > .inner { padding: .5rem 1rem 0 !important; }
  .wrapper.style12 { padding: .5rem .5rem 0 !important; }
  .items.style11.small > * { width: 50% !important; }
  .items.style11.small .button.big,
  button.big, .button.big {
    font-size: .72rem !important;
    height: 3.35em !important;
    line-height: 3.35em !important;
  }
  ul.actions.vertical li { padding: .65rem 0 0 !important; }
  ul.icons li { font-size: 145% !important; padding-right: .35rem !important; }
  a.icon.telegram-icon { display: inline-block; }
  a.icon.telegram-icon::before { display: none !important; }
  a.icon.telegram-icon .telegram-logo {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.6em; height: 2.6em; border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.2);
    color: inherit;
  }
  a.icon.telegram-icon .telegram-logo svg { width: 1.05em; height: 1.05em; display: block; }
  .portfolio-mode .portfolio-head { padding: 24px 16px 26px !important; }
  .portfolio-mode .portfolio-head h2 { font-size: 2rem !important; }
}
@media all and (orientation: portrait) and (max-device-width: 640px) {
  h2 { font-size: 2rem !important; }
  h3 { font-size: 1.3rem !important; }
  button.big, .button.big { font-size: .72rem !important; }
  a.icon.style2 { font-size: 1.45rem !important; }
}
@media screen and (max-width: 420px) {
  .wrapper.style11 > .inner { padding-left: .75rem !important; padding-right: .75rem !important; }
  .wrapper.style11 > .inner .items.style11.small > * { width: 50% !important; }
  ul.icons li { font-size: 132% !important; padding-right: .18rem !important; }
}
/* UFIMCEV 2026-10: phone lightbox + landscape + telegram alignment */
/* Значок Telegram: тот же круг, что и у соседних иконок, и та же посадка по вертикали */
a.icon.telegram-icon .telegram-logo { vertical-align: middle; position: relative; top: -.078em; }

/* ТЕЛЕФОНЫ: просмотр фото без кнопок «лупа», «во весь экран», «закрыть», без счётчика и стрелок.
   Фото закрывается свайпом вверх/вниз или тапом (см. ufimcev-gallery.js). */
@media (hover: none) and (pointer: coarse) and (max-width: 767px),
       (hover: none) and (pointer: coarse) and (max-height: 540px) {
  .pswp__top-bar,
  .pswp__button--close,
  .pswp__button--fs,
  .pswp__button--zoom,
  .pswp__button--share,
  .pswp__counter,
  .pswp__button--arrow--left,
  .pswp__button--arrow--right,
  .pswp__caption { display: none !important; }
  /* индикатор загрузки лежит по центру поверх фото и перехватывал бы тап */
  .pswp__preloader, .pswp__preloader * { pointer-events: none !important; }
}

/* ТЕЛЕФОН В ГОРИЗОНТАЛЬНОМ ПОЛОЖЕНИИ: компактные шапка и низ страницы старых галерей.
   Здесь ширина больше 767px, поэтому раньше работали «десктопные» размеры (корневой шрифт 24px). */
@media (orientation: landscape) and (hover: none) and (pointer: coarse) and (max-height: 540px) {
  html { font-size: 13px !important; }
  /* пустые строки-распорки между кнопками */
  .wrapper.style11 h6, .wrapper.style11 h7,
  .wrapper.style12 h6, .wrapper.style12 h7 { display: none !important; }
  /* полосы с кнопками «Вернуться / Стоимость» */
  .wrapper.style11 > .inner { padding-top: .35rem !important; padding-bottom: .15rem !important; }
  .wrapper.style11 .button.big, .wrapper.style11 button.big { font-size: .62rem !important; }
  .wrapper.style11 .items.style11.small { margin-top: 0 !important; margin-bottom: 0 !important; }
  .wrapper.style11 .items.style11.small > * { padding-top: 0 !important; }
  /* заголовок галереи и отступы страницы */
  .page-main { padding-top: 12px !important; padding-bottom: 16px !important; }
  .sections-container { margin-bottom: 14px !important; }
  .page-title-section h2 { font-size: 1.5rem !important; margin-bottom: 0 !important; }
  /* нижний блок с контактами */
  .wrapper.style12 { padding: .4rem .5rem .3rem !important; }
  .wrapper.style12 h3 { font-size: 1rem !important; margin-bottom: .3rem !important; }
  ul.icons { margin-bottom: .3rem !important; }
  ul.icons li { font-size: 120% !important; padding-right: .3rem !important; }
}
