/**
 * Press Cards — front-end card and shortcode styles.
 * All selectors are prefixed with pcrqr.
 */

.pcrqr-card,
.pcrqr-card *,
.pcrqr-qr-shortcode,
.pcrqr-qr-shortcode * {
	box-sizing: border-box;
}

.pcrqr-card {
	--pcrqr-accent: #c8102e;
	--pcrqr-dark: #0f172a;
	position: relative;
	width: 100%;
	max-width: 900px;
	margin: 0 auto;
	overflow: hidden;
	border: 1px solid #e2e8f0;
	border-radius: 20px;
	background: #ffffff;
	box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
	color: #0f172a;
	direction: rtl;
	font-family: inherit;
	line-height: 1.6;
}

.pcrqr-card__header {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 22px 30px;
	overflow: hidden;
	background: linear-gradient(120deg, var(--pcrqr-accent) 0%, var(--pcrqr-dark) 100%);
	color: #ffffff;
}

.pcrqr-card__header::before {
	position: absolute;
	inset: 0;
	background-image: repeating-linear-gradient(
		115deg,
		rgba(255, 255, 255, 0.13) 0,
		rgba(255, 255, 255, 0.13) 1px,
		transparent 1px,
		transparent 14px
	);
	content: "";
	pointer-events: none;
}

.pcrqr-card__brand {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
}

.pcrqr-card__logo-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 58px;
	width: 58px;
	height: 58px;
	padding: 6px;
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.12);
}

.pcrqr-card__logo {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}

.pcrqr-card__brand-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.pcrqr-card__org {
	overflow: hidden;
	color: #ffffff;
	font-size: 18px;
	font-weight: 800;
	line-height: 1.4;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pcrqr-card__subtitle {
	color: rgba(255, 255, 255, 0.78);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.03em;
}

.pcrqr-card__type {
	position: relative;
	z-index: 1;
	flex: 0 0 auto;
	padding: 6px 14px;
	border: 1px solid rgba(255, 255, 255, 0.38);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.12);
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	white-space: nowrap;
}

.pcrqr-card__body {
	display: flex;
	align-items: flex-start;
	gap: 28px;
	padding: 30px;
	background: #ffffff;
}

.pcrqr-card__photo-wrap {
	flex: 0 0 160px;
	width: 160px;
}

.pcrqr-card__photo,
.pcrqr-card .pcrqr-photo-placeholder {
	display: block;
	width: 160px;
	height: 190px;
	overflow: hidden;
	border: 4px solid #ffffff;
	border-radius: 14px;
	background: #e2e8f0;
	box-shadow: 0 8px 22px rgba(15, 23, 42, 0.16);
	object-fit: cover;
}

.pcrqr-card .pcrqr-photo-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(145deg, var(--pcrqr-accent) 0%, var(--pcrqr-dark) 100%);
}

.pcrqr-card .pcrqr-photo-placeholder__initial {
	color: #ffffff;
	font-size: 56px;
	font-weight: 800;
	line-height: 1;
}

.pcrqr-card__content {
	flex: 1 1 auto;
	min-width: 0;
	padding-top: 2px;
}

.pcrqr-card__heading {
	margin-bottom: 18px;
}

.pcrqr-card__name-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
}

.pcrqr-card__name {
	margin: 0;
	padding: 0;
	color: #0f172a;
	font-size: 27px;
	font-weight: 800;
	line-height: 1.25;
}

.pcrqr-card__role {
	margin: 5px 0 0;
	color: var(--pcrqr-accent);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.01em;
}

.pcrqr-card__details {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px 24px;
	margin: 0;
	padding-top: 18px;
	border-top: 1px solid #e2e8f0;
}

.pcrqr-card__detail {
	min-width: 0;
}

.pcrqr-card__detail--wide {
	grid-column: 1 / -1;
}

.pcrqr-card__detail dt {
	margin: 0 0 3px;
	color: #64748b;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.4;
}

