/* Homz Circle Categories
   المتغيرات دي هي اللي تعدّل عليها لو عايز تغيّر الشكل بسرعة */
.hcc {
	--hcc-size: 150px;
	--hcc-columns: 6;
	--hcc-gap: 24px;
	--hcc-ring: #eceff3;
	--hcc-ring-hover: #0f6fd1;
	--hcc-bg: #f6f8fa;
	--hcc-text: #1c1f23;
	--hcc-muted: #7b838d;

	max-width: 1240px;
	margin: 40px auto;
	padding: 0 16px;
	position: relative;
}

.hcc__title {
	margin: 0 0 20px;
	font-size: clamp(20px, 2.4vw, 28px);
	font-weight: 700;
	color: var(--hcc-text);
}

.hcc__wrap {
	position: relative;
}

.hcc__list {
	list-style: none;
	margin: 0;
	padding: 4px 0;
	display: flex;
	gap: var(--hcc-gap);
}

/* وضع الشريط الأفقي المتمرر */
.hcc__wrap--scroll .hcc__list {
	overflow-x: auto;
	scroll-behavior: smooth;
	scroll-snap-type: x proximity;
	-ms-overflow-style: none;
	scrollbar-width: none;
}

.hcc__wrap--scroll .hcc__list::-webkit-scrollbar {
	display: none;
}

.hcc__wrap--scroll .hcc__item {
	flex: 0 0 auto;
	width: var(--hcc-size);
	scroll-snap-align: start;
}

/* وضع الشبكة */
.hcc__list--grid {
	display: grid;
	grid-template-columns: repeat(var(--hcc-columns), minmax(0, 1fr));
	row-gap: 28px;
}

.hcc__item {
	margin: 0;
}

.hcc__link {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	color: var(--hcc-text);
}

.hcc__circle {
	width: var(--hcc-size);
	height: var(--hcc-size);
	max-width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: 50%;
	overflow: hidden;
	background: var(--hcc-bg);
	box-shadow: inset 0 0 0 1px var(--hcc-ring);
	display: block;
	transition: box-shadow .2s ease, transform .2s ease;
}

.hcc__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: 50%;
}

.hcc__name {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	text-align: center;
}

.hcc__count {
	font-size: 13px;
	color: var(--hcc-muted);
}

.hcc__link:hover .hcc__circle,
.hcc__link:focus-visible .hcc__circle {
	box-shadow: inset 0 0 0 2px var(--hcc-ring-hover);
	transform: translateY(-3px);
}

.hcc__link:focus-visible {
	outline: 2px solid var(--hcc-ring-hover);
	outline-offset: 6px;
	border-radius: 12px;
}

/* أزرار التنقل */
.hcc__nav {
	position: absolute;
	top: calc(var(--hcc-size) / 2);
	transform: translateY(-50%);
	z-index: 2;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: var(--hcc-text);
	box-shadow: 0 2px 10px rgba(16, 24, 40, .16);
	cursor: pointer;
	display: grid;
	place-items: center;
	padding: 0;
}

.hcc__nav[hidden] {
	display: none;
}

.hcc__nav svg {
	width: 20px;
	height: 20px;
}

.hcc__nav--prev { inset-inline-start: -14px; }
.hcc__nav--next { inset-inline-end: -14px; }

/* في الاتجاه من اليمين لليسار الأسهم تنعكس */
[dir="rtl"] .hcc__nav svg { transform: scaleX(-1); }

.hcc__list.is-dragging {
	cursor: grabbing;
	scroll-behavior: auto;
	scroll-snap-type: none;
}

.hcc__list.is-dragging .hcc__link {
	pointer-events: none;
}

@media (max-width: 1024px) {
	.hcc { --hcc-size: 120px; --hcc-gap: 18px; }
	.hcc__list--grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
	.hcc { --hcc-size: 96px; --hcc-gap: 14px; }
	.hcc__name { font-size: 13px; }
	.hcc__list--grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.hcc__nav { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.hcc__wrap--scroll .hcc__list { scroll-behavior: auto; }
	.hcc__circle { transition: none; }
	.hcc__link:hover .hcc__circle { transform: none; }
}
