/**
 * Bregdeti Shqiptar — Icon boxes
 * Desktop/tablet: 5-column grid · Mobile: Swiper
 * Uses globals.css tokens only.
 *
 * @package HelloElementorChild
 */

.hec-bregdeti {
	width: 100%;
	max-width: var(--container-max);
	margin-inline: auto;
	padding-inline: 1.5rem;
	box-sizing: border-box;
	font-family: var(--font-body);
	color: var(--color-ink);
}

.hec-bregdeti__heading {
	margin: 0 0 2rem;
	font-family: var(--font-heading);
	font-size: clamp(1.5rem, 3vw, 2.25rem);
	font-weight: var(--font-weight-bold);
	line-height: 1.2;
	color: var(--color-ink);
}

.hec-bregdeti__swiper {
	overflow: visible;
}

.hec-bregdeti__wrapper {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 1.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.hec-bregdeti__slide {
	min-width: 0;
	height: auto;
	box-sizing: border-box;
}

.hec-bregdeti__box {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1.25rem;
	height: 100%;
	min-height: 180px;
	padding: 1.5rem 1.25rem;
	box-sizing: border-box;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	text-decoration: none;
	color: inherit;
	transition:
		transform var(--transition-base),
		border-color var(--transition-base),
		box-shadow var(--transition-base),
		background-color var(--transition-base);
}

.hec-bregdeti__box:hover {
	transform: translateY(-6px);
	border-color: var(--color-sea);
	box-shadow: 0 14px 32px rgba(7, 59, 76, 0.12);
	background: var(--color-frost);
}

.hec-bregdeti__box:focus-visible {
	outline: 2px solid var(--color-sea);
	outline-offset: 3px;
}

.hec-bregdeti__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: var(--radius-md);
	background: rgba(17, 138, 178, 0.1);
	color: var(--color-sea);
	font-size: 1.35rem;
	line-height: 1;
	transition:
		background-color var(--transition-base),
		color var(--transition-base),
		transform var(--transition-base);
}

.hec-bregdeti__icon i,
.hec-bregdeti__icon svg {
	width: 1.35rem;
	height: 1.35rem;
	font-size: 1.35rem;
	fill: currentColor;
}

.hec-bregdeti__box:hover .hec-bregdeti__icon {
	background: var(--color-sea);
	color: var(--color-surface);
	transform: scale(1.06);
}

.hec-bregdeti__body {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	width: 100%;
	margin-top: auto;
}

.hec-bregdeti__title {
	margin: 0;
	font-family: var(--font-heading);
	font-size: 1.05rem;
	font-weight: var(--font-weight-bold);
	line-height: 1.3;
	color: var(--color-ink);
	transition: color var(--transition-fast);
}

.hec-bregdeti__box:hover .hec-bregdeti__title {
	color: var(--color-sea);
}

.hec-bregdeti__more {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-family: var(--font-body);
	font-size: 0.8125rem;
	font-weight: var(--font-weight-semibold);
	letter-spacing: 0.02em;
	color: var(--color-muted-foreground);
	transition: color var(--transition-fast), gap var(--transition-fast);
}

.hec-bregdeti__more-icon {
	display: inline-flex;
	width: 14px;
	height: 14px;
	transition: transform var(--transition-fast);
}

.hec-bregdeti__more-icon svg {
	width: 100%;
	height: 100%;
	stroke: currentColor;
	fill: none;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.hec-bregdeti__box:hover .hec-bregdeti__more {
	color: var(--color-sea);
	gap: 0.55rem;
}

.hec-bregdeti__box:hover .hec-bregdeti__more-icon {
	transform: translateX(3px);
}

.hec-bregdeti__pagination {
	display: none;
}

/* Pre-GSAP hide — desktop only */
@media (min-width: 768px) {
	.hec-bregdeti:not(.hec-bregdeti--ready) .hec-bregdeti__heading {
		opacity: 0;
		transform: translateY(24px);
	}

	.hec-bregdeti:not(.hec-bregdeti--ready) .hec-bregdeti__box {
		opacity: 0;
		transform: translateY(36px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.hec-bregdeti:not(.hec-bregdeti--ready) .hec-bregdeti__heading,
	.hec-bregdeti:not(.hec-bregdeti--ready) .hec-bregdeti__box {
		opacity: 1;
		transform: none;
	}
}

/* Tablet keeps 5 columns; tighten gap/padding */
@media (max-width: 1024px) {
	.hec-bregdeti__wrapper {
		gap: 1rem;
	}

	.hec-bregdeti__box {
		min-height: 160px;
		padding: 1.25rem 1rem;
	}

	.hec-bregdeti__title {
		font-size: 0.95rem;
	}
}

/* Mobile: Swiper */
@media (max-width: 767px) {
	.hec-bregdeti {
		padding: 0;
	}

	.hec-bregdeti h2.hec-bregdeti__heading {
		padding-left: 20px;
		margin-bottom: 1.25rem;
	}

	.hec-bregdeti__swiper {
		overflow: hidden;
		padding: 30px 0;
	}

	.hec-bregdeti--swiper .hec-bregdeti__wrapper {
		display: flex !important;
		grid-template-columns: none !important;
		gap: 0 !important;
	}

	.hec-bregdeti--swiper .hec-bregdeti__slide {
		width: calc(100% - 40px) !important;
		max-width: calc(100% - 40px);
		height: auto;
		display: flex;
		box-sizing: border-box;
	}

	.hec-bregdeti:not(.hec-bregdeti--swiper) .hec-bregdeti__wrapper {
		display: flex;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		gap: 1rem;
		-webkit-overflow-scrolling: touch;
		padding-inline: 20px;
	}

	.hec-bregdeti:not(.hec-bregdeti--swiper) .hec-bregdeti__slide {
		flex: 0 0 100%;
		scroll-snap-align: start;
		width: 100% !important;
		padding-left: 0;
		padding-right: 0;
	}

	.hec-bregdeti__box {
		width: 100%;
		min-height: 170px;
	}

	.hec-bregdeti__pagination {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 0.4rem;
		margin-top: 1.25rem;
		position: static !important;
	}

	.hec-bregdeti__pagination .swiper-pagination-bullet {
		width: 8px;
		height: 8px;
		margin: 0 !important;
		background: var(--color-border);
		opacity: 1;
		border-radius: var(--radius-pill);
		transition: width var(--transition-base), background var(--transition-base);
	}

	.hec-bregdeti__pagination .swiper-pagination-bullet-active {
		width: 22px;
		background: var(--color-sea);
	}
}
