.allservice-service-categories,
.allservice-service-categories * {
	box-sizing: border-box;
}

.allservice-service-categories {
	width: 100%;
	font-family: inherit;
}

.asc-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 14px;
}

@media (min-width: 768px) {
	.asc-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 20px;
	}
}

@media (min-width: 1025px) {
	.asc-grid {
		grid-template-columns: repeat(4, 1fr);
		gap: 24px;
	}
}

/* Card shell: rounded corners, soft ambient shadow, refined border and a
   light blue-grey tint for depth - matches the 16px radius / soft
   rgba(0,40,80,...) shadow language already established by the hero
   search box (allservice-hero-search/search.css). The resting state
   (not just hover) must read as a distinct card against the page's
   white background. */
.asc-card {
	display: flex;
	flex-direction: column;
	background: linear-gradient(180deg, #fcfdfe 0%, #eaf1f5 100%);
	border: 1px solid #d6e0e6;
	border-radius: 16px;
	padding: 16px;
	box-shadow: 0 4px 14px rgba(0, 40, 80, 0.11);
	transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

@media (hover: hover) {
	.asc-card:hover {
		box-shadow: 0 12px 30px rgba(0, 40, 80, 0.17);
		transform: translateY(-4px);
		border-color: rgba(0, 156, 216, 0.35);
	}
}

@media (min-width: 768px) {
	.asc-card {
		padding: 18px;
	}
}

@media (min-width: 1025px) {
	.asc-card {
		padding: 20px;
	}
}

.asc-card__media {
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 4px;
}

.asc-card__img {
	width: 100%;
	max-width: 80px;
	height: auto;
	object-fit: contain;
}

@media (min-width: 768px) {
	.asc-card__img {
		max-width: 96px;
	}
}

@media (min-width: 1025px) {
	.asc-card__img {
		max-width: 112px;
	}
}

/* --- Hierarchy level 1: category title - a small rounded-square blue
   marker to the left marks it as the card's primary label, title + marker
   centered as one unit. Approved prototype design, now applied to all 12
   cards.
   *
   * overflow-wrap:anywhere matters here, not just cosmetically: as a flex
   * item inside a column-direction flex container (.asc-card), the title's
   * cross-axis (width) contribution to the card's own intrinsic size
   * defaults toward its full one-line text width rather than a wrapped
   * min-content width. Since CSS Grid sizes a whole column from the
   * largest contribution across every row sharing it, one long title
   * ("Ремонт техники для красоты и ухода", "Ремонт электротранспорта")
   * was enough to force that entire grid column wider than intended,
   * overflowing the 2-column mobile grid by exactly the excess - even
   * though the same title visibly wrapped onto 3 lines once rendered.
   * overflow-wrap:anywhere (unlike overflow-wrap:break-word) explicitly
   * participates in min-content sizing per the CSS Text spec, so it
   * removes that width floor. Confirmed empirically: shrinking the title
   * to 1px font or removing it both collapsed the column back to its
   * fair share; so does this property alone, with no visual trade-off
   * at any width actually tested, since it only breaks a word if normal
   * space-wrapping would still overflow.
   */
.asc-card__title {
	max-width: 100%;
	margin: 0 0 10px;
	font-size: 16px;
	line-height: 1.3;
	font-weight: 700;
	color: #003F63;
	text-align: center;
	overflow-wrap: anywhere;
}

.asc-card__title::before {
	content: "";
	display: inline-block;
	width: 9px;
	height: 9px;
	margin-right: 7px;
	margin-bottom: 2px;
	border-radius: 3px;
	background: #009CD8;
	vertical-align: middle;
}

@media (min-width: 768px) {
	.asc-card__title {
		font-size: 17px;
	}
}

/*
 * !important below: the theme (kitchor/style.css) sets a global `a{color}`
 * plus the Elementor kit injects an inline `a:not(:hover){color:#009CD8}`
 * rule - both have higher specificity than a plain class selector (the
 * :not(:hover) pseudo-class counts toward specificity), so without
 * !important these links silently rendered in the theme's blue regardless
 * of what color was set here. Confirmed via computed-style inspection.
 */
.asc-card__title a {
	color: #003F63 !important;
	text-decoration: none;
	transition: color 0.2s ease;
}

.asc-card__title a:hover,
.asc-card__title a:focus-visible {
	color: #009CD8 !important;
	text-decoration: underline;
}

.asc-card__title--plain {
	color: #333333;
	font-weight: 600;
}

.asc-card__title a:focus-visible {
	outline: 2px solid #009CD8;
	outline-offset: 3px;
	border-radius: 2px;
}

/* --- Hierarchy level 2: individual service links - conventional dark
   underlined links, clearly clickable but subordinate to the title and
   the CTA. Approved prototype design, now applied to all 12 cards.
   overflow-wrap:anywhere here for the same reason as .asc-card__title
   above (long items like "Ремонт посудомоечных машин", "Ремонт
   выпрямителя для волос") - preemptive, not yet proven to overflow on
   its own, but the same flex-column min-content mechanism applies. --- */
.asc-card__list {
	list-style: none;
	margin: 0 0 12px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 9px;
	overflow-wrap: anywhere;
}

.asc-card__list li {
	font-size: 13px;
	line-height: 1.4;
	text-align: center;
}

.asc-card__list li a {
	display: inline-flex;
	align-items: center;
	padding: 6px 4px;
	margin: -6px 0;
	color: #333333 !important;
	font-weight: 400;
	text-decoration: underline;
	text-underline-offset: 2px;
	transition: color 0.2s ease;
}

.asc-card__list li a:hover,
.asc-card__list li a:focus-visible {
	color: #009CD8 !important;
}

.asc-card__list li a:focus-visible {
	outline: 2px solid #009CD8;
	outline-offset: 2px;
	border-radius: 4px;
}

.asc-card__plain-item {
	color: #97a2ab;
	font-weight: 400;
}

/* --- Hierarchy level 3: hub CTA - a real compact button, unmistakably
   clickable, reusing the site's own established button language (fill
   #009CD8, white text, uppercase, bold, asymmetric rounded corners -
   the same corner treatment as the homepage's own "СВЯЗАТЬСЯ С НАМИ"
   button) scaled down to fit inside a card. Unchanged by the prototype
   rollout. --- */
.asc-card__cta {
	margin-top: auto;
	align-self: center;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 18px;
	background: #009CD8;
	color: #ffffff !important;
	font-size: 12px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	text-decoration: none;
	border-radius: 0 14px 0 14px;
	box-shadow: 0 3px 10px rgba(0, 156, 216, 0.3);
	transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.asc-card__cta-arrow {
	flex: 0 0 auto;
	transition: transform 0.2s ease;
}

.asc-card__cta:hover,
.asc-card__cta:focus-visible {
	background: #003F63;
	box-shadow: 0 5px 14px rgba(0, 63, 99, 0.35);
	transform: translateY(-1px);
}

.asc-card__cta:hover .asc-card__cta-arrow,
.asc-card__cta:focus-visible .asc-card__cta-arrow {
	transform: translateX(3px);
}

.asc-card__cta:focus-visible {
	outline: 2px solid #003F63;
	outline-offset: 3px;
}
