
.gm-cases { --gm-blue: #1565a8; --gm-line: #8fb4d8; --gm-text: #333; color: var(--gm-text); }
.gm-cases *, .gm-cases *::before, .gm-cases *::after { box-sizing: border-box; }

.gm-cases { padding-inline: clamp(0px, 6.65%, 49px); padding-bottom: 120px; container-type: inline-size; }

.gm-cases__title {
	position: relative;
	margin: 0 0 .8em;
	padding: 8px 8px 8px 0;
	border: 0;
	border-bottom: 1px solid #707070;
	color: #00549c;
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1.4;
}
.gm-cases__title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -1px;
	width: 168px;
	max-width: 50%;
	height: 4px;
	background: #00549c;
}
.gm-cases__lead { margin: 0 0 1.8em; font-size: .8125rem; color: #666; }

.gm-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 24px; }
.gm-filter__label { flex: none; font-size: .875rem; font-weight: 700; color: #00549c; }
.gm-filter__dd { position: relative; min-width: 240px; max-width: 100%; }
.gm-filter__summary {
	display: block; list-style: none; cursor: pointer;
	margin: 0; padding: .5em 2.4em .5em 1.1em;
	border: 1px solid #8db6ec; border-radius: 999px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2300549c' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 1em center;
	color: #2d6bb8; font-size: .9375rem; line-height: 1.5;
}
.gm-filter__summary::-webkit-details-marker { display: none; }
.gm-filter__value { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-filter__summary:focus-visible { outline: 2px solid #00549c; outline-offset: 2px; }
.gm-filter__dd[open] .gm-filter__summary { border-color: #00549c; }
.gm-filter__panel {
	position: absolute; z-index: 5; left: 0; top: calc(100% + 6px);
	width: max(100%, 280px); max-height: 320px; overflow-y: auto;
	padding: 10px 14px 12px;
	background: #fff; border: 1px solid #c9dcf3; border-radius: 12px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}
.gm-filter__panel ul { margin: 0; padding: 0; list-style: none; }
.gm-filter__panel li { margin: 0; padding: 0; }
.gm-filter__panel label { display: flex; align-items: center; gap: .6em; padding: .5em .2em; font-size: .9375rem; color: #333; cursor: pointer; }
.gm-filter__panel input { flex: none; width: 1.1em; height: 1.1em; margin: 0; accent-color: #00549c; }
.gm-filter__panel span { flex: 1; }
.gm-filter__panel small { color: #888; font-size: .75rem; }
.gm-filter__clear { margin: 6px 0 0; padding: 0; border: 0; background: none; color: #00549c; font-size: .8125rem; text-decoration: underline; cursor: pointer; }
.gm-filter__none { margin: 0 0 24px; padding: 2em 0; text-align: center; color: #888; }
.gm-case[hidden] { display: none; }

.gm-cases__list { --gm-ph: clamp(340px, 28.5cqw, 600px); display: grid; gap: 28px; }

.gm-case {
	display: grid;
	grid-template-columns: minmax(260px, max(300px, 25%)) minmax(0, 1fr);
	gap: 28px;
	align-items: stretch;
	height: calc(var(--gm-ph) + 48px);
	padding: 24px;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
}

.gm-case__body { display: flex; flex-direction: column; align-items: flex-start; min-height: 0; max-height: var(--gm-ph); padding: 0; overflow-y: auto; }
.gm-case__name {
	display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
	margin: 0 0 .7em; font-size: 1.5rem; font-weight: 400; line-height: 1.4; letter-spacing: .02em; color: #333;
}

.gm-case__name, .gm-case__tags { flex: none; }
.gm-case--points .gm-case__desc { -webkit-line-clamp: 3; }
.gm-case__tags { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 0 0 1.2em; padding: 0; list-style: none; }
.gm-case__tags li {
	margin: 0;
	padding: .35em 1.5em;
	border: 1px solid #8db6ec;
	border-radius: 999px;
	background: #eaf3ff;
	color: #2d6bb8;
	font-size: 1rem;
	line-height: 1.5;
}

.gm-case__desc {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 4;
	overflow: hidden;
	margin: 0 0 1.2em;
	padding-left: .6rem;
	font-size: 1rem;
	line-height: 1.7;
	color: #444;
}
.gm-case__desc.is-open { display: block; overflow: visible; }
.gm-case__more {
	margin: -.6em 0 1em .6rem;
	padding: 0;
	border: 0;
	background: none;
	color: #00549c;
	font-size: .8125rem;
	cursor: pointer;
	text-decoration: underline;
}
.gm-case__more:hover { opacity: .75; }

.gm-case__btn {
	display: inline-block;
	flex: none;
	margin: auto 0 0 .6rem;
	padding: .8em 2.2em;
	border-radius: 999px;
	background: #00549c;
	color: #fff !important;
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.4;
	text-decoration: none !important;
	transition: opacity .2s;
}
.gm-case__btn:hover { opacity: .8; }

.gm-case__photo { position: relative; margin: 0; overflow: hidden; border-radius: 10px; background: #e8eef3; }
.gm-case__photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gm-case__zoom { display: block; width: 100%; height: 100%; cursor: pointer; }
.gm-case__zoom img { transition: transform .3s; }
.gm-case__zoom:hover img { transform: scale(1.04); }
.gm-case__photo figcaption {
	position: absolute; left: 8px; bottom: 8px;
	padding: 1px 10px;
	border-radius: 4px;
	background: rgba(0, 0, 0, .55);
	color: #fff;
	font-size: .75rem;
}

.gm-case__photos { display: grid; gap: 10px; height: var(--gm-ph); }

.gm-case__photos--n1 { grid-template-columns: 1fr; grid-template-rows: var(--gm-ph); }
.gm-case__photos--n2 { grid-template-columns: 1.17fr 1fr; grid-template-rows: var(--gm-ph); }

.gm-case__photos--n3 { grid-template-columns: 1.17fr 1fr; grid-template-rows: calc((var(--gm-ph) - 10px) / 2) calc((var(--gm-ph) - 10px) / 2); }
.gm-case__photos--n3 .gm-case__photo--0 { grid-row: 1 / 3; }

.gm-case__photos--n4 { grid-template-columns: 1.17fr .5fr .5fr; grid-template-rows: calc((var(--gm-ph) - 10px) * .55) calc((var(--gm-ph) - 10px) * .45); }
.gm-case__photos--n4 .gm-case__photo--0 { grid-row: 1 / 3; }
.gm-case__photos--n4 .gm-case__photo--1 { grid-column: 2 / 4; }

.gm-case__photos--n5 { grid-template-columns: 1.17fr .5fr .5fr; grid-template-rows: calc((var(--gm-ph) - 10px) / 2) calc((var(--gm-ph) - 10px) / 2); }
.gm-case__photos--n5 .gm-case__photo--0 { grid-row: 1 / 3; }

.gm-case__photos--n6 { grid-template-columns: 1.17fr .5fr .5fr .5fr; grid-template-rows: calc((var(--gm-ph) - 10px) / 2) calc((var(--gm-ph) - 10px) / 2); }
.gm-case__photos--n6 .gm-case__photo--0 { grid-row: 1 / 3; }
.gm-case__photos--n6 .gm-case__photo--5 { grid-column: span 2; }

.gm-case__points {
	align-self: stretch;
	max-height: var(--gm-ph);
	overflow-y: auto;
	padding: 22px 20px;
	border-radius: 12px;
	background: #f1f7fd;
}
.gm-case__points-title { margin: 0 0 1.2em; font-size: .9375rem; font-weight: 700; color: #222; }
.gm-case__points ul { margin: 0; padding: 0; list-style: none; }
.gm-case__points li { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 1.3em; padding: 0; }
.gm-case__points li:last-child { margin-bottom: 0; }
.gm-case__icon {
	display: flex; flex: none; align-items: center; justify-content: center;
	width: 38px; height: 38px;
	border-radius: 50%;
	background: #dcebf8;
	color: var(--gm-blue);
}
.gm-case__point-text { display: block; font-size: .75rem; line-height: 1.7; color: #555; }
.gm-case__point-text strong { display: block; margin-bottom: .1em; font-size: .875rem; color: #222; }

.gm-case--info { height: auto; min-height: calc(var(--gm-ph) + 48px); }
.gm-case--info.gm-case--n1.gm-case--points, .gm-case--info.gm-case--n2.gm-case--points { grid-template-columns: minmax(220px, 260px) minmax(0, 1.1fr) minmax(300px, 1fr); }
.gm-case--info .gm-case__body { max-height: none; overflow: visible; }
.gm-case--info .gm-case__points { display: flex; flex-direction: column; max-height: none; overflow: visible; padding: 22px 20px; }
.gm-case--info .gm-case__points-title { margin-bottom: 1em; font-size: 1rem; }
.gm-case--info .gm-case__points li { gap: 12px; margin-bottom: 1em; }
.gm-case--info .gm-case__icon { width: 36px; height: 36px; }
.gm-case--info .gm-case__icon svg { width: 20px; height: 20px; }
.gm-case--info .gm-case__point-text { font-size: .9375rem; line-height: 1.7; }
.gm-case--info .gm-case__point-text strong { font-size: 1.0625rem; line-height: 1.5; }
.gm-case__info { margin-top: .6em; padding-top: 14px; border-top: 1px solid #d3e3f3; }
.gm-case__info-title { margin: 0 0 .5em; font-size: 1rem; font-weight: 700; color: #222; }
.gm-case__info dl { margin: 0; }
.gm-case__info dl > div { display: flex; gap: 10px; margin: 0 0 .35em; font-size: .9375rem; line-height: 1.7; color: #555; }
.gm-case__info dt { flex: none; width: 5em; white-space: nowrap; font-weight: 700; color: #222; }
.gm-case__info dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.gm-case__map { display: inline-block; margin-top: .3em; font-size: .9375rem; font-weight: 700; color: #00549c; text-decoration: underline; }

.gm-case--info .gm-case__photo figcaption {
	left: 0; right: 0; bottom: 0; max-width: none;
	padding: 34px 14px 12px; border-radius: 0;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, .62));
	font-size: .9375rem; font-weight: 600; line-height: 1.4; letter-spacing: .04em;
	white-space: normal; text-shadow: 0 1px 4px rgba(0, 0, 0, .5);
}

.gm-case--n1.gm-case--points, .gm-case--n2.gm-case--points { grid-template-columns: minmax(240px, 280px) minmax(0, 1.2fr) minmax(180px, 1fr); }

.gm-case--n0.gm-case--points { grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); }

.gm-case--n0:not(.gm-case--points) { grid-template-columns: 1fr; }

.gm-case--n0 { height: auto; align-items: center; }
.gm-case--n0 .gm-case__body { max-height: none; overflow: visible; }
.gm-case--n0 .gm-case__desc { -webkit-line-clamp: 6; }
.gm-case--n0 .gm-case__points { max-height: none; }
.gm-case--n0 .gm-case__btn { margin-top: 0; }

.gm-cases__empty { padding: 3em 0; text-align: center; color: #888; }

.gm-lb { position: fixed; inset: 0; z-index: 2000000100; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .82); }
.gm-lb__img { max-width: min(92vw, 1100px); max-height: 82vh; border-radius: 6px; box-shadow: 0 8px 40px rgba(0, 0, 0, .5); }
.gm-lb__cap { position: absolute; left: 0; right: 0; bottom: 4vh; text-align: center; color: #fff; font-size: .875rem; }
.gm-lb button { position: absolute; border: 0; background: rgba(255, 255, 255, .18); color: #fff; cursor: pointer; border-radius: 50%; width: 44px; height: 44px; font-size: 22px; line-height: 1; }
.gm-lb button:hover { background: rgba(255, 255, 255, .35); }
.gm-lb__close { top: 20px; right: 20px; }
.gm-lb__prev { left: 20px; top: 50%; margin-top: -22px; }
.gm-lb__next { right: 20px; top: 50%; margin-top: -22px; }

@container (max-width: 760px) {
	.gm-case, .gm-case--n1.gm-case--points, .gm-case--n2.gm-case--points, .gm-case--n0.gm-case--points { grid-template-columns: 1fr; height: auto; }
	.gm-case__body { max-height: none; overflow: visible; }
	.gm-case__points { max-height: none; }
	.gm-case--points .gm-case__points ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
	.gm-case--points .gm-case__points li { margin: 0; }
	.gm-case--info, .gm-case--info.gm-case--n1.gm-case--points, .gm-case--info.gm-case--n2.gm-case--points { grid-template-columns: 1fr; min-height: 0; }
	.gm-case--info .gm-case__points ul { display: block; }
	.gm-case--info .gm-case__points li { margin-bottom: 1em; }
	.gm-case__info { margin-top: 1.2em; }
}

@media (max-width: 767px) {

	.gm-cases { padding-inline: 2px; padding-bottom: 72px; }
	.gm-case { padding: 16px; gap: 16px; height: auto; }
	.gm-case--points .gm-case__points ul { grid-template-columns: 1fr; }

	.gm-filter__label { flex: 1 1 100%; }
	.gm-filter__dd { width: 100%; min-width: 0; }
	.gm-filter__panel { width: 100%; max-height: 50vh; }
	.gm-case__photo figcaption { left: 6px; bottom: 6px; max-width: calc(100% - 12px); overflow: hidden; padding: 1px 8px; font-size: .6875rem; white-space: nowrap; text-overflow: ellipsis; }

	.gm-case__name { font-size: 1.25rem; }
	.gm-case__tags li { font-size: .875rem; padding: .3em 1.1em; }
	.gm-case__desc { padding-left: 0; }
	.gm-case__more { margin-left: 0; align-self: flex-start; }
	.gm-case__body { align-items: stretch; }
	.gm-case__btn { display: block; margin: 0; padding: .85em 1em; font-size: 1rem; text-align: center; white-space: nowrap; }

	.gm-case__photos { height: auto; grid-template-columns: repeat(6, 1fr); grid-template-rows: auto; grid-auto-rows: auto; gap: 8px; }
	.gm-case__photo { aspect-ratio: 4 / 3; }
	.gm-case__photos .gm-case__photo { grid-row: auto; grid-column: span 3; }
	.gm-case__photos .gm-case__photo--0 { grid-column: 1 / -1; }
	.gm-case__photos--n4 .gm-case__photo:not(.gm-case__photo--0) { grid-column: span 2; }
	.gm-case__photos--n2 .gm-case__photo--1 { grid-column: 1 / -1; }
	.gm-case__photos--n6 .gm-case__photo--5 { grid-column: 1 / -1; }
}
