/**
 * أمثلة المقايضة — أنماط الواجهة الأمامية
 * يدعم RTL + الجوال + Hover + Fade-in
 */

.hwk-examples-section {
    padding: 64px 0;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    direction: rtl;
    font-family: 'Tajawal', 'Cairo', system-ui, -apple-system, sans-serif;
    position: relative;
    overflow: hidden;
}

.hwk-examples-section::before {
    content: "";
    position: absolute;
    top: -120px;
    inset-inline-start: -120px;
    width: 320px; height: 320px;
    background: radial-gradient(circle, rgba(255,159,28,0.10) 0%, transparent 70%);
    pointer-events: none;
}
.hwk-examples-section::after {
    content: "";
    position: absolute;
    bottom: -120px;
    inset-inline-end: -120px;
    width: 320px; height: 320px;
    background: radial-gradient(circle, rgba(31,59,87,0.10) 0%, transparent 70%);
    pointer-events: none;
}

.hwk-examples-section .hwk-ld-container {
    max-width: 1200px; margin: 0 auto; padding: 0 24px;
    position: relative; z-index: 1;
}

.hwk-examples-head { text-align: center; margin-bottom: 40px; }
.hwk-examples-head h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800; color: #1e293b; margin: 0 0 12px;
}
.hwk-examples-head p {
    font-size: 16px; color: #64748b; max-width: 700px; margin: 0 auto;
    line-height: 1.7;
}

/* === الشبكة === */
.hwk-examples-grid {
    display: grid;
    gap: 20px;
}
.hwk-examples-cols-2 { grid-template-columns: repeat(2, 1fr); }
.hwk-examples-cols-3 { grid-template-columns: repeat(3, 1fr); }
.hwk-examples-cols-4 { grid-template-columns: repeat(4, 1fr); }
.hwk-examples-cols-6 { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 1024px) {
    .hwk-examples-cols-4 { grid-template-columns: repeat(3, 1fr); }
    .hwk-examples-cols-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .hwk-examples-cols-2,
    .hwk-examples-cols-3,
    .hwk-examples-cols-4,
    .hwk-examples-cols-6 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
    .hwk-examples-cols-2,
    .hwk-examples-cols-3,
    .hwk-examples-cols-4,
    .hwk-examples-cols-6 { grid-template-columns: 1fr; }
}

/* === البطاقة === */
.hwk-ex-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease,
                border-color 0.3s ease;
    display: flex; flex-direction: column;
    position: relative;
    will-change: transform;
}

