/* ==========================================================================
   Communities archive (/communities/) - archive-bokka_community.php
   --------------------------------------------------------------------------
   Loaded after css/bokka-archives.css by lfg_bokka_archive_enqueue(). Every
   rule is scoped to .lfg-archive--communities.

   Plugin Tailwind utilities compile as `.bokka-plugin .utility` (0,2,0), and
   several plugin stylesheets use !important, so overrides below carry at
   least 0,2,1 and, where the plugin uses it, !important.

   The hero, compact group bands and card box/typography are shared with the
   other archives (css/bokka-archives.css); this file holds the page's own
   sections and layout.

   Sections (SJV /neighborhoods/ order):
     1. hero                        shared (css/bokka-archives.css)
     2. .lfg-communities-explorer   map + community list
     3. .lfg-communities-heading    bokka/simple-centered
     4. .lfg-communities-gallery    bokka/gallery-slider
     5. .lfg-communities-contact    bokka/form-cta (contact Gravity Form)
   ========================================================================== */

/* --------------------------------------------------------------------------
   2. Map + community list
   --------------------------------------------------------------------------
   Desktop (lg+): SJV's split - map on the left, a scrolling sidebar of
   community cards grouped by city on the right, both one viewport tall,
   inside a 1440px container on the gray band like SJV (not full width).
   Tablet: map band on top, cards in two columns below. Phone: cards only,
   like SJV (a full-width map on a phone mostly traps the scroll).
   -------------------------------------------------------------------------- */
.lfg-archive--communities .lfg-communities-explorer {
	background-color: #ECEBE9;
}

/* Map column. The plugin sizes the map from a min-h-[600px] wrapper with the
   canvas absolutely positioned inside; let it fill whatever the column is. */
.lfg-archive--communities .lfg-communities-explorer__map {
	display: none;
	position: relative;
}
.lfg-archive--communities .lfg-communities-explorer__map > .bokka-plugin,
.lfg-archive--communities .lfg-communities-explorer__map .overview-map {
	height: 100%;
}
.lfg-archive--communities .lfg-communities-explorer__map #map-wrap-outer {
	height: 100%;
	min-height: 0;
}

@media (min-width: 768px) {
	.lfg-archive--communities .lfg-communities-explorer__map {
		display: block;
		height: 440px;
	}
}

@media (min-width: 1024px) {
	.lfg-archive--communities .lfg-communities-explorer {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 360px;
		column-gap: 24px;
		box-sizing: border-box;
		/* 1440px container with 32px gutters, 48px above and below. */
		padding: 48px max(32px, calc((100% - 1376px) / 2));
		height: calc(min(max(600px, calc(100vh - 110px)), 820px) + 96px);
	}
	.lfg-archive--communities .lfg-communities-explorer__map {
		height: auto;
		min-height: 0;
	}
	.lfg-archive--communities .lfg-communities-explorer__list {
		min-height: 0;
		overflow-y: auto;
		overscroll-behavior: contain;
		scrollbar-width: thin;
		scrollbar-color: #6A8C73 #ECEBE9;
		position: relative;
		z-index: 1;
	}
}
/* In the narrow 1024-1279 list, a slightly smaller city band heading keeps
   "Chattanooga & Ooltewah, TN" on one line. */
@media (min-width: 1024px) and (max-width: 1279px) {
	.lfg-archive.lfg-archive--communities .lfg-communities-explorer__list .community-group > header h2 {
		font-size: 20px;
	}
}
@media (min-width: 1280px) {
	.lfg-archive--communities .lfg-communities-explorer {
		grid-template-columns: minmax(0, 1fr) 420px;
	}
}
@media (min-width: 1440px) {
	.lfg-archive--communities .lfg-communities-explorer {
		grid-template-columns: minmax(0, 1fr) 460px;
	}
}

/* Loading overlay: green tint + LFG copy color instead of the Ashlar
   spinner ring. */
