/*
 * era.ycloud.kz: мобильная версия поверх экспорта Tilda (как на ycloud.kz, в цветах «ЭРА»).
 * Подключается tools/mobile_enhance.py apps/site/era.
 *  - компактная шапка T967: логотип + кнопка меню, меню раскрывается по кнопке;
 *  - тарифы на телефоне и планшете — карточки .yc-etariffs вместо zero-блока;
 *  - нижняя панель «WhatsApp | Позвонить» (.yc-bar) — такая же, как на ycloud.kz;
 *  - контраст текста не ниже 4.5:1 (WCAG AA).
 */
:root {
  --yc-yellow: #ffe55e;      /* фирменный жёлтый «ЭРА» */
  --yc-ink: #1a1a1a;
  --yc-muted: #444;
  --yc-wa: #0e7a6e;          /* WhatsApp, затемнённый до контраста 5.2:1 */
  --yc-bar-h: 64px;
}

/* ---------- Кнопки ---------- */
.yc-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 20px; border-radius: 14px;
  font-family: 'Roboto', Arial, sans-serif; font-weight: 700; font-size: 16px; line-height: 1.2;
  text-decoration: none; text-align: center; -webkit-tap-highlight-color: transparent;
  transition: transform .08s ease, filter .15s ease;
}
.yc-btn:active { transform: scale(.98); filter: brightness(.95); }
.yc-btn:focus-visible, .yc-bar__btn:focus-visible, .yc-burger:focus-visible { outline: 3px solid #1f6feb; outline-offset: 2px; }
.yc-btn_dark { background: var(--yc-ink); color: #fff !important; }
.yc-btn svg, .yc-bar__btn svg { width: 22px; height: 22px; flex: none; fill: currentColor; }

/* ---------- Шапка T967 на телефоне и планшете ---------- */
.yc-burger { display: none; }

@media (max-width: 959px) {
  .t967 .t967__maincontainer { padding: 0 !important; }
  .t967 .t967__top {
    display: flex !important; flex-direction: row !important; flex-wrap: wrap; align-items: center;
    justify-content: space-between; height: auto !important; min-height: 60px;
    padding: 8px 16px !important; box-sizing: border-box; width: 100% !important;
  }
  .t967 .t967__logo { flex: 0 0 auto; width: auto !important; margin: 0 !important; padding: 0 !important; }
  .t967 .t967__imglogo { width: 70px !important; max-width: none !important; height: auto !important; }
  .yc-burger {
    display: flex; flex-direction: column; justify-content: center; gap: 5px; box-sizing: border-box;
    width: 44px; height: 44px; padding: 10px; margin: 0 -10px 0 0; border: 0; background: none; cursor: pointer;
  }
  .yc-burger span { display: block; height: 2px; border-radius: 2px; background: var(--yc-ink); transition: transform .2s, opacity .2s; }
  .t967.yc-open .yc-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .t967.yc-open .yc-burger span:nth-child(2) { opacity: 0; }
  .t967.yc-open .yc-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  /* Меню и контакты — только по кнопке */
  .t967:not(.yc-open) .t967__listwrapper,
  .t967:not(.yc-open) .t967__additionalwrapper,
  .t967 .t967__bottom { display: none !important; }
  .t967.yc-open .t967__listwrapper, .t967.yc-open .t967__additionalwrapper {
    display: block !important; flex: 0 0 100%; order: 3; margin: 0 !important; padding: 8px 0 16px !important; text-align: center;
  }
  .t967.yc-open .t967__additionalwrapper { display: flex !important; flex-direction: column; align-items: center; gap: 14px; }
  .t967.yc-open .t967__additionalwrapper > * { margin: 0 !important; padding: 0 !important; }
  .t967.yc-open .t967__button { width: 100%; max-width: 340px; justify-content: center; box-sizing: border-box; }
  .t967.yc-open .t967__list-item { display: block !important; padding: 0 !important; }
  .t967.yc-open .t-menu__link-item { display: block; padding: 12px 0 !important; font-size: 18px !important; }
}
/* Телефон в шапке был светло-оранжевым на жёлтом (контраст ~2:1) — на всех экранах */
.t967 .t967__additionalwrapper a:not(.t-btn) { color: var(--yc-ink) !important; }

/* ---------- Тарифы на телефоне и планшете ---------- */
.yc-etariffs { display: none; }

@media (max-width: 959px) {
  #rec318618690 .t396 { display: none !important; }
  .yc-etariffs {
    display: block; padding: 40px 16px 48px; background: #f4f4f4;
    font-family: 'Roboto', Arial, sans-serif; color: var(--yc-ink);
  }
  .yc-etariffs__title { margin: 0 0 8px; text-align: center; font-size: 30px; line-height: 1.2; font-weight: 700; }
  .yc-etariffs__lead { margin: 0 auto 24px; max-width: 520px; text-align: center; font-size: 17px; line-height: 1.5; color: var(--yc-muted); }
  .yc-etariffs__card {
    max-width: 520px; margin: 0 auto 16px; padding: 22px 20px 20px; border-radius: 16px;
    background: var(--yc-yellow); box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
  }
  .yc-etariffs__card h3 { margin: 0; text-align: center; font-size: 22px; font-weight: 700; }
  .yc-etariffs__price { margin: 4px 0 14px; text-align: center; font-size: 18px; font-weight: 700; }
  .yc-etariffs__card ul { margin: 0 0 18px; padding-left: 20px; font-size: 16px; line-height: 1.5; }
  .yc-etariffs__card li { margin-bottom: 8px; }
}

/* ---------- Первый экран, «О компании», «Рассчитать», «Контакты» на телефоне и планшете ---------- */
.yc-esec { display: none; }
.yc-btn_ghost { background: transparent; color: var(--yc-ink) !important; box-shadow: inset 0 0 0 2px var(--yc-ink); }

@media (max-width: 959px) {
  #rec313821482 .t396, #rec343345846 .t396, #rec343353445 .t396, #rec315932265 .t396 { display: none !important; }
  .yc-esec {
    display: block; padding: 40px 20px 44px;
    font-family: 'Roboto', Arial, sans-serif; color: var(--yc-ink); text-align: center;
  }
  .yc-esec > * { max-width: 560px; margin-left: auto; margin-right: auto; }
  .yc-esec_hero { padding-top: 32px; background: linear-gradient(180deg, var(--yc-yellow) 0%, #fff6c7 70%, #fff 100%); }
  .yc-esec_about { background: #fff; text-align: left; }
  .yc-esec_calc { background: var(--yc-yellow); }
  .yc-esec_contacts { background: linear-gradient(180deg, #fff 0%, #fff6c7 100%); }
  .yc-esec__h1 { margin: 0 auto 16px; font-size: clamp(30px, 8.6vw, 40px); line-height: 1.15; font-weight: 700; letter-spacing: -.01em; }
  .yc-esec__h2 { margin: 0 auto 10px; font-size: 28px; line-height: 1.2; font-weight: 700; text-align: center; }
  .yc-esec__lead { margin: 0 auto 24px; font-size: 17px; line-height: 1.55; color: var(--yc-muted); text-align: center; }
  .yc-esec_hero .yc-esec__lead { color: #333; }
  .yc-esec__actions { display: grid; gap: 10px; }
  .yc-esec__points { list-style: none; margin: 0 auto; padding: 0; display: grid; gap: 22px; }
  .yc-esec__points li { display: flex; gap: 14px; align-items: flex-start; }
  .yc-esec__points img { width: 32px; height: auto; flex: none; margin-top: 2px; }
  .yc-esec__points h3 { margin: 0 0 6px; font-size: 18px; line-height: 1.3; font-weight: 700; }
  .yc-esec__points p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--yc-muted); }
  .yc-esec__social { display: flex; justify-content: center; gap: 24px; margin-bottom: 22px; }
  .yc-esec__social img { width: 44px; height: 44px; object-fit: contain; display: block; }
  .yc-esec__address { margin: 0 auto 12px; font-size: 16px; line-height: 1.5; color: var(--yc-muted); }
  .yc-esec__contact { margin: 0 auto 14px; display: flex; flex-direction: column; gap: 4px; font-size: 20px; line-height: 1.4; font-weight: 700; }
  .yc-esec a:not(.yc-btn) { color: var(--yc-ink) !important; text-decoration: none !important; }
  .yc-esec__links { margin: 0; font-size: 17px; }
  .yc-esec__links a { display: inline-block; padding: 10px 0; }

  /* Подвал T389: пункты меню и строка «©» крупнее, по центру */
  .t389 .t389__maincontainer, .t389 .t389__container { flex-wrap: wrap; justify-content: center; text-align: center; }
  .t389 .t389__typo, .t389 .t389__text, .t389 .t-name, .t389 a { font-size: 15px !important; line-height: 1.6 !important; }
  .t389 .t389__list { display: flex !important; flex-wrap: wrap; justify-content: center; gap: 4px 18px; padding: 0 !important; }
  .t389 .t389__list_item { padding: 6px 0 !important; }
}
/* «Реквизиты» в контактах — без подчёркивания (на всех экранах) */
#rec315932265 .tn-atom a { text-decoration: none !important; }

/* ---------- Компьютер ---------- */
/* «Получить доступ» на первом экране — жёлтая кнопка на жёлтом фоне терялась: делаем чёрной, как остальные */
#rec313821482 .tn-elem[data-elem-id="1620727621896"] .tn-atom {
  background-color: var(--yc-ink) !important; color: #fff !important; transition: background-color .2s ease;
}
#rec313821482 .tn-elem[data-elem-id="1620727621896"] .tn-atom:hover { background-color: #000 !important; color: #fff !important; }
/* Телефон и почта в шапке — область нажатия не меньше 24px (WCAG 2.5.8) */
.t967 .t967__additionalwrapper a:not(.t-btn) { display: inline-block; padding: 3px 0; }

/* ---------- Контраст на жёлтом фоне ---------- */
/* «Рассчитать стоимость бухгалтерских услуг» — белым по жёлтому (1.3:1) */
#rec343353445 .tn-elem[data-elem-id="1470209944682"] .tn-atom { color: var(--yc-ink) !important; }
/* Цены в карточках тарифов на компьютере — белым по жёлтому */
#rec318618690 .tn-elem[data-elem-id="1490347077580"] .tn-atom, #rec318618690 .tn-elem[data-elem-id="1621851273296"] .tn-atom { color: var(--yc-ink) !important; }

/* ---------- Нижняя панель связи (телефоны и планшеты) ---------- */
.yc-bar { display: none; }

@media (max-width: 959px) {
  .yc-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990;
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, .96);
    -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px);
    box-shadow: 0 -1px 0 rgba(0, 0, 0, .08), 0 -6px 20px rgba(0, 0, 0, .06);
  }
  .yc-bar__btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    height: 48px; border-radius: 12px;
    font-family: 'Roboto', Arial, sans-serif; font-weight: 700; font-size: 16px;
    text-decoration: none; -webkit-tap-highlight-color: transparent;
  }
  .yc-bar__btn:active { filter: brightness(.92); }
  .yc-bar__btn_wa { background: var(--yc-wa); color: #fff !important; }
  .yc-bar__btn_tel { background: #fff; color: var(--yc-ink) !important; box-shadow: inset 0 0 0 1.5px #c9c9c9; }
  body { padding-bottom: calc(var(--yc-bar-h) + env(safe-area-inset-bottom, 0px)); }
}

@media print { .yc-bar, .yc-burger { display: none !important; } }

/* ---------- Кнопка WhatsApp на компьютере (от 960px) ---------- */
.yc-fab { display: none; }
@media (min-width: 960px) {
  .yc-fab {
    position: fixed; right: 24px; bottom: 24px; z-index: 9990;
    display: flex; align-items: center; gap: 0; height: 60px; min-width: 60px; padding: 0 15px;
    box-sizing: border-box; border-radius: 30px; background: var(--yc-wa); color: #fff !important;
    text-decoration: none !important; box-shadow: 0 6px 20px rgba(0, 0, 0, .22);
    font-family: 'Roboto', Arial, sans-serif; font-weight: 600; font-size: 16px; white-space: nowrap;
    transition: box-shadow .2s ease, transform .2s ease;
  }
  .yc-fab svg { width: 30px; height: 30px; flex: none; fill: currentColor; }
  .yc-fab__label { max-width: 0; overflow: hidden; opacity: 0; transition: max-width .25s ease, opacity .2s ease, margin .25s ease; }
  .yc-fab:hover, .yc-fab:focus-visible { box-shadow: 0 8px 26px rgba(0, 0, 0, .28); transform: translateY(-2px); }
  .yc-fab:hover .yc-fab__label, .yc-fab:focus-visible .yc-fab__label { max-width: 220px; opacity: 1; margin-left: 10px; }
  .yc-fab:focus-visible { outline: 3px solid #1f6feb; outline-offset: 3px; }
}
@media print { .yc-fab { display: none !important; } }
