* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    /* Цвета */
    --color-primary-dark-blue: #151C2A;
    --color-white: #FFFFFF;
    --color-dark-gray: #292932;
    --color-medium-gray: #999999;

    /* Типографика */
    --font-family-primary: 'ALS Story', ALS, Arial, sans-serif;
    --font-size-body: 16px;
    --font-size-body-small: 14px;
    --font-size-button: 18px;
    --font-weight-medium: 500;
    --font-weight-bold: 700;
    --line-height-relaxed: 1.5;

    /* Скругления */
    --border-radius-large: 30px;

    /* Переходы */
    --transition-normal: 0.2s ease-in-out;

    --t1-font-size: 16px;
}

body {
    font-family: 'ALS Story', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #151C2A;
    line-height: 1.5;
    overflow-x: hidden;
}

/* Text style for 16px text */
.t1 {
    font-size: var(--t1-font-size);
    font-weight: 400;
    line-height: 1.5;
}

/* Text style for 12px text */
.t2 {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.33;
    font-family: 'ALS Story', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #777777;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.hero {
    background: linear-gradient(180deg, rgba(32, 83, 153, 1) 0%, rgba(35, 111, 250, 1) 69%);
    min-height: 500px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-container {
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 400px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2;
    min-height: 500px;
}

.hero-artboard {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    width: 100%;
    min-height: 500px;
}

.hero-left {
    display: flex;
    flex-direction: column;
    z-index: 2;
    max-width: 433px;
}

.hero-logo {
    margin-bottom: 60px;
    z-index: 3;
}

.hero-logo img {
    width: 165px;
    height: 58.5px;
    display: block;
}

.hero-content {
    z-index: 2;
    text-align: left;
}

.hero-title {
    font-size: 48px;
    font-weight: 400;
    line-height: 1.2;
    color: #FFFFFF;
    margin-bottom: 15px;
    text-align: left;
}

.hero-title .no-break {
    white-space: nowrap;
}

.hero-image {
    position: relative;
    z-index: 1;
    align-self: flex-start;
}

.hero-image img {
    width: 792.87px;
    height: auto;
    max-width: 100%;
}

.hero-image-desktop {
    display: block;
}

.hero-image-mobile {
    display: none;
}

/* Buttons */
.b {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.2;
    font-family: 'ALS Story', sans-serif;
}

/* Button text style */
.btn-text {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.2;
    font-family: 'ALS Story', sans-serif;
}

.btn {
    display: inline-block;
    padding: 19.5px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.2;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease, opacity 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
    font-family: 'ALS Story', sans-serif;
    -webkit-tap-highlight-color: transparent;
    pointer-events: auto;
}

.btn-primary {
    background: #FFFFFF;
    color: #151C2A;
    width: 343px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 19.5px 30px;
}

.btn-primary:hover {
    background-color: #FA0853;
    color: #FFFFFF;
}

.btn-gradient {
    background: #FA0853;
    color: #FFFFFF;
    padding: 20.5px 15px;
    border-radius: 45px;
    min-width: 329px;
    height: 54px;
    position: relative;
    overflow: hidden;
    transition: color 0.3s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 0;
}

.btn-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(0deg, rgba(175, 72, 255, 1) 0%, rgba(122, 143, 255, 1) 100%);
    border-radius: 45px;
    transition: opacity 0.3s ease;
    opacity: 1;
    z-index: -1;
    pointer-events: none;
}

.btn-gradient:hover::before {
    opacity: 0;
}

.btn-submit {
    background: #FFFFFF;
    color: #000000;
    padding: 20.5px 15px;
    border-radius: 45px;
    width: 250px;
    height: 60px;
    opacity: 0.5;
    font-size: var(--t1-font-size);
    transition: background-color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
}

.btn-submit:hover {
    background-color: #FA0853;
    color: #FFFFFF;
    opacity: 1;
}

.btn-submit-active {
    background-color: #FA0853 !important;
    color: #FFFFFF !important;
    opacity: 1 !important;
}

.btn-submit-active:hover {
    background-color: #FA0853;
    color: #FFFFFF;
    opacity: 1;
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Why Section */
.why-section {
    padding: 64px 0 80px;
    background: #FFFFFF;
    position: relative;
}

.section-title {
    font-size: 32px;
    font-weight: 400;
    line-height: 1.2;
    color: #000000;
    text-align: center;
    margin-bottom: 84px;
}

.why-section .container {
    position: relative;
}

.why-grid {
    display: grid;
    grid-template-columns: 396px 396px 396px;
    gap: 12px;
    column-gap: 12px;
    justify-content: center;
    align-items: stretch;
    margin-bottom: 32px;
    position: relative;
    z-index: 2;
}

.why-column-left {
    display: grid;
    grid-template-rows: auto;
    gap: 12px;
    width: 396px;
    min-width: 396px;
    align-items: start;
}

.why-column-right {
    display: grid;
    gap: 12px;
    width: 396px;
    min-width: 396px;
    align-items: start;
}

.why-column-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    width: 396px;
    min-width: 396px;
    padding-top: 20px;
    position: relative;
}

.why-card {
    background: #FFFFFF;
    border-radius: 32px;
    padding: 30px 45px;
    padding-bottom: 30px;
    box-shadow: 0px 2px 16px 0px rgba(0, 0, 0, 0.06);
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.why-column-right > .why-card:first-child {
    padding-bottom: 30px !important;
    height: auto !important;
    align-self: start;
}

.why-column-left > .why-card:last-child {
    height: auto !important;
    padding-bottom: 15px !important;
}

/* Переопределяется в медиа-запросе для десктопа */

.why-card h3 {
    font-size: 20px;
    font-weight: 400;
    line-height: 1.2;
    color: #000000;
    margin-bottom: 10px;
}

.why-card p {
    font-size: var(--t1-font-size);
    font-weight: 400;
    line-height: 1.5;
    font-family: 'ALS Story', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #151C2A;
    margin-bottom: 10px;
    flex-grow: 0;
}

.why-card p:last-of-type {
    margin-bottom: 0;
}

.why-column-right .why-card:first-child p:last-of-type {
    margin-bottom: 0;
}

.why-card .note {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.33;
    font-family: 'ALS Story', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #777777;
    display: block;
    margin-top: 10px;
    margin-bottom: 0;
}

.why-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 32px;
}

.why-image-mobile-before {
    display: none;
}

.why-image img {
    width: 384px;
    height: auto;
    border-radius: 32px;
    display: block;
}

