/* /pdf hub, catalog, filters, cards, editorial sections, FAQ.
   Scoped with .hub / .pdf-* / .hub-* so it never touches other pages. */
:root {
    --hub-deep: #4338CA;
    --hub-core: #4F46E5;
    --hub-violet: #818CF8;
    --hub-tint: #EEF2FF;
    --hub-green: #047857;
    --hub-text: #1F2937;
    --hub-muted: #4B5563;
    --hub-border: #E5E7EB;
    --hub-bg: #FFFFFF;
    --hub-max: 1180px;
    --hub-read: 760px;
    --s-1: 8px; --s-2: 12px; --s-3: 16px; --s-4: 24px; --s-5: 32px; --s-6: 48px; --s-7: 64px;
}

body {
    font-family: 'Cairo', 'Liberation Sans', Arial, sans-serif;
    background: var(--hub-bg);
    color: var(--hub-text);
    line-height: 1.65;
}
.hero-title { color: #FFFFFF !important; }

.hub h1, .hub h2, .hub h3 { font-family: 'Poppins', 'Cairo', sans-serif; color: var(--hub-text); }
.hub { max-width: var(--hub-max); margin: 0 auto; padding: var(--s-4) var(--s-4) var(--s-7); }
.hub-section { margin-top: var(--s-7); }
.hub-section > h2 {
    font-size: clamp(24px, 3.2vw, 30px); font-weight: 600; line-height: 1.25;
    letter-spacing: -0.2px; margin: 0 0 var(--s-3); color: var(--hub-deep);
}
.hub-lead { max-width: var(--hub-read); color: var(--hub-muted); font-size: 17px; margin: 0 0 var(--s-4); }
.hub-prose { max-width: var(--hub-read); }
.hub-prose p { font-size: 17px; line-height: 1.65; margin: 0 0 var(--s-3); }
.hub a { color: var(--hub-core); }

.sr-only {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 3px solid var(--hub-core); outline-offset: 2px; border-radius: 4px; }
.js-only { display: none !important; }
.js .js-only { display: flex !important; }

/* ---- Hero extras ---- */
.hub-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-4); margin-top: var(--s-4); }
.hub-btn-hero {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: #FFFFFF; color: var(--hub-deep) !important; font-weight: 800; font-size: 16px; line-height: 1.2;
    padding: 14px 28px; border-radius: 12px; text-decoration: none; min-height: 48px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.28); transition: transform .2s ease, box-shadow .2s ease;
}
.hub-btn-hero:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(15, 23, 42, 0.34); }
.hub-btn-hero:focus-visible { outline-color: #FFFFFF; }

/* ---- Breadcrumb ---- */
.breadcrumb-nav { margin-bottom: var(--s-4); font-size: 14px; color: var(--hub-muted); }
.breadcrumb-nav ol { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1); list-style: none; margin: 0; padding: 0; }
.breadcrumb-nav li { display: inline-flex; align-items: center; gap: var(--s-1); }
.breadcrumb-nav a { color: var(--hub-core); text-decoration: none; font-weight: 600; }
.breadcrumb-nav a:hover { text-decoration: underline; }
.breadcrumb-sep { display: inline-flex; color: var(--hub-muted); }

/* ---- Catalog header / toolbar ---- */
.cat-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s-3) var(--s-4); }
.cat-head h2 { font-size: clamp(24px, 3.2vw, 30px); font-weight: 600; line-height: 1.25; margin: 0; color: var(--hub-deep); }
.cat-sub { margin: 4px 0 0; color: var(--hub-muted); font-size: 16px; }
.pdf-search {
    position: relative; align-items: center; flex: 0 1 380px; min-width: 260px;
}
.pdf-search svg.s-ic { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--hub-muted); pointer-events: none; }
.pdf-search input {
    width: 100%; min-height: 48px; padding: 10px 44px 10px 42px; font: 500 16px/1.3 'Cairo', sans-serif;
    color: var(--hub-text); background: #fff; border: 1.5px solid #CBD5E1; border-radius: 12px; -webkit-appearance: none; appearance: none;
}
.pdf-search input::-webkit-search-cancel-button { display: none; }
.pdf-search input:focus { border-color: var(--hub-core); outline: 3px solid rgba(79,70,229,.25); outline-offset: 0; }
.pdf-search .clear {
    position: absolute; right: 4px; width: 40px; height: 40px; border: 0; background: none; border-radius: 10px;
    color: var(--hub-muted); cursor: pointer; display: none; align-items: center; justify-content: center;
}
.pdf-search .clear.on { display: inline-flex; }
.pdf-search .clear:hover { background: var(--hub-tint); color: var(--hub-deep); }

