/* ============================================================
   Instroi — shared card components (single source of truth).
   Moved verbatim from home.css so the SAME classes style the
   homepage sections AND the listing pages (/gallery/, /faq/, …)
   without loading home.css outside the front page.
   Loaded on: front page + CPT listings + their taxonomies.
   ============================================================
   1. Portfolio case card (.home-pf__card) — Figma 95:625
   2. FAQ accordion item (.home-faq__item) — Figma 106:388
   ============================================================ */

/* 1. Portfolio case card + grid
   ------------------------------------------------------------ */
.home-pf__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}

.home-pf__card {
	position: relative;
	display: block;
	height: clamp(420px, 55vw, 600px);
	background: var(--c-dark);
	overflow: hidden;
	text-decoration: none;
	color: var(--c-white);
}
.home-pf__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}
.home-pf__card:hover .home-pf__img { transform: scale(1.04); }

.home-pf__overlay {
	position: absolute;
	inset: auto 0 0;
	display: flex;
	flex-direction: column;
	gap: 30px;
	/* Side padding is fluid: 40px suits the 1200 grid, but a 3-col card at
	   768 is ~237px wide and «пінополіуретаном» needs the room. */
	padding: 120px clamp(20px, 3.3vw, 40px) clamp(24px, 3.3vw, 40px);
	background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 49%, rgba(0, 0, 0, 0));
}
.home-pf__card-title {
	margin: 0;
	font-size: var(--fs-h4);
	font-weight: 700;
	line-height: 1.2;
	color: var(--c-white);
	overflow-wrap: anywhere;
}
.home-pf__meta {
	display: flex;
	align-items: flex-end;
	gap: 30px;
	font-size: var(--fs-p3);
	line-height: 1.2;
}
.home-pf__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 54px;
	width: 54px;
	height: 54px;
	background: var(--c-primary);
	border-radius: var(--radius-btn);
	color: var(--c-white);
	transition: background var(--transition);
}
.home-pf__card:hover .home-pf__arrow { background: var(--c-primary-light); }

/* 2 columns on tablets so card titles («пінополіуретаном») keep whole
   words; the Figma 3-column row starts at desktop widths. */
@media (min-width: 768px) {
	.home-pf__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
	.home-pf__grid { grid-template-columns: repeat(3, 1fr); }
}

/* 2. FAQ accordion item
   ------------------------------------------------------------ */
.home-faq__item {
	background: var(--c-gray-50);
	border-radius: var(--radius-card);
}
.home-faq__item + .home-faq__item { margin-top: 8px; }

.home-faq__q { margin: 0; }
.home-faq__trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--gap);
	width: 100%;
	padding: clamp(20px, 3.5vw, 40px);
	font-size: clamp(1.125rem, 1rem + 1vw, 2rem);
	font-weight: 700;
	line-height: 1.2;
	text-align: left;
	color: var(--c-black);
	transition: color var(--transition);
}
.home-faq__trigger:hover { color: var(--c-primary); }

.home-faq__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 54px;
	width: 54px;
	height: 54px;
	background: var(--c-primary);
	border-radius: var(--radius-btn);
	color: var(--c-white);
	transition: transform var(--transition);
}
.home-faq__trigger[aria-expanded="true"] .home-faq__icon { transform: rotate(180deg); }

.home-faq__panel[hidden] { display: none; }
.home-faq__answer {
	padding: 0 clamp(20px, 3.5vw, 40px) clamp(20px, 3.5vw, 40px);
	font-size: var(--fs-p2);
	line-height: 1.4;
	max-width: 62em;
}
.home-faq__answer p:last-child { margin-bottom: 0; }