.why-cta {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Скрываем новую структуру на мобильных и планшетах */
.why-layout {
    display: none;
}

/* Скрываем desktop-only элементы на мобильных и планшетах */
.desktop-only {
    display: none;
}

/* Скрываем tablet-only элементы по умолчанию */
.tablet-only {
    display: none;
}

/* На десктопе кнопка в центре */
@media (min-width: 1201px) {
    .why-section .container {
        position: relative;
    }

    /* Скрываем старую структуру на десктопе */
    .why-grid {
        display: none;
    }

    .why-section > .container > .why-cta {
        display: none;
    }

    /* Показываем новую структуру */
    .why-layout {
        display: grid;
        grid-template-columns: 396px 396px 396px;
        gap: 12px;
        margin-bottom: 80px;
        justify-content: center;
    }

    /* Три колонки с flex-column и gap:12px */
    .why-left,
    .why-center,
    .why-right {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    /* Скрываем мобильное изображение на десктопе */
    .why-image-mobile-before {
        display: none;
    }

    /* Центральная колонка - изображение и CTA */
    .why-center .why-image {
        margin-bottom: 0;
    }

    .why-center .why-cta {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
    }

    /* Показываем desktop-only элементы на десктопе */
    .desktop-only {
        display: inline;
    }
}

/* Form Section */
.form-section {
    background: linear-gradient(3deg, rgba(35, 111, 250, 1) 0%, rgba(32, 83, 153, 1) 100%);
    padding: 64px 0 80px;
    color: #FFFFFF;
    min-height: 475px;
}

.form-title {
    font-size: 32px;
    font-weight: 400;
    line-height: 1.2;
    color: #FFFFFF;
    text-align: center;
    margin-bottom: 100px;
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.contact-form {
    max-width: 1117px;
    margin: 0 auto;
    padding: 0 20px;
}

.form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

/* На десктопе все элементы формы в один ряд */
@media (min-width: 1201px) {
    .contact-form {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr auto;
        gap: 10px;
    }

    .form-row {
        display: contents;
        margin-bottom: 0;
    }

    .form-consent {
        grid-column: 1 / -1;
    }

    .btn-submit {
        width: 200px;
    }
}

/* На планшете форма вертикальная */
@media (min-width: 769px) and (max-width: 1200px) {
    .contact-form {
        display: block;
        max-width: 600px;
        margin: 0 auto;
    }

    .form-row {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 10px;
    }

    .form-group {
        width: 100%;
        max-width: 100%;
    }

    .form-group input {
        max-width: 100%;
    }

    .phone-group {
        max-width: 100%;
    }

    .btn-submit {
        width: 200px;
        max-width: 200px;
        margin: 0 auto;
    }
}

.form-group {
    flex: 1;
    min-width: 250px;
}

.form-group input {
    width: 100%;
    padding: 19.5px 20px;
    border-radius: 45px;
    border: none;
    background: #FFFFFF;
    font-size: var(--t1-font-size);
    font-family: 'Onest', sans-serif;
    color: #151C2A;
    opacity: 1;
}

.form-group input::placeholder {
    color: #6B6B6B;
    opacity: 0.5;
}

.form-group input:focus {
    outline: none;
    opacity: 1;
}

.form-group input:focus::placeholder {
    opacity: 0;
}

.form-group input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #F5F5F5;
}

.phone-group {
    display: flex;
    align-items: center;
    background: #FFFFFF;
    border-radius: 45px;
    padding: 0 20px 0 10px;
    gap: 10px;
    flex: 1;
    min-width: 250px;
    position: relative;
}

.phone-input {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 5px;
}

.phone-input__prefix {
    display: flex;
    align-items: center;
    gap: 5px;
    padding-right: 5px;
    border-right: 1px solid #E5E5E5;
    color: #6B6B6B;
    cursor: pointer;
    position: relative;
    user-select: none;
    z-index: 10;
}

.phone-input__arrow {
    width: 8px;
    height: 5px;
    transition: transform 0.2s ease;
}

.phone-input__prefix.active .phone-input__arrow {
    transform: rotate(180deg);
}

.phone-input__code {
    font-size: var(--t1-font-size);
    font-family: 'Onest', sans-serif;
    color: #6B6B6B;
}

.phone-input__prefix:hover .phone-input__code {
    color: #151C2A;
}

.phone-input__input {
    flex: 1;
    border: none;
    padding: 19.36px 0;
    background: transparent;
    font-size: var(--t1-font-size);
    font-family: 'Onest', sans-serif;
    color: #151C2A;
    opacity: 1;
    outline: none;
    caret-color: #6B6B6B;
}

.phone-input__input:focus {
    opacity: 1;
    outline: none;
    border: none;
    box-shadow: none;
}

.phone-input__input:focus::placeholder {
    opacity: 0;
}

.phone-input__input::placeholder {
    color: #6B6B6B;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.phone-input__input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.phone-group:has(.phone-input__input:disabled) {
    background: #F5F5F5;
}

/* Country Dropdown */
.country-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    left: -10px;
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0px 4px 30px rgba(0, 0, 0, 0.15);
    width: 280px;
    max-height: 350px;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    overflow: hidden;
    pointer-events: none;
    display: block;
}

.country-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}


.country-dropdown__search {
    padding: 12px;
    border-bottom: 1px solid #E5E5E5;
}

.country-dropdown__search-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    border: 1px solid #E5E5E5;
    border-radius: 10px;
    background: #F5F5F5;
    color: #151C2A;
    outline: none;
    transition: border-color 0.2s ease;
}

.country-dropdown__search-input:focus {
    border-color: #7FACFF;
}

.country-dropdown__search-input::placeholder {
    color: #999999;
}

.country-dropdown__list {
    max-height: 280px;
    overflow-y: auto;
    padding: 8px 0;
}

.country-dropdown__list::-webkit-scrollbar {
    width: 6px;
}

.country-dropdown__list::-webkit-scrollbar-track {
    background: #F5F5F5;
}

.country-dropdown__list::-webkit-scrollbar-thumb {
    background: #CCCCCC;
    border-radius: 3px;
}

.country-dropdown__list::-webkit-scrollbar-thumb:hover {
    background: #AAAAAA;
}

.country-dropdown__item {
    padding: 10px 16px;
    font-size: 14px;
    color: #151C2A;
    cursor: pointer;
    transition: background-color 0.15s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.country-dropdown__item:hover {
    background-color: #F5F5F5;
}

.country-dropdown__item.selected {
    background: linear-gradient(0deg, rgba(127, 172, 255, 0.15) 0%, rgba(161, 127, 255, 0.15) 100%);
    color: #7FACFF;
}

.country-dropdown__item.hidden {
    display: none;
}

.form-consent {
    margin-top: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.consent-text {
    font-size: var(--t1-font-size);
    font-weight: 400;
    line-height: 1.5;
    font-family: 'ALS Story', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #FFFFFF;
    margin-bottom: 5px;
}

/* Checkboxes */
.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    padding: 4px 0;
    margin-bottom: 4px;
    position: relative;
}

.checkbox__input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.checkbox__mark {
    width: 13px;
    height: 13px;
    border: 1px solid #FFFFFF;
    border-radius: 2px;
    background: #FFFFFF;
    flex-shrink: 0;
    margin-top: 4px;
    position: relative;
}

.checkbox__input:checked + .checkbox__mark {
    background: linear-gradient(0deg, rgba(127, 172, 255, 1) 0%, rgba(161, 127, 255, 1) 100%);
    border-color: transparent;
}

.checkbox__input:checked + .checkbox__mark::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 1px;
    width: 5px;
    height: 8px;
    border: solid #FFFFFF;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox__text {
    font-size: var(--t1-font-size);
    line-height: 1.5;
    color: #FFFFFF;
    opacity: 0.75;
}

