/* ═════════════════════════════════════════════════════════════════
   COMPONENT — Operations View
   ═════════════════════════════════════════════════════════════════
   The "What your operations team sees" section on the CALM Portal
   page — section header (eyebrow + display headline + lede) plus a
   big "screenshot" card that mocks the CALM Portal Operations view:
   green title bar at the top, then 4 columns underneath, each with
   a section title, a bulleted list, and a closing stat (orange
   numeric value + label).

   Markup: /template-parts/components/ops-view.php
   ───────────────────────────────────────────────────────────────── */

.ops-view {
	background: var(--cream);
}

.ops-view-head {
	max-width: 1280px;
	display: flex;
	flex-direction: column;
	gap: clamp(20px, 1.8vw, 32px);
	margin-bottom: clamp(40px, 5vw, 80px);
}

/* Headline — uppercase like other .display headlines, but the inline
   italic insets (.it-mid) stay at the parent font-size so "One portal.
   *Every product.* Full visibility." reads as one continuous line
   rather than the bigger-italic-tail treatment used elsewhere. */
.ops-view-headline {
	text-transform: uppercase;
	/* Replicate the inter-line gap of .hl-line blocks. Visible gap in a
	   single block = line-height − font-size. Target = split-word
	   margin-bottom (clamp(6px,0.7vw,10px)).
	   line-height = fs-display-xl + margin = clamp(52+6, 7.8+0.7vw, 112+10). */
	line-height: clamp(58px, 8.5vw, 122px);
}
.ops-view-headline .it-mid {
	font-family: var(--f-serif);
	font-style: italic;
	font-size: inherit;
	line-height: inherit;
	font-weight: 400;
	text-transform: none;
	letter-spacing: 0;
	color: inherit;
}
.ops-view-headline .it-mid.green  { color: var(--green); }
.ops-view-headline .it-mid.orange { color: var(--orange); }

/* The big "screenshot" card. */
.ops-view-card {
	border-radius: 14px;
	overflow: hidden;
	opacity: 0.9;
	filter: drop-shadow(0 16px 19px rgba(0,0,0,0.2))
	        drop-shadow(0 30px 45px rgba(0,0,0,0.05));
}
.ops-view-card-head {
	background: var(--green);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 10px 30px 8px;
	color: var(--cream);
	font-family: var(--f-sans);
	font-weight: 500;
	line-height: 1.55;
}
.ops-view-card-title {
	margin: 0;
	font-size: var(--fs-body-sm);
}
.ops-view-card-subtitle {
	margin: 0;
	font-size: 16px;
	opacity: 0.92;
}

/* Flat 4-column grid — each bullet occupies a shared grid row so dots
   are guaranteed to align horizontally across all columns. */
.ops-view-card-body {
	background: rgba(255, 255, 255, 0.6);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: 1px solid rgba(26,26,26,0.3);
	border-top: none;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	align-items: start;
}

/* Column separators: right border on every cell except the 4th in each row */
.ops-view-card-body > *:not(:nth-child(4n)) {
	border-right: 1px solid var(--rule);
}

/* Base horizontal padding; first and last columns get extra */
.ops-view-card-body > * {
	padding-left: 20px;
	padding-right: 20px;
}
.ops-view-card-body > *:nth-child(4n+1) { padding-left: 24px; }
.ops-view-card-body > *:nth-child(4n)   { padding-right: 24px; }

/* ── Title row ──────────────────────────────────────────────── */
.ops-view-col-head {
	display: flex;
	flex-direction: column;
	gap: 24px;
	padding-top: 20px;
	padding-bottom: 24px;
}
.ops-view-col-title {
	margin: 0;
	font-family: var(--f-sans);
	font-weight: 500;
	font-size: clamp(18px, 1.944vw, 28px);
	line-height: 1.095;
	color: var(--ink);
	letter-spacing: -0.01em;
	white-space: nowrap;
}
.ops-view-col-rule {
	height: 1px;
	width: 100%;
	border: 0;
	margin: 0;
	background: var(--rule);
}

/* ── Bullet cells ───────────────────────────────────────────── */
.ops-view-col-bullet {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding-top: 12px;
	padding-bottom: 12px;
	font-family: var(--f-sans);
	font-weight: 400;
	font-size: clamp(12px, 1.0vw, 14px);
	line-height: 1.4;
	color: var(--ink);
	white-space: nowrap;
}
/* First bullet row: no extra top gap (title already has padding-bottom) */
.ops-view-col-bullet--first { padding-top: 0; }
/* Last bullet row: no extra bottom gap (stat has its own padding-top) */
.ops-view-col-bullet--last  { padding-bottom: 0; }
.ops-view-col-bullet--empty { visibility: hidden; }

