/**
 * Homepage Section 2 - Offer Cards
 * Primary selectors: .sm-section--offer-cards, .sm-section--offers
 *
 * Refined to match studiom.ai Section 2 reference styling with:
 * - Neutralized WordPress padding system
 * - Consistent card heights and spacing
 * - Enforced image aspect ratios
 * - Reference-accurate typography and buttons
 *
 * @package StudioM_Child
 */

/* ========================================================================
   Section Container - Complete Padding Normalization
   ======================================================================== */

.sm-section--offers {
	padding-top: 48px;
	padding-bottom: 48px;
	background-color: #ffffff;
	/* Neutralize WordPress constrained padding - this section manages its own spacing */
	padding-left: 0 !important;
	padding-right: 0 !important;
}

@media (min-width: 768px) {
	.sm-section--offers {
		padding-top: 72px;
		padding-bottom: 72px;
	}
}

/* DELTA 1: Neutralize nested .has-global-padding within Section 2 */
.sm-section--offers.has-global-padding {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* Remove padding from any nested groups with has-global-padding inside cards */
.sm-section--offers .sm-offer-card > .wp-block-group.has-global-padding {
	padding: 0 !important;
}

.sm-section--offers .has-global-padding {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* ========================================================================
   Inner Container - Single Source of Truth for Horizontal Spacing
   ======================================================================== */

.sm-section--offers .sm-container {
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 16px !important;
	padding-right: 16px !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

@media (min-width: 768px) {
	.sm-section--offers .sm-container {
		padding-left: 24px !important;
		padding-right: 24px !important;
	}
}

/* Also ensure container itself has no global padding conflicts */
.sm-section--offers .sm-container.has-global-padding {
	padding-left: 16px !important;
	padding-right: 16px !important;
}

@media (min-width: 768px) {
	.sm-section--offers .sm-container.has-global-padding {
		padding-left: 24px !important;
		padding-right: 24px !important;
	}
}

/* ========================================================================
   Intro Text - Centered with Line Break Support
   DELTA 4: Tune typography (intro letter-spacing) and vertical rhythm
   ======================================================================== */

.sm-section--offers .sm-intro-text {
	text-align: center;
	font-size: 17px;
	line-height: 1.6;
	letter-spacing: -0.01em;
	margin-top: 0;
	margin-bottom: 36px;
	max-width: 48rem;
	margin-left: auto;
	margin-right: auto;
	font-family: 'Chivo', sans-serif;
	font-weight: 300;
	color: #333;
}

@media (min-width: 768px) {
	.sm-section--offers .sm-intro-text {
		font-size: 18px;
		margin-bottom: 48px;
		line-height: 1.5;
	}
}

/* ========================================================================
   Cards Grid - Equal Height with Generous Gap
   ======================================================================== */

.sm-section--offers .sm-cards-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
	margin-top: 0;
	margin-bottom: 0;
	align-items: stretch;
}

@media (min-width: 768px) {
	.sm-section--offers .sm-cards-grid {
		grid-template-columns: 1fr 1fr;
		gap: 32px;
	}
}

/* ========================================================================
   Individual Offer Card - Equal Height Flex Column
   DELTA 2: Make card surfaces match reference (more breathing room, radius, subtle shadow)
   ======================================================================== */

.sm-section--offers .sm-offer-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 100%;
}

/* Inner group should also stretch full height AND provide card surface */
.sm-section--offers .sm-offer-card > .wp-block-group {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	padding: 32px !important;
	margin: 0;
	background-color: #ffffff;
	border-radius: 22px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
	overflow: visible;
	transition: all 0.3s ease;
}

@media (min-width: 768px) {
	.sm-section--offers .sm-offer-card > .wp-block-group {
		padding: 32px !important;
	}
}

.sm-section--offers .sm-offer-card > .wp-block-group:hover {
	box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
	transform: translateY(-2px);
}

/* ========================================================================
   Card Image - Enforced Aspect Ratio with Rounded Corners
   DELTA 3: Force consistent image aspect ratio and crop
   ======================================================================== */

.sm-section--offers .sm-offer-card__image-link {
	display: block;
	overflow: hidden;
	border-radius: 22px;
	position: relative;
	/* Enforce 4:3 aspect ratio for consistent image presentation */
	aspect-ratio: 4 / 3;
	background-color: #f5f5f5;
	transition: transform 0.3s ease;
	/* Full-bleed image: negative margins to card edges */
	margin: -32px -32px 24px -32px;
}

.sm-section--offers .sm-offer-card__image-link:hover {
	transform: scale(1.005);
}

.sm-section--offers .sm-offer-card__image-link img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
	object-position: center;
	/* Remove any default aspect-ratio on img to let container control it */
	aspect-ratio: auto;
}

