/*=============== CONTACT FORM ENHANCED STYLING ===============*/

/* Base Contact Form Styles */
.contact__form-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(239, 193, 169, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.contact__form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--first-color), var(--first-color-alt));
    border-radius: 1.5rem 1.5rem 0 0;
}

.contact__form-title {
    color: var(--title-color);
    text-align: center;
    font-size: var(--h2-font-size);
    font-weight: var(--font-semi-bold);
    margin-bottom: 2rem;
    position: relative;
}

.contact__form-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--first-color);
    border-radius: 2px;
}

.contact__form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact__form-group {
    position: relative;
    display: flex;
    align-items: center;
}

.contact__form-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: var(--first-color);
    z-index: 2;
    transition: all 0.3s ease;
}

.contact__form-input {
    width: 100%;
    background: #e4ded778;
    border: 2px solid rgba(239, 193, 169, 0.3);
    border-radius: 0.75rem;
    padding: 1rem 1rem 1rem 3rem;
    font-size: var(--normal-font-size);
    color: var(--text-color);
    transition: all 0.3s ease;
    font-family: var(--body-font);
    outline: none;
}

.contact__form-input::placeholder {
    color: rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.contact__form-input:focus {
    background: rgba(239, 193, 169, 0.1);
    border-color: var(--first-color);
    box-shadow: 0 0 0 3px rgba(239, 193, 169, 0.2);
    transform: translateY(-2px);
}

.contact__form-input:focus+.contact__form-icon,
.contact__form-input:focus~.contact__form-icon {
    color: var(--first-color);
    transform: translateY(-50%) scale(1.1);
}

.contact__form-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.contact__form-area .contact__form-input {
    flex-grow: 1;
    resize: none;
    min-height: 120px;
    padding-top: 1rem;
}

.contact__form-area .contact__form-icon {
    top: 1.5rem;
    transform: translateY(0);
}

.contact__form-button {
    background: linear-gradient(135deg, var(--first-color), var(--first-color-alt));
    color: #fff;
    border: none;
    border-radius: 0.75rem;
    padding: 1rem 2rem;
    font-size: var(--normal-font-size);
    font-weight: var(--font-semi-bold);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact__form-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.contact__form-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(239, 193, 169, 0.4);
}

.contact__form-button:hover::before {
    left: 100%;
}

.contact__form-button:active {
    transform: translateY(-1px);
}

/*=============== DARK THEME STYLES ===============*/
body.dark-theme .contact__form-container {
    background: rgba(28, 28, 40, 0.95);
    border-color: rgba(239, 193, 169, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

body.dark-theme .contact__form-title {
    color: #fff;
}

body.dark-theme .contact__form-icon {
    color: var(--first-color);
}

body.dark-theme .contact__form-input {
    background: rgba(40, 40, 50, 0.8);
    border-color: rgba(239, 193, 169, 0.2);
    color: #fff;
}

body.dark-theme .contact__form-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

body.dark-theme .contact__form-input:focus {
    background: rgba(50, 50, 65, 0.9);
    border-color: var(--first-color);
    box-shadow: 0 0 0 3px rgba(239, 193, 169, 0.3);
}

body.dark-theme .contact__form-button {
    background: linear-gradient(135deg, var(--first-color), var(--first-color-alt));
    color: #000;
    font-weight: var(--font-semi-bold);
}

body.dark-theme .contact__form-button:hover {
    box-shadow: 0 10px 25px rgba(239, 193, 169, 0.5);
}

/*=============== RESPONSIVE DESIGN ===============*/
@media screen and (max-width: 768px) {
    .contact__form-container {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }

    .contact__form-title {
        font-size: var(--h3-font-size);
        margin-bottom: 1.5rem;
    }

    .contact__form {
        gap: 1.25rem;
    }

    .contact__form-input {
        padding: 0.875rem 0.875rem 0.875rem 2.75rem;
    }

    .contact__form-icon {
        left: 1rem;
        font-size: 1.1rem;
    }

    .contact__form-button {
        width: 100%;
        padding: 1rem;
    }
}

@media screen and (max-width: 480px) {
    .contact__form-container {
        padding: 1.5rem 1rem;
        border-radius: 1rem;
    }

    .contact__form-title {
        font-size: 1.25rem;
    }

    .contact__form-input {
        padding: 0.75rem 0.75rem 0.75rem 2.5rem;
        font-size: 0.9rem;
    }

    .contact__form-icon {
        left: 0.875rem;
        font-size: 1rem;
    }

    .contact__form-area .contact__form-input {
        min-height: 100px;
    }
}

/*=============== ANIMATION ENHANCEMENTS ===============*/
.contact__form-group {
    animation: slideInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.contact__form-group:nth-child(1) {
    animation-delay: 0.1s;
}

.contact__form-group:nth-child(2) {
    animation-delay: 0.2s;
}

.contact__form-group:nth-child(3) {
    animation-delay: 0.3s;
}

.contact__form-group:nth-child(4) {
    animation-delay: 0.4s;
}

.contact__form-group:nth-child(5) {
    animation-delay: 0.5s;
}

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contact__form-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

body.dark-theme .contact__form-container:hover {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
}

/*=============== ACCESSIBILITY IMPROVEMENTS ===============*/
.contact__form-input:focus {
    outline: 2px solid var(--first-color);
    outline-offset: 2px;
}

.contact__form-button:focus {
    outline: 2px solid var(--first-color);
    outline-offset: 2px;
}

/*=============== RTL SUPPORT ===============*/
body[dir="rtl"] .contact__form-icon {
    left: auto;
    right: 1.25rem;
}

body[dir="rtl"] .contact__form-input {
    padding: 1rem 3rem 1rem 1rem;
}

body[dir="rtl"] .contact__form-area .contact__form-icon {
    right: 1.25rem;
    left: auto;
}

@media screen and (max-width: 768px) {
    body[dir="rtl"] .contact__form-icon {
        right: 1rem;
    }

    body[dir="rtl"] .contact__form-input {
        padding: 0.875rem 2.75rem 0.875rem 0.875rem;
    }
}

@media screen and (max-width: 480px) {
    body[dir="rtl"] .contact__form-icon {
        right: 0.875rem;
    }

    body[dir="rtl"] .contact__form-input {
        padding: 0.75rem 2.5rem 0.75rem 0.75rem;
    }
}

/* Contact Item Text Colors Override */
.contact__item p {
    color: #000000;
}

body.dark-theme .contact__item p {
    color: #ffffff9e;
}

/*=============== ENHANCED MOBILE RTL CONTACT STYLES ===============*/
@media screen and (max-width: 1023px) {

    /* تخطيط النموذج للعربي */
    body.rtl .contact__wrapper,
    body[dir="rtl"] .contact__wrapper {
        display: flex !important;
        flex-direction: column !important;
        gap: 2.5rem;
    }

    body.rtl .contact__form-container,
    body[dir="rtl"] .contact__form-container {
        direction: rtl;
        text-align: right;
    }

    body.rtl .contact__form-title,
    body[dir="rtl"] .contact__form-title {
        text-align: center;
    }

    body.rtl .contact__form-group,
    body[dir="rtl"] .contact__form-group {
        direction: rtl;
    }

    body.rtl .contact__form-input,
    body[dir="rtl"] .contact__form-input {
        text-align: right;
        direction: rtl;
    }

    body.rtl .contact__form-input::placeholder,
    body[dir="rtl"] .contact__form-input::placeholder {
        text-align: right;
    }

    /* معلومات الاتصال */
    body.rtl .contact__info,
    body[dir="rtl"] .contact__info {
        direction: rtl;
    }

    body.rtl .contact__details,
    body[dir="rtl"] .contact__details {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    body.rtl .contact__item,
    body[dir="rtl"] .contact__item {
        display: flex;
        flex-direction: row-reverse;
        align-items: flex-start;
        gap: 1rem;
        text-align: right;
    }

    body.rtl .contact__item>div,
    body[dir="rtl"] .contact__item>div {
        text-align: right;
    }

    body.rtl .contact__item i,
    body[dir="rtl"] .contact__item i {
        flex-shrink: 0;
    }

    /* زر الإرسال */
    body.rtl .contact__form-button,
    body[dir="rtl"] .contact__form-button {
        width: 100%;
        text-align: center;
        direction: rtl;
    }
}

@media screen and (max-width: 576px) {

    body.rtl .contact__form-container,
    body[dir="rtl"] .contact__form-container {
        padding: 1.5rem 1rem;
    }

    body.rtl .contact__item,
    body[dir="rtl"] .contact__item {
        gap: 0.75rem;
    }

    body.rtl .contact__item h4,
    body[dir="rtl"] .contact__item h4 {
        font-size: 0.938rem;
    }

    body.rtl .contact__item p,
    body[dir="rtl"] .contact__item p {
        font-size: 0.875rem;
        line-height: 1.6;
    }
}

@media screen and (max-width: 400px) {

    body.rtl .contact__form-container,
    body[dir="rtl"] .contact__form-container {
        padding: 1.25rem 0.875rem;
    }

    body.rtl .contact__form-title,
    body[dir="rtl"] .contact__form-title {
        font-size: 1.125rem;
    }

    body.rtl .contact__form-input,
    body[dir="rtl"] .contact__form-input {
        font-size: 0.875rem;
    }
}