/* Service Box blocks 3.0 – one stylesheet, all settings come from CSS custom properties. */
.tpsb {
	display: grid;
	grid-template-columns: repeat(var(--tpsb-cols, 3), minmax(0, 1fr));
	gap: var(--tpsb-gap, 10px);
}
@media (min-width: 992px) and (max-width: 1100px) {
	.tpsb { grid-template-columns: repeat(var(--tpsb-cols-laptop, var(--tpsb-cols, 3)), minmax(0, 1fr)); }
}
@media (min-width: 651px) and (max-width: 991px) {
	.tpsb { grid-template-columns: repeat(var(--tpsb-cols-tablet, 2), minmax(0, 1fr)); }
}
@media (max-width: 650px) {
	.tpsb { grid-template-columns: repeat(var(--tpsb-cols-mobile, 1), minmax(0, 1fr)); }
}
.tpsb *, .tpsb *::before, .tpsb *::after { box-sizing: border-box; }

/* ---- Item (shared) ---- */
.tpsb__item {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: var(--tpsb-pad, 15px);
	background: var(--tpsb-bg, #f8f8f8);
	border-radius: var(--tpsb-radius, 0);
	text-align: left;
	align-items: flex-start;
	transition: all .3s ease;
}
.tpsb--align-center .tpsb__item { text-align: center; align-items: center; }
.tpsb--align-right .tpsb__item { text-align: right; align-items: flex-end; }

.tpsb__icon { position: relative; z-index: 1; line-height: 1; }
.tpsb__icon i { color: var(--tpsb-icon-color, #000); font-size: var(--tpsb-icon-size, 30px); line-height: 1; }
.tpsb__icon svg { display: block; width: var(--tpsb-icon-size, 30px); height: var(--tpsb-icon-size, 30px); fill: var(--tpsb-icon-color, #000); }
.tpsb__icon img {
	display: block; height: var(--tpsb-icon-size, 30px); width: auto; max-width: 100%; object-fit: contain;
}
.tpsb__content { position: relative; z-index: 1; width: 100%; }
.tpsb__title {
	margin: 0 0 10px;
	padding: 0;
	font-size: var(--tpsb-title-size, 16px);
	font-weight: 600;
	line-height: 1.3;
	color: var(--tpsb-title-color, #000);
}
.tpsb__title a { color: inherit; font-size: inherit; text-decoration: none; }
.tpsb__title a:hover, .tpsb__title a:focus { color: var(--tpsb-title-hover, #0056b3); }
.tpsb__text {
	margin: 0;
	padding: 0;
	font-size: var(--tpsb-text-size, 15px);
	color: var(--tpsb-text-color, #7c7c7c);
}
.tpsb__button {
	display: inline-block;
	padding-top: 10px;
	font-size: var(--tpsb-btn-size, 14px);
	color: var(--tpsb-btn-color, #000);
	text-decoration: none;
	outline: 0;
}
a.tpsb__button:hover, a.tpsb__button:focus { color: var(--tpsb-btn-hover, #0056b3); }

/* ---- Style 1: round icon on top ---- */
.tpsb--style-1 .tpsb__icon {
	display: flex; align-items: center; justify-content: center;
	width: 70px; height: 70px; border-radius: 50%;
	background: var(--tpsb-icon-bg, #ddd); margin-bottom: 20px;
}

/* ---- Style 2: icon left, content right ---- */
.tpsb--style-2 .tpsb__item { flex-direction: row; align-items: flex-start; gap: 20px; }
.tpsb--style-2 .tpsb__icon i, .tpsb--style-2 .tpsb__icon svg, .tpsb--style-2 .tpsb__icon img { opacity: .7; transition: opacity .3s ease; }
.tpsb--style-2 .tpsb__item:hover .tpsb__icon i, .tpsb--style-2 .tpsb__item:hover .tpsb__icon svg, .tpsb--style-2 .tpsb__item:hover .tpsb__icon img { opacity: 1; }
.tpsb--style-2 .tpsb__content { width: auto; flex: 1 1 auto; }
.tpsb--style-2.tpsb--align-center .tpsb__item { justify-content: center; }
.tpsb--style-2.tpsb--align-right .tpsb__item { justify-content: flex-end; }

/* ---- Style 3: rotated square icon ---- */
.tpsb--style-3 .tpsb__icon {
	display: flex; align-items: center; justify-content: center;
	width: 80px; height: 80px; margin: 20px 15px 0;
	background: var(--tpsb-icon-bg, #ddd);
	transform: rotate(-45deg); transition: all .3s ease;
}
.tpsb--style-3 .tpsb__icon i, .tpsb--style-3 .tpsb__icon svg, .tpsb--style-3 .tpsb__icon img { transform: rotate(45deg); }
.tpsb--style-3 .tpsb__content { margin-top: 30px; }
.tpsb--style-3 .tpsb__item:hover .tpsb__icon { transform: rotate(0deg); }
.tpsb--style-3 .tpsb__item:hover .tpsb__icon i, .tpsb--style-3 .tpsb__item:hover .tpsb__icon svg, .tpsb--style-3 .tpsb__item:hover .tpsb__icon img { transform: rotate(0deg); }

.tpsb--style-2 .tpsb__icon, .tpsb--style-7 .tpsb__icon { flex: 0 0 auto; min-width: calc(var(--tpsb-icon-size, 30px) * 1.2); text-align: center; }

/* ---- Style 4: plain icon on top ---- */
.tpsb--style-4 .tpsb__icon { display: inline-block; margin-bottom: 20px; }
.tpsb--style-4 .tpsb__title { font-weight: 400; }

/* ---- Style 5: bordered box, ring icon, growing underline ---- */
.tpsb--style-5 .tpsb__item { border: 1px solid #ddd; transition: all .4s ease-in-out; }
.tpsb--style-5 .tpsb__icon {
	display: flex; align-items: center; justify-content: center;
	width: 80px; height: 80px; border-radius: 50%;
	background: var(--tpsb-icon-bg, #ddd);
	border: 5px solid var(--tpsb-icon-color, #000);
	margin-bottom: 30px; transition: all .2s ease-out;
}
.tpsb--style-5 .tpsb__icon i, .tpsb--style-5 .tpsb__icon svg, .tpsb--style-5 .tpsb__icon img { transform: rotate(0); transition: all .2s ease-out; }
.tpsb--style-5 .tpsb__item:hover .tpsb__icon i, .tpsb--style-5 .tpsb__item:hover .tpsb__icon svg, .tpsb--style-5 .tpsb__item:hover .tpsb__icon img { transform: rotate(360deg); }
.tpsb--style-5 .tpsb__title { position: relative; margin-bottom: 30px; }
.tpsb--style-5 .tpsb__title::after {
	content: ""; display: block; position: absolute; bottom: -15px; left: 0;
	width: 50px; height: 1px; background: #ddd; transition: all .2s ease-out;
}
.tpsb--style-5.tpsb--align-center .tpsb__title::after { left: 50%; transform: translateX(-50%); }
.tpsb--style-5.tpsb--align-right .tpsb__title::after { left: auto; right: 0; }
.tpsb--style-5 .tpsb__item:hover .tpsb__title::after { width: 100%; }

/* ---- Style 6: small round icon beside the title, text underneath ---- */
.tpsb--style-6 .tpsb__item {
	display: grid; align-items: center; align-content: start;
	grid-template-columns: auto 1fr; column-gap: 15px;
}
.tpsb--style-6.tpsb--align-center .tpsb__item { grid-template-columns: 1fr auto auto 1fr; }
.tpsb--style-6.tpsb--align-right .tpsb__item { grid-template-columns: 1fr auto auto; }
.tpsb--style-6 .tpsb__content { display: contents; }
.tpsb--style-6 .tpsb__icon {
	display: flex; align-items: center; justify-content: center;
	grid-row: 1; grid-column: 1;
	width: 50px; height: 50px; border-radius: 50%;
	background: var(--tpsb-icon-bg, #ddd); margin-bottom: 15px;
}
.tpsb--style-6.tpsb--align-center .tpsb__icon,
.tpsb--style-6.tpsb--align-right .tpsb__icon { grid-column: 2; }
.tpsb--style-6 .tpsb__title { grid-row: 1; grid-column: 2; margin-bottom: 10px; }
.tpsb--style-6.tpsb--align-center .tpsb__title,
.tpsb--style-6.tpsb--align-right .tpsb__title { grid-column: 3; }
.tpsb--style-6 .tpsb__text,
.tpsb--style-6 .tpsb__button { grid-column: 1 / -1; grid-row: auto; justify-self: stretch; }
.tpsb--style-6 .tpsb__button { justify-self: start; }
.tpsb--style-6.tpsb--align-center .tpsb__button { justify-self: center; }
.tpsb--style-6.tpsb--align-right .tpsb__button { justify-self: end; }

/* ---- Style 7: icon beside content, vertically centered ---- */
.tpsb--style-7 .tpsb__item { flex-direction: row; align-items: center; gap: 20px; }
.tpsb--style-7 .tpsb__content { width: auto; flex: 1 1 auto; }
.tpsb--style-7.tpsb--align-center .tpsb__item { justify-content: center; }
.tpsb--style-7.tpsb--align-right .tpsb__item { justify-content: flex-end; }


/* ======== 3.3: border, shadow, divider ======== */
.tpsb__item { box-shadow: var(--tpsb-shadow, none); }
.tpsb--shadow-small { --tpsb-shadow: 0 1px 3px rgba(0, 0, 0, .14); }
.tpsb--shadow-medium { --tpsb-shadow: 0 6px 16px rgba(0, 0, 0, .12); }
.tpsb--shadow-large { --tpsb-shadow: 0 14px 32px rgba(0, 0, 0, .16); }
.tpsb--has-border .tpsb__item { border: var(--tpsb-border-w, 1px) var(--tpsb-border-style, solid) var(--tpsb-border-color, #ddd); }
.tpsb--divider .tpsb__text {
	margin-top: 12px; padding-top: 12px;
	border-top: 1px solid var(--tpsb-divider-color, #ddd);
}
.tpsb--style-5.tpsb--divider .tpsb__text { margin-top: 0; padding-top: 0; border-top: 0; } /* style 5 has its own underline */

/* ======== 3.3: badges ======== */
.tpsb--auto-number { counter-reset: tpsb; }
.tpsb--auto-number .tpsb__item { counter-increment: tpsb; }
.tpsb__badge--auto::before { content: counter(tpsb, decimal-leading-zero); }
.tpsb__badge {
	display: inline-block; box-sizing: border-box;
	font-size: var(--tpsb-badge-size, 12px); font-weight: 600; line-height: 1; letter-spacing: .02em;
	padding: .45em .8em; white-space: nowrap;
	color: var(--tpsb-badge-color, #fff); background: var(--tpsb-badge-bg, #0056b3);
	border-radius: 999px; text-align: center;
}
.tpsb--badge-square .tpsb__badge { border-radius: 4px; }
.tpsb--badge-circle .tpsb__badge {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 2.4em; height: 2.4em; padding: 0 .4em; border-radius: 999px;
}
.tpsb__item > .tpsb__badge { position: absolute; top: 12px; z-index: 3; }
.tpsb--badge-top-right .tpsb__item > .tpsb__badge { right: 12px; }
.tpsb--badge-top-left .tpsb__item > .tpsb__badge { left: 12px; }
.tpsb__content > .tpsb__badge { margin-bottom: 10px; }
.tpsb--style-6 .tpsb__content > .tpsb__badge { grid-column: 1 / -1; justify-self: start; }
.tpsb--style-6.tpsb--align-center .tpsb__content > .tpsb__badge { justify-self: center; }
.tpsb--style-6.tpsb--align-right .tpsb__content > .tpsb__badge { justify-self: end; }
.tpsb--style-6.tpsb--badge-above-title .tpsb__content > .tpsb__badge { grid-row: 1; }
.tpsb--style-6.tpsb--badge-above-title .tpsb__icon,
.tpsb--style-6.tpsb--badge-above-title .tpsb__title { grid-row: 2; }

/* ======== 3.3: whole-box link ======== */
.tpsb--box-link .tpsb__item { cursor: pointer; }
.tpsb__box-link { position: absolute; inset: 0; z-index: 2; border-radius: inherit; text-decoration: none; }
.tpsb__box-link:focus-visible { outline: 2px solid var(--tpsb-title-hover, #0056b3); outline-offset: -2px; }
.tpsb--box-link .tpsb__item:hover .tpsb__title,
.tpsb--box-link .tpsb__item:focus-within .tpsb__title { color: var(--tpsb-title-hover, #0056b3); }
.tpsb--box-link .tpsb__item:hover .tpsb__button,
.tpsb--box-link .tpsb__item:focus-within .tpsb__button { color: var(--tpsb-btn-hover, #0056b3); }

/* ---- Hover effects (choose one in the block sidebar) ---- */
.tpsb--hover-lift .tpsb__item { transition: transform var(--tpsb-speed, 300ms) ease, box-shadow var(--tpsb-speed, 300ms) ease; }
.tpsb--hover-shadow .tpsb__item { transition: box-shadow var(--tpsb-speed, 300ms) ease; }
.tpsb--hover-bg-change .tpsb__item { transition: background-color var(--tpsb-speed, 300ms) ease; }
.tpsb--hover-zoom .tpsb__item { transition: transform var(--tpsb-speed, 300ms) ease, box-shadow var(--tpsb-speed, 300ms) ease; }
.tpsb--hover-border-grow .tpsb__item::after {
	content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 3px; pointer-events: none;
	background: var(--tpsb-hover-color, #0056b3);
	border-radius: 0 0 var(--tpsb-radius, 0) var(--tpsb-radius, 0);
	transition: width var(--tpsb-speed, 300ms) ease;
}
@keyframes tpsb-bounce {
	0%, 100% { translate: 0 0; }
	25% { translate: 0 -10px; }
	50% { translate: 0 0; }
	70% { translate: 0 -5px; }
}
@media (hover: hover) {
	.tpsb--hover-lift .tpsb__item:hover,
	.tpsb--hover-lift .tpsb__item:focus-within { transform: translateY(-8px); box-shadow: 0 12px 24px rgba(0, 0, 0, .12); }
	.tpsb--hover-shadow .tpsb__item:hover,
	.tpsb--hover-shadow .tpsb__item:focus-within { box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
	.tpsb--hover-border-grow .tpsb__item:hover::after,
	.tpsb--hover-border-grow .tpsb__item:focus-within::after { width: 100%; }
	.tpsb--hover-bg-change .tpsb__item:hover,
	.tpsb--hover-bg-change .tpsb__item:focus-within { background-color: var(--tpsb-hover-color, #e9f2ff); }
	.tpsb--hover-zoom .tpsb__item:hover,
	.tpsb--hover-zoom .tpsb__item:focus-within { transform: scale(1.04); z-index: 2; box-shadow: 0 8px 20px rgba(0, 0, 0, .12); }
	.tpsb--hover-icon-bounce .tpsb__item:hover .tpsb__icon,
	.tpsb--hover-icon-bounce .tpsb__item:focus-within .tpsb__icon { animation: tpsb-bounce calc(var(--tpsb-speed, 300ms) * 2) ease; }
}

@media (prefers-reduced-motion: reduce) {
	.tpsb__item, .tpsb__icon, .tpsb__icon i, .tpsb__icon svg, .tpsb__icon img, .tpsb__title::after { transition: none !important; }
	.tpsb[class*="tpsb--hover-"] .tpsb__item { transform: none !important; }
	.tpsb__icon { animation: none !important; }
}
