/* ═══════════════════════════════════════════════════════════════════════════
   DESIGN COMPARISON TABLE
   3-column feature comparison: Feature | Cornerstones | Other providers
   ═══════════════════════════════════════════════════════════════════════════ */

.design-comparison {
	padding: var(--ci-section-padding) 0;
	background-color: var(--ci-color-off-white);
}

/* ── Section header ── */
.design-comparison__header {
	text-align: center;
	margin-bottom: 3rem;
}

.design-comparison__heading {
	font-family: var(--ci-font-primary);
	font-size: clamp(1.75rem, 2.5vw, 2.5rem);
	font-weight: 700;
	letter-spacing: -0.02em;
	color: #253d47;
	margin: 0;
}

/* ── Table wrapper — constrained width, overflow for mobile ── */
.design-comparison__table-wrap {
	max-width: 740px;
	margin: 0 auto;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border-radius: 16px;
	box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

/* ── Table base ── */
.design-comparison__table {
	width: 100%;
	border-collapse: collapse;
	font-family: var(--ci-font-primary);
	background-color: var(--ci-color-white);
	min-width: 420px;
}

/* ── Header row ── */
.design-comparison__table thead th {
	padding: 1rem 1.25rem;
	font-family: var(--ci-font-primary);
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
	text-align: center;
}

.design-comparison__col-feature {
	text-align: left !important;
	width: 58%;
	background-color: var(--ci-color-off-white);
	color: var(--ci-color-navy);
}

.design-comparison__col-ci {
	width: 21%;
	background-color: #c6a54e;
	color: #fff;
}

.design-comparison__col-other {
	width: 21%;
	background-color: #e8e8ed;
	color: var(--ci-color-navy);
}

/* Cornerstones column header label */
.design-comparison__brand {
	color: var(--ci-color-white);
}

/* ── Body rows ── */
.design-comparison__table tbody tr {
	border-bottom: 1px solid var(--ci-color-border);
	transition: background-color 0.15s ease;
}

.design-comparison__table tbody tr:last-child {
	border-bottom: none;
}

.design-comparison__table tbody tr:hover {
	background-color: #f7f7f9;
}

.design-comparison__table tbody td {
	padding: 0.85rem 1.25rem;
	font-size: 0.92rem;
	color: var(--ci-color-text);
	line-height: 1.5;
	text-align: center;
}

.design-comparison__table tbody td:first-child {
	text-align: left;
	color: var(--ci-color-navy);
	font-weight: 500;
}

/* Cornerstones column body highlight */
.design-comparison__table tbody td:nth-child(2) {
	background-color: rgba(198, 165, 78, 0.1);
}

/* ── Tick & cross icons ── */
.design-comparison__tick,
.design-comparison__cross {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	font-size: 0.8rem;
	font-weight: 700;
	line-height: 1;
}

/* Ticks — bright green */
.design-comparison__tick {
	background-color: rgba(34, 197, 94, 0.15);
	color: #16a34a;
}

/* Crosses — dark red */
.design-comparison__cross {
	background-color: rgba(185, 28, 28, 0.1);
	color: #b91c1c;
}

/* Cell background tints by result type */
.design-comparison__table td:has(.design-comparison__cross) {
	background-color: rgba(185, 28, 28, 0.06);
}

.design-comparison__table td:has(.design-comparison__tick) {
	background-color: rgba(34, 197, 94, 0.06);
}

.design-comparison__table td:has(.design-comparison__limited) {
	background-color: rgba(198, 165, 78, 0.08);
}

/* Limited — amber */
.design-comparison__limited {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 600;
	color: #92620a;
	background-color: rgba(198, 165, 78, 0.15);
	border-radius: 9999px;
	padding: 0.2rem 0.65rem;
}

/* "View more" chip — shown inline after the feature text */
.design-comparison__row-hint {
	display: inline-block;
	margin-left: 0.5rem;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	color: #c6a54e;
	opacity: 0;
	transition: opacity 0.15s ease;
	vertical-align: middle;
}

.design-comparison__row:hover .design-comparison__row-hint {
	opacity: 1;
}

/* ── Lightbox ── */
.ci-lightbox {
	position: fixed;
	inset: 0;
	z-index: 9000;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.25s ease;
}

.ci-lightbox.is-open {
	opacity: 1;
	pointer-events: all;
}

.ci-lightbox__backdrop {
	position: absolute;
	inset: 0;
	background-color: rgba(15, 25, 40, 0.75);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

.ci-lightbox__container {
	position: relative;
	z-index: 1;
	background: var(--ci-color-white);
	border-radius: 16px;
	width: min(680px, 92vw);
	overflow: hidden;
	transform: translateY(12px) scale(0.98);
	transition: transform 0.28s ease, opacity 0.28s ease;
	opacity: 0;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
}

.ci-lightbox.is-open .ci-lightbox__container {
	transform: translateY(0) scale(1);
	opacity: 1;
}

.ci-lightbox__close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	z-index: 2;
	width: 36px;
	height: 36px;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.08);
	color: var(--ci-color-navy);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.15s ease;
}