.checkbox:last-child {
    margin-bottom: 0;
}

.checkbox__link {
    color: #FFFFFF;
    text-decoration: underline;
    transition: color 0.2s ease-in-out;
}

.checkbox__link:hover {
    color: #FA0853;
}

.contact-form .checkbox__input:disabled + .checkbox__mark {
    opacity: 0.6;
}

.contact-form .checkbox:has(.checkbox__input:disabled) {
    cursor: not-allowed;
    opacity: 0.85;
}

.contact-form .checkbox__input:disabled ~ .checkbox__text,
.contact-form .checkbox__input:disabled ~ .checkbox__text .checkbox__link {
    pointer-events: none;
}

/* Checkbox Warning */
.checkbox-warning {
    margin-top: 12px;
    padding: 12px 16px;
    background: rgba(250, 8, 83, 0.1);
    border-left: 3px solid #FA0853;
    border-radius: 8px;
    animation: slideDown 0.3s ease;
    display: none;
}

.checkbox-warning__text {
    font-size: 14px;
    line-height: 1.5;
    color: #FA0853;
    margin: 0;
    font-family: 'ALS Story', sans-serif;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tests Section */
.tests-section {
    padding: 64px 0 80px;
    background: #FFFFFF;
    min-height: 1875px;
}

.tests-section .section-title {
    margin-bottom: 40px;
}

.tests-grid {
    display: grid;
    grid-template-columns: repeat(2, 550px);
    gap: 12px;
    justify-content: center;
    margin-bottom: 32px;
    position: relative;
}

.test-card {
    background: #FFFFFF;
    border-radius: 32px;
    padding: 45px;
    /* Фиксируем оригинальные соотношения картинок - cover сохраняет пропорции */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 454px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    /* Предотвращаем деформацию изображения */
    overflow: hidden;
}

.test-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: inherit;
    background-image: inherit;
    /* Сохраняем пропорции изображения без деформации */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 32px;
    z-index: 0;
}

.test-card h3,
.test-card p {
    position: relative;
    z-index: 1;
}

.test-card h3 {
    font-size: 20px;
    font-weight: 400;
    line-height: 1.2;
    color: #000000;
    margin-bottom: 15px;
    max-width: 500px;
}

.test-card p {
    font-size: var(--t1-font-size);
    font-weight: 400;
    line-height: 1.5;
    font-family: 'ALS Story', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #151C2A;
    max-width: 500px;
}

.test-card-dark::before {
    background-color: transparent !important;
}

.test-card-dark::after {
    display: none;
}

.test-card-dark h3,
.test-card-dark p {
    color: #FFFFFF;
}

/* Specific positioning for test cards to match design - только для десктопа */
@media (min-width: 1201px) {
    .test-card:nth-child(1) {
        grid-column: 2;
        grid-row: 1 / 2;
        min-height: 566px;
    }

    .test-card:nth-child(2) {
        grid-column: 1;
        grid-row: 2 / 3;
        min-height: 474px;
    }

    .test-card:nth-child(3) {
        grid-column: 2;
        grid-row: 2 / 3;
        min-height: 454px;
    }

    .test-card:nth-child(4) {
        grid-column: 2;
        grid-row: 3 / 4;
        min-height: 473px;
    }

    .test-card:nth-child(5) {
        grid-column: 1;
        grid-row: 1 / 2;
        min-height: 509px;
    }

    .test-card:nth-child(6) {
        grid-column: 1;
        grid-row: 3 / 4;
        min-height: 509px;
    }
}

.tests-cta {
    text-align: center;
    margin-top: 32px;
}

/* Footer */
.footer {
    background: #FFFFFF;
    color: #151C2A;
    padding: 60px 30px 40px 30px;
    border-top: 1px solid rgba(21, 28, 42, 0.1);
}

