:root {
    --primary: #0046FF;
    --dark: #2D3436;
    --white: #FFFFFF;
    --black: #000000;
    --danger: #FF6B6B;
    --gray: #B2BEC3;
    --text: #000000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-weight: 500;
    color: var(--black);
    background: #F5F6FA;
}

main {
    padding-top: 70px;
}

@media (min-width: 768px) {
    main {
        padding-top: 100px;
    }
}

.container {
    max-width: 1410px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Language Switcher */
.language-switcher {
    position: fixed;
    top: 20px;
    right: 50px;
    display: flex;
    gap: 8px;
    z-index: 1000;
    background: var(--white);
    padding: 4px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.lang-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 600;
    color: var(--gray);
    border-radius: 6px;
    transition: all 0.3s;
}

.lang-btn.active {
    background: var(--primary);
    color: var(--white);
}

.lang-btn:hover:not(.active) {
    background: #f0f0f0;
}

/* Titles */
.title-1 {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
}

.title-3 {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .title-1 {
        font-size: 70px;
    }

    .title-3 {
        font-size: 36px;
    }
}

/* About Section */
.about__main {
    padding: 32px 16px 40px;
    background: var(--primary);
    border-radius: 16px;
    overflow: hidden;
    color: var(--black);
}

@media (min-width: 768px) {
    .about__main {
        padding: 80px 24px 180px;
        border-radius: 32px;
    }
}

.about__title {
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    .about__title {
        margin-bottom: 72px;
    }
}

.about-top {
    display: grid;
    grid-template-columns: 0.6fr 1fr;
    gap: 20px;
    align-items: center;
}

.about-top__atom {
    order: 2;
    margin-left: -16px;
}

@media (min-width: 768px) {
    .about-top__atom {
        order: initial;
        margin-left: -24px;
    }
}

.about-top__descr {
    grid-column: 1/3;
    font-size: 18px;
    line-height: 140%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    color: var(--white);
}

@media (max-width: 1023px) {
    .about-top__descr_1 {
        order: 1;
    }
}

@media (min-width: 768px) {
    .about-top__descr {
        grid-column: initial;
        font-size: 28px;
    }
}

.about-top__descr p {
    margin-bottom: 24px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.about-top__descr p:last-child {
    margin-bottom: 0;
}

/* Contacts Review Section */
.contacts-review {
    margin: 56px 0;
}

@media (min-width: 768px) {
    .contacts-review {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 54px;
        margin: 100px 0 120px;
    }
}

.contacts-review__title {
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .contacts-review__title {
        margin-bottom: 32px;
    }
}

.contacts-review__text {
    display: flex;
    margin-bottom: 24px;
    padding: 24px 16px;
    background-color: var(--dark);
    color: var(--white);
    border-radius: 16px;
}

@media (min-width: 768px) {
    .contacts-review__text {
        padding: 40px 30px;
        border-radius: 24px;
    }
}

.contacts-review__text .icon {
    min-width: 30px;
    width: 30px;
    height: 30px;
    margin-right: 16px;
}

@media (min-width: 768px) {
    .contacts-review__text .icon {
        margin-right: 30px;
    }
}

.contacts-review__form {
    margin: 0 -16px;
    padding: 32px 16px;
    background-color: var(--white);
    border-radius: 20px;
}

@media (min-width: 768px) {
    .contacts-review__form {
        padding: 64px 24px 56px;
        border-radius: 24px;
    }
}

.form {
    max-width: 544px;
    margin: 0 auto;
}

.form__row {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.field {
    width: 100%;
}

/* Textfield Styles */
.textfield {
    position: relative;
    width: 100%;
}

.textfield__control {
    position: relative;
    display: block;
    width: 100%;
}

.textfield__input {
    width: 100%;
    padding: 16px 12px 8px;
    border: 2px solid var(--gray);
    border-radius: 8px;
    font-size: 16px;
    background: var(--white);
    transition: all 0.3s;
}

.textfield__textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.textfield__input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Override browser autofill styles */
.textfield__input:-webkit-autofill,
.textfield__input:-webkit-autofill:hover,
.textfield__input:-webkit-autofill:focus,
.textfield__input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px var(--white) inset !important;
    -webkit-text-fill-color: var(--black) !important;
    box-shadow: 0 0 0 30px var(--white) inset !important;
    transition: background-color 5000s ease-in-out 0s;
    animation: onAutoFillStart 0s;
}

.textfield__input:-moz-autofill,
.textfield__input:-moz-autofill-preview {
    background-color: var(--white) !important;
    color: var(--black) !important;
}

/* Autofill detection animation */
@keyframes onAutoFillStart {
    from { opacity: 1; }
    to { opacity: 1; }
}

.textfield__label {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 16px;
    pointer-events: none;
    transition: all 0.3s;
    background: var(--white);
    padding: 0 4px;
}

.textfield__textarea ~ .textfield__label {
    top: 24px;
}

.textfield__input:focus ~ .textfield__label,
.textfield_active .textfield__label {
    top: 0;
    font-size: 12px;
    color: var(--primary);
}

.textfield_error .textfield__input {
    border-color: var(--danger);
}

.textfield_error .textfield__label {
    color: var(--danger);
}

.textfield__message {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--danger);
}

/* Radio Buttons */
.field__label {
    display: block;
    margin-bottom: 12px;
    font-weight: 500;
    font-size: 20px;
    color: var(--text);
}

.field__radios {
    display: flex;
    flex-direction: column;
}

.radio {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 12px;
    border-radius: 8px;
    transition: background 0.3s;
}

.radio:hover {
    background: #f5f5f5;
}

.radio input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: var(--primary);
}