.ci-lightbox__close:hover {
	background: rgba(0, 0, 0, 0.15);
}

.ci-lightbox__close svg {
	width: 16px;
	height: 16px;
}

/* Image / placeholder area */
.ci-lightbox__image-wrap {
	width: 100%;
	aspect-ratio: 16 / 9;
	background-color: var(--ci-color-off-white);
	display: flex;
	align-items: center;
	justify-content: center;
}

.ci-lightbox__placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
	color: #b0b0b8;
}

.ci-lightbox__placeholder-icon {
	width: 52px;
	height: 52px;
	color: #c8c8d0;
}

.ci-lightbox__placeholder-text {
	font-family: var(--ci-font-primary);
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #c0c0c8;
	margin: 0;
}

/* Caption */
.ci-lightbox__caption {
	font-family: var(--ci-font-primary);
	font-size: 0.92rem;
	font-weight: 500;
	color: var(--ci-color-navy);
	margin: 0;
	padding: 1rem 1.5rem 1.25rem;
	line-height: 1.5;
}

/* ── Mobile — centre Feature heading ── */
@media (max-width: 768px) {
	.design-comparison__col-feature {
		text-align: center !important;
	}
}

/* ── Mobile — compact 3-column ── */
@media (max-width: 600px) {
	.design-comparison {
		padding: var(--ci-section-padding-mobile) 0;
	}

	.design-comparison__header {
		margin-bottom: 2rem;
	}

	.design-comparison__table-wrap {
		border-radius: 12px;
	}

	/* Remove min-width so table fits the screen */
	.design-comparison__table {
		min-width: 0;
		table-layout: fixed;
		width: 100%;
	}

	/* Feature gets remaining width, icon columns are equal and fixed */
	.design-comparison__col-feature { width: auto; }
	.design-comparison__col-ci      { width: 76px; }
	.design-comparison__col-other   { width: 76px; }

	/* Header cells — small, centred, wrap onto two lines */
	.design-comparison__table thead th {
		padding: 0.6rem 0.25rem;
		font-size: 0.65rem;
		line-height: 1.3;
	}

	.design-comparison__col-feature {
		padding-left: 0.75rem;
	}

	/* Body cells */
	.design-comparison__table tbody td {
		padding: 0.75rem 0.25rem;
		font-size: 0.82rem;
		word-break: break-word;
		hyphens: auto;
	}

	.design-comparison__table tbody td:first-child {
		padding-left: 0.75rem;
		padding-right: 0.5rem;
	}

	/* "View more" — always visible on mobile, shown on its own line */
	.design-comparison__row-hint {
		display: block;
		opacity: 1;
		margin: 0.35rem 0 0;
		font-size: 0.72rem;
		color: #c6a54e;
		font-weight: 600;
	}
}
