/**
 * Phase 1.5 — UI/UX polish (heroes, services hub, contact, navigation).
 */

/* -------------------------------------------------------------------------
   Service / contact split hero — image left, RTL text right
   ------------------------------------------------------------------------- */

.amf-page-content--service,
.amf-page-content--contact,
.amf-page-content--services-hub {
	max-width: var(--american-mutual-container-width, 80rem);
	padding-inline: clamp(1rem, 4vw, 2rem);
}

.amf-service-hero {
	position: relative;
	margin-block: 0 var(--american-mutual-space-2xl, 3rem);
	margin-inline: calc(-1 * clamp(1rem, 4vw, 2rem));
	padding: 0;
	background: transparent;
	border-radius: 0;
	color: inherit;
	overflow: visible;
}

.amf-service-hero__inner {
	background: linear-gradient(135deg, #0a2540 0%, #163a5c 52%, #0a2540 100%);
	border-radius: var(--american-mutual-radius-lg, 1.125rem);
	padding: clamp(1.5rem, 4vw, 3rem);
	color: #ffffff;
	box-shadow: 0 12px 40px rgba(10, 37, 64, 0.18);
}

.amf-service-hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
	grid-template-areas: "media content";
	gap: clamp(1.25rem, 3vw, 2.5rem);
	align-items: center;
	direction: ltr;
}

.amf-service-hero__media {
	grid-area: media;
}

.amf-service-hero__content {
	grid-area: content;
	direction: rtl;
	text-align: right;
	min-width: 0;
}

.amf-service-hero__eyebrow {
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: #f97316;
	margin-block: 0 0.75rem;
}

.amf-service-hero__title {
	color: #ffffff;
	margin-block: 0 1rem;
	font-size: clamp(1.625rem, 3.5vw, 2.5rem);
	line-height: 1.2;
	word-wrap: break-word;
	overflow-wrap: anywhere;
	hyphens: auto;
}

.amf-service-hero__lead {
	opacity: 0.94;
	margin-block: 0 1.5rem;
	line-height: 1.75;
	font-size: clamp(1rem, 2vw, 1.125rem);
	max-width: 36rem;
	margin-inline-start: auto;
}

.amf-service-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	justify-content: flex-start;
}

.amf-service-hero__btn-outline {
	border-color: rgba(255, 255, 255, 0.85) !important;
	color: #ffffff !important;
}

.amf-service-hero__btn-outline:hover,
.amf-service-hero__btn-outline:focus-visible {
	background: rgba(255, 255, 255, 0.12) !important;
	border-color: #ffffff !important;
	color: #ffffff !important;
}

.amf-service-hero__image {
	display: block;
	width: 100%;
	height: auto;
	max-height: 22rem;
	object-fit: cover;
	border-radius: var(--american-mutual-radius-lg, 1.125rem);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

/* -------------------------------------------------------------------------
   Services hub cards
   ------------------------------------------------------------------------- */

.amf-services-hub__title {
	margin-block-end: var(--american-mutual-space-lg, 1.5rem);
}

.amf-services-hub__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
	gap: 1.25rem;
}

