/* ==========================================================================
   Paragon Profiles — visual tokens
   Palette drawn from the Paragon Africa 30 identity: deep maroon into
   rust, amber and gold, grounded by near-black ink.
   ========================================================================== */
.pa-directory {
	--pa-night:  #2A0F08;
	--pa-maroon: #5C1A0E;
	--pa-rust:   #A8380F;
	--pa-amber:  #E2860B;
	--pa-gold:   #F6BB3F;
	--pa-cream:  #FBF1E0;
	--pa-ink:    #251209;
	--pa-line:   rgba(37, 18, 9, 0.12);

	--pa-font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
	--pa-font-body: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

	font-family: var(--pa-font-body);
	color: var(--pa-ink);
	max-width: 1180px;
	margin: 0 auto;
	position: relative;
}

.pa-directory *,
.pa-directory *::before,
.pa-directory *::after {
	box-sizing: border-box;
}

.pa-admin-notice {
	background: #fff8ec;
	border: 1px dashed var(--pa-amber);
	padding: 14px 16px;
	border-radius: 8px;
	font-family: var(--pa-font-body);
	font-size: 14px;
}

.pa-empty {
	font-family: var(--pa-font-body);
	color: var(--pa-maroon);
	padding: 32px 0;
	text-align: center;
}

/* ---- Filter tabs -------------------------------------------------------- */
.pa-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 28px;
}

.pa-filter {
	font-family: var(--pa-font-body);
	font-weight: 600;
	font-size: 14px;
	color: var(--pa-maroon);
	background: #fff;
	border: 1.5px solid var(--pa-line);
	border-radius: 999px;
	padding: 9px 20px;
	cursor: pointer;
	transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.pa-filter:hover {
	border-color: var(--pa-amber);
}

.pa-filter.is-active {
	background: linear-gradient(135deg, var(--pa-rust), var(--pa-amber));
	border-color: transparent;
	color: #fff;
}

/* ---- Grid & card --------------------------------------------------------- */
.pa-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
}

@media (max-width: 900px) {
	.pa-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
	.pa-grid { grid-template-columns: 1fr; }
}

