/* ============================================================
   BP: Opini component
   Section: uppercase title with a short accent bar underneath and
   a chevron arrow link, grid of opinion cards. Each card is a flat
   bordered box: a fixed 120px title zone (14px, clamped to 6 lines),
   an 80px circular author avatar overlapping a 75px grey band at
   the bottom, and the author's name in 12px with ellipsis. The
   proportions mirror the CNN Indonesia "Kolom" block; the accent
   (header bar, arrow, card hover) follows the Theme Colors primary
   token, while surfaces, borders, and text follow the theme tokens
   (so dark mode still works).
   ============================================================ */

.bp-opinion {
	margin: var(--bp-space-8) 0;
	/* Accent for the header bar, the arrow, and the card hover:
	   the Theme Colors primary (Customizer overrides this token
	   for light and dark mode alike). */
	--bp-opinion-accent: var(--bp-color-primary);
}

/* Section header */
.bp-opinion-head {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--bp-space-4);
	padding: 12px 0;
	margin-bottom: 16px;
}

.bp-opinion-head::before {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	width: 32px;
	height: 3px;
	background: var(--bp-opinion-accent);
}

.bp-opinion-title {
	margin: 0;
	font-family: var(--bp-font-heading);
	font-size: 1rem;
	font-weight: 600;
	color: var(--bp-color-heading);
	text-transform: uppercase;
}

.bp-opinion-arrow {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	color: var(--bp-opinion-accent);
	text-decoration: none;
}

/* Grid: always 2 columns, like the reference. */
.bp-opinion-grid {
	display: grid;
	grid-template-columns: repeat(var(--bp-opinion-cols, 2), minmax(0, 1fr));
	gap: 1rem;
	align-items: stretch;
}

/* Card: flat bordered box, no radius, no shadow. The grey band is
   a 75px pseudo-element pinned to the bottom, behind the content
   (the content pieces carry z-index so they paint above it). */
.bp-opinion-card {
	position: relative;
	padding: 12px;
	border: 1px solid var(--bp-color-border);
	background: var(--bp-color-surface);
	text-align: center;
}

.bp-opinion-card::before {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 75px;
	background: var(--bp-color-surface-alt);
	z-index: 0;
}

/* Fixed 120px title zone: 6 lines at 14px/20px, clamped with an
   ellipsis, so every card has the same height and the avatars
   line up across a row. */
.bp-opinion-headline {
	position: relative;
	z-index: 1;
	height: 120px;
	margin: 0 0 16px;
	font-family: var(--bp-font-heading);
	font-size: 0.875rem;
	line-height: 1.4286;
	font-weight: 700;
	display: -webkit-box;
	-webkit-line-clamp: 6;
	line-clamp: 6;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.bp-opinion-headline a {
	color: var(--bp-color-heading);
	text-decoration: none;
}

.bp-opinion-avatar {
	position: relative;
	z-index: 1;
	display: block;
	width: 80px;
	height: 80px;
	margin: 0 auto 8px;
	border: 3px solid var(--bp-color-surface);
	border-radius: 50%;
	overflow: hidden;
}

.bp-opinion-avatar img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.bp-opinion-name {
	position: relative;
	z-index: 1;
	display: block;
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--bp-color-heading);
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Hovering anywhere on the card turns the title and the name red,
   like the reference's group-hover. */
.bp-opinion-card:hover .bp-opinion-headline a,
.bp-opinion-card:hover .bp-opinion-name {
	color: var(--bp-opinion-accent);
}
