/* RTL Support for Contact Form - Persian and Arabic */

/* Form Floating Labels RTL */
.form-floating input::placeholder,
.form-floating textarea::placeholder {
    text-align: right !important;
    direction: rtl !important;
}

.form-floating input,
.form-floating textarea {
    text-align: right !important;
    direction: rtl !important;
}

.form-floating label {
    text-align: right !important;
    right: 0.75rem !important;
    left: auto !important;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    right: 0.75rem !important;
    left: auto !important;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem) !important;
}

.form-floating > .form-control:focus,
.form-floating > .form-control:not(:placeholder-shown) {
    padding-right: 1rem !important;
    padding-left: 0.75rem !important;
}

/* Form Validation States RTL */
.form-control.is-valid {
    border-right-color: #198754 !important;
    border-left-color: #dee2e6 !important;
}

.form-control.is-invalid {
    border-right-color: #dc3545 !important;
    border-left-color: #dee2e6 !important;
}

/* Validation Feedback RTL */
.invalid-feedback,
.valid-feedback {
    text-align: right !important;
    direction: rtl !important;
}

/* Alert Messages RTL */
.alert {
    text-align: right !important;
    direction: rtl !important;
}

/* Contact Info Items RTL */
.contact-info-item {
    flex-direction: row !important;
    justify-content: flex-end !important;
    text-align: right !important;
    direction: rtl !important;
    width: 100% !important;
}

.contact-info-item .icon {
    margin-left: 0.75rem !important;
    margin-right: 0 !important;
    order: 1 !important;
    flex-shrink: 0 !important;
}

.contact-info-item .btn-lg-square {
    margin-left: 0.75rem !important;
    margin-right: 0 !important;
    order: 1 !important;
    flex-shrink: 0 !important;
}

.contact-info-item .contact-text {
    order: 2 !important;
    text-align: right !important;
    direction: rtl !important;
    flex: 1 !important;
}

.contact-info-item .text-primary {
    order: 2 !important;
    text-align: right !important;
    direction: rtl !important;
    flex: 1 !important;
}

/* Contact Info Text Items RTL */
.contact-info-item.contact-text-item {
    text-align: right !important;
    direction: rtl !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    width: 100% !important;
}

.contact-info-item.contact-text-item i {
    order: 1 !important;
    margin-left: 0.75rem !important;
    margin-right: 0 !important;
    flex-shrink: 0 !important;
}

.contact-info-item.contact-text-item span {
    order: 2 !important;
    text-align: right !important;
    direction: rtl !important;
    flex: 1 !important;
}

/* Force RTL alignment for all contact info */
.contact-info-section {
    direction: rtl !important;
    text-align: right !important;
}

.contact-info-container {
    direction: rtl !important;
    text-align: right !important;
}

.col-lg-5 {
    direction: rtl !important;
    text-align: right !important;
}

.col-lg-5 .h-100 {
    direction: rtl !important;
    text-align: right !important;
}

.col-lg-5 .wow {
    direction: rtl !important;
    text-align: right !important;
}

/* Override Bootstrap defaults for RTL */
.col-lg-5 .d-flex {
    justify-content: flex-end !important;
}

.col-lg-5 .align-items-center {
    align-items: center !important;
    justify-content: flex-end !important;
}

.col-lg-5 .mb-4 {
    text-align: right !important;
    direction: rtl !important;
}

.col-lg-5 .mb-2 {
    text-align: right !important;
    direction: rtl !important;
}

.col-lg-5 .pt-3 {
    text-align: right !important;
    direction: rtl !important;
}

/* HR Elements RTL */
hr {
    direction: rtl !important;
}

/* Social Media Buttons RTL */
.social-media-buttons {
    justify-content: flex-end !important;
    direction: rtl !important;
}

.social-media-buttons .btn {
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
}

/* Breadcrumb RTL */
.breadcrumb {
    direction: rtl !important;
}

.breadcrumb-item + .breadcrumb-item::before {
    float: right !important;
    padding-left: 0.5rem !important;
    padding-right: 0 !important;
}

/* Form Group RTL */
.form-group {
    direction: rtl !important;
}

/* Button Text RTL */
.btn {
    direction: rtl !important;
}

/* Modal RTL Support */
.modal-header .btn-close {
    margin: calc(-0.5 * var(--bs-modal-header-padding-y)) auto calc(-0.5 * var(--bs-modal-header-padding-y)) calc(-0.5 * var(--bs-modal-header-padding-x)) !important;
}

/* Dropdown RTL */
.dropdown-menu {
    text-align: right !important;
    direction: rtl !important;
}

/* Input Group RTL */
.input-group > .form-control {
    border-radius: 0 0.375rem 0.375rem 0 !important;
}

.input-group > .btn {
    border-radius: 0.375rem 0 0 0.375rem !important;
}

/* Custom RTL Styles for Contact Page */
.contact-form-rtl {
    direction: rtl !important;
}

.contact-form-rtl .form-floating {
    direction: rtl !important;
}

.contact-form-rtl .btn {
    direction: rtl !important;
}

/* RTL Support for Floating Labels Animation */
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem) !important;
}

/* RTL Support for Form Validation Icons */
.form-control.is-valid {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='m2.3 6.73.94-.94 2.54 2.54.94-.94L6.73 8.5 8.5 6.73l-.94-.94L6.73 4.8l-.94.94-2.54-2.54-.94.94L2.3 6.73z'/%3e%3c/svg%3e") !important;
    background-position: right calc(0.375em + 0.1875rem) center !important;
    background-repeat: no-repeat !important;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem) !important;
}

.form-control.is-invalid {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 1.4 1.4m0-1.4-1.4 1.4'/%3e%3c/svg%3e") !important;
    background-position: right calc(0.375em + 0.1875rem) center !important;
    background-repeat: no-repeat !important;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem) !important;
} 