.pdf-chips { flex-wrap: wrap; gap: var(--s-1); margin: var(--s-4) 0 var(--s-2); }
.pdf-chip {
    min-height: 44px; padding: 8px 18px; border-radius: 999px; border: 1.5px solid var(--hub-border);
    background: #fff; color: var(--hub-text); font: 700 15px/1.2 'Cairo', sans-serif; cursor: pointer; white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s;
}
.pdf-chip:hover { border-color: var(--hub-violet); background: var(--hub-tint); }
.pdf-chip[aria-pressed="true"] { background: var(--hub-core); border-color: var(--hub-core); color: #fff; }

.pdf-empty {
    margin-top: var(--s-4); padding: var(--s-5) var(--s-4); text-align: center;
    background: var(--hub-tint); border-radius: 16px;
}
.pdf-empty p { margin: 0 0 var(--s-2); font-weight: 700; font-size: 17px; }
.pdf-empty button {
    min-height: 44px; padding: 8px 20px; border-radius: 10px; border: 0; background: var(--hub-core);
    color: #fff; font: 700 15px/1 'Cairo', sans-serif; cursor: pointer;
}
.pdf-empty[hidden], [data-block][hidden], .pdf-item[hidden] { display: none !important; }

/* ---- Catalog blocks ---- */
.pdf-block { margin-top: var(--s-5); }
.pdf-block h2.feat-h {
    font-size: clamp(20px, 2.6vw, 24px); font-weight: 600; line-height: 1.3; margin: 0 0 var(--s-3); color: var(--hub-text);
}
.pdf-block h3 { font-size: 18px; font-weight: 600; line-height: 1.35; margin: 0 0 var(--s-2); color: var(--hub-text); }
.pdf-block h3 .n { color: var(--hub-muted); font-weight: 500; font-size: 15px; margin-left: 6px; }
.pdf-all-label { margin: var(--s-6) 0 0; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--hub-muted); }
.pdf-all-label + .pdf-block { margin-top: var(--s-2); }

.pdf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); }
.pdf-grid.feat { grid-template-columns: repeat(2, 1fr); gap: var(--s-4); }

/* ---- PDF card ---- */
.pdf-item {
    --c: var(--hub-core);
    display: flex; flex-direction: column; gap: 6px; padding: var(--s-3) var(--s-3) var(--s-3);
    background: #fff; border: 1px solid var(--hub-border); border-radius: 16px;
    transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}