.ops-view-col-bullet::before {
	content: '';
	flex-shrink: 0;
	display: block;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--green);
	margin-top: calc((1.4em - 6px) / 2);
}
.ops-view-col-bullet--orange::before { background: var(--orange); }
.ops-view-col-bullet--empty::before  { display: none; }

/* ── Stat row ───────────────────────────────────────────────── */
.ops-view-col-stat {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding-top: 24px;
	padding-bottom: 30px;
}
.ops-view-col-stat-row {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
}
.ops-view-col-stat-val {
	font-family: var(--f-sans);
	font-weight: 700;
	font-size: clamp(36px, 4vw, 58px);
	line-height: 1;
	color: var(--orange);
	white-space: nowrap;
	text-align: center;
}
.ops-view-col-stat-lbl {
	font-family: var(--f-sans);
	font-weight: 500;
	font-size: var(--fs-card-body);
	line-height: 1.2;
	color: var(--ink);
	text-align: center;
}

/* ── Mobile accordion — hidden on desktop ──────────────────────── */
.ops-view-mob { display: none; }

.ops-view-mob-trigger {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 20px;
	background: none;
	border: none;
	cursor: pointer;
	text-align: left;
}
.ops-view-mob-trigger .ops-view-col-title { white-space: normal; }

.ops-view-mob-chevron {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.ops-view-mob-chevron::before {
	content: '';
	display: block;
	width: 9px;
	height: 9px;
	border-right: 2px solid rgba(26,26,26,0.55);
	border-bottom: 2px solid rgba(26,26,26,0.55);
	transform: rotate(45deg) translate(-2px, -2px);
	transition: transform 0.3s ease;
}
.ops-view-mob-item.is-open .ops-view-mob-chevron::before {
	transform: rotate(-135deg) translate(-2px, -2px);
}

.ops-view-mob-panel {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.4s ease;
}
.ops-view-mob-item.is-open .ops-view-mob-panel { max-height: 600px; }

.ops-view-mob-bullets {
	list-style: none;
	margin: 0;
	padding: 4px 20px 16px;
}
.ops-view-mob-bullets .ops-view-col-bullet {
	white-space: normal;
	font-size: 14px;
	padding-top: 8px;
	padding-bottom: 8px;
}
.ops-view-mob-bullets .ops-view-col-bullet:first-child { padding-top: 0; }
.ops-view-mob-bullets .ops-view-col-bullet:last-child  { padding-bottom: 0; }

.ops-view-mob-stat {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 16px 20px 24px;
	border-top: 1px solid var(--rule);
}

/* ── Responsive: separate cards below 1024 px ───────────────── */
@media (max-width: 1024px) {
	/* Unwrap the unified card — become a flex column of individual cards */
	.ops-view-card {
		border-radius: 0;
		overflow: visible;
		opacity: 1;
		filter: none;
		display: flex;
		flex-direction: column;
		gap: 12px;
	}

	/* Header bar gets its own card treatment */
	.ops-view-card-head {
		border-radius: 14px;
		filter: drop-shadow(0 4px 12px rgba(0,0,0,0.15));
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
		padding: 24px;
		background: #FBFAF9;
	}
	.ops-view-card-title {
		color: var(--green);
		font-size: 16px;
	}
	.ops-view-card-subtitle {
		color: rgba(102, 102, 102, 1);
		font-size: 14px;
		opacity: 1;
	}

	/* Hide the desktop grid */
	.ops-view-card-body { display: none; }

	/* Stack of column cards */
	.ops-view-mob {
		display: flex;
		flex-direction: column;
		gap: 12px;
	}
.ops-view-mob-trigger {
	padding: 24px;
}


	.ops-view-mob-trigger .ops-view-col-title { font-size: 20px; }

	.ops-view-mob-bullets .ops-view-col-bullet { font-size: 14px; }

	.ops-view-mob-stat {
		border: none;
		padding-top: 8px;
	}

	.ops-view-mob-stat .ops-view-col-stat-val {
		font-size: 44px;
		color: rgba(11, 102, 35, 1);
	}
	.ops-view-mob-stat .ops-view-col-stat-lbl {
		font-size: 14px;
		color: rgba(102, 102, 102, 1);
	}

	/* Each column = its own standalone card */
	.ops-view-mob-item {
		border-radius: 14px;
		overflow: hidden;
		border: 1px solid rgba(26,26,26,0.18);
		background: rgba(255, 255, 255, 0.75);
		backdrop-filter: blur(10px);
		-webkit-backdrop-filter: blur(10px);
		filter: drop-shadow(0 4px 10px rgba(0,0,0,0.08));
		transition: background 0.3s ease, border-color 0.3s ease;
	}
	.ops-view-mob-item.is-open {
		background: rgba(11, 102, 35, 0.09);
		border-color: rgba(11, 102, 35, 0.22);
	}
}