.footer .container {
    max-width: 100%;
    padding: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column {
    min-width: 0;
}

.footer-column-title-link {
    font-size: 24px;
    font-weight: 400;
    color: #000000;
    margin: 0 0 24px 0;
    font-family: 'ALS Story', sans-serif;
    text-decoration: none;
    display: block;
    transition: color 0.2s ease-in-out;
}

.footer-column-title-link:hover {
    color: #BD995B;
}

.footer-offices {
    margin-bottom: 24px;
}

.footer-offices-title {
    font-size: 24px;
    font-weight: 400;
    color: #000000;
    margin: 0 0 16px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'ALS Story', sans-serif;
}

.footer-office {
    margin-bottom: 24px;
}

.footer-office:last-child {
    margin-bottom: 0;
}

.footer-office-address {
    font-size: var(--t1-font-size);
    font-weight: 700;
    color: #000000;
    margin: 0 0 8px 0;
    font-family: 'ALS Story', sans-serif;
}

.footer-office-text {
    font-size: var(--t1-font-size);
    line-height: 1.5;
    color: #000000;
    margin: 0 0 4px 0;
    font-family: 'ALS Story', sans-serif;
}

.footer-links-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.footer-links-list li {
    margin-bottom: 12px;
}

.footer-links-list li:last-child {
    margin-bottom: 0;
}

.footer-link {
    font-size: var(--t1-font-size);
    line-height: 1.5;
    color: #BD995B;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
    display: inline-block;
    font-family: 'ALS Story', sans-serif;
}

.footer-link:hover {
    color: #FA0853;
}

.footer-subsection {
    margin-top: 24px;
}

.footer-interpretation-link {
    font-size: 24px;
    font-weight: 400;
    color: #000000;
    text-decoration: none;
    font-family: 'ALS Story', sans-serif;
    transition: color 0.2s ease-in-out;
}

.footer-interpretation-link:hover {
    color: #BD995B;
}

.footer-copyright {
    margin-top: 24px;
}

.footer-copyright-text {
    font-size: 24px;
    color: #000000;
    margin: 0 0 8px 0;
    font-family: 'ALS Story', sans-serif;
}

.footer-service-text {
    font-size: 24px;
    line-height: 1.5;
    color: #000000;
    margin: 0;
    font-family: 'ALS Story', sans-serif;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 40px;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-legal-link {
    font-size: var(--t1-font-size);
    color: #000000;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
    font-family: 'ALS Story', sans-serif;
}

.footer-legal-link:hover {
    color: #FA0853;
}

.footer-social {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-social-text {
    font-size: var(--t1-font-size);
    color: #000000;
    margin: 0;
    font-family: 'ALS Story', sans-serif;
}

.footer-social-icons {
    display: flex;
    gap: 5px;
}

.footer-social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #BD995B;
    transition: opacity 0.2s ease-in-out;
    text-decoration: none;
    border-radius: 8px;
}

.footer-social-icon:hover {
    opacity: 0.8;
}

.footer-social-icon img {
    width: 40px;
    height: 40px;
}

/* Responsive */
/* Desktop and Tablet - единая плавная логика без скачков (min-width: 769px) */

/* Плавный адаптив для десктопа и планшета - все изменения применяются плавно */
@media (min-width: 769px) {
    /* Плавное уменьшение padding для hero-container от 400px до 80px */
    .hero-container {
        padding-left: clamp(80px, calc(400px - (1920px - 100vw) * 0.28), 400px);
        padding-right: clamp(80px, calc(400px - (1920px - 100vw) * 0.28), 400px);
    }

    /* Плавное уменьшение размера изображения от 792px до 550px */
    .hero-image img {
        width: clamp(550px, calc(792px - (1920px - 100vw) * 0.21), 792px);
        max-width: clamp(550px, calc(792px - (1920px - 100vw) * 0.21), 792px);
    }
}

/* Фиксация правого края изображения для диапазона 769-1140px */
@media (min-width: 769px) and (max-width: 1140px) {
    .hero-container {
        padding-right: 182px; /* Фиксированное значение как на 1140px */
    }

    .hero-image {
        margin-left: auto;
        flex-shrink: 0;
    }
}

/* Адаптация сеток для средних экранов (десктоп и планшет) */
@media (min-width: 769px) and (max-width: 1400px) {
    .why-grid {
        grid-template-columns: 396px 396px 396px;
    }

    .tests-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 1200px;
        margin: 0 auto 32px;
    }

    /* Стили для блока "Личный и значимый" на десктопе */
    .why-column-left > .why-card:last-child p {
        margin: 0;
        line-height: 1.5;
    }

    /* Расстояние от заголовка до контента на десктопе */
    .why-section .section-title {
        margin-bottom: 24px;
    }

    /* Расстояние от заголовка формы до контента на десктопе */
    .form-title {
        margin-bottom: 40px;
    }
}

/* Диапазон 1201-1400px - padding-bottom для карточки "Личный и значимый" */
@media (min-width: 1201px) and (max-width: 1400px) {
    .why-layout {
        align-items: end;
    }

    .why-left > .why-card:last-child {
        padding-bottom: 35px !important;
    }

    .why-right > .why-card:last-child {
        padding-bottom: 35px !important;
    }

    /* Ограничение текста на блоках 4-го экрана до 180px от правого края */
    .test-card {
        padding-right: 180px;
    }

    /* Убираем ограничение max-width для текста на десктопе */
    .test-card h3,
    .test-card p {
        max-width: none;
    }
}

/* Десктоп - гарантируем расстояние 12px между блоками */
@media (min-width: 1401px) {
    .why-layout {
        row-gap: 12px;
        align-items: end;
    }

    /* Стили для блока "Личный и значимый" на десктопе - увеличиваем padding-bottom для выравнивания с кнопкой */
    .why-section .why-left > .why-card:last-child {
        padding-bottom: 35px !important;
        height: auto !important;
    }

    .why-section .why-left > .why-card:last-child p {
        margin: 0;
        line-height: 1.5;
    }

    /* Выравниваем последнюю карточку в правой колонке с кнопкой */
    .why-section .why-right > .why-card:last-child {
        padding-bottom: 35px !important;
        height: auto !important;
    }

    /* Расстояние от заголовка до контента на десктопе */
    .why-section .section-title {
        margin-bottom: 24px;
    }

    /* Расстояние от заголовка формы до контента на десктопе */
    .form-title {
        margin-bottom: 40px;
    }

    /* Ограничение текста на блоках 4-го экрана до 180px от правого края */
    .test-card {
        padding-right: 180px;
    }

    /* Убираем ограничение max-width для текста на десктопе */
    .test-card h3,
    .test-card p {
        max-width: none;
    }
}

/* Изменения для планшетов (десктоп и планшет) */
@media (min-width: 769px) and (max-width: 1200px) {
    /* Показываем tablet-only элементы на планшете */
    .tablet-only {
        display: inline;
    }

    .why-section {
        padding-bottom: 64px;
    }

    /* Перестройка why-grid на 2 колонки для планшета - используем flexbox для колонок */
    .why-grid {
        display: flex;
        gap: 12px;
        align-items: flex-start;
        max-width: 700px; /* Уменьшено для более узкого контента */
        margin: 0 auto;
    }

    /* Две колонки с flexbox - уменьшенный размер для планшета */
    .why-column-left,
    .why-column-right {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 344px;
        min-width: 344px;
        flex: 0 0 344px;
    }

    /* Карточки с уменьшенной шириной для планшета */
    .why-card {
        height: auto;
        width: 344px;
        min-width: 344px;
    }

    /* Изображение в правой колонке - уменьшенный размер */
    .why-image {
        width: 344px;
        min-width: 344px;
        margin-bottom: 0;
    }

    .why-image img {
        width: 332px;
        height: auto;
        display: block;
    }

    /* Кнопка вне колонок на планшете */
    .why-cta {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        text-align: center;
        margin-top: 32px;
        margin-bottom: 0;
    }

    /* Увеличить padding-bottom для карточки "Универсальный и уместный" на планшете */
    .why-column-left > .why-card:last-child:not(.why-card-universal) {
        padding-bottom: 30px !important;
    }

    /* Padding-bottom для блока "Универсальный и уместный" на планшете */
    .why-card-profitable {
        padding-bottom: 30px !important;
    }

    /* Padding-bottom для блока "Выгодный" на планшете */
    .why-column-left > .why-card.why-card-universal,
    .why-column-left > .why-card:last-child.why-card-universal,
    .why-column-right > .why-card.why-card-universal {
        padding-bottom: 70px !important;
    }

    .test-card:nth-child(n) {
        grid-column: auto;
        grid-row: auto;
        height: auto;
    }

    /* Изменяем порядок карточек для планшетов */
    .tests-grid {
        display: flex;
        flex-direction: column;
    }

    .test-card:nth-child(1) {
        order: 2; /* Полный геном - второй */
    }

    .test-card:nth-child(2) {
        order: 5; /* Питание - пятый */
    }

    .test-card:nth-child(3) {
        order: 6; /* Спорт - шестой */
    }

    .test-card:nth-child(4) {
        order: 4; /* Риски здоровья - четвертый */
    }

    .test-card:nth-child(5) {
        order: 1; /* Генетический паспорт - первый */
    }

    .test-card:nth-child(6) {
        order: 3; /* Происхождение - третий */
    }

    /* Фиксируем размеры блоков на планшете - фиксированная ширина, не привязанная к краям экрана */
    .tests-grid {
        max-width: none;
        margin: 0 auto;
        width: auto;
        align-items: center;
    }

    .test-card {
        width: 550px;
        max-width: 550px;
        min-height: auto;
        height: auto;
        margin: 0 auto;
        /* cover сохраняет пропорции изображения, масштабируя его для заполнения контейнера */
        background-size: cover !important;
        background-position: center top !important;
        background-repeat: no-repeat !important;
    }

    .test-card::before {
        /* Сохраняем пропорции без деформации, позиционируем сверху чтобы не обрезалось снизу */
        background-size: cover !important;
        background-position: center top !important;
        background-repeat: no-repeat !important;
    }

    /* Корректировка позиционирования для карточки "Полный геном" на планшете */
    .test-card-full-genome {
        background-position: right top !important;
    }

    .test-card-full-genome::before {
        background-position: right top !important;
    }

    /* Увеличение размера изображения для карточки "Питание" на планшете */
    .test-card-nutrition {
        background-size: 120% !important;
        background-position: right top !important;
    }

    .test-card-nutrition::before {
        background-size: 120% !important;
        background-position: right top !important;
    }

    /* Стили текста для планшета - увеличенные размеры для большего видимого контента */
    .test-card {
        padding-top: 60px;
        padding-bottom: 60px;
        padding-left: 45px;
        padding-right: 45px;
    }

    .test-card h3 {
        font-size: 20px;
        line-height: 1.2;
        margin-bottom: 15px;
        max-width: 300px;
    }

    .test-card p {
        font-size: var(--t1-font-size);
        line-height: 1.7;
        max-width: 300px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 768px) {
    :root {
        --t1-font-size: 14px;
    }

    .t1 {
        font-size: var(--t1-font-size);
        line-height: 1.4;
    }

    .t2 {
        font-size: 10px;
    }

    .btn-text {
        font-size: 12px;
    }

    .hero {
        min-height: 320px;
        align-items: flex-start;
    }

    .hero-container {
        padding: 0;
        margin: 0;
        max-width: 100%;
        flex-direction: column;
        min-height: 320px;
        position: relative;
        width: 100%;
        justify-content: flex-start;
        align-items: flex-start;
    }

    /* Артборд 390px (как в Tilda) */
    .hero-artboard {
        width: 390px;
        max-width: 390px;
        height: 320px;
        min-height: 320px;
        margin: 0 auto;
        display: block;
        position: relative;
    }

    .hero-left {
        max-width: 100%;
        width: 100%;
        padding: 52px 0 0 36px;
        position: relative;
        z-index: 2;
        align-self: flex-start;
    }

    .hero-logo {
        margin-bottom: 0;
    }

    .hero-logo img {
        width: 94.49px;
        height: auto;
    }

    .hero-content {
        text-align: left;
        margin-top: 0;
        padding-top: 51px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-image {
        position: absolute;
        top: -55px;
        left: 50%;
        right: auto;
        margin-top: 0;
        align-self: auto;
        z-index: 1;
        width: 1040px;
        height: auto;
        transform: translateX(-360px) scale(1.08);
        pointer-events: none;
    }

    .hero-image-desktop {
        display: none;
    }

    .hero-image-mobile {
        display: block;
        width: 100%;
        height: auto;
        max-width: none;
        object-fit: contain;
    }

    .hero-title {
        font-size: 32px;
        line-height: 1.2;
        margin-bottom: 0;
        width: 276px;
    }

    .btn-primary {
        width: auto;
        min-width: 200px;
        height: 38px;
        font-size: 12px;
        padding: 0 40px;
        margin-top: 12px;
        line-height: 1.33;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .btn-primary:hover {
        background-color: #FA0853;
        color: #FFFFFF;
    }

    .btn-gradient:hover {
        background: #FA0853;
        color: #FFFFFF;
    }

    .btn-submit:hover {
        background-color: #FA0853;
        color: #FFFFFF;
        opacity: 1;
    }

    .hero .btn-primary {
        width: auto;
        min-width: 200px;
        align-self: flex-start;
        margin-left: 0;
        margin-right: auto;
    }

    .hero .btn-primary .b {
        font-size: 12px;
        line-height: 1.33;
    }

    .section-title,
    .form-title {
        font-size: 20px;
        margin-bottom: 40px;
    }

    .why-section .section-title {
        margin-bottom: 24px;
    }

    .why-section {
        padding-bottom: 40px;
    }

    .why-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .why-column-left,
    .why-column-right {
        display: contents;
    }

    .why-card {
        max-width: 384px;
        width: 100%;
        margin: 0 auto;
    }

    /* Переопределяем правило для последнего ребенка для карточки universal */
    .why-column-left > .why-card:last-child.why-card-universal {
        padding: 30px 45px !important;
        padding-bottom: 30px !important;
    }

    .why-card.why-card-universal {
        padding: 30px 45px !important;
        padding-bottom: 30px !important;
    }

    .why-card h3 {
        font-size: 16px;
    }

    /* Убираем принудительные переносы в заголовках на мобиле */
    .why-card-easy h3 br,
    .why-card-profitable h3 br {
        display: none;
    }

    .why-image {
        display: none;
    }

    .why-image-mobile-before {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 384px;
        margin: 0 auto 12px;
    }

    .why-image-mobile-before img {
        width: 100%;
        max-width: 384px;
        height: auto;
        border-radius: 32px;
        display: block;
    }

    .why-cta {
        max-width: 384px;
        width: 100%;
        margin: 20px auto 0;
        order: 999;
    }

    .why-cta .btn-gradient {
        width: 100%;
        max-width: 100%;
        min-width: auto;
    }

    .tests-section {
        padding-top: 48px;
        padding-bottom: 80px;
        min-height: auto;
    }

    .tests-cta {
        width: 492px;
        max-width: min(492px, calc(100vw - 40px));
        margin: 32px auto 0;
    }

    .tests-cta .btn-gradient {
        width: 100%;
        max-width: 100%;
        min-width: auto;
    }

    .tests-grid {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
        gap: 12px;
        /* Фиксированная ширина 492px - картинка не уменьшается */
        width: 492px;
        max-width: 492px;
        margin: 0 auto;
        box-sizing: border-box;
        /* Обрезаем контейнер, если он выходит за границы экрана */
        max-width: min(492px, calc(100vw - 40px));
        overflow: hidden;
    }

    .test-card:nth-child(n) {
        grid-column: auto;
        grid-row: auto;
        min-height: auto;
        margin: 0;
    }

    /* Изменяем порядок карточек для мобильных устройств */
    .test-card:nth-child(1) {
        order: 2; /* Полный геном - второй */
    }

    .test-card:nth-child(2) {
        order: 5; /* Питание - пятый */
    }

    .test-card:nth-child(3) {
        order: 6; /* Спорт - шестой */
    }

    .test-card:nth-child(4) {
        order: 4; /* Риски здоровья - четвертый */
    }

    .test-card:nth-child(5) {
        order: 1; /* Генетический паспорт - первый */
    }

    .test-card:nth-child(6) {
        order: 3; /* Происхождение - третий */
    }

    .test-card {
        /* Фиксированная ширина 492px - картинка не уменьшается */
        width: 492px;
        max-width: 492px;
        min-height: auto;
        height: auto;
        /* На мобиле: по ширине в карточку (края касаются), без сильного кропа */
        background-size: 100% auto !important;
        background-position: center top !important;
        background-repeat: no-repeat !important;
        overflow: hidden;
        /* Убираем padding, чтобы границы блока совпадали с границами изображения */
        padding: 0;
        box-sizing: border-box;
    }

    .test-card::before {
        /* То же для псевдо-элемента (он рисует фон) */
        background-size: 100% auto !important;
        background-position: center top !important;
        background-repeat: no-repeat !important;
    }

    .test-card h3 {
        /* Исходные размеры - масштабирование через transform на .test-card__scale */
        font-size: 16px;
        line-height: 1.2;
        margin-bottom: 12px;
        max-width: 280px;
    }

    .test-card p {
        /* Исходные размеры - масштабирование через transform на .test-card__scale */
        font-size: var(--t1-font-size);
        line-height: 20px;
        max-width: 280px;
    }

    /* Proportional scaling for DNA-test cards on mobile - картинка фиксирована, текст уменьшается */
    .test-card-full-genome,
    .test-card-nutrition,
    .test-card-sport,
    .test-card-health-risks,
    .test-card-genetic-passport,
    .test-card-origin {
        /* Фиксированная ширина 492px - картинка не уменьшается */
        width: 492px;
        max-width: 492px;
        /* Center the card */
        margin-left: auto;
        margin-right: auto;
        margin-top: 0;
        margin-bottom: 0;
        /* Ensure borders match image borders exactly */
        overflow: hidden;
        border-radius: 32px;
        box-sizing: border-box;
    }

    /* Make background image match card borders exactly - no padding, image fills entire card */
    .test-card-full-genome::before,
    .test-card-nutrition::before,
    .test-card-sport::before,
    .test-card-health-risks::before,
    .test-card-genetic-passport::before,
    .test-card-origin::before {
        /* На мобиле: по ширине в карточку (края касаются), без сильного кропа */
        background-size: 100% auto !important;
        background-position: center -20px !important;
        border-radius: 32px;
        /* Ensure pseudo-element covers entire card */
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }

    /* Поднимаем ещё выше отдельные карточки на 4 экране (мобила) */
    .test-card-nutrition::before,
    .test-card-sport::before,
    .test-card-genetic-passport::before,
    .test-card-origin::before {
        background-position: center -40px !important;
    }

    /* Ensure wrapper maintains proper flow and positioning */
    .test-card__scale {
        width: 100%;
        height: 100%;
        position: relative;
        z-index: 1;
        /* Внутренние отступы (по краям 45px на мобиле) */
        padding: 30px 45px;
        box-sizing: border-box;
        /* Масштабируем только внутренний контент (текст и padding), картинка остается фиксированной */
        transform: scale(min(1, calc((100vw - 40px) / 492)));
        transform-origin: top left;
    }

    /* Proportional scaling of entire tests-grid block for viewports < 532px */
    @media (max-width: 532px) {
        .tests-section {
            overflow-x: hidden;
        }

        .tests-scale {
            /* Height will be set by JavaScript based on scale factor */
            overflow: visible;
        }

        .tests-grid {
            /* Design width: 492px (current mobile card width - actual block width) */
            --design-width: 492px;
            /* Calculate scale factor based on viewport width */
            --scale: min(1, calc((100vw - 32px) / var(--design-width)));
            /* Keep original width - scaling will make it fit */
            width: 492px;
            max-width: 492px;
            /* Center the block and apply uniform scaling */
            position: relative;
            left: 50%;
            transform: translateX(-50%) scale(var(--scale));
            transform-origin: top center;
        }

        /* Button spacing - height is now handled by .tests-scale wrapper */
        .tests-cta {
            margin-top: 32px;
        }

        /* Remove individual card scaling when grid is scaled */
        .test-card__scale {
            transform: none;
        }
    }

    .contact-form {
        max-width: 450px;
        margin: 0 auto;
    }

    .form-row {
        flex-direction: column;
    }

    .form-group {
        max-width: 100%;
    }

    .form-group input {
        max-width: 100%;
    }

    .phone-group {
        max-width: 100%;
    }

    .btn-submit {
        width: 200px;
        max-width: 200px;
        margin: 0 auto;
    }

    .btn-gradient {
        width: 100%;
        min-width: auto;
    }

    .footer {
        padding: 40px 20px 30px 20px;
    }

    .footer .container {
        padding: 0 0 0 10px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding-top: 30px;
        padding-left: 10px;
    }

    .footer-social {
        width: 100%;
    }
}

/* Hero artboard scaling for narrow screens (< 390px) */
@media (max-width: 390px) {
    .hero {
        --hero-scale: calc(100vw / 390);
        min-height: calc(320px * var(--hero-scale));
    }

    .hero-container {
        min-height: calc(320px * var(--hero-scale));
        align-items: center;
    }

    .hero-artboard {
        margin-left: auto;
        margin-right: auto;
        left: auto;
        transform: scale(var(--hero-scale));
        transform-origin: top center;
    }
}

/* Success Popup */
.success-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.success-popup.show {
    opacity: 1;
    visibility: visible;
}

.success-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.success-popup-content {
    position: relative;
    background: #FFFFFF;
    border-radius: 32px;
    padding: 60px 80px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0px 4px 24px rgba(0, 0, 0, 0.15);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    z-index: 10001;
}

.success-popup.show .success-popup-content {
    transform: scale(1);
}

.success-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 32px;
    color: #151C2A;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.success-popup-close:hover {
    opacity: 1;
}

.success-popup-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #00CD00;
    color: #FFFFFF;
    font-size: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-weight: 700;
    line-height: 1;
}

.success-popup-title {
    font-size: 32px;
    font-weight: 400;
    color: #151C2A;
    margin-bottom: 16px;
    font-family: 'ALS Story', sans-serif;
}

.success-popup-text {
    font-size: 18px;
    line-height: 1.5;
    color: #151C2A;
    margin: 0;
    font-family: 'ALS Story', sans-serif;
}

@media (max-width: 768px) {
    .success-popup-content {
        padding: 40px 30px;
        max-width: 90%;
    }

    .success-popup-icon {
        width: 60px;
        height: 60px;
        font-size: 36px;
        margin-bottom: 20px;
    }

    .success-popup-title {
        font-size: 24px;
        margin-bottom: 12px;
    }

    .success-popup-text {
        font-size: 16px;
    }

    .success-popup-close {
        top: 15px;
        right: 15px;
        font-size: 28px;
        width: 28px;
        height: 28px;
    }
}

/* Error Popup */
.error-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.error-popup.active {
    opacity: 1;
    visibility: visible;
}

.error-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.error-popup-content {
    position: relative;
    background: var(--color-white);
    border-radius: 37px;
    padding: 50px 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    z-index: 1;
}

.error-popup.active .error-popup-content {
    transform: scale(1);
}

.error-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 32px;
    color: var(--color-medium-gray);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-normal);
}

