/**
 * Rosha Profiles — premium RTL profile hub
 * Accent aligned with Rosha red/gold; light, airy surfaces.
 */

.rprof {
	--rprof-radius: 18px;
	--rprof-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
	--rprof-shadow-hover: 0 16px 40px rgba(185, 28, 60, 0.1);
	color: var(--rosha-text);
	padding-bottom: 3.5rem;
}

.rprof a { text-decoration: none; }

/* Hero — centered avatar, no cover */
.rprof-hero {
	position: relative;
	margin: 1.5rem 0 2rem;
}

.rprof-hero__inner {
	position: relative;
	z-index: 2;
}

.rprof-hero__card {
	background: #fff;
	border: 1px solid var(--rosha-line);
	border-radius: var(--rprof-radius);
	box-shadow: var(--rprof-shadow);
	padding: 2rem 1.75rem 2.1rem;
}

.rprof-hero__identity {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 1.15rem;
}

.rprof-hero__text {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
}

.rprof-avatar {
	position: relative;
	flex-shrink: 0;
	width: 148px;
	height: 148px;
	margin: 0 auto;
}

.rprof-avatar__img,
.rprof-avatar__fallback {
	width: 148px;
	height: 148px;
	border-radius: 50%;
	object-fit: cover;
	display: grid;
	place-items: center;
	border: 4px solid #fff;
	box-shadow:
		0 0 0 3px rgba(185, 28, 60, 0.12),
		0 12px 28px rgba(15, 23, 42, 0.12);
	background: linear-gradient(145deg, #fff7ed, #ffe4e6);
}

.rprof-avatar__fallback {
	font-size: 3rem;
	font-weight: 900;
	color: var(--rosha-red);
}

.rprof-verified {
	position: absolute;
	left: 8px;
	bottom: 8px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: #fff;
	color: #2563eb;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}

.rprof-verified--inline {
	position: static;
	display: inline-flex;
	width: auto;
	height: auto;
	background: none;
	box-shadow: none;
	color: #2563eb;
	margin-right: 0.25rem;
}

.rprof-type {
	display: inline-flex;
	padding: 0.2rem 0.7rem;
	border-radius: 999px;
	background: rgba(185, 28, 60, 0.08);
	color: var(--rosha-red);
	font-size: 0.8rem;
	font-weight: 800;
}

.rprof-name {
	margin: 0.55rem 0 0.65rem;
	font-size: clamp(1.55rem, 2.6vw, 2.15rem);
	font-weight: 900;
	line-height: 1.25;
	letter-spacing: -0.02em;
	color: var(--rosha-text) !important;
}

.rprof-desc {
	margin: 0 auto;
	max-width: 52ch;
	color: var(--rosha-muted);
	font-size: 1rem;
	line-height: 1.85;
	white-space: pre-line;
	text-align: center;
}

.rprof-hero__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.85rem;
	margin-top: 1.15rem;
}

.rprof-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	min-height: 44px;
	padding: 0.65rem 1.2rem;
	border-radius: 14px;
	font-weight: 800;
	font-size: 0.92rem;
	border: 1px solid transparent;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
	font-family: inherit;
}

.rprof-btn:hover { transform: translateY(-2px); }

