/* =============================================================================
   Project Portfolio — default styles
   -----------------------------------------------------------------------------
   These styles ship with the plugin and provide the minimum needed for the
   hover-reveal layout to function. Visual brand styling (colors, typography,
   spacing) is intentionally NOT included here — that lives in the host
   theme's stylesheet so the plugin stays portable.

   The single visual choice baked in is the expand/collapse behavior: the
   reveal panel transitions from max-height: 0 → ~520px on .is-open. Themes
   can override max-height if they need more or less space.
   ============================================================================= */

/* List wrapper */
.pp-fieldguide-list {
	display: block;
	width: 100%;
}

/* Single row */
.pp-row {
	display: block;
	overflow: hidden;
	position: relative;
}

/* Header — the always-visible portion */
.pp-row__header {
	display: grid;
	grid-template-columns: 1fr 4fr 4fr 2fr 1fr;
	gap: 16px;
	align-items: center;
	padding: 22px 0;
	text-decoration: none;
	color: inherit;
	cursor: pointer;
}

/* Plus icon column (gets rotated on open) */
.pp-row__arr {
	text-align: right;
	font-weight: 300;
	transition: transform 0.4s ease;
	display: inline-block;
}
.pp-row.is-open .pp-row__arr {
	transform: rotate(45deg);
}

/* Reveal — starts hidden via [hidden] attribute, becomes a max-height
   transition when JS removes the attribute */
.pp-row__reveal {
	max-height: 0;
	opacity: 0;
	overflow: hidden;
	transition:
		max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
		opacity 0.4s ease,
		padding 0.5s cubic-bezier(0.4, 0, 0.2, 1);
	padding: 0;
}
.pp-row.is-open .pp-row__reveal {
	max-height: 520px;
	opacity: 1;
	padding: 0 0 32px;
}

/* Meta grid inside the reveal */
.pp-row__meta-grid {
	display: grid;
	grid-template-columns: 3fr 9fr;
	gap: 32px;
	margin-bottom: 20px;
	transform: translateY(20px);
	opacity: 0;
	transition:
		transform 0.5s ease 0.1s,
		opacity 0.5s ease 0.1s;
}
.pp-row.is-open .pp-row__meta-grid {
	transform: translateY(0);
	opacity: 1;
}
.pp-row__meta-row {
	display: flex;
	gap: 32px;
}

/* Screenshot */
.pp-row__shot-wrap {
	display: block;
	overflow: hidden;
}
.pp-screenshot {
	display: block;
	width: 100%;
	height: auto;
	transform: translateY(40px);
	transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1) 0.05s;
}
.pp-row.is-open .pp-screenshot {
	transform: translateY(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.pp-row__arr,
	.pp-row__reveal,
	.pp-row__meta-grid,
	.pp-screenshot {
		transition: none !important;
		transform: none !important;
	}
}

/* Mobile — collapse the row grid to a stack */
@media (max-width: 768px) {
	.pp-row__header {
		grid-template-columns: 1fr 1fr;
		grid-template-areas:
			"num arr"
			"title title"
			"tagline tagline"
			"meta meta";
		gap: 8px;
	}
	.pp-row__num     { grid-area: num; }
	.pp-row__arr     { grid-area: arr; }
	.pp-row__title   { grid-area: title; }
	.pp-row__tagline { grid-area: tagline; }
	.pp-row__meta    { grid-area: meta; }

	.pp-row__meta-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}
	.pp-row__meta-row {
		flex-direction: column;
		gap: 16px;
	}
}
