/**
 * شبكة أرشيف المنصات — مطابقة تصميم auction-agents-core (بطاقات المسوقين).
 */

/* حاوية الأرشيف */
.awp-archive-platforms-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    box-sizing: border-box;
}

.awp-archive-title {
    margin: 0 0 40px;
    font-size: 36px;
    font-weight: 700;
    color: #333;
    text-align: right;
    width: 100%;
}

/* ترقيم أرشيف المنصات (RTL + تدرج للصفحة الحالية) */
.awp-archive-pagination {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
    direction: rtl;
}

.awp-archive-pagination .page-numbers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.awp-archive-pagination .page-numbers li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.awp-archive-pagination .page-numbers a,
.awp-archive-pagination .page-numbers span {
    display: inline-block;
    padding: 8px 14px;
    min-width: 44px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: #475569;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    box-sizing: border-box;
}

.awp-archive-pagination .page-numbers a:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.awp-archive-pagination .page-numbers .current,
.awp-archive-pagination .page-numbers span.current {
    background: linear-gradient(135deg, #0f375a 0%, #3e9799 100%);
    color: #fff !important;
    border-color: transparent !important;
    font-weight: 600;
}

.awp-archive-pagination .page-numbers .dots {
    border: none;
    background: transparent;
    min-width: auto;
    padding-left: 6px;
    padding-right: 6px;
}

/* شبكة مثل .aac-agents-container */
.awp-agents-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin: 30px 0;
    padding: 0;
}

.awp-grid-1 {
    grid-template-columns: 1fr;
}

.awp-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.awp-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.awp-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 960px) {
    .awp-grid-3,
    .awp-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .awp-agents-container {
        grid-template-columns: 1fr !important;
    }
}

/* بطاقة منصة ≈ .aac-agent-card */
.awp-p-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 0;
    overflow: visible;
    font-family: 'Segoe UI', Tahoma, Arial, 'Arabic UI Text', 'Arabic Typesetting', sans-serif;
    margin: 0;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    direction: rtl;
    text-align: right;
    position: relative;
}

.awp-p-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #0073aa 0%, #005a87 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 2;
    border-radius: 0 12px 12px 0;
    pointer-events: none;
}

.awp-p-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
    border-color: #cbd5e1;
}

.awp-p-card:hover::before {
    opacity: 1;
}

/* غلاف علوي (بدون شعار عائم) */
.awp-p-card-header {
    position: relative;
    width: 100%;
    height: 200px;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    flex-shrink: 0;
}

.awp-p-card-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.awp-p-card:hover .awp-p-card-cover {
    transform: scale(1.08);
}

.awp-p-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 55%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.45) 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

/* محتوى البطاقة */
.awp-p-card-content {
    padding: 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding-top: 0;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    background: #fff;
}

.awp-p-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    min-height: 52px;
    position: relative;
    transition: background-color 0.2s ease;
}

.awp-p-row::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #0073aa;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.awp-p-row:hover {
    background-color: #f8fafc;
}

.awp-p-row:hover::before {
    opacity: 1;
}

.awp-p-title-row {
    padding: 18px 20px 16px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(to bottom, rgba(248, 250, 252, 0.6), transparent);
}

.awp-p-title-row::before {
    display: none;
}

.awp-p-title-row:hover {
    background: linear-gradient(to bottom, rgba(248, 250, 252, 0.85), transparent);
}

.awp-p-card-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    color: #0f172a;
    width: 100%;
    text-align: right;
}

.awp-p-card-title a {
    color: #0f172a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.awp-p-card-title a:hover {
    color: #0073aa;
}

.awp-p-meta-row {
    background: linear-gradient(to right, rgba(240, 247, 250, 0.5), transparent);
}

.awp-p-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #0073aa;
    flex-shrink: 0;
    margin-left: 12px;
    min-width: 130px;
}

.awp-p-label-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #0073aa;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
}

.awp-p-value {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    text-align: left;
    flex: 1;
    word-break: break-word;
}

.awp-p-value a {
    color: #0073aa;
    text-decoration: none;
}

.awp-p-value a:hover {
    text-decoration: underline;
}

.awp-p-about {
    padding: 12px 20px;
    font-size: 14px;
    line-height: 1.65;
    color: #64748b;
    border-bottom: 1px solid #f1f5f9;
}

/* شارات إحصائيات */
.awp-p-stats-row {
    display: flex;
    gap: 12px;
    padding: 12px 20px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    border-bottom: 1px solid #f1f5f9;
}

.awp-p-stats-row::before {
    display: none !important;
}

.awp-p-stats-row:hover {
    background: transparent !important;
}

.awp-p-stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 12px;
    transition: all 0.2s ease;
}

.awp-p-stat-total {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.awp-p-card:hover .awp-p-stat-total {
    background: #dcfce7;
    border-color: #86efac;
}

.awp-p-stat-total .awp-p-stat-label {
    font-size: 11px;
    font-weight: 500;
    color: #22c55e;
    white-space: nowrap;
}

.awp-p-stat-total .awp-p-stat-value {
    font-size: 13px;
    font-weight: 700;
    color: #15803d;
    white-space: nowrap;
}

.awp-p-stat-live {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.awp-p-card:hover .awp-p-stat-live {
    background: #dbeafe;
    border-color: #93c5fd;
}

.awp-p-stat-live .awp-p-stat-label {
    font-size: 11px;
    font-weight: 500;
    color: #3b82f6;
    white-space: nowrap;
}

.awp-p-stat-live .awp-p-stat-value {
    font-size: 13px;
    font-weight: 700;
    color: #1e40af;
    white-space: nowrap;
}

.awp-p-stat-up {
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.awp-p-stat-up .awp-p-stat-label {
    color: #b45309;
}

.awp-p-stat-up .awp-p-stat-value {
    color: #92400e;
}

/* زر */
.awp-p-card-action {
    padding: 18px 20px;
    border-top: 2px solid #f1f5f9;
    margin-top: auto;
    background: #fafbfc;
}

.awp-p-card-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    border: none;
    line-height: 1.5;
    box-shadow: 0 2px 4px rgba(0, 115, 170, 0.15);
}

.awp-p-card-button:hover {
    background: linear-gradient(135deg, #005a87 0%, #004d6e 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 115, 170, 0.3);
}

.awp-p-button-arrow {
    font-size: 18px;
    transition: transform 0.3s ease;
    display: inline-block;
}

.awp-p-card-button:hover .awp-p-button-arrow {
    transform: translateX(-4px);
}