.error-popup-close:hover {
    color: var(--color-primary-dark-blue);
}

.error-popup-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
}

.error-popup-title {
    font-size: 32px;
    font-weight: var(--font-weight-bold);
    color: var(--color-primary-dark-blue);
    margin: 0 0 20px 0;
    font-family: var(--font-family-primary);
}

.error-popup-text {
    font-size: var(--font-size-body);
    color: var(--color-dark-gray);
    line-height: var(--line-height-relaxed);
    margin: 0 0 30px 0;
    font-family: var(--font-family-primary);
}

.error-popup-button {
    background: linear-gradient(135deg, #7560FA 0%, #3F9AF1 100%);
    color: var(--color-white);
    font-family: var(--font-family-primary);
    font-size: var(--font-size-button);
    font-weight: var(--font-weight-medium);
    border-radius: var(--border-radius-large);
    padding: 15px 40px;
    border: none;
    cursor: pointer;
    transition: opacity var(--transition-normal);
    min-width: 200px;
}

.error-popup-button:hover {
    opacity: 0.9;
}

@media screen and (max-width: 767px) {
    .error-popup-content {
        padding: 40px 30px;
        max-width: 90%;
    }

    .error-popup-icon {
        width: 60px;
        height: 60px;
        font-size: 36px;
        margin-bottom: 20px;
    }

    .error-popup-title {
        font-size: 24px;
        margin-bottom: 15px;
    }

    .error-popup-text {
        font-size: var(--font-size-body-small);
        margin-bottom: 25px;
    }

    .error-popup-button {
        width: 100%;
        min-width: auto;
    }

    .error-popup-close {
        top: 15px;
        right: 15px;
        font-size: 28px;
        width: 28px;
        height: 28px;
    }
}

/* Form Section from ДМС 2 - Styles */
.form-section-dms2 {
    background: linear-gradient(3deg, rgba(255, 211, 162, 1) 0%, rgba(254, 216, 252, 1) 100%);
    padding: 80px 0;
}

.form-section-dms2 .form-section__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.form-section-dms2 .form-section__title {
    font-size: 32px;
    line-height: 1.2;
    text-align: center;
    max-width: 925px;
    padding: 12px 0;
    color: #151C2A;
}

.form-section-dms2 .form-section__content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 1117px;
}

