/* Обнуление и базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #f8f9fa;
    color: #222;
}

.main-wrapper {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    gap: 20px;
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

.form__container {
    width: 35%;
    margin: 0 auto;
    height: calc(100vh - 40px);
    background-color: #4C4C4D;
    padding: 30px 40px;
    border-radius: 8px;
    border: 1px solid #555556;
    display: flex;
    flex-direction: column;
    position: relative;
}


h1 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 12px;
    line-height: 1.3;
}

h1 span {
    color: #2740CA;
}

h2 {
    font-size: 1rem;
    font-weight: 400;
    color: #EDEDED;
    margin-bottom: 8px;
    line-height: 1.4;
    margin-bottom: 25px;
}

p {
    font-size: 1rem;
    color: #EDEDED;
    margin-bottom: 25px;
}

#contact-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    text-align: left;
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 500;
    margin-bottom: 6px;
    color: #EDEDED;
    font-size: 0.9rem;
}

.form-group label span {
    color: #e74c3c;
}

input[type="text"],
input[type="tel"],
input[type="email"],
textarea {
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #EDEDED;
}

input[type="text"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus,
textarea:focus {
    border-color: #2740CA;
    outline: none;
    box-shadow: 0 0 0 3px rgba(39, 64, 202, 0.1);
}

input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
    border-color: #e74c3c;
}

input:invalid:not(:placeholder-shown):focus,
textarea:invalid:not(:placeholder-shown):focus {
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.iti {
    width: 100%;
}

button[type="submit"] {
    background: linear-gradient(180deg, #42D9FF 0%, #4EE3D6 100%);
    color: #1E1E1E;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 10px;
}

button[type="submit"]:hover {
    background-color: #1f33a0;
}

button[type="submit"]:disabled {
    background-color: #aaa;
    cursor: not-allowed;
}

.social-links {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    background: linear-gradient(180deg, #42D9FF 0%, #4EE3D6 100%);
    position: absolute;
    right: -8%;
    border-radius: 0 25px 25px 0;
    padding: 10px 10px;
}

.social-links a {
    color: #EDEDED;
    font-size: 1.6rem;
    transition: color 0.2s;
}

.social-links a:hover {
    color: #EDEDED;
}

.dropify-wrapper {
    border-radius: 6px !important;
    border: 1px solid #EDEDED !important;
    background-color: #EDEDED !important;
    color: #1E1E1E !important;
    font-family: 'Inter', sans-serif;
}

.dropify-infos-message {
    color: #1E1E1E !important;
}

.dropify-wrapper:hover {
    border-color: #EDEDED !important;
    color: #1E1E1E !important;
}

.shake {
    animation: shake-animation 0.5s cubic-bezier(.36, .07, .19, .97) both;
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15) !important;
}

@keyframes shake-animation {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

.toastify {
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#phone {
    width: 100% !important;
}


.portfolio__link {
    color: #EDEDED;
    font-size: 16px;
    text-decoration: none;
    font-weight: bold;
}

/* Адаптивные стили для планшетов и небольших экранов */
@media(max-width: 1110px) {
    .main-wrapper {
        flex-direction: column;
        overflow-y: auto;
        height: auto;
        min-height: 100vh;
        padding: 20px;
        align-items: center;
    }

    .form__container {
        width: 90%;
        max-width: 600px;
        height: auto;
        overflow: visible;
        margin: 20px auto;
    }

    .main-wrapper-content {
        width: 90%;
        height: 600px;
    }

    #contact-form {
        overflow: visible;
        height: auto;
    }

    .social-links {
        position: static;
        flex-direction: row;
        border-radius: 8px;
        margin-top: 15px;
        padding: 15px;
        justify-content: center;
    }
}

/* Адаптивные стили для мобильных устройств */
@media(max-width: 768px) {
    .main-wrapper {
        padding: 15px;
        gap: 15px;
        justify-content: flex-start;
    }

    .form__container {
        width: 100%;
        padding: 25px 20px;
        height: auto;
        overflow: visible;
        margin: 10px auto;
    }

    .main-wrapper-content {
        width: 100%;
        height: 500px;
    }

    .form__logo {
        height: 40px !important;
    }

    h1 {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    h2 {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }

    p {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }

    #contact-form {
        gap: 14px;
        overflow: visible;
        height: auto;
        padding-right: 0;
    }

    .form-group label {
        font-size: 0.85rem;
        margin-bottom: 5px;
    }

    input[type="text"],
    input[type="tel"],
    input[type="email"],
    textarea {
        padding: 9px 12px;
        font-size: 0.9rem;
    }

    textarea {
        min-height: 80px;
    }

    button[type="submit"] {
        padding: 11px;
        font-size: 0.95rem;
        margin-top: 8px;
    }

    .portfolio__title {
        font-size: 1.5rem;
        padding: 15px 0;
    }

    .portfolio__name {
        font-size: 22px;
    }

    .portfolio__link {
        font-size: 14px;
    }

    .social-links {
        gap: 15px;
        padding: 8px;
        margin-top: 12px;
        justify-content: space-around;
    }

    .social-links a {
        font-size: 1.4rem;
    }

    .dropify-wrapper {
        min-height: 100px !important;
    }

    .dropify-wrapper .dropify-message {
        font-size: 0.85rem;
    }
}

/* Адаптивные стили для очень маленьких экранов */
@media(max-width: 480px) {
    .main-wrapper {
        padding: 10px;
        gap: 10px;
        justify-content: center;
    }

    .form__container {
        padding: 20px 15px;
        height: auto;
        overflow: visible;
        margin: 5px auto;
    }

    .main-wrapper-content {
        height: 400px;
    }

    .form__logo {
        height: 35px !important;
    }

    h1 {
        font-size: 1.3rem;
        margin-bottom: 8px;
    }

    h2 {
        font-size: 0.85rem;
        margin-bottom: 15px;
        line-height: 1.3;
    }

    p {
        font-size: 0.85rem;
        margin-bottom: 15px;
    }

    #contact-form {
        gap: 12px;
        overflow: visible;
        height: auto;
        padding-right: 0;
    }

    .form-group label {
        font-size: 0.8rem;
    }

    input[type="text"],
    input[type="tel"],
    input[type="email"],
    textarea {
        padding: 8px 10px;
        font-size: 0.85rem;
    }

    textarea {
        min-height: 70px;
    }

    button[type="submit"] {
        padding: 10px;
        font-size: 0.9rem;
        margin-top: 5px;
    }

    .portfolio__name {
        font-size: 18px;
    }

    .portfolio__link {
        font-size: 13px;
        margin-top: 5px;
        display: inline-block;
    }

    .social-links {
        gap: 12px;
        padding: 10px;
        margin-top: 10px;
    }

    .social-links a {
        font-size: 1.3rem;
    }

    .dropify-wrapper {
        min-height: 90px !important;
    }

    .dropify-wrapper .dropify-message {
        font-size: 0.8rem;
    }

    .dropify-wrapper .dropify-message span.file-icon {
        font-size: 2rem;
    }
}

/* Дополнительная адаптация для альбомной ориентации */
@media(max-width: 768px) and (max-height: 500px) {
    .form__container {
        padding: 15px;
        margin: 5px auto;
    }

    h2 {
        margin-bottom: 10px;
    }

    #contact-form {
        gap: 10px;
    }

    .social-links {
        margin-top: 8px;
        padding: 10px;
    }
}