.page-id-1381 .content-new {
    font-size: 18px;
    line-height: 1.7;
}

.page-id-1381 .content-new > *:not(.genealogicheskie-uslugi-three-blocks) {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-id-1381 .content-new p {
    margin-bottom: 18px;
}

.page-id-1381 .content-new h2 {
    position: relative;
    margin-top: 56px;
    margin-bottom: 20px;
    padding-left: 28px;
}

/* В шаблоне метка — картинка высотой в строку и у длинного заголовка стоит только у первой строки; здесь она тянется на весь заголовок. */
.page-id-1381 .content-new h2:before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 10px;
    padding: 0;
    background: #ffdd55;
}

/* Кнопки темы, открывающие её попапы, стоят на z-index 1000000 и иначе оказываются поверх лайтбокса. */
.page-id-1381 .mfp-bg {
    z-index: 1000001;
    opacity: 0.92;
}

.page-id-1381 .mfp-wrap {
    z-index: 1000002;
}

.page-id-1381 .mfp-wrap button.mfp-close {
    position: fixed;
    top: 12px;
    right: 12px;
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    font-size: 34px;
    line-height: 48px;
    text-align: center;
    opacity: 1;
}

.page-id-1381 .content-new ul {
    padding-left: 0;
}

.page-id-1381 .content-new > ul > li {
    position: relative;
    padding-left: 40px;
    margin-bottom: 8px;
}

.page-id-1381 .content-new > ul > li:before {
    position: absolute;
    left: 0;
    top: 2px;
    padding-right: 0;
}

.page-id-1381 .content-new h3 {
    font-size: 26px;
    line-height: 36px;
    color: #073A27;
    margin: 40px 0 20px;
}

.page-id-1381 .content-new h3 iframe {
    display: block;
    width: 100%;
    max-width: 720px;
    height: auto;
    aspect-ratio: 16 / 9;
    margin-top: 20px;
    border-radius: 15px;
}

.page-id-1381 .content-new .gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 260px));
    gap: 30px;
    margin-top: 20px;
    margin-bottom: 30px;
}

.page-id-1381 .content-new .gallery-item {
    width: auto;
    max-width: none;
    margin: 0;
}

.page-id-1381 .content-new .gallery-icon {
    margin: 0;
    padding: 0;
}

.page-id-1381 .content-new .gallery img {
    display: block;
    width: 100%;
    height: auto;
    border: 0;
    border-radius: 15px;
}

.page-id-1381 .content-new .gallery-caption {
    width: auto;
    margin-top: 10px;
    padding: 0;
    border: 0;
    font-size: 15px;
    line-height: 22px;
    text-align: center;
}

/* Ширину картинке слайдера задаёт инлайн-стиль в шаблоне. */
.page-id-1381 .imgnew .slick-slide img {
    width: 100% !important;
    height: 240px;
    object-fit: contain;
}

.page-id-1381 .faq-item {
    border-bottom: 1px solid rgba(7, 58, 39, 0.2);
}

.page-id-1381 .faq-item summary {
    position: relative;
    padding: 16px 40px 16px 0;
    font-weight: 600;
    color: #073A27;
    cursor: pointer;
    list-style: none;
}

.page-id-1381 .faq-item summary::-webkit-details-marker {
    display: none;
}

.page-id-1381 .faq-item summary:after {
    content: "+";
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 28px;
    font-weight: 400;
}

.page-id-1381 .faq-item[open] summary:after {
    content: "−";
}

.page-id-1381 .faq-item p {
    margin: 0 0 16px;
}

/* Карточки услуг свёрстаны инлайн-стилями в тексте страницы, поэтому без !important их не перебить. */
.page-id-1381 .genealogicheskie-uslugi-three-blocks {
    margin-top: 50px !important;
}

.page-id-1381 .genealogicheskie-uslugi-three-blocks .dfdfhrrrrr {
    align-items: stretch;
}

.page-id-1381 .genealogicheskie-uslugi-three-blocks .dfdfhrrrrr > div {
    display: flex;
    flex-direction: column;
}

.page-id-1381 .genealogicheskie-uslugi-three-blocks .hbstyle {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    height: auto !important;
}

.page-id-1381 .genealogicheskie-uslugi-three-blocks .hstyle1_new {
    position: static !important;
    width: auto !important;
    margin: auto auto 0;
    padding: 10px 0 15px;
    transform: none !important;
    text-align: center;
}

.page-id-1381 .genealogicheskie-uslugi-three-blocks .hbstyle > ul + p {
    display: none;
}

.page-id-1381 .genealogicheskie-uslugi-three-blocks .hstyle1 {
    position: static !important;
    width: 100% !important;
}

.page-id-1381 .content-new > ul:has(> li > strong:first-child, > li > b:first-child) > li {
    padding: 18px 24px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 15px;
}

