/* Баннер как на tezis-shop.ru/certificate (сетка и типографика по fashion/css/old.css) */
.cert-page {
    font-family: "Inter", "Arial", sans-serif;
    color: #1f1f1f;
    line-height: 1.55;
    padding: 0 0 60px;
}

.cert-page .head.head--certificate {
    display: grid;
    grid-template-rows: max-content;
    grid-template-columns: 55% 1fr;
    color: #000;
}

.cert-page .head.head--certificate .head__content {
    z-index: 1;
    grid-column: 1;
    grid-row: 1;
    padding: 47px 0 83px 108px;
    align-self: start;
}

.cert-page .head.head--certificate .head__title {
    margin-top: 0;
    margin-bottom: 18px;
    font-weight: 400;
    font-size: 45px;
    line-height: 1.1;
    font-family: "Lato", "Montserrat", Helvetica, Arial, sans-serif;
}

.cert-page .head.head--certificate .head__text {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 19px;
    line-height: 1.4;
}

.cert-page .head.head--certificate .head__text:not(:last-of-type) {
    margin-bottom: 12px;
}

.cert-page .head.head--certificate .head__text--first {
    margin-bottom: 12px;
}

.cert-page .head.head--certificate .head__text--certificate {
    position: relative;
    padding-left: 20px;
}

.cert-page .head.head--certificate .head__text--certificate:not(:last-child) {
    margin-bottom: 14px;
}

.cert-page .head.head--certificate .head__text--certificate::before {
    content: "";
    position: absolute;
    top: 5px;
    left: 0;
    width: 9px;
    height: 18px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='18' viewBox='0 0 9 18' fill='none'%3E%3Cpath d='M1 1l6 8-6 8' stroke='%23705399' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

.cert-page .head.head--certificate .head__picture.head__picture--certificate {
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100%;
    height: 100%;
}

.cert-page .head.head--certificate .head__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 1199px) {
    .cert-page .head.head--certificate {
        margin-right: -18px;
        margin-left: -18px;
    }

    .cert-page .head.head--certificate .head__picture.head__picture--certificate {
        height: 312px;
    }

    .cert-page .head.head--certificate .head__title {
        margin-bottom: 20px;
        font-size: 27px;
    }

    .cert-page .head.head--certificate .head__text {
        font-size: 16px;
    }

    .cert-page .head.head--certificate .head__content {
        padding: 40px 0 50px 50px;
    }
}

@media (max-width: 767px) {
    .cert-page .head.head--certificate {
        grid-template-columns: 100%;
        margin-right: -10px;
        margin-left: -10px;
    }

    .cert-page .head.head--certificate .head__picture.head__picture--certificate {
        height: 466px;
    }

    .cert-page .head.head--certificate .head__img {
        object-position: bottom;
    }

    .cert-page .head.head--certificate .head__content {
        padding: 40px 10px 125px;
    }

    .cert-page .head.head--certificate .head__title {
        font-size: 20px;
    }

    .cert-page .head.head--certificate .head__text {
        font-size: 13px;
    }

    .cert-page .head.head--certificate .head__text--certificate {
        padding-left: 15px;
    }

    .cert-page .head.head--certificate .head__text--certificate::before {
        top: 3px;
        height: 13px;
    }

    .cert-page .head.head--certificate .head__text--certificate:not(:last-child) {
        margin-bottom: 12px;
    }
}

/* Блок заказа: как на макете tezis-shop — две колонки, вкладки, серые поля, превью справа */
.cert-order-wrap {
    margin-top: 48px;
    padding-top: 8px;
}

.cert-order-wrap__title {
    margin: 0 0 28px;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.2;
    color: #1a1a1a;
}

.cert-order__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
    gap: 32px 40px;
    align-items: start;
}

.cert-order__form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.cert-order__visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.cert-order__city {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #4a4a4a;
}

.cert-order__city-icon {
    flex-shrink: 0;
    color: #6b6b6b;
}

.cert-order__city-text {
    font: inherit;
    font-size: 16px;
    font-weight: 500;
    color: #222;
}

.cert-order__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}

.cert-order__tab {
    position: relative;
    cursor: pointer;
    margin: 0;
    display: inline-block;
}