.lfg-archive--communities .lfg-communities-explorer #map-loading-overlay {
	background-color: rgba(236, 235, 233, 0.92);
}
.lfg-archive--communities .lfg-communities-explorer #map-loading-overlay .border-blue-500 {
	border-color: #6A8C73;
}
.lfg-archive--communities .lfg-communities-explorer #map-loading-overlay p {
	font-family: Montserrat, sans-serif;
	font-size: 14px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #313233;
	padding-bottom: 0;
}

/* The archive block's gray band becomes the sidebar surface. */
.lfg-archive--communities .lfg-communities-explorer__list .archive-communities > .relative {
	padding: 24px 16px 8px;
	background-color: #ECEBE9;
}
@media (min-width: 768px) {
	.lfg-archive--communities .lfg-communities-explorer__list .archive-communities > .relative {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px;
		padding: 32px 32px 8px;
	}
}
@media (min-width: 1024px) {
	/* Cards sit flush with the map's top edge; the right padding keeps them
	   off the scrollbar. */
	.lfg-archive--communities .lfg-communities-explorer__list .archive-communities > .relative {
		display: block;
		padding: 0 16px 0 0;
	}
}

/* One city group = compact green band + its cards (shared, see
   .lfg-archive--split in css/bokka-archives.css). In the tablet two-column
   grid the grid gap spaces the groups instead. */
@media (min-width: 768px) and (max-width: 1023px) {
	.lfg-archive--communities .lfg-communities-explorer__list .community-group {
		margin-bottom: 0;
	}
}
.lfg-archive--communities .lfg-communities-explorer__list .product-grid {
	gap: 24px;
}

/* --------------------------------------------------------------------------
   Community cards (bokka/product-grid, grid_type communities)
   Box, snipe and type are shared (css/bokka-archives.css); the photo is
   16:9 here and the city line moves above the name as the card eyebrow,
   like the home and model cards.
   -------------------------------------------------------------------------- */
.lfg-archive--communities .lfg-communities-explorer__list .product-grid .item {
	max-width: none;
	margin-bottom: 0;
}
.lfg-archive--communities .lfg-communities-explorer__list .product-grid figure {
	height: auto;
	aspect-ratio: 16 / 9;
}
.lfg-archive--communities .product-grid .item > a > div > div:not(.image-placeholder) {
	display: flex;
	flex-direction: column;
}
.lfg-archive--communities .product-grid .item h3 + p {
	order: -1;
}
.lfg-archive--communities .product-grid .item h3 + p + p .italic {
	font-style: normal;
	font-weight: 700;
	color: #313233;
}
/* Street address under the price (inc/bokka-lfg-community-archive.php). */
.lfg-archive--communities .product-grid .item .lfg-community-card__address {
	margin: 8px 0 0;
	padding: 0;
	font-family: Montserrat, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	text-align: left;
	color: #313233;
}

/* --------------------------------------------------------------------------
   Only one CTA: the archive block's own "Be the First" text-cta and modal
   are skipped when the "Contact Us" section below renders
   (archive-bokka_community.php); hide the padded band they leave behind.
   -------------------------------------------------------------------------- */
.lfg-archive--communities:has(.lfg-communities-contact) .archive-communities > .py-20:last-child {
	display: none;
}

/* --------------------------------------------------------------------------
   3. Section heading (bokka/simple-centered)
   -------------------------------------------------------------------------- */
.lfg-archive--communities .lfg-communities-heading .simple-centered-content {
	padding-top: 64px;
	padding-bottom: 8px;
}
@media (min-width: 768px) {
	.lfg-archive--communities .lfg-communities-heading .simple-centered-content {
		padding-top: 96px;
		padding-bottom: 16px;
	}
}
.lfg-archive--communities .lfg-communities-heading .simple-centered-content > p {
	margin-bottom: 10px;
	padding-bottom: 0;
	font-family: Montserrat, sans-serif;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #4C6958;
}
.lfg-archive--communities .lfg-communities-heading .simple-centered-content > h2 {
	margin: 0;
	font-family: "Platypi", serif;
	font-size: clamp(34px, 4vw, 48px);
	font-weight: 500;
	line-height: 1.1;
	color: #313233;
}
.lfg-archive--communities .lfg-communities-heading .simple-centered-content > h2 + div {
	width: 64px;
	height: 4px;
	margin: 20px auto 24px;
	border-radius: 2px;
}

