/*
Theme Name: Intersection
Theme URI: https://intersection.uno
Author: Intersection Association
Description: Lightweight theme for Intersection Association for Rights and Freedoms. Replaces Hello Elementor + Elementor/Jet. Keeps the association's identity (purple #794AAF, navy #2D3883, Tajawal). RTL/LTR, WPML-ready. Pairs with the Intersection Core plugin.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: intersection
*/

/* ---------- Tokens (current identity) ---------- */
:root {
	--purple: #794AAF;
	--purple-dark: #5E3790;
	--purple-50: #F5F0FB;
	--purple-100: #EBE1F6;
	--pink: #FFBBF9;
	--pink-50: #FFF1FE;
	--navy: #2D3883;
	--ink: #211F40;
	--text: #2E2C47;
	--muted: #54595F;
	--line: #E4E1EC;
	--bg: #FFFFFF;
	--bg-soft: #F8F7FC;
	--accent: #B7ACC5;
	--red: #C62A44;
	--font: "Tajawal", "Segoe UI", system-ui, -apple-system, sans-serif;
	--radius: 14px;
	--radius-sm: 10px;
	--container: 1200px;
	--gutter: clamp(16px, 4vw, 40px);
	--shadow: 0 1px 2px rgba(33, 31, 64, .05), 0 10px 30px -16px rgba(33, 31, 64, .22);
	--focus: 0 0 0 3px #fff, 0 0 0 5px var(--purple);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.8 var(--font); }
img, svg, video, iframe { max-width: 100%; }
img { height: auto; }
a { color: var(--purple); text-underline-offset: 3px; }
a:hover { color: var(--purple-dark); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-weight: 800; line-height: 1.35; text-wrap: balance; }
h1 { font-size: clamp(28px, 4vw, 44px); }
h2 { font-size: clamp(22px, 2.6vw, 30px); }
h3 { font-size: 19px; font-weight: 700; }
p { margin: 0 0 1em; }
.container { width: min(var(--container), 100%); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(40px, 6vw, 76px); }
.section-soft { background: var(--bg-soft); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.section-head h2 { position: relative; padding-bottom: 10px; }
.section-head h2::after { content: ""; position: absolute; inset-inline-start: 0; bottom: 0; width: 56px; height: 4px; border-radius: 4px; background: var(--purple); }
.section-head p { margin: 8px 0 0; color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 8px; background: var(--navy); color: #fff; }
.skip-link:focus { top: 12px; color: #fff; }
.icon { width: 1.2em; height: 1.2em; flex: none; vertical-align: middle; }
.muted { color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 22px; border-radius: 10px; border: 2px solid transparent; font: 700 16px/1.2 var(--font); text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: var(--purple-dark); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--purple); border-color: var(--purple-100); }
.btn-ghost:hover { border-color: var(--purple); color: var(--purple-dark); }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--pink-50); color: var(--navy); }

/* ---------- Top bar & header ---------- */
.topbar { background: var(--purple); color: #fff; font-size: 14px; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 38px; }
.topbar a { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.topbar a:hover { color: var(--pink); }
.social { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.social a { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; }
.social .icon { width: 17px; height: 17px; }
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 84px; }
.brand { flex: none; display: block; }
.brand img { display: block; width: auto; height: 58px; }
.main-nav { margin-inline-start: auto; }
.main-nav > ul { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.main-nav li { position: relative; }
.main-nav a { display: flex; align-items: center; gap: 4px; padding: 10px 12px; border-radius: 8px; color: var(--ink); font-weight: 700; font-size: 16px; text-decoration: none; white-space: nowrap; }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current-menu-ancestor > a { color: var(--purple); background: var(--purple-50); }
.main-nav .sub-menu { position: absolute; top: 100%; inset-inline-start: 0; z-index: 50; min-width: 280px; margin: 0; padding: 8px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s; }
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.main-nav .sub-menu a { font-weight: 500; font-size: 15px; white-space: normal; }
.main-nav .menu-item-has-children > a::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-2px); margin-inline-start: 4px; }
.lang-switch { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.lang-switch a { display: grid; place-items: center; min-width: 36px; height: 30px; padding: 0 8px; border-radius: 999px; color: var(--muted); font-weight: 700; font-size: 13px; text-decoration: none; text-transform: uppercase; }
.lang-switch a[aria-current="true"] { background: var(--purple); color: #fff; }
.header-cta { flex: none; }
.menu-toggle { display: none; align-items: center; justify-content: center; width: 46px; height: 46px; margin-inline-start: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); cursor: pointer; }
@media (max-width: 1080px) {
	.menu-toggle { display: inline-flex; }
	.header-cta { display: none; }
	/* Off-canvas panel slides in from the reading-start edge (right in Arabic, left otherwise). */
	.main-nav { position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 60; display: flex; flex-direction: column; width: min(360px, 88vw); margin: 0; padding: 84px 18px 24px; background: #fff; box-shadow: 0 0 40px -10px rgba(33, 31, 64, .35); overflow-y: auto; transform: translateX(-110%); transition: transform .2s; }
	[dir="rtl"] .main-nav { transform: translateX(110%); }
	.main-nav.is-open, [dir="rtl"] .main-nav.is-open { transform: none; }
	.main-nav > ul { flex-direction: column; align-items: stretch; }
	.main-nav .sub-menu { position: static; min-width: 0; opacity: 1; visibility: visible; transform: none; border: 0; box-shadow: none; padding: 0 12px 0 0; }
	[dir="ltr"] .main-nav .sub-menu { padding: 0 0 0 12px; }
	.main-nav .menu-item-has-children > a::after { display: none; }
	.nav-backdrop { position: fixed; inset: 0; z-index: 55; background: rgba(33, 31, 64, .45); }
	.lang-switch { margin-top: 16px; align-self: flex-start; }
}
@media (max-width: 560px) { .topbar .contact-mail span { display: none; } .brand img { height: 46px; } .header-inner { min-height: 70px; } }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; background: var(--ink); overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(33, 31, 64, .92) 10%, rgba(33, 31, 64, .35) 70%); }
.hero .container { position: relative; z-index: 1; padding-block: clamp(56px, 10vw, 120px) clamp(36px, 6vw, 64px); }
.hero h1 { color: #fff; max-width: 22em; font-size: clamp(28px, 4.2vw, 48px); }
.hero h1 a { color: inherit; text-decoration: none; }
.hero p { max-width: 46em; margin-top: 14px; color: rgba(255, 255, 255, .86); font-size: 18px; }
.hero .meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 14px; }
.hero .btn-row { margin-top: 22px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.badge { display: inline-flex; align-items: center; padding: 3px 12px; border-radius: 999px; background: var(--purple-50); color: var(--purple-dark); font-size: 13px; font-weight: 700; text-decoration: none; }
.badge-pink { background: var(--pink); color: var(--ink); }
a.badge:hover { background: var(--purple-100); }
.hero .date { color: rgba(255, 255, 255, .8); font-size: 14px; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .15s, transform .15s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-media { aspect-ratio: 16 / 9; background: var(--purple-50); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; flex: 1; }
.card h3 { font-size: 18px; line-height: 1.5; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card h3 a:hover { color: var(--purple); }
.card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.card .meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--muted); font-size: 13.5px; }
.card .meta .badge { position: relative; z-index: 1; }
.card-row { flex-direction: row; }
.card-row .card-media { flex: 0 0 38%; aspect-ratio: auto; min-height: 150px; }
@media (max-width: 620px) { .card-row { flex-direction: column; } .card-row .card-media { aspect-ratio: 16/9; } }
.no-thumb { display: grid; place-items: center; width: 100%; height: 100%; background: linear-gradient(135deg, var(--purple-50), var(--pink-50)); }
.no-thumb img { width: 46%; height: auto; object-fit: contain; opacity: .55; }

/* Featured layout on home */
.news-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 22px; }
.news-layout .news-list { display: grid; gap: 14px; }
.news-list .card-row .card-media { flex-basis: 34%; min-height: 110px; }
.news-list .card h3 { font-size: 16px; }
@media (max-width: 900px) { .news-layout { grid-template-columns: 1fr; } }

/* Programs */
.programs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
@media (max-width: 1100px) { .programs { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .programs { grid-template-columns: 1fr; } }
.program { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); min-height: 170px; transition: border-color .15s, box-shadow .15s; }
.program:hover { border-color: var(--purple); box-shadow: var(--shadow); color: var(--ink); }
.program .ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--purple-50); color: var(--purple); }
.program .ic .icon { width: 26px; height: 26px; }
.program h3 { font-size: 17px; }
.program span.count { margin-top: auto; color: var(--muted); font-size: 14px; }

