/* =========================================== */
/* صفحة البحث - تصميم أنيق واحترافي            */
/* =========================================== */

/* المتغيرات الخاصة بالصفحة */
.search-page {
    --search-primary: #f9d7e8;
    --search-primary-light: #fce7f3;
    --search-primary-soft: #fff1f7;
    --search-primary-medium: #f5c6db;
    --search-primary-dark: #db2777;
    --search-accent: #c084fc;
    --search-bg: linear-gradient(165deg, #f8fafc 0%, #f1f5f9 50%, #f8fafc 100%);
    --search-card-bg: rgba(255, 255, 255, 0.9);
    --search-border: rgba(219, 39, 119, 0.1);
    --search-shadow: 0 35px 70px -20px rgba(219, 39, 119, 0.15);
    --search-shadow-hover: 0 45px 80px -20px rgba(219, 39, 119, 0.25);
    --text-dark: #1e293b;
    --text-soft: #475569;
    --text-light: #64748b;
    font-family: 'Tajawal', 'Cairo', sans-serif;
}

/* ===== الحاوية الرئيسية ===== */
.search-page .search-wrapper {
    min-height: 100vh;
    background: var(--search-bg);
    padding: 4rem 1.5rem;
    position: relative;
    overflow: hidden;
}

/* عناصر زخرفية خلفية */
.search-page .search-wrapper::before {
    content: '🔍';
    position: absolute;
    top: 5%;
    left: 5%;
    font-size: 15rem;
    opacity: 0.02;
    transform: rotate(-15deg);
    pointer-events: none;
    color: var(--search-primary-dark);
}

.search-page .search-wrapper::after {
    content: '💑';
    position: absolute;
    bottom: 5%;
    right: 5%;
    font-size: 15rem;
    opacity: 0.02;
    transform: rotate(10deg);
    pointer-events: none;
    color: var(--search-primary-medium);
}

/* ===== البطاقة الرئيسية ===== */
.search-page .search-card {
    max-width: 700px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 3rem;
    padding: 3rem;
    box-shadow: var(--search-shadow);
    border: 1px solid rgba(255, 255, 255, 0.7);
    position: relative;
    z-index: 2;
}

/* ===== الهيدر ===== */
.search-page .search-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.search-page .search-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--search-primary-medium), var(--search-primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 3rem;
    color: white;
    box-shadow: 0 15px 30px rgba(219, 39, 119, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.search-page .search-title {
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.search-page .search-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--search-primary-dark), var(--search-accent), var(--search-primary-dark), transparent);
    border-radius: 3px;
}

.search-page .search-subtitle {
    color: var(--text-soft);
    font-size: 1.1rem;
    margin-top: 1rem;
    font-weight: 400;
}

/* ===== حقول البحث ===== */
.search-page .form-group {
    margin-bottom: 1.8rem;
}

.search-page .form-label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 1rem;
    padding-right: 0.8rem;
}

.search-page .form-label::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--search-primary-dark);
    border-radius: 50%;
    margin-right: 0.3rem;
    opacity: 0.5;
}

.search-page .form-select,
.search-page .form-input {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 2px solid var(--search-border);
    border-radius: 2rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    font-family: 'Tajawal', sans-serif;
    color: var(--text-dark);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%23db2777' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 1rem center;
    background-size: 1.2rem;
}

.search-page .form-select:focus,
.search-page .form-input:focus {
    outline: none;
    border-color: var(--search-primary-dark);
    box-shadow: 0 0 0 4px rgba(219, 39, 119, 0.1);
    background: white;
}

/* ===== مجموعة العمر ===== */
.search-page .age-group {
    display: flex;
    gap: 1rem;
}

.search-page .age-input {
    flex: 1;
}

.search-page .age-input input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--search-border);
    border-radius: 2rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    font-family: 'Tajawal', sans-serif;
    color: var(--text-dark);
    text-align: center;
}

.search-page .age-input input:focus {
    outline: none;
    border-color: var(--search-primary-dark);
    box-shadow: 0 0 0 4px rgba(219, 39, 119, 0.1);
    background: white;
}

.search-page .age-input input::placeholder {
    color: var(--text-light);
    font-weight: 300;
}

/* ===== زر البحث ===== */
.search-page .search-btn {
    background: linear-gradient(135deg, var(--search-primary-medium), var(--search-primary-dark));
    color: white;
    padding: 1.2rem 2.5rem;
    border: none;
    border-radius: 3rem;
    font-weight: 500;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 15px 30px rgba(219, 39, 119, 0.2);
    width: 100%;
    max-width: 300px;
    margin: 2rem auto 0;
    display: block;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.search-page .search-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.search-page .search-btn:hover::before {
    width: 350px;
    height: 350px;
}

.search-page .search-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 35px rgba(219, 39, 119, 0.3);
}

/* ===== نتائج البحث ===== */
.search-page .results-section {
    max-width: 1200px;
    margin: 4rem auto 0;
    position: relative;
    z-index: 2;
}

.search-page .results-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2.5rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.search-page .results-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--search-primary-dark), var(--search-accent), var(--search-primary-dark), transparent);
    border-radius: 3px;
}

/* ===== شبكة النتائج ===== */
.search-page .results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

/* ===== بطاقة النتيجة ===== */
.search-page .result-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 2rem;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 15px 30px rgba(0,0,0,0.05);
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
}

.search-page .result-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 45px rgba(219, 39, 119, 0.15);
}

.search-page .card-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.search-page .result-card:hover .card-image {
    transform: scale(1.05);
}

.search-page .card-info {
    padding: 1.5rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
}

.search-page .card-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
}

.search-page .card-details {
    color: var(--text-soft);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.search-page .card-link {
    display: inline-block;
    background: linear-gradient(135deg, var(--search-primary-medium), var(--search-primary-dark));
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 3rem;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(219, 39, 119, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-page .card-link:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(219, 39, 119, 0.3);
}

/* ===== لا توجد نتائج ===== */
.search-page .no-results {
    text-align: center;
    padding: 4rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 3rem;
    box-shadow: var(--search-shadow);
    border: 1px solid rgba(255, 255, 255, 0.7);
    color: var(--text-soft);
    font-size: 1.2rem;
}

.search-page .no-results p:first-child {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

/* ===== ترقيم الصفحات ===== */
.search-page .pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.search-page .pagination a,
.search-page .pagination span {
    padding: 0.6rem 1.2rem;
    border-radius: 2rem;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(219, 39, 119, 0.2);
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.search-page .pagination a:hover {
    background: rgba(219, 39, 119, 0.1);
    border-color: var(--search-primary-dark);
    transform: translateY(-2px);
}

.search-page .pagination .active span {
    background: linear-gradient(135deg, var(--search-primary-medium), var(--search-primary-dark));
    color: white;
    border: none;
    box-shadow: 0 5px 15px rgba(219, 39, 119, 0.2);
}

/* ===== التجاوب ===== */
@media (max-width: 768px) {
    .search-page .search-wrapper {
        padding: 2rem 1rem;
    }
    
    .search-page .search-card {
        padding: 2rem;
    }
    
    .search-page .search-title {
        font-size: 1.8rem;
    }
    
    .search-page .age-group {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .search-page .results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .search-page .results-title {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .search-page .results-grid {
        grid-template-columns: 1fr;
    }
    
    .search-page .search-btn {
        max-width: 100%;
    }
    
    .search-page .pagination a,
    .search-page .pagination span {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .search-page .search-card {
        padding: 1.5rem;
    }
}
