.contact-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin: 30px auto;
    max-width: 900px;
    width: 100%;
}

@media screen and (min-width: 800px) {
    .contact-container {
        flex-direction: row-reverse;
        align-items: center;
        gap: 40px;
        margin-top: 8vh;
    }
}

.contact {
    background: var(--background-color, #f9fafb);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10), 0 1.5px 4px rgba(0,0,0,0.08);
    padding: 24px 28px;
    margin: 0 auto;
    width: 100%;
    max-width: 420px;
    min-width: 260px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.contact.info {
    border: 1px solid #ffe066;
}

.contact.form {
    border: 1px solid var(--primary-color, #ffcc00);
}

.contact h2 {
    color: var(--secondary-color, #000);
    font-size: 1.3em;
    margin-bottom: 10px;
    text-align: center;
}

.contact p, .contact label {
    color: var(--text-color, #1f2937);
    font-size: 1em;
}

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

label {
    font-weight: bold;
    margin-bottom: 2px;
    color: var(--secondary-color, #000);
}

input[type="text"],
input[type="email"] {
    padding: 10px 12px;
    border: 1px solid var(--secondary-color, #000);
    border-radius: 6px;
    font-size: 1em;
    background: #fff;
    color: var(--text-color, #1f2937);
    transition: border-color 0.2s;
}

input[type="text"]:focus,
input[type="email"]:focus,
#message:focus {
    border-color: var(--primary-color, #ffcc00);
    outline: none;
}

#message {
    display: block;
    min-height: 90px;
    max-height: 220px;
    line-height: 1.5;
    background: #fff;
    margin: 0 0 10px 0;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid var(--secondary-color, #000);
    box-sizing: border-box;
    font-family: inherit;
    font-size: 1em;
    color: var(--text-color, #1f2937);
    resize: vertical;
    transition: border-color 0.2s;
}

button,
#send-response {
    border: none;
    padding: 12px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    background-color: var(--secondary-color, #000);
    color: var(--secondary-text-color, #facc15);
    font-weight: bold;
    margin-top: 8px;
    transition: background 0.2s, color 0.2s, opacity 0.2s;
}

button:hover,
#send-response:hover {
    background-color: var(--primary-color, #ffcc00);
    color: var(--primary-text-color, #000);
    opacity: 0.92;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 10px;
    bottom: 10px;
    max-width: 20%;
    height: fit-content;
    background-color: rgba(255, 255, 255, 0.8);
    border: solid 3px #000;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 0 5px #000;
}

.success {
    color: black;
    background-color: #2ed32e;
    border-color: green;
}

.error {
    color: black;
    background-color: #fd6e6e;
    border-color: red;
}

@media (max-width: 600px) {
    .contact-container {
        flex-direction: column;
        gap: 18px;
        margin: 10px;
    }
    .contact {
        padding: 14px 8px;
        min-width: unset;
        max-width: 100%;
    }
    .modal {
        left: 5vw;
        right: 5vw;
        transform: none;
        min-width: unset;
        max-width: 90vw;
        padding: 10px 8px;
    }
}