/* ==========================================================
   K9 Paw – Services Grid widget
   ========================================================== */
.k9sv {
	--k9-gold: #DCA54A;
	--k9-ic: 68px;
	--k9-img-h: 200px;
	position: relative;
	overflow: hidden;
	padding: 60px 40px 70px;
	background: #f8f5ef;
	font-family: var(--k9-font, 'Roboto', sans-serif);
	color: #555;
}
.k9sv *, .k9sv *::before, .k9sv *::after { box-sizing: border-box; }
.k9sv__inner { position: relative; z-index: 2; max-width: 1440px; margin: 0 auto; }

/* ---------- Decorations ---------- */
.k9sv__shape { position: absolute; z-index: 0; pointer-events: none; }
.k9sv__shape--tl {
	top: 80px; left: 100px; width: 80px; height: 130px;
	background: linear-gradient(160deg, #f0cf8c, var(--k9-gold));
	clip-path: polygon(0 0, 30% 0, 100% 100%, 70% 100%);
	opacity: .9;
}
.k9sv__shape--bl {
	left: 0; bottom: 0; width: 160px; height: 200px;
	background: #171717;
	clip-path: polygon(0 0, 100% 100%, 0 100%);
}
.k9sv__shape--bl::after {
	content: ""; position: absolute; left: 85px; bottom: 0; width: 70px; height: 80px;
	background: var(--k9-gold); clip-path: polygon(0 0, 40% 0, 100% 100%, 60% 100%);
}
.k9sv__corner-ic { position: absolute; left: 30px; bottom: 30px; color: var(--k9-gold); font-size: 40px; }
.k9sv__corner-ic svg { width: 40px; height: 40px; fill: currentColor; }
.k9sv__bars {
	position: absolute; right: 56px; bottom: 60px; z-index: 0; width: 126px; height: 4px; border-radius: 2px;
	background: linear-gradient(90deg, var(--k9-gold) 62%, #171717 62%);
}
.k9sv__wm {
	position: absolute; top: 20px; right: 40px; z-index: 0; pointer-events: none;
	font-size: 300px; line-height: 1; color: rgba(220,165,74,.07);
}
.k9sv__wm svg { width: 300px; height: 300px; fill: currentColor; }
.k9sv__badge {
	position: absolute; top: 150px; right: 34px; z-index: 1;
	display: flex; flex-direction: column; align-items: flex-end;
	color: #171717; transform: rotate(-8deg); pointer-events: none;
}
.k9sv__badge b { font-size: 34px; font-weight: 300; font-style: italic; letter-spacing: -.5px; line-height: 1; }
.k9sv__badge small {
	font-size: 11px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase;
	margin-top: 4px; padding-bottom: 6px; border-bottom: 2px solid var(--k9-gold);
}

/* ---------- Heading ---------- */
.k9sv__head { text-align: center; max-width: 820px; margin: 0 auto 50px; }
.k9sv__sub {
	font-size: 14px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase;
	color: var(--k9-gold); margin-bottom: 14px;
}
.k9sv__sub--lines span { display: inline-flex; align-items: center; gap: 22px; }
.k9sv__sub--lines span::before,
.k9sv__sub--lines span::after { content: ""; width: 64px; height: 2px; background: var(--k9-gold); }
.k9sv__title {
	font-family: var(--k9-font, 'Roboto', sans-serif);
	font-size: 46px; font-weight: 800; line-height: 1.15; color: #171717; margin: 0 0 16px;
}
.k9sv__title em { font-style: normal; color: var(--k9-gold); }
.k9sv__desc { font-size: 17px; line-height: 1.6; color: #555; }
.k9sv__desc p { margin: 0 0 8px; color: inherit; font: inherit; }
.k9sv__desc p:last-child { margin: 0; }

/* ---------- Grid & cards ---------- */
.k9sv__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }

.k9sv__card {
	position: relative;
	display: flex; flex-direction: column;
	background: #fff;
	border: 1px solid rgba(0,0,0,.04);
	border-radius: 8px;
	box-shadow: 0 10px 30px rgba(30,20,0,.07);
	overflow: hidden;
	transition: transform .4s ease, box-shadow .4s ease, border-color .4s ease;
}
.k9sv__card:hover {
	transform: translateY(-8px);
	box-shadow: 0 22px 44px rgba(30,20,0,.14);
	border-color: rgba(220,165,74,.45);
}

.k9sv__media {
	position: relative; height: var(--k9-img-h); overflow: hidden;
	clip-path: polygon(0 0, 100% 0, 100% 100%, 0 76%);
}
.k9sv__media img {
	display: block; width: 100%; height: 100% !important; max-width: none;
	object-fit: cover; transition: transform .8s ease;
}
.k9sv__card:hover .k9sv__media img { transform: scale(1.08); }
/* gold line along the slanted edge (right part) */
.k9sv__card::before {
	content: ""; position: absolute; z-index: 2; right: 0;
	top: calc(var(--k9-img-h) - 52px); width: 42%; height: 56px;
	background: linear-gradient(to top right, transparent calc(50% - 1.5px), var(--k9-gold) calc(50% - 1.5px), var(--k9-gold) calc(50% + 1.5px), transparent calc(50% + 1.5px));
	pointer-events: none;
}

.k9sv__ic {
	position: absolute; z-index: 3; left: 26px; top: calc(var(--k9-img-h) - var(--k9-ic) + 4px);
	width: var(--k9-ic); height: var(--k9-ic); border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
	font-size: 26px; color: #1a1a1a;
	background: radial-gradient(circle at 35% 30%, #f3d08c, var(--k9-gold) 70%);
	border: 4px solid #fff;
	box-shadow: 0 8px 18px rgba(0,0,0,.18);
	transition: transform .5s ease, background .4s ease, color .4s ease;
}
.k9sv__ic svg { width: 26px; height: 26px; fill: currentColor; }
.k9sv__card:hover .k9sv__ic { transform: rotateY(360deg); background: #171717; color: var(--k9-gold); }

.k9sv__body {
	position: relative; flex: 1;
	display: flex; align-items: center; gap: 18px;
	padding: 24px 26px 26px;
}
.k9sv__btx { flex: 1; min-width: 0; }
.k9sv__ctitle {
	font-family: var(--k9-font, 'Roboto', sans-serif);
	font-size: 21px; font-weight: 700; line-height: 1.25; color: #171717; margin: 0 0 8px;
	transition: color .3s ease;
}
.k9sv__card:hover .k9sv__ctitle { color: var(--k9-gold); }
.k9sv__ctext, .k9sv__ctext p { font-size: 15px; line-height: 1.5; color: #666; margin: 0; }

.k9sv__arrow {
	flex: 0 0 48px; width: 48px; height: 48px; border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
	color: #171717 !important; background: transparent;
	border: 2px solid var(--k9-gold);
	font-size: 16px; text-decoration: none !important;
	transition: background-color .3s ease, color .3s ease, transform .3s ease;
}
.k9sv__arrow svg { width: 16px; height: 16px; fill: currentColor; }
.k9sv__card:hover .k9sv__arrow { background-color: var(--k9-gold); color: #171717 !important; transform: translateX(4px); }
.k9sv__arrow:focus-visible { outline: 2px solid var(--k9-gold); outline-offset: 3px; }
/* whole-card click */
.k9sv__stretch::after { content: ""; position: absolute; inset: 0; z-index: 4; }
.k9sv__card { cursor: default; }
.k9sv__card:has(.k9sv__stretch) { cursor: pointer; }

/* ---------- Footer button (global .k9-btn style) ---------- */
.k9sv__foot { text-align: center; margin-top: 40px; }

/* ---------- Entrance animation ---------- */
.k9sv--animate.k9sv--ready .k9sv__card { opacity: 0; transform: translateY(30px); }
.k9sv--animate.k9sv--ready.is-in .k9sv__card {
	opacity: 1; transform: none;
	transition: opacity .6s ease calc(var(--i, 0) * .1s), transform .6s ease calc(var(--i, 0) * .1s), box-shadow .4s ease, border-color .4s ease;
}
.k9sv--animate.k9sv--ready.is-in .k9sv__card:hover { transform: translateY(-8px); transition-delay: 0s; }

@media (prefers-reduced-motion: reduce) {
	.k9sv__card, .k9sv__ic, .k9sv__media img { transition: none !important; }
	.k9sv--animate.k9sv--ready .k9sv__card { opacity: 1; transform: none; }
}

/* ==========================================================
   Responsive
   ========================================================== */
@media (max-width: 1366px) {
	.k9sv__grid { gap: 24px; }
	.k9sv__ctitle { font-size: 19px; }
	.k9sv__badge, .k9sv__shape--tl { display: none; }
}
@media (max-width: 1024px) {
	.k9sv { padding: 60px 30px; }
	.k9sv__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.k9sv__title { font-size: 38px; }
	.k9sv__wm { font-size: 200px; }
	.k9sv__wm svg { width: 200px; height: 200px; }
	.k9sv__shape--bl { width: 110px; height: 140px; }
	.k9sv__shape--bl::after { left: 60px; width: 50px; height: 56px; }
	.k9sv__corner-ic { left: 18px; bottom: 18px; font-size: 28px; }
	.k9sv__bars { display: none; }
}
@media (max-width: 767px) {
	.k9sv { padding: 50px 16px 60px; --k9-ic: 58px; }
	.k9sv__grid { grid-template-columns: 1fr; gap: 22px; }
	.k9sv__head { margin-bottom: 34px; }
	.k9sv__sub { font-size: 12px; letter-spacing: 2px; }
	.k9sv__sub--lines span { gap: 12px; }
	.k9sv__sub--lines span::before, .k9sv__sub--lines span::after { width: 30px; }
	.k9sv__title { font-size: 29px; }
	.k9sv__desc { font-size: 15px; }
	.k9sv__body { padding: 20px 18px 22px; gap: 14px; }
	.k9sv__ic { left: 18px; font-size: 22px; }
	.k9sv__ctitle { font-size: 18px; }
	.k9sv__ctext, .k9sv__ctext p { font-size: 14px; }
	.k9sv__arrow { flex-basis: 42px; width: 42px; height: 42px; }
	.k9sv__foot .k9-btn { width: 100%; }
	.k9sv__shape--bl, .k9sv__wm { display: none; }
}