.pcrqr-card__detail dd {
	margin: 0;
	overflow-wrap: anywhere;
	color: #0f172a;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.55;
}

.pcrqr-card__detail dd[dir="ltr"] {
	text-align: right;
}

.pcrqr-card__detail dd a {
	color: var(--pcrqr-accent);
	text-decoration: none;
}

.pcrqr-card__detail dd a:hover,
.pcrqr-card__detail dd a:focus {
	color: var(--pcrqr-dark);
	text-decoration: underline;
}

.pcrqr-card__card-number {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 5px;
	background: #f1f5f9;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 12px;
	letter-spacing: 0.04em;
}

.pcrqr-card__qr {
	display: flex;
	align-items: center;
	flex-direction: column;
	flex: 0 0 170px;
	gap: 8px;
	padding: 10px;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	background: #ffffff;
	box-shadow: 0 4px 16px rgba(15, 23, 42, 0.07);
}

.pcrqr-card__qr a {
	display: block;
	width: 100%;
}

.pcrqr-card__qr-image {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 4px;
}

.pcrqr-card__qr-label {
	color: #64748b;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-align: center;
}

.pcrqr-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 13px 30px;
	border-top: 1px solid #e2e8f0;
	background: #f8fafc;
	color: #64748b;
	font-size: 10px;
	line-height: 1.7;
}

.pcrqr-card__footer-text {
	min-width: 0;
}

.pcrqr-card__footer-link {
	flex: 0 0 auto;
	color: var(--pcrqr-accent);
	font-weight: 700;
	text-decoration: none;
}

.pcrqr-card__footer-link:hover,
.pcrqr-card__footer-link:focus {
	text-decoration: underline;
}

.pcrqr-card__category {
	display: inline-flex;
	align-items: flex-start;
	flex-direction: column;
	flex: 0 0 auto;
	gap: 1px;
	line-height: 1.1;
	text-align: right;
}

.pcrqr-card__category-label {
	color: #94a3b8;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.pcrqr-card__category-value {
	color: var(--pcrqr-accent);
	font-size: 16px;
	font-weight: 800;
}

/* Status badges (shared by card, fields and shortcodes). */
.pcrqr-status {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 3px 9px;
	border: 1px solid transparent;
	border-radius: 999px;
	font-size: 10px;
	font-weight: 800;
	line-height: 1.7;
	white-space: nowrap;
	vertical-align: middle;
}

.pcrqr-status--valid {
	color: #0a6b3d;
	background: #e7f7ee;
	border-color: #b7e4c9;
}

.pcrqr-status--soon {
	color: #8a4b00;
	background: #fff4e0;
	border-color: #f5d49a;
}

.pcrqr-status--expired {
	color: #a10000;
	background: #fdecec;
	border-color: #f3b9b9;
}

.pcrqr-status--none {
	color: #50575e;
	background: #f0f0f1;
	border-color: #dcdcde;
}

.pcrqr-card--expired .pcrqr-card__photo {
	filter: grayscale(0.35);
}

/* Single page. */
.pcrqr-single {
	padding: 38px 20px 64px;
	background: #f1f5f9;
	direction: rtl;
}

.pcrqr-single__inner {
	width: 100%;
	max-width: 980px;
	margin: 0 auto;
}

.pcrqr-single__nav {
	margin: 0 0 16px;
}

.pcrqr-single__back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #475569;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
}

.pcrqr-single__back:hover,
.pcrqr-single__back:focus {
	color: #b31217;
}

.pcrqr-card--single {
	box-shadow: 0 22px 55px rgba(15, 23, 42, 0.16);
}

.pcrqr-single__bio {
	max-width: 900px;
	margin: 28px auto 0;
	padding: 26px 30px;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	background: #ffffff;
}

.pcrqr-single__bio-title {
	margin: 0 0 12px;
	padding: 0;
	color: #0f172a;
	font-size: 18px;
	font-weight: 800;
	line-height: 1.4;
}

