﻿/* Base resets useful for consistent rendering */
:root {
    --text-primary: #1A2028;
    --color-primary: #1673EF;
    --color-secondary: #0a67d0;
}

* {
    box-sizing: border-box;
}

a {
    text-decoration: none;
    transition: .2s;
}
a:hover {
    text-decoration: none;
}

p {
    margin: 0;
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: "Inter", sans-serif;
    color: var(--text-primary);
}

.w30 {
    width: 30% !important;
}
.w70 {
    width: 70% !important;
}

.main-div-show {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100vh;
}

.v-hidden {
    visibility: hidden;
}

/* Layout helpers */
.container {
    padding-inline: 20px;
    position: relative;
    z-index: 1;
}

.policy-title {
    text-align: center;
    font-size: 24px;
    line-height: 1.3;
    margin: 28px 0 20px;
    font-weight: 700;
}

.policy-title--b {
    font-size: 28px;
}

/* Header (blue top area with rounded bottom corners) */
.new-header {
    background: var(--color-primary);
    min-height: 130px;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Steps line (simplified) */
.progress-steps {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 8px;
    align-items: flex-start;
    justify-content: space-between;
    position: relative;
    padding-top: 8px;
    max-width: 600px;
    margin: 0 auto 24px;
}

    .progress-steps::before {
        content: "";
        position: absolute;
        top: 22px;
        left: 8px;
        right: 8px;
        height: 2px;
        background: #d7e6f5;
    }

    .progress-steps .step {
        color: var(--text-primary);
        font-size: 14px;
        position: relative;
        padding-top: 45px;
        font-weight: 500;
        width: 90px;
    }

        .progress-steps .step:nth-child(2) {
            text-align: center;
        }

        .progress-steps .step:nth-child(3) {
            text-align: right;
        }

        .progress-steps .step::after {
            content: "";
            background: #fff;
            border: 3px solid var(--color-primary);
            position: absolute;
            top: -2px;
            left: 0;
            width: 30px;
            height: 30px;
            border-radius: 50%;
        }

        .progress-steps .step:nth-child(2)::after {
            left: 50%;
            transform: translateX(-50%);
        }

        .progress-steps .step:nth-child(3)::after {
            left: auto;
            right: 0;
        }

        .progress-steps .step:nth-child(1)::before,
        .progress-steps .step:nth-child(2)::before,
        .progress-steps .step:nth-child(3)::before {
            position: absolute;
            top: 6px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 1;
            color: var(--color-primary);
            font-size: 16px;
            font-weight: 700;
        }

        .progress-steps .step:nth-child(1)::before {
            content: "1";
            left: 18px;
        }

        .progress-steps .step:nth-child(2)::before {
            content: "2";
        }

        .progress-steps .step.second:nth-child(3)::before {
            content: "2";
            right: 9px;
        }

        .progress-steps .step:nth-child(3)::before {
            content: "3";
            right: 8px;
            left: auto;
        }
        .progress-steps .step.active::after {
            background: var(--color-primary);
        }

        .progress-steps .step.active::before {
            color: #fff;
        }

/* Insurance block */
.insurance {
    border: 1px solid var(--color-primary);
    border-radius: 12px;
    overflow: hidden;
    max-width: 600px;
    margin: 0 auto 40px;
}

.insurance--sign {
    padding: 16px 16px 20px;
}

.insurance__grid {
    display: grid;
    grid-template-columns: 220px 1fr;
}

    .insurance__grid:not(:last-child) {
        border-bottom: 1px solid var(--color-primary);
    }

.insurance__item {
    display: contents;
}

.insurance__label {
    color: #0c1d37;
    font-weight: 600;
    background: #eef6ff;
    padding: 16px 20px;
}

.insurance__value {
    padding: 16px 20px;
    color: var(--text-primary);
}

/* Payment (pay-card) */
.pay-card__list {
    padding: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.pay-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #cfe3ff;
    background: linear-gradient(180deg, #E8F1FD 0%, #A4CBFF 100%);
    color: #0c1d37;
    cursor: pointer;
    box-shadow: 0 0 1px rgba(0,0,0, .4);
}

    .pay-btn:hover {
        border-color: #a7ccff;
        box-shadow: 0 2px 8px rgba(22, 115, 239, 0.12);
    }

.wrong-text {
    color: #D32F2F;
    text-align: center;
}

/* Sign step (code input) */
.insurance__text {
    text-align: center;
    padding: 12px 8px 18px;
    font-size: 16px;
    font-weight: 500;
}

    .insurance__text p {
        margin: auto;
        line-height: 32px;
    }

.sign-info {
    font-style: Italic;
    font-size: 12px;
    text-align: center;
}

.policy-sign-block {
    padding-block: 16px 18px;
}

.policy-sign-title {
    text-align: center;
    font-weight: 600;
    margin-bottom: 12px;
}

.code-inputs {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.code-input {
    width: 56px;
    height: 48px;
    border-radius: 10px;
    border: 1px solid #cfe3ff;
    background: #e9f2ff;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: #0c1d37;
    outline: none;
}

    .code-input:focus {
        border-color: var(--color-primary);
        box-shadow: 0 0 0 2px rgba(22, 115, 239, 0.15);
        background: #fff;
    }

/* Total price */
.total-price {
    display: flex;
    justify-content: space-between;
    padding: 8px 0 16px;
    max-width: 600px;
    margin: 0 auto;
}

.total-label {
    font-size: 18px;
    font-weight: 600;
}

.total-value {
    font-weight: 700;
    font-size: 18px;
}

/* CTA */
.btn.yellow {
    background: #ff7a2f;
    border-radius: 2px;
    color: #fff;
    border: none;
    padding: 14px 24px;
    font-weight: 700;
    cursor: pointer;
    display: block;
    margin: 0 auto 24px;
    min-width: 220px;
}

.btn.yellow:hover {
    background: #ff6a14;
}

.footer-info {
    text-align: center;
    font-size: 13px;
    color: #262626;
    margin-block-end: 16px;
    line-height: 20px;
}

.footer-info__mail:hover,
.footer-info__link {
    color: #262626;
}

    .footer-info__mail,
    .footer-info__link:hover {
        color: var(--color-primary);
    }
.footer-info__mail {
    font-weight: 600;
}

/* Footer (light gray area with centered content) */
.footer {
    background: #E8E8E8;
    padding: 28px 16px 36px;
    text-align: center;
}

.footer-wrap {
    margin-top: 24px;
}

.footer__list {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.footer__soc-link {
    color: #262626;
}

    .footer__soc-link:hover {
        opacity: .6;
    }

.footer__link {
    color: #262626;
    display: inline-block;
    margin-block: 16px 12px;
}

.footer__link:hover {
    color: var(--color-primary);
}

/* Responsive tweaks */
/* Success page */
.icon-check,
.icon-close {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    color: #ffffff;
    display: grid;
    place-items: center;
    font-size: 28px;
    margin: 0 auto;
}

.icon-check {
    background: var(--color-primary);
}

.icon-close {
    background: #D32F2F;
}

.insurance--message {
    padding: 24px 20px;
    text-align: center;
}

.insurance h3 {
    margin: 0;
    font-size: 28px;
    line-height: 1.25;
    font-weight: 600;
}

.insurance__text-m {
    margin: 6px 0 4px;
    font-size: 18px;
    color: #3b5577;
    font-style: italic;
}

@media (max-width: 767px) {
    .insurance h3,
    .policy-title--b {
        font-size: 24px;
    }
    .insurance__text,
    .insurance__label,
    .insurance__value {
        font-size: 14px;
    }
}

@media (max-width: 540px) {
    .insurance__grid {
        grid-template-columns: 150px 1fr;
    }

    .insurance.pay-card,
    .pay-card__list {
        grid-template-columns: 1fr;
    }

    .btn.yellow {
        max-width: 220px;
    }
    .progress-steps .step {
        font-size: 12px;
    }
    .total-label,
    .total-value {
        font-size: 16px;
    }
}
@media (max-width: 374px) {
    .progress-steps .step {
        width: 82px;
    }
}