.form-section-dms2 .contact-form {
    width: 100%;
}

.form-section-dms2 .contact-form__row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
}

.form-section-dms2 .contact-form__field {
    flex: 1;
    min-width: 200px;
}

.form-section-dms2 .contact-form__input {
    width: 100%;
    padding: 19.5px 20px;
    font-size: var(--t1-font-size);
    font-family: inherit;
    border: none;
    border-radius: 45px;
    background: #FFFFFF;
    color: #151C2A;
    outline: none;
    caret-color: #6B6B6B;
}

.form-section-dms2 .contact-form__input:focus {
    outline: none;
    border: none;
    box-shadow: none;
}

.form-section-dms2 .contact-form__input:focus::placeholder {
    opacity: 0;
}

.form-section-dms2 .contact-form__input::placeholder {
    color: #6B6B6B;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.form-section-dms2 .phone-input {
    display: flex;
    align-items: center;
    background: #FFFFFF;
    border-radius: 45px;
    padding: 0 20px;
}

.form-section-dms2 .phone-input__prefix {
    display: flex;
    align-items: center;
    gap: 5px;
    padding-right: 10px;
    border-right: 1px solid #E5E5E5;
    color: #6B6B6B;
    cursor: pointer;
    position: relative;
    user-select: none;
}

.form-section-dms2 .phone-input__arrow {
    width: 6px;
    height: 4px;
    transition: transform 0.2s ease;
}

