#form_main_block {
    width: 90%;
    max-width: 1200px;
    min-height: 100vh;
    margin: 0 auto;
    padding-bottom: 1.5rem;
    box-sizing: border-box;
}

#form_main_block p {
    margin: 0;
    padding: 0;
}

#form_header {
    width: 100%;
    height: auto;
    padding: 1rem 0;
}

#form_title {
    width: 100%;
    height: auto;
    min-height: 8vh;
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #0D0D0D;
}

#form_title p {
    color: white;
    font-family: "Lora", serif;
    font-weight: 500;
    font-size: 2.2rem;
    letter-spacing: 0.3rem;
    line-height: 1.4;
    text-align: center;
    padding: 0 1rem;
}

#form_greeting {
    width: 90%;
    max-width: 800px;
    margin: 2em auto 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#form_greeting p {
    font-family: "Open Sans", sans-serif;
    font-weight: 400;
    font-size: 1.3rem;
    color: #1b1b1b;
    line-height: 1.6;
}

#form_form_block {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 1.5em;
    width: 100%;
}

.form-group {
    width: 35rem;
    position: relative;
    margin-bottom: 1.5rem;
}

.form-input {
    width: 100%;
    padding: 1.2rem 0 0.5rem;
    border: 1px solid #aaa;
    border-radius: 4px;
    font-size: 1rem;
    font-family: "Open Sans", sans-serif;
    background: transparent;
    transition: border 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus {
    border-color: #4c4c4d;
    outline: none;
}


.floating-label {
    position: absolute;
    left: 0.8rem;
    top: 1rem;
    color: #999;
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.2s ease;
    background-color: white;
    padding: 0 4px;
}

.form-input:focus + .floating-label,
.form-input:not(:placeholder-shown) + .floating-label {
    top: -0.6rem;
    left: 0.6rem;
    font-size: 0.9rem;
    color: #090909;
}

.checkbox-wrapper {
    font-size: 0.95rem;
    color: #444;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.submit-button {
    width: 50%;
    min-width: 180px;
    margin: 1.5rem auto;
    padding: 0.9rem;
    font-size: 1.1rem;
    font-weight: bold;
    color: white;
    background-color: #0c0c0c;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
    display: block;
    text-align: center;
}

.submit-button:hover {
    background-color: #b60615;
}

.file-upload-btn {
    padding: 0.5rem 1rem;
    background-color: #101010;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    cursor: pointer;
    margin-bottom: 0.8rem;
    display: inline-block;
}

.file-upload-btn:hover {
    background-color: #b20821;
}

#file-list {
    list-style-type: disc;
    padding-left: 1.2rem;
    font-size: 0.95rem;
    color: #333;
    margin-top: 0.5rem;
}

#form_footer {
    width: 90%;
    max-width: 800px;
    margin: 2rem auto 0;
    text-align: center;
    color: #262626;
}

#form_footer p {
    font-family: "Roboto Flex", sans-serif;
    font-weight: 400;
    font-size: 1.1rem;
    line-height: 1.5;
    color: #5e5e5e;
}

#divider_long {
    width: 100%;
    height: 0.1rem;
    display: block;
    margin: 2rem 0;
}

#divider_long::before {
    content: "";
    display: block;
    height: 1px;
    background-color: #262626;
    margin: 0 auto;
    width: 80%;
    max-width: 600px;
}

/* Ландшафтный режим */
@media (max-width: 950px) and (orientation: landscape) {
    #form_main_block {
        padding-bottom: 1rem;
    }
    #form_title p {
        font-size: 1.8rem;
        letter-spacing: 0.2rem;
    }
    #form_greeting p {
        font-size: 1.2rem;
    }
    .form-group {
        margin-bottom: 1.2rem;

    }
    .submit-button {
        width: 40%;
        padding: 0.8rem;
    }
}

/* 768px (Tablets) */
@media (max-width: 768px) {
    #form_title p {
        font-size: 2rem;
        letter-spacing: 0.25rem;
    }
    #form_greeting p {
        font-size: 1.25rem;
    }
    .form-input {
        padding: 1.1rem 0.7rem 0.5rem;
    }
    .submit-button {
        width: 55%;
        font-size: 1.05rem;
    }
    #form_footer p {
        font-size: 1.05rem;
    }
}

