/* Маркетинговые блоки: блок мобильного приложения, всплывающее окно, мини-баннер.
   Цвета приходят из админки через CSS-переменные в inline-стиле элемента. */

/* ---------- Блок скачивания приложения ---------- */

/* Секция во всю ширину, содержимое — в общей сетке сайта.
   .default-wrapper центрируется флексом родителя (как .footer и .news-block),
   своих margin: auto у него нет. */
.app-promo {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--app-promo-bg, #f5f5f7);
    color: var(--app-promo-color, #111);
    padding: 48px 0 0;
    margin-top: 40px;
}

.app-promo__inner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
}

.app-promo__content {
    flex: 1 1 auto;
    min-width: 0;
}

.app-promo__title {
    font-size: 36px;
    line-height: 1.2;
    font-weight: 700;
    margin: 0 0 12px;
    color: inherit;
}

.app-promo__description {
    max-width: 46ch;
    font-size: 18px;
    line-height: 1.5;
    margin: 0 0 28px;
    opacity: .8;
    color: inherit;
}

.app-promo__download {
    display: flex;
    align-items: flex-start;
    gap: 28px;
    flex-wrap: wrap;
}

.app-promo__qr {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 320px;
}

.app-promo__qr img {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    background: #fff;
    padding: 6px;
    flex-shrink: 0;
}

.app-promo__qr-caption {
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
    opacity: .75;
}

.app-promo__stores {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.app-promo__store {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 200px;
    padding: 10px 18px;
    border-radius: 10px;
    background: #000;
    color: #fff;
    text-decoration: none;
    transition: opacity .2s ease, transform .2s ease;
}

.app-promo__store:hover,
.app-promo__store:focus-visible {
    opacity: .85;
    transform: translateY(-1px);
    color: #fff;
}

.app-promo__store-icon {
    flex-shrink: 0;
}

.app-promo__store-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.app-promo__store-text small {
    font-size: 11px;
    opacity: .8;
}

.app-promo__store-text strong {
    font-size: 17px;
    font-weight: 600;
}

.app-promo__image {
    flex: 0 1 480px;
    min-width: 0;
}

.app-promo__image img {
    display: block;
    width: 100%;
    height: auto;
}

@media (max-width: 992px) {
    .app-promo__inner { flex-direction: column; align-items: flex-start; gap: 28px; }
    .app-promo__title { font-size: 28px; }
    .app-promo__description { font-size: 16px; }
    .app-promo__image { flex-basis: auto; width: 100%; max-width: 420px; margin: 0 auto; }
}

@media (max-width: 576px) {
    .app-promo { padding: 32px 0 0; }
    .app-promo__title { font-size: 24px; }
    .app-promo__download { gap: 20px; }
    .app-promo__qr img { width: 96px; height: 96px; }
    .app-promo__stores { width: 100%; }
    .app-promo__store { width: 100%; }
}

/* ---------- Страница https://ksbc.kg/app (открыта с компьютера) ---------- */

#mobile-app-page .body {
    min-height: auto;
    margin-bottom: 40px;
}

.app-landing {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    max-width: 640px;
    margin: 40px auto 0;
    text-align: center;
}

.app-landing__title {
    color: #282828;
    font-size: 35px;
    font-weight: 700;
}

.app-landing__text {
    color: #6e6e6e;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.4;
}

.app-landing .app-promo__stores {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
}

@media (max-width: 576px) {
    .app-landing { margin-top: 20px; }
    .app-landing__title { font-size: 24px; }
    .app-landing__text { font-size: 16px; }
    .app-landing .app-promo__stores { flex-direction: column; width: 100%; }
    .app-landing .app-promo__store { width: 100%; }
}

/* ---------- Всплывающее окно ---------- */

.marketing-popup {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.marketing-popup[hidden] { display: none; }

.marketing-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .55);
}

.marketing-popup__container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: #fff;
    border-radius: 16px;
    padding: 40px 32px 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}

.marketing-popup__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 0;
}

.marketing-popup__close span {
    position: absolute;
    top: 50%;
    left: 6px;
    width: 20px;
    height: 2px;
    background: #333;
}

.marketing-popup__close span:first-child { transform: rotate(45deg); }
.marketing-popup__close span:last-child { transform: rotate(-45deg); }

.marketing-popup__image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 20px;
}

.marketing-popup__title {
    font-size: 24px;
    line-height: 1.25;
    font-weight: 700;
    margin: 0 0 12px;
}

.marketing-popup__text {
    font-size: 16px;
    line-height: 1.5;
    color: #444;
    margin-bottom: 20px;
}

.marketing-popup__button {
    display: inline-block;
    text-align: center;
    text-decoration: none;
    width: 100%;
}

@media (max-width: 576px) {
    .marketing-popup__container { padding: 36px 20px 24px; border-radius: 12px; }
    .marketing-popup__title { font-size: 20px; }
}

/* ---------- Мини-баннер ---------- */

.mini-banner {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 9000;
    background: var(--mini-banner-bg, #921a25);
    color: var(--mini-banner-color, #fff);
}

.mini-banner[hidden] { display: none; }

.mini-banner--top { top: 0; }
.mini-banner--bottom { bottom: 0; }

.mini-banner__inner {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 48px 12px 20px;
}

.mini-banner__image {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
}

.mini-banner__text {
    flex: 1 1 auto;
    margin: 0;
    font-size: 15px;
    line-height: 1.35;
    color: inherit;
}

.mini-banner__button {
    flex-shrink: 0;
    padding: 8px 20px;
    border-radius: 6px;
    background: var(--mini-banner-color, #fff);
    color: var(--mini-banner-bg, #921a25);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.mini-banner__button:hover,
.mini-banner__button:focus-visible {
    opacity: .9;
    color: var(--mini-banner-bg, #921a25);
}

.mini-banner__close {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 0;
}

.mini-banner__close span {
    position: absolute;
    top: 50%;
    left: 4px;
    width: 18px;
    height: 2px;
    background: var(--mini-banner-color, #fff);
}

.mini-banner__close span:first-child { transform: rotate(45deg); }
.mini-banner__close span:last-child { transform: rotate(-45deg); }

body.has-mini-banner-top { padding-top: 64px; }
body.has-mini-banner-bottom { padding-bottom: 64px; }

@media (max-width: 768px) {
    .mini-banner__inner { flex-wrap: wrap; padding: 10px 44px 10px 16px; gap: 10px; }
    .mini-banner__text { font-size: 14px; flex-basis: 100%; }
    .mini-banner__image { width: 32px; height: 32px; }
}

/* ---------- Формы из конструктора ---------- */

.application-form__title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px;
}

.application-form__description {
    font-size: 15px;
    color: #666;
    margin: 0 0 16px;
}

.application-form__help {
    font-size: 13px;
    color: #777;
    margin: -8px 0 12px;
}

.application-form__error {
    display: none;
    margin: 0 0 12px;
    color: #c0392b;
    font-size: 14px;
}

.application-form__file-label {
    display: block;
    font-size: 14px;
    color: #555;
    margin-bottom: 6px;
}

.application-form__checkbox {
    margin-bottom: 12px;
}