/* --------------------------------------------------------------------------
   4. Gallery slider (bokka/gallery-slider)
   -------------------------------------------------------------------------- */
.lfg-archive--communities .lfg-communities-gallery.gallery-slider {
	padding-top: 0;
	padding-bottom: 88px;
}
.lfg-archive--communities .lfg-communities-gallery .gallery-slider-wrapper {
	padding-left: 0;
	padding-right: 0;
}

/* container-default caps the main slide at 1200px while the thumbnail row
   runs the full wrapper; line both up on the wrapper. */
.lfg-archive--communities .lfg-communities-gallery .main-slider-container {
	max-width: none;
}
.lfg-archive--communities .lfg-communities-gallery .main-slider .swiper-slide,
.lfg-archive--communities .lfg-communities-gallery .main-slider .slide-content,
.lfg-archive--communities .lfg-communities-gallery .main-slider .slide-content img,
.lfg-archive--communities .lfg-communities-gallery .thumbnail-slider .thumbnail-content,
.lfg-archive--communities .lfg-communities-gallery .thumbnail-slider .thumbnail-content img {
	border-radius: 4px;
}
.lfg-archive--communities .lfg-communities-gallery .main-slider .swiper-slide {
	background-color: #313233;
}

/* Arrows: plugin paints them navy (#001e61 !important); LFG green
   like every slider arrow (style.css), white on the green hover. */
.lfg-archive--communities .lfg-communities-gallery .swiper-button-next,
.lfg-archive--communities .lfg-communities-gallery .swiper-button-prev {
	color: #6A8C73 !important;
	background: rgba(255, 255, 255, 0.92) !important;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}
.lfg-archive--communities .lfg-communities-gallery .swiper-button-next:hover,
.lfg-archive--communities .lfg-communities-gallery .swiper-button-prev:hover {
	color: #FFFFFF !important;
	background: #6A8C73 !important;
}

/* Thumbnails: inactive ones dimmed so the active green frame reads. */
.lfg-archive--communities .lfg-communities-gallery .thumbnail-slider .swiper-slide img {
	opacity: 0.7;
	transition: opacity 0.2s ease;
}
.lfg-archive--communities .lfg-communities-gallery .thumbnail-slider .swiper-slide:hover img,
.lfg-archive--communities .lfg-communities-gallery .thumbnail-slider .swiper-slide-thumb-active img,
.lfg-archive--communities .lfg-communities-gallery .thumbnail-slider .thumb-active img {
	opacity: 1;
}

@media (max-width: 1023px) {
	.lfg-archive--communities .lfg-communities-gallery.gallery-slider {
		padding-bottom: 64px;
	}
	.lfg-archive--communities .lfg-communities-gallery .main-slider,
	.lfg-archive--communities .lfg-communities-gallery .main-slider .swiper-wrapper,
	.lfg-archive--communities .lfg-communities-gallery .main-slider .swiper-slide,
	.lfg-archive--communities .lfg-communities-gallery .main-slider .slide-content {
		height: 460px !important;
		min-height: 460px !important;
		max-height: 460px !important;
	}
	.lfg-archive--communities .lfg-communities-gallery .main-slider .slide-content img {
		height: 460px !important;
	}
}
@media (max-width: 767px) {
	.lfg-archive--communities .lfg-communities-gallery.gallery-slider {
		padding-left: 16px;
		padding-right: 16px;
		padding-bottom: 48px;
	}
	.lfg-archive--communities .lfg-communities-gallery .main-slider,
	.lfg-archive--communities .lfg-communities-gallery .main-slider .swiper-wrapper,
	.lfg-archive--communities .lfg-communities-gallery .main-slider .swiper-slide,
	.lfg-archive--communities .lfg-communities-gallery .main-slider .slide-content {
		height: 250px !important;
		min-height: 250px !important;
		max-height: 250px !important;
	}
	.lfg-archive--communities .lfg-communities-gallery .main-slider .slide-content img {
		height: 250px !important;
	}
}

/* --------------------------------------------------------------------------
   5. "Contact Us" form CTA (bokka/form-cta + the community contact form)
   -------------------------------------------------------------------------- */