.form-section-dms2 .phone-input__prefix.active .phone-input__arrow {
    transform: scaleY(-1);
}

.form-section-dms2 .phone-input__input {
    flex: 1;
    padding: 19.36px 10px;
    font-size: var(--t1-font-size);
    font-family: inherit;
    border: none;
    background: transparent;
    color: #151C2A;
    outline: none;
    caret-color: #6B6B6B;
}

.form-section-dms2 .phone-input__input:focus {
    outline: none;
    border: none;
    box-shadow: none;
}

.form-section-dms2 .phone-input__input:focus::placeholder {
    opacity: 0;
}

.form-section-dms2 .phone-input__input::placeholder {
    color: #6B6B6B;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.form-section-dms2 .phone-input:focus-within {
    outline: none;
    box-shadow: none;
}

.form-section-dms2 .phone-input__code {
    font-size: var(--t1-font-size);
    color: #6B6B6B;
}

.form-section-dms2 .phone-input__prefix:hover .phone-input__code {
    color: #151C2A;
}

.form-section-dms2 .country-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    left: -20px;
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0px 4px 30px rgba(0, 0, 0, 0.15);
    width: 280px;
    max-height: 350px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    overflow: hidden;
}

.form-section-dms2 .country-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.form-section-dms2 .country-dropdown__search {
    padding: 12px;
    border-bottom: 1px solid #E5E5E5;
}

.form-section-dms2 .country-dropdown__search-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    border: 1px solid #E5E5E5;
    border-radius: 10px;
    background: #F5F5F5;
    color: #151C2A;
    outline: none;
    transition: border-color 0.2s ease;
}

.form-section-dms2 .country-dropdown__search-input:focus {
    border-color: #7FACFF;
}

.form-section-dms2 .country-dropdown__search-input::placeholder {
    color: #999999;
}

.form-section-dms2 .country-dropdown__list {
    max-height: 280px;
    overflow-y: auto;
    padding: 8px 0;
}

