/* 1. Contact Hero Section */
.contact-hero {
    background: url('../img/carousel-1.jpg') center/cover no-repeat; 
    background-size: cover;
    padding: 180px 0 120px;
    margin-top: 80px;
    position: relative;
    overflow: hidden;
    min-height: 90vh;
    display: flex;
    align-items: center;
    animation: backgroundMove 30s linear infinite;
}

/* حركة الخلفية */
@keyframes backgroundMove {
    0% { background-position: center top; }
    50% { background-position: center center; }
    100% { background-position: center top; }
}

.contact-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.03) 0%, transparent 50%);
    z-index: 1;
    animation: overlayMove 25s linear infinite;
}

@keyframes overlayMove {
    0% { transform: translate(0,0); }
    50% { transform: translate(20px, 20px); }
    100% { transform: translate(0,0); }
}

.contact-hero .container {
    position: relative;
    z-index: 2;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 80px 20px 60px;
    position: relative;
}

/* تكبير الخط */
.hero-content h1 {
    font-size: 6rem; 
    font-weight: 800;
    color: #ffffff; 
}

.hero-buttons {
    display: flex;
    gap: 50px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 100px;
    position: relative;
}

/* Hero Buttons - الشكل البيضاوي مع حجم مناسب */
.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

.btn-primary,
.btn-secondary {
    padding: 16px 35px; /* حجم أكبر */
    border-radius: 50px; /* بيضاوي */
    font-size: 1rem; /* خط أكبر */
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    min-width: 200px; /* عرض مناسب */
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.btn-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 2;
}

.btn-primary {
    background: var(--primary-light);
    color: var(--dark);
    border: 2px solid var(--primary-light);
}

.btn-primary:hover {
    background: transparent;
    color: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(93, 201, 224, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--light);
    border: 2px solid var(--light);
}

.btn-secondary:hover {
    background: var(--light);
    color: var(--dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.2);
}

/* أيقونات داخل الأزرار */
.btn-icon i {
    font-size: 1.2rem;
    display: block;
}

/* النص الأساسي والفرعي داخل الأزرار */
.btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.btn-main {
    font-size: 1.1rem;
    font-weight: 700;
}

.btn-sub {
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.8;
}

/* تأثير hover خفيف */
.btn-hover-effect {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.1);
    transform: skewX(-20deg);
    transition: all 0.5s ease;
    z-index: 1;
}

.btn-primary:hover .btn-hover-effect {
    left: 100%;
}

.btn-pulse .pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(37, 211, 102, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    animation: pulse 2s infinite;
    pointer-events: none;
}

.btn-pulse .pulse-ring.delay-1 { animation-delay: 0.5s; }
.btn-pulse .pulse-ring.delay-2 { animation-delay: 1s; }

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

/* =============== Contact Info Cards with Background Icons =============== */
.contact-info-section {
    padding: 100px 0;
    background: var(--dark);
    position: relative;
    overflow: hidden;
}

.contact-info-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 10% 20%, rgba(0, 151, 178, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(0, 124, 145, 0.05) 0%, transparent 40%);
    z-index: 0;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
    position: relative;
    z-index: 1;
}

.section-subtitle {
    display: block;
    color: #0097b2;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.section-title {
    color: var(--light);
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.section-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* Contact Cards Grid */
.contact-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
    position: relative;
    z-index: 1;
}

/* Contact Card */
.contact-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(93, 201, 224, 0.15);
    border-radius: 16px;
    padding: 35px 30px;
    position: relative;
    overflow: hidden;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: cardSlideUp 0.6s ease forwards;
    opacity: 0;
}

.contact-card:nth-child(1) { animation-delay: 0.1s; }
.contact-card:nth-child(2) { animation-delay: 0.2s; }
.contact-card:nth-child(3) { animation-delay: 0.3s; }
.contact-card:nth-child(4) { animation-delay: 0.4s; }

.contact-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.08);
    border-color: #0097b2;
    box-shadow: 
        0 20px 40px rgba(0, 151, 178, 0.15),
        0 10px 20px rgba(0, 151, 178, 0.1),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Card Top Border Animation */
.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #0097b2, #5dc9e0);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.contact-card:hover::before {
    transform: scaleX(1);
}