.cert-order__tab-input {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.cert-order__tab-text {
    display: inline-block;
    padding: 10px 16px;
    font-size: 15px;
    line-height: 1.3;
    color: #333;
    border: 1px solid transparent;
    border-radius: 6px;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.cert-order__tab-input:focus + .cert-order__tab-text {
    outline: 2px solid #705399;
    outline-offset: 2px;
}

.cert-order__tab-input:checked + .cert-order__tab-text {
    background: #ebe4f5;
    border-color: #705399;
    color: #1a1a1a;
}

.cert-order__fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cert-order__grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.cert-order__field--full {
    grid-column: 1 / -1;
}

.cert-order__electronic {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cert-ctrl,
.cert-order__select {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    border: 0;
    border-radius: 8px;
    font: inherit;
    font-size: 15px;
    color: #222;
    background: #ededed;
    transition: box-shadow 0.15s ease, background 0.15s ease;
}

.cert-ctrl::placeholder {
    color: #6f6f6f;
}

.cert-ctrl:focus {
    outline: none;
    background: #e5e5e5;
    box-shadow: 0 0 0 2px #705399;
}

.cert-ctrl--textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.45;
}

.cert-ctrl.js-cert-send-at {
    cursor: pointer;
    caret-color: transparent;
}

/* Flatpickr: дата и время (popover как на tezis-shop.ru/certificate) */
.cert-page .flatpickr-calendar {
    border-radius: 8px;
    border: 1px solid #d8d8d8;
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.14);
    font-family: inherit;
}

.cert-page .flatpickr-months .flatpickr-month {
    background: transparent;
}

.cert-page .flatpickr-day.flatpickr-disabled,
.cert-page .flatpickr-day.prevMonthDay,
.cert-page .flatpickr-day.nextMonthDay {
    color: #bdbdbd;
}

.cert-page .flatpickr-day.today:not(.selected) {
    border-color: #8a8a8a;
}

.cert-page .flatpickr-time {
    border-top: 1px solid #e8e8e8;
}

.cert-page .flatpickr-time .flatpickr-am-pm,
.cert-page .flatpickr-time input.flatpickr-hour,
.cert-page .flatpickr-time input.flatpickr-minute {
    font-weight: 600;
}

.cert-order__select {
    cursor: pointer;
    color: #6f6f6f;
}

.cert-order__select:invalid {
    color: #6f6f6f;
}

.cert-order__select:valid {
    color: #222;
}

.cert-order__consent {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.45;
    color: #666;
}

.cert-order__consent-text {
    user-select: none;
}

.cert-order__checkbox-slot {
    position: relative;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-top: 1px;
}

.cert-order__checkbox-native {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.cert-order__checkbox-face {
    position: relative;
    display: block;
    width: 22px;
    height: 22px;
    box-sizing: border-box;
    border: 2px solid #6e6e6e;
    border-radius: 4px;
    background: #fff;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.cert-order__checkbox-native:checked + .cert-order__checkbox-face {
    background: #705399;
    border-color: #705399;
}

.cert-order__checkbox-native:checked + .cert-order__checkbox-face::after {
    content: "";
    position: absolute;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.cert-order__checkbox-native:focus + .cert-order__checkbox-face {
    outline: 2px solid #705399;
    outline-offset: 2px;
}

.cert-order__checkbox-native:hover + .cert-order__checkbox-face {
    border-color: #705399;
}

.cert-order__link {
    color: #705399;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cert-order__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 20px 24px;
}

.cert-order__submit {
    flex-shrink: 0;
    padding: 14px 28px;
    border: 0;
    border-radius: 4px;
    background: #1a1a1a;
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.01em;
}

.cert-order__submit:hover {
    background: #333;
}

.cert-order__submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.cert-order__legal-inline {
    flex: 1;
    min-width: 200px;
    margin: 0;
    padding-top: 2px;
    font-size: 11px;
    line-height: 1.45;
    color: #888;
    max-width: 420px;
}

/* Превью сертификата */
.cert-order__preview {
    background: #8c6fb8;
    border-radius: 4px;
    padding: 36px 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 440px;
}

.cert-preview {
    width: 100%;
    max-width: 320px;
}

.cert-preview__card {
    position: relative;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.cert-preview__pattern {
    position: absolute;
    inset: 0;
    opacity: 0.35;
    background:
        linear-gradient(125deg, rgba(143, 111, 184, 0.25) 0%, transparent 45%),
        linear-gradient(-35deg, rgba(180, 160, 220, 0.35) 0%, transparent 50%),
        repeating-linear-gradient(
            -28deg,
            transparent,
            transparent 14px,
            rgba(143, 111, 184, 0.08) 14px,
            rgba(143, 111, 184, 0.08) 15px
        );
    pointer-events: none;
}

.cert-preview__body {
    position: relative;
    padding: 32px 22px 24px;
    text-align: center;
}

.cert-preview__heading {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 700;
    color: #70519e;
    letter-spacing: 0.02em;
}

.cert-preview__sub {
    margin: 0 0 20px;
    font-size: 13px;
    line-height: 1.35;
    color: #5c5c5c;
}

.cert-preview__sum {
    margin: 0;
    font-size: 42px;
    font-weight: 800;
    font-style: italic;
    line-height: 1;
    color: #70519e;
    letter-spacing: -0.02em;
}

.cert-preview__sum.is-empty {
    opacity: 0.55;
    font-size: 34px;
    font-weight: 600;
}

.cert-preview__footer {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    padding: 12px 14px 14px;
    font-size: 9px;
    line-height: 1.35;
    color: #444;
    border-top: 1px solid #eee;
    background: #fafafa;
}

.cert-preview__col {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cert-preview__col--brand {
    flex-direction: row;
    align-items: center;
    gap: 6px;
}

.cert-preview__logo {
    font-size: 22px;
    font-weight: 700;
    color: #70519e;
    line-height: 1;
}

.cert-preview__brand-text {
    font-size: 8px;
    line-height: 1.2;
    max-width: 72px;
}

.cert-preview__col--contacts span {
    display: block;
    white-space: nowrap;
}

.cert-preview__col--addr {
    text-align: right;
    font-size: 8px;
}

@media (max-width: 991px) {
    .cert-order__layout {
        grid-template-columns: 1fr;
    }

    .cert-order__preview {
        order: -1;
        min-height: 360px;
        padding: 28px 20px;
    }

    .cert-preview {
        max-width: 340px;
    }
}

@media (max-width: 767px) {
    .cert-order-wrap__title {
        font-size: 22px;
    }

    .cert-order__grid2 {
        grid-template-columns: 1fr;
    }

    .cert-order__legal-inline {
        max-width: none;
    }

    .cert-preview__sum {
        font-size: 34px;
    }
}

.cert-seo {
    margin-top: 56px;
}

.cert-seo__lead,
.cert-seo__text {
    text-align: left;
}

.cert-seo__lead {
    font-size: 18px;
    margin: 0 0 16px;
}

/* SEO-заголовки: крупный отступ сверху (разрыв секции), компактный снизу — как на макете */
.cert-seo h2.cert-seo__subtitle {
    margin: 52px 0 18px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.35;
    text-align: left;
    text-transform: none;
    letter-spacing: normal;
    color: #1a1a1a;
}

.cert-seo h2.cert-seo__subtitle:first-of-type {
    margin-top: 48px;
}

.cert-seo__text {
    margin: 0 0 12px;
}

@media (max-width: 767px) {
    .cert-seo h2.cert-seo__subtitle {
        margin: 40px 0 14px;
        font-size: 18px;
    }

    .cert-seo h2.cert-seo__subtitle:first-of-type {
        margin-top: 36px;
    }
}

.cert-modal {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(20, 12, 40, 0.45);
}

.cert-modal[hidden] {
    display: none;
}

.cert-modal__dialog {
    max-width: 420px;
    width: 100%;
    padding: 28px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.cert-modal__title {
    margin: 0 0 12px;
    font-size: 22px;
    font-weight: 600;
}

.cert-modal__text {
    margin: 0 0 20px;
    line-height: 1.5;
}

.cert-modal__text a {
    color: #715399;
    font-weight: 600;
    text-decoration: none;
}

.cert-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.cert-modal__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 28px;
    border: 1px solid #715399;
    background: #fff;
    color: #715399;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    font-size: 15px;
}

.cert-modal__btn--primary {
    background: #715399;
    color: #fff;
    border-color: #715399;
}