.form-section-dms2 .country-dropdown__list::-webkit-scrollbar {
    width: 6px;
}

.form-section-dms2 .country-dropdown__list::-webkit-scrollbar-track {
    background: #F5F5F5;
}

.form-section-dms2 .country-dropdown__list::-webkit-scrollbar-thumb {
    background: #CCCCCC;
    border-radius: 3px;
}

.form-section-dms2 .country-dropdown__list::-webkit-scrollbar-thumb:hover {
    background: #AAAAAA;
}

.form-section-dms2 .country-dropdown__item {
    padding: 10px 16px;
    font-size: 14px;
    color: #151C2A;
    cursor: pointer;
    transition: background-color 0.15s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.form-section-dms2 .country-dropdown__item:hover {
    background-color: #F5F5F5;
}

.form-section-dms2 .country-dropdown__item.selected {
    background: linear-gradient(0deg, rgba(127, 172, 255, 0.15) 0%, rgba(161, 127, 255, 0.15) 100%);
    color: #7FACFF;
}

.form-section-dms2 .country-dropdown__item.hidden {
    display: none;
}

.form-section-dms2 .form-section__agreements {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-section-dms2 .form-section__notice {
    font-size: var(--t1-font-size);
    line-height: 1.5;
    color: #999999;
    padding-bottom: 5px;
}

.form-section-dms2 .checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    padding: 4px 0;
}

.form-section-dms2 .checkbox__input {
    display: none;
}

.form-section-dms2 .checkbox__mark {
    width: 13px;
    height: 13px;
    border: 1px solid #EEEEEE;
    border-radius: 2px;
    background: #FFFFFF;
    flex-shrink: 0;
    margin-top: 4px;
    position: relative;
}

.form-section-dms2 .checkbox__input:checked + .checkbox__mark {
    background: linear-gradient(0deg, rgba(127, 172, 255, 1) 0%, rgba(161, 127, 255, 1) 100%);
    border-color: transparent;
}

.form-section-dms2 .checkbox__input:checked + .checkbox__mark::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 1px;
    width: 5px;
    height: 8px;
    border: solid #FFFFFF;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.form-section-dms2 .checkbox__text {
    font-size: var(--t1-font-size);
    line-height: 1.5;
    color: #999999;
}

.form-section-dms2 .checkbox__link {
    color: #808080;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

.form-section-dms2 .checkbox__link:hover {
    color: #FA0853;
}

.form-section-dms2 .checkbox__text-static {
    cursor: default;
}

/* Button gradient-alt for ДМС 2 form */
.btn--gradient-alt {
    background: linear-gradient(0deg, rgba(127, 172, 255, 1) 0%, rgba(161, 127, 255, 1) 100%);
    color: #FFFFFF;
    border-radius: 45px;
    padding: 20px 30px;
    min-width: 250px;
    font-family: 'ALS Story', sans-serif;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: var(--t1-font-size);
    line-height: 1.5;
}

.btn--gradient-alt:hover {
    background: linear-gradient(0deg, rgba(250, 8, 83, 1) 0%, rgba(250, 8, 83, 1) 100%);
}

/* Responsive styles for ДМС 2 form section */
@media (max-width: 992px) {
    .form-section-dms2 .form-section__title {
        font-size: 28px;
    }

    .form-section-dms2 .contact-form__row {
        flex-direction: column;
    }

    .form-section-dms2 .contact-form__field {
        width: 100%;
    }

    .form-section-dms2 .btn--gradient-alt {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .form-section-dms2 {
        padding: 60px 0;
    }

    .form-section-dms2 .form-section__container {
        padding: 0 20px;
    }

    .form-section-dms2 .form-section__title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .form-section-dms2 .form-section__title {
        font-size: 20px;
    }

    .form-section-dms2 .btn--gradient-alt {
        padding: 15px 25px;
        font-size: 14px;
        min-width: auto;
    }
}

/* Native validation bubble styling (Safari/WebKit) */
#email::-webkit-validation-bubble-message,
#email::-webkit-validation-bubble-text-block {
    font-family: 'ALS Story', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Hide validation bubble icon (exclamation) */
#email::-webkit-validation-bubble-icon {
    display: none;
}

/* Some browsers render an invalid icon inside the input */
#email:invalid {
    background-image: none !important;
}

/* Custom validation tooltip (fallback when native bubble can't be styled) */
.email-validation-tooltip {
    position: absolute;
    z-index: 9999;
    max-width: 320px;
    background: #FFFFFF;
    color: #151C2A;
    border: 1px solid rgba(21, 28, 42, 0.12);
    border-radius: 12px;
    padding: 10px 12px;
    box-shadow: 0 12px 30px rgba(21, 28, 42, 0.12);
    font-family: 'ALS Story', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.3;
}

.email-validation-tooltip::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 18px;
    width: 12px;
    height: 12px;
    background: #FFFFFF;
    border-left: 1px solid rgba(21, 28, 42, 0.12);
    border-top: 1px solid rgba(21, 28, 42, 0.12);
    transform: rotate(45deg);
}

.email-validation-tooltip--hidden {
    display: none;
}


/* ===== Hero like Tilda on tablet ===== */
@media (min-width: 769px) and (max-width: 1199px) {
  .hero {
    /* как на десктопе */
    background: linear-gradient(180deg, rgba(32, 83, 153, 1) 0%, rgba(35, 111, 250, 1) 69%);
    min-height: 500px;
  }

  /* сдвигаем контент левее и уводим картинку от правого края */
  .hero-container {
    padding-left: clamp(24px, 4vw, 60px);
    padding-right: clamp(120px, 14vw, 220px);
    min-height: 500px;
  }

  /* десктопная картинка как на десктопе */
  .hero-image {
    display: block;
    margin-left: 0; /* сдвигаем левее на планшете */
    align-self: flex-end; /* прижимаем к низу, чтобы не "улетала" */
    margin-right: 0;
  }

  /* уменьшаем размер картинки на планшете */
  .hero-image img {
    width: clamp(420px, 45vw, 620px);
    max-width: clamp(420px, 45vw, 620px);
    height: auto;
  }

  .hero-image-desktop {
    display: block;
  }

  .hero-image-mobile {
    display: none;
  }
}

/* Узкий планшет: сдвигаем картинку левее, чтобы не обрезалась */
@media (min-width: 769px) and (max-width: 845px) {
  .hero-container {
    padding-right: clamp(60px, 8vw, 120px);
  }

  .hero-image {
    transform: translateX(-48px);
  }
}

/* Планшет 846–1199: такая же позиция картинки слева */
@media (min-width: 846px) and (max-width: 1199px) {
  .hero-container {
    padding-right: clamp(60px, 8vw, 120px);
  }

  .hero-image {
    transform: translateX(-48px);
  }
}

