/* تحسينات متقدمة لنماذج الاتصال والتفاعل
   تصميم عصري يعزز تجربة المستخدم ويزيد من معدلات التحويل
*/

/* قسم الإتصال الرئيسي */
.contact-section-premium {
    position: relative;
    padding: 120px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    overflow: hidden;
}

/* الأشكال الزخرفية في الخلفية */
.contact-shape {
    position: absolute;
    z-index: 1;
}

.contact-shape-1 {
    top: -50px;
    right: -50px;
    width: 300px;
    height: 300px;
    background: linear-gradient(45deg, rgba(77, 176, 255, 0.1), rgba(10, 58, 120, 0.05));
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    animation: floatContact 20s infinite alternate ease-in-out;
}

.contact-shape-2 {
    bottom: -80px;
    left: -50px;
    width: 350px;
    height: 350px;
    background: linear-gradient(45deg, rgba(10, 58, 120, 0.05), rgba(77, 176, 255, 0.1));
    border-radius: 60% 40% 30% 70% / 50% 60% 30% 60%;
    animation: floatContact 25s infinite alternate-reverse ease-in-out;
}

/* رأس القسم */
.contact-header {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
    z-index: 2;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.contact-subtitle {
    font-size: 1.2rem;
    font-weight: 600;
    color: #4db0ff;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: #0a3a78;
    margin-bottom: 25px;
    position: relative;
    display: inline-block;
}

.contact-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 5px;
    background: linear-gradient(to right, #4db0ff, #0a3a78);
    border-radius: 2px;
}

.contact-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    max-width: 800px;
    margin: 0 auto;
}

/* حاوية الإتصال */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    position: relative;
    z-index: 2;
}

/* معلومات الإتصال */
.contact-info, .contact-info-card {
    background: linear-gradient(135deg, #081f43 0%, #0a3a78 100%);
    border-radius: 20px;
    padding: 50px;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    opacity: 0;
    animation: fadeInRight 0.8s ease forwards;
}

.contact-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/pattern-dark.png');
    opacity: 0.1;
}

.info-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 30px;
    position: relative;
}

.info-description {
    font-size: 1.05rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    position: relative;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 25px;
    position: relative;
}

.contact-method-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.method-icon, .contact-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    transition: all 0.3s ease;
    color: #4db0ff;
}

.contact-method-item:hover .method-icon, .contact-info-item:hover .contact-icon {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.method-content {
    display: flex;
    flex-direction: column;
}

.method-title, .contact-text h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #4db0ff;
}

.method-text, .contact-text p, .contact-text a {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.contact-text a:hover {
    color: #4db0ff;
    text-decoration: underline;
}

.social-links, .social-contact {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    margin-top: 40px;
    position: relative;
}

.social-link, .social-contact a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
}

.social-link:hover, .social-contact a:hover {
    background: #fff;
    color: #0a3a78;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* نموذج الإتصال */
.contact-form-wrapper {
    background: #fff;
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    opacity: 0;
    animation: fadeInLeft 0.8s ease forwards;
}

.form-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0a3a78;
    margin-bottom: 30px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group {
    position: relative;
}

.form-label {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1rem;
    color: #888;
    transition: all 0.3s ease;
    pointer-events: none;
}

.form-control {
    width: 100%;
    padding: 20px;
    font-size: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    background: #f8f9fa;
    color: #333;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #4db0ff;
    background: #fff;
    box-shadow: 0 5px 15px rgba(77, 176, 255, 0.1);
}

.form-control:focus + .form-label,
.form-control:not(:placeholder-shown) + .form-label {
    top: -12px;
    right: 15px;
    font-size: 0.8rem;
    padding: 0 10px;
    background: #fff;
    color: #4db0ff;
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 15px;
}

.form-check-input {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    accent-color: #4db0ff;
}

.form-check-label {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
}

.form-button {
    padding: 15px 40px;
    border-radius: 50px;
    background: linear-gradient(45deg, #0a3a78, #4db0ff);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(77, 176, 255, 0.3);
    margin-top: 20px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    width: 100%;
}

.form-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(77, 176, 255, 0.4);
}

.form-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(45deg, #4db0ff, #0a3a78);
    transition: all 0.4s ease;
    z-index: -1;
}

.form-button:hover::before {
    width: 100%;
}

.form-button i {
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-button:hover i {
    transform: translateX(5px);
}

/* حالات الإدخال */
.is-valid {
    border-color: #28a745 !important;
}

.is-invalid {
    border-color: #dc3545 !important;
}

.valid-feedback {
    color: #28a745;
    font-size: 0.8rem;
    margin-top: 5px;
    display: none;
}

.invalid-feedback {
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 5px;
    display: none;
}

.was-validated .form-control:valid ~ .valid-feedback,
.was-validated .form-control.is-valid ~ .valid-feedback {
    display: block;
}

.was-validated .form-control:invalid ~ .invalid-feedback,
.was-validated .form-control.is-invalid ~ .invalid-feedback {
    display: block;
}

/* خريطة الموقع */
.contact-map {
    margin-top: 100px;
    position: relative;
    z-index: 2;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.5s;
}

.map-container {
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

/* أقسام إضافية للإتصال */
.contact-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 100px;
    position: relative;
    z-index: 2;
}

.contact-feature-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    border-top: 5px solid transparent;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.contact-feature-card:nth-child(1) {
    animation-delay: 0.1s;
    border-top-color: #4db0ff;
}

.contact-feature-card:nth-child(2) {
    animation-delay: 0.3s;
    border-top-color: #0a3a78;
}

.contact-feature-card:nth-child(3) {
    animation-delay: 0.5s;
    border-top-color: #4db0ff;
}

.contact-feature-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.12);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, rgba(77, 176, 255, 0.1), rgba(10, 58, 120, 0.05));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 30px;
    color: #0a3a78;
    transition: all 0.3s ease;
}

