/**
 * ملف تنسيق الواجهة الأمامية - WebSite Directory v2.0.0
 * تصميم عصري، متجاوب، واحترافي
 */

:root {
    --wd-primary: #2563eb;
    --wd-primary-dark: #1d4ed8;
    --wd-secondary: #64748b;
    --wd-success: #22c55e;
    --wd-danger: #ef4444;
    --wd-warning: #f59e0b;
    --wd-info: #06b6d4;
    --wd-bg: #f8fafc;
    --wd-card-bg: #ffffff;
    --wd-text: #1e293b;
    --wd-text-light: #64748b;
    --wd-border: #e2e8f0;
    --wd-radius: 0.75rem;
    --wd-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --wd-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* شبكة المواقع */
.website-listings-section { margin-bottom: 3rem; }
.website-section-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 1.5rem; color: var(--wd-text); border-right: 4px solid var(--wd-primary); padding-right: 1rem; }

.website-listings-grid { display: grid; gap: 1.5rem; margin: 1.5rem 0; }
.website-col-1 { grid-template-columns: 1fr; }
.website-col-2 { grid-template-columns: repeat(2, 1fr); }
.website-col-3 { grid-template-columns: repeat(3, 1fr); }
.website-col-4 { grid-template-columns: repeat(4, 1fr); }

/* بطاقة الموقع */
.website-listing-card {
    background: var(--wd-card-bg);
    border: 1px solid var(--wd-border);
    border-radius: var(--wd-radius);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.website-listing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--wd-shadow-lg);
    border-color: var(--wd-primary);
}

.website-featured-card {
    border: 2px solid var(--wd-warning);
    background: linear-gradient(135deg, #ffffff 0%, #fffbf0 100%);
}

.website-card-thumbnail {
    height: 180px;
    background: #f1f5f9;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.website-card-thumbnail img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.website-listing-card:hover .website-card-thumbnail img { transform: scale(1.1); }

.website-card-body { padding: 1.25rem; flex-grow: 1; }
.website-card-title { margin: 0 0 0.75rem; font-size: 1.125rem; font-weight: 700; line-height: 1.4; }
.website-card-title a { color: var(--wd-text); text-decoration: none; transition: color 0.2s; }
.website-card-title a:hover { color: var(--wd-primary); }

.website-card-meta { display: flex; align-items: center; gap: 1rem; font-size: 0.875rem; color: var(--wd-text-light); }
.website-card-rating { color: var(--wd-warning); font-weight: 600; display: flex; align-items: center; gap: 0.25rem; }

/* لوحة تحكم العضو */
.website-directory-dashboard {
    background: #fff;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--wd-shadow);
    border: 1px solid var(--wd-border);
}

.dashboard-stats { display: flex; gap: 1.5rem; margin-bottom: 2.5rem; }
.stat-box {
    flex: 1;
    background: var(--wd-bg);
    padding: 1.5rem;
    border-radius: 0.75rem;
    text-align: center;
    border: 1px solid var(--wd-border);
}

.stat-count { display: block; font-size: 2rem; font-weight: 800; color: var(--wd-primary); margin-bottom: 0.25rem; }
.stat-label { font-size: 0.875rem; color: var(--wd-text-light); font-weight: 600; }

.wd-dashboard-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.wd-dashboard-table th { background: var(--wd-bg); padding: 1rem; text-align: right; font-weight: 700; color: var(--wd-text); border-bottom: 2px solid var(--wd-border); }
.wd-dashboard-table td { padding: 1rem; border-bottom: 1px solid var(--wd-border); vertical-align: middle; }

.status-active { background: #dcfce7; color: #166534; padding: 0.25rem 0.75rem; border-radius: 1rem; font-size: 0.75rem; font-weight: 700; }
.status-pending { background: #fef9c3; color: #854d0e; padding: 0.25rem 0.75rem; border-radius: 1rem; font-size: 0.75rem; font-weight: 700; }

/* أزرار الإجراءات */
.btn-edit, .btn-delete {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-edit { background: var(--wd-primary); color: #fff; }
.btn-edit:hover { background: var(--wd-primary-dark); }
.btn-delete { background: #fee2e2; color: var(--wd-danger); }
.btn-delete:hover { background: var(--wd-danger); color: #fff; }

/* البحث */
.website-search-wrapper { margin-bottom: 2.5rem; background: var(--wd-bg); padding: 1.5rem; border-radius: 1rem; border: 1px solid var(--wd-border); }
.website-search-form { display: flex; gap: 1rem; }
.website-search-input { flex: 1; padding: 0.75rem 1.25rem; border: 2px solid var(--wd-border); border-radius: 0.75rem; font-size: 1rem; transition: border-color 0.2s; }
.website-search-input:focus { outline: none; border-color: var(--wd-primary); background: #fff; }

.website-btn-primary {
    background: var(--wd-primary);
    color: #fff;
    padding: 0.75rem 2rem;
    border-radius: 0.75rem;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.website-btn-primary:hover { background: var(--wd-primary-dark); }

/* التجاوب */
@media (max-width: 1024px) {
    .website-col-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .website-col-3, .website-col-4 { grid-template-columns: repeat(2, 1fr); }
    .dashboard-stats { flex-direction: column; }
    .website-search-form { flex-direction: column; }
}

@media (max-width: 480px) {
    .website-col-2, .website-col-3, .website-col-4 { grid-template-columns: 1fr; }
    .website-directory-dashboard { padding: 1rem; }
    .wd-dashboard-table thead { display: none; }
    .wd-dashboard-table tr { display: block; margin-bottom: 1rem; border: 1px solid var(--wd-border); border-radius: 0.5rem; padding: 0.5rem; }
    .wd-dashboard-table td { display: flex; justify-content: space-between; border: none; padding: 0.5rem; }
    .wd-dashboard-table td::before { content: attr(data-label); font-weight: 700; }
}
