/**
 * Case Study Products + Quote Section
 *
 * Combined section that can display products, quote, or both.
 * Products show on colored background, quote shows in white card.
 * Responsive across 5 breakpoints: 1400px, 1024px, 768px, 600px, 400px
 */

.case-study-products-quote {
	background-color: #00E0C4; /* Default teal, overridden by inline style from ACF */
	padding: 48px 20px 78px 20px;
}

.case-study-products-quote__container {
	max-width: 917px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 48px;
}

/* ========================================
   PRODUCTS SECTION
   ======================================== */

.case-study-products {
	display: flex;
	flex-direction: column;
	gap: 40px;
	align-items: center;
}

.case-study-products__heading {
	font-family: 'Avenir Next', sans-serif;
	font-weight: 700; /* Bold */
	font-size: 48px;
	line-height: normal;
	color: #121c66;
	text-align: center;
	margin: 0;
}

.case-study-products__grid {
	display: flex;
	justify-content: center;
	align-items: flex-start;
	gap: 40px;
	flex-wrap: wrap;
	max-width: 856px;
	margin: 0 auto;
	width: 100%;
}

.case-study-product-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	max-width: 280px;
	flex: 1 1 30%;
}

.case-study-product-item__icon {
	width: 100px;
	height: 100px;
	border-radius: 50%;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: #ffffff;
}

.case-study-product-item__icon img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.case-study-product-item__name {
	font-family: 'Avenir Next', sans-serif;
	font-weight: 700; /* Bold */
	font-size: 16px;
	line-height: normal;
	color: #121c66;
	text-align: center;
}

/* ========================================
   QUOTE SECTION
   ======================================== */

.case-study-quote {
	width: 100%;
}

.case-study-quote__card {
	background-color: #ffffff;
	border-radius: 24px;
	box-shadow: 0px 4px 34px rgba(0, 0, 0, 0.25);
	padding: 48px;
	max-width: 917px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 30px;
	align-items: center;
}

.case-study-quote__content {
	font-family: 'Avenir Next', sans-serif;
	font-weight: 600; /* Demi Bold */
	font-size: 32px;
	line-height: normal;
	color: #121c66;
	text-align: center;
	margin: 0;
}

.case-study-quote__content p {
	margin: 0 0 16px 0;
}

.case-study-quote__content p:last-child {
	margin-bottom: 0;
}

.case-study-quote__attribution {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 17px;
}

.case-study-quote__logo {
	display: flex;
	align-items: center;
	justify-content: center;
}

.case-study-quote__logo img {
	max-height: 40px;
	width: auto;
	object-fit: contain;
}

.case-study-quote__author {
	font-family: 'Avenir Next', sans-serif;
	font-weight: 500; /* Medium */
	font-size: 16px;
	line-height: normal;
	color: #121c66;
	text-align: center;
}

.case-study-quote__author-name {
	/* Inherits styles from parent */
}

.case-study-quote__author-credentials {
	/* Inherits styles from parent */
}

/* ========================================
   RESPONSIVE BREAKPOINTS
   ======================================== */

/* 1400px - Large Desktop */
@media (max-width: 1400px) {
	.case-study-products-quote {
		padding: 44px 20px 72px 20px;
	}

	.case-study-products__heading {
		font-size: 44px;
	}

	.case-study-quote__content {
		font-size: 30px;
	}

	.case-study-quote__card {
		padding: 44px;
		gap: 28px;
	}
}

/* 1024px - Tablet Landscape */
@media (max-width: 1024px) {
	.case-study-products-quote {
		padding: 40px 20px 65px 20px;
	}

	.case-study-products-quote__container {
		gap: 40px;
	}

	.case-study-products__heading {
		font-size: 40px;
	}

	.case-study-products__grid {
		gap: 32px;
	}

	.case-study-product-item {
		gap: 10px;
	}

	.case-study-product-item__icon {
		width: 90px;
		height: 90px;
	}

	.case-study-product-item__name {
		font-size: 15px;
	}

	.case-study-quote__card {
		padding: 40px;
		gap: 26px;
	}

	.case-study-quote__content {
		font-size: 28px;
	}

	.case-study-quote__author {
		font-size: 15px;
	}
}

/* 768px - Tablet Portrait */
@media (max-width: 768px) {
	.case-study-products-quote {
		padding: 36px 20px 58px 20px;
	}

	.case-study-products-quote__container {
		gap: 36px;
	}

	.case-study-products {
		gap: 32px;
	}

	.case-study-products__heading {
		font-size: 36px;
	}

	.case-study-products__grid {
		gap: 28px;
	}

	.case-study-product-item {
		gap: 10px;
	}

	.case-study-product-item__icon {
		width: 80px;
		height: 80px;
	}

	.case-study-quote__card {
		padding: 36px;
		gap: 24px;
	}

	.case-study-quote__content {
		font-size: 24px;
	}

	.case-study-quote__logo img {
		max-height: 36px;
	}

	.case-study-quote__author {
		font-size: 14px;
	}
}

/* 600px - Mobile */
@media (max-width: 600px) {
	.case-study-products-quote {
		padding: 32px 20px 50px 20px;
	}

	.case-study-products-quote__container {
		gap: 32px;
	}

	.case-study-products {
		gap: 28px;
	}

	.case-study-products__heading {
		font-size: 32px;
	}

	.case-study-products__grid {
		gap: 24px;
	}

	.case-study-product-item {
		gap: 8px;
	}

	.case-study-product-item__icon {
		width: 70px;
		height: 70px;
	}

	.case-study-product-item__name {
		font-size: 14px;
	}

	.case-study-quote__card {
		padding: 32px;
		gap: 20px;
	}

	.case-study-quote__content {
		font-size: 22px;
	}

	.case-study-quote__logo img {
		max-height: 32px;
	}

	.case-study-quote__attribution {
		gap: 14px;
	}
}

/* 400px - Small Mobile */
@media (max-width: 400px) {
	.case-study-products-quote {
		padding: 28px 16px 44px 16px;
	}

	.case-study-products-quote__container {
		gap: 28px;
	}

	.case-study-products {
		gap: 24px;
	}

	.case-study-products__heading {
		font-size: 28px;
	}

	.case-study-products__grid {
		gap: 20px;
	}

	.case-study-product-item {
		gap: 8px;
	}

	.case-study-product-item__icon {
		width: 60px;
		height: 60px;
	}

	.case-study-product-item__name {
		font-size: 13px;
	}

	.case-study-quote__card {
		padding: 28px;
		gap: 18px;
		border-radius: 20px;
	}

	.case-study-quote__content {
		font-size: 20px;
	}

	.case-study-quote__logo img {
		max-height: 28px;
	}

	.case-study-quote__author {
		font-size: 13px;
	}

	.case-study-quote__attribution {
		gap: 12px;
	}
}

/* ========================================
   SIDEBAR CLEARANCE (Above 1200px)
   ======================================== */

/* Push content right to clear sidebar when it's visible */
@media (min-width: 1201px) {
	.case-study-products-quote__container {
		margin-left: max(
			calc((100vw - 917px) / 2),
			218px
		);
		margin-right: auto;
	}
}

/* Restore centered layout when sidebar is hidden */
@media (max-width: 1200px) {
	.case-study-products-quote__container {
		margin-left: auto;
		margin-right: auto;
	}
}
