/**
 * Hero 2 Component Styles
 * Fully responsive layout using CSS Grid and Flexbox
 * Based on Figma: Home - Desktop Hero 2 (1:189) and Home - Mobile Hero 2 (2:1181)
 */

/* ========================================
   BASE HERO 2 SECTION
   ======================================== */
.hero-2 {
	background: var(--color-bg-white);
	width: 100%;
	overflow: hidden;
	padding: 3rem 1.5rem;
	margin: 0;
}

/* Optional ACF “Image link URL” wraps the mockup */
a.hero-2__phone-link {
	display: block;
	text-decoration: none;
	color: inherit;
}

a.hero-2__phone-link:focus-visible {
	outline: 2px solid var(--color-teal);
	outline-offset: 4px;
	border-radius: 4px;
}

.hero-2__phone:has(.hero-2__phone-link) {
	overflow: visible;
}

/* ========================================
   DESKTOP VERSION (1024px+)
   ======================================== */
@media (min-width: 1024px) {
	.hero-2 {
		padding: 6rem 3rem;
	}

	.hero-2__container--mobile {
		display: none;
	}

	.hero-2__container--desktop {
		display: grid;
		grid-template-columns: 1.2fr 1fr;
		gap: 4rem;
		align-items: center;
		max-width: 1280px;
		margin: 0 auto;
	}

	/* Text Content - Left Column (default) */
	.hero-2__content {
		grid-column: 1;
		grid-row: 1;
		display: flex;
		flex-direction: column;
		gap: 2rem;
		max-width: 600px;
	}

	/* Text Right Variant */
	.hero-2--text-right .hero-2__content {
		grid-column: 2;
		grid-row: 1;
	}

	.hero-2--text-right .hero-2__phone {
		grid-column: 1;
		grid-row: 1;
	}

	.hero-2__heading--desktop {
		/* Typography handled by .typog-h2 */
		margin: 0 0 1.5rem 0;
	}

	/* Steps List */
	.hero-2__steps {
		list-style: none;
		padding: 0;
		margin: 0;
		display: flex;
		flex-direction: column;
		gap: 16px;
	}

	.hero-2__step {
		position: relative;
		padding: 0;
		margin: 0;
		list-style: none;
	}

	.hero-2__step::before {
		content: '';
		position: absolute;
		left: 0;
		top: 0.3rem;
		bottom: 0;
		width: 5px;
		background: var(--color-teal);
		border-radius: 3px;
		transition: all 0.3s ease-out;
	}

	.hero-2__step-title {
		/* Typography handled by .text-subtitle-bold-md */
		margin: 0;
		padding-left: 2rem; /* Space for turquoise indicator */
		display: block;
		color: inherit;
		font: inherit;
	}

	button.hero-2__step-title {
		background: transparent;
		border: none;
		cursor: pointer;
		text-align: left;
		width: 100%;
	}

	/* Step content wrapper for accordion animation */
	.hero-2__step-content-wrapper {
		overflow: hidden;
		transition: height 0.3s ease-out, opacity 0.3s ease-out 0s;
		height: 0;
		opacity: 0;
	}

	.hero-2__step[aria-expanded="true"] .hero-2__step-content-wrapper {
		opacity: 1;
		transition: height 0.3s ease-out, opacity 0.3s ease-out 0.15s;
	}

	.hero-2__step-content {
		/* Typography handled by .text-body */
		padding: 12px 0 0 2rem; /* Align with title, 12px top spacing */
		margin: 0;
	}

	/* Hide content when collapsed */
	.hero-2__step[aria-expanded="false"] .hero-2__step-content {
		display: none;
	}

	/* Hide step boxes (they're decorative in Figma) */
	.hero-2__step-indicators,
	.hero-2__step-box {
		display: none;
	}

	/* App Store + optional upsell (after steps / CTA); left-aligned vs centered column content */
	.hero-2__downloads {
		width: 100%;
	}

	.hero-2__downloads .download-buttons-group {
		justify-content: flex-start;
	}

	/* CTA Button */
	.hero-2__cta {
		margin-top: 36px;
	}

	.hero-2__button {
		width: 100%;
		max-width: 283px;
		height: 49px;
		background: var(--color-teal);
		border: 1px solid var(--color-teal);
		border-radius: 10px;
		cursor: pointer;
		display: flex;
		align-items: center;
		justify-content: center;
		transition: all 0.2s ease;
	}

	.hero-2__button:hover {
		background: var(--color-teal-hover);
		transform: translateY(-2px);
		box-shadow: 0 4px 12px var(--color-shadow-strong);
	}

	.hero-2__button-text {
		/* Typography handled by .text-button */
		/* Override .text-button white color with dark text for hero-2 */
		color: var(--color-primary-text) !important;
		text-transform: uppercase;
	}

	/* Phone Mockup - Right Column */
	.hero-2__phone {
		grid-column: 2;
		grid-row: 1;
		width: 100%;
		max-width: 500px;
		height: auto;
		overflow: hidden;
		justify-self: center;
		align-self: center;
	}

	.hero-2__phone-image {
		width: 100%;
		height: 100%;
		display: block;
	}
}