/* 540px (Foldables) */
@media (max-width: 540px) {
    #form_title {
        padding: 1.2rem 0;
    }
    #form_title p {
        font-size: 1.7rem;
    }
    #form_greeting {
        margin-top: 1.5em;
    }
    #form_greeting p {
        font-size: 1.15rem;
    }
    .form-group {
        margin-bottom: 1.3rem;
    }
    .floating-label {
        font-size: 0.95rem;
    }
    .submit-button {
        width: 60%;
        padding: 0.85rem;
    }
    #divider_long::before {
        width: 70%;
    }
}

/* 480px */
@media (max-width: 480px) {
    #form_title p {
        font-size: 1.6rem;
        letter-spacing: 0.15rem;
    }
    .form-input {
        padding: 1rem 0.7rem 0.4rem;
    }
    .floating-label {
        top: 0.9rem;
        font-size: 0.9rem;
    }
    .form-input:focus + .floating-label,
    .form-input:not(:placeholder-shown) + .floating-label {
        top: -0.5rem;
        font-size: 0.85rem;
    }
    .submit-button {
        width: 70%;
        font-size: 1rem;
    }
    .file-upload-btn {
        font-size: 0.9rem;
        padding: 0.45rem 0.9rem;
    }
    #form_footer p {
        font-size: 1rem;
    }
}

/* 428px (iPhone Pro Max) */
@media (max-width: 428px) {
    #form_title p {
        font-size: 1.55rem;
    }
    #form_greeting p {
        font-size: 1.1rem;
    }
    .submit-button {
        width: 75%;
    }
    #divider_long::before {
        width: 75%;
    }
}

/* 414px (iPhone Plus) */
@media (max-width: 414px) {
    #form_title {
        padding: 1rem 0;
    }
    #form_title p {
        font-size: 1.5rem;
    }
    .form-group {
        width: 23rem;
        margin-bottom: 1.2rem;
    }
    .checkbox-wrapper {
        font-size: 0.9rem;
    }
    #file-list {
        font-size: 0.9rem;
    }
}

/* 390px (iPhone 12 Pro) */
@media (max-width: 390px) {
    #form_title p {
        font-size: 1.45rem;
    }
    #form_greeting p {
        font-size: 1.05rem;
    }
    .form-input {
        padding: 0.9rem 0.6rem 0.4rem;
    }
    .floating-label {
        left: 0.6rem;
        top: 0.8rem;
    }
    .submit-button {
        width: 80%;
        padding: 0.8rem;
        font-size: 0.98rem;
    }
}

/* 375px (iPhone mini) */
@media (max-width: 375px) {
    #form_title p {
        font-size: 1.4rem;
        letter-spacing: 0.1rem;
    }
    .form-input:focus + .floating-label,
    .form-input:not(:placeholder-shown) + .floating-label {
        left: 0.5rem;
    }
    .submit-button {
        min-width: 160px;
    }
    #form_footer p {
        font-size: 0.95rem;
    }
}

/* 360px */
@media (max-width: 360px) {
    #form_title p {
        font-size: 1.35rem;
    }
    #form_greeting {
        width: 95%;
    }
    .form-group {
        width: 95%;
    }
    .submit-button {
        width: 85%;
    }
    #divider_long::before {
        width: 85%;
    }
}

/* 320px (iPhone SE) */
@media (max-width: 320px) {
    #form_title {
        padding: 0.8rem 0;
    }
    #form_title p {
        font-size: 1.3rem;
    }
    #form_greeting p {
        font-size: 1rem;
        line-height: 1.5;
    }
    .form-input {
        padding: 0.8rem 0.6rem 0.3rem;
        font-size: 0.95rem;
    }
    .floating-label {
        font-size: 0.85rem;
    }
    .form-input:focus + .floating-label,
    .form-input:not(:placeholder-shown) + .floating-label {
        font-size: 0.8rem;
        top: -0.4rem;
    }
    .submit-button {
        width: 90%;
        padding: 0.75rem;
        font-size: 0.95rem;
    }
    .file-upload-btn {
        font-size: 0.85rem;
    }
    #form_footer p {
        font-size: 0.9rem;
    }
}