/*
 * Edge Data Center page — sections unique to this page.
 * Loaded alongside blue-e.css, which supplies the shared carousel,
 * callout, hotspot, sub-nav and button styles.
 *
 * Values measured from Figma node 206:791. Where the design disagrees
 * with Blue e+ on a shared component (form height, tab underline,
 * arrow icon size), the Blue e+ value is kept as canonical.
 */

/* Red accent inside the hero description — Figma 206:1079. */
.product-hero__accent {
	color: #e50043;
}

/* ==========================================
   Why Rittal — accordion
========================================== */

.edge-why {
	background-color: #fff;
	padding: 86px 0;
}

.edge-accordion {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.edge-accordion__row {
	background-color: #f5f5f7;
}

/*
 * When a row is open the icon centres on the whole row, not just the
 * header. It sits inside the trigger button, so it cannot be a grid
 * item of the row; instead it is nudged down by half the panel height,
 * which is exactly the distance between the two centres.
 */
@media (min-width: 768px) {
	.edge-accordion__row.is-open .edge-accordion__icon {
		position: relative;
		top: calc(var(--panel-h, 0px) / 2);
	}
}

.edge-accordion__heading {
	margin: 0;
}

.edge-accordion__trigger {
	display: flex;
	align-items: center;
	gap: 20px;
	width: 100%;
	padding: 10px 28px;
	min-height: 62px;
	background: none;
	border: 0;
	color: #000;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 18px;
	font-weight: 700;
	line-height: 41.099px;
	text-align: left;
	cursor: pointer;
}

.edge-accordion__trigger[disabled] {
	cursor: default;
	opacity: .65;
}

.edge-accordion__icon {
	flex: 0 0 auto;
	display: none;
	width: 56px;
}

.edge-accordion__row.is-open .edge-accordion__icon {
	display: block;
}

.edge-accordion__icon img {
	display: block;
	width: 100%;
	height: auto;
}

.edge-accordion__label {
	flex: 1 1 auto;
}

/* Figma glyphs are 15x15 filled paths, not strokes. */
.edge-accordion__glyph {
	flex: 0 0 auto;
	width: 15px;
	height: 15px;
	fill: #000;
}

/* Closed rows show the plus, open rows the minus. */
.edge-accordion__glyph-minus {
	display: none;
}

.edge-accordion__row.is-open .edge-accordion__glyph-plus {
	display: none;
}

.edge-accordion__row.is-open .edge-accordion__glyph-minus {
	display: block;
}

.edge-accordion__trigger[disabled] .edge-accordion__glyph {
	visibility: hidden;
}

.edge-accordion__body {
	padding: 0 28px 24px 104px;
	color: #000;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 18px;
	line-height: 27.742px;
	max-width: 1063px;
}

.edge-accordion__body p {
	margin: 0;
}

/* ==========================================
   Explore Further
========================================== */

.edge-explore {
	background-color: #000;
	padding: 96px 0;
}

.edge-explore__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 575px);
	align-items: center;
	gap: 64px;
}

.edge-explore__heading {
	margin: 0 0 40px;
	max-width: 476px;
	color: #fff;
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-size: 30px;
	font-weight: 400;
	line-height: 54px;
}

.edge-explore__buttons {
	display: flex;
	align-items: center;
	gap: 24px;
	flex-wrap: wrap;
}

.edge-explore__media {
	aspect-ratio: 575 / 312;
	overflow: hidden;
}

.edge-explore__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ==========================================
   Testimonials
========================================== */

/*
 * Last section on the page, so it closes straight into the footer
 * rather than carrying a trailing band of black.
 */
.edge-testi {
	background-color: #000;
	padding: 0;
}

.edge-testi__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 40px;
}

.edge-testi__card {
	position: relative;
	background-color: #000;
	overflow: hidden;
}

.edge-testi__link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.edge-testi__media {
	aspect-ratio: 680 / 425;
	overflow: hidden;
}

.edge-testi__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Play affordance — painted into the raster in Figma. */
.edge-testi__play {
	position: absolute;
	top: 50%;
	left: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	margin: -36px 0 0 -36px;
	background-color: rgba(0, 0, 0, .55);
	border: 2px solid #fff;
	border-radius: 50%;
	transition: background-color .2s, transform .2s;
}

.edge-testi__play svg {
	width: 34px;
	height: 34px;
	fill: #fff;
}

.edge-testi__link:hover .edge-testi__play,
.edge-testi__link:focus .edge-testi__play {
	background-color: #e50043;
	transform: scale(1.06);
}

.edge-testi__caption {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 48px 28px 24px;
	background: linear-gradient(to top, rgba(0, 0, 0, .85) 0%, rgba(0, 0, 0, 0) 100%);
	color: #fff;
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.edge-testi__name {
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
}

.edge-testi__role {
	font-size: 16px;
	line-height: 1.4;
	opacity: .85;
}

/* ==========================================
   Responsive — not designed in Figma.
========================================== */

@media (max-width: 1023px) {
	.edge-explore__inner {
		grid-template-columns: 1fr;
		gap: 40px;
	}

	.edge-testi__grid {
		gap: 32px;
	}

	.edge-accordion__body {
		padding-left: 28px;
	}
}

@media (max-width: 767px) {
	.edge-why,
	.edge-explore {
		padding: 64px 0;
	}

	.edge-testi {
		padding-bottom: 64px;
	}

	.edge-accordion {
		gap: 12px;
	}

	.edge-accordion__trigger {
		gap: 12px;
		padding: 10px 20px;
		font-size: 16px;
		line-height: 1.5;
	}

	.edge-accordion__icon {
		width: 40px;
	}

	.edge-accordion__body {
		padding: 0 20px 20px;
		line-height: 1.7;
	}

	.edge-explore__heading {
		line-height: 1.4;
	}

	.edge-explore__buttons {
		flex-direction: column;
		align-items: stretch;
		gap: 16px;
	}

	.edge-testi__grid {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	/* Keep the play button above the 44px minimum tap target. */
	.edge-testi__play {
		width: 56px;
		height: 56px;
		margin: -28px 0 0 -28px;
	}

	.edge-testi__play svg {
		width: 26px;
		height: 26px;
	}

	.edge-testi__name {
		font-size: 17px;
	}
}