.radio__label {
    font-size: 16px;
}

.field__message {
    margin-top: 8px;
    font-size: 12px;
    color: var(--danger);
}

/* Button Styles */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: #0039CC;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-expanded {
    width: 100%;
}

.btn__loader {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.btn.loading .btn__text {
    opacity: 0;
}

.spinner {
    display: block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Form Policy */
.form__policy {
    font-size: 12px;
    color: var(--gray);
    text-align: center;
    line-height: 1.4;
}

/* Form Success Message */
.form-success-message {
    padding: 24px;
    margin-bottom: 24px;
    background: #D4EDDA;
    border: 1px solid #C3E6CB;
    border-radius: 8px;
    color: #155724;
    font-size: 16px;
    line-height: 1.5;
    text-align: center;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Contacts Socials */
.contacts-socials {
    margin-bottom: 56px;
}

@media (min-width: 768px) {
    .contacts-socials {
        margin-bottom: 120px;
    }
}

.contacts-socials__title {
    margin-bottom: 32px;
    word-break: break-word;
}

@media (min-width: 768px) {
    .contacts-socials__title {
        margin-bottom: 40px;
        text-indent: 128px;
    }
}

/* Socials */
.socials {
    display: grid;
    grid-auto-flow: column;
    justify-content: start;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.socials_contacts {
    justify-content: initial;
    gap: 8px;
}

@media (min-width: 480px) {
    .socials_contacts {
        justify-content: start;
    }
}

@media (min-width: 768px) {
    .socials_contacts {
        gap: 16px;
    }
}

.socials__item {
    list-style: none;
}

.socials__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border: 1px solid var(--dark);
    border-radius: 50%;
    color: var(--dark);
    text-decoration: none;
    transition: all 0.3s;
}

.socials__link:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.socials_contacts .socials__link {
    position: relative;
    width: auto;
    height: auto;
    padding-bottom: 100%;
    border: none;
    background-color: var(--white);
    border-radius: 16px;
}

@media (min-width: 480px) {
    .socials_contacts .socials__link {
        width: 120px;
        height: 120px;
        padding-bottom: 0;
    }
}

@media (min-width: 768px) {
    .socials_contacts .socials__link {
        width: 160px;
        height: 160px;
        border-radius: 50%;
    }
}

.socials_contacts .socials__link:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.socials__icon {
    width: 16px;
    height: 16px;
}

.socials_contacts .socials__icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 25%;
    height: 25%;
}

@media (min-width: 768px) {
    .socials_contacts .socials__icon {
        width: 40px;
        height: 40px;
    }
}

/* Social media colors */
.socials__link_facebook:hover {
    background: #1877F2;
    border-color: #1877F2;
}

.socials__link_youtube:hover {
    background: #FF0000;
    border-color: #FF0000;
}

.socials__link_instagram:hover {
    background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF, #515BD4);
    border-color: #DD2A7B;
}

.socials__link_tiktok:hover {
    background: #000000;
    border-color: #000000;
}

.socials__link_twitter:hover {
    background: #1DA1F2;
    border-color: #1DA1F2;
}

/* Success Page */
.success {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
}

@media (min-width: 768px) {
    .success {
        padding: 80px 0;
    }
}

/* Dummy Component */
.dummy {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: auto;
    max-width: 704px;
}

.dummy__img {
    width: 100%;
    max-width: 200px;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .dummy__img {
        max-width: 300px;
        margin-bottom: 32px;
    }
}

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

.dummy__title {
    margin-bottom: 24px;
}

.dummy__text {
    max-width: 704px;
    margin: 0 auto 24px;
    white-space: pre-wrap;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text);
}

.dummy__btn {
    max-width: 402px;
    width: 100%;
    text-decoration: none;
}