/* ========================================================================
   Card Heading - Uppercase with Generous Letter Spacing
   DELTA 4: Tune typography (headings letter-spacing) and vertical rhythm
   ======================================================================== */

.sm-section--offers .sm-offer-card h4 {
	font-family: 'Lexend Mega', sans-serif;
	font-weight: 700;
	font-size: 14px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	margin-top: 22px;
	margin-bottom: 12px;
	color: #111;
	line-height: 1.3;
}

@media (min-width: 768px) {
	.sm-section--offers .sm-offer-card h4 {
		font-size: 15px;
		letter-spacing: 0.12em;
		margin-top: 22px;
		margin-bottom: 12px;
	}
}

/* ========================================================================
   Card Body Text
   ======================================================================== */

.sm-section--offers .sm-offer-card p {
	font-family: 'Chivo', sans-serif;
	font-weight: 300;
	font-size: 16px;
	line-height: 1.65;
	color: #333;
	margin-top: 0;
	margin-bottom: 18px;
}

@media (min-width: 768px) {
	.sm-section--offers .sm-offer-card p {
		font-size: 16px;
		line-height: 1.7;
		margin-bottom: 20px;
	}
}

/* Last paragraph before CTA needs less bottom margin */
.sm-section--offers .sm-offer-card p:last-of-type {
	margin-bottom: 0;
}

/* Bold emphasis - visual separation */
.sm-section--offers .sm-offer-card p strong,
.sm-section--offers .sm-offer-card p b {
	font-weight: 700;
	display: block;
	margin-top: 8px;
	line-height: 1.65;
}

/* Italic for "De Essentie van AI" */
.sm-section--offers .sm-offer-card p em,
.sm-section--offers .sm-offer-card p i {
	font-style: italic;
	font-weight: 700;
}

/* ========================================================================
   Button Container - Push to Bottom of Card
   DELTA 5: CTA aligned bottom
   ======================================================================== */

.sm-section--offers .sm-offer-card__cta {
	margin-top: auto;
	padding-top: 24px;
}

@media (min-width: 768px) {
	.sm-section--offers .sm-offer-card__cta {
		padding-top: 28px;
	}
}

.sm-section--offers .sm-offer-card__cta .wp-block-button {
	margin-bottom: 0;
	margin-top: 0;
}

/* ========================================================================
   Button Styling - Reference Accurate, Scoped to Section 2 Only
   DELTA 5: Button styling - consistent size + hover
   ======================================================================== */

.sm-section--offers .sm-offer-card__cta .wp-block-button__link,
.sm-section--offers .wp-element-button {
	font-family: 'Poppins', sans-serif;
	font-weight: 500;
	font-size: 15px;
	line-height: 1.2;
	padding: 14px 22px;
	border-radius: 10px;
	background-color: #111;
	color: #fff !important;
	border: none;
	text-decoration: none;
	display: inline-block;
	transition: all 0.25s ease;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

@media (min-width: 768px) {
	.sm-section--offers .sm-offer-card__cta .wp-block-button__link,
	.sm-section--offers .wp-element-button {
		padding: 14px 22px;
		font-size: 15px;
	}
}

.sm-section--offers .sm-offer-card__cta .wp-block-button__link:hover,
.sm-section--offers .wp-element-button:hover {
	background-color: #111;
	transform: translateY(-1px);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
	opacity: 0.9;
}

/* ========================================================================
   WordPress Block Spacing Normalization
   ======================================================================== */

/* Remove unwanted spacing from WordPress columns block */
.sm-section--offers .wp-block-columns {
	margin-bottom: 0;
	margin-top: 0;
}

.sm-section--offers .wp-block-column {
	margin-bottom: 0;
	margin-top: 0;
}

/* Neutralize WordPress group block padding within cards */
.sm-section--offers .wp-block-column > .wp-block-group {
	padding: 0 !important;
	margin: 0;
}

/* Ensure buttons wrapper has no extra spacing */
.sm-section--offers .wp-block-buttons {
	margin-top: 0;
	margin-bottom: 0;
}

/* ========================================================================
   Constrained Layout Override
   ======================================================================== */

/* Remove is-layout-constrained padding effects */
.sm-section--offers.is-layout-constrained,
.sm-section--offers .is-layout-constrained {
	padding-left: 0 !important;
	padding-right: 0 !important;
}