.pdf-item:hover { border-color: #C7D2FE; box-shadow: 0 8px 24px rgba(67,56,202,.10); transform: translateY(-2px); }
.pdf-item-head { display: flex; align-items: center; gap: 10px; }
.pdf-item-icon {
    width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--c); flex-shrink: 0;
}
.pdf-item-icon svg { width: 20px; height: 20px; }
.pdf-item-cat { font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--c); }
.pdf-item-title { margin: 4px 0 0; font: 600 17px/1.35 'Poppins', 'Cairo', sans-serif; color: var(--hub-text); }
.pdf-item-desc { margin: 0; font-size: 15px; line-height: 1.55; color: var(--hub-muted); }
.pdf-item-meta { margin: 0; font-size: 14px; font-weight: 600; color: var(--hub-muted); }
.pdf-item-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin-top: auto; padding-top: var(--s-2); }
.btn-dl {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px;
    background: var(--hub-core); color: #fff !important; font: 800 15px/1.1 'Cairo', sans-serif; text-decoration: none;
    border-radius: 10px; transition: background .15s;
}
.btn-dl:hover { background: var(--hub-deep); }
.btn-dl svg { width: 18px; height: 18px; flex-shrink: 0; }
.pdf-item-more { font-weight: 700; font-size: 15px; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.pdf-item-more:hover { text-decoration: underline; }

.pdf-item.is-feat { padding: var(--s-4); border-top: 4px solid var(--c); gap: 8px; }
.pdf-item.is-feat .pdf-item-title { font-size: 20px; }
.pdf-item.is-feat .pdf-item-icon { width: 44px; height: 44px; border-radius: 12px; }
.pdf-item.is-feat .pdf-item-icon svg { width: 24px; height: 24px; }

/* ---- Trust strip ---- */
.hub-trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); margin-top: var(--s-6); }
.hub-trust-item { display: flex; gap: var(--s-2); align-items: flex-start; padding: var(--s-3); background: var(--hub-tint); border-radius: 14px; }
.hub-trust-item .ic { width: 36px; height: 36px; border-radius: 10px; background: #fff; color: var(--hub-core); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hub-trust-item .ic svg { width: 20px; height: 20px; }
.hub-trust-item strong { display: block; font-size: 16px; font-weight: 800; line-height: 1.3; }
.hub-trust-item span.t { display: block; font-size: 14.5px; line-height: 1.5; color: var(--hub-muted); margin-top: 2px; }

/* ---- Editorial ---- */
.hub-areas { list-style: none; padding: 0; margin: var(--s-3) 0 0; max-width: var(--hub-read); display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px var(--s-3); }
.hub-areas li { display: flex; gap: 10px; align-items: baseline; font-size: 16.5px; }
.hub-areas li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--hub-violet); flex-shrink: 0; transform: translateY(-2px); }
.hub-areas a { font-weight: 700; text-decoration: none; }
.hub-areas a:hover { text-decoration: underline; }
.hub-areas-h { margin: var(--s-4) 0 0; font-weight: 800; font-size: 16px; }

.hub-checks { list-style: none; padding: 0; margin: var(--s-4) 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-2); }
.hub-checks li {
    display: flex; align-items: center; gap: 12px; font-size: 15.5px; font-weight: 700; color: #1e293b;
    background: var(--hub-tint); padding: 14px 18px; border-radius: 14px;
}
.hub-checks svg { width: 20px; height: 20px; color: var(--hub-green); flex-shrink: 0; }

.hub-steps { list-style: none; counter-reset: st; padding: 0; margin: var(--s-4) 0 0; max-width: var(--hub-read); display: grid; gap: var(--s-2); }
.hub-steps li { counter-increment: st; position: relative; padding-left: 52px; font-size: 16.5px; line-height: 1.6; }
.hub-steps li::before {
    content: counter(st); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%;
    background: var(--hub-core); color: #fff; font: 700 16px/36px 'Poppins', sans-serif; text-align: center;
}
.hub-steps-h { margin: var(--s-5) 0 0; font-weight: 800; font-size: 16px; }

