/* ============================================================
   IMAGE-TEXT SECTION â€” AstroJyot Vedic Astrology
   "About Astrologer" / "Why Choose Us" style
   ============================================================ */

.why-choose-section {
	width: 100%;
	margin: 0 auto 20px !important;
	border-radius: 20px;
	background-color: var(--client-cream);
	position: relative;
	overflow: visible;
	z-index: 10;
}


/* ============================================================
   HEADER BANNER
   ============================================================ */

.why-choose-banner {
	background-color: var(--client-navy);
	color: var(--client-cream);
	text-align: center;
	padding: 24px 16px;
	margin-bottom: 28px;
	font-weight: 700;
	font-size: 32px;
	line-height: 40px;
	letter-spacing: -0.01em;
	position: relative;
	z-index: 10;
	font-family: var(--astro-font-serif, 'Cinzel', serif);
	border-radius: 20px;
}

@media (min-width: 768px) {
	.why-choose-banner {
		font-size: 36px;
		padding: 32px 16px;
	}
}


/* ============================================================
   COMMON ROW & GRID
   ============================================================ */

.why-choose-row {
	display: grid;
	grid-template-columns: 1fr;
	background-color: transparent;
	position: relative;
	overflow: hidden;
	max-width: 1240px;
	margin: 0 auto;
	padding: 1.5rem 20px;
	gap: 2rem;
}


/* ============================================================
   IMAGE COLUMNS â€” Fixed sizing
   ============================================================ */

.why-choose-image-col,
.why-choose-image-col-reverse {
	position: relative;
	width: 100%;
	min-height: 300px;
	overflow: hidden;
	border-radius: 16px;
}

.why-choose-image-media {
	position: relative;
	width: 100%;
	height: 100%;
	overflow: hidden;
	border-radius: 16px;
}

.why-choose-image,
.why-choose-image-col img,
.why-choose-image-col-reverse img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	border-radius: 16px;
}


/* ============================================================
   TEXT COLUMNS & TYPOGRAPHY
   ============================================================ */

.why-choose-text-col,
.why-choose-text-col-reverse {
	padding: 1.5rem 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	position: relative;
	z-index: 10;
}

.why-choose-items-container {
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-width: 768px;
}

.why-choose-item {
	display: block;
}

.ust-imagetext-row-eyebrow {
	display: block;
	color: var(--client-saffron, #D97706);
	font-family: var(--astro-font-sans, 'Plus Jakarta Sans', sans-serif);
	font-size: 16px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-bottom: 2px;
}

.why-choose-item-title,
.ust-imagetext-richtext-content h2,
.ust-imagetext-richtext-content h3,
.ust-imagetext-richtext-content h4 {
	color: var(--client-navy);
	font-weight: 700;
	font-size: 22px;
	line-height: 1.4;
	margin-top: 0;
	margin-bottom: 6px;
	font-family: var(--astro-font-sans, 'Plus Jakarta Sans', sans-serif);
}

.why-choose-item-text {
	color: var(--client-muted);
	font-weight: 400;
	font-size: 16px;
	line-height: 1.6;
	margin: 0;
	font-family: var(--astro-font-sans, 'Plus Jakarta Sans', sans-serif);
}

.image-text__subtitle {
	font-weight: 600;
	margin-bottom: 3px;
}


/* ============================================================
   DESKTOP VIEW (â‰¥ 1024px)
   ============================================================ */

@media (min-width: 1024px) {
	.why-choose-row {
		display: flex;
		flex-direction: row;
		align-items: stretch;
		padding: 2rem 20px;
		gap: 3rem;
	}

	.why-choose-image-col {
		flex: 0 0 480px;
		width: 480px;
		max-width: 480px;
		height: auto;
		min-height: 420px;
		overflow: hidden;
		position: relative;
	}

	.why-choose-image-media {
		position: absolute;
		width: 100%;
		left: 0;
		top: 0;
		bottom: 0;
		height: 100%;
		overflow: hidden;
	}

	.why-choose-image {
		display: block;
		width: 100%;
		height: 100%;
		position: relative;
		top: 0;
		left: 0;
		object-fit: cover;
		object-position: center;
	}

	.why-choose-text-col,
	.why-choose-text-col-reverse {
		flex: 1;
		min-width: 0;
		padding: 2rem 1rem 2rem 2rem;
	}

	.why-choose-text-col-reverse {
		order: 1;
		padding: 2rem 2rem 2rem 1rem;
	}

	.why-choose-image-col-reverse {
		flex: 0 0 440px;
		width: 440px;
		max-width: 440px;
		height: auto;
		min-height: 420px;
		overflow: hidden;
		position: relative;
		order: 2;
	}
}


/* ============================================================
   MOBILE & RESPONSIVE FALLBACKS
   ============================================================ */

@media (max-width: 1023px) {

	.why-choose-image-col,
	.why-choose-image-col-reverse {
		position: relative;
		width: 100%;
		height: clamp(260px, 45vh, 400px);
		min-height: 240px;
		max-height: 420px;
		padding-top: 0;
		overflow: hidden;
	}

	.why-choose-image-media {
		position: relative;
		width: 100%;
		height: 100%;
		margin: 0;
		overflow: hidden;
	}

	.why-choose-image,
	.why-choose-image-col img,
	.why-choose-image-col-reverse img {
		position: relative;
		display: block;
		width: 100%;
		height: 100%;
		top: auto;
		margin: 0;
		object-fit: cover;
		object-position: center;
	}
}


/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
	.why-choose-image-media {
		position: relative !important;
		height: 100% !important;
		margin-top: 0 !important;
		overflow: hidden !important;
	}

	.why-choose-image {
		position: relative !important;
		top: auto !important;
		width: 100% !important;
		height: 100% !important;
		margin-bottom: 0 !important;
	}
}