.pcrqr-single__bio-content {
	color: #334155;
	font-size: 15px;
	line-height: 1.9;
}

.pcrqr-single__bio-content > :first-child {
	margin-top: 0;
}

.pcrqr-single__bio-content > :last-child {
	margin-bottom: 0;
}

/* Shortcodes. */
.pcrqr-qr-shortcode {
	display: inline-block;
	max-width: 100%;
	direction: rtl;
}

.pcrqr-qr-link {
	display: inline-block;
	max-width: 100%;
}

.pcrqr-qr-image {
	display: block;
	max-width: 100%;
	height: auto;
	padding: 10px;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	background: #ffffff;
}

.pcrqr-field {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
}

.pcrqr-field__label {
	color: #64748b;
	font-size: 12px;
	font-weight: 600;
}

.pcrqr-field__value {
	color: inherit;
	font-weight: 600;
}

.pcrqr-field-photo {
	display: block;
	max-width: 220px;
	height: auto;
	border-radius: 12px;
}

/* Responsive. */
@media screen and (max-width: 820px) {
	.pcrqr-card__body {
		flex-wrap: wrap;
		gap: 22px;
		padding: 24px;
	}

	.pcrqr-card__photo-wrap {
		flex-basis: 135px;
		width: 135px;
	}

	.pcrqr-card__photo,
	.pcrqr-card .pcrqr-photo-placeholder {
		width: 135px;
		height: 162px;
	}

	.pcrqr-card__content {
		flex: 1 1 280px;
	}

	.pcrqr-card__qr {
		flex: 0 0 160px;
		margin-inline-start: auto;
	}
}

@media screen and (max-width: 620px) {
	.pcrqr-card__header {
		align-items: flex-start;
		flex-direction: column;
		gap: 12px;
		padding: 20px;
	}

	.pcrqr-card__brand {
		width: 100%;
	}

	.pcrqr-card__logo-wrap {
		flex-basis: 50px;
		width: 50px;
		height: 50px;
	}

	.pcrqr-card__org {
		font-size: 16px;
	}

	.pcrqr-card__body {
		align-items: stretch;
		flex-direction: column;
		padding: 20px;
	}

	.pcrqr-card__photo-wrap {
		align-self: center;
		flex-basis: auto;
		width: 150px;
	}

	.pcrqr-card__photo,
	.pcrqr-card .pcrqr-photo-placeholder {
		width: 150px;
		height: 180px;
	}

	.pcrqr-card__name {
		font-size: 23px;
	}

	.pcrqr-card__details {
		grid-template-columns: minmax(0, 1fr);
	}

	.pcrqr-card__detail--wide {
		grid-column: auto;
	}

	.pcrqr-card__qr {
		align-self: center;
		flex-basis: auto;
		width: 170px;
		margin-inline-start: 0;
	}

	.pcrqr-card__footer {
		align-items: flex-start;
		flex-direction: column;
		gap: 6px;
		padding: 13px 20px;
	}

	.pcrqr-single {
		padding: 24px 14px 44px;
	}

	.pcrqr-single__bio {
		margin-top: 20px;
		padding: 20px;
	}
}

/* Print: keep the card colors and remove page chrome. */
@media print {
	.pcrqr-single {
		padding: 0;
		background: #ffffff;
	}

	.pcrqr-single__nav,
	.pcrqr-single__bio,
	.pcrqr-card__footer-link {
		display: none !important;
	}

	.pcrqr-card {
		max-width: 100%;
		border: 1px solid #cccccc;
		box-shadow: none;
		break-inside: avoid;
	}

	.pcrqr-card__header {
		print-color-adjust: exact;
		-webkit-print-color-adjust: exact;
	}
}


/* =========================================================================
 * Printable membership card — original design as background
 * Front + back. The design files are bundled in assets/images/.
 * All dynamic values are injected by templates/card.php + card-back.php.
 * ========================================================================= */