/* Background Icon (Big Icon) */
.contact-card-bg-icon {
    position: absolute;
    bottom: -20px;
    right: -20px;
    font-size: 8rem;
    color: rgba(0, 151, 178, 0.05);
    z-index: 0;
    transition: all 0.5s ease;
    transform: scale(0.8) rotate(0deg);
    opacity: 0.5;
    filter: blur(2px);
}

.contact-card:hover .contact-card-bg-icon {
    transform: scale(1.2) rotate(15deg) translate(10px, -10px);
    opacity: 0.15;
    color: rgba(0, 151, 178, 0.12);
}

/* Front Icon (Small Icon) */
.contact-card-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(0, 151, 178, 0.2), rgba(93, 201, 224, 0.3));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    font-size: 1.8rem;
    color: #0097b2;
    position: relative;
    z-index: 1;
    box-shadow: 0 8px 20px rgba(0, 151, 178, 0.2);
    transition: all 0.5s ease;
}

.contact-card:hover .contact-card-icon {
    transform: scale(1.3) rotate(20deg);
    background: linear-gradient(135deg, #0097b2, #5dc9e0);
    color: white;
    box-shadow: 0 12px 30px rgba(0, 151, 178, 0.4);
}

/* Card Content */
.contact-card-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.contact-card-title {
    font-size: 1.3rem;
    color: var(--light);
    margin-bottom: 12px;
    font-weight: 600;
}

.contact-card-link {
    display: block;
    font-size: 1.5rem;
    color: #0097b2;
    margin-bottom: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 700;
    position: relative;
    padding-bottom: 8px;
}

.contact-card-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #0097b2, #5dc9e0);
    transition: width 0.3s ease;
}

.contact-card:hover .contact-card-link::after {
    width: 100%;
}

.contact-card-link:hover {
    color: #5dc9e0;
    transform: translateX(5px);
}

.contact-card-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

/* Hover Light Effect */
.contact-card-hover {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(0, 151, 178, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    transition: all 0.6s ease;
    pointer-events: none;
    z-index: 0;
}

.contact-card:hover .contact-card-hover {
    width: 350px;
    height: 350px;
}

/* Animation for Cards */
@keyframes cardSlideUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .section-title { font-size: 2.5rem; }
    .contact-cards-grid { gap: 25px; }
}

@media (max-width: 992px) {
    .contact-info-section { padding: 80px 0; }
    .section-title { font-size: 2.2rem; }
    .contact-card { min-height: 200px; padding: 30px 25px; }
    .contact-card-bg-icon { font-size: 6rem; bottom: -15px; right: -15px; }
}

@media (max-width: 768px) {
    .section-header { margin-bottom: 50px; padding: 0 20px; }
    .section-title { font-size: 2rem; }
    .contact-cards-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .contact-card { min-height: 180px; padding: 25px 20px; }
    .contact-card-icon { width: 60px; height: 60px; font-size: 1.5rem; margin-bottom: 20px; }
    .contact-card-title { font-size: 1.2rem; }
    .contact-card-link { font-size: 1.3rem; }
    .contact-card-bg-icon { font-size: 5rem; bottom: -10px; right: -10px; }
}

@media (max-width: 576px) {
    .contact-info-section { padding: 60px 20px; }
    .section-title { font-size: 1.8rem; }
    .section-subtitle { font-size: 1rem; }
    .section-description { font-size: 1rem; }
    .contact-cards-grid { grid-template-columns: 1fr; gap: 20px; max-width: 400px; margin: 40px auto 0; }
    .contact-card { min-height: 170px; padding: 25px; }
    .contact-card-bg-icon { font-size: 4.5rem; bottom: -10px; right: -10px; }
}

/* RTL Support */
[dir="rtl"] .contact-card-link::after { left: auto; right: 0; }
[dir="rtl"] .contact-card-link:hover { transform: translateX(-5px); }
[dir="rtl"] .contact-card-bg-icon { right: auto; left: -20px; }

@media (max-width: 992px) { [dir="rtl"] .contact-card-bg-icon { left: -15px; } }
@media (max-width: 768px) { [dir="rtl"] .contact-card-bg-icon { left: -10px; } }
@media (max-width: 576px) { [dir="rtl"] .contact-card-bg-icon { left: -10px; } }


