/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

*,
*::after,
*::before {
    -webkit-box-sizing: inherit;
    box-sizing: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    display: inline-block;
    color: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
figure {
    margin: 0;
    padding: 0;
    font-weight: inherit;
}

ul,
li {
    list-style: none;
    margin: 0;
    padding: 0;
}

input,
button,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

button {
    border: none;
    background-color: transparent;
    cursor: pointer;
    outline: transparent;
    padding: 0;
}

body {
    min-height: 100vh;
    /* Mont — шрифт по дизайн-макету, используется на всей странице формы регистрации */
    font-family: 'Mont', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #FFF;
    font-size: 20px;
    font-style: normal;
    font-weight: 600;
    line-height: 122.5%;
    background-color: #5C4898;
    background-image: url(../images/bg-body-3-min.png);
    background-repeat: repeat;
    background-position: top left;
}

/* Mont — шрифт по дизайн-макету. Начертания: SemiBold (600), Bold (700), Black (900) */
@font-face {
    font-family: 'Mont';
    src: local('Mont Semi Bold'), local('Mont-Semi-Bold'),
        url('https://rigf.ru/local/templates/rigf_112023/assets/css/../fonts/Mont-SemiBold.woff2') format('woff2'),
        url('https://rigf.ru/local/templates/rigf_112023/assets/css/../fonts/Mont-SemiBold.woff') format('woff'),
        url('https://rigf.ru/local/templates/rigf_112023/assets/css/../fonts/Mont-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Mont';
    src: local('Mont Bold'), local('Mont-Bold'),
        url('https://rigf.ru/local/templates/rigf_112023/assets/css/../fonts/Mont-Bold.woff2') format('woff2'),
        url('https://rigf.ru/local/templates/rigf_112023/assets/css/../fonts/Mont-Bold.woff') format('woff'),
        url('https://rigf.ru/local/templates/rigf_112023/assets/css/../fonts/Mont-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Mont';
    src: local('Mont Black'), local('Mont-Black'),
        url('https://rigf.ru/local/templates/rigf_112023/assets/css/../fonts/Mont-Black.woff2') format('woff2'),
        url('https://rigf.ru/local/templates/rigf_112023/assets/css/../fonts/Mont-Black.woff') format('woff'),
        url('https://rigf.ru/local/templates/rigf_112023/assets/css/../fonts/Mont-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
}

/* Main Header */
.main-header {
    background-color: transparent;
    position: relative;
    z-index: 10;
}

.header-wrapper {
    max-width: 1440px;
    padding: 70px 15px 60px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    transition: .3s;
}

.main-header.scroll .header-wrapper {
    position: fixed;
    width: 100%;
    z-index: 999;
    top: 0;
    left: 0;
    padding: 30px 0;
    background: #554194;
}

.logo-container {
    max-width: 230px;
    margin-right: 100px;
}

.logo-link {
    display: block;
    text-decoration: none;
}

.logo-img {
    max-width: 100%;
    height: auto;
    display: block;
}

.main-nav {
    margin-right: 30px;
    flex: 1;
}

.main-nav ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
}

.main-nav ul li a,
.header__register a {
    font-size: 0.75em;
    font-weight: 700;
    line-height: 134.5%;
    text-transform: uppercase;
    position: relative;
}

.main-nav ul li {
    padding: 0;
}

.nav-link {
    font-size: 0.75em;
    font-weight: 700;
    line-height: 134.5%;
    text-transform: uppercase;
    color: #FFF;
    padding: 6px 13px;
    transition: background 0.3s;
    position: relative;
}

.nav-link:hover {
    background: #554194;
}

.main-nav ul li:hover > a {
    background: #554194;
}

.main-nav .submenu-parent {
    position: relative;
}

.main-nav .submenu-parent ul {
    position: absolute;
    min-width: 240px;
    top: 28px;
    left: 0px;
    display: none;
    background: #554194;
    padding: 10px 0;
    z-index: 10;
}

.main-nav .submenu-parent:hover ul {
    display: block;
}

.header__register {
    margin-left: auto;
}

.header__register a {
    position: relative;
    padding-left: 36px;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 134.5%;
    text-transform: uppercase;
    color: #FFF;
    transition: color 0.3s;
}

.header__register a::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background-image: url(../images/register-arrow.svg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.header__lang {
    position: relative;
    margin-right: 45px;
    font-size: 18px;
}

.header__lang img {
    max-width: 22px;
    display: inline-block;
}

.flag-icon {
    max-width: 22px;
    height: auto;
    display: inline-block;
    vertical-align: middle;
    margin-right: 5px;
}

.header__lang-current > div {
    display: none;
}

.header__lang span {
    text-transform: uppercase;
}

.header__lang-current {
    padding-right: 15px;
    position: relative;
    cursor: pointer;
}

.header__lang-current::after {
    content: '';
    position: absolute;
    top: 9px;
    right: -10px;
    transform: rotate(45deg);
    width: 6px;
    height: 6px;
    border-right: 1px solid;
    border-bottom: 1px solid;
}

.header__lang-current > div.active {
    display: block;
    position: relative;
    top: 2px;
    left: 10px;
}

.header__lang-popup {
    position: absolute;
    box-shadow: 0 4px 14px rgba(0,0,0,0.11);
    color: #222;
    border-radius: 3px;
    background: #FFF;
    padding: 8px 10px;
    top: 30px;
    left: 44%;
    opacity: 0;
    transform: translate(-50%, -8px);
    transition: .35s ease;
    z-index: -1;
    pointer-events: none;
    width: 70px;
}

.header__lang-popup.active {
    transform: translate(-50%, 0);
    opacity: 1;
    z-index: 5;
    pointer-events: all;
}

.header__lang-popup span {
    color: #000;
}

.header__lang-popup a {
    align-items: center;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    color: #000;
}

.header__lang-current.active::after {
    transform: rotate(-135deg);
    top: 10px;
}

/* Main Content */
.main-content {
    position: relative;
    z-index: 5;
    padding-bottom: 230px;
}

.content-wrapper {
    max-width: 1440px;
    padding: 0 15px;
    margin: 0 auto;
    display: flex;
    gap: 60px;
    align-items: flex-start;
}

.content-left {
    flex: 1;
    max-width: 600px;
}

.content-right {
    flex: 1;
    position: relative;
    min-height: 600px;
}

.register__img {
    margin-left: 30px;
    margin-right: -100px;
    max-width: 450px;
    width: 100%;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.register__img img {
    width: 100%;
    height: auto;
    display: block;
}

.main-title {
    font-size: 2.67em;
    font-weight: 900;
    line-height: 134.5%;
    letter-spacing: 0.64px;
    text-transform: uppercase;
    color: #FFF;
    margin-bottom: 90px;
    margin-top: 40px;
}

/* RIGF Graphic */
.rigf-graphic {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.4;
}

.rigf-letters {
    font-size: 300px;
    font-weight: 900;
    color: transparent;
    background: linear-gradient(135deg, #DB0E88 0%, #9d00ff 50%, #5C4898 100%);
    -webkit-background-clip: text;
    background-clip: text;
    letter-spacing: 30px;
    text-transform: uppercase;
    filter: blur(3px);
    transform: perspective(500px) rotateY(-15deg) rotateX(5deg);
    position: relative;
}

.rigf-letters::before {
    content: 'RIGF';
    position: absolute;
    top: 0;
    left: 0;
    font-size: 300px;
    font-weight: 900;
    color: transparent;
    background: linear-gradient(135deg, #DB0E88 0%, #9d00ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    filter: blur(10px);
    opacity: 0.3;
    transform: translate(15px, 15px);
}

/* Container */
.container {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.page-header {
    margin-bottom: 0;
    padding-top: 0;
}

.page-header h2 {
    display: none;
}

/* Form Styles */
form {
    margin-top: 0;
}

.form__title {
    font-size: 1.25em;
    font-weight: 800;
    line-height: 116.5%;
    margin-bottom: 28px;
    margin-top: 80px;
    color: #FFF;
    text-transform: uppercase;
}

.form__title:first-of-type {
    margin-top: 0;
}

.form__section-desc {
    margin-bottom: 28px;
}

.form__section-desc small {
    margin-top: 10px;
}

.form__divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin: 40px 0 0;
}

.form__field {
    margin-bottom: 28px;
}

.form__field label {
    display: block;
    padding: 10px 10px 10px 40px;
    font-weight: 600;
    color: #FFF;
    font-size: 0.83em;
    line-height: 1;
    font-weight: 800;
    line-height: 120%;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.required {
    color: #DB0E88;
    font-weight: 900;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    height: 92px;
    line-height: 92px;
    border-radius: 30px;
    background: #503A8E;
    padding: 0 40px;
    border: 0;
    display: block;
    width: 100%;
    color: #FFF;
    outline: none;
    font-family: inherit;
    font-size: 20px;
    font-weight: 600;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
textarea::placeholder {
    color: #a9a9a9;
}

textarea {
    line-height: 1.2;
    height: 150px;
    padding-top: 30px;
    resize: vertical;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
    outline: none;
    background: #554194;
}

select {
    -webkit-appearance: none;
    appearance: none;
    color: #a9a9a9;
    background-image: url(../images/select-arrow.svg);
    background-repeat: no-repeat;
    background-position: 94% 50%;
    cursor: pointer;
}

select:focus-visible {
    color: #fff;
}

select option {
    background-color: #503A8E;
    color: #FFF;
}

input:invalid {
    border: 2px solid #DB0E88;
}

small {
    display: block;
    margin-top: 10px;
    font-size: 0.7em;
    color: rgba(255, 255, 255, 0.7);
    text-transform: none;
    letter-spacing: normal;
}

/* Buttons */
.btn {
    padding: 36px 71px;
    border-radius: 30px;
    background: #DB0E88;
    color: #EAE5E2;
    font-size: 0.83em;
    font-weight: 800;
    line-height: 100%;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    transition: 0.3s;
    border: none;
    cursor: pointer;
    font-family: inherit;
    display: inline-block;
    text-decoration: none;
}

.btn:hover {
    box-shadow: 0 0 60px #DB0E88;
}

.btn:disabled {
    background-color: #666;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-primary {
    width: 100%;
}

.btn-secondary {
    background-color: #DB0E88;
    color: #FFF;
    margin-top: 15px;
    padding: 18px 40px;
    font-size: 0.75em;
    font-weight: 700;
    border: none;
    border-radius: 30px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(219, 14, 136, 0.4);
    transition: all 0.3s;
    cursor: pointer;
    display: inline-block;
    width: auto;
}

.btn-secondary:hover {
    background-color: #C00D7A;
    box-shadow: 0 0 40px rgba(219, 14, 136, 0.6);
    transform: translateY(-2px);
}

.btn-secondary:disabled {
    background-color: #666;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-link {
    background: none;
    border: none;
    color: #FFF;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.83em;
    padding: 0;
    margin-left: 10px;
    border-bottom: 1px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    transition: all 0.3s;
    font-weight: 800;
}

.btn-link:hover {
    color: #DB0E88;
    border-bottom-color: #DB0E88;
}

/* Consent Styles — лейблы без фона по макету */
.check__label {
    display: block;
    position: relative;
    cursor: pointer;
    background-color: transparent;
    padding: 36px 40px;
    border-radius: 0;
}

.check__input {
    opacity: 0;
    position: absolute;
    width: 1px;
    height: 1px;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    pointer-events: none;
}

.check__box {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #7F6DAF;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    transition: .3s;
    display: block;
}

.check__input:checked ~ .check__box {
    background-color: #DB0E88;
}

.check__text {
    font-size: 0.83em;
    line-height: 120%;
    font-weight: 800;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    color: #FFF;
    cursor: pointer;
    display: block;
    padding-left: 50px;
}

.check__text a {
    color: #db0e88;
}

/* Participation format — радио-кнопки (только для участника) */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.radio__label {
    display: block;
    position: relative;
    cursor: pointer;
    background-color: transparent;
    padding: 20px 40px;
    border-radius: 0;
}

.radio__input {
    opacity: 0;
    position: absolute;
    width: 1px;
    height: 1px;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    pointer-events: none;
}

.radio__box {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #7F6DAF;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    transition: .3s;
    display: block;
}

.radio__input:checked ~ .radio__box {
    background-color: #DB0E88;
}

.radio__text {
    font-size: 0.83em;
    line-height: 120%;
    font-weight: 800;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    color: #FFF;
    cursor: pointer;
    display: block;
    padding-left: 50px;
}

.form__field .btn-link {
    display: block;
    margin-top: 10px;
    margin-left: 0;
}

.consent-full-text {
    margin-top: 20px;
    padding: 25px 0;
    background-color: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    border-left: none;
    border-radius: 0;
    font-size: 0.7em;
    line-height: 1.8;
    white-space: pre-wrap;
    color: rgba(255, 255, 255, 0.8);
    text-transform: none;
    letter-spacing: normal;
}

/* Code Status — без разделительной линии под кнопкой */
.code-status {
    margin-top: 10px;
    padding: 15px 0;
    border-radius: 0;
    font-size: 0.7em;
    border: none;
}

.code-status.success {
    background-color: transparent;
    color: #4ade80;
}

.code-status.error {
    background-color: transparent;
    color: #DB0E88;
}

.code-status.info {
    background-color: transparent;
    color: #60a5fa;
}

/* Убираем линию между кнопкой отправки кода и полем ввода кода.
   Источник: у .btn-secondary в старом дизайне была border-bottom: 2px solid #FFF;
   явно снимаем любую нижнюю границу у кнопки и у контейнера. */
.form__field--send-code {
    border-bottom: none !important;
}
.form__field--send-code .btn-secondary {
    border: none !important;
    border-bottom: none !important;
}
.form__field--send-code::after {
    display: none !important;
    content: none !important;
}
.form__field--verification-code,
.form__field--verification-code label {
    border-top: none !important;
}
.form__field--verification-code::before,
.form__field--verification-code label::before {
    display: none !important;
    content: none !important;
}

/* Messages */
.message-container {
    margin-top: 30px;
}

.message {
    padding: 15px 0;
    border-radius: 0;
    margin-bottom: 15px;
    border-bottom: 2px solid;
}

.message.success {
    background-color: transparent;
    color: #4ade80;
    border-bottom-color: #4ade80;
}

.message.error {
    background-color: transparent;
    color: #DB0E88;
    border-bottom-color: #DB0E88;
}

/* SmartCaptcha: невидимый режим — минимальный отступ, шильд виджета в углу */
#captcha-container-wrap {
    margin: 0;
    min-height: 0;
}
#captcha-container-wrap #captcha-container {
    margin: 0;
}

/* Form Actions */
.form-actions {
    margin-top: 40px;
    text-align: left;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .header-wrapper {
        padding: 40px 0;
    }

    .logo-container {
        margin-right: 40px;
    }

    .main-title {
        font-size: 54px;
        margin-bottom: 40px;
    }

    .rigf-letters {
        font-size: 200px;
        letter-spacing: 20px;
    }

    .rigf-letters::before {
        font-size: 200px;
    }
}

@media (max-width: 1024px) {
    .content-wrapper {
        flex-wrap: wrap;
        gap: 40px;
    }

    .content-right {
        min-height: 400px;
    }

    .rigf-letters {
        font-size: 150px;
        letter-spacing: 15px;
    }

    .rigf-letters::before {
        font-size: 150px;
    }
}

@media (max-width: 767px) {
    .register__img {
        display: none;
    }

    .header-wrapper {
        flex-wrap: wrap;
        padding: 20px 0;
        gap: 20px;
    }

    .logo-container {
        max-width: 150px;
        margin-right: auto;
    }

    .logo-main {
        font-size: 36px;
    }

    .logo-subtitle {
        font-size: 6px;
    }

    .main-nav {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 15px;
        margin-right: 0;
    }

    .header-right {
        order: 2;
        flex-direction: column;
        align-items: flex-end;
        gap: 10px;
        margin-left: 0;
    }

    .registration-link {
        font-size: 14px;
        padding-left: 28px;
    }

    .registration-link::after {
        width: 18px;
        height: 18px;
    }

    .lang-switcher {
        margin-right: 0;
    }

    .content-wrapper {
        padding: 0 10px;
        gap: 30px;
    }

    .main-title {
        font-size: 40px;
        margin-bottom: 30px;
    }

    .rigf-letters {
        font-size: 100px;
        letter-spacing: 10px;
    }

    .rigf-letters::before {
        font-size: 100px;
    }

    legend {
        margin-top: 40px;
        font-size: 22px;
    }

    .form__field input:not([type='checkbox']),
    .form__field select {
        height: 60px;
        line-height: 60px;
    }

    .check__label {
        padding-top: 20px;
        padding-bottom: 20px;
        padding-left: 60px;
    }

    .check__text {
        font-size: 18px;
    }

    .check__box {
        top: 20px;
        width: 25px;
        height: 25px;
        left: 20px;
    }

    .radio__label {
        padding-top: 14px;
        padding-bottom: 14px;
        padding-left: 60px;
    }

    .radio__text {
        font-size: 18px;
    }

    .radio__box {
        top: 50%;
        width: 25px;
        height: 25px;
        left: 20px;
    }

    .btn-secondary {
        width: 100%;
    }
}

@media (max-width: 550px) {
    .main-title {
        font-size: 35px;
    }

    .rigf-letters {
        font-size: 80px;
        letter-spacing: 8px;
    }

    .rigf-letters::before {
        font-size: 80px;
    }

    .btn-primary {
        padding: 20px 50px;
        font-size: 16px;
    }
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Success Page */
.success-message {
    text-align: center;
    padding: 40px 20px;
}

.success-message h1 {
    color: #4ade80;
    margin-bottom: 20px;
}

.success-message p {
    font-size: 16px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
}

/* Accessibility */
input:focus,
select:focus,
textarea:focus,
button:focus {
    outline: 2px solid #DB0E88;
    outline-offset: 2px;
}