/* ============================================================
   ENHANCED MODES â€” Sidebar + Full Header + Rich Text
   ============================================================ */


/* ---------------------------------------------------------------
   SIDEBAR OUTER WRAPPER
   --------------------------------------------------------------- */

.ust-imagetext-wrapper {
	display: flex;
	width: 100%;
	font-family: var(--astro-font-sans, 'Plus Jakarta Sans', sans-serif);
}

.ust-imagetext-main {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}


/* ---------------------------------------------------------------
   SIDEBAR â€” amber bar
   --------------------------------------------------------------- */

.ust-imagetext-sidebar {
	flex: 0 0 210px;
	width: 210px;
	display: flex;
	flex-direction: column;
	align-items: center;
	background: var(--astro-secondary, #D97706);
	padding-bottom: 24px;
	box-sizing: border-box;
}


/* Scroll arrow */
.ust-imagetext-sidebar-arrow {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 72px;
	padding: 20px 0 16px;
	color: var(--client-gold);
	transition: opacity 0.18s ease;
}

.ust-imagetext-sidebar-arrow:hover {
	opacity: 0.8;
}

.ust-imagetext-sidebar-arrow svg {
	width: 24px;
	height: 70px;
}


/* Nav */
.ust-imagetext-sidebar-nav {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.ust-imagetext-sidebar-nav-item {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 10px 10px 5px;
	text-decoration: none;
	color: var(--client-navy);
	transition: opacity 0.18s ease;
}

.ust-imagetext-sidebar-nav-item:hover {
	opacity: 0.82;
}

.ust-imagetext-sidebar-nav-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	margin-bottom: 4px;
}

.ust-imagetext-sidebar-nav-icon img {
	width: 47px;
	height: 67px;
	object-fit: contain;
}

.ust-imagetext-sidebar-nav-label {
	font-family: var(--astro-font-sans, 'Plus Jakarta Sans', sans-serif);
	font-size: 18px;
	font-weight: 700;
	line-height: 25.2px;
	text-align: center;
	color: var(--client-navy);
	padding-bottom: 5px;
}

.ust-imagetext-sidebar-divider {
	display: block;
	width: 90px;
	height: 1.5px;
	background-color: var(--client-gold);
	margin-top: 14px;
	opacity: 0.85;
}


/* Social icons */
.ust-imagetext-sidebar-social {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	padding: 20px 0 10px;
	margin-top: 20px;
}

.ust-imagetext-sidebar-social-item {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 45px;
	height: 45px;
	text-decoration: none;
	transition: transform 0.18s ease, opacity 0.18s ease;
}

.ust-imagetext-sidebar-social-item:hover {
	opacity: 0.88;
	transform: scale(1.08);
}

.ust-imagetext-sidebar-social-item img {
	width: 45px;
	height: 45px;
	object-fit: contain;
}


/* ---------------------------------------------------------------
   FULL HEADER (heading + italic subheading)
   --------------------------------------------------------------- */

.ust-imagetext-header-full {
	background-color: var(--client-navy);
	min-height: 100px;
	padding: 15px 10px 15px 90px;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	justify-content: center;
	border-radius: 20px;
}

.ust-imagetext-heading {
	margin: 0;
	padding-bottom: 8px;
	color: var(--client-cream);
	font-family: var(--astro-font-serif, 'Cinzel', serif);
	font-weight: 700;
	font-size: 40px;
	line-height: 48.8px;
}

.ust-imagetext-subheading {
	margin: 0;
	padding-top: 4px;
	color: #ffffff;
	font-family: var(--astro-font-sans, 'Plus Jakarta Sans', sans-serif);
	font-weight: 400;
	font-style: italic;
	font-size: 22px;
	line-height: 1.6;
}


/* ---------------------------------------------------------------
   RICH TEXT LAYOUT
   --------------------------------------------------------------- */

.ust-imagetext-richtext-row {
	display: flex;
	align-items: flex-start;
	position: relative;
}

.ust-imagetext-richtext-row--img-right {
	flex-direction: row;
}

/* Text column */
.ust-imagetext-richtext-text-col {
	flex: 1;
	min-width: 0;
	padding: 36px 60px 45px;
	box-sizing: border-box;
	background: transparent !important;
	color: var(--client-muted);
	font-family: var(--astro-font-sans, 'Plus Jakarta Sans', sans-serif);
	font-size: 16px;
	line-height: 1.6;
}

.ust-imagetext-richtext-content p {
	margin: 0 0 22px;
	color: var(--client-muted);
	font-family: var(--astro-font-sans, 'Plus Jakarta Sans', sans-serif);
	font-size: 16px;
	line-height: 1.6;
	max-width: 520px;
}

.ust-imagetext-richtext-content p:last-of-type {
	margin-bottom: 0;
}

/* Image column â€” sticky */
.ust-imagetext-richtext-image-col {
	flex: 0 0 560px;
	width: 560px;
	max-width: 100%;
	position: -webkit-sticky;
	position: sticky;
	top: 0;
	align-self: stretch;
	overflow: hidden;
	z-index: 2;
}

.ust-imagetext-richtext-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

@media (min-width: 1024px) {
	.ust-imagetext-richtext-image {
		display: block;
		width: 100%;
		height: 100%;
		position: relative;
		top: 0;
		left: 0;
		object-fit: cover;
		object-position: center;
	}
}


/* ---------------------------------------------------------------
   CTA BUTTON
   --------------------------------------------------------------- */

.ust-imagetext-cta-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 28px;
	background: var(--client-saffron);
	color: var(--client-white) !important;
	font-family: var(--astro-font-sans, 'Plus Jakarta Sans', sans-serif);
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.01em;
	text-decoration: none;
	padding: 13px 28px;
	border-radius: 9999px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
	transition: all 0.25s ease-in-out;
}

