/*
 * Free Guides catalog + single guide page styles.
 *
 * Loaded only on the "Free Guides" page template and on single `guide`
 * pages (see lib/scripts.php). Layout primitives (.ia-container, .ia-row,
 * .ia-col-*, .module, .content-entry, .ia-btn) come from the theme's
 * compiled assets/css/main.css and are reused here on purpose.
 *
 * Design tokens below mirror assets/scss/global/utils/variables.scss:
 * $primary: #273591, $secondary: #1C2669, $danger: #CB1334, $light: #f7f8f9,
 * $black: #000, $border-radius: 1.2rem, $border-radius-lg: 2rem,
 * $border-radius-xl: 3rem. Breakpoints mirror the rest of the theme: 767px
 * (mobile) and 1023px (tablet).
 */

/* ---------- Guides catalog: category sections ---------- */

.guides-section__header h2 {
	margin-bottom: 1rem;
}

.guides-section--related {
	margin-top: 5rem;
	padding-top: 5rem;
	border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* ---------- Guide card (catalog grid + related guides) ---------- */

.guide-item {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	box-sizing: border-box;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 2rem;
	padding: 2rem;
	transition: box-shadow 0.35s, border-color 0.35s;
}

.guide-item:hover {
	border-color: transparent;
	box-shadow: 0 0 40px rgba(0, 0, 0, 0.12);
}

.guide-item > a:not(.ia-btn) {
	position: absolute;
	inset: 0;
	z-index: 10;
	text-decoration: none;
	border: none;
}

.guide-item__image {
	margin-bottom: 2rem;
	overflow: hidden;
	border-radius: 1.2rem;
}

.guide-item__image div {
	width: 100%;
	padding-bottom: 70%;
	background-repeat: no-repeat;
	background-position: center;
	background-size: cover;
	transition: transform 0.5s;
}

.guide-item:hover .guide-item__image div {
	transform: scale(1.1);
}

.guide-item__body {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.guide-item__body h3 {
	position: relative;
	z-index: 9;
	margin-bottom: 1rem;
	transition: color 0.35s;
}

.guide-item:hover .guide-item__body h3 {
	color: #CB1334;
}

.guide-item__body .content-entry {
	flex-grow: 1;
	margin-bottom: 2rem;
}

.guide-item__body .ia-btn {
	align-self: flex-start;
}

/* ---------- Single guide page ---------- */

.guide-single {
	display: flex;
	align-items: flex-start;
	margin-bottom: 5rem;
}

.guide-single__media {
	width: 34%;
	margin-right: 4rem;
	flex-shrink: 0;
}

.guide-single__cover {
	width: 100%;
	padding-bottom: 129%;
	border-radius: 2rem;
	background-repeat: no-repeat;
	background-position: center;
	background-size: cover;
	box-shadow: 0 0 40px rgba(0, 0, 0, 0.1);
}

.guide-single__content {
	flex: 1;
	min-width: 0;
}

.guide-single__subtitle {
	font-weight: 600;
	font-size: 1.8rem;
	margin-bottom: 1.5rem;
	color: #273591;
}

.guide-single__cta {
	margin-top: 3rem;
	padding: 2.4rem;
	border-radius: 1.2rem;
	background: #f7f8f9;
}

.guide-single__cta h4 {
	margin-bottom: 1rem;
}

.guide-single__cta p {
	margin-bottom: 2rem;
}

.guide-single__cta .ia-btn {
	margin-bottom: 2rem;
}

.guide-single__notice {
	color: #CB1334;
	font-weight: 600;
}

.guide-single__disclaimer {
	font-size: 1.3rem;
	color: rgba(33, 33, 33, 0.6);
	margin-bottom: 0 !important;
}

@media (max-width: 1023px) {
	.guide-single__media {
		width: 40%;
		margin-right: 3rem;
	}
}

@media (max-width: 767px) {
	/* Below the sm breakpoint (768px) none of the .ia-col-sm-6 / .ia-col-md-4
	   grid classes set a width, so cards shrink to their content width
	   instead of stacking full-bleed. Force one guide per row here. */
	.guides-grid > .ia-col-md-4.ia-col-sm-6 {
		width: 100%;
	}

	.guide-single {
		flex-direction: column;
	}

	.guide-single__media {
		width: 100%;
		margin-right: 0;
		margin-bottom: 2rem;
	}

	.guide-single__cover {
		padding-bottom: 70%;
	}
}