.lfg-archive--communities .lfg-communities-contact {
	background-color: #ECEBE9;
}
.lfg-archive--communities .lfg-communities-contact > .content {
	gap: 48px;
	padding: 80px 32px;
	align-items: center;
}

/* The plugin's beige backdrop behind the headshot (as on the community
   singles' form) stays; the OSC photo's own background covers it. */
.lfg-archive--communities .lfg-communities-contact .form-cta-image {
	width: 220px;
	border: 6px solid #FFFFFF;
	box-shadow: 0 8px 24px rgba(33, 35, 34, 0.16);
}

.lfg-archive--communities .lfg-communities-contact .text h2 {
	margin-bottom: 0;
	font-family: "Platypi", serif;
	font-size: clamp(34px, 3.4vw, 44px);
	font-weight: 500;
	line-height: 1.1;
	color: #313233;
}
.lfg-archive--communities .lfg-communities-contact .text h2::after {
	content: "";
	display: block;
	width: 56px;
	height: 4px;
	margin: 18px 0 20px;
	border-radius: 2px;
	background-color: #6A8C73;
}
.lfg-archive--communities .lfg-communities-contact .text .description {
	font-family: Montserrat, sans-serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.7;
	color: #4B4F52;
}
.lfg-archive--communities .lfg-communities-contact .text .description p {
	padding-bottom: 0;
	line-height: 1.7;
}

/* Form: white card on the gray band; white controls would vanish on white,
   so the controls keep the site's #F1F1F1 fill inside the card. */
.lfg-archive--communities .lfg-communities-contact .form {
	padding: 32px;
	background-color: #FFFFFF;
	box-shadow: 0 2px 14px rgba(33, 35, 34, 0.08);
}
.lfg-archive--communities .lfg-communities-contact .gform_wrapper .gform_footer {
	margin-top: 32px;
	padding-bottom: 0;
}

@media (max-width: 1279px) {
	.lfg-archive--communities .lfg-communities-contact .text {
		max-width: 520px;
		text-align: center;
	}
	.lfg-archive--communities .lfg-communities-contact .text h2::after {
		margin-left: auto;
		margin-right: auto;
	}
	.lfg-archive--communities .lfg-communities-contact .form {
		max-width: 640px;
	}
}
@media (max-width: 767px) {
	.lfg-archive--communities .lfg-communities-contact > .content {
		gap: 28px;
		margin-left: 0;
		margin-right: 0;
		padding: 56px 16px;
	}
	.lfg-archive--communities .lfg-communities-contact .form-cta-image {
		width: 160px;
	}
	.lfg-archive--communities .lfg-communities-contact .form {
		padding: 24px 20px;
	}
}

/* Map pins: the plugin ships one coral pin (map-pin-chinburg-coral.png) for
   every marker; tint it to LFG green. Clusters already use the green
   --color-accent-primary token. */
.lfg-archive--communities #communities-map img[src*="map-pin-chinburg-coral"] {
	filter: hue-rotate(105deg) saturate(0.6) brightness(0.92);
}

/* Marker info window: LFG serif name, green "Explore this community" bar. */
.lfg-archive--communities #communities-map .infowindow-communities .title {
	font-family: "Platypi", serif;
	font-size: 26px;
	font-weight: 500;
	line-height: 1.15;
	color: #313233;
}
.lfg-archive--communities #communities-map .infowindow-communities .subtitle {
	padding-bottom: 0;
	font-family: Montserrat, sans-serif;
	font-size: 14px;
	color: #4B4F52;
}
.lfg-archive--communities #communities-map .infowindow-communities .directions-link {
	color: #2F463E;
	font-family: Montserrat, sans-serif;
	font-weight: 600;
}
.lfg-archive--communities #communities-map .infowindow-communities .explore-button {
	background-color: #6A8C73;
	color: #FFFFFF;
	font-family: Montserrat, sans-serif;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	font-size: 14px;
	transition: background-color 0.2s ease;
}
.lfg-archive--communities #communities-map .infowindow-communities .explore-button:hover {
	background-color: #2F463E;
}
