/*
 * Rivera — Default page (page.php)
 *
 * Blocks:
 *   .text-page — a page of editor text: the title plate, then the text panel
 *
 * One to one with the current site's text pages («Додаткові послуги»): the
 * title on an orange plate, the text in a navy panel, the numbered sections in
 * orange capitals with plain white lists under them. Sizes are the live
 * site's computed values, not scaled.
 *
 * Editor output arrives as bare tags with no classes of their own, so the
 * content rules select by tag inside .text-page__content — the one place the
 * theme does that, and only for text the editor writes.
 */

/* Shallower than the shared inset: the title plate reads as the page's top. */
.text-page {
    padding: 24px 0 48px;
}

.text-page__title {
    display:          inline-block;
    margin:           0 0 20px;
    padding:          10px 45px;
    background-color: var(--color-orange);
    color:            var(--color-navy-deep);
    font-size:        24px;
    font-weight:      700;
    line-height:      1.43;
    text-transform:   var(--tt-heading);
}

.text-page__content {
    padding:     10px 15px 15px;
    background:  linear-gradient(0deg, var(--color-navy-deep) 0%, var(--color-panel) 100%);
    font-size:   18px;
    line-height: 1.43;
}

.text-page__content > :last-child {
    margin-bottom: 0;
}

.text-page__content p {
    margin: 0 0 10px;
}

.text-page__content h2,
.text-page__content h3 {
    margin:         20px 0 10px;
    color:          var(--color-orange);
    font-size:      20px;
    font-weight:    700;
    line-height:    1.43;
    text-transform: var(--tt-heading);
}

.text-page__content a {
    color:                 var(--color-orange);
    text-underline-offset: 3px;
}

/* reset.css strips list markers everywhere (list-style: none, and li as a
 * block, which has no marker at all); in editor text they carry meaning. */
.text-page__content ol,
.text-page__content ul {
    margin:       0 0 10px;
    padding-left: 40px;
}

.text-page__content ol {
    list-style: decimal;
}

.text-page__content ul {
    list-style: disc;
}

.text-page__content li {
    display: list-item;
}

/* Section lines of the numbered list: orange capitals, number included. */
.text-page__content ol > li {
    color:          var(--color-orange);
    font-size:      20px;
    font-weight:    700;
    text-transform: var(--tt-heading);
}

/* The list under a section goes back to plain white text. */
.text-page__content li > ul {
    margin:         30px 0;
    color:          var(--color-secondary);
    font-size:      18px;
    font-weight:    400;
    text-transform: none;
}

/* Tablet keeps the live site's sizes: the column is wide enough for them. */

/* On a phone the live site's two 40px list indents and desktop type leave the
 * items a column of barely 170px on a 320px screen — most lines break three
 * or four times. The indents and type step down; the look stays the same. */
@media (max-width: 767px) {
    .text-page {
        padding: 16px 0 32px;
    }

    /* A phone has no room beside the plate, so it runs the full width. The
     * live site's column is 8px narrower at the edges than this container, so
     * its 45px inset would break the title onto a second line here. */
    .text-page__title {
        display:   block;
        padding:   10px 20px;
        font-size: 20px;
    }

    .text-page__content {
        padding:   10px 14px 14px;
        font-size: 16px;
    }

    .text-page__content ol {
        padding-left: 26px;
    }

    .text-page__content ul {
        padding-left: 20px;
    }

    .text-page__content ol > li {
        font-size: 17px;
    }

    .text-page__content li > ul {
        margin:    14px 0 20px;
        font-size: 16px;
    }

    .text-page__content li > ul > li + li {
        margin-top: 4px;
    }
}

/* The narrowest phones: the plate's title only fits on one line a size down. */
@media (max-width: 359px) {
    .text-page__title {
        padding:   10px 14px;
        font-size: 18px;
    }
}
