/**
 * Story Section Block Styles
 *
 * @package GospelHope
 */

.storySection {
	width: 100%;
	background-color: #f3f3f3;
	border-radius: 18px;
	padding-block: 64px;
}

/* Add horizontal padding when background is not white */
.storySection--hasBg {
	padding-inline: var(--space-xl);
}

/* Light/White text for dark backgrounds */
.storySection--lightText .storySection__title {
	color: var(--color-white);
}

.storySection--lightText .storySection__text,
.storySection--lightText .storySection__text p {
	color: rgba(255, 255, 255, 0.9);
}

.storySection--lightText .storySection__text a:not(.button) {
	color: var(--color-lime);
}

.storySection--lightText .storySection__button {
	background-color: var(--color-white);
	color: var(--color-navy);
}

.storySection--lightText .storySection__button:hover {
	background-color: rgba(255, 255, 255, 0.9);
}

.storySection__wrapper {
	display: flex;
	flex-direction: column;
	gap: 48px;
	align-items: center;
	max-width: 1200px;
	margin: 0 auto;
}

/* Wrapper Width Variations */
.storySection__wrapper--xnarrow {
	max-width: 600px;
}

.storySection__wrapper--narrow {
	max-width: 800px;
}

.storySection__wrapper--medium {
	max-width: 1000px;
}

.storySection__wrapper--wide {
	max-width: 1400px;
}

.storySection__wrapper--full {
	max-width: 100%;
}

/* Header Content */
.storySection__headerContent {
	margin: 0 auto var(--space-xl);
	text-align: center;
	width: min(100%, 800px);
}

.storySection__headerContent--left {
	text-align: left;
	margin-inline: 0 auto;
	margin-bottom: var(--space-xl);
}

.storySection__headerContent h1,
.storySection__headerContent h2,
.storySection__headerContent h3,
.storySection__headerContent h4,
.storySection__headerContent h5,
.storySection__headerContent h6 {
	font-family: var(--font-family-headings);
	font-weight: var(--font-weight-bold);
	line-height: 1.2;
	letter-spacing: -0.02em;
	color: var(--color-navy);
	margin: 0;
}

.storySection__headerContent--h2 h1,
.storySection__headerContent--h2 h2 {
	font-size: 54px;
}

.storySection__headerContent--h3 h1,
.storySection__headerContent--h3 h2,
.storySection__headerContent--h3 h3 {
	font-size: 40px;
}

.storySection__headerContent p {
	font-family: var(--font-family-base);
	font-size: 20px;
	font-weight: var(--font-weight-light);
	line-height: 1.7;
	color: #252525;
	margin: var(--space-md) 0;
}

.storySection__headerContent p:first-child {
	margin-top: 0;
}

.storySection__headerContent p:last-child {
	margin-bottom: 0;
}

.storySection--lightText .storySection__headerContent h1,
.storySection--lightText .storySection__headerContent h2,
.storySection--lightText .storySection__headerContent h3,
.storySection--lightText .storySection__headerContent h4,
.storySection--lightText .storySection__headerContent h5,
.storySection--lightText .storySection__headerContent h6 {
	color: var(--color-white);
}

.storySection--lightText .storySection__headerContent p {
	color: rgba(255, 255, 255, 0.9);
}

.storySection--lightText .storySection__headerContent a:not(.button) {
	color: var(--color-lime);
}

/* Row Base Styles */
.storySection__row {
	display: flex;
	gap: 44px;
	width: 100%;
}

/* Vertical Alignment */
.storySection__row--valign-top {
	align-items: flex-start;
}

.storySection__row--valign-center {
	align-items: center;
}

.storySection__row--valign-bottom {
	align-items: flex-end;
}

/* Reverse Order */
.storySection__row--reversed {
	flex-direction: row-reverse;
}

/* Column Base */
.storySection__column {
	min-width: 0;
}

/* Layout: 50-50 */
.storySection__row--50-50 .storySection__column {
	flex: 1 1 50%;
}

/* Layout: 60-40 */
.storySection__row--60-40 .storySection__column:first-child {
	flex: 0 0 60%;
}
.storySection__row--60-40 .storySection__column:last-child:not(:first-child) {
	flex: 0 0 calc(40% - 44px);
}