.page-id-1381 .content-new > ul:has(> li > strong:first-child, > li > b:first-child) > li:before {
    content: none;
}

.page-id-1381 .content-new > ul > li > strong:first-child,
.page-id-1381 .content-new > ul > li > b:first-child {
    color: #073A27;
}

.page-id-1381 .content-new > .gerb-steps {
    counter-reset: gerb-step;
}

.page-id-1381 .content-new > .gerb-steps > li {
    counter-increment: gerb-step;
    padding-left: 56px;
    margin-bottom: 16px;
}

.page-id-1381 .content-new > .gerb-steps > li:before {
    content: counter(gerb-step);
    top: 0;
    width: 38px;
    height: 38px;
    line-height: 38px;
    border-radius: 50%;
    background: #073A27;
    color: #ffffff;
    font-size: 17px;
    font-weight: 600;
    text-align: center;
}

.page-id-1381 .content-new > .gerb-benefits {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.page-id-1381 .content-new > .gerb-benefits > li {
    margin: 0;
    padding: 16px 20px 16px 56px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 15px;
}

.page-id-1381 .content-new > .gerb-benefits > li:before {
    left: 20px;
    top: 18px;
}

.page-id-1381 .gerb-hero__lead {
    margin: 0 0 10px;
    font-family: "Montserrat", sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: #073A27;
}

.page-id-1381 .gerb-hero__facts {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
    line-height: 1.5;
}

.page-id-1381 .gerb-hero__facts li:before {
    content: "✓ ";
    font-weight: 700;
}

/* На фоновом фото блока с формой ручка печати выглядывает над карточкой — закрываем полосу над ней цветом фона фото. */
.page-id-1381 .contacts-bottom {
    background-image: linear-gradient(180deg, #2a2522 0, #2a2522 100px, rgba(42, 37, 34, 0) 140px), url(../images/group-31-min.jpg);
}

/* Картинка баннера видна только шире 1024px (шаблон uslugi-new1.php), поэтому кнопку на неё поднимаем только там. */
@media all and (min-width: 1025px) {
    .page-id-1381 .container1 {
        position: relative;
        overflow: hidden;
        border-radius: 20px;
    }

    .page-id-1381 .container1 .nonfone {
        display: block;
        height: 440px;
        object-fit: cover;
    }

    .page-id-1381 .container1:after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.55) 100%);
        pointer-events: none;
    }

    .page-id-1381 .top-center {
        z-index: 1;
        top: 50%;
        left: 50%;
        width: 90%;
        max-width: 1000px;
        padding: 0;
        transform: translate(-50%, -75%);
        background: none;
        opacity: 1;
        color: #ffffff;
        text-align: center;
    }

    .page-id-1381 .gerb-hero__lead {
        margin-bottom: 22px;
        font-size: 28px;
        line-height: 1.35;
        color: #ffffff;
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    }

    .page-id-1381 .gerb-hero__facts {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px 32px;
        font-size: 17px;
    }

    .page-id-1381 .gerb-hero__facts li:before {
        color: #FFD84D;
    }

    /* Цвет кнопки задан инлайн-стилем в тексте страницы. */
    .page-id-1381 .content-new > p:first-of-type .open-popup {
        background: #FFD84D !important;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    }

    .page-id-1381 .content-new > p:first-of-type .open-popup span {
        color: #073A27 !important;
        font-size: 18px !important;
    }

    .page-id-1381 .content-new > p:first-of-type {
        position: relative;
        z-index: 2;
        margin-top: -164px;
    }
}

@media all and (max-width: 1000px) {
    .page-id-1381 .content-new {
        font-size: 16px;
    }

    .page-id-1381 .content-new h2 {
        margin-top: 40px;
        padding-left: 20px;
        font-size: 20px;
        line-height: 28px;
    }

    .page-id-1381 .content-new h2:before {
        top: 4px;
        bottom: 4px;
        width: 8px;
    }

    .page-id-1381 .content-new > .gerb-benefits {
        grid-template-columns: 1fr;
    }

    .page-id-1381 .content-new h3 {
        font-size: 22px;
        line-height: 30px;
    }

    .page-id-1381 .contacts-bottom {
        background-image: linear-gradient(180deg, #2a2522 0, #2a2522 58px, rgba(42, 37, 34, 0) 98px), url(../images/group-31-min.jpg);
    }

    .page-id-1381 .content-new .gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 15px;
    }

    .page-id-1381 .imgnew .slick-slide img {
        height: 200px;
    }

    .page-id-1381 .content-new .gallery-caption {
        font-size: 13px;
        line-height: 18px;
    }

    .page-id-1381 .genealogicheskie-uslugi-three-blocks .dfdfhrrrrr > div {
        margin-bottom: 20px;
    }
}