/* 3. Contact Form & Map Section */
.contact-form-section {
    padding: 80px 0;
    background: var(--light-gray);
}

.form-map-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 40px;
}

.map-container {
    height: 100%;
}

.map-wrapper {
    position: relative;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.map-wrapper:hover {
    transform: translateY(-5px);
}

.contact-map {
    width: 100%;
    height: 100%;
    min-height: 500px;
    border: none;
    display: block;
}

.map-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(10, 25, 41, 0.9), transparent);
    padding: 20px;
    color: var(--light);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.map-wrapper:hover .map-overlay {
    opacity: 1;
    transform: translateY(0);
}

.btn-map-directions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-light);
    color: var(--dark);
    padding: 8px 16px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-map-directions:hover {
    background: var(--light);
    transform: translateY(-2px);
}

/* Form Styles */
.form-container {
    background: var(--light);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.form-header {
    margin-bottom: 25px;
}

.form-title {
    font-size: 1.8rem;
    color: var(--dark);
    margin-bottom: 8px;
}

.form-description {
    color: var(--gray);
    margin-bottom: 0;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 20px;
}

.input-group {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 1.1rem;
    z-index: 2;
    transition: all 0.3s ease;
}

.input-group.focused .input-icon {
    color: var(--primary-light);
    transform: translateY(-50%) scale(1.1);
}

.form-control {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: var(--light);
    color: var(--dark);
}

.form-control:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(93, 201, 224, 0.1);
    outline: none;
}

.input-group.focused .form-control {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(93, 201, 224, 0.1);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23007c91' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 14px;
    padding-right: 40px;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.form-error {
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 5px;
    display: none;
}

.form-error.show {
    display: block;
    animation: shake 0.5s ease;
}

.btn-submit {
    width: 100%;
    padding: 15px;
    background: var(--primary);
    color: var(--light);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-submit:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 124, 145, 0.2);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loading,
.btn-success {
    display: none;
}

.btn-submit.loading .btn-loading {
    display: flex;
    animation: pulse 1.5s infinite;
}

.btn-submit.success .btn-success {
    display: flex;
    animation: successPop 0.5s ease;
}

.privacy-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 20px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    color: #6c757d;
    font-size: 0.85rem;
}

.form-response {
    margin-top: 25px;
    display: none;
}

.success-message,
.error-message {
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.success-message i,
.error-message i {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #25d366;
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 15px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-whatsapp:hover {
    background: #1da851;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.2);
}


/* 4. FAQ Section */
.faq-section {
    padding: 80px 0;
    background: #ffffff; /* الخلفية أبيض */
    position: relative;
    overflow: hidden;
}

.faq-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(13,33,55,0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(13,33,55,0.05) 0%, transparent 50%);
    pointer-events: none;
}

.faq-grid {
    max-width: 900px;
    margin: 50px auto 0;
}

.faq-item {
    background: rgba(13,33,55,0.05); /* خفيف على الأبيض */
    border: 1px solid rgba(13,33,55,0.15);
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.faq-item:hover {
    border-color: rgba(13,33,55,0.3);
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(13,33,55,0.15);
}

.faq-item.active {
    background: rgba(13,33,55,0.1);
    border-color: #0d2137;
    box-shadow: 0 10px 30px rgba(13,33,55,0.2);
}

.faq-question {
    width: 100%;
    padding: 22px 25px;
    background: none;
    border: none;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: #0d2137; /* النص كحلي */
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.faq-question:hover {
    color: #005d6e; /* ممكن خلي أفتح قليلاً على hover */
}

.faq-question::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: #0d2137; /* الخط كحلي */
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question::before {
    transform: scaleY(1);
}

.faq-question i {
    color: #0d2137; /* الأيقونة كحلي */
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-left: 10px;
    flex-shrink: 0;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
    color: #0d2137; /* الأيقونة عند الفتح كحلي */
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                opacity 0.4s ease,
                padding 0.4s ease;
    opacity: 0;
    transform: translateY(-10px);
}

.faq-item.active .faq-answer {
    max-height: 500px;
    opacity: 1;
    transform: translateY(0);
}

.faq-answer p {
    color: #0d2137; /* النص كحلي */
    margin: 0;
    line-height: 1.7;
    font-size: 1rem;
    padding: 0 25px 25px 25px;
    animation: fadeInText 0.5s ease 0.2s both;
}

/* Section Titles */
.faq-section .section-title {
    color: #0d2137; /* العنوان كحلي */
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.faq-section .section-subtitle {
    color: #0d2137; /* كحلي */
    font-size: 1.1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
}

.faq-section .section-description {
    color: rgba(13,33,55,0.8); /* الوصف كحلي داكن */
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* 5. Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: #0d2137; /* داكن كحلي */
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 10px rgba(0, 124, 145, 0.3);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #005d6e; /* أفتح قليل على hover */
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 124, 145, 0.4);
}

/* 6. Map Loading Styles */
.map-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 25, 41, 0.9), rgba(0, 124, 145, 0.8));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 10;
    transition: opacity 0.3s ease;
    border-radius: 12px;
}