/* Layout: 40-60 */
.storySection__row--40-60 .storySection__column:first-child {
	flex: 0 0 40%;
}
.storySection__row--40-60 .storySection__column:last-child:not(:first-child) {
	flex: 0 0 calc(60% - 44px);
}

/* Layout: 70-30 */
.storySection__row--70-30 .storySection__column:first-child {
	flex: 0 0 70%;
}
.storySection__row--70-30 .storySection__column:last-child:not(:first-child) {
	flex: 0 0 calc(30% - 44px);
}

/* Layout: 30-70 */
.storySection__row--30-70 .storySection__column:first-child {
	flex: 0 0 30%;
}
.storySection__row--30-70 .storySection__column:last-child:not(:first-child) {
	flex: 0 0 calc(70% - 44px);
}

/* Layout: 33-33-33 */
.storySection__row--33-33-33 .storySection__column {
	flex: 1 1 calc(33.333% - 30px);
}

/* Layout: 25-25-25-25 */
.storySection__row--25-25-25-25 .storySection__column {
	flex: 1 1 calc(25% - 33px);
}

/* Layout: 100 (Full Width) */
.storySection__row--100 .storySection__column {
	flex: 1 1 100%;
}

/* Image Column */
.storySection__imageWrapper {
	width: 100%;
	border-radius: 18px;
	overflow: hidden;
	aspect-ratio: 4 / 3;
}

.storySection__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 18px;
}

.storySection__imagePlaceholder {
	width: 100%;
	aspect-ratio: 4 / 3;
	background-color: var(--color-silver);
	border-radius: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--color-navy);
	font-style: italic;
}

/* Text Column */
.storySection__content {
	display: flex;
	flex-direction: column;
	gap: var(--space-md);
	justify-content: center;
	height: 100%;
}

.storySection__title {
	font-family: var(--font-family-headings);
	font-size: 54px;
	font-weight: var(--font-weight-bold);
	line-height: 1.2;
	letter-spacing: -0.02em;
	color: var(--color-navy);
	margin: 0;
}

.storySection__text {
	font-family: var(--font-family-base);
	font-size: 18px;
	font-weight: var(--font-weight-light);
	line-height: 1.7;
	color: #252525;
}

.storySection__text p {
	margin: 0 0 var(--space-md);
}

.storySection__text p:last-child {
	margin-bottom: 0;
}

/* Button */
.storySection__buttonWrapper {
	margin-top: var(--space-sm);
}

.storySection__button {
	display: inline-block;
	padding: 14px 32px;
	background-color: var(--color-navy);
	color: var(--color-white);
	font-family: var(--font-family-base);
	font-size: 16px;
	font-weight: var(--font-weight-semibold);
	text-decoration: none;
	border-radius: 8px;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.storySection__button:hover {
	background-color: #0d3158;
	transform: translateY(-2px);
}

.storySection__placeholder {
	text-align: center;
	color: var(--color-silver);
	font-style: italic;
	padding: var(--space-xl);
}

/* Responsive */
@media (max-width: 1024px) {
	.storySection__row {
		flex-direction: column !important;
		align-items: stretch;
		gap: var(--space-lg);
	}

	.storySection__row .storySection__column {
		flex: 1 1 100% !important;
	}

	.storySection__imageWrapper {
		max-width: 600px;
		margin: 0 auto;
	}

	.storySection__content {
		text-align: center;
	}

	.storySection__title {
		font-size: 36px;
	}
}

@media (max-width: 768px) {
	.storySection {
		padding-block: var(--space-xl);
		border-radius: 12px;
	}

	.storySection--hasBg {
		padding-inline: var(--space-lg);
	}

	.storySection__wrapper {
		gap: var(--space-xl);
	}

	.storySection__imageWrapper {
		border-radius: 12px;
	}

	.storySection__image {
		border-radius: 12px;
	}

	.storySection__title {
		font-size: 28px;
	}

	.storySection__text {
		font-size: 16px;
		line-height: 1.6;
	}

	.storySection__button {
		padding: 12px 24px;
		font-size: 14px;
	}
}
