/* =========================================================
   Home — Domingos en Familia
   Clase principal de Divi: iff-home-sundays
   ========================================================= */

/* Editorial Sunday-gathering gallery. */
.iff-home-sundays {
	padding: clamp(4.5rem, 8vw, 7rem) 0 clamp(5rem, 9vw, 8rem);
	background: #FFFFFF;
}

.iff-home-sundays > .iff-sundays-heading {
	display: block;
	width: min(92%, 1100px) !important;
	max-width: 1100px !important;
	margin: 0 auto clamp(2.75rem, 5vw, 4.25rem);
	padding: 0;
}

.iff-home-sundays > .iff-sundays-heading > .et_pb_column {
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 0;
	text-align: center;
}

.iff-home-sundays .iff-sundays-heading .et_pb_heading_container h1 {
	margin: 0;
	padding: 0;
	color: #333;
	font-size: clamp(2.25rem, 3.4vw, 2.625rem);
	font-weight: 500;
	line-height: 1.15;
	letter-spacing: -0.02em;
}

.iff-home-sundays .iff-sundays-heading .et_pb_heading_container h1::before {
	display: block;
	width: 3.25rem;
	height: 3px;
	margin: 0 auto 1.5rem;
	content: '';
	background: #547389;
}

.iff-home-sundays .iff-sundays-heading .et_pb_text {
	width: 100%;
	max-width: 42rem;
	margin: 0.65rem auto 0;
	padding: 0;
}

/* El texto puede existir directamente dentro de .et_pb_text_inner,
   sin depender de una etiqueta <p>. */
.iff-home-sundays .iff-sundays-heading .et_pb_text .et_pb_text_inner {
	display: block;
	margin: 0;
	padding: 0;
	color: #333;
	font-family: Open Sans, Arial, sans-serif;
	font-size: clamp(1.0625rem, 1.2vw, 1.125rem);
	font-weight: 400;
	line-height: 1.65;
	text-align: center;
}

/* Compatibilidad si Divi vuelve a envolver el contenido en <p> o <code>. */
.iff-home-sundays .iff-sundays-heading .et_pb_text .et_pb_text_inner p,
.iff-home-sundays .iff-sundays-heading .et_pb_text .et_pb_text_inner code {
	margin: 0;
	padding: 0;
	color: inherit;
	font: inherit;
	line-height: inherit;
}

.iff-home-sundays > .iff-sundays-gallery {
	display: grid;
	width: min(92%, 1160px) !important;
	max-width: 1160px !important;
	margin: 0 auto;
	padding: 0;
	grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.1fr) minmax(0, 0.95fr);
	gap: clamp(0.75rem, 1.6vw, 1.25rem);
	align-items: center;
}

.iff-home-sundays > .iff-sundays-gallery > .et_pb_column {
	display: flex;
	width: auto !important;
	max-width: none;
	margin: 0;
	padding: 0;
	gap: clamp(0.75rem, 1.6vw, 1.25rem);
	grid-column: auto !important;
	grid-row: auto !important;
}

.iff-home-sundays > .iff-sundays-gallery > .et_pb_column:nth-child(1),
.iff-home-sundays > .iff-sundays-gallery > .et_pb_column:nth-child(3) {
	flex-direction: column;
}

.iff-home-sundays > .iff-sundays-gallery > .et_pb_column:nth-child(2) {
	flex-direction: column;
}

.iff-home-sundays > .iff-sundays-gallery .et_pb_image {
	position: relative;
	width: 100%;
	top: 0;
	margin: 0;
	transform: none;
	will-change: transform, box-shadow;
	transition: top 360ms cubic-bezier(0.22, 1, 0.36, 1), transform 360ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 360ms ease;
}

.iff-home-sundays > .iff-sundays-gallery .et_pb_image_wrap {
	display: block;
	border-radius: 0.75rem;
	box-shadow: 0 0.35rem 1rem rgba(31, 43, 50, 0.12);
	overflow: hidden;
}

.iff-home-sundays > .iff-sundays-gallery .et_pb_image img {
	display: block;
	width: 100%;
	height: auto;
}