/* ---- CTA band ---- */
.hub-cta {
    margin-top: var(--s-7); padding: var(--s-6) var(--s-5); border-radius: 24px; text-align: center; color: #fff;
    background: linear-gradient(135deg, var(--hub-deep), var(--hub-core) 60%, #6366F1);
}
.hub-cta .cta-h { color: #fff; font: 600 clamp(22px, 3vw, 28px)/1.3 'Poppins', 'Cairo', sans-serif; margin: 0 0 8px; max-width: none; opacity: 1; }
.hub-cta p { margin: 0 auto var(--s-4); max-width: 620px; font-size: 17px; opacity: .95; }
.hub-cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2) var(--s-3); }
.hub-cta .b1, .hub-cta .b2 {
    display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 26px;
    border-radius: 12px; font-weight: 800; font-size: 16px; text-decoration: none;
}
.hub .hub-cta .b1 { background: #fff; color: var(--hub-deep); }
.hub .hub-cta .b2 { background: rgba(255,255,255,.14); color: #fff; border: 1.5px solid rgba(255,255,255,.55); }
.hub .hub-cta .b2:hover { background: rgba(255,255,255,.24); }
.hub-cta :focus-visible { outline-color: #fff; }

/* ---- FAQ ---- */
.pdf-faq { display: flex; flex-direction: column; gap: var(--s-2); margin-top: var(--s-4); max-width: 900px; }
.pdf-faq-item { border: 1px solid var(--hub-border); border-radius: 12px; background: #fff; }
.pdf-faq-item h3 { margin: 0; font-size: inherit; }
.pdf-faq-btn {
    width: 100%; display: flex; justify-content: space-between; align-items: center; gap: var(--s-3);
    min-height: 56px; padding: var(--s-3) var(--s-4); background: none; border: 0; border-radius: 12px;
    font: 600 17px/1.4 'Poppins', 'Cairo', sans-serif; color: var(--hub-text); text-align: left; cursor: pointer;
}
.pdf-faq-btn:hover { background: var(--hub-tint); }
.pdf-faq-chev { width: 20px; height: 20px; color: var(--hub-core); transition: transform .25s ease; flex-shrink: 0; }
.pdf-faq-item.open .pdf-faq-chev { transform: rotate(180deg); }
.pdf-faq-panel { display: grid; grid-template-rows: 1fr; }
.pdf-faq-body { overflow: hidden; }
.pdf-faq-body p { margin: 0; padding: 0 var(--s-4) var(--s-4); font-size: 16.5px; line-height: 1.65; color: var(--hub-muted); }
.js .pdf-faq-panel { grid-template-rows: 0fr; transition: grid-template-rows .25s ease; }
.js .pdf-faq-item.open .pdf-faq-panel { grid-template-rows: 1fr; }
.js .pdf-faq-item:not(.open) .pdf-faq-body { visibility: hidden; }

/* ---- Related ---- */
.hub-related { list-style: none; padding: 0; margin: var(--s-4) 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); }
.hub-related a {
    display: block; height: 100%; padding: var(--s-3) var(--s-4); border: 1px solid var(--hub-border); border-radius: 14px;
    text-decoration: none; color: var(--hub-text) !important; transition: border-color .15s, box-shadow .15s;
}
.hub-related a:hover { border-color: #C7D2FE; box-shadow: 0 6px 18px rgba(67,56,202,.08); }
.hub-related strong { display: block; font-size: 16.5px; font-weight: 800; color: var(--hub-deep); }
.hub-related span { display: block; margin-top: 2px; font-size: 14.5px; line-height: 1.5; color: var(--hub-muted); }

@media (prefers-reduced-motion: reduce) {
    .pdf-item, .btn-dl, .hub-btn-hero, .pdf-faq-chev, .js .pdf-faq-panel { transition: none; }
    .pdf-item:hover, .hub-btn-hero:hover { transform: none; }
}

@media (min-width: 1100px) { .pdf-grid.c4 { grid-template-columns: repeat(4, 1fr); } }

@media (max-width: 992px) {
    .pdf-grid { grid-template-columns: repeat(2, 1fr); }
    .hub-related { grid-template-columns: repeat(2, 1fr); }
    .hub-trust { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .hub { padding: var(--s-3) var(--s-3) var(--s-6); }
    .hub-section { margin-top: var(--s-6); }
    .hub-prose p, .hub-lead { font-size: 16.5px; }
    .pdf-search { flex: 1 1 100%; min-width: 0; }
    .pdf-grid, .pdf-grid.feat { grid-template-columns: 1fr; }
    /* chips: single horizontally-scrollable row */
    .pdf-chips { flex-wrap: nowrap; overflow-x: auto; margin-left: calc(-1 * var(--s-3)); margin-right: calc(-1 * var(--s-3)); padding: 4px var(--s-3) 8px; scrollbar-width: none; }
    .pdf-chips::-webkit-scrollbar { display: none; }
    .pdf-item-actions { flex-direction: column; align-items: stretch; }
    .btn-dl { width: 100%; min-height: 48px; font-size: 16px; }
    .pdf-item-more { justify-content: center; }
    .hub-areas, .hub-checks, .hub-related { grid-template-columns: 1fr; }
    .hub-cta { padding: var(--s-5) var(--s-3); border-radius: 18px; }
    .hub-cta-actions { flex-direction: column; }
    .hub-hero-actions { flex-direction: column; align-items: stretch; text-align: center; }
    .pdf-faq-btn { font-size: 16px; padding: var(--s-3); }
    .pdf-faq-body p { padding: 0 var(--s-3) var(--s-3); }
}
