/* ========================================
   AI Tools Aggregator - التصميم الاحترافي
   ======================================== */

.aita-tools-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', 'Tahoma', system-ui, sans-serif;
}

/* عنوان القسم */
.aita-section-title {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* صندوق البحث */
.aita-search-box {
    position: relative;
    margin: 25px 0;
}
#aita-search-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 60px;
    transition: all 0.3s ease;
    background: white;
}
#aita-search-input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: #aaa;
}

/* أزرار الفلترة */
.aita-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}
.filter-btn {
    background: #f0f0f0;
    border: none;
    padding: 10px 24px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 14px;
}
.filter-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}
.filter-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* تصنيفات */
.aita-categories-filter {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
    padding: 15px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}
.filter-label {
    font-weight: bold;
    color: #555;
}
.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.cat-filter-btn {
    background: transparent;
    border: 1px solid #ddd;
    padding: 6px 16px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}
.cat-filter-btn:hover,
.cat-filter-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* شبكة الكروت */
.aita-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
    margin: 40px 0;
}

/* الكرت الواحد */
.tool-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    cursor: pointer;
}
.tool-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.15);
}
.tool-card-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* صورة الأداة */
.tool-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}
.tool-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.tool-card:hover .tool-image img {
    transform: scale(1.05);
}
.price-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: bold;
    color: white;
}
.price-badge.free { background: #10b981; }
.price-badge.paid { background: #f59e0b; }
.price-badge.freemium { background: #3b82f6; }
.tool-views {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
}

/* محتوى الكرت */
.tool-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.tool-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #1a1a2e;
}
.tool-description {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 15px 0;
    flex: 1;
}
.tool-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #888;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* أزرار الكرت */
.tool-actions {
    display: flex;
    gap: 10px;
}
.btn-view, .btn-visit {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
}
.btn-view {
    background: #f0f0f0;
    color: #333;
}
.btn-view:hover {
    background: #667eea;
    color: white;
}
.btn-visit {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}
.btn-visit:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* زر تحميل المزيد */
.load-more-btn {
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
    padding: 12px 35px;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}
.load-more-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

/* وضع مظلم (Dark Mode) */
@media (prefers-color-scheme: dark) {
    .tool-card { background: #1e1e2f; }
    .tool-title { color: #fff; }
    .tool-description { color: #aaa; }
    .btn-view { background: #2a2a3a; color: #ddd; }
    .filter-btn { background: #2a2a3a; color: #ddd; }
    #aita-search-input { background: #1e1e2f; border-color: #333; color: white; }
}

/* متجاوب للجوال */
@media (max-width: 768px) {
    .aita-tools-grid { grid-template-columns: 1fr; gap: 20px; }
    .aita-filters { justify-content: center; }
    .tool-actions { flex-direction: column; }
    .aita-section-title { font-size: 24px; }
}

/* أنيميشن ظهور الكروت */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.tool-card {
    animation: fadeInUp 0.6s ease forwards;
}