/* Small offsets preserve the collage character without relying on Divi's large transforms. */
@media (min-width: 981px) {
	.iff-home-sundays > .iff-sundays-gallery > .et_pb_column:nth-child(1) .et_pb_image:nth-child(1) {
		--iff-sundays-x: 2%;
		--iff-sundays-y: 3%;
		transform: translate(var(--iff-sundays-x), var(--iff-sundays-y)) !important;
		z-index: 2;
	}

	.iff-home-sundays > .iff-sundays-gallery > .et_pb_column:nth-child(1) .et_pb_image:nth-child(2) {
		--iff-sundays-x: -3%;
		--iff-sundays-y: -3%;
		transform: translate(var(--iff-sundays-x), var(--iff-sundays-y)) !important;
	}

	.iff-home-sundays > .iff-sundays-gallery > .et_pb_column:nth-child(2) .et_pb_image:nth-child(1) {
		--iff-sundays-x: 0%;
		--iff-sundays-y: 1%;
		transform: translate(var(--iff-sundays-x), var(--iff-sundays-y)) !important;
		z-index: 1;
	}

	.iff-home-sundays > .iff-sundays-gallery > .et_pb_column:nth-child(3) .et_pb_image:nth-child(1) {
		--iff-sundays-x: 3%;
		--iff-sundays-y: -3%;
		transform: translate(var(--iff-sundays-x), var(--iff-sundays-y)) !important;
	}

	.iff-home-sundays > .iff-sundays-gallery > .et_pb_column:nth-child(3) .et_pb_image:nth-child(2) {
		--iff-sundays-x: -3%;
		--iff-sundays-y: 3%;
		transform: translate(var(--iff-sundays-x), var(--iff-sundays-y)) !important;
	}

	.iff-home-sundays > .iff-sundays-gallery .et_pb_image:hover {
		top: -12px !important;
		transform: translate(var(--iff-sundays-x, 0%), calc(var(--iff-sundays-y, 0%) - 12px)) scale(1.04) !important;
		z-index: 4;
		box-shadow: 0 0.75rem 1.5rem rgba(31, 43, 50, 0.18);
	}
}

@media (max-width: 980px) {
	.iff-home-sundays {
		padding: 4rem 0 5rem;
	}

	.iff-home-sundays > .iff-sundays-heading {
		width: min(90%, 880px) !important;
		max-width: 880px !important;
		margin-bottom: 2.75rem;
	}

	.iff-home-sundays > .iff-sundays-gallery {
		width: min(90%, 900px) !important;
		max-width: 900px !important;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 0.75rem;
	}

	.iff-home-sundays > .iff-sundays-gallery > .et_pb_column {
		gap: 0.75rem;
	}

	.iff-home-sundays > .iff-sundays-gallery .et_pb_image {
		transform: none;
	}
}

@media (max-width: 767px) {
	.iff-home-sundays {
		padding: 2rem 0 4.5rem;
	}

	.iff-home-sundays > .iff-sundays-heading {
		width: 88% !important;
		max-width: none !important;
		margin-bottom: 2.25rem;
	}

	.iff-home-sundays .iff-sundays-heading .et_pb_heading_container h1 {
		font-size: clamp(2rem, 8vw, 2.35rem);
	}

	.iff-home-sundays .iff-sundays-heading .et_pb_text .et_pb_text_inner,
	.iff-home-sundays .iff-sundays-heading .et_pb_text .et_pb_text_inner p {
		font-size: 1.05rem;
		line-height: 1.55;
	}

	.iff-home-sundays > .iff-sundays-gallery {
		width: 88% !important;
		max-width: none !important;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.7rem;
	}

	.iff-home-sundays > .iff-sundays-gallery > .et_pb_column {
		display: contents;
	}

	.iff-home-sundays > .iff-sundays-gallery .et_pb_image {
		transform: none;
	}

	.iff-home-sundays > .iff-sundays-gallery > .et_pb_column:nth-child(1) .et_pb_image:nth-child(1) {
		grid-column: 1 / -1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.iff-home-sundays > .iff-sundays-gallery .et_pb_image {
		transition: none;
	}

	.iff-home-sundays > .iff-sundays-gallery .et_pb_image:hover {
		transform: none;
	}
}
