/* === Защита от горизонтального оверфлоу на мобиле === */
html, body { overflow-x: hidden; }
.container { overflow-x: clip; }

/* Хедер берём как есть с основного лендинга — никаких локальных переопределений */
.law-speciality, .law-speciality > *,
.law-speciality__content > *,
.price-section, .price-section > *,
.study-rhythm, .study-rhythm > *,
.study-rhythm__grid > * {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}
img:not(.cta-payment-person):not(.cta-payment-sber):not(.cta-payment-sign):not(.students-img):not(.application-image):not(.gallery-item img) { max-width: 100%; height: auto; }

/* HERO — структура и базовые стили из postuplenie.css.
   Локально только форма в левом блоке. */
.hero-form {
    margin-top: 28px;
    display: flex; flex-direction: column; gap: 10px;
}
.hero-form-eyebrow {
    font-family: 'Prosto One', sans-serif;
    font-size: 11px; letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--red, #d6122e);
    margin: 0 0 4px;
}
.hero-form-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.hero-form-input {
    width: 100%; height: 46px;
    padding: 0 16px;
    border: 1px solid #e5d0d0;
    border-radius: 12px;
    background: #fff;
    font-family: inherit; font-size: 14px;
    color: var(--text-main, #1f2937);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    min-width: 0;
}
.hero-form-input:focus {
    border-color: var(--red, #d6122e);
    box-shadow: 0 0 0 3px rgba(214,18,46,0.10);
}
.hero-form-submit {
    width: 100%; height: 50px;
    border: none; border-radius: 30px;
    background: var(--red, #d6122e);
    color: #fff;
    font-family: 'Prosto One', sans-serif;
    font-size: 13px; letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .15s;
}
.hero-form-submit:hover { background: var(--red-hover, #b3001b); }
.hero-form-submit:disabled { opacity: 0.6; cursor: default; }
.hero-form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 6px 0 4px;
    cursor: pointer;
    user-select: none;
}
.hero-form-checkbox input[type="checkbox"] {
    position: absolute;
    width: 1px; height: 1px;
    opacity: 0;
    pointer-events: none;
}
.hero-form-checkmark {
    flex-shrink: 0;
    width: 18px; height: 18px;
    border-radius: 4px;
    border: 2px solid rgba(20, 20, 20, 0.55);
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
    transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.hero-form-checkmark::after {
    content: '';
    display: block;
    width: 10px; height: 6px;
    border-left: 2.2px solid #fff;
    border-bottom: 2.2px solid #fff;
    transform: rotate(-45deg) translate(1px, -1px);
    opacity: 0;
}
.hero-form-checkbox input[type="checkbox"]:checked + .hero-form-checkmark {
    background: var(--red, #d6122e);
    border-color: var(--red, #d6122e);
}
.hero-form-checkbox input[type="checkbox"]:checked + .hero-form-checkmark::after { opacity: 1; }
.hero-form-checkbox input[type="checkbox"]:focus + .hero-form-checkmark {
    box-shadow: 0 0 0 3px rgba(214, 18, 46, 0.18);
}
.hero-form-checkbox:hover .hero-form-checkmark { border-color: #1a1a1a; }
.hero-form-checkbox-text {
    font-family: 'Prosto One', sans-serif;
    font-size: 11px; line-height: 1.4;
    color: #2a2a2a;
}
.hero-form-checkbox-text a {
    color: var(--red, #d6122e);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 400;
}
.hero-form-checkbox-text a:hover { color: var(--red-hover, #b3001b); }
.hero-form-checkbox.is-invalid .hero-form-checkmark {
    border-color: #ffcfcf;
    background: rgba(255, 80, 80, 0.18);
    animation: hero-form-shake .35s ease;
}
@keyframes hero-form-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

@media (max-width: 1024px) {
    .hero-form { margin-top: 22px; }
    .hero-form-input { height: 44px; font-size: 13px; }
    .hero-form-submit { height: 46px; font-size: 12px; }
}
@media (max-width: 600px) {
    .hero-form-row { grid-template-columns: 1fr; gap: 8px; }
    .hero-form-input { height: 42px; }
}

/* === СПЕЦИАЛЬНОСТЬ (по макету law-speciality) === */
.law-speciality {
    width: 100%;
    min-height: 560px;
    margin: 36px auto;
    padding: 28px 0 32px;
    display: flex;
    gap: 56px;
    background: #ffffff;
    font-family: 'Prosto One', sans-serif;
}
.law-speciality__content {
    flex: 1 1 0;
    min-width: 0;
}
.law-speciality__head {
    position: relative;
    min-height: 88px;
    padding-right: 110px;
}
.law-speciality__title {
    margin: 0;
    color: #000000;
    font-family: 'Prosto One', sans-serif;
    font-size: 36px;
    line-height: 0.95;
    font-weight: 400;
    letter-spacing: -0.4px;
    text-transform: uppercase;
}
.law-speciality__title > div { font-weight: 400; }
.law-speciality__title span {
    display: block;
    margin-top: 10px;
    color: #b0181e;
    font-family: 'Prosto One', sans-serif;
    font-size: 33px;
    line-height: 1;
    font-weight: 400;
    letter-spacing: -0.3px;
}
.law-speciality__icon {
    position: absolute;
    top: -4px;
    right: 0;
    width: 92px;
    height: 92px;
    object-fit: contain;
    filter: drop-shadow(0 6px 14px rgba(174,25,27,0.20));
}
.law-speciality__text {
    margin: 24px 0 0;
    color: #1f1f1f;
    font-family: 'Prosto One', sans-serif;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 400;
    letter-spacing: 0;
    max-width: 540px;
}
.law-speciality__subtitle {
    margin: 32px 0 0;
    color: #0e0e0e;
    font-family: 'Prosto One', sans-serif;
    font-size: 22px;
    line-height: 1.2;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: uppercase;
}
.law-speciality__list {
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
    max-width: 540px;
}
.law-speciality__list li {
    position: relative;
    margin-bottom: 16px;
    padding-left: 30px;
    color: #1f1f1f;
    font-family: 'Prosto One', sans-serif;
    font-size: 15px;
    line-height: 1.4;
    font-weight: 400;
    letter-spacing: 0;
}
.law-speciality__list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: -4px;
    color: #b0181e;
    font-size: 24px;
    line-height: 1;
    font-weight: 400;
}
.law-speciality__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 320px;
    height: 50px;
    margin-top: 28px;
    padding: 0 30px;
    border: 0;
    outline: none;
    border-radius: 999px;
    background: #b5181d;
    color: #ffffff;
    font-family: 'Prosto One', sans-serif;
    font-size: 16px;
    line-height: 1;
    font-weight: 400;
    letter-spacing: 0.02em;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .2s;
    -webkit-appearance: none;
    appearance: none;
}
.law-speciality__button:hover { background: #8a0d10; }
.law-speciality__button:focus { outline: none; box-shadow: 0 0 0 3px rgba(181,24,29,0.20); }
.law-speciality__button:focus:not(:focus-visible) { box-shadow: none; }
.law-speciality__image {
    width: 580px;
    flex-shrink: 0;
    aspect-ratio: 580 / 540;
    border-radius: 40px;
    overflow: hidden;
}
.law-speciality__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 1199px) {
    .law-speciality { gap: 36px; }
    .law-speciality__image { width: 480px; }
    .law-speciality__title { font-size: 32px; }
    .law-speciality__title span { font-size: 30px; }
}
@media (max-width: 900px) {
    .law-speciality {
        flex-direction: column;
        gap: 28px;
        min-height: auto;
        padding: 22px 0 26px;
    }
    .law-speciality__image {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 11;
        border-radius: 28px;
    }
}
@media (max-width: 600px) {
    .law-speciality { margin: 24px auto; }
    .law-speciality__head { min-height: auto; padding-right: 80px; }
    .law-speciality__title { font-size: 26px; }
    .law-speciality__title span { font-size: 24px; }
    .law-speciality__icon { width: 64px; height: 64px; top: 0; }
    .law-speciality__text { font-size: 14px; }
    .law-speciality__subtitle { font-size: 18px; margin-top: 24px; }
    .law-speciality__list { margin-top: 14px; }
    .law-speciality__list li { font-size: 14px; padding-left: 26px; margin-bottom: 12px; }
    .law-speciality__list li::before { font-size: 22px; }
    .law-speciality__button { min-width: 0; width: 100%; font-size: 14px; }
    .law-speciality__image { border-radius: 22px; }
}

/* === МОДАЛКА «ПРОФИЛИ ПОДГОТОВКИ» === */
.profiles-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    font-family: 'Prosto One', sans-serif;
}
.profiles-modal[hidden] { display: none; }
.profiles-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(20, 8, 10, 0.55);
    backdrop-filter: blur(4px);
    animation: profiles-modal-fade .18s ease-out;
}
.profiles-modal__dialog {
    position: relative;
    background: #ffffff;
    border-radius: 28px;
    box-shadow: 0 24px 64px -16px rgba(0,0,0,0.35);
    width: 100%;
    max-width: 720px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 36px 36px 32px;
    animation: profiles-modal-pop .22s cubic-bezier(.2,.7,.3,1.2);
}
@keyframes profiles-modal-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes profiles-modal-pop {
    from { opacity: 0; transform: translateY(12px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.profiles-modal__close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 36px;
    height: 36px;
    border: 0;
    background: #f7f7f7;
    border-radius: 50%;
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, color .2s;
}
.profiles-modal__close:hover { background: #ae191b; color: #fff; }
.profiles-modal__close svg { width: 16px; height: 16px; }

.profiles-modal__title {
    margin: 0 56px 10px 0;
    font-family: 'Prosto One', sans-serif;
    font-size: 22px;
    line-height: 1.15;
    font-weight: 400;
    color: #0e0e0e;
    text-transform: uppercase;
    letter-spacing: 0.01em;
}
.profiles-modal__title span {
    display: block;
    margin-top: 4px;
    color: #b0181e;
    font-size: 18px;
}
.profiles-modal__subtitle {
    margin: 0 0 22px;
    font-family: 'Prosto One', sans-serif;
    font-size: 14px;
    line-height: 1.45;
    color: #555;
}
.profiles-modal__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.profiles-modal__item {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 16px;
    padding: 18px 20px;
    background: #fff8f8;
    border: 1px solid #f0d6d7;
    border-radius: 18px;
    transition: border-color .2s;
}
.profiles-modal__item:hover { border-color: #ae191b; }
.profiles-modal__num {
    font-family: 'Prosto One', sans-serif;
    font-size: 28px;
    font-weight: 400;
    line-height: 1;
    color: #b0181e;
}
.profiles-modal__body { min-width: 0; }
.profiles-modal__name {
    margin: 0 0 12px;
    font-family: 'Prosto One', sans-serif;
    font-size: 17px;
    line-height: 1.2;
    font-weight: 400;
    color: #0e0e0e;
    text-transform: uppercase;
}
.profiles-modal__meta {
    margin: 0;
    padding-top: 10px;
    border-top: 1px solid #f0d6d7;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.profiles-modal__meta > div { min-width: 0; }
.profiles-modal__meta dt {
    margin: 0 0 2px;
    font-family: 'Prosto One', sans-serif;
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.profiles-modal__meta dd {
    margin: 0;
    font-family: 'Prosto One', sans-serif;
    font-size: 13px;
    color: #1a1a1a;
}

@media (max-width: 600px) {
    .profiles-modal { padding: 12px; }
    .profiles-modal__dialog {
        padding: 28px 20px 22px;
        border-radius: 22px;
        max-height: calc(100vh - 24px);
    }
    .profiles-modal__close { top: 12px; right: 12px; width: 32px; height: 32px; }
    .profiles-modal__title { font-size: 18px; margin-right: 48px; }
    .profiles-modal__title span { font-size: 15px; }
    .profiles-modal__subtitle { font-size: 13px; margin-bottom: 16px; }
    .profiles-modal__item { padding: 14px 16px; grid-template-columns: 42px 1fr; gap: 12px; }
    .profiles-modal__num { font-size: 22px; }
    .profiles-modal__name { font-size: 15px; }
    .profiles-modal__meta { grid-template-columns: 1fr; gap: 6px; padding-top: 8px; }
    .profiles-modal__meta > div { display: flex; justify-content: space-between; gap: 12px; }
    .profiles-modal__meta dt { font-size: 11px; margin: 0; }
    .profiles-modal__meta dd { font-size: 12px; }
}

/* блокировка скролла фона когда модалка открыта */
html.profiles-modal-open,
body.profiles-modal-open { overflow: hidden; }

/* === COST (по макету: розовый фон, табл с красно-белыми колонками) === */
.price-section {
    width: 100%;
    margin: 36px 0;
    padding: 38px 46px 42px;
    background: #ffe6e8;
    border-radius: 28px;
    font-family: 'Prosto One', sans-serif;
}
.price-section__title {
    margin: 0 0 22px;
    color: #000000;
    font-family: 'Prosto One', sans-serif;
    font-size: 28px;
    line-height: 1.18;
    font-weight: 400;
    letter-spacing: 0.1px;
    text-transform: uppercase;
    text-align: left;
}
.price-table {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.price-table table {
    width: 100%;
    min-width: 980px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}
.price-table col:nth-child(1) { width: 42%; }
.price-table col:nth-child(2) { width: 20%; }
.price-table col:nth-child(3) { width: 18%; }
.price-table col:nth-child(4) { width: 20%; }
.price-table th,
.price-table td {
    padding: 0;
    vertical-align: middle;
    text-align: center;
    font-family: 'Prosto One', sans-serif;
    font-weight: 400;
}
.price-table thead th {
    height: 72px;
    padding: 0 14px;
    background: #ffffff;
    color: #b3191e;
    font-size: 17px;
    line-height: 1.1;
    letter-spacing: 0;
    text-transform: uppercase;
}
.price-table thead th:first-child {
    border-top-left-radius: 24px;
}
.price-table thead th.is-red {
    background: #ae191b;
    color: #ffffff;
}
.price-table thead th:nth-child(2),
.price-table thead th:nth-child(4) {
    border-top-left-radius: 22px;
    border-top-right-radius: 22px;
}
.price-table tbody td {
    height: 64px;
    padding: 10px 14px;
    border-top: 1px solid #cfcfcf;
    background: #ffffff;
    color: #000000;
    font-size: 15px;
    line-height: 1.2;
    letter-spacing: 0;
}
.price-table tbody tr:first-child td {
    border-top: 2px solid #151515;
}
.price-table tbody td:first-child {
    padding-left: 22px;
    padding-right: 16px;
    text-align: left;
    font-size: 15px;
    line-height: 1.2;
}
.price-table__note {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #6b6b6b;
    text-transform: none;
}
.price-table tbody td:nth-child(2),
.price-table tbody td:nth-child(4) {
    background: #ae191b;
    color: #ffffff;
    font-size: 15px;
}
.price-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 24px;
}
.price-table tbody tr:last-child td:nth-child(2),
.price-table tbody tr:last-child td:nth-child(4) {
    border-bottom-left-radius: 22px;
    border-bottom-right-radius: 22px;
}
.price-section__note {
    margin: 18px 2px 0;
    font-family: 'Prosto One', sans-serif;
    font-size: 13px;
    line-height: 1.4;
    color: #444;
}

@media (max-width: 1024px) {
    .price-section { padding: 30px 22px; border-radius: 22px; }
    .price-section__title { font-size: 22px; }
}
@media (max-width: 600px) {
    .price-section { margin: 24px 0; padding: 24px 16px; border-radius: 18px; }
    .price-section__title { font-size: 18px; margin-bottom: 14px; }
    .price-table thead th { font-size: 14px; height: 58px; }
    .price-table tbody td { font-size: 13px; height: 56px; }
    .price-table tbody td:first-child { padding-left: 14px; }
    .price-table__note { font-size: 11px; }
}

/* === STUDY RHYTHM (по макету: розовые карточки с картинкой справа) === */
.study-rhythm {
    width: 100%;
    margin: 36px 0;
    padding: 12px 0 20px;
    background: #ffffff;
    font-family: 'Prosto One', sans-serif;
    color: #000;
}
.study-rhythm__title {
    margin: 0;
    font-family: 'Prosto One', sans-serif;
    font-size: 30px;
    line-height: 1.05;
    font-weight: 400;
    letter-spacing: 0.1px;
    text-transform: uppercase;
}
.study-rhythm__subtitle {
    margin: 14px 0 28px;
    font-family: 'Prosto One', sans-serif;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 400;
    color: #1a1a1a;
}
.study-rhythm__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.study-card {
    position: relative;
    min-height: 170px;
    border-radius: 28px;
    background: #fee5e7;
    padding: 26px 170px 24px 28px;
    overflow: hidden;
}
.study-card__title {
    margin: 0;
    color: #bc171d;
    font-family: 'Prosto One', sans-serif;
    font-size: 20px;
    line-height: 1.1;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: uppercase;
}
.study-card__text {
    margin: 14px 0 0;
    color: #000000;
    font-family: 'Prosto One', sans-serif;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 400;
}
.study-card__image {
    position: absolute;
    display: block;
    object-fit: contain;
    object-position: center;
    pointer-events: none;
    user-select: none;
    top: 16px;
    right: 22px;
    width: 140px;
    height: 138px;
}
.study-card__image--four { width: 146px; height: 144px; right: 20px; top: 12px; }

/* === Адаптив === */
@media (max-width: 1024px) {
    .study-rhythm__title { font-size: 24px; }
    .study-rhythm__subtitle { font-size: 16px; }
    .study-card { padding-right: 140px; }
    .study-card__image,
    .study-card__image--four { width: 116px; height: 116px; right: 16px; }
}
@media (max-width: 820px) {
    .study-rhythm__grid { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 600px) {
    .study-rhythm { margin: 24px 0; }
    .study-rhythm__title { font-size: 20px; }
    .study-rhythm__subtitle { font-size: 14px; margin: 10px 0 20px; }
    .study-card {
        min-height: 160px;
        padding: 22px 120px 20px 20px;
        border-radius: 22px;
    }
    .study-card__title { font-size: 17px; }
    .study-card__text { font-size: 12px; }
    .study-card__image,
    .study-card__image--four { width: 100px; height: 100px; right: 12px; top: 14px; }
}

/* === Цены на мобилке: превращаем таблицу в вертикальные карточки === */
@media (max-width: 720px) {
    .price-section { padding: 24px 16px; border-radius: 20px; }
    .price-section__title { font-size: 18px; margin-bottom: 16px; }
    .price-table { overflow: visible; }
    .price-table table,
    .price-table thead,
    .price-table tbody,
    .price-table tr,
    .price-table th,
    .price-table td,
    .price-table colgroup,
    .price-table col {
        display: block;
        width: 100% !important;
        height: auto;
        min-width: 0;
    }
    .price-table colgroup, .price-table col { display: none; }
    .price-table thead { display: none; }
    .price-table tbody tr {
        position: relative;
        background: #ffffff;
        border-radius: 18px;
        padding: 16px 18px 18px;
        margin-bottom: 12px;
        overflow: hidden;
        border: 1px solid #f0c8cb;
    }
    .price-table tbody tr td { display: flex; align-items: baseline; gap: 10px; }
    .price-table tbody tr:first-child td,
    .price-table tbody tr td { border: 0; }
    .price-table tbody td:first-child {
        padding: 0 0 10px;
        margin-bottom: 10px;
        border-bottom: 1px solid #eee !important;
        text-align: left;
        font-size: 14px;
        line-height: 1.25;
        color: #000;
        background: #ffffff !important;
        display: block;
    }
    .price-table__note { font-size: 11px; color: #6b6b6b; }
    .price-table tbody td:nth-child(2),
    .price-table tbody td:nth-child(3),
    .price-table tbody td:nth-child(4) {
        padding: 7px 0;
        background: #ffffff !important;
        color: #000 !important;
        font-size: 13.5px;
        text-align: left;
        border-radius: 0;
    }
    .price-table tbody td:nth-child(2)::before { content: "Форма:"; }
    .price-table tbody td:nth-child(3)::before { content: "Стоимость:"; }
    .price-table tbody td:nth-child(4)::before { content: "Срок:"; }
    .price-table tbody td:nth-child(2)::before,
    .price-table tbody td:nth-child(3)::before,
    .price-table tbody td:nth-child(4)::before {
        flex-shrink: 0;
        min-width: 96px;
        color: #b3191e;
        font-weight: 400;
        text-transform: uppercase;
        font-size: 12px;
        letter-spacing: 0.02em;
    }
    .price-table tbody td:nth-child(3) { font-size: 16px; }
    .price-table tbody td:nth-child(3) { color: #000 !important; }
    .price-section__note { font-size: 12px; }
}
