.contact {
    position: relative;
    top: 8rem;
    left: 50%; /* Center horizontally */
    transform: translateX(-50%);
    padding: 2rem 1rem;
    background-color: #404040;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    max-width: 50rem; /* Maximum width for larger screens */
    border-radius: 8px;
    width: 100%; /* Full width of the viewport */
    box-sizing: border-box; /* Include padding and border in width calculation */
}

@media screen and (max-width: 768px) {
    .contact {
        width: 90%; /* Width for medium screens */
        max-width: 90%; /* Ensure it doesn't exceed 90% of viewport width */
        padding: 1rem; /* Reduce padding for smaller screens */
        left: 5%; /* Center with some margin on smaller screens */
        transform: none; /* Remove horizontal centering transform */
    }

    .contact form .input-box input,
    .contact form textarea {
        width: 100%; /* Full width for input and textarea */
        margin-bottom: 1rem; /* Increase spacing between fields */
    }

    .contact form textarea {
        height:200px; /* Adjusted height for smaller screens */
        margin-top: 1rem; /* Increase spacing from above input */
    }
}

.contact h2 {
    color: #c2a76b;
    font-size: 2rem;
    margin-bottom: 1rem;
    text-align: center;
}

.contact form {
    background-color: #373434;
    padding: 1.5rem; /* Adjust padding for better fit */
    border-radius: 8px;
    box-sizing: border-box; /* Include padding and border in width calculation */
}

.contact form .input-box {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem; /* Adjust gap for smaller screens */
}

.contact form .input-box input,
.contact form textarea {
    padding: 1rem;
    font-size: 1rem;
    background: white;
    color: black;
    border: 1px solid #c2a76b;
    border-radius: 8px;
    box-sizing: border-box; /* Include padding and border in width calculation */
}

.contact form .input-box input {
    flex: 1 1 calc(50% - 0.75rem); /* Adjust width calculation */
}

.contact form textarea {
    width: 100%; /* Full width of the container */
    margin-top: 1rem; /* Increase spacing from above input */
}

.contact form .btn {
    width: 100%; /* Make button width the same as input fields */
    margin-top: 1.5rem;
    padding: 1rem 2rem;
    background-color: #c2a76b;
    color: #373434;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
    text-align: center; /* Center text inside button */
}

.contact form .btn:hover {
    background-color: #e0c490;
}

#contact-footer-copyright-text {
    top: 9.5rem;
}
