.contact-page {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 4vh 0;
    box-sizing: border-box;
}

.contact-container {
    width: 60%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3vh;
    color: var(--color-text);
}

.contact-title {
    font-family: var(--font-family), serif;
    font-size: clamp(22px, 4vh, 36px);
    font-weight: bold;
    margin: 0;
    text-align: center;
}

.contact-whatsapp {
    display: flex;
    align-items: center;
    gap: 1vw;
    flex-wrap: wrap;
    justify-content: center;
    padding: 1.5vh 2vw;
    border: 0.1vh solid var(--color-border);
    border-radius: 0.4vh;
    background-color: var(--color-bg-elevated);
    color: var(--color-text);
    text-decoration: none;
    font-family: var(--font-family), serif;
    font-size: clamp(12px, 2vh, 18px);
    transition: background-color 0.2s ease;
}

.contact-whatsapp:hover {
    background-color: var(--color-hover-bg);
}

.contact-whatsapp-icon {
    width: clamp(24px, 4vh, 36px);
    height: clamp(24px, 4vh, 36px);
    object-fit: contain;
}

.contact-whatsapp-label {
    color: var(--color-text);
}

.contact-whatsapp-number {
    color: var(--color-text);
    font-weight: bold;
    unicode-bidi: plaintext;
}

.contact-email-section {
    width: 100%;
    max-width: 32rem;
    display: flex;
    flex-direction: column;
    gap: 2vh;
}

.contact-section-title {
    font-family: var(--font-family), serif;
    font-size: clamp(16px, 3vh, 24px);
    font-weight: bold;
    margin: 0;
    text-align: center;
    color: var(--color-text);
}

.contact-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5vh;
}

.contact-form .form-group {
    width: 100%;
    position: relative;
    padding-bottom: 2.2vh;
}

.contact-form .input-wrapper {
    position: relative;
    width: 100%;
}

.contact-form .form-input {
    background-color: var(--color-input-bg);
    border: 0.1vh solid var(--color-border);
    border-radius: 0.4vh;
    color: var(--color-text);
    width: 100%;
    padding: 2.5vh 1vw 0.5vh 1vw;
    font-family: var(--font-family), serif;
    font-size: clamp(12px, 2vh, 18px);
    box-sizing: border-box;
}

.contact-form .form-input:not(.contact-message-input) {
    height: 6vh;
}

.contact-message-input {
    min-height: 12vh;
    height: auto;
    resize: vertical;
    line-height: 1.5;
}

.contact-form .floating-label {
    position: absolute;
    left: 1vw;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-family), serif;
    font-size: clamp(12px, 2vh, 18px);
    color: var(--color-text-muted);
    transition: 0.2s ease;
    pointer-events: none;
}

.contact-form .form-input:focus + .floating-label,
.contact-form .form-input:not(:placeholder-shown) + .floating-label {
    top: 0.5vh;
    font-size: clamp(9px, 1.2vh, 13px);
    transform: none;
}

.contact-form .contact-message-input + .floating-label {
    top: 1.2vh;
    transform: none;
}

.contact-form .contact-message-input:focus + .floating-label,
.contact-form .contact-message-input:not(:placeholder-shown) + .floating-label {
    top: 0.5vh;
}

.contact-form .input-error {
    border-color: var(--color-error);
}

.contact-form .form-group > .field-error {
    position: absolute;
    left: 0;
    bottom: 0;
    color: var(--color-error);
    font-family: var(--font-family), serif;
    font-size: clamp(10px, 1.4vh, 14px);
    line-height: 1.2;
    margin: 0;
    display: block;
    pointer-events: none;
}

.contact-send-button {
    width: 100%;
    padding: 1.8vh 0;
    background-color: var(--color-btn-primary-bg);
    color: var(--color-btn-primary-text);
    font-family: var(--font-family), serif;
    font-size: clamp(12px, 2vh, 18px);
    font-weight: bold;
    border: none;
    border-radius: 0.4vh;
    cursor: pointer;
    margin-top: 1vh;
}

.contact-send-button:hover {
    background-color: var(--color-btn-primary-hover);
}

.contact-mailto-hint {
    margin: 1vh 0 0;
    font-family: var(--font-family), serif;
    font-size: clamp(11px, 1.6vh, 15px);
    line-height: 1.5;
    color: var(--color-text-muted);
    text-align: center;
}

html[lang="ar"] .contact-form .form-input:not(.contact-message-input) {
    height: auto;
    min-height: 3rem;
    line-height: 1.65;
}

html[lang="ar"] .contact-form .input-wrapper .form-input:not(.contact-message-input) {
    padding: 1.35rem 1vw 0.6rem;
}

html[lang="ar"] .contact-form .floating-label {
    top: 50%;
    transform: translateY(-52%);
    line-height: 1.2;
}

html[lang="ar"] .contact-form .form-input:focus + .floating-label,
html[lang="ar"] .contact-form .form-input:not(:placeholder-shown) + .floating-label {
    top: 0.35rem;
    transform: none;
    line-height: 1;
}

@media (max-width: 768px) {
    .contact-container {
        width: 90%;
    }

    .contact-whatsapp {
        gap: 2vw;
        padding: 1.5vh 4vw;
    }

    .contact-form .form-input {
        padding: 2.5vh 3vw 0.5vh 3vw;
    }

    .contact-form .floating-label {
        left: 3vw;
    }

    html[lang="ar"] .contact-form .input-wrapper .form-input:not(.contact-message-input) {
        padding: 1.35rem 3vw 0.6rem;
    }
}

html[lang="ar"] .contact-container,
html[lang="ar"] .contact-form {
    direction: ltr;
}

html[lang="ar"] .contact-title,
html[lang="ar"] .contact-section-title,
html[lang="ar"] .contact-whatsapp-label,
html[lang="ar"] .contact-mailto-hint {
    direction: rtl;
    text-align: right;
}

html[lang="ar"] .contact-title {
    text-align: center;
}