.map-loading i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    animation: mapLoadingSpin 2s linear infinite;
}

.map-loading-dots span {
    width: 6px;
    height: 6px;
    background: var(--primary-light);
    border-radius: 50%;
    animation: mapLoadingDots 1.4s ease-in-out infinite;
}

/* =============== Animations =============== */
@keyframes contentSlideIn {
    0% {
        opacity: 0;
        transform: translateY(60px);
    }
    100% {
        opacity: 1;
        transform: translateY(40px);
    }
}

@keyframes slideInRightSmooth {
    0% {
        opacity: 0;
        transform: translateX(80px) translateY(30px);
        filter: blur(10px);
    }
    40% {
        filter: blur(4px);
    }
    100% {
        opacity: 1;
        transform: translateX(0) translateY(0);
        filter: blur(0);
    }
}

@keyframes lineGlow {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    60% {
        opacity: 0.6;
        transform: scale(1);
    }
    100% {
        opacity: 0.4;
        transform: scale(1);
    }
}

@keyframes fadeInUpSmooth {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    70% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes expandLineSmooth {
    0% {
        width: 0;
        opacity: 0;
    }
    30% {
        opacity: 0.3;
    }
    100% {
        width: 180px;
        opacity: 1;
    }
}

@keyframes fadeInButtons {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInIndicator {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 0.8;
        transform: translateY(0);
    }
}

@keyframes scrollWheel {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

@keyframes successPop {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    70% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

@keyframes mapLoadingSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes mapLoadingDots {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.3;
    }
    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

@keyframes fadeInText {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =============== Responsive Design =============== */
@media (max-width: 1200px) {
    .form-map-grid {
        gap: 25px;
    }
    
    .contact-hero {
        padding: 160px 0 100px;
        min-height: 85vh;
    }
    
    .hero-content {
        padding: 70px 20px 50px;
        transform: translateY(30px);
    }
    
    .hero-title .line-1 {
        font-size: 3.8rem;
    }
    
    .hero-title .line-2 {
        font-size: 3.4rem;
    }
    
    @keyframes contentSlideIn {
        0% {
            opacity: 0;
            transform: translateY(50px);
        }
        100% {
            opacity: 1;
            transform: translateY(30px);
        }
    }
}

@media (max-width: 992px) {
    .contact-hero {
        padding: 140px 0 80px;
        min-height: 80vh;
    }
    
    .hero-content {
        padding: 60px 20px 40px;
        transform: translateY(20px);
    }
    
    .form-map-grid {
        grid-template-columns: 1fr;
    }
    
    .map-wrapper {
        min-height: 350px;
    }
    
    .contact-map {
        min-height: 350px;
    }
    
    .hero-title .line-1 {
        font-size: 3.2rem;
        animation: slideInRightSmooth 1s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
    }
    
    .hero-title .line-2 {
        font-size: 2.9rem;
        animation: slideInRightSmooth 1s cubic-bezier(0.16, 1, 0.3, 1) 0.7s forwards;
    }
    
    .hero-description {
        font-size: 1.2rem;
        animation: fadeInUpSmooth 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.9s forwards;
    }
    
    .faq-section {
        padding: 60px 0;
    }
    
    .faq-section .section-title {
        font-size: 2.2rem;
    }
    
    .faq-question {
        padding: 20px;
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .contact-hero {
        padding: 120px 0 60px;
        min-height: 75vh;
    }
    
    .hero-content {
        padding: 50px 20px 30px;
        transform: translateY(15px);
    }
    
    .contact-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-card {
        min-height: 180px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        animation: fadeInButtons 0.6s cubic-bezier(0.16, 1, 0.3, 1) 1.1s forwards;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 280px;
    }
    
    .hero-title .line-1 {
        font-size: 2.8rem;
        animation: slideInRightSmooth 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
    }
    
    .hero-title .line-2 {
        font-size: 2.5rem;
        animation: slideInRightSmooth 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.7s forwards;
    }
    
    .hero-title .line-2::after {
        top: -6px;
        left: -10px;
        right: -10px;
        bottom: -6px;
        filter: blur(15px);
    }
    
    .hero-description {
        font-size: 1.1rem;
        animation: fadeInUpSmooth 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.9s forwards;
    }
    
    .form-control {
        font-size: 16px;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 14px 20px;
    }
    
    .form-container {
        padding: 25px 15px;
    }
    
    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .faq-section {
        padding: 50px 0;
    }
    
    .faq-section .section-title {
        font-size: 2rem;
    }
    
    .faq-grid {
        margin: 40px auto 0;
    }
    
    .faq-question {
        padding: 18px 20px;
        font-size: 1.05rem;
    }
    
    .faq-answer p {
        padding: 0 20px 20px 20px;
        font-size: 0.95rem;
    }
}

@media (max-width: 576px) {
    .contact-hero {
        padding: 100px 0 40px;
        min-height: 70vh;
    }
    
    .hero-content {
        padding: 40px 15px 20px;
        transform: translateY(10px);
    }
    
    .hero-title .line-1 {
        font-size: 2.4rem;
        animation: slideInRightSmooth 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
    }
    
    .hero-title .line-2 {
        font-size: 2.2rem;
        animation: slideInRightSmooth 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.7s forwards;
    }
    
    .hero-title .line-2::after {
        display: none;
    }
    
    .hero-description {
        font-size: 1rem;
        padding: 0 10px 15px;
        animation: fadeInUpSmooth 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.9s forwards;
    }
    
    .contact-card {
        padding: 20px;
    }
    
    .contact-card-link {
        font-size: 1.1rem;
    }
    
    .form-title {
        font-size: 1.6rem;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 12px 25px;
        font-size: 0.95rem;
        min-width: 160px;
    }
    
    .faq-section {
        padding: 40px 15px;
    }
    
    .faq-section .section-title {
        font-size: 1.8rem;
    }
    
    .faq-section .section-subtitle {
        font-size: 1rem;
    }
    
    .faq-section .section-description {
        font-size: 1rem;
        padding: 0 10px;
    }
    
    .faq-question {
        padding: 16px 18px;
        font-size: 1rem;
    }
    
    .faq-question i {
        font-size: 0.9rem;
    }
    
    .faq-answer p {
        padding: 0 18px 18px 18px;
        font-size: 0.9rem;
    }
}

/* =============== RTL Support =============== */
[dir="rtl"] .input-icon {
    left: auto;
    right: 15px;
}

[dir="rtl"] .form-control,
[dir="rtl"] .form-control:focus {
    padding: 12px 45px 12px 15px;
    text-align: right;
}

[dir="rtl"] select.form-control {
    background-position: left 15px center;
    padding-left: 40px;
    padding-right: 15px;
}

[dir="rtl"] .faq-question {
    text-align: right;
    flex-direction: row-reverse;
}

[dir="rtl"] .faq-question i {
    margin-left: 0;
    margin-right: 10px;
}

[dir="rtl"] .faq-question::before {
    left: auto;
    right: 0;
}

[dir="rtl"] .faq-item:hover {
    transform: translateX(-5px);
}

[dir="rtl"] .privacy-notice {
    flex-direction: row-reverse;
    text-align: right;
}

[dir="rtl"] .back-to-top {
    right: auto;
    left: 20px;
}

/* =============== Accessibility & Performance =============== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-color-scheme: dark) {
    .form-container {
        background: var(--dark);
    }
    
    .form-title,
    .form-control,
    .form-control:focus {
        color: var(--light);
    }
    
    .form-control {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .privacy-notice {
        background: rgba(255, 255, 255, 0.05);
    }
}

.contact-card-link {
    display: inline-block;
    white-space: nowrap; /* يمنع الالتفاف */
    overflow: hidden;
    text-overflow: ellipsis; /* لو المكان ضيق يظهر ... */
    direction: ltr; /* يجعل الإيميل يكتب من اليسار لليمين حتى في العربي */
}
/* ===== RTL Form Arabic ===== */
body[lang="ar"] .contact-form,
body[lang="ar"] .contact-form .form-control,
body[lang="ar"] .contact-form select,
body[lang="ar"] .contact-form textarea {
    direction: rtl;       /* من اليمين لليسار */
    text-align: right;    /* النصوص في اليمين */
}

body[lang="ar"] .contact-form .form-control::placeholder,
body[lang="ar"] .contact-form textarea::placeholder {
    text-align: right;    /* placeholder يبقى على اليمين */
}

body[lang="ar"] .contact-form select option {
    text-align: right;    /* خيارات الـ select في اليمين */
}

/* زر الإرسال */
body[lang="ar"] .contact-form .btn-submit {
    text-align: center;   /* محتوى الزر يبقى وسط */
}

/* =============== Contact Hero Animation =============== */
.contact-hero {
    background: url('../img/carousel-1.jpg') center/cover no-repeat; 
    background-size: cover;
    background-attachment: fixed; /* تأثير parallax ثابت */
    padding: 180px 0 120px;
    margin-top: 80px;
    position: relative;
    overflow: hidden;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

/* إزالة الطبقة الشفافة تماماً */
/* .contact-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(10, 25, 41, 0.8) 0%,
        rgba(0, 74, 92, 0.75) 100%);
    z-index: 1;
} */

.contact-hero .container {
    position: relative;
    z-index: 2;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 80px 20px 60px;
    position: relative;
    opacity: 0;
    animation: fadeInContent 1s ease forwards;
    animation-delay: 0.5s;
}

@keyframes fadeInContent {
    to {
        opacity: 1;
    }
}

/* العنوان الرئيسي - إضافة تأثير نصي لتحسين القراءة */
.hero-content h1 {
    font-size: 6rem; 
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 30px;
    overflow: hidden;
    position: relative;
    text-shadow: 
        0 2px 10px rgba(0, 0, 0, 0.8),
        0 0 30px rgba(0, 0, 0, 0.6);
}

/* تحسين النص لجعله أوضح على الصورة */
.hero-description {
    font-size: 1.4rem;
    color: #ffffff;
    margin-bottom: 50px;
    line-height: 1.6;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    transform: translateY(30px);
    animation: slideUpDescription 1s ease forwards;
    animation-delay: 1.2s;
    text-shadow: 
        0 1px 5px rgba(0, 0, 0, 0.7),
        0 0 20px rgba(0, 0, 0, 0.5);
}

/* خلفية شبه شفافة للنص فقط (اختياري) */
.text-background {
    background: rgba(10, 25, 41, 0.3);
    backdrop-filter: blur(5px);
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* إضافة هذا الكلاس إلى hero-content إذا أردت خلفية للنص فقط */
.hero-content.with-bg {
    background: rgba(10, 25, 41, 0.3);
    backdrop-filter: blur(5px);
    padding: 60px 40px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* الأنميشن للغة الإنجليزية: من اليسار لليمين */
body[lang="en"] .hero-content h1,
body:not([lang]) .hero-content h1,
body:not([dir="rtl"]) .hero-content h1 {
    opacity: 0;
    transform: translateX(-100px);
    animation: slideFromLeft 1.2s ease forwards;
    animation-delay: 0.8s;
}

/* الأنميشن للغة العربية: من اليمين لليسار */
body[lang="ar"] .hero-content h1,
body[dir="rtl"] .hero-content h1 {
    opacity: 0;
    transform: translateX(100px);
    animation: slideFromRight 1.2s ease forwards;
    animation-delay: 0.8s;
}

@keyframes slideFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-100px);
    }
    70% {
        transform: translateX(10px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideFromRight {
    0% {
        opacity: 0;
        transform: translateX(100px);
    }
    70% {
        transform: translateX(-10px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideUpDescription {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* الأنميشن للأزرار */
.hero-buttons {
    display: flex;
    gap: 50px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 100px;
    position: relative;
    opacity: 0;
    animation: fadeInButtons 1s ease forwards;
    animation-delay: 1.5s;
}

@keyframes fadeInButtons {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* تأثير تحريك الحروف كلمة كلمة */
.hero-title {
    display: inline-block;
    position: relative;
}

/* لحروف اللغة الإنجليزية */
body[lang="en"] .hero-title span.word,
body:not([lang]) .hero-title span.word,
body:not([dir="rtl"]) .hero-title span.word {
    display: inline-block;
    opacity: 0;
    transform: translateX(-50px);
    animation: wordSlideInRight 0.6s ease forwards;
}

@keyframes wordSlideInRight {
    0% {
        opacity: 0;
        transform: translateX(-50px);
    }
    70% {
        transform: translateX(10px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* لحروف اللغة العربية */
body[lang="ar"] .hero-title span.word,
body[dir="rtl"] .hero-title span.word {
    display: inline-block;
    opacity: 0;
    transform: translateX(50px);
    animation: wordSlideInLeft 0.6s ease forwards;
}

@keyframes wordSlideInLeft {
    0% {
        opacity: 0;
        transform: translateX(50px);
    }
    70% {
        transform: translateX(-10px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* تأخير لكل كلمة */
.hero-title span.word:nth-child(1) { animation-delay: 0.9s; }
.hero-title span.word:nth-child(2) { animation-delay: 1s; }
.hero-title span.word:nth-child(3) { animation-delay: 1.1s; }
.hero-title span.word:nth-child(4) { animation-delay: 1.2s; }
.hero-title span.word:nth-child(5) { animation-delay: 1.3s; }

/* الأزرار كما هي */
.btn-primary,
.btn-secondary {
    padding: 16px 35px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    min-width: 200px;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary-light);
    color: var(--dark);
    border: 2px solid var(--primary-light);
    text-shadow: none; /* إزالة text-shadow من الأزرار */
}

.btn-primary:hover {
    background: transparent;
    color: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(93, 201, 224, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--light);
    border: 2px solid var(--light);
}

.btn-secondary:hover {
    background: var(--light);
    color: var(--dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.2);
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 1200px) {
    .hero-content h1 {
        font-size: 5rem;
    }
    
    .hero-content.with-bg {
        padding: 50px 30px;
    }
    
    body[lang="en"] .hero-content h1 {
        animation: slideFromLeft 1s ease forwards;
    }
    
    body[lang="ar"] .hero-content h1 {
        animation: slideFromRight 1s ease forwards;
    }
}

@media (max-width: 992px) {
    .contact-hero {
        padding: 150px 0 100px;
        min-height: 80vh;
        background-attachment: scroll; /* إزالة parallax على الموبايل */
    }
    
    .hero-content h1 {
        font-size: 4rem;
    }
    
    .hero-description {
        font-size: 1.2rem;
    }
    
    .hero-content.with-bg {
        padding: 40px 25px;
    }
}

@media (max-width: 768px) {
    .contact-hero {
        padding: 120px 0 80px;
        min-height: 70vh;
    }
    
    .hero-content {
        padding: 60px 20px 40px;
    }
    
    .hero-content.with-bg {
        padding: 35px 20px;
    }
    
    .hero-content h1 {
        font-size: 3.2rem;
        text-shadow: 
            0 2px 8px rgba(0, 0, 0, 0.9),
            0 0 25px rgba(0, 0, 0, 0.7);
    }
    
    .hero-description {
        font-size: 1.1rem;
        text-shadow: 
            0 1px 4px rgba(0, 0, 0, 0.8),
            0 0 15px rgba(0, 0, 0, 0.6);
    }
    
    .hero-buttons {
        gap: 20px;
        margin-top: 60px;
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 576px) {
    .contact-hero {
        padding: 100px 0 60px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content.with-bg {
        padding: 30px 15px;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    body[lang="en"] .hero-content h1 {
        animation: slideFromLeft 0.8s ease forwards;
    }
    
    body[lang="ar"] .hero-content h1 {
        animation: slideFromRight 0.8s ease forwards;
    }
    
    .hero-title span.word {
        animation-duration: 0.5s;
    }
}