﻿.container {
	display: block !important;
}

/* ------- Service/{id} page -------
   Hero, filter, search and the light-blue accent come from services.css
   (.services-page); this file styles the service cards, the rating and the intro. */

/* style.css gives every child of .my-family a 30px margin on top of the grid gap. */
.subservices-page > .ss-list {
	margin: 0;
}

/* ------- Service cards ------- */

.subservices-page .mf-content {
	display: grid;
	/* Two per line; every card in a row is as tall as the tallest (names are cut to two lines). */
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1em;
}

.ss-item {
	position: relative;
}

	.ss-item[hidden] {
		display: none;
	}

.ss-card {
	position: relative;
	overflow: hidden;
	display: flex;
	align-items: center;
	gap: 1em;
	height: 100%;
	min-height: 112px;
	padding: 1.1em 1.2em;
	color: #0a2a4f;
	text-decoration: none;
	background: linear-gradient(180deg, rgba(var(--acc-rgb), .05) 0%, #fff 60%);
	border: 1px solid #dbe4ee;
	border-radius: 16px;
	box-shadow: 0 6px 20px rgba(6, 28, 57, .05);
	transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s ease, border-color .25s ease;
}

	.ss-card::before {
		content: "";
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		height: 4px;
		background: linear-gradient(90deg, var(--acc), rgba(var(--acc-rgb), .4));
		transform: scaleX(0);
		transform-origin: left;
		transition: transform .35s cubic-bezier(.2, .8, .2, 1);
	}

	.ss-card:hover {
		text-decoration: none;
		border-color: rgba(var(--acc-rgb), .45);
		box-shadow: 0 18px 38px rgba(var(--acc-rgb), .16);
		transform: translateY(-4px);
	}

		.ss-card:hover::before {
			transform: scaleX(1);
		}

.ss-card-icon {
	flex-shrink: 0;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 14px;
	color: var(--acc);
	background: rgba(var(--acc-rgb), .11);
	transition: background .25s ease, color .25s ease;
}

	.ss-card-icon svg {
		width: 24px;
		height: 24px;
		fill: none;
		stroke: currentColor;
		stroke-width: 1.9;
		stroke-linecap: round;
		stroke-linejoin: round;
	}

	.ss-card:hover .ss-card-icon {
		color: #fff;
		background: var(--acc);
	}

	/* Catalogue image (category without a line icon, or a life event's own picture). */
	.ss-card-img {
		width: 30px;
		height: 30px;
		background-position: center;
		background-repeat: no-repeat;
		background-size: contain;
	}

	.ss-card:hover .ss-card-icon--picture,
	.ss-card:hover .ss-card-icon:has(.ss-card-img) {
		background: rgba(var(--acc-rgb), .2);
	}

.ss-card-text {
	display: flex;
	flex-direction: column;
	gap: .45em;
	flex: 1;
	min-width: 0;
}

/* At most two lines, so the cards of a row line up; the full name is in the card's title. */
.ss-card-name {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.35;
	color: #0a2a4f;
	transition: color .2s ease;
}

	.ss-card:hover .ss-card-name {
		color: var(--acc);
	}

/* Responsible institution (subservices.js ssInstitution): one quiet line with a building icon. */
.ss-card-institution {
	display: flex;
	align-items: center;
	gap: .4em;
	min-width: 0;
	font-size: .82rem;
	line-height: 1.35;
	color: #5b6b80;
}

	.ss-card-institution svg {
		flex-shrink: 0;
		width: 14px;
		height: 14px;
		fill: none;
		stroke: currentColor;
		stroke-width: 1.8;
		stroke-linecap: round;
		stroke-linejoin: round;
	}

	.ss-card-institution > span {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

.ss-card-chips {
	display: flex;
	flex-wrap: wrap;
	gap: .35em;
}

.ss-chip {
	display: inline-flex;
	align-items: center;
	padding: .15em .65em;
	font-size: .72rem;
	font-weight: 600;
	line-height: 1.5;
	color: #1d61a1;
	background: rgba(var(--acc-rgb), .1);
	border-radius: 999px;
}

.ss-chip--paid {
	color: #8a5a00;
	background: #fff4d6;
}

.ss-chip--free {
	color: #1f7a4d;
	background: #e6f6ee;
}

.ss-chip--event {
	color: #5b4bc4;
	background: rgba(91, 75, 196, .1);
}

.ss-card-arrow {
	flex-shrink: 0;
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: 10px;
	font-size: 1.1em;
	line-height: 1;
	color: var(--acc);
	background: rgba(var(--acc-rgb), .09);
	transition: background .2s ease, color .2s ease, transform .2s ease;
}

	.ss-card:hover .ss-card-arrow {
		color: #fff;
		background: var(--acc);
		transform: translateX(3px);
	}

/* ------- Rating (signed-in users, services already used) ------- */

.ss-card .container-rating {
	position: static;
	width: auto;
	margin: 0;
	padding: 0;
}

	.container-rating .star-widget input {
		display: none;
	}

.star-widget {
	display: inline-block;
}

	.star-widget label {
		color: #1d61a1;
		padding: 2px 3px;
		float: right;
		font-size: .9rem;
		transition: all 0.2s ease;
	}

input:checked ~ label {
	color: #ffec99;
}

/* ------- Intro (some categories: logos + text, optionally "Vazhdo") ------- */

#serviceIntro {
	margin-bottom: 1.4em;
	padding: 1.4em 1.6em;
	background: linear-gradient(120deg, #f1f7ff 0%, #ffffff 70%);
	border: 1px solid rgba(var(--acc-rgb), .2);
	border-radius: 16px;
	box-shadow: 0 6px 20px rgba(6, 28, 57, .05);
}

	#serviceIntro > .d-flex {
		justify-content: center;
		gap: 1.5em;
	}

	#serviceIntro img {
		align-self: center;
		height: 72px;
	}

	#serviceIntro > div:not(.d-flex) {
		margin: 1.2em 0 0 !important;
		text-align: justify;
		line-height: 1.6;
		color: #334155;
	}

	#serviceIntro #showServicesButton {
		margin-top: 1.2em;
	}

/* ------- Keyboard focus ------- */

.ss-card:focus-visible {
	outline: 3px solid #1d61a1;
	outline-offset: 2px;
}

/* ------- Rating reason modal ------- */

.error-message {
	margin-bottom: 10px;
}

.modal {
	display: none;
	position: fixed;
	z-index: 700;
	padding-top: 100px;
	padding-bottom: 100px;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background-color: rgba(0,0,0,0.4);
}

.modal-content {
	background-color: #fefefe;
	margin: auto;
	padding: 10px 30px;
	border: 1px solid #888;
	border-radius: 10px;
	width: 450px;
	height: auto;
}

.modal-close {
	margin-top: 10px;
	background-color: #1d61a1;
	color: white;
	width: 100px;
	height: 30px;
	border-radius: 10px;
	border: 1px solid #fff;
}

textarea {
	padding-left: 8px;
	padding-right: 5px;
	padding-top: 5px;
	border: 1px solid #ddd;
	border-radius: 10px;
	resize: none;
}

label {
	font-size: .875em;
}

hr {
	border-top: 1px solid #e2e0e0;
}

.review-title {
	margin: auto;
}

.popup .popup-content .body {
	max-height: 400px;
}

@media (prefers-reduced-motion: reduce) {
	.subservices-page * {
		transition: none !important;
	}
}