.rprof-btn--primary {
	background: linear-gradient(120deg, var(--rosha-red), #e11d48) !important;
	color: #fff !important;
	box-shadow: 0 8px 20px rgba(185, 28, 60, 0.25);
}

.rprof-btn--ghost {
	background: #fff !important;
	color: var(--rosha-text) !important;
	border-color: var(--rosha-line);
}

.rprof-btn--ghost:hover {
	border-color: rgba(185, 28, 60, 0.3);
	background: rgba(245, 197, 24, 0.14) !important;
}

.rprof-social {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.4rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.rprof-social__link {
	display: inline-grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: var(--rosha-surface);
	border: 1px solid var(--rosha-line);
	color: var(--rosha-text) !important;
	transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.rprof-social__link:hover {
	transform: translateY(-2px);
	border-color: rgba(185, 28, 60, 0.35);
	color: var(--rosha-red) !important;
}

.rprof-social-svg,
.rprof-social__link .rosha-social-svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

/* Layout */
.rprof-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 1.5rem;
	align-items: start;
}

.rprof-layout--full {
	grid-template-columns: 1fr;
}

.rprof-section {
	margin-bottom: 2rem;
	padding: 1.35rem 1.4rem;
	background: #fff;
	border: 1px solid var(--rosha-line);
	border-radius: var(--rprof-radius);
	box-shadow: var(--rprof-shadow);
}

.rprof-section__head { margin-bottom: 1.1rem; }

.rprof-section__head--row {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 1rem;
	align-items: flex-end;
}

.rprof-section__title {
	margin: 0;
	font-size: 1.2rem;
	font-weight: 900;
	color: var(--rosha-text) !important;
}

.rprof-section__sub {
	margin: 0.3rem 0 0;
	color: var(--rosha-muted);
	font-size: 0.9rem;
}

/* Categories */
.rprof-cats__grid {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.rprof-cat-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.55rem 0.9rem;
	border-radius: 999px;
	background: var(--rosha-surface);
	border: 1px solid var(--rosha-line);
	color: var(--rosha-text) !important;
	font-weight: 700;
	transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.rprof-cat-chip:hover,
.rprof-cat-chip.is-active {
	transform: translateY(-1px);
	border-color: rgba(185, 28, 60, 0.35);
	background: rgba(245, 197, 24, 0.18);
}

.rprof-cat-chip__count {
	display: inline-flex;
	min-width: 1.6rem;
	justify-content: center;
	padding: 0.1rem 0.45rem;
	border-radius: 999px;
	background: #fff;
	color: var(--rosha-red);
	font-size: 0.8rem;
	font-weight: 900;
}

.rprof-cat-chip--clear {
	background: transparent;
	color: var(--rosha-muted) !important;
}

/* Sort */
.rprof-sort {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 0.3rem;
	padding: 0.25rem;
	border-radius: 14px;
	background: var(--rosha-surface);
	border: 1px solid var(--rosha-line);
}

.rprof-sort__btn {
	padding: 0.4rem 0.75rem;
	border-radius: 10px;
	color: var(--rosha-muted) !important;
	font-size: 0.85rem;
	font-weight: 700;
}

.rprof-sort__btn:hover,
.rprof-sort__btn.is-active {
	background: #fff;
	color: var(--rosha-red) !important;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

/* Post cards */
.rprof-posts__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
}

.rprof-card {
	margin: 0;
	border-radius: 16px;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--rosha-line);
	transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.rprof-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--rprof-shadow-hover);
	border-color: rgba(185, 28, 60, 0.22);
}

.rprof-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: inherit !important;
}

.rprof-card__media {
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--rosha-surface);
}

.rprof-card__img,
.rprof-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.rprof-card:hover .rprof-card__img,
.rprof-card:hover .rprof-card__media img {
	transform: scale(1.04);
}

.rprof-card__placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #fff7ed, #ffe4e6 60%, #fef3c7);
}

.rprof-card__body {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	padding: 1rem 1.05rem 1.15rem;
	min-width: 0;
}

.rprof-card__cat {
	color: var(--rosha-red) !important;
	font-size: 0.78rem;
	font-weight: 800;
}

.rprof-card__title {
	margin: 0;
	font-size: 1rem;
	font-weight: 800;
	line-height: 1.5;
	color: var(--rosha-text) !important;
}

.rprof-card__excerpt {
	margin: 0;
	color: var(--rosha-muted);
	font-size: 0.88rem;
	line-height: 1.7;
}

.rprof-card__meta {
	margin-top: auto;
	padding-top: 0.55rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	font-size: 0.78rem;
	color: var(--rosha-muted);
}

.rprof-more-wrap {
	display: flex;
	justify-content: center;
	margin-top: 1.25rem;
}

.rprof-empty {
	grid-column: 1 / -1;
	margin: 0;
	padding: 1.5rem;
	text-align: center;
	color: var(--rosha-muted);
	background: var(--rosha-surface);
	border-radius: 14px;
}

/* Skeleton — only visible while loading more */
.rprof-skeleton {
	display: none;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
	margin-top: 1rem;
}

.rprof-skeleton:not([hidden]) {
	display: grid;
}

.rprof-skeleton[hidden] {
	display: none !important;
}

.rprof-skel-card {
	border-radius: 16px;
	border: 1px solid var(--rosha-line);
	overflow: hidden;
	background: #fff;
}

.rprof-skel-card__media,
.rprof-skel-card__line {
	background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 37%, #f1f5f9 63%);
	background-size: 400% 100%;
	animation: rprof-shimmer 1.2s ease infinite;
}

.rprof-skel-card__media { aspect-ratio: 16/10; }
.rprof-skel-card__line {
	height: 12px;
	margin: 0.85rem 1rem;
	border-radius: 8px;
}
.rprof-skel-card__line--short { width: 55%; }

@keyframes rprof-shimmer {
	0% { background-position: 100% 0; }
	100% { background-position: 0 0; }
}

/* Sidebar */
.rprof-sidebar {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	position: sticky;
	top: 5.5rem;
}

.rprof-side-card {
	padding: 1.15rem 1.2rem;
	background: #fff;
	border: 1px solid var(--rosha-line);
	border-radius: var(--rprof-radius);
	box-shadow: var(--rprof-shadow);
}

.rprof-side-card__title {
	margin: 0 0 0.9rem;
	font-size: 0.98rem;
	font-weight: 900;
	color: var(--rosha-text) !important;
}

.rprof-meta-list {
	margin: 0;
	display: grid;
	gap: 0.75rem;
}

