/* Topic hubs and resources homes (api/seo_hub_pages.php). Built on homepage.css + public-tools.css:
   the same hero, header and footer as the hand-built pages. Type steps 13 / 15 / 17 / 22; Tajawal 400 / 500 / 700. */
.seo-hub-page .hub-main { background: #fff; padding: 32px 0 0; }
.seo-hub-page .hub-hero h1 { margin-bottom: 12px; }
.seo-hub-page .hub-facts { margin: 0; font-size: 15px; color: rgba(221, 214, 254, 0.95); }

/* Sibling hubs: every hub links to every other hub of its language */
.hub-switcher ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 40px; padding: 0; }
.hub-switcher a {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
    border: 1px solid #e9d5ff; border-radius: 999px; background: #fff;
    color: #4c1d95; font-size: 15px; font-weight: 500; text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease;
}
.hub-switcher a:hover { background: #faf5ff; border-color: #c4b5fd; }
.hub-switcher a:focus-visible, .hub-item:focus-visible, .hub-pager a:focus-visible, .hub-more:focus-visible { outline: 2px solid #7c3aed; outline-offset: 3px; }
.hub-switcher a[aria-current="page"] { background: #7c3aed; border-color: #7c3aed; color: #fff; }
.hub-switcher-count { font-size: 13px; font-variant-numeric: tabular-nums; color: #6d28d9; }
.hub-switcher a[aria-current="page"] .hub-switcher-count { color: #ede9fe; }

.seo-hub-page .hub-main h2 { margin: 0 0 16px; font-size: 22px; line-height: 1.35; font-weight: 700; color: #0f172a; }

/* Page lists: rows with a line between them, two columns on wide screens */
.hub-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; border-top: 1px solid #e2e8f0; }
.hub-list li { margin: 0; border-bottom: 1px solid #e2e8f0; }
.hub-item { display: grid; gap: 4px; padding: 18px 0; color: inherit; text-decoration: none; text-align: start; }
.hub-item-title { font-size: 17px; line-height: 1.45; font-weight: 700; color: #0f172a; }
.hub-item:hover .hub-item-title { color: #6d28d9; text-decoration: underline; text-underline-offset: 3px; }
.hub-item-desc { font-size: 15px; line-height: 1.65; color: #475569; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hub-item-meta { font-size: 13px; color: #64748b; font-variant-numeric: tabular-nums; }

/* Start here: pinned pages and the hand-built pages of this topic */
.seo-hub-page .hub-featured { margin: 0 0 48px; padding: 24px 28px 8px; border: 1px solid #ede9fe; border-radius: 20px; background: #faf5ff; }
.hub-list-featured { border-top-color: #e9d5ff; }
.hub-list-featured li { border-bottom-color: #e9d5ff; }
.hub-list-featured li:last-child, .hub-list-featured li:nth-last-child(2):nth-child(odd) { border-bottom: 0; }

.hub-all { margin: 0 0 32px; }
.hub-list-compact { grid-template-columns: 1fr; }
.hub-list-compact .hub-item { padding: 12px 0; }
.hub-list-compact .hub-item-title { font-size: 15px; font-weight: 500; }

/* Pagination */
.hub-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin: 0 0 64px; }
.hub-pager ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.hub-pager a, .hub-pager span {
    min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
    padding: 0 14px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff;
    color: #4c1d95; font-size: 15px; font-weight: 500; text-decoration: none; font-variant-numeric: tabular-nums;
}
.hub-pager a:hover { border-color: #c4b5fd; background: #faf5ff; }
.hub-pager [aria-current="page"] { background: #7c3aed; border-color: #7c3aed; color: #fff; }
.hub-pager .is-off { color: #94a3b8; }

/* Resources home */
.hub-groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px; margin: 0 0 56px; }
.hub-group h2, .seo-hub-page .hub-main .hub-group h2 { font-size: 17px; margin-bottom: 8px; }
.hub-group-lead { margin: 0 0 12px; font-size: 15px; line-height: 1.65; color: #475569; }
.hub-topic { margin: 0 0 48px; }
.hub-topic-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.hub-topic-head h2 a { color: #0f172a; text-decoration: none; }
.hub-topic-head h2 a:hover { color: #6d28d9; text-decoration: underline; text-underline-offset: 3px; }
.hub-topic-lead { margin: -8px 0 16px; max-width: 70ch; font-size: 15px; line-height: 1.65; color: #475569; }
.hub-topic .hub-list-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; }
.hub-more { color: #6d28d9; font-size: 15px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* Closing call to action */
.seo-hub-page .hub-cta { margin-top: 16px; padding: 48px 0; background: #f5f3ff; border-top: 1px solid #ede9fe; }
.hub-cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.hub-cta h2, .seo-hub-page .hub-main .hub-cta h2 { margin: 0 0 6px; }
.hub-cta p { margin: 0; font-size: 15px; color: #475569; }
.hub-cta-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 28px; border-radius: 12px; background: #7c3aed; color: #fff; font-size: 17px; font-weight: 700; text-decoration: none; transition: background-color .15s ease; }
.hub-cta-btn:hover { background: #6d28d9; color: #fff; }
.hub-cta-btn:focus-visible { outline: 2px solid #7c3aed; outline-offset: 3px; }

@media (max-width: 1023px) {
    .hub-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .hub-list, .hub-topic .hub-list-compact { grid-template-columns: minmax(0, 1fr); }
    .hub-list-featured li:nth-last-child(2):nth-child(odd) { border-bottom: 1px solid #e9d5ff; }
}
@media (max-width: 640px) {
    .seo-hub-page .hub-main { padding-top: 24px; }
    .hub-switcher ul { margin-bottom: 32px; }
    .hub-groups { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .seo-hub-page .hub-featured { padding: 24px 20px 4px; }
    .hub-cta-inner .hub-cta-btn { width: 100%; justify-content: center; }
}