.pcrqr-idcard-wrap {
	width: 100%;
	direction: rtl;
}

.pcrqr-idcard-wrap .ipfo-card-wrapper {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 50px;
	width: 100%;
	box-sizing: border-box;
	padding: 40px 20px;
	margin: 0 auto;
	font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.pcrqr-idcard-wrap .ipfo-card-box {
	position: relative;
	width: 100%;
	max-width: 1024px;
	aspect-ratio: 1024 / 646;
	margin: 0 auto;
	overflow: hidden;
	border-radius: 1.953cqw;
	background-color: #ffffff;
	background-position: center center;
	background-repeat: no-repeat;
	background-size: 100% 100%;
	box-shadow: 0 15px 40px rgba(0, 0, 0, 0.18);
	box-sizing: border-box;
	container-type: inline-size;
	direction: rtl;
	line-height: 1.2;
}

.pcrqr-idcard-wrap .ipfo-card-box *,
.pcrqr-idcard-wrap .ipfo-card-box *::before,
.pcrqr-idcard-wrap .ipfo-card-box *::after {
	box-sizing: border-box;
}

/* Front portrait */
.pcrqr-idcard-wrap .ipfo-user-avatar {
	position: absolute;
	top: 23.839%;
	left: 5.273%;
	width: 28.125%;
	height: 54.489%;
	z-index: 2;
	overflow: hidden;
	border-radius: 2.734cqw;
	background: #ebe3de;
}

.pcrqr-idcard-wrap .ipfo-user-avatar .ipfo-avatar-img,
.pcrqr-idcard-wrap .ipfo-user-avatar img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.pcrqr-idcard-wrap .ipfo-user-avatar .pcrqr-photo-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: #ebe3de;
}

.pcrqr-idcard-wrap .ipfo-user-avatar .pcrqr-photo-placeholder__initial {
	color: #0b192e;
	font-size: 8cqw;
	font-weight: 800;
	line-height: 1;
}

/* QR code inside the navy square of the design */
.pcrqr-idcard-wrap .ipfo-qr-code {
	position: absolute;
	top: 33.127%;
	left: 78.32%;
	width: 15.625%;
	height: 24.768%;
	z-index: 2;
	display: block;
	background: #ffffff;
}

.pcrqr-idcard-wrap .ipfo-qr-code a {
	display: block;
	width: 100%;
	height: 100%;
}

.pcrqr-idcard-wrap .ipfo-qr-code img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #ffffff;
}

/* Front dynamic values */
.pcrqr-idcard-wrap .ipfo-field-val {
	position: absolute;
	z-index: 3;
	color: #0b192e;
	font-weight: 800;
	line-height: 1.2;
	white-space: nowrap;
}

.pcrqr-idcard-wrap .ipfo-name-ar {
	top: 43.653%;
	right: 34.18%;
	font-size: 2.539cqw;
}

