/**
 * ملف CSS مخصص لشريط البحث
 * Custom CSS for Search Bar - Redesigned
 */

/* قسم البحث */
.search-section {
    padding: 4rem 0;
    position: relative;
    margin: 3rem 0;
}

/* العنوان */
.search-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.search-title i {
    margin-right: 12px;
    display: inline-block;
    animation: iconFloat 3s ease-in-out infinite;
}

[dir="rtl"] .search-title i {
    margin-right: 0;
    margin-left: 12px;
}

@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* النص الفرعي */
.search-subtitle {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 2.5rem;
    font-weight: 400;
}

/* نموذج البحث */
.search-form {
    margin-top: 2rem;
}

/* الشريط الرئيسي */
.search-wrapper {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 60px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1), 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.search-wrapper:hover {
    box-shadow: 0 15px 50px rgba(102, 126, 234, 0.2), 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.search-wrapper:focus-within {
    border-color: #667eea;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3), 0 0 0 4px rgba(102, 126, 234, 0.1);
}

/* حقل الإدخال */
.search-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-icon {
    position: absolute;
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
    font-size: 1.2rem;
    z-index: 1;
    transition: all 0.3s ease;
}

[dir="rtl"] .search-input-icon {
    left: auto;
    right: 25px;
}

.search-wrapper:focus-within .search-input-icon {
    color: #667eea;
    transform: translateY(-50%) scale(1.1);
}

.search-input {
    width: 100%;
    padding: 1.25rem 1.5rem 1.25rem 60px;
    border: none;
    outline: none;
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
    background: transparent;
}

[dir="rtl"] .search-input {
    padding: 1.25rem 60px 1.25rem 1.5rem;
}

.search-input::placeholder {
    color: #adb5bd;
    font-weight: 400;
}

.search-input:focus {
    outline: none;
}

/* زر البحث */
.search-button {
    padding: 1.25rem 2.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.search-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.search-button:hover::before {
    left: 100%;
}

.search-button i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.search-button:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f91 100%);
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.search-button:hover i {
    transform: scale(1.15);
}

.search-button:active {
    transform: scale(0.98);
}

.search-button span {
    font-weight: 700;
}

/* تأثيرات متقدمة */
@media (max-width: 768px) {
    .search-section {
        padding: 2.5rem 0;
        margin: 2rem 0;
    }
    
    .search-title {
        font-size: 1.75rem;
    }
    
    .search-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .search-input {
        padding: 1rem 1.25rem 1rem 50px;
        font-size: 1rem;
    }
    
    [dir="rtl"] .search-input {
        padding: 1rem 50px 1rem 1.25rem;
    }
    
    .search-input-icon {
        left: 20px;
        font-size: 1rem;
    }
    
    [dir="rtl"] .search-input-icon {
        right: 20px;
    }
    
    .search-button {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    .search-button span {
        display: none;
    }
    
    .search-button i {
        margin: 0;
    }
}

/* تأثيرات إضافية */
.search-wrapper {
    position: relative;
}

.search-wrapper::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #f5576c, #667eea);
    border-radius: 63px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
    background-size: 400% 400%;
    animation: gradientRotate 8s linear infinite;
}

@keyframes gradientRotate {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.search-wrapper:focus-within::after {
    opacity: 0.3;
}

/* تحسينات الوصولية */
.search-input:focus {
    color: #333;
}

.search-button:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}