/*
 * Тема «Письмо Отца» — дизайн «Путь + Свет».
 * Подключается после theme.css темы modern и переопределяет Bootstrap 4:
 * так страницы компонентов (формы, списки, заявки) получают тот же стиль
 * без отдельной вёрстки
 */

:root {
    --pismo-ink: #161F2A;
    --pismo-text: #3D4652;
    --pismo-muted: #5A6470;
    --pismo-blue: #00ADEE;
    --pismo-blue-dark: #0079B8;
    --pismo-blue-soft: #E0F4FC;
    --pismo-navy: #375E93;
    --pismo-orange: #FF7600;
    --pismo-orange-dark: #C25500;
    --pismo-orange-soft: #FFF0E3;
    --pismo-bg: #F4F9FC;
    --pismo-line: #E0EAEF;
    --pismo-radius: 28px;
    --pismo-radius-lg: 40px;
    --pismo-font: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* ---------- Основа ---------- */

body.pismo {
    font-family: var(--pismo-font);
    color: var(--pismo-ink);
    background: var(--pismo-bg);
    font-size: 17px;
    line-height: 1.6;
}

.pismo h1, .pismo h2, .pismo h3, .pismo h4, .pismo h5,
.pismo .h1, .pismo .h2, .pismo .h3, .pismo .h4, .pismo .h5 {
    font-family: var(--pismo-font);
    font-weight: 900;
    color: var(--pismo-ink);
    letter-spacing: -0.01em;
}
.pismo h1, .pismo .h1 { font-size: clamp(32px, 4.5vw, 50px); line-height: 1.1; margin-bottom: 0.6em; }
.pismo h2, .pismo .h2 { font-size: clamp(26px, 3.2vw, 38px); line-height: 1.15; }

.pismo a { color: var(--pismo-blue-dark); }
.pismo a.btn { text-decoration: none; }
.pismo a:hover { color: var(--pismo-ink); }
.pismo .lead { font-size: 19px; color: var(--pismo-text); }
.pismo .text-muted { color: var(--pismo-muted) !important; }

.pismo .container { max-width: 1240px; padding-left: 20px; padding-right: 20px; }

/* ---------- Кнопки ---------- */

.pismo .btn {
    border-radius: 999px;
    font-weight: 800;
    padding: 0.6rem 1.4rem;
    border-width: 2px;
}
.pismo .btn-lg { padding: 0.85rem 1.9rem; font-size: 17px; }
.pismo .btn-sm { padding: 0.35rem 0.9rem; font-size: 14px; }

.pismo .btn-primary, .pismo .pismo-btn--blue {
    background: var(--pismo-blue); border-color: var(--pismo-blue); color: #fff;
}
.pismo .btn-primary:hover, .pismo .btn-primary:focus, .pismo .pismo-btn--blue:hover {
    background: var(--pismo-blue-dark); border-color: var(--pismo-blue-dark); color: #fff;
}
.pismo .btn-warning, .pismo .pismo-btn--orange {
    background: var(--pismo-orange); border-color: var(--pismo-orange); color: #fff;
}
.pismo .btn-warning:hover, .pismo .btn-warning:focus, .pismo .pismo-btn--orange:hover {
    background: var(--pismo-orange-dark); border-color: var(--pismo-orange-dark); color: #fff;
}
.pismo .btn-dark, .pismo .pismo-btn--ink { background: var(--pismo-ink); border-color: var(--pismo-ink); color: #fff; }
.pismo .btn-dark:hover, .pismo .pismo-btn--ink:hover { background: #000; color: #fff; }
.pismo .pismo-btn--white { background: #fff; border-color: #fff; color: var(--pismo-ink); }
.pismo .pismo-btn--white:hover { background: var(--pismo-blue-soft); color: var(--pismo-ink); }
.pismo .btn-outline-primary { color: var(--pismo-blue-dark); border-color: var(--pismo-blue); }
.pismo .btn-outline-primary:hover { background: var(--pismo-blue); color: #fff; }

/* ---------- Формы ---------- */

.pismo .form-control, .pismo .custom-select {
    border: 2px solid var(--pismo-line);
    background-color: var(--pismo-bg);
    border-radius: 18px;
    font-size: 16px;
    min-height: 48px;
    padding: 0.6rem 1rem;
    color: var(--pismo-ink);
}
.pismo textarea.form-control { border-radius: 20px; }
.pismo .form-control:focus, .pismo .custom-select:focus {
    border-color: var(--pismo-blue);
    background-color: #fff;
    box-shadow: 0 0 0 0.2rem rgba(0, 173, 238, 0.15);
}
.pismo label { font-weight: 700; }
.pismo .custom-control-input:checked ~ .custom-control-label::before {
    background-color: var(--pismo-blue); border-color: var(--pismo-blue);
}

/* ---------- Карточки, таблицы, плашки ---------- */

.pismo .card { border: 0; border-radius: var(--pismo-radius); }
.pismo .card-header { border-radius: var(--pismo-radius) var(--pismo-radius) 0 0 !important; background: var(--pismo-bg); border-bottom: 1px solid var(--pismo-line); }
.pismo .card.bg-light, .pismo .bg-light { background: var(--pismo-bg) !important; }
.pismo .list-group-item { border-color: var(--pismo-line); }
.pismo .list-group-item:first-child { border-top-left-radius: 20px; border-top-right-radius: 20px; }
.pismo .list-group-item:last-child { border-bottom-left-radius: 20px; border-bottom-right-radius: 20px; }
.pismo .table thead th { border: 0; background: var(--pismo-bg); font-weight: 800; }
.pismo .table td, .pismo .table th { border-color: var(--pismo-line); vertical-align: middle; }
.pismo .badge { border-radius: 999px; padding: 0.35em 0.75em; font-weight: 800; }
.pismo .alert { border: 0; border-radius: 20px; }
.pismo .nav-pills .nav-link { border-radius: 999px; font-weight: 700; color: var(--pismo-ink); }
.pismo .nav-pills .nav-link.active { background: var(--pismo-blue-soft); color: var(--pismo-blue-dark); }
.pismo .page-link { border-radius: 50% !important; margin: 0 3px; border: 0; color: var(--pismo-ink); font-weight: 800; }
.pismo .page-item.active .page-link { background: var(--pismo-blue); }

/* ---------- Шапка ---------- */

.pismo-header { background: var(--pismo-bg); position: relative; z-index: 20; }
.pismo-header__inner {
    display: flex; align-items: center; flex-wrap: wrap; gap: 16px;
    padding-top: 22px; padding-bottom: 22px;
}
.pismo-logo img { height: 48px; width: auto; display: block; }
.pismo-nav-wrap { flex: 1 1 auto; }
.pismo-nav-wrap.collapse:not(.show) { display: none; }
@media (min-width: 992px) {
    .pismo-nav-wrap, .pismo-nav-wrap.collapse:not(.show) {
        display: flex !important; align-items: center; justify-content: flex-end; gap: 16px;
    }
}
.pismo-nav {
    display: flex; flex-wrap: wrap; gap: 6px;
    background: #fff; padding: 6px; border-radius: 999px;
}
.pismo-nav__link {
    padding: 9px 18px; border-radius: 999px;
    color: var(--pismo-ink) !important; text-decoration: none !important;
    font-weight: 700; font-size: 15px;
}
.pismo-nav__link:hover { background: var(--pismo-bg); }
.pismo-nav__link.is-active { background: var(--pismo-blue-soft); color: var(--pismo-blue-dark) !important; }
.pismo-header .pismo-btn { font-size: 15px; padding: 11px 22px; }
.pismo-burger {
    margin-left: auto; width: 46px; height: 46px; border: 0; border-radius: 50%;
    background: #fff; color: var(--pismo-ink); display: inline-flex; align-items: center; justify-content: center;
}
.pismo-user__btn {
    width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--pismo-ink) !important;
    display: inline-flex; align-items: center; justify-content: center;
}
.pismo-user .dropdown-menu { border: 0; border-radius: 20px; box-shadow: 0 16px 40px -16px rgba(22, 31, 42, 0.35); padding: 8px; }
.pismo-user .dropdown-item { border-radius: 12px; }

@media (max-width: 991.98px) {
    .pismo-nav-wrap.show, .pismo-nav-wrap.collapsing { flex-basis: 100%; }
    .pismo-nav-wrap.show { display: flex; flex-direction: column; align-items: stretch; gap: 12px; padding-bottom: 8px; }
    .pismo-nav { flex-direction: column; border-radius: 24px; }
    .pismo-nav__link { padding: 12px 18px; }
    .pismo-logo img { height: 40px; }
}

/* ---------- Страница и крошки ---------- */

.pismo-page { padding-top: 8px; padding-bottom: 72px; }
.pismo-crumbs .breadcrumb { background: none; padding: 0; margin-bottom: 18px; font-size: 14px; }
.pismo-crumbs .breadcrumb-item, .pismo-crumbs .breadcrumb-item a { color: var(--pismo-muted); }
/* затухание длинных крошек в modern рассчитано на белый фон */
.pismo-crumbs .breadcrumb::after, .pismo-crumbs .breadcrumb::before { background: linear-gradient(to right, rgba(244, 249, 252, 0), var(--pismo-bg)) !important; }
.pismo-body > h1:first-child { margin-top: 0; }

/* ---------- Подвал ---------- */

.pismo-footer { background: var(--pismo-ink); color: #C5CCD6; padding: 48px 0; font-size: 15px; }
.pismo-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }
.pismo-footer a { color: #C5CCD6; }
.pismo-footer a:hover { color: #fff; }
.pismo-footer__inner > span:nth-child(2) a { color: var(--pismo-blue); }
.pismo-footer img { height: 44px; width: auto; }

/* ---------- Общие блоки макета ---------- */

.pismo-sheet { background: #fff; border-radius: 48px 48px 0 0; }
.pismo-tag {
    display: inline-block; font-weight: 800; font-size: 14px; padding: 7px 14px; border-radius: 999px;
    background: var(--pismo-blue-soft); color: var(--pismo-blue-dark);
}
.pismo-tag--white { background: #fff; }
.pismo-tag--orange { background: var(--pismo-orange-soft); color: var(--pismo-orange-dark); }
.pismo-num {
    flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%;
    background: var(--pismo-blue); color: #fff; font-weight: 900;
    display: inline-flex; align-items: center; justify-content: center;
}
.pismo-num--white { background: #fff; color: var(--pismo-orange); }

.pismo-next {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
    border-radius: var(--pismo-radius-lg); padding: 32px 40px; text-decoration: none !important;
    background: var(--pismo-blue-soft); color: var(--pismo-ink) !important;
}
.pismo-next__label { display: block; font-size: 14px; font-weight: 800; color: var(--pismo-blue-dark); margin-bottom: 6px; }
.pismo-next__title { font-size: 26px; font-weight: 900; line-height: 1.2; }
.pismo-next__go { background: var(--pismo-ink); color: #fff; padding: 13px 24px; border-radius: 999px; font-weight: 800; white-space: nowrap; }

/* ---------- Главная ---------- */

.pismo-hero { padding: 32px 0 64px; }
.pismo-hero__grid { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.pismo-hero__text { flex: 1 1 460px; min-width: 0; }
.pismo-hero__text h1 { font-size: clamp(36px, 5vw, 60px); line-height: 1.07; margin: 18px 0 20px; }
.pismo-hero__text h1 span { color: var(--pismo-blue); }
.pismo-hero__lead { font-size: 20px; color: var(--pismo-text); max-width: 540px; margin-bottom: 32px; }
.pismo-hero__buttons { display: flex; flex-wrap: wrap; gap: 14px; }
.pismo-hero__art {
    flex: 1 1 420px; min-width: 0;
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: 210px 210px; gap: 16px;
}
.pismo-hero__art img { width: 100%; height: 100%; object-fit: cover; }
.pismo-hero__arch { grid-row: span 2; border-radius: 160px 160px 28px 28px; }
.pismo-hero__photo { border-radius: 28px; }
.pismo-hero__verse {
    background: #fff; border-radius: 28px 28px 120px 28px; padding: 22px 24px;
    display: flex; flex-direction: column; justify-content: center;
}
.pismo-hero__verse p { margin: 0 0 8px; font-size: 18px; font-weight: 800; line-height: 1.35; }
.pismo-hero__verse span { font-size: 13px; font-weight: 700; color: var(--pismo-blue); }

.pismo-steps {
    background: #fff; border-radius: var(--pismo-radius-lg); padding: 14px;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px;
}
.pismo-step {
    background: var(--pismo-bg); border-radius: var(--pismo-radius); padding: 22px;
    display: flex; flex-direction: column; gap: 8px; text-decoration: none !important; color: var(--pismo-ink) !important;
    transition: transform .15s ease;
}
.pismo-step:hover { transform: translateY(-3px); }
.pismo-step b { font-size: 21px; font-weight: 900; }
.pismo-step small { font-size: 14px; line-height: 1.45; color: var(--pismo-muted); }
.pismo-step--last { background: var(--pismo-orange); color: #fff !important; }
.pismo-step--last small { color: #fff; }

.pismo-home-sheet { margin-top: 64px; padding: 96px 0 88px; }
.pismo-block { margin-bottom: 112px; }
.pismo-block:last-child { margin-bottom: 0; }
.pismo-block__split { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.pismo-block__split > * { flex: 1 1 420px; min-width: 0; }
.pismo-block__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 120px 28px 28px 28px; }
.pismo-block h2 { margin: 16px 0; }
.pismo-block p { color: var(--pismo-text); font-size: 18px; }
.pismo-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.pismo-chips span { background: var(--pismo-bg); padding: 8px 14px; border-radius: 999px; font-size: 15px; font-weight: 700; }

.pismo-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 20px; }
.pismo-tile {
    background: var(--pismo-bg); border-radius: 32px; padding: 14px;
    display: flex; gap: 20px; align-items: center; text-decoration: none !important; color: var(--pismo-ink) !important;
}
.pismo-tile img { width: 170px; height: 130px; object-fit: cover; border-radius: 22px; flex: 0 0 auto; }
.pismo-tile b { display: block; font-size: 22px; font-weight: 900; line-height: 1.2; margin-bottom: 6px; }
.pismo-tile em { font-style: normal; color: var(--pismo-blue-dark); font-weight: 700; }
.pismo-tile--card { flex-direction: column; align-items: stretch; background: #fff; padding: 14px 14px 26px; }
.pismo-tile--card img { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.pismo-tile--card span { padding: 0 12px; }
.pismo-tile--card small { display: block; color: var(--pismo-muted); font-size: 16px; margin-bottom: 10px; }

.pismo-panel { background: var(--pismo-blue-soft); border-radius: var(--pismo-radius-lg); padding: 56px; }
.pismo-panel p { color: var(--pismo-text); }
.pismo-wide-link {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 20px;
    background: #fff; border-radius: 999px; padding: 18px 28px; text-decoration: none !important; color: var(--pismo-ink) !important;
}
.pismo-wide-link b { font-size: 18px; font-weight: 800; }
.pismo-wide-link span { color: var(--pismo-blue-dark); font-weight: 700; }

.pismo-questions { display: flex; flex-direction: column; gap: 12px; }
.pismo-question {
    background: var(--pismo-bg); border-radius: 24px; padding: 22px 26px;
    display: flex; justify-content: space-between; gap: 20px; align-items: center;
    font-size: 18px; font-weight: 700; text-decoration: none !important; color: var(--pismo-ink) !important;
}
.pismo-question:hover { background: var(--pismo-blue-soft); }
.pismo-question time { color: var(--pismo-blue-dark); font-size: 14px; flex: 0 0 auto; }

.pismo-final { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; }
.pismo-final__card { border-radius: var(--pismo-radius-lg); padding: 44px; display: flex; flex-direction: column; gap: 14px; }
.pismo-final__card h3 { font-size: 32px; margin: 0; color: inherit; }
.pismo-final__card p { font-size: 17px; margin: 0 0 10px; }
.pismo-final__card--ink { background: var(--pismo-ink); color: #fff; }
.pismo-final__card--ink h3 { color: #fff; }
.pismo-final__card--ink p { color: #C5CCD6; }
.pismo-final__card--ink a { color: #fff; font-weight: 800; }
.pismo-final__card--orange { background: var(--pismo-orange); color: #fff; }
.pismo-final__card--orange h3, .pismo-final__card--orange p { color: #fff; }

.pismo-banner {
    display: block; border-radius: var(--pismo-radius-lg); overflow: hidden; text-decoration: none !important;
    background: var(--pismo-ink) center / cover no-repeat;
}
.pismo-banner__inner {
    background: rgba(22, 31, 42, 0.6); padding: 56px; color: #fff;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
}
.pismo-banner__title { font-size: 44px; font-weight: 900; }
.pismo-banner__text { font-size: 18px; color: #E0EAEF; max-width: 560px; }
.pismo-banner__tag { display: inline-block; background: var(--pismo-orange); padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; margin-bottom: 14px; }

@media (max-width: 767.98px) {
    body.pismo { font-size: 16px; }
    .pismo-hero { padding-top: 12px; }
    .pismo-hero__grid { gap: 28px; }
    .pismo-hero__art { order: -1; grid-template-rows: 130px 130px; gap: 10px; }
    .pismo-hero__arch { border-radius: 90px 90px 20px 20px; }
    .pismo-hero__verse { padding: 14px; border-radius: 20px 20px 70px 20px; }
    .pismo-hero__verse p { font-size: 14px; }
    .pismo-hero__buttons .btn { flex: 1 1 100%; }
    .pismo-steps { display: flex; overflow-x: auto; border-radius: 0; background: none; padding: 0 0 8px; scroll-snap-type: x mandatory; }
    .pismo-step { flex: 0 0 72%; scroll-snap-align: start; background: #fff; }
    .pismo-home-sheet { margin-top: 32px; padding: 40px 0; border-radius: 32px 32px 0 0; }
    .pismo-block { margin-bottom: 56px; }
    .pismo-block__split { gap: 24px; }
    .pismo-panel { padding: 26px 18px; border-radius: 28px; margin-left: -8px; margin-right: -8px; }
    .pismo-tiles { grid-template-columns: 1fr; }
    .pismo-tile img { width: 110px; height: 86px; }
    .pismo-tile b { font-size: 18px; }
    .pismo-question { flex-direction: column-reverse; align-items: flex-start; gap: 4px; font-size: 16px; padding: 16px 18px; }
    .pismo-final { grid-template-columns: 1fr; }
    .pismo-final__card { padding: 28px; border-radius: 28px; }
    .pismo-banner__inner { padding: 28px; }
    .pismo-banner__title { font-size: 32px; }
    .pismo-next { padding: 24px; border-radius: 28px; }
    .pismo-next__title { font-size: 21px; }
}
