/* ═══════════════════════════════════════════════════════════════
   HAFA Content Plugin — Unified Stylesheet
   Colors: #303E8C (primary), #151D26 (dark), #A3BAD9 (light)
   Supports RTL (Arabic) and LTR (English)
   ═══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }

/* ── SHARED ─────────────────────────────────────────────────── */
.hafa-sl-wrap, .hafa-pl-wrap, .hafa-sup-wrap, .hafa-cl-wrap, .hafa-ss-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, 'Noto Sans Arabic', sans-serif;
    color: #151D26; max-width: 1140px; margin: 0 auto; padding: 0 20px 60px;
}
.hafa-spinner {
    width: 30px; height: 30px; border: 3px solid #e5e7eb;
    border-top-color: #303E8C; border-radius: 50%;
    animation: hafa-spin .7s linear infinite; margin: 0 auto 10px;
}
@keyframes hafa-spin { to { transform: rotate(360deg); } }
.hafa-pl-loading { text-align: center; padding: 50px; color: #9ca3af; font-size: 14px; }
.hafa-pl-empty { text-align: center; padding: 50px; color: #9ca3af; font-size: 15px;
    background: #f9fafb; border-radius: 10px; border: 2px dashed #e5e7eb; }

/* ── HERO — Services & Products ─────────────────────────────── */
.hafa-sl-hero, .hafa-pl-hero {
    background: linear-gradient(135deg, #151D26 0%, #303E8C 100%);
    color: #fff; padding: 60px 40px; border-radius: 16px; margin: 30px 0; text-align: center;
}
.hafa-sl-hero-inner, .hafa-pl-hero-inner { max-width: 680px; margin: 0 auto; }
.hafa-sl-hero-badge, .hafa-pl-hero-badge {
    display: inline-block; background: rgba(255,255,255,.15);
    padding: 5px 16px; border-radius: 20px; font-size: 12px;
    font-weight: 700; letter-spacing: 1px; margin-bottom: 16px;
}
.hafa-sl-hero-title, .hafa-pl-hero-title {
    font-size: clamp(22px,4vw,36px); font-weight: 800; line-height: 1.3;
    margin: 0 0 14px;
}
.hafa-sl-hero-sub, .hafa-pl-hero-sub {
    font-size: 15px; opacity: .85; line-height: 1.7; margin: 0 0 24px;
}
.hafa-sl-hero-cta {
    display: inline-block; background: #fff; color: #303E8C;
    padding: 12px 28px; border-radius: 8px; font-weight: 700;
    font-size: 14px; text-decoration: none; transition: all .2s;
}
.hafa-sl-hero-cta:hover { background: #A3BAD9; }

/* ── CATEGORY FILTER PILLS (Services) ──────────────────────── */
.hafa-sl-filter {
    display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px;
}
.hafa-sl-pill {
    padding: 7px 16px; border-radius: 20px; border: 1.5px solid #e5e7eb;
    background: #fff; font-size: 13px; font-weight: 600; color: #6b7280;
    text-decoration: none; transition: all .15s; white-space: nowrap;
}
.hafa-sl-pill:hover { border-color: #303E8C; color: #303E8C; }
.hafa-sl-pill.active { background: #303E8C; border-color: #303E8C; color: #fff; }

/* ── SERVICES GRID ──────────────────────────────────────────── */
.hafa-sl-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px; margin-bottom: 40px;
}
.hafa-sl-card {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
    overflow: hidden; transition: all .2s; box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.hafa-sl-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(48,62,140,.12); border-color: #c7d2fe; }
.hafa-sl-card-img { position: relative; height: 180px; overflow: hidden; }
.hafa-sl-card-img img { width: 100%; height: 100%; object-fit: cover; }
.hafa-sl-card-placeholder {
    width: 100%; height: 100%; background: linear-gradient(135deg,#f0f4ff,#e0e7ff);
    display: flex; align-items: center; justify-content: center; font-size: 40px;
}
.hafa-sl-card-badge {
    position: absolute; top: 10px; right: 10px; background: #303E8C; color: #fff;
    padding: 3px 10px; border-radius: 10px; font-size: 11px; font-weight: 600;
}
[dir=ltr] .hafa-sl-card-badge { right: 10px; left: auto; }
[dir=rtl] .hafa-sl-card-badge { left: 10px; right: auto; }
.hafa-sl-card-body { padding: 16px 18px; }
.hafa-sl-card-title { font-size: 15px; font-weight: 700; color: #151D26; margin: 0 0 8px; }
.hafa-sl-card-desc { font-size: 13px; color: #6b7280; line-height: 1.6; margin: 0 0 14px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hafa-sl-card-link {
    font-size: 13px; font-weight: 600; color: #303E8C; text-decoration: none;
}
.hafa-sl-card-link:hover { text-decoration: underline; }

/* ── SEO TEXT ───────────────────────────────────────────────── */
.hafa-sl-seo, .hafa-pl-seo, .hafa-sup-seo, .hafa-cl-seo {
    background: #f9fafb; border-radius: 12px; padding: 28px 32px; margin: 40px 0;
}
.hafa-sl-seo h2, .hafa-pl-seo h2, .hafa-sup-seo h2, .hafa-cl-seo h2 {
    font-size: 18px; font-weight: 700; color: #303E8C; margin: 0 0 12px;
}
.hafa-sl-seo p, .hafa-pl-seo p, .hafa-sup-seo p, .hafa-cl-seo p {
    font-size: 14px; color: #374151; line-height: 1.8; margin: 0;
}

/* ── CTA SECTION ────────────────────────────────────────────── */
.hafa-sl-cta-section { margin-top: 40px; }
.hafa-sl-cta-box {
    background: linear-gradient(135deg,#303E8C,#151D26);
    color: #fff; padding: 40px; border-radius: 16px; text-align: center;
}
.hafa-sl-cta-box h3 { font-size: 22px; font-weight: 700; margin: 0 0 10px; }
.hafa-sl-cta-box p  { font-size: 14px; opacity: .85; margin: 0 0 20px; }
.hafa-sl-cta-btn {
    display: inline-block; background: #fff; color: #303E8C;
    padding: 12px 30px; border-radius: 8px; font-weight: 700;
    font-size: 14px; text-decoration: none; transition: all .2s;
}
.hafa-sl-cta-btn:hover { background: #A3BAD9; }

/* ── PRODUCT FILTERS ────────────────────────────────────────── */
.hafa-pl-filters {
    display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
    padding: 16px 20px; margin-bottom: 20px;
}
.hafa-pl-filter-group { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 180px; }
.hafa-pl-filter-group label { font-size: 11px; font-weight: 700; color: #9ca3af; text-transform: uppercase; }
.hafa-pl-select, .hafa-pl-search {
    padding: 9px 12px; border: 1.5px solid #e5e7eb; border-radius: 8px;
    font-size: 13px; color: #151D26; background: #fafafa; outline: none; width: 100%;
    transition: border-color .15s;
}
.hafa-pl-select:focus, .hafa-pl-search:focus { border-color: #303E8C; box-shadow: 0 0 0 3px rgba(48,62,140,.08); }
.hafa-pl-search-wrap { position: relative; }
.hafa-pl-search-icon { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; }
[dir=rtl] .hafa-pl-search-icon { right: auto; left: 10px; }
.hafa-pl-meta { font-size: 13px; color: #6b7280; margin-bottom: 12px; }

/* ── PRODUCT GRID ───────────────────────────────────────────── */
.hafa-pl-grid, .hafa-cl-products {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px;
}
.hafa-pc {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
    overflow: hidden; transition: all .18s;
}
.hafa-pc:hover { border-color: #303E8C; box-shadow: 0 6px 20px rgba(48,62,140,.1); transform: translateY(-2px); }
.hafa-pc-img-wrap { height: 140px; overflow: hidden; }
.hafa-pc-img { width: 100%; height: 100%; object-fit: cover; }
.hafa-pc-placeholder {
    width: 100%; height: 100%; background: linear-gradient(135deg,#f0f4ff,#e0e7ff);
    display: flex; align-items: center; justify-content: center; font-size: 32px;
}
.hafa-pc-body { padding: 10px 12px; }
.hafa-pc-title { font-size: 13px; font-weight: 600; color: #151D26; margin-bottom: 4px; line-height: 1.4; }
.hafa-pc-cat  { font-size: 11px; color: #A3BAD9; margin-bottom: 3px; }
.hafa-pc-sup  { font-size: 11px; color: #9ca3af; margin-bottom: 8px; }
.hafa-pc-btn {
    display: block; background: #303E8C; color: #fff;
    text-align: center; padding: 7px; border-radius: 6px;
    font-size: 12px; font-weight: 600; text-decoration: none; transition: background .15s;
}
.hafa-pc-btn:hover { background: #252f6e; }

/* ── PAGINATION ─────────────────────────────────────────────── */
.hafa-pl-pagination { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 30px; }
.hafa-pl-page {
    width: 36px; height: 36px; border-radius: 8px; border: 1.5px solid #e5e7eb;
    background: #fff; font-size: 13px; font-weight: 600; color: #374151;
    cursor: pointer; transition: all .15s;
}
.hafa-pl-page:hover { border-color: #303E8C; color: #303E8C; }
.hafa-pl-page.active { background: #303E8C; border-color: #303E8C; color: #fff; }

/* ── SUPPLIERS ──────────────────────────────────────────────── */
.hafa-sup-hero {
    background: linear-gradient(135deg,#151D26,#303E8C);
    color: #fff; padding: 60px 40px; border-radius: 16px; margin: 30px 0; text-align: center;
}
.hafa-sup-hero-inner { max-width: 680px; margin: 0 auto; }
.hafa-sup-hero-badge { display: inline-block; background: rgba(255,255,255,.15); padding: 5px 16px; border-radius: 20px; font-size: 12px; font-weight: 700; margin-bottom: 16px; }
.hafa-sup-hero-title { font-size: clamp(22px,4vw,36px); font-weight: 800; margin: 0 0 14px; }
.hafa-sup-hero-sub { font-size: 15px; opacity: .85; line-height: 1.7; margin: 0; }
.hafa-sup-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 18px; margin: 30px 0;
}
.hafa-sup-card {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
    overflow: hidden; transition: all .2s;
}
.hafa-sup-card:hover { border-color: #303E8C; box-shadow: 0 6px 20px rgba(48,62,140,.1); }
.hafa-sup-card-top {
    background: linear-gradient(135deg,#f0f4ff,#e8eeff);
    height: 80px; display: flex; align-items: center; justify-content: center;
}
.hafa-sup-logo { max-height: 50px; max-width: 140px; object-fit: contain; }
.hafa-sup-initials {
    width: 54px; height: 54px; background: #303E8C; color: #fff;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 700;
}
.hafa-sup-card-body { padding: 14px 16px; }
.hafa-sup-name { font-size: 14px; font-weight: 700; color: #151D26; margin: 0 0 8px; }
.hafa-sup-email, .hafa-sup-web {
    display: block; font-size: 12px; color: #303E8C; text-decoration: none; margin-bottom: 4px;
}
.hafa-sup-count { font-size: 12px; color: #A3BAD9; margin-top: 8px; font-weight: 600; }
.hafa-sup-cta { background: #f0f4ff; border-radius: 12px; padding: 30px; text-align: center; margin-top: 40px; }
.hafa-sup-cta h3 { font-size: 18px; font-weight: 700; color: #303E8C; margin: 0 0 8px; }
.hafa-sup-cta p  { font-size: 13px; color: #6b7280; margin: 0 0 16px; }

/* ── CATEGORY LANDING ───────────────────────────────────────── */
.hafa-cl-breadcrumb { font-size: 13px; color: #9ca3af; margin: 20px 0; }
.hafa-cl-breadcrumb a { color: #303E8C; text-decoration: none; }
.hafa-cl-breadcrumb span { margin: 0 6px; }
.hafa-cl-hero { background: #f0f4ff; border-radius: 12px; padding: 30px; margin-bottom: 24px; }
.hafa-cl-hero h1 { font-size: 24px; font-weight: 800; color: #303E8C; margin: 0 0 8px; }
.hafa-cl-hero p { font-size: 14px; color: #374151; margin: 0 0 10px; }
.hafa-cl-count { font-size: 12px; background: #303E8C; color: #fff; padding: 3px 12px; border-radius: 12px; }
.hafa-cl-layout { display: grid; grid-template-columns: 220px 1fr; gap: 24px; }
@media(max-width:768px) { .hafa-cl-layout { grid-template-columns: 1fr; } }
.hafa-cl-sidebar { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 14px; height: fit-content; }
.hafa-cl-sidebar-title { font-size: 11px; font-weight: 700; color: #9ca3af; text-transform: uppercase; margin-bottom: 10px; }
.hafa-cl-sidebar-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 7px 8px; border-radius: 6px; font-size: 13px; color: #374151;
    text-decoration: none; transition: background .1s; margin-bottom: 2px;
}
.hafa-cl-sidebar-item:hover { background: #f0f4ff; color: #303E8C; }
.hafa-cl-sidebar-item.active { background: #303E8C; color: #fff; }
.hafa-cl-sidebar-item span { font-size: 11px; opacity: .6; }

/* ── SINGLE SERVICE ─────────────────────────────────────────── */
.hafa-ss-breadcrumb { font-size: 13px; color: #9ca3af; padding: 16px 0; }
.hafa-ss-breadcrumb a { color: #303E8C; text-decoration: none; }
.hafa-ss-breadcrumb span { margin: 0 5px; }
.hafa-ss-hero {
    background: #151D26 center center/cover no-repeat;
    border-radius: 14px; overflow: hidden; margin-bottom: 30px; min-height: 300px;
    display: flex; align-items: flex-end;
}
.hafa-ss-hero-overlay {
    background: linear-gradient(to top, rgba(21,29,38,.95) 40%, transparent);
    padding: 40px 40px 36px; width: 100%; color: #fff;
}
.hafa-ss-hero-cat { font-size: 12px; background: rgba(255,255,255,.15); padding: 3px 12px; border-radius: 12px; display: inline-block; margin-bottom: 10px; }
.hafa-ss-hero-title { font-size: clamp(20px,3.5vw,32px); font-weight: 800; margin: 0 0 10px; }
.hafa-ss-hero-sub { font-size: 14px; opacity: .85; margin: 0 0 18px; max-width: 600px; }
.hafa-ss-btn-primary {
    display: inline-block; background: #fff; color: #303E8C;
    padding: 10px 24px; border-radius: 8px; font-weight: 700; font-size: 13px; text-decoration: none;
}
.hafa-ss-layout { display: grid; grid-template-columns: 1fr 280px; gap: 30px; }
@media(max-width:768px) { .hafa-ss-layout { grid-template-columns: 1fr; } }
.hafa-ss-content { font-size: 15px; line-height: 1.8; color: #374151; }
.hafa-ss-content h2 { color: #303E8C; font-size: 20px; margin-top: 30px; }
.hafa-ss-content ul { padding-inline-start: 24px; }
.hafa-ss-content li { margin-bottom: 6px; }
.hafa-ss-cta-box { background: #303E8C; color: #fff; border-radius: 12px; padding: 20px; margin-bottom: 20px; text-align: center; }
.hafa-ss-cta-box h4 { font-size: 16px; font-weight: 700; margin: 0 0 8px; }
.hafa-ss-cta-box p { font-size: 13px; opacity: .85; margin: 0 0 14px; }
.hafa-ss-sidebar-btn { display: block; background: #fff; color: #303E8C; padding: 10px; border-radius: 7px; font-weight: 700; font-size: 13px; text-decoration: none; text-align: center; }
.hafa-ss-related { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 14px; }
.hafa-ss-related h5 { font-size: 12px; font-weight: 700; color: #9ca3af; text-transform: uppercase; margin: 0 0 10px; }
.hafa-ss-related-item { display: block; font-size: 13px; color: #303E8C; text-decoration: none; padding: 7px 0; border-bottom: 1px solid #f5f5f5; }
.hafa-ss-related-item:last-child { border-bottom: none; }

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media(max-width:640px) {
    .hafa-sl-hero, .hafa-pl-hero, .hafa-sup-hero { padding: 36px 20px; }
    .hafa-pl-filters { flex-direction: column; }
    .hafa-pl-filter-group { min-width: 100%; }
    .hafa-sl-grid { grid-template-columns: 1fr; }
    .hafa-sup-grid { grid-template-columns: 1fr; }
}
