/* Trafaret.ua — «Роботи майстрів»: добірка й сторінка кейса. */

.trf-cases .trf-cases-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px 20px; padding-block: 8px 12px; }
.trf-cases .trf-case-card { display: grid; gap: 12px; align-content: start; }
.trf-cases .trf-case-media { position: relative; display: block; background: var(--sheet); aspect-ratio: 4 / 3; overflow: hidden; }
.trf-cases .trf-case-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.trf-cases .trf-case-card:hover .trf-case-media img { transform: scale(1.03); }
.trf-cases .trf-case-badge { position: absolute; left: 12px; top: 12px; background: rgba(29, 30, 27, .78); color: var(--sheet); font: 500 11.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 7px 9px; }
.trf-cases .trf-case-card h3 { font: 600 18px/1.3 var(--body); letter-spacing: 0; }
.trf-cases .trf-case-card h3 a:hover { color: var(--orange-deep); }
.trf-cases .trf-case-card p { color: var(--mortar); font-size: 15px; }
.trf-cases .trf-case-tools { font: 400 13px/1.5 var(--mono); color: var(--pvc-ink); background: var(--pvc); padding: 8px 10px; }

.trf-cases .trf-cases-cta { margin-top: clamp(32px, 5vw, 56px); background: var(--ink); color: var(--sheet); padding: clamp(24px, 4vw, 44px); display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px 48px; align-items: center; }
.trf-cases .trf-cases-cta h2 { color: var(--sheet); font-size: clamp(22px, 2.6vw, 32px); font-weight: 700; margin: 12px 0 10px; }
.trf-cases .trf-cases-cta p { color: #C9C7C0; max-width: 60ch; }
.trf-cases .trf-cases-cta-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.trf-cases .trf-btn-on-dark { box-shadow: inset 0 0 0 1.5px var(--sheet) !important; color: var(--sheet) !important; }
.trf-cases .trf-btn-on-dark:hover { background: var(--sheet) !important; color: var(--ink) !important; }

/* ---------- сторінка кейса ---------- */
.trf-case .trf-case-body { max-width: 900px; margin-inline: auto; padding-block: 8px 40px; display: grid; gap: 24px; }
.trf-case .trf-case-head h1 { font-size: clamp(28px, 3.6vw, 46px); line-height: 1.06; font-weight: 700; margin-top: 12px; }
.trf-case .trf-case-video { position: relative; aspect-ratio: 16 / 9; background: var(--ink); }
.trf-case .trf-case-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.trf-case .trf-case-hero img { width: 100%; height: auto; }
.trf-case .trf-case-text { font-size: 17px; line-height: 1.7; display: grid; gap: 14px; }
.trf-case .trf-case-text p { margin: 0; color: var(--ink); }
.trf-case .trf-case-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.trf-case .trf-case-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.trf-case .trf-case-tools-block, .trf-case .trf-cases-more { padding-top: 40px; border-top: 1.5px solid var(--ink); margin-top: 8px; }
.trf-case .trf-case-tools-block h2, .trf-case .trf-cases-more h2 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 700; margin-top: 12px; }
.trf-case .trf-case-tools-block .trf-grid, .trf-case .trf-cases-more .trf-cases-grid { margin-top: 26px; }
.trf-case .trf-case-tools-block .trf-grid { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
	.trf-cases .trf-cases-grid { grid-template-columns: repeat(2, 1fr); }
	.trf-case .trf-case-tools-block .trf-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
	.trf-cases .trf-cases-cta { grid-template-columns: 1fr; }
	.trf-cases .trf-cases-cta-actions { justify-content: flex-start; }
	.trf-case .trf-case-tools-block .trf-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
	.trf-cases .trf-cases-grid { grid-template-columns: 1fr; }
	.trf-case .trf-case-gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}