/* ========================================
   MOBILE VERSION (below 1024px)
   ======================================== */
@media (max-width: 1023px) {
	.hero-2__container--desktop {
		display: none;
	}

	.hero-2__container--mobile {
		display: flex;
		flex-direction: column;
		gap: 2rem;
	}

	.hero-2 {
		padding: 3rem 1.5rem;
	}

	/* Mobile Headline - below image by default (text-left) */
	.hero-2__heading--mobile {
		/* Typography handled by .typog-h2 */
		margin: 0;
		text-align: center;
		order: 2;
	}

	/* Phone Mockup - above heading by default (text-left) */
	.hero-2__phone--mobile {
		width: 100%;
		max-width: 350px;
		overflow: hidden;
		margin: 0 auto;
		order: 1;
	}

	/* Text Right Variant: heading above image on mobile */
	.hero-2--text-right .hero-2__heading--mobile {
		order: 1;
	}

	.hero-2--text-right .hero-2__phone--mobile {
		order: 2;
	}

	.hero-2__phone-image {
		width: 100%;
		height: 100%;
		display: block;
	}

	/* Content (Steps + CTA) - Third on Mobile */
	.hero-2__content--mobile {
		display: flex;
		flex-direction: column;
		gap: 1.5rem;
		order: 3;
	}

	/* Steps List */
	.hero-2__steps {
		list-style: none;
		padding: 0;
		margin: 0;
		display: flex;
		flex-direction: column;
		gap: 16px;
	}

	.hero-2__step {
		position: relative;
		padding: 0;
		margin: 0;
		list-style: none;
	}

	.hero-2__step::before {
		content: '';
		position: absolute;
		left: 0;
		top: 0.2rem;
		bottom: 0;
		width: 4px;
		background: var(--color-teal);
		border-radius: 2px;
		transition: all 0.3s ease-out;
	}

	.hero-2__step-title {
		/* Typography handled by .text-subtitle-bold-md */
		margin: 0;
		padding-left: 1.5rem; /* Space for turquoise indicator */
		background: transparent;
		border: none;
		cursor: pointer;
		text-align: left;
		width: 100%;
		display: block;
		color: inherit;
		font: inherit;
	}

	/* Step content wrapper for accordion animation */
	.hero-2__step-content-wrapper {
		overflow: hidden;
		transition: height 0.3s ease-out, opacity 0.3s ease-out 0s;
		height: 0;
		opacity: 0;
	}

	.hero-2__step[aria-expanded="true"] .hero-2__step-content-wrapper {
		opacity: 1;
		transition: height 0.3s ease-out, opacity 0.3s ease-out 0.15s;
	}

	.hero-2__step-content {
		/* Typography handled by .text-body */
		padding: 12px 0 0 1.5rem; /* Align with title, 12px top spacing */
		margin: 0;
	}

	/* Hide content when collapsed */
	.hero-2__step[aria-expanded="false"] .hero-2__step-content {
		display: none;
	}

	/* Hide decorative elements */
	.hero-2__step-indicators,
	.hero-2__step-box {
		display: none;
	}

	.hero-2__downloads {
		width: 100%;
	}

	.hero-2__downloads .download-buttons-group {
		justify-content: center;
	}

	/* CTA Button */
	.hero-2__cta--mobile {
		display: flex;
		justify-content: center;
		margin-top: 30px;
	}

	.hero-2__button--mobile {
		width: 100%;
		max-width: 320px;
		height: 49px;
		background: var(--color-teal);
		border: 1px solid var(--color-teal);
		border-radius: 10px;
		cursor: pointer;
		display: flex;
		align-items: center;
		justify-content: center;
		transition: all 0.2s ease;
	}

	.hero-2__button--mobile:active {
		background: var(--color-teal-hover);
		transform: scale(0.98);
	}

	.hero-2__button-text {
		/* Typography handled by .text-button */
		/* Override .text-button white color with dark text for hero-2 */
		color: var(--color-primary-text) !important;
		text-transform: uppercase;
	}
}
