/* ============================================================
   Giant Post Area — front-end + editor styles
   CSS custom properties are set per-instance on .gpa-post-area
   ============================================================ */

/* ── CSS variable defaults (fallbacks if not set inline) ── */
.gpa-post-area {
	--gpa-gap:         0px;
	--gpa-radius:      0px;
	--gpa-title-color: #0f172a;
	--gpa-title-size:  16px;
	--gpa-text-color:  #475569;
	--gpa-text-size:   14px;
	width: 100%;
}

/* ── Grid wrapper ── */
.gpa-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var( --gpa-gap );
	width: 100%;
}

/* ── Shared card base ── */
.gpa-card {
	display: flex;
	text-decoration: none;
	color: inherit;
	overflow: hidden;
	background: #fff;
	border-radius: var( --gpa-radius );
	transition: opacity 0.2s ease;
}

.gpa-card:hover {
	opacity: 0.9;
}

/* ── Left tall card ── */
.gpa-card--tall {
	flex-direction: column;
	height: 100%;
	min-height: 400px;
}

.gpa-card--tall .gpa-card-image {
	flex: 1 1 auto;
	min-height: 260px;
	background-size: cover;
	background-position: center;
}

.gpa-card--tall .gpa-card-body {
	padding: 20px 24px 24px;
	background: #fff;
}

/* ── Right horizontal cards ── */
.gpa-right-column {
	display: flex;
	flex-direction: column;
	gap: var( --gpa-gap );
}

.gpa-card--horizontal {
	flex-direction: row;
	flex: 1 1 50%;
}

.gpa-card--horizontal .gpa-card-image {
	width: 50%;
	min-width: 0;
	flex-shrink: 0;
	background-size: cover;
	background-position: center;
}

.gpa-card--horizontal .gpa-card-body {
	padding: 18px 20px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	width: 50%;
}

/* ── Card body typography (driven by CSS vars) ── */
.gpa-card-title {
	font-size: var( --gpa-title-size );
	font-weight: 700;
	line-height: 1.35;
	margin: 0 0 8px;
	color: var( --gpa-title-color );
}

.gpa-card-excerpt {
	font-size: var( --gpa-text-size );
	line-height: 1.55;
	color: var( --gpa-text-color );
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ── Placeholder image ── */
.gpa-card-image--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f1f5f9;
}

.gpa-placeholder-logo {
	max-width: 60%;
	max-height: 60%;
	object-fit: contain;
	opacity: 0.6;
}

.gpa-placeholder-text {
	font-size: 0.85rem;
	font-weight: 600;
	color: #94a3b8;
	text-align: center;
	padding: 8px;
}

/* ── Responsive ── */
@media ( max-width: 640px ) {
	.gpa-grid {
		grid-template-columns: 1fr;
	}

	.gpa-card--tall {
		min-height: 300px;
	}

	.gpa-card--horizontal {
		flex-direction: column;
	}

	.gpa-card--horizontal .gpa-card-image {
		width: 100%;
		height: 180px;
	}

	.gpa-card--horizontal .gpa-card-body {
		width: 100%;
	}
}

/* ── Editor preview ── */
.gpa-editor-wrap {
	padding: 0;
}

/* Give the horizontal image a fixed height in editor preview so it's visible */
.gpa-editor-wrap .gpa-card--horizontal .gpa-card-image {
	min-height: 120px;
}

.gpa-editor-wrap .gpa-card--tall .gpa-card-image {
	min-height: 200px;
}
