/* Гео-блок поддоменов «Колодцы и септики в <городе>» (template-parts/geo.php). Подключается только на поддоменах. Префикс .kg- */
/* Вид — лист инженерных изысканий: миллиметровка, колонка-керн с условной штриховкой грунтов, как у штампа в подвале */

.kg { position: relative; background-color: var(--paper); background-image: linear-gradient(rgba(0, 128, 74, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 128, 74, .06) 1px, transparent 1px); background-size: 24px 24px; border-top: 1px solid var(--line); }
.kg__grid { display: grid; gap: 32px; align-items: start; }
.kg__main { min-width: 0; }

/* Метка района над заголовком */
.kg__tag { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; padding: 8px 14px 8px 10px; border: 1px solid var(--ink); border-radius: 8px; background: var(--white); font: 600 14px/1.3 var(--f-h); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.kg__pin { width: 12px; height: 12px; flex: none; border: 3px solid var(--g); border-radius: 50%; background: var(--white); box-shadow: 0 0 0 3px var(--g-l); }
.kg__h { max-width: 820px; margin-bottom: 24px; font: 700 clamp(28px, 3.6vw, 46px)/1.08 var(--f-h); letter-spacing: -.012em; }
.kg__text { display: grid; gap: 16px; max-width: 760px; font-size: 18px; line-height: 1.65; }
.kg__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 30px; }
.kg__tel { display: inline-flex; align-items: center; min-height: 48px; font: 700 20px/1.2 var(--f-h); color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--g); }
.kg__tel:hover { color: var(--g-d); }

/* Керн: колонка грунтов с условной штриховкой */
.kg__core { padding: 22px; border: 2px solid var(--ink); border-radius: var(--r-s); background: var(--white); box-shadow: var(--sh-s); }
.kg__core-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.kg__core-head b { font: 700 15px/1.3 var(--f-h); letter-spacing: .05em; text-transform: uppercase; }
.kg__core-head span { font-size: 15px; color: var(--mute); }
.kg__col { position: relative; display: flex; flex-direction: column; height: 300px; margin-left: 34px; border: 2px solid var(--ink); border-radius: 4px; overflow: hidden; }
.kg__col::before { content: ""; position: absolute; left: -34px; top: 0; bottom: 0; width: 22px; background: repeating-linear-gradient(to bottom, var(--ink) 0 2px, transparent 2px 30px); opacity: .55; }
.kg__layer { position: relative; display: flex; align-items: center; min-height: 34px; padding: 6px 12px; border-top: 1px solid rgba(23, 19, 18, .35); }
.kg__layer:first-child { border-top: 0; }
.kg__layer span { display: inline-block; padding: 3px 8px; border-radius: 6px; background: rgba(255, 255, 255, .92); font: 600 14px/1.25 var(--f-b); color: var(--ink); }
.kg__layer--soil { background: #6f5a48 repeating-linear-gradient(90deg, rgba(0, 0, 0, .12) 0 2px, transparent 2px 9px); }
.kg__layer--peat { background: #4d3b2c repeating-linear-gradient(0deg, rgba(255, 255, 255, .1) 0 2px, transparent 2px 7px); }
.kg__layer--loam { background: #c9a77c repeating-linear-gradient(135deg, rgba(23, 19, 18, .16) 0 1px, transparent 1px 10px); }
.kg__layer--clay { background: repeating-linear-gradient(45deg, rgba(23, 19, 18, .18) 0 1px, transparent 1px 8px), #a8836a repeating-linear-gradient(135deg, rgba(23, 19, 18, .18) 0 1px, transparent 1px 8px); }
.kg__layer--boulder { background: radial-gradient(circle at 20% 35%, #8e8a84 0 9px, transparent 10px), radial-gradient(circle at 72% 62%, #8e8a84 0 13px, transparent 14px), radial-gradient(circle at 48% 85%, #8e8a84 0 6px, transparent 7px), #c4a27a repeating-linear-gradient(135deg, rgba(23, 19, 18, .14) 0 1px, transparent 1px 10px); }
.kg__layer--sand-l { background: #e6d3a3 radial-gradient(rgba(23, 19, 18, .28) 1px, transparent 1.5px) 0 0 / 7px 7px; }
.kg__layer--sand { background: #d9c48e radial-gradient(rgba(23, 19, 18, .3) 1px, transparent 1.5px) 0 0 / 7px 7px; box-shadow: inset 0 3px 0 var(--water); }
.kg__layer--sand::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(62, 143, 153, .12), rgba(62, 143, 153, .42)); pointer-events: none; }
.kg__layer--sand span { position: relative; z-index: 1; }
.kg__layer--lime { background: repeating-linear-gradient(0deg, rgba(23, 19, 18, .3) 0 1px, transparent 1px 12px), #dcdcd2 repeating-linear-gradient(90deg, transparent 0 22px, rgba(23, 19, 18, .3) 22px 23px); }

.kg__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-top: 18px; }
.kg__facts div { padding: 12px 14px; border-radius: 10px; background: var(--stone); }
.kg__facts dt { margin-bottom: 4px; font: 600 13px/1.2 var(--f-h); letter-spacing: .05em; text-transform: uppercase; color: var(--mute); }
.kg__facts dd { margin: 0; font: 700 18px/1.25 var(--f-h); }
.kg__facts small { display: block; font: 600 14px/1.3 var(--f-b); color: var(--mute); }
.kg__fine { margin-top: 14px; font-size: 14px; line-height: 1.5; color: var(--mute); }

/* Посёлки и соседние города */
.kg__foot { display: grid; gap: 28px; margin-top: 44px; }
.kg__h3 { margin-bottom: 14px; font: 700 18px/1.3 var(--f-h); letter-spacing: .04em; text-transform: uppercase; }
.kg__places ul { display: flex; flex-wrap: wrap; gap: 8px; }
.kg__places li { padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); font-size: 16px; line-height: 1.3; }
.kg__near ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.kg__near a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 10px 14px; border: 1px solid var(--ink); border-radius: 8px; background: var(--white); font-weight: 700; text-decoration: none; transition: background-color .3s var(--ease), color .3s var(--ease); }
.kg__near svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
.kg__near a:hover { background: var(--ink); color: var(--white); }
.kg__near a:hover svg { transform: translateX(3px); }

@media (min-width: 960px) {
	.kg__grid { grid-template-columns: minmax(0, 1.45fr) minmax(320px, .85fr); gap: 56px; }
	.kg__col { height: 340px; }
	.kg__foot { grid-template-columns: minmax(0, 1.45fr) minmax(320px, .85fr); gap: 56px; }
	.kg__near ul { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 479px) {
	.kg__text { font-size: 17px; }
	.kg__core { padding: 16px; }
	.kg__col { height: 280px; margin-left: 26px; }
	.kg__col::before { left: -26px; width: 16px; }
	.kg__acts .k-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.kg__near a, .kg__near svg { transition: none; }
}
