/**
 * NFR real-estate listing pages — shared mobile (Punta, DR/MX destinations, for-sale, golf).
 * Loaded after punta-listing-page.css on all listingSearchInContent routes.
 */

@media (max-width: 767.98px) {
	/* —— Hero —— */
	#slider.nfr-real-estate-hero {
		min-height: clamp(220px, 36vh, 360px);
	}

	#slider.nfr-real-estate-hero.slider-element {
		padding-top: max(var(--nfr-public-header-height, 108px), clamp(5.5rem, 14vmin, 8rem)) !important;
		padding-bottom: 1rem !important;
	}

	.nfr-listing-hero-place {
		min-height: 0;
		padding-bottom: 0.5rem;
	}

	.nfr-hero-place-title {
		font-size: clamp(1.65rem, 8vw, 2.35rem);
		padding-inline: 0.5rem;
		line-height: 1.15;
	}

	label.nfr-hero-tagline {
		max-width: calc(100% - 1.25rem);
		margin-top: 0.65rem;
		padding: 0.5rem 1rem 0.55rem;
		font-size: clamp(0.8125rem, 3.2vw, 0.9375rem);
		line-height: 1.45;
	}

	/* —— Explore content band —— */
	#content .nfr-listing-explore-above-search.container {
		padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
		padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
	}

	#content .nfr-listing-explore-panel {
		overflow-x: hidden;
	}

	/* Text above image when the image column is first in the markup */
	#content .nfr-listing-explore-panel .nfr-punta-dev-text-row.nfr-punta-theme-row:not(.nfr-punta-theme-row--img-right) > [class*="col-"]:first-child {
		order: 2;
	}

	#content .nfr-listing-explore-panel .nfr-punta-dev-text-row.nfr-punta-theme-row:not(.nfr-punta-theme-row--img-right) > [class*="col-"]:last-child {
		order: 1;
	}

	#content .nfr-listing-explore-panel .nfr-punta-dev-text-row.nfr-golf-text-img-row:not(.nfr-punta-theme-row--img-right) > [class*="col-"]:first-child:not(.order-md-1) {
		order: 2;
	}

	#content .nfr-listing-explore-panel .nfr-punta-dev-text-row.nfr-golf-text-img-row:not(.nfr-punta-theme-row--img-right) > [class*="col-"]:last-child:not(.order-md-2) {
		order: 1;
	}

	#content .nfr-listing-explore-panel:not(.nfr-golf-listing-panel) .nfr-punta-dev-visual-frame,
	#content .nfr-listing-explore-panel:not(.nfr-golf-listing-panel) .nfr-punta-dev-visual-placeholder {
		height: auto !important;
		min-height: clamp(200px, 52vw, 260px) !important;
		max-height: none;
	}

	#content .nfr-listing-explore-panel .nfr-punta-dev-text__title,
	#content .nfr-listing-explore-panel .nfr-explore-headline-primary {
		font-size: clamp(1.15rem, 5vw, 1.45rem) !important;
		letter-spacing: 0.04em;
		word-break: break-word;
	}

	#content .nfr-listing-explore-panel .nfr-punta-dev-text__p {
		font-size: clamp(0.92rem, 3.8vw, 1.02rem);
		line-height: 1.65;
	}

	#content .nfr-listing-explore-panel .nfr-punta-invest-block {
		padding-inline: clamp(0.85rem, 4vw, 1.25rem);
	}

	#content .nfr-listing-explore-panel .nfr-explore-location-chips,
	#content .nfr-listing-explore-panel .nfr-explore-theme-chips {
		justify-content: center !important;
	}

	#content .nfr-listing-explore-panel .nfr-punta-why-text__figure--dr-map {
		min-height: 220px;
	}

	#content .nfr-listing-explore-panel .nfr-punta-dev-text-row {
		margin-bottom: 1rem;
		padding-bottom: 0.75rem;
	}

	/* —— Search panel above listings —— */
	#content .nfr-listing-search-above-map.container {
		padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
		padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
	}

	/* —— Actions strip —— */
	.real-estate-listing-actions-inner {
		flex-direction: column;
		align-items: stretch;
		gap: 0.5rem;
		width: 100%;
	}

	.real-estate-listing-actions-strip .btn {
		width: 100%;
		max-width: none;
	}

	/* —— Property cards grid —— */
	#real-estate-listing-cards-grid.mx-5 {
		margin-left: 0.75rem !important;
		margin-right: 0.75rem !important;
		--bs-gutter-x: 0.75rem;
	}

	/* —— Touch: skip hover lifts in explore panel —— */
	#content .nfr-listing-explore-panel .nfr-punta-dev-text-row:hover,
	#content .nfr-listing-explore-panel [class*="card"]:hover {
		transform: none;
	}
}

@media (max-width: 575.98px) {
	#real-estate-listing-cards-grid.mx-5 {
		margin-left: 0.5rem !important;
		margin-right: 0.5rem !important;
	}

	label.nfr-hero-tagline {
		padding-inline: 0.75rem;
		font-size: 0.8125rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	label.nfr-hero-tagline {
		animation: none !important;
	}
}
