/* Projects: list (index, category, search) and details pages. Uses the site tokens of page-builder.css. */
:root {
    --prj-navy: var(--pb-navy, #123957);
    --prj-red: var(--pb-red, #c32c35);
    --prj-ink: var(--pb-ink, #172d40);
    --prj-line: var(--pb-line, #dce5ed);
    --prj-muted: #5a6b7b;
    --prj-soft: #f3f7fa;
    --prj-radius: 20px;
    --prj-shadow: 0 16px 38px rgba(8, 45, 72, .1);
}

/* ---------- Shared pieces ---------- */
.prj-badge { position: relative; z-index: 2; display: inline-flex; align-items: center; min-height: 28px; padding: 2px 12px; border-radius: 999px; background: #fdecee; color: #a8212b !important; font-size: .76rem; font-weight: 700; text-decoration: none !important; transition: background-color .2s; }
.prj-badge:hover { background: #fbdadd; }
.prj-status { position: absolute; z-index: 2; top: 14px; right: 14px; display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 3px 12px; border-radius: 999px; font-size: .76rem; font-weight: 800; box-shadow: 0 6px 16px rgba(4, 24, 40, .18); backdrop-filter: blur(6px); }
.prj-status--done { background: rgba(229, 246, 237, .95); color: #136b43; }
.prj-status--active { background: rgba(255, 243, 219, .96); color: #8a5300; }
.prj-status--inline { position: static; box-shadow: none; backdrop-filter: none; }
.prj-meta { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; color: var(--prj-muted); font-size: .82rem; line-height: 1.8; }
.prj-meta li { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.prj-meta li > span:last-child { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 1; line-clamp: 1; -webkit-box-orient: vertical; }
.prj-meta svg, .prj-meta i { flex: none; width: 14px; margin-top: .42em; color: var(--prj-red); }
.prj-section-title { position: relative; margin: 0 0 22px; padding-inline-start: 16px; color: var(--prj-navy); font-size: clamp(1.15rem, 2vw, 1.4rem); font-weight: 800; line-height: 1.8; }
.prj-section-title::before { content: ""; position: absolute; inset-inline-start: 0; top: 50%; width: 5px; height: 1.2em; border-radius: 4px; background: var(--prj-red); transform: translateY(-50%); }

/* ---------- List hero ---------- */
.prj-hero { position: relative; isolation: isolate; width: calc(100% - 48px); max-width: 1220px; margin: 0 auto 40px; padding: clamp(32px, 5vw, 56px) clamp(22px, 5vw, 64px); overflow: hidden; color: #fff; background: linear-gradient(118deg, #0a2c47 0%, #0d4167 58%, #0b5483 100%); border-radius: 30px; box-shadow: 0 26px 64px rgba(8, 45, 72, .2); }
.prj-hero::before { content: ""; position: absolute; z-index: -1; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 38px 38px; mask-image: linear-gradient(90deg, transparent 0%, #000 60%); }
.prj-hero::after { content: ""; position: absolute; z-index: -1; left: -140px; bottom: -220px; width: 520px; height: 520px; background: radial-gradient(circle, rgba(195,44,53,.22) 0 11%, transparent 11.5% 25%, rgba(255,255,255,.05) 25.5% 36%, transparent 36.5%); pointer-events: none; }
.prj-hero__inner { max-width: 820px; }
.prj-hero__title { margin: 14px 0 10px; color: #fff; font-size: clamp(1.6rem, 3.6vw, 2.6rem); font-weight: 900; line-height: 1.6; }
.prj-hero__lead { margin: 0 0 20px; max-width: 720px; color: rgba(239, 247, 252, .88); font-size: 1rem; line-height: 2.1; }
.prj-hero__stat { display: inline-flex; align-items: baseline; gap: 10px; margin: 0 0 22px; padding: 8px 18px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 14px; background: rgba(255, 255, 255, .06); }
.prj-hero__stat strong { color: #fff; font-size: 1.6rem; font-weight: 900; line-height: 1.2; }
.prj-hero__stat span { color: rgba(239, 247, 252, .85); font-size: .9rem; }
.prj-search { display: flex; align-items: center; gap: 8px; max-width: 620px; padding: 6px; background: #fff; border-radius: 16px; box-shadow: 0 16px 36px rgba(0, 0, 0, .18); }
.prj-search > i, .prj-search > svg { margin-inline-start: 12px; color: #8a9aab; }
.prj-search input[type="search"] { flex: 1; min-width: 0; height: 46px; border: 0; background: transparent; color: var(--prj-ink); font: inherit; font-size: .95rem; outline: none; }
.prj-search:focus-within { box-shadow: 0 0 0 3px rgba(224, 65, 75, .55), 0 16px 36px rgba(0, 0, 0, .18); }
.prj-search button { flex: none; height: 46px; padding: 0 22px; border: 0; border-radius: 12px; background: linear-gradient(135deg, #dc3945, #bd232e); color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.prj-search button:hover { background: linear-gradient(135deg, #e34651, #ae1e28); }
.prj-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.prj-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 16px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; background: rgba(255, 255, 255, .07); color: #fff !important; font-size: .85rem; font-weight: 700; text-decoration: none !important; transition: background-color .2s; }
.prj-chip:hover { background: rgba(255, 255, 255, .15); }
.prj-chip[aria-current="page"] { background: #fff; border-color: #fff; color: var(--prj-navy) !important; }
.prj-chip__count { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; background: rgba(255, 255, 255, .16); font-size: .72rem; }
.prj-chip[aria-current="page"] .prj-chip__count { background: #fdecee; color: #a8212b; }

/* ---------- List ---------- */
.prj-shell { max-width: 1220px; margin: 0 auto 64px; padding: 0 24px; }
.prj-result-count { margin: 0 0 20px; color: var(--prj-muted); }
.prj-result-count a { margin-inline-start: 8px; color: var(--prj-red) !important; font-weight: 700; }
.prj-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.prj-grid--featured > :first-child { grid-column: span 2; grid-row: span 2; }

.prj-card { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: #fff; border: 1px solid var(--prj-line); border-radius: var(--prj-radius); transition: transform .25s ease, box-shadow .25s ease, border-color .25s; }
.prj-card:hover { transform: translateY(-5px); box-shadow: var(--prj-shadow); border-color: #c9d6e2; }
.prj-card__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #e8eef3; }
.prj-card__media::after { content: ""; position: absolute; inset: auto 0 0; height: 45%; background: linear-gradient(0deg, rgba(6, 28, 46, .35), transparent); pointer-events: none; }
.prj-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.prj-card:hover .prj-card__media img { transform: scale(1.06); }
.prj-card__body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px 20px 20px; }
.prj-card__title { display: -webkit-box; margin: 0; overflow: hidden; font-size: 1.02rem; font-weight: 800; line-height: 1.9; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; }
.prj-card__title a { color: var(--prj-ink) !important; text-decoration: none !important; }
.prj-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.prj-card__title a:hover { color: var(--prj-red) !important; }
.prj-card__title a:focus-visible { outline: none; }
.prj-card:has(.prj-card__title a:focus-visible) { outline: 3px solid #cd3540; outline-offset: 3px; }
.prj-card__excerpt { display: -webkit-box; margin: 0; overflow: hidden; color: var(--prj-muted); font-size: .86rem; line-height: 2; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; }
.prj-card .prj-meta { width: 100%; }
.prj-card__more { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; width: 100%; border-top: 1px dashed var(--prj-line); color: var(--prj-red); font-size: .88rem; font-weight: 800; }
.prj-card__more svg, .prj-card__more i { transition: transform .25s; }
.prj-card:hover .prj-card__more svg, .prj-card:hover .prj-card__more i { transform: translateX(-4px); }

.prj-card--featured { border-radius: 26px; box-shadow: var(--prj-shadow); }
.prj-card--featured .prj-card__media { flex: 1; aspect-ratio: auto; min-height: 300px; }
.prj-card--featured .prj-card__media img { position: absolute; inset: 0; }
.prj-card--featured .prj-card__body { flex: none; gap: 12px; padding: 22px 26px 24px; }
.prj-card--featured .prj-card__title { font-size: clamp(1.2rem, 2vw, 1.45rem); }
.prj-card--featured .prj-meta { flex-direction: row; flex-wrap: wrap; gap: 6px 22px; }

.prj-empty { padding: 56px 24px; text-align: center; background: var(--prj-soft); border: 1px dashed #c9d6e2; border-radius: var(--prj-radius); }
.prj-empty > i, .prj-empty > svg { font-size: 2.6rem; color: #9fb1c1; }
.prj-empty h2 { margin: 16px 0 8px; color: var(--prj-navy); font-size: 1.2rem; font-weight: 800; }
.prj-empty p { margin: 0 auto 20px; max-width: 460px; color: var(--prj-muted); }

.prj-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 44px; }
.prj-pager ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.prj-pager a, .prj-pager__gap { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; height: 44px; padding: 0 12px; border-radius: 12px; font-weight: 700; text-decoration: none !important; }
.prj-pager a { border: 1px solid var(--prj-line); background: #fff; color: var(--prj-navy) !important; transition: border-color .2s, background-color .2s; }
.prj-pager a:hover { border-color: var(--prj-navy); }
.prj-pager a[aria-current="page"] { background: var(--prj-navy); border-color: var(--prj-navy); color: #fff !important; }
.prj-pager__gap { min-width: 24px; padding: 0; color: var(--prj-muted); }

.prj-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; margin-top: 56px; padding: clamp(24px, 4vw, 40px); border-radius: 24px; color: #e8f1f7; background: linear-gradient(125deg, #0a2c47, #0d4167 60%, #0b5483); }
.prj-cta h2 { margin: 0 0 6px; color: #fff; font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 800; }
.prj-cta p { margin: 0; max-width: 640px; color: rgba(232, 241, 247, .86); line-height: 2; }
.prj-cta .pb-actions { margin-top: 0; }

/* ---------- Details ---------- */
.prj-detail { max-width: 1220px; margin: 0 auto; padding: 0 24px; color: var(--prj-ink); }
.prj-detail__header { max-width: 900px; margin: 8px auto 30px; text-align: center; }
.prj-detail__badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 14px; }
.prj-detail__title { margin: 0 0 14px; color: var(--prj-navy); font-size: clamp(1.6rem, 3.6vw, 2.5rem); font-weight: 900; line-height: 1.65; }
.prj-detail__lead { margin: 0 auto 18px; max-width: 72ch; color: #3f5263; font-size: clamp(1rem, 1.6vw, 1.12rem); line-height: 2.15; }
.prj-meta--header { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 8px 24px; font-size: .9rem; }
.prj-meta--header li { align-items: center; }
.prj-meta--header svg, .prj-meta--header i { margin-top: 0; }

.prj-detail__layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
.prj-detail__main { min-width: 0; }
.prj-detail__gallery { margin-bottom: 32px; }
.prj-section { margin-bottom: 32px; padding: clamp(20px, 3.5vw, 36px); background: #fff; border: 1px solid var(--prj-line); border-radius: var(--prj-radius); }

.prj-facts { position: sticky; top: 96px; padding: 22px; background: #fff; border: 1px solid var(--prj-line); border-radius: var(--prj-radius); box-shadow: var(--prj-shadow); }
.prj-facts__title { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; padding-bottom: 12px; border-bottom: 1px solid var(--prj-line); color: var(--prj-navy); font-size: 1.05rem; font-weight: 800; }
.prj-facts__title svg, .prj-facts__title i { color: var(--prj-red); }
.prj-facts dl { margin: 0; }
.prj-facts dl > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; padding: 11px 0; border-bottom: 1px solid #edf1f4; }
.prj-facts dl > div:last-child { border-bottom: 0; }
.prj-facts dt { display: flex; align-items: center; gap: 8px; color: var(--prj-muted); font-size: .8rem; font-weight: 600; }
.prj-facts dt svg, .prj-facts dt i { width: 14px; color: #8a9aab; }
.prj-facts dd { margin: 0; color: var(--prj-ink); font-size: .86rem; font-weight: 700; line-height: 1.9; overflow-wrap: anywhere; }
.prj-facts dd a { color: #145781 !important; }
.prj-facts__cta { margin-top: 14px; padding: 18px; border-radius: 16px; background: var(--prj-soft); text-align: center; }
.prj-facts__cta p { margin: 0 0 12px; color: var(--prj-muted); font-size: .86rem; line-height: 1.9; }
.prj-facts__cta .pb-button { width: 100%; }

/* Description (content-blocks.css styles the editor blocks). */
.prj-prose { color: #22364a; font-size: 1.02rem; line-height: 2.15; }
.prj-prose > :first-child { margin-top: 0 !important; }
.prj-prose > :last-child { margin-bottom: 0 !important; }
.prj-prose .container, .prj-prose .contianer { max-width: none; margin: 0 !important; padding: 0; }
.prj-prose .row { --bs-gutter-y: 1rem; }
.prj-prose p { margin: 0 0 1.2em; text-align: justify !important; }
.prj-prose h2, .prj-prose h3, .prj-prose h4 { color: var(--prj-navy) !important; font-weight: 800; line-height: 1.8; scroll-margin-top: 110px; }
.prj-prose h2 { margin: 1.8em 0 .7em; font-size: clamp(1.2rem, 2.2vw, 1.45rem); }
.prj-prose h3 { margin: 1.5em 0 .6em; font-size: clamp(1.05rem, 1.9vw, 1.2rem); }
.prj-prose a { color: #145781 !important; }
.prj-prose li::marker { color: var(--prj-red); }
.prj-prose img { display: block; width: 100%; height: auto; margin: 0; border-radius: 14px; background: #e8eef3; }
.prj-zoom { position: relative; display: block; overflow: hidden; border-radius: 14px; cursor: zoom-in; }
.prj-zoom img { transition: transform .45s ease; }
.prj-zoom:hover img { transform: scale(1.03); }
.prj-zoom::after { content: ""; position: absolute; left: 12px; bottom: 12px; width: 38px; height: 38px; border-radius: 11px; background: rgba(255, 255, 255, .92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23123957' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3M11 8v6M8 11h6'/%3E%3C/svg%3E") center / 20px no-repeat; box-shadow: 0 6px 16px rgba(4, 24, 40, .22); opacity: 0; transition: opacity .2s; }
.prj-zoom:hover::after, .prj-zoom:focus-visible::after { opacity: 1; }
.prj-zoom:focus-visible { outline: 3px solid #cd3540; outline-offset: 3px; }
.prj-table { max-width: 100%; margin: 1.4em 0; overflow-x: auto; border: 1px solid var(--prj-line); border-radius: 14px; }
.prj-table:focus-visible { outline: 3px solid #cd3540; }
.prj-prose .prj-table table { display: table; width: 100%; min-width: 520px; margin: 0; border-collapse: collapse; font-size: .92rem; line-height: 1.9; }
.prj-prose .prj-table th, .prj-prose .prj-table td { padding: .7em 1em; border: 0; border-bottom: 1px solid var(--prj-line); text-align: start; vertical-align: top; }
.prj-prose .prj-table th { background: var(--prj-navy); color: #fff; font-weight: 700; }
.prj-prose .prj-table tr:nth-child(even) td { background: #f7fafc; }
.prj-prose .prj-table tr:last-child td { border-bottom: 0; }

.prj-share { padding: 22px; background: var(--prj-soft); border-radius: var(--prj-radius); }
.prj-share__title { margin: 0 0 14px; color: var(--prj-navy); font-size: 1rem; font-weight: 800; }
.prj-share__list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.prj-share__btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 16px; border: 1px solid var(--prj-line); border-radius: 12px; background: #fff; color: var(--prj-navy) !important; font: inherit; font-size: .86rem; font-weight: 700; text-decoration: none !important; cursor: pointer; transition: border-color .2s, transform .2s; }
.prj-share__btn:hover { border-color: var(--prj-navy); transform: translateY(-2px); }
.prj-share__status { min-height: 1.5em; margin: 10px 0 0; color: #1d7a45; font-size: .85rem; }
.prj-share__status:empty { display: none; }

.prj-after { max-width: 1220px; margin: 48px auto 64px; padding: 0 24px; }
.prj-neighbours { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.prj-neighbour { display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 14px 20px; border: 1px solid var(--prj-line); border-radius: 16px; background: #fff; color: var(--prj-ink) !important; text-decoration: none !important; transition: border-color .2s, box-shadow .2s; }
.prj-neighbour:hover { border-color: #c9d6e2; box-shadow: var(--prj-shadow); }
.prj-neighbour--next { grid-column: 2; justify-content: flex-end; text-align: end; }
.prj-neighbour > svg, .prj-neighbour > i { flex: none; color: var(--prj-red); }
.prj-neighbour span { display: flex; flex-direction: column; min-width: 0; }
.prj-neighbour small { color: var(--prj-muted); font-size: .76rem; }
.prj-neighbour b { overflow: hidden; font-size: .92rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.prj-after .prj-cta { margin: 40px 0 48px; }
.prj-related__all { margin: 22px 0 0; text-align: center; }
.prj-related__all a { display: inline-flex; align-items: center; gap: 8px; color: var(--prj-red) !important; font-weight: 800; text-decoration: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1199.98px) {
    .prj-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
    .prj-grid--featured > :first-child { grid-row: auto; }
    .prj-card--featured { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
    .prj-card--featured .prj-card__media { min-height: 320px; }
    .prj-card--featured .prj-card__body { justify-content: center; }
    .prj-detail__layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; }
}
@media (max-width: 991.98px) {
    .prj-detail__layout { grid-template-columns: minmax(0, 1fr); }
    .prj-facts { position: static; }
}
@media (max-width: 767.98px) {
    .prj-hero { width: calc(100% - 24px); margin-bottom: 28px; border-radius: 23px; }
    .prj-hero__lead { font-size: .92rem; }
    .prj-search button { padding: 0 16px; }
    .prj-chips { flex-wrap: nowrap; margin-inline: -4px; padding: 0 4px 6px; overflow-x: auto; scrollbar-width: none; }
    .prj-chips::-webkit-scrollbar { display: none; }
    .prj-chip { flex: none; }
    .prj-shell, .prj-detail, .prj-after { padding: 0 16px; }
    .prj-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .prj-grid--featured > :first-child { grid-column: auto; }
    .prj-card--featured { display: flex; }
    .prj-card--featured .prj-card__media { flex: none; min-height: 0; aspect-ratio: 4 / 3; }
    .prj-card--featured .prj-card__body { padding: 18px 20px 20px; }
    .prj-detail__header { text-align: start; }
    .prj-detail__badges, .prj-meta--header { justify-content: flex-start; }
    .prj-meta--header { flex-direction: column; gap: 6px; }
    .prj-meta--header li { align-items: flex-start; }
    .prj-meta--header svg, .prj-meta--header i { margin-top: .42em; }
    .prj-prose p { text-align: start !important; }
    .prj-facts dl > div { grid-template-columns: 104px minmax(0, 1fr); }
    .prj-neighbours { grid-template-columns: minmax(0, 1fr); }
    .prj-neighbour--next { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
    .prj-card, .prj-card__media img, .prj-share__btn, .prj-zoom img { transition: none; }
    .prj-card:hover, .prj-card:hover .prj-card__media img, .prj-zoom:hover img { transform: none; }
}
@media print {
    .prj-share, .prj-after, .prj-facts__cta, .prj-search, .prj-chips { display: none !important; }
    .prj-detail__layout { display: block; }
}