.contact-feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(10deg);
    background: linear-gradient(45deg, #0a3a78, #4db0ff);
    color: #fff;
    box-shadow: 0 10px 30px rgba(77, 176, 255, 0.3);
}

.feature-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0a3a78;
    margin-bottom: 15px;
}

.feature-text {
    font-size: 1rem;
    line-height: 1.7;
    color: #555;
}

/* FAQ سكشن */
.faq-section {
    margin-top: 100px;
    position: relative;
    z-index: 2;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.7s;
}

.faq-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: #0a3a78;
    margin-bottom: 50px;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: #fff;
    border-radius: 15px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.faq-question {
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: rgba(77, 176, 255, 0.05);
}

.faq-question h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0a3a78;
    margin: 0;
}

.faq-icon {
    color: #4db0ff;
    font-size: 16px;
    transition: all 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 30px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 0 30px 20px;
    max-height: 500px;
}

.faq-answer p {
    font-size: 1rem;
    line-height: 1.7;
    color: #555;
    margin: 0;
}

/* رسائل التنبيه */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    border-right: 4px solid #28a745;
    color: #28a745;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    border-right: 4px solid #dc3545;
    color: #dc3545;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    border-right: 4px solid #ffc107;
    color: #856404;
}

.alert-info {
    background: rgba(23, 162, 184, 0.1);
    border-right: 4px solid #17a2b8;
    color: #17a2b8;
}

.alert-icon {
    font-size: 20px;
}

.alert-message {
    font-size: 0.95rem;
    font-weight: 500;
}

/* أنماط إضافية خاصة بصفحة الاتصال */
.contact-info-card {
    background: linear-gradient(135deg, #081f43 0%, #0a3a78 100%);
    border-radius: 20px;
    padding: 50px;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.contact-info-card h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: #fff;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 25px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #4db0ff;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.contact-info-item:hover .contact-icon {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.contact-text h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #4db0ff;
}

.contact-text p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 5px;
}

.contact-text a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-text a:hover {
    color: #4db0ff;
    text-decoration: underline;
}

.social-contact h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #4db0ff;
}

.social-contact-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-contact-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
}

.social-contact-links a:hover {
    background: #fff;
    color: #0a3a78;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.contact-map {
    margin-top: 30px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.contact-map iframe {
    width: 100%;
    height: 250px;
    border: none;
}

/* التصميم المتجاوب */
@media (max-width: 992px) {
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .contact-features {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .contact-section-premium {
        padding: 80px 0;
    }
    
    .contact-title {
        font-size: 2.2rem;
    }
    
    .contact-info, .contact-form-wrapper {
        padding: 30px;
    }
    
    .form-group-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-features {
        grid-template-columns: 1fr;
    }
    
    .method-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

/* تأثيرات حركية */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes floatContact {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    50% {
        transform: translate(15px, 15px) rotate(5deg);
    }
    100% {
        transform: translate(0, 0) rotate(0deg);
    }
}