.rprof-meta-list > div {
	display: grid;
	gap: 0.15rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--rosha-line);
}

.rprof-meta-list > div:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.rprof-meta-list dt {
	font-size: 0.78rem;
	color: var(--rosha-muted);
	font-weight: 600;
}

.rprof-meta-list dd {
	margin: 0;
	font-weight: 700;
}

.rprof-meta-list a { color: var(--rosha-red) !important; }

.rprof-ext-links,
.rprof-mini-list,
.rprof-pop-cats {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.45rem;
}

.rprof-ext-links a,
.rprof-pop-cats a {
	display: flex;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.55rem 0.7rem;
	border-radius: 12px;
	background: var(--rosha-surface);
	border: 1px solid transparent;
	color: var(--rosha-text) !important;
	font-weight: 700;
	font-size: 0.88rem;
	transition: border-color 0.18s ease, transform 0.18s ease;
}

.rprof-ext-links a:hover,
.rprof-pop-cats a:hover {
	border-color: rgba(185, 28, 60, 0.25);
	transform: translateY(-1px);
}

.rprof-mini-list li {
	display: grid;
	gap: 0.15rem;
	padding: 0.55rem 0;
	border-bottom: 1px solid var(--rosha-line);
}

.rprof-mini-list li:last-child { border-bottom: none; }
.rprof-mini-list a {
	color: var(--rosha-text) !important;
	font-weight: 700;
	font-size: 0.9rem;
}
.rprof-mini-list a:hover { color: var(--rosha-red) !important; }
.rprof-mini-list span {
	font-size: 0.78rem;
	color: var(--rosha-muted);
}

.rprof-about__content {
	color: var(--rosha-text);
	line-height: 1.9;
}

/* Archive */
.rprof-archive { padding: 2.5rem 0 3rem; }

.rprof-archive__head { margin-bottom: 1.75rem; }

.rprof-archive__title {
	margin: 0;
	font-size: clamp(1.6rem, 3vw, 2.2rem);
	font-weight: 900;
	color: var(--rosha-text) !important;
}

.rprof-archive__sub {
	margin: 0.45rem 0 0;
	color: var(--rosha-muted);
}

.rprof-archive__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.1rem;
}

.rprof-archive-card {
	margin: 0;
	background: #fff;
	border: 1px solid var(--rosha-line);
	border-radius: var(--rprof-radius);
	overflow: hidden;
	box-shadow: var(--rprof-shadow);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rprof-archive-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--rprof-shadow-hover);
}

.rprof-archive-card__link {
	display: grid;
	grid-template-columns: 96px 1fr;
	gap: 1rem;
	padding: 1rem;
	align-items: center;
	color: inherit !important;
}

.rprof-archive-card__media {
	width: 96px;
	height: 96px;
	border-radius: 50%;
	overflow: hidden;
	background: var(--rosha-surface);
}

.rprof-archive-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.rprof-archive-card__fallback {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	font-size: 2rem;
	font-weight: 900;
	color: var(--rosha-red);
	background: linear-gradient(145deg, #fff7ed, #ffe4e6);
}

.rprof-archive-card__title {
	margin: 0.35rem 0;
	font-size: 1.05rem;
	font-weight: 900;
	color: var(--rosha-text) !important;
}

.rprof-archive-card__body p {
	margin: 0;
	color: var(--rosha-muted);
	font-size: 0.88rem;
}

/* Dark mode: keep profile mostly light as requested, soft adaptation */
html[data-theme="dark"] .rprof-hero__card,
html[data-theme="dark"] .rprof-section,
html[data-theme="dark"] .rprof-side-card,
html[data-theme="dark"] .rprof-card,
html[data-theme="dark"] .rprof-archive-card {
	background: var(--rosha-header);
	border-color: var(--rosha-line);
}

html[data-theme="dark"] .rprof-btn--ghost {
	background: var(--rosha-surface) !important;
}

@media (max-width: 1100px) {
	.rprof-posts__grid,
	.rprof-skeleton,
	.rprof-archive__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 960px) {
	.rprof-layout {
		grid-template-columns: 1fr;
	}
	.rprof-sidebar {
		position: static;
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 1rem;
	}
}

@media (max-width: 700px) {
	.rprof-avatar,
	.rprof-avatar__img,
	.rprof-avatar__fallback {
		width: 128px;
		height: 128px;
	}
	.rprof-avatar__fallback { font-size: 2.6rem; }
	.rprof-hero__card { padding: 1.5rem 1.15rem 1.75rem; }
	.rprof-section__head--row { align-items: stretch; }
	.rprof-posts__grid,
	.rprof-skeleton,
	.rprof-archive__grid,
	.rprof-sidebar {
		grid-template-columns: 1fr;
	}
	.rprof-archive-card__link {
		grid-template-columns: 72px 1fr;
	}
	.rprof-archive-card__media {
		width: 72px;
		height: 72px;
	}
}