.amf-services-hub__card {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding: 1.5rem;
	background: #ffffff;
	border: 1px solid var(--american-mutual-color-border, #e5e7eb);
	border-radius: var(--american-mutual-radius-lg, 1.125rem);
	border-inline-start: 4px solid #f97316;
	box-shadow: 0 4px 16px rgba(10, 37, 64, 0.06);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.amf-services-hub__card:hover {
	box-shadow: 0 8px 28px rgba(249, 115, 22, 0.14);
	transform: translateY(-2px);
}

.amf-services-hub__card-title {
	margin: 0;
	font-size: 1.125rem;
}

.amf-services-hub__card-title a {
	color: #0a2540;
	text-decoration: none;
}

.amf-services-hub__card-title a:hover {
	color: #f97316;
}

.amf-services-hub__card-intro {
	margin: 0;
	font-size: 0.9375rem;
	color: var(--american-mutual-color-text-muted, #6b7280);
	line-height: 1.65;
	flex: 1;
}

.amf-services-hub__card-link {
	font-weight: 700;
	color: #f97316;
	text-decoration: none;
	font-size: 0.9375rem;
}

.amf-services-hub__card-link:hover {
	color: #ea580c;
}

/* -------------------------------------------------------------------------
   Contact page
   ------------------------------------------------------------------------- */

.amf-contact-cards__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
	gap: 1rem;
	margin-block-start: 1rem;
}

.amf-contact-card {
	padding: 1.25rem 1.5rem;
	background: var(--american-mutual-color-bg-alt, #f8f9fa);
	border-radius: var(--american-mutual-radius-lg, 1.125rem);
	border-inline-start: 4px solid #f97316;
}

.amf-contact-card h3 {
	margin-block: 0 0.5rem;
	font-size: 1rem;
	color: #0a2540;
}

.amf-contact-card p {
	margin: 0;
	line-height: 1.6;
}

.amf-contact-card a {
	color: #f97316;
	font-weight: 600;
	text-decoration: none;
}

.amf-contact-card a:hover {
	color: #ea580c;
}

.amf-contact-form-section {
	margin-block: var(--american-mutual-space-2xl, 3rem);
}

/* -------------------------------------------------------------------------
   Elementor desktop services dropdown
   ------------------------------------------------------------------------- */

@media (min-width: 768px) {
	.elementor-location-header .elementor-nav-menu--main .menu-item-has-children {
		position: relative;
	}

	.elementor-location-header .elementor-nav-menu--main .menu-item-has-children > .sub-menu,
	.elementor-location-header .elementor-nav-menu--main .menu-item-has-children > .elementor-nav-menu--dropdown {
		position: absolute !important;
		inset-inline-end: 0;
		top: calc(100% + 0.5rem) !important;
		min-width: 18rem;
		max-height: 70vh;
		overflow-y: auto;
		margin: 0 !important;
		padding: 0.5rem 0 !important;
		background: #ffffff !important;
		border: 1px solid #e5e7eb !important;
		border-radius: var(--american-mutual-radius-lg, 1.125rem) !important;
		box-shadow: 0 12px 40px rgba(10, 37, 64, 0.12) !important;
		opacity: 0;
		visibility: hidden;
		transform: translateY(0.5rem);
		transition:
			opacity 0.2s ease,
			transform 0.2s ease,
			visibility 0.2s ease;
		pointer-events: none;
		display: block !important;
		height: auto !important;
		width: auto !important;
	}

	.elementor-location-header .elementor-nav-menu--main .menu-item-has-children:hover > .sub-menu,
	.elementor-location-header .elementor-nav-menu--main .menu-item-has-children:focus-within > .sub-menu,
	.elementor-location-header .elementor-nav-menu--main .menu-item-has-children:hover > .elementor-nav-menu--dropdown,
	.elementor-location-header .elementor-nav-menu--main .menu-item-has-children:focus-within > .elementor-nav-menu--dropdown {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
		pointer-events: auto;
	}

	.elementor-location-header .elementor-nav-menu--main .sub-menu .elementor-item,
	.elementor-location-header .elementor-nav-menu--main .elementor-nav-menu--dropdown .elementor-item {
		display: block !important;
		width: 100% !important;
		padding: 0.625rem 1.25rem !important;
		font-size: 0.9375rem !important;
		font-weight: 500 !important;
		white-space: normal !important;
		min-height: auto !important;
	}

	.elementor-location-header .elementor-nav-menu--main .sub-menu .elementor-item:hover,
	.elementor-location-header .elementor-nav-menu--main .elementor-nav-menu--dropdown .elementor-item:hover {
		background: #fff4e0 !important;
		color: #f97316 !important;
	}
}

@media (max-width: 767px) {
	.amf-service-hero {
		margin-inline: 0;
	}

	.amf-service-hero__grid {
		grid-template-columns: 1fr;
		grid-template-areas:
			"media"
			"content";
	}

	.amf-service-hero__image {
		max-height: 16rem;
	}

	.amf-service-hero__title {
		font-size: clamp(1.5rem, 6vw, 2rem);
	}

	.amf-service-hero__actions {
		flex-direction: column;
		align-items: stretch;
	}

	.amf-service-hero__actions .american-mutual-btn {
		width: 100%;
		justify-content: center;
		text-align: center;
	}
}