.pcrqr-idcard-wrap .ipfo-name-en {
	top: 52.941%;
	left: 43.945%;
	max-width: 33.5%;
	padding-left: 1.2%;
	font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
	font-size: 2.148cqw;
	direction: ltr;
	text-align: left;
	line-height: 1.15;
	white-space: normal;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.pcrqr-idcard-wrap .ipfo-position-ar {
	top: calc(61.146% + 1.172cqw);
	right: 34.18%;
	font-size: 2.344cqw;
}

.pcrqr-idcard-wrap .ipfo-position-en {
	top: calc(70.433% + 0.391cqw);
	left: 47.5%;
	padding-left: 1%;
	font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
	font-size: 1.953cqw;
	direction: ltr;
	text-align: left;
}

/* Footer values (card no. / issued / valid until) */
.pcrqr-idcard-wrap .ipfo-front-val {
	position: absolute;
	left: 60.254%;
	width: 12.695%;
	z-index: 3;
	color: #000000;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 1.855cqw;
	font-weight: 800;
	line-height: 1.2;
	text-align: left;
	white-space: nowrap;
}

.pcrqr-idcard-wrap .ipfo-front-no {
	top: calc(82.198% + 0.586cqw);
}

.pcrqr-idcard-wrap .ipfo-front-issued {
	top: 87.926%;
}

.pcrqr-idcard-wrap .ipfo-front-valid {
	top: calc(93.498% - 0.195cqw);
}

/* Category A/B/C under the printed "Category" label */
.pcrqr-idcard-wrap .ipfo-category-val {
	position: absolute;
	right: 2.539%;
	bottom: 5.882%;
	width: 15.527%;
	z-index: 3;
	color: #d4af37;
	font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
	font-size: 1.953cqw;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
}

/* Official stamp — above the portrait and never covered by it */
.pcrqr-idcard-wrap .ipfo-stamp {
	position: absolute;
	z-index: 5;
	height: auto;
	transform: rotate(-8deg);
	transform-origin: center center;
	pointer-events: none;
	filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.18));
}

/* Back face values */
.pcrqr-idcard-wrap .ipfo-back-val {
	position: absolute;
	right: 5.566%;
	width: 15%;
	z-index: 3;
	color: #000000;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 1.27cqw;
	font-weight: 800;
	line-height: 1.2;
	text-align: right;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pcrqr-idcard-wrap .ipfo-back-card-no {
	top: 26.92%;
}

.pcrqr-idcard-wrap .ipfo-back-name {
	top: 35.39%;
}

.pcrqr-idcard-wrap .ipfo-back-category {
	top: 43.84%;
}

.pcrqr-idcard-wrap .ipfo-back-issued {
	top: 52.31%;
}

.pcrqr-idcard-wrap .ipfo-back-valid {
	top: 60.77%;
}

.pcrqr-idcard-wrap .ipfo-back-website {
	top: 67.682%;
	font-size: 1.12cqw;
	direction: ltr;
}

.pcrqr-idcard-wrap .ipfo-back-email {
	top: 75.842%;
	font-size: 1cqw;
	direction: ltr;
}

/* All-cards shortcode grid */
.pcrqr-all-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
	gap: 30px;
	align-items: start;
}

.pcrqr-all-cards__item {
	min-width: 0;
}

.pcrqr-all-cards .ipfo-card-wrapper {
	gap: 0;
	padding: 0;
}

.pcrqr-all-cards__empty {
	margin: 0;
	padding: 18px 20px;
	border: 1px dashed #c3c4c7;
	border-radius: 10px;
	background: #f6f7f7;
	color: #50575e;
	text-align: center;
}

/* Responsive */
@media (max-width: 782px) {
	.pcrqr-idcard-wrap .ipfo-card-wrapper {
		gap: 24px;
		padding: 16px 0;
	}

	.pcrqr-idcard-wrap .ipfo-card-box {
		border-radius: 2.5cqw;
		box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
	}
}

/* Print: one face per page, exact colours. */
@media print {
	@page {
		size: A4 landscape;
		margin: 8mm;
	}

	.pcrqr-idcard-wrap .ipfo-card-wrapper {
		display: block !important;
		gap: 0 !important;
		padding: 0 !important;
	}

	.pcrqr-idcard-wrap .ipfo-card-box {
		width: 100% !important;
		max-width: none !important;
		margin: 0 auto !important;
		border-radius: 0 !important;
		box-shadow: none !important;
		break-inside: avoid;
		page-break-inside: avoid;
		page-break-after: always;
		break-after: page;
	}

	.pcrqr-idcard-wrap .ipfo-card-box:last-child {
		page-break-after: auto;
		break-after: auto;
	}

	.pcrqr-idcard-wrap .ipfo-card-box,
	.pcrqr-idcard-wrap .ipfo-card-box * {
		print-color-adjust: exact;
		-webkit-print-color-adjust: exact;
	}
}