.hwk-ex-card::before {
    content: "";
    position: absolute;
    top: 0; inset-inline-start: 0; right: 0;
    height: 4px;
    background: var(--hwk-ex-color, #6366f1);
    transition: height 0.3s ease;
}

.hwk-ex-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 35px -10px rgba(0,0,0,0.15);
    border-color: var(--hwk-ex-color, #6366f1);
}
.hwk-ex-card:hover::before { height: 6px; }

.hwk-ex-card-top {
    padding: 28px 24px 0;
    display: flex; justify-content: center;
}
.hwk-ex-icon {
    width: 72px; height: 72px;
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 28px;
    background: var(--hwk-ex-color, #6366f1);
    box-shadow: 0 10px 20px -6px var(--hwk-ex-color, #6366f1);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.hwk-ex-card:hover .hwk-ex-icon {
    transform: scale(1.1) rotate(-5deg);
}

.hwk-ex-thumb {
    width: 100%;
    height: 160px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    margin-top: 8px;
}

.hwk-ex-card-body {
    padding: 18px 20px 14px;
    flex: 1;
}
.hwk-ex-title {
    font-size: 15px; font-weight: 700; color: #1e293b;
    margin: 0 0 4px; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.hwk-ex-subtitle {
    font-size: 12px; color: var(--hwk-ex-color, #6366f1); font-weight: 600;
    margin: 0 0 8px;
}
.hwk-ex-desc {
    font-size: 13px; color: #475569; line-height: 1.65; margin: 0;
    display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
    overflow: hidden;
}

.hwk-ex-card-foot {
    padding: 0 20px 18px;
    margin-top: auto;
}

.hwk-ex-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 10px;
    font-size: 13px; font-weight: 700; text-decoration: none;
    transition: all 0.25s;
    width: 100%; justify-content: center;
    border: 2px solid transparent;
    cursor: pointer;
    font-family: inherit;
}
.hwk-ex-btn i { font-size: 11px; transition: transform 0.25s; }
.hwk-ex-btn:hover i { transform: translateX(-4px); }

.hwk-ex-btn-primary {
    background: var(--hwk-ex-color, #6366f1); color: #fff;
}
.hwk-ex-btn-primary:hover {
    background: var(--hwk-ex-color, #6366f1);
    filter: brightness(1.1);
    box-shadow: 0 8px 16px -4px var(--hwk-ex-color, #6366f1);
    color: #fff;
}

.hwk-ex-btn-outline {
    background: transparent;
    color: var(--hwk-ex-color, #6366f1);
    border-color: var(--hwk-ex-color, #6366f1);
}
.hwk-ex-btn-outline:hover {
    background: var(--hwk-ex-color, #6366f1);
    color: #fff;
}

.hwk-ex-btn-accent {
    background: linear-gradient(135deg, #ff9f1c, #ff6b35);
    color: #fff;
}
.hwk-ex-btn-accent:hover {
    filter: brightness(1.05);
    box-shadow: 0 8px 16px -4px rgba(255, 159, 28, 0.5);
    color: #fff;
}

/* === تأثير الـ Fade-in أثناء التمرير === */
.hwk-ex-fade-in {
    opacity: 0;
    transform: translateY(30px);
}
.hwk-ex-fade-in.hwk-ex-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* === الوضع الليلي (إن فُعّل من الثيم) === */
.dark .hwk-examples-section,
.hwk-landing.hwk-dark .hwk-examples-section {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
}
.dark .hwk-ex-card,
.hwk-landing.hwk-dark .hwk-ex-card {
    background: #1e293b;
    border-color: #334155;
}
.dark .hwk-ex-title,
.hwk-landing.hwk-dark .hwk-ex-title { color: #f1f5f9; }
.dark .hwk-ex-desc,
.hwk-landing.hwk-dark .hwk-ex-desc { color: #94a3b8; }
.dark .hwk-examples-head h2,
.hwk-landing.hwk-dark .hwk-examples-head h2 { color: #f1f5f9; }
.dark .hwk-examples-head p,
.hwk-landing.hwk-dark .hwk-examples-head p { color: #94a3b8; }


/* ====================================================================
 * رحلة المنتج — أنماط الواجهة الأمامية
 * ==================================================================== */

.hwk-pj-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 28px;
    margin-top: 32px;
    direction: rtl;
    font-family: 'Tajawal', 'Cairo', system-ui, sans-serif;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.hwk-pj-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 16px; flex-wrap: wrap; margin-bottom: 20px;
    padding-bottom: 20px; border-bottom: 1px dashed #e2e8f0;
}
.hwk-pj-title-wrap { display: flex; align-items: center; gap: 12px; }
.hwk-pj-icon {
    width: 48px; height: 48px; border-radius: 12px;
    background: linear-gradient(135deg, #1f3b57, #3b82f6);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 22px;
}
.hwk-pj-title { margin: 0; font-size: 20px; font-weight: 800; color: #1e293b; }
.hwk-pj-subtitle { margin: 4px 0 0; font-size: 13px; color: #64748b; }
.hwk-pj-lifecycle {
    text-align: left;
    background: #f1f5f9;
    padding: 8px 14px; border-radius: 10px;
}
.hwk-pj-lifecycle-label {
    display: block; font-size: 11px; color: #64748b; margin-bottom: 4px;
}
.hwk-pj-lifecycle-id {
    font-family: 'Courier New', monospace;
    font-size: 13px; color: #1f3b57; font-weight: 700;
    direction: ltr; display: block;
}

.hwk-pj-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 16px; border-radius: 24px;
    font-weight: 700; font-size: 13px; margin-bottom: 20px;
}
.hwk-pj-badge i { font-size: 16px; }
.hwk-pj-badge-trusted {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
    box-shadow: 0 4px 10px -2px rgba(59, 130, 246, 0.3);
}
.hwk-pj-badge-circulated {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    box-shadow: 0 4px 10px -2px rgba(245, 158, 11, 0.3);
}

.hwk-pj-stats {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
    margin-bottom: 20px;
}
@media (max-width: 600px) {
    .hwk-pj-stats { grid-template-columns: repeat(2, 1fr); }
}
.hwk-pj-stat {
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px;
    padding: 16px 12px; text-align: center;
    transition: all 0.2s;
}
.hwk-pj-stat:hover { transform: translateY(-2px); border-color: #cbd5e1; }
.hwk-pj-stat-num {
    display: block; font-size: 22px; font-weight: 800; color: #1f3b57;
}
.hwk-pj-stat-num small { font-size: 12px; color: #64748b; font-weight: 600; }
.hwk-pj-stat-label {
    display: block; font-size: 12px; color: #64748b; margin-top: 4px;
}
.hwk-pj-stat-eco {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    border-color: #6ee7b7;
}
.hwk-pj-stat-eco .hwk-pj-stat-num { color: #065f46; }

.hwk-pj-impact {
    display: flex; align-items: flex-start; gap: 12px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-right: 4px solid #10b981;
    padding: 14px 18px; border-radius: 12px; margin-bottom: 24px;
}
.hwk-pj-impact i {
    font-size: 22px; color: #10b981; flex-shrink: 0; margin-top: 2px;
}
.hwk-pj-impact p {
    margin: 0; font-size: 13px; line-height: 1.7; color: #064e3b;
}
.hwk-pj-impact strong { color: #065f46; }

.hwk-pj-timeline {
    position: relative;
    padding-right: 32px;
    margin-top: 8px;
}
.hwk-pj-timeline::before {
    content: ""; position: absolute;
    top: 0; bottom: 0; right: 14px;
    width: 2px; background: linear-gradient(180deg, #1f3b57 0%, #e2e8f0 100%);
}
.hwk-pj-timeline-item {
    position: relative;
    padding: 0 0 20px 0;
    display: flex; gap: 14px;
}
.hwk-pj-timeline-item:last-child { padding-bottom: 0; }
.hwk-pj-timeline-dot {
    position: absolute; right: -25px; top: 0;
    width: 30px; height: 30px; border-radius: 50%;
    background: #fff; border: 3px solid #1f3b57;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; color: #1f3b57;
    z-index: 1;
}
.hwk-pj-timeline-current .hwk-pj-timeline-dot {
    background: #10b981; border-color: #10b981; color: #fff;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}
.hwk-pj-timeline-content {
    background: #f8fafc; border: 1px solid #e2e8f0;
    border-radius: 10px; padding: 12px 16px;
    flex: 1; margin-right: 8px;
    transition: all 0.2s;
}
.hwk-pj-timeline-current .hwk-pj-timeline-content {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border-color: #6ee7b7;
}
.hwk-pj-timeline-header {
    display: flex; justify-content: space-between; align-items: center;
    gap: 8px; flex-wrap: wrap; margin-bottom: 6px;
}
.hwk-pj-timeline-header strong { font-size: 14px; color: #1e293b; }
.hwk-pj-timeline-date { font-size: 12px; color: #64748b; }
.hwk-pj-timeline-user {
    font-size: 12px; color: #475569;
    display: flex; align-items: center; gap: 6px;
}
.hwk-pj-timeline-user i { color: #1f3b57; }
.hwk-pj-timeline-user span { font-weight: 700; color: #1f3b57; }
.hwk-pj-timeline-notes { font-size: 11px; color: #94a3b8; margin-top: 4px; }

/* زر إعادة المقايضة في صفحة المنتج */
.hwk-pj-rebarter-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #ff9f1c, #f59e0b);
    color: #fff; border: none; border-radius: 10px;
    font-weight: 700; font-size: 14px;
    cursor: pointer; text-decoration: none;
    transition: all 0.25s;
    font-family: inherit;
    box-shadow: 0 4px 12px -2px rgba(255, 159, 28, 0.4);
}
.hwk-pj-rebarter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -4px rgba(255, 159, 28, 0.5);
    color: #fff;
}
.hwk-pj-rebarter-btn:disabled,
.hwk-pj-rebarter-btn.is-loading {
    opacity: 0.7; cursor: not-allowed; transform: none;
}

/* شارة المنتج في صفحة التفاصيل */
.hwk-pj-product-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: 20px;
    font-size: 12px; font-weight: 700;
    margin-bottom: 12px;
}
.hwk-pj-product-badge.trusted {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
}
.hwk-pj-product-badge.circulated {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
}