.pa-card {
	position: relative;
	background: #fff;
	border: 1px solid var(--pa-line);
	border-radius: 4px 22px 4px 22px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.pa-card:hover {
	box-shadow: 0 14px 30px -18px rgba(42, 15, 8, 0.55);
	transform: translateY(-3px);
}

@media (prefers-reduced-motion: reduce) {
	.pa-card { transition: none; }
	.pa-card:hover { transform: none; }
}

.pa-admin-edit {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(37, 18, 9, 0.72);
	color: #fff;
	border-radius: 50%;
	text-decoration: none;
	font-size: 14px;
}

.pa-admin-edit:hover { background: var(--pa-rust); color: #fff; }

.pa-card-photo {
	/* A true 1:1 square frame — required so the circular mask below renders
	   as a real circle rather than an oval. Every uploaded photo is square,
	   so a circle is the standard display for both People and Businesses. */
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	padding: 9%;
	background: linear-gradient(160deg, var(--pa-maroon), var(--pa-amber));
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.pa-card-photo-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: 50%;
	border: 3px solid rgba(255, 255, 255, 0.55);
}

.pa-card-photo-fallback {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--pa-font-display);
	font-size: 42px;
	color: #fff;
	opacity: 0.85;
	border: 3px solid rgba(255, 255, 255, 0.4);
}

.pa-card-body {
	padding: 20px 22px 24px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1;
}

.pa-badge {
	align-self: flex-start;
	font-family: var(--pa-font-body);
	font-size: 12px;
	font-weight: 600;
	padding: 4px 12px;
	border-radius: 999px;
	margin-bottom: 4px;
}

.pa-badge-people { background: #FDECD2; color: var(--pa-rust); }
.pa-badge-businesses { background: #F3E3D9; color: var(--pa-maroon); }

.pa-card-name {
	font-family: var(--pa-font-display);
	font-weight: 600;
	font-size: 21px;
	line-height: 1.25;
	margin: 0;
	color: var(--pa-ink);
}

.pa-card-role {
	font-size: 13.5px;
	font-weight: 500;
	color: var(--pa-rust);
	margin: 0;
}

.pa-card-location {
	font-size: 12.5px;
	color: #7a6a60;
	margin: 0;
}

.pa-card-bio {
	font-size: 14px;
	line-height: 1.5;
	color: #4a3a30;
	margin: 6px 0 4px;
}

.pa-card-actions {
	margin-top: auto;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
}

.pa-view-btn {
	align-self: flex-start;
	font-family: var(--pa-font-body);
	font-weight: 600;
	font-size: 13.5px;
	color: #fff;
	background: linear-gradient(135deg, var(--pa-rust), var(--pa-gold));
	border: none;
	border-radius: 999px;
	padding: 10px 20px;
	cursor: pointer;
	transition: filter 0.15s ease;
}

.pa-view-btn:hover { filter: brightness(1.06); }
.pa-view-btn:focus-visible,
.pa-filter:focus-visible,
.pa-modal-close:focus-visible,
.pa-share-btn:focus-visible {
	outline: 3px solid var(--pa-amber);
	outline-offset: 2px;
}

/* ---- Share button & menu -------------------------------------------------- */
.pa-share {
	position: relative;
}

.pa-share-btn {
	font-family: var(--pa-font-body);
	font-weight: 600;
	font-size: 13.5px;
	color: var(--pa-maroon);
	background: #fff;
	border: 1.5px solid var(--pa-line);
	border-radius: 999px;
	padding: 9px 18px;
	cursor: pointer;
	transition: border-color 0.15s ease;
}

.pa-share-btn:hover { border-color: var(--pa-amber); }

.pa-share-menu {
	position: absolute;
	z-index: 20;
	top: calc(100% + 8px);
	left: 0;
	min-width: 170px;
	background: #fff;
	border: 1px solid var(--pa-line);
	border-radius: 12px;
	box-shadow: 0 16px 34px -16px rgba(37, 18, 9, 0.4);
	padding: 8px;
	display: flex;
	flex-direction: column;
}

.pa-share-menu a,
.pa-share-menu .pa-copy-link {
	display: block;
	width: 100%;
	text-align: left;
	font-family: var(--pa-font-body);
	font-size: 13.5px;
	font-weight: 500;
	color: var(--pa-ink);
	text-decoration: none;
	background: none;
	border: none;
	border-radius: 6px;
	padding: 8px 10px;
	cursor: pointer;
}

.pa-share-menu a:hover,
.pa-share-menu .pa-copy-link:hover {
	background: #fdf2e2;
	color: var(--pa-rust);
}

/* ---- Single profile page --------------------------------------------------- */
.pa-single-profile {
	background: #fff;
	border: 1px solid var(--pa-line);
	border-radius: 6px 28px 6px 28px;
	overflow: hidden;
	margin: 24px auto;
}

.pa-back-link {
	display: inline-block;
	margin: 18px 0 0 26px;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--pa-rust);
	text-decoration: none;
}

.pa-single-header {
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 24px 26px 22px;
	background: linear-gradient(135deg, var(--pa-maroon), var(--pa-rust) 55%, var(--pa-amber));
	color: #fff;
	margin-top: 14px;
}

.pa-single-header .pa-badge-people,
.pa-single-header .pa-badge-businesses {
	background: rgba(255,255,255,0.22);
	color: #fff;
}

.pa-single-header h1 {
	font-family: var(--pa-font-display);
	font-size: 28px;
	margin: 2px 0 4px;
}

.pa-single-photo {
	width: 110px;
	height: 110px;
	flex: none;
	border-radius: 50%;
	overflow: hidden;
	border: 3px solid rgba(255,255,255,0.7);
	background: rgba(255,255,255,0.15);
}

.pa-single-photo .pa-card-photo-img,
.pa-single-photo .pa-card-photo-fallback {
	width: 100%;
	height: 100%;
	border: none;
}

.pa-single-content {
	padding-bottom: 34px;
}

/* ---- Modal ---------------------------------------------------------------- */
body.pa-modal-open { overflow: hidden; }

.pa-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.pa-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(24, 10, 5, 0.72);
}

.pa-modal-inner {
	position: relative;
	background: var(--pa-cream);
	max-width: 640px;
	width: 100%;
	max-height: 88vh;
	overflow-y: auto;
	border-radius: 6px 28px 6px 28px;
	box-shadow: 0 30px 60px -20px rgba(0,0,0,0.5);
}

.pa-modal-close {
	position: absolute;
	top: 14px;
	right: 16px;
	z-index: 2;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: none;
	background: rgba(255,255,255,0.85);
	color: var(--pa-ink);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.pa-modal-header {
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 30px 26px 22px;
	background: linear-gradient(135deg, var(--pa-maroon), var(--pa-rust) 55%, var(--pa-amber));
	color: #fff;
	border-radius: 6px 28px 0 0;
}

.pa-modal-header .pa-badge-people,
.pa-modal-header .pa-badge-businesses {
	background: rgba(255,255,255,0.22);
	color: #fff;
}

.pa-modal-photo {
	width: 92px;
	height: 92px;
	flex: none;
	border-radius: 50%;
	overflow: hidden;
	border: 3px solid rgba(255,255,255,0.7);
	background: rgba(255,255,255,0.15);
	display: flex;
	align-items: center;
	justify-content: center;
}

.pa-modal-photo img { width: 100%; height: 100%; object-fit: cover; }

.pa-modal-header h2 {
	font-family: var(--pa-font-display);
	font-size: 25px;
	margin: 2px 0 4px;
}

.pa-modal-role {
	font-size: 14px;
	margin: 0;
	opacity: 0.92;
}

.pa-modal-meta {
	padding: 18px 26px 4px;
	display: grid;
	gap: 8px;
}

.pa-meta-row {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	font-size: 13.5px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--pa-line);
}

.pa-meta-row span:first-child { color: #8a6f5c; font-weight: 500; }
.pa-meta-row span:last-child { font-weight: 600; text-align: right; }

.pa-modal-links {
	padding: 14px 26px 0;
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}

.pa-modal-links a {
	font-size: 13px;
	font-weight: 600;
	color: var(--pa-rust);
	text-decoration: none;
	border-bottom: 1.5px solid var(--pa-amber);
}

.pa-modal-share {
	padding: 16px 26px 0;
}

.pa-modal-content {
	padding: 20px 26px 30px;
	font-size: 15px;
	line-height: 1.7;
	color: #3a2c22;
}

.pa-modal-content p:first-child { margin-top: 0; }
