/* ============================================================
   Grid Ảnh Tròn — CSS Frontend
   4 ảnh/hàng trên máy tính · 2 ảnh/hàng trên mobile
   ============================================================ */

.gpt-section {
	--gpt-cols: 4;
	--gpt-cols-mb: 2;
	--gpt-dark: #14532d;
	--gpt-accent: #4caf19;
	--gpt-bg: #f4f8f2;
	position: relative;
	padding: 56px 0 44px;
	background: var(--gpt-bg);
	overflow: hidden;
}

/* Ảnh nền tùy chọn */
.gpt-section.has-bg::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: var(--gpt-bgimg);
	background-size: cover;
	background-position: center;
	opacity: 1;
	pointer-events: none;
}

.gpt-inner {
	position: relative;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

/* ---------- Tiêu đề ---------- */
.gpt-head {
	text-align: center;
	margin-bottom: 42px;
}
.gpt-rule {
	display: block;
	width: 190px;
	height: 2px;
	margin: 0 auto 18px;
	background: linear-gradient(90deg, transparent, var(--gpt-dark) 20%, var(--gpt-dark) 80%, transparent);
	opacity: .5;
}
.gpt-heading {
	margin: 0;
	color: var(--gpt-dark);
	font-size: clamp(28px, 5vw, 54px);
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: .01em;
	text-transform: uppercase;
}
.gpt-heading em {
	font-style: normal;
	color: var(--gpt-accent);
}

/* ---------- Grid ---------- */
.gpt-grid {
	display: grid;
	grid-template-columns: repeat(var(--gpt-cols), minmax(0, 1fr));
	gap: 40px 28px;
	align-items: start;
}

.gpt-item {
	display: block;
	text-align: center;
	text-decoration: none !important;
	color: inherit;
}

/* ---------- Ảnh tròn + icon ---------- */
.gpt-media {
	position: relative;
	width: 100%;
	max-width: 300px;
	margin: 0 auto;
}
.gpt-thumb {
	position: relative;
	aspect-ratio: 1 / 1;
	border-radius: 50%;
	overflow: hidden;
	background: #e8efe6;
	border: 8px solid #fff;
	box-shadow: 0 14px 34px rgba(20, 60, 30, .16);
	transition: transform .35s ease, box-shadow .35s ease;
}
.gpt-thumb img,
.gpt-thumb .gpt-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .5s ease;
}

/* Badge icon tròn dưới ảnh */
.gpt-icon {
	position: absolute;
	left: 50%;
	bottom: -6px;
	transform: translateX(-50%);
	width: 78px;
	height: 78px;
	border-radius: 50%;
	background: var(--gpt-dark);
	border: 5px solid #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 6px 16px rgba(20, 60, 30, .22);
}
.gpt-icon img {
	width: 46%;
	height: 46%;
	object-fit: contain;
	filter: brightness(0) invert(1); /* icon luôn hiện màu trắng */
}

/* ---------- Chữ ---------- */
.gpt-title {
	margin: 22px 0 10px;
	color: var(--gpt-dark);
	font-size: clamp(15px, 1.5vw, 22px);
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: .02em;
	text-transform: uppercase;
}
.gpt-item.has-icon .gpt-title {
	margin-top: 40px; /* chừa chỗ cho badge icon */
}
.gpt-desc {
	color: #45514a;
	font-size: clamp(13px, 1.1vw, 16px);
	line-height: 1.55;
}
.gpt-desc p {
	margin: 0;
}

/* ---------- Hover (chỉ khi có link) ---------- */
.gpt-item.is-link:hover .gpt-thumb {
	transform: translateY(-6px);
	box-shadow: 0 20px 42px rgba(20, 60, 30, .24);
}
.gpt-item.is-link:hover .gpt-thumb img {
	transform: scale(1.07);
}
.gpt-item.is-link:hover .gpt-title {
	color: var(--gpt-accent);
}

/* ---------- Mobile / Tablet ---------- */
@media (max-width: 849px) {
	.gpt-section { padding: 36px 0 28px; }
	.gpt-grid {
		grid-template-columns: repeat(var(--gpt-cols-mb), minmax(0, 1fr));
		gap: 30px 16px;
	}
	.gpt-head { margin-bottom: 26px; }
	.gpt-thumb { border-width: 5px; }
	.gpt-icon {
		width: 52px;
		height: 52px;
		border-width: 3px;
		bottom: -4px;
	}
	.gpt-item.has-icon .gpt-title { margin-top: 28px; }
	.gpt-title { margin-bottom: 6px; }
}