.ust-imagetext-cta-btn:hover {
	background: #B45309;
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.ust-imagetext-cta-wrap {
	text-align: center;
	padding: 0 0 32px;
}


/* ---------------------------------------------------------------
   RESPONSIVE â€” TABLET (â‰¤ 1024px)
   --------------------------------------------------------------- */

@media (max-width: 1024px) {
	.ust-imagetext-sidebar {
		flex: 0 0 180px;
		width: 180px;
	}

	.ust-imagetext-header-full {
		padding: 36px 60px 32px;
	}

	.ust-imagetext-heading {
		font-size: 30px;
	}

	.ust-imagetext-subheading {
		font-size: 16px;
	}

	.ust-imagetext-richtext-row,
	.ust-imagetext-richtext-row--img-right {
		flex-direction: column;
	}

	.ust-imagetext-richtext-text-col {
		padding: 28px 36px 40px;
		width: 100%;
	}

	.ust-imagetext-richtext-image-col {
		flex: none;
		width: 100%;
		max-width: 100%;
		height: 350px;
		max-height: 350px;
		position: relative;
		top: auto;
	}

	.ust-imagetext-richtext-image {
		height: 100%;
		object-fit: cover;
		object-position: center;
	}
}


/* ---------------------------------------------------------------
   RESPONSIVE â€” MOBILE (â‰¤ 768px)
   --------------------------------------------------------------- */

@media (max-width: 768px) {
	.ust-imagetext-wrapper {
		flex-direction: column;
	}

	/* Sidebar â†’ horizontal strip */
	.ust-imagetext-sidebar {
		flex: none;
		width: 100%;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		padding: 6px 16px;
		min-height: 52px;
	}

	.ust-imagetext-sidebar-arrow {
		display: none;
	}

	.ust-imagetext-sidebar-nav {
		flex-direction: row;
		width: auto;
		gap: 4px;
	}

	.ust-imagetext-sidebar-nav-item {
		flex-direction: row;
		gap: 5px;
		padding: 4px 8px;
		width: auto;
		border-left: 1px solid var(--client-gold);
	}

	.ust-imagetext-sidebar-nav-item:last-child {
		border-right: 1px solid var(--client-gold);
	}

	.ust-imagetext-sidebar-nav-icon img {
		width: 24px;
		height: 24px;
		max-height: 24px;
		object-fit: contain;
	}

	.ust-imagetext-sidebar-divider {
		display: none !important;
	}

	.ust-imagetext-sidebar-nav-label {
		font-size: 13px;
		padding-bottom: 0;
	}

	.ust-imagetext-sidebar-social {
		flex-direction: row;
		margin-top: 0;
		padding: 0;
		gap: 6px;
		width: auto;
	}

	.ust-imagetext-sidebar-social-item {
		width: 28px;
		height: 28px;
	}

	.ust-imagetext-sidebar-social-item img {
		width: 28px;
		height: 28px;
	}

	.ust-imagetext-header-full {
		padding: 22px 28px 18px;
	}

	.ust-imagetext-heading {
		font-size: 24px;
	}

	.ust-imagetext-subheading {
		font-size: 14px;
	}

	/* Rich text: stack image above text on mobile */
	.ust-imagetext-richtext-row,
	.ust-imagetext-richtext-row--img-right {
		flex-direction: column;
	}

	.ust-imagetext-richtext-image-col {
		position: relative;
		flex: none;
		width: 100%;
		height: 300px;
		max-height: 300px;
	}

	.ust-imagetext-richtext-image {
		display: block;
		width: 100%;
		height: 100%;
		object-fit: cover;
		object-position: center;
	}

	.ust-imagetext-richtext-text-col {
		padding: 24px 20px 32px;
	}

	.why-choose-image-col-reverse {
		order: -1;
	}
}


/* ---------------------------------------------------------------
   RESPONSIVE â€” SMALL MOBILE (â‰¤ 480px)
   --------------------------------------------------------------- */

@media (max-width: 480px) {
	.ust-imagetext-sidebar-nav-label {
		display: none;
	}

	.ust-imagetext-heading {
		font-size: 20px;
	}

	.ust-imagetext-subheading {
		font-size: 13px;
	}
}


/* ABOUT BOX - SAME WIDTH AS CTA */
.why-choose-row {
	width: calc(100% - 24px) !important;
	max-width: 1180px !important;
	margin-left: auto !important;
	margin-right: auto !important;
	background: var(--client-white);
	border: 1px solid var(--client-border);
	border-radius: 20px;
	overflow: hidden;
	box-sizing: border-box;
}

@media (max-width: 767px) {
	.why-choose-row {
		width: calc(100% - 20px) !important;
	}
}

/* FORCE ABOUT / IMAGE-TEXT WIDTH */
.why-choose-row {
	width: min(1240px, calc(100vw - 24px)) !important;
	max-width: none !important;
	margin-left: 50% !important;
	margin-right: 0 !important;
	transform: translateX(-50%);
	box-sizing: border-box !important;
}

/* ===== GUIDE BANNER WIDTH ===== */

.why-choose-section {
	width: 100% !important;
	max-width: none !important;
}

.why-choose-banner {
	width: min(1240px, calc(100vw - 24px)) !important;
	max-width: none !important;
	margin-left: 50% !important;
	margin-right: 0 !important;
	transform: translateX(-50%);
	box-sizing: border-box !important;
}

/* ============================================================
   TYPOGRAPHY SCALING (Tablet & Desktop)
   ============================================================ */

@media (min-width: 768px) {
	.why-choose-item-title,
	.ust-imagetext-richtext-content h2,
	.ust-imagetext-richtext-content h3,
	.ust-imagetext-richtext-content h4 {
		font-size: 25px;
	}
	.why-choose-item-text,
	.ust-imagetext-richtext-text-col,
	.ust-imagetext-richtext-content p {
		font-size: 17px;
	}
}

@media (min-width: 1024px) {
	.why-choose-item-title,
	.ust-imagetext-richtext-content h2,
	.ust-imagetext-richtext-content h3,
	.ust-imagetext-richtext-content h4 {
		font-size: 28px;
	}
	.why-choose-item-text,
	.ust-imagetext-richtext-text-col,
	.ust-imagetext-richtext-content p {
		font-size: 18px;
	}
}

/* ==========================================================================
   SCROLL-TRIGGERED ENTRANCE ANIMATIONS
   --------------------------------------------------------------------------
   Controlled by IntersectionObserver in image-text.js.
   .it-text-block   â€” text column (all modes)
   .it-img-wrap     â€” image column wrapper (clip-path wipe)
   .it-img-media    â€” inner image container (Ken Burns scale, items mode only)
   --------------------------------------------------------------------------
   Timing tokens
   ========================================================================== */

:root {
	--it-anim-text-dur:  0.8s;
	--it-anim-clip-dur:  1s;
	--it-anim-kb-dur:    8s;
	--it-anim-line-dur:  0.7s;
	--it-anim-line-delay: 0.5s;
	--it-anim-ease:      cubic-bezier(0.22, 1, 0.36, 1);
	--it-underline-color: var(--client-saffron, #D97706);
}

/* ------------------------------------------------------------------
   1. TEXT BLOCK â€” fade-in-up
   ------------------------------------------------------------------ */

.it-text-block {
	opacity: 0;
	transform: translateY(26px);
	transition:
		opacity  var(--it-anim-text-dur) var(--it-anim-ease),
		transform var(--it-anim-text-dur) var(--it-anim-ease);
}

.it-text-block.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* ------------------------------------------------------------------
   2. HEADING UNDERLINES â€” ::after draw-in
   Applies to h3 in items mode and h2/h3/h4 inside richtext content.
   ------------------------------------------------------------------ */

.it-text-block .why-choose-item-title,
.it-text-block .ust-imagetext-richtext-content h2,
.it-text-block .ust-imagetext-richtext-content h3,
.it-text-block .ust-imagetext-richtext-content h4 {
	position: relative;
	padding-bottom: 6px;
}

.it-text-block .why-choose-item-title::after,
.it-text-block .ust-imagetext-richtext-content h2::after,
.it-text-block .ust-imagetext-richtext-content h3::after,
.it-text-block .ust-imagetext-richtext-content h4::after {
	content: '';
	display: block;
	position: absolute;
	bottom: 0;
	left: 0;
	width: 0;
	height: 2px;
	background-color: var(--it-underline-color);
	border-radius: 2px;
	transition: width var(--it-anim-line-dur) ease var(--it-anim-line-delay);
}

.it-text-block.is-visible .why-choose-item-title::after,
.it-text-block.is-visible .ust-imagetext-richtext-content h2::after,
.it-text-block.is-visible .ust-imagetext-richtext-content h3::after,
.it-text-block.is-visible .ust-imagetext-richtext-content h4::after {
	width: 60%;
}

/* ------------------------------------------------------------------
   3. IMAGE COLUMN â€” clip-path wipe reveal (left â†’ right)
   ------------------------------------------------------------------ */

.it-img-wrap {
	clip-path: inset(0 100% 0 0);
	transition: clip-path var(--it-anim-clip-dur) var(--it-anim-ease);
}

.it-img-wrap.is-visible {
	clip-path: inset(0 0% 0 0);
}

/* ------------------------------------------------------------------
   4. IMAGE MEDIA WRAPPER â€” Ken Burns slow zoom-out (1.15 â†’ 1)
   Only present in items-list mode (.why-choose-image-media).
   Runs once; settles after 8 s. Not a loop.
   ------------------------------------------------------------------ */

.it-img-media {
	transform: scale(1.15);
	transition: transform var(--it-anim-kb-dur) ease;
}

.it-img-media.is-visible {
	transform: scale(1);
}

/* ------------------------------------------------------------------
   5. HOVER ZOOM â€” overrides Ken Burns settled state on hover
   Fast 0.5 s transition takes priority over the 8 s Ken Burns.
   ------------------------------------------------------------------ */

.it-img-wrap:hover .it-img-media {
	transform: scale(1.05);
	transition: transform 0.5s ease;
}

/* For richtext mode (no .it-img-media wrapper) â€” subtle brightness lift */
.it-img-wrap:hover .ust-imagetext-richtext-image {
	filter: brightness(1.04);
	transition: filter 0.5s ease;
}

/* ------------------------------------------------------------------
   6. REDUCED MOTION â€” show all elements immediately, no animation
   Extends the existing reduced-motion block already in this file.
   ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
	.it-text-block,
	.it-text-block.is-visible {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}

	.it-text-block .why-choose-item-title::after,
	.it-text-block .ust-imagetext-richtext-content h2::after,
	.it-text-block .ust-imagetext-richtext-content h3::after,
	.it-text-block .ust-imagetext-richtext-content h4::after,
	.it-text-block.is-visible .why-choose-item-title::after,
	.it-text-block.is-visible .ust-imagetext-richtext-content h2::after,
	.it-text-block.is-visible .ust-imagetext-richtext-content h3::after,
	.it-text-block.is-visible .ust-imagetext-richtext-content h4::after {
		width: 60% !important;
		transition: none !important;
	}

	.it-img-wrap,
	.it-img-wrap.is-visible {
		clip-path: none !important;
		transition: none !important;
	}

	.it-img-media,
	.it-img-media.is-visible {
		transform: none !important;
		transition: none !important;
	}
}