/* About band */
.about-band { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
.about-band .lead { font-size: 18px; color: var(--text); }
.vm { display: grid; gap: 16px; }
.vm-item { padding: 22px; border-radius: var(--radius); background: #fff; border-inline-start: 5px solid var(--purple); box-shadow: var(--shadow); }
.vm-item:nth-child(2) { border-color: var(--pink); }
.vm-item h3 { margin-bottom: 6px; color: var(--purple); }
.vm-item p { margin: 0; font-size: 16px; }
@media (max-width: 900px) { .about-band { grid-template-columns: 1fr; } }

/* Freedom faces */
.faces-band { background: linear-gradient(135deg, var(--ink), var(--navy)); color: #fff; }
.faces-band h2, .faces-band h2::after { color: #fff; }
.faces-band .section-head h2::after { background: var(--pink); }
.faces-band .section-head p { color: rgba(255, 255, 255, .8); }
.face-card { position: relative; display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); color: var(--ink); transition: box-shadow .15s, transform .15s; }
.face-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.face-card .card-media { aspect-ratio: 1 / 1; }
.face-card .card-media img { object-position: center 20%; }
.face-card .card-body { gap: 6px; padding: 14px 16px 16px; }
.face-card h3 { font-size: 17px; }
.face-card h3 a { color: var(--ink); text-decoration: none; }
.face-card h3 a::after { content: ""; position: absolute; inset: 0; }
.face-card p { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.6; }
.state { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--purple-50); color: var(--purple-dark); }
.state-detained { background: #FDECEF; color: var(--red); }
.state-released { background: #E8F5EE; color: #1F7A4D; }
.state-dead { background: #EEEEF2; color: #3C3B4F; }
.faces-filters { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 12px; margin-bottom: 22px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
@media (max-width: 860px) { .faces-filters { grid-template-columns: 1fr 1fr; } .faces-filters .f-search { grid-column: 1 / -1; } }
.faces-count { margin: 0 0 16px; color: var(--muted); font-size: 15px; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 700; color: var(--ink); font-size: 15px; }
.input, select.input, textarea.input { width: 100%; min-height: 46px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--text); font: 400 16px/1.5 var(--font); }
textarea.input { min-height: 150px; resize: vertical; }
.input:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 4px rgba(121, 74, 175, .15); }
.form-card { padding: clamp(20px, 4vw, 32px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.alert { padding: 14px 18px; border-radius: 10px; margin-bottom: 16px; font-weight: 500; }
.alert-ok { background: #E8F5EE; color: #1F5F3D; }
.alert-err { background: #FDECEF; color: #8E1B2E; }
.hint { color: var(--muted); font-size: 14px; font-weight: 400; }

/* ---------- Page header & article ---------- */
.page-head { padding-block: clamp(32px, 5vw, 56px) clamp(22px, 3vw, 32px); background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.page-head p { max-width: 46em; margin: 10px 0 0; color: var(--muted); font-size: 17px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; color: var(--muted); font-size: 14px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--purple); }
.article-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
@media (max-width: 1000px) { .article-wrap { grid-template-columns: 1fr; } }
.article-head .meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: 14px; color: var(--muted); font-size: 14.5px; }
.article-cover { margin: 26px 0 0; border-radius: var(--radius); overflow: hidden; background: var(--purple-50); }
.article-cover img { display: block; width: 100%; }
.prose { font-size: 18px; line-height: 1.95; color: var(--text); overflow-wrap: anywhere; }
.prose > * + * { margin-top: 1.05em; }
.prose h2 { font-size: 24px; margin-top: 1.6em; }
.prose h3 { font-size: 20px; margin-top: 1.4em; }
.prose img { border-radius: 10px; }
.prose figure { margin-inline: 0; }
.prose ul, .prose ol { padding-inline-start: 1.4em; }
.prose blockquote { margin-inline: 0; padding: 14px 20px; border-inline-start: 4px solid var(--purple); background: var(--purple-50); border-radius: 0 10px 10px 0; }
[dir="rtl"] .prose blockquote { border-radius: 10px 0 0 10px; }
.prose table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; font-size: 15px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: start; }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 10px; }
.prose a.btn { color: #fff; }
.prose .logos, .prose .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; align-items: center; }
.prose .logos figure, .prose .gallery figure { margin: 0; display: grid; place-items: center; padding: 14px; aspect-ratio: 3 / 2; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.prose .logos img { max-height: 90px; width: auto; object-fit: contain; border-radius: 0; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); }
.share a, .share button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: 600 14px/1 var(--font); text-decoration: none; cursor: pointer; }
.share a:hover, .share button:hover { border-color: var(--purple); color: var(--purple); }
.sidebar { position: sticky; top: 110px; display: grid; gap: 18px; }
.side-box { padding: 20px; border-radius: var(--radius); background: var(--bg-soft); border: 1px solid var(--line); }
.side-box h2 { font-size: 17px; margin-bottom: 12px; }
.side-box ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.side-box li a { color: var(--ink); text-decoration: none; font-size: 15px; line-height: 1.5; }
.side-box li a:hover { color: var(--purple); }
.side-cta { background: var(--purple); color: #fff; border: 0; }
.side-cta h2, .side-cta p { color: #fff; }
.side-cta p { font-size: 15px; opacity: .9; }

/* Profile */
.profile { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 36px; align-items: start; }
.profile-photo { border-radius: var(--radius); overflow: hidden; background: var(--purple-50); aspect-ratio: 3 / 4; }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
@media (max-width: 760px) { .profile { grid-template-columns: 1fr; } .profile-photo { max-width: 280px; } }

/* Filters / chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 24px; padding: 0; }
.chip { display: inline-flex; padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none; }
.chip:hover { border-color: var(--purple); color: var(--purple); }
.chip[aria-current="page"] { background: var(--purple); border-color: var(--purple); color: #fff; }
.search-form { display: flex; gap: 8px; }
.search-form .input { flex: 1; }

/* Pagination */
.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 34px; }
.pagination .page-numbers { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 700; }
.pagination .current { background: var(--purple); border-color: var(--purple); color: #fff; }
.pagination a.page-numbers:hover { border-color: var(--purple); color: var(--purple); }

/* CTA band */
.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap; padding: clamp(22px, 4vw, 36px); border-radius: var(--radius); background: linear-gradient(120deg, var(--purple), var(--navy)); color: #fff; }
.cta-band h2 { color: #fff; font-size: clamp(20px, 2.4vw, 26px); }
.cta-band p { margin: 6px 0 0; color: rgba(255, 255, 255, .85); }

/* ---------- Footer ---------- */
.site-footer { margin-top: clamp(40px, 6vw, 80px); background: var(--ink); color: rgba(255, 255, 255, .78); font-size: 15px; }
.site-footer .container { padding-block: 48px 26px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-logo { display: inline-block; padding: 10px 14px; border-radius: 12px; background: #fff; }
.footer-logo img { display: block; height: 50px; width: auto; }
.site-footer h2 { color: #fff; font-size: 16px; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.site-footer a:hover { color: var(--pink); }
.site-footer .social a { background: rgba(255, 255, 255, .08); }
.footer-contact li { display: flex; gap: 8px; align-items: center; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 34px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: 13.5px; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); background: var(--bg-soft); border-radius: var(--radius); }
.ltr-num { direction: ltr; unicode-bidi: embed; }

/* ---------- Fixes ---------- */
[hidden] { display: none !important; }
[dir="rtl"] .icon-dir { transform: scaleX(-1); }
.programs { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .programs { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .programs { grid-template-columns: 1fr; } }
@media (min-width: 1081px) { .main-nav { display: flex; align-items: center; gap: 12px; } }
.site-footer .social { display: flex; flex-wrap: wrap; margin-top: 14px; }
.brand img { width: auto; max-width: 220px; height: auto; max-height: 62px; }
@media (max-width: 560px) { .brand img { max-height: 48px; max-width: 170px; } }

/* ---------- Freedom Faces map ---------- */
.faces-map { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: clamp(20px, 4vw, 44px); align-items: start; margin-bottom: 28px; padding: clamp(18px, 3vw, 28px); background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); }
@media (max-width: 760px) { .faces-map { grid-template-columns: 1fr; } .map-figure { max-width: 220px; margin-inline: auto; } }
.map-figure svg { display: block; width: 100%; height: auto; max-height: 640px; }
.gov { stroke: #fff; stroke-width: 1.4; stroke-linejoin: round; transition: fill .15s; }
.gov.lvl-0 { fill: #E9E6F0; }
.gov.lvl-1, .map-legend .lvl-1 { fill: #DCCDEF; background: #DCCDEF; }
.gov.lvl-2, .map-legend .lvl-2 { fill: #BC9EE0; background: #BC9EE0; }
.gov.lvl-3, .map-legend .lvl-3 { fill: #9A70CC; background: #9A70CC; }
.gov.lvl-4, .map-legend .lvl-4 { fill: #794AAF; background: #794AAF; }
.gov[tabindex] { cursor: pointer; }
.gov[tabindex]:hover, .gov.is-active { fill: var(--navy); }
.gov.is-dim { opacity: .45; }
.gov-n { font: 700 26px var(--font); fill: var(--ink); text-anchor: middle; dominant-baseline: middle; paint-order: stroke; stroke: rgba(255, 255, 255, .9); stroke-width: 5px; pointer-events: none; }
.map-credit { margin: 6px 0 0; font-size: 11px; color: var(--muted); text-align: center; }
.map-side h2 { font-size: 22px; margin-bottom: 6px; }
.map-legend { display: flex; align-items: center; gap: 4px; margin: 10px 0 14px; font-size: 13px; color: var(--muted); }
.map-legend i { display: inline-block; width: 26px; height: 12px; border-radius: 3px; }
.gov-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.gov-btn { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font: 600 14px/1.2 var(--font); cursor: pointer; }
[dir="rtl"] .gov-btn { padding: 6px 12px 6px 8px; }
.gov-btn b { display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: var(--purple-50); color: var(--purple-dark); font-size: 13px; }
.gov-btn:hover { border-color: var(--purple); }
.gov-btn[aria-pressed="true"] { background: var(--purple); border-color: var(--purple); color: #fff; }
.gov-btn[aria-pressed="true"] b { background: #fff; }
.faces-filters { grid-template-columns: 2fr repeat(4, 1fr); }
@media (max-width: 1000px) { .faces-filters { grid-template-columns: 1fr 1fr; } .faces-filters .f-search { grid-column: 1 / -1; } }

/* Freedom Faces: full documentation */
.profile-side { display: grid; gap: 18px; position: sticky; top: calc(var(--header-h, 72px) + 16px); }
.profile-toc { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.profile-toc h2 { margin: 0 0 8px; font-size: 15px; color: var(--muted); }
.profile-toc ol { margin: 0; padding-inline-start: 20px; display: grid; gap: 4px; font-size: 15px; }
.profile-toc a { color: var(--ink); text-decoration: none; }
.profile-toc a:hover { color: var(--purple); }
.face-doc h2 { margin: 30px 0 10px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 21px; color: var(--purple-dark, #5b3590); scroll-margin-top: calc(var(--header-h, 72px) + 16px); }
.face-doc h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.face-doc h3 { margin: 22px 0 8px; font-size: 18px; }
.face-doc a { overflow-wrap: anywhere; }
@media (max-width: 760px) { .profile-side { position: static; } }

/* Platforms page: 2×2 grid of tall site screenshots */
.sites-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); }
@media (max-width: 760px) { .sites-grid { grid-template-columns: 1fr; } }
.site-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.site-shot { display: block; color: inherit; text-decoration: none; }
.site-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #F1EEF6; border-bottom: 1px solid var(--line); direction: ltr; }
.site-bar i { width: 10px; height: 10px; border-radius: 50%; background: #D9D2E6; }
.site-bar span { flex: 1; margin-inline-start: 10px; padding: 3px 12px; border-radius: 999px; background: #fff; color: var(--muted); font-size: 12.5px; text-align: center; }
.site-view { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--purple-50); }
.site-view img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: object-position 7s ease-in-out; }
.site-shot:hover .site-view img, .site-shot:focus-visible .site-view img { object-position: bottom; }
@media (prefers-reduced-motion: reduce) { .site-view img { transition: none; } }
.site-info { padding: 18px 20px 20px; }
.site-info h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 20px; }
.site-info h2 a { color: var(--ink); text-decoration: none; }
.site-info h2 a:hover { color: var(--purple); }
.site-info p { margin: 0 0 10px; color: var(--muted); }
.site-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; text-decoration: none; }
.site-link .icon { width: 16px; height: 16px; }

/* Freedom Faces v2: status counters, place chips, portrait wall (no map) */
.faces-states { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
@media (max-width: 760px) { .faces-states { grid-template-columns: 1fr 1fr; } }
.faces-states button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); font: inherit; text-align: start; cursor: pointer; border-inline-start: 5px solid var(--purple); transition: background .15s, box-shadow .15s; }
.faces-states button b { font-size: 32px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.faces-states button span { font-size: 14.5px; font-weight: 600; color: var(--muted); }
.faces-states .state-detained { border-inline-start-color: var(--red); }
.faces-states .state-released { border-inline-start-color: #1F7A4D; }
.faces-states .state-dead { border-inline-start-color: #3C3B4F; }
.faces-states button:hover { box-shadow: var(--shadow); }
.faces-states button[aria-pressed="true"] { background: var(--purple-50); border-color: var(--purple); }
.faces-states .state-detained[aria-pressed="true"] { background: #FDECEF; border-color: var(--red); }
.faces-states .state-released[aria-pressed="true"] { background: #E8F5EE; border-color: #1F7A4D; }
.faces-states .state-dead[aria-pressed="true"] { background: #EEEEF2; border-color: #3C3B4F; }
.faces-places { display: grid; gap: 10px; margin-bottom: 22px; }
.places-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.places-label { margin-inline-end: 6px; font-size: 14px; font-weight: 700; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font: 600 14px/1.4 var(--font); cursor: pointer; }
.chip b { font-size: 12.5px; color: var(--purple-dark); }
.chip:hover { border-color: var(--purple); }
.chip[aria-pressed="true"] { background: var(--purple); border-color: var(--purple); color: #fff; }
.chip[aria-pressed="true"] b { color: #fff; }
.faces-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
@media (max-width: 520px) { .faces-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }
.face-tile { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 8px; background: var(--purple-50); color: #fff; text-decoration: none; }
.face-tile .ft-photo, .face-tile .ft-photo img, .face-tile .no-thumb { display: block; width: 100%; height: 100%; }
.face-tile .ft-photo img { object-fit: cover; object-position: center 22%; transition: transform .35s ease; }
.face-tile .no-thumb { display: grid; place-items: center; padding: 20%; }
.face-tile .no-thumb img { object-fit: contain; }
.face-tile:hover .ft-photo img, .face-tile:focus-visible .ft-photo img { transform: scale(1.05); }
.face-tile .ft-info { position: absolute; inset: auto 0 0 0; display: grid; gap: 4px; padding: 36px 10px 10px; background: linear-gradient(to top, rgba(23, 22, 43, .92), rgba(23, 22, 43, .55) 60%, transparent); }
.face-tile .ft-name { font-size: 14.5px; font-weight: 700; line-height: 1.4; }
.face-tile .ft-state { justify-self: start; display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: rgba(255, 255, 255, .9); background: none; padding: 0; }
.face-tile .ft-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--purple-100, #d9c8ef); }
.face-tile .ft-state.state-detained::before { background: #FF6B81; }
.face-tile .ft-state.state-released::before { background: #4ADE80; }
.face-tile .ft-state.state-dead::before { background: #C7C7D1; }
@media (prefers-reduced-motion: reduce) { .face-tile .ft-photo img { transition: none; } }

/* Freedom Faces map — dot-matrix style with portrait pins (distinct from the observatory's maps) */
.faces-top { display: grid; grid-template-columns: minmax(260px, 420px) minmax(0, 1fr); gap: clamp(20px, 4vw, 44px); align-items: start; margin-bottom: 24px; }
.faces-top.no-map { grid-template-columns: 1fr; }
@media (max-width: 860px) { .faces-top { grid-template-columns: 1fr; } .dotmap { max-width: 320px; margin-inline: auto; } }
.faces-side .faces-states { grid-template-columns: 1fr 1fr; }
.dotmap { margin: 0; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.dotmap svg { display: block; width: 100%; height: auto; max-height: 640px; overflow: visible; }
.dm-dots { fill: none; stroke: #DCD6E6; stroke-width: 8; stroke-linecap: round; transition: stroke .2s; }
.dm-dots.is-on { stroke: #B9A3D9; }
.dm-dots.is-picked { stroke: var(--purple); }
.dm-dots.is-dim { stroke: #E9E5EF; }
.dm-pin { cursor: pointer; outline: none; }
.dm-ring { fill: #fff; filter: drop-shadow(0 3px 6px rgba(45, 30, 80, .28)); transition: fill .15s; }
.dm-photo { stroke: none; }
.dm-badge { fill: var(--navy); stroke: #fff; stroke-width: 2.5; }
.dm-n { fill: #fff; font: 700 19px var(--font); pointer-events: none; }
.dm-pin:hover .dm-ring, .dm-pin:focus-visible .dm-ring { fill: var(--purple); }
.dm-pin[aria-pressed="true"] .dm-ring { fill: var(--purple); }
.dm-pin[aria-pressed="true"] .dm-badge { fill: var(--purple); }
.dotmap figcaption { margin-top: 10px; color: var(--muted); font-size: 13px; line-height: 1.7; }
@media (max-width: 860px) {
	.faces-side { order: -1; }
	.dotmap { justify-self: center; width: 100%; }
	.dotmap svg { max-height: 460px; }
}
