/*
 * Visual alignment for the three video-service pages that still use the
 * legacy template. This stylesheet is registered only by all.php,
 * education.php and film.php, so its selectors do not affect other pages.
 */

.s-first {
    min-height: 650px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 112px 24px 72px;
}

.s-first .breadcrumbs {
    margin-bottom: 42px;
}

.s-first__container {
    width: min(100%, 1040px);
    margin: 0 auto;
}

.s-first__title {
    max-width: 920px;
    margin-inline: auto;
    text-wrap: balance;
}

.s-first__subtitle {
    max-width: 780px;
    margin: 24px auto 0;
    text-wrap: pretty;
}

.s-first__items {
    width: min(100%, 920px);
    gap: 20px 28px;
    margin: 42px auto 0;
}

.s-first__item {
    min-width: 150px;
}

.s-first__button-wrapper {
    margin-top: 38px;
}

.s-first__button {
    min-height: 54px;
    margin-bottom: 0;
    box-shadow: 0 14px 30px rgb(0 0 0 / .2);
}

.s-types,
.s-need,
.s-studio,
.s-portfolio,
.s-advantages,
.s-stages,
.s-guarantees,
.s-comment,
.s-clients,
.s-texts {
    scroll-margin-top: 104px;
}

.s-types__container,
.s-need__container,
.s-studio__container,
.s-portfolio__container,
.s-advantages__container,
.s-stages__container,
.s-guarantees__container,
.s-texts__container {
    width: min(calc(100% - 48px), 1180px);
    margin-inline: auto;
}

.s-need__text {
    text-wrap: pretty;
}

.s-need__text p {
    max-width: 76ch;
}

#prices .s-need__text p {
    max-width: 42ch;
    margin-inline: auto;
}

#voices .card-speaker__name a:focus-visible,
.s-types__link:focus-visible,
.s-first__button:focus-visible {
    outline: 3px solid #f7cf46;
    outline-offset: 4px;
}

.s-types__item {
    min-width: 0;
}

.s-types__descr {
    text-wrap: pretty;
}

@media (max-width: 767px) {
    .s-first {
        min-height: auto;
        padding: 96px 20px 52px;
    }

    .s-first .breadcrumbs {
        margin-bottom: 28px;
    }

    .s-first__title {
        font-size: clamp(32px, 10vw, 48px);
        line-height: 1.05;
    }

    .s-first__subtitle {
        margin-top: 20px;
        font-size: 16px;
        line-height: 1.55;
    }

    .s-first__items {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px 14px;
        margin-top: 34px;
    }

    .s-first__item {
        min-width: 0;
    }

    .s-first__button-wrapper {
        margin-top: 32px;
    }

    .s-first__button {
        width: 100%;
        max-width: 340px;
        margin-inline: auto;
        padding-inline: 20px;
        white-space: normal;
    }

    .s-types__container,
    .s-need__container,
    .s-studio__container,
    .s-portfolio__container,
    .s-advantages__container,
    .s-stages__container,
    .s-guarantees__container,
    .s-texts__container {
        width: min(calc(100% - 32px), 1180px);
    }

    .s-need__text p,
    #prices .s-need__text p {
        font-size: 16px;
        line-height: 1.6;
    }
}

@media (prefers-reduced-motion: reduce) {
    .s-first__button {
        transition: none;
    }
}
