/* =========================================================
   Intracoastal Homes — listing template styles
   (Residential, Commercial suite and Building pages share these;
   commercial-only additions are at the bottom of the file.)
   ========================================================= */

.ich-listing{
	font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;
	color: var(--ich-ink);
	background: var(--ich-bg);
}

.ich-listing h1,
.ich-listing h2,
.ich-listing .ich-serif{
	font-family: 'Fraunces', Georgia, serif;
	font-weight: 500;
	color: var(--ich-ink);
	line-height: 1.15;
}

/* ---- Photos ----
   Desktop: featured image on the left, a 2x2 grid of the next 4 photos on
            the right (Zillow-style); "+N photos" on the last tile.
   Mobile:  one photo at a time, swipe sideways for the rest.
   Any photo, "+N photos" or "View all N photos" opens the photo viewer
   (styles in css/listing-viewer.css, script in js/ich-photo-viewer.js). */
.ich-media{
	position: relative;
	background: #E9E5DA;
}
.ich-media-track{
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	grid-auto-rows: clamp(150px, 17vw, 250px);
	gap: 6px;
}
.ich-slide{
	margin: 0;
	overflow: hidden;
}
.ich-slide:first-child{
	grid-column: 1 / 3;
	grid-row: 1 / 3;
}
.ich-media-track:has(.ich-slide:only-child) .ich-slide{ grid-column: 1 / -1; } /* single photo: full width */
.ich-slide img{
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.ich-slide-open{
	display: block;
	height: 100%;
	overflow: hidden;
	cursor: zoom-in;
}
.ich-slide-open img{ transition: transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1); }
.ich-slide-open:hover img,
.ich-slide-open:focus-visible img{ transform: scale(1.04); }
.ich-slide-open:focus-visible{ outline: 2px solid #fff; outline-offset: -4px; }
.ich-media .screen-reader-text{
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
.ich-media-count{ display: none; }
/* Desktop: hero + first row only; the rest are in the photo viewer */
.ich-media .ich-slide:nth-child(n+6){ display: none; }
.ich-slide{ position: relative; }
.ich-listing .ich-media-more{
	position: absolute;
	inset: 0;
	width: 100%;
	border: 0;
	border-radius: 0;
	background: rgba(35, 38, 43, 0.55);
	color: #fff;
	font-family: inherit;
	font-size: 1.05rem;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: background-color 0.15s ease;
}
.ich-listing .ich-media-more:hover{ background: rgba(35, 38, 43, 0.7); color: #fff; }
.ich-listing .ich-media-more:focus-visible{ outline: 2px solid #fff; outline-offset: -4px; }

/* "View all N photos" button, bottom-right of the strip (phones: bottom-left, "All photos") */
.ich-listing .ich-media-all{
	position: absolute;
	right: 16px;
	bottom: 16px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 9px 16px;
	border: 1px solid rgba(35, 38, 43, 0.12);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.94);
	color: var(--ich-ink);
	font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 0.875rem;
	font-weight: 500;
	letter-spacing: 0.01em;
	line-height: 1.2;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16);
	transition: background-color 0.15s ease, color 0.15s ease;
}
.ich-listing .ich-media-all:hover{ background: var(--ich-accent); color: #fff; }
.ich-listing .ich-media-all:focus-visible{ outline: 2px solid var(--ich-accent); outline-offset: 2px; }
.ich-media-all-short{ display: none; }
.ich-media--more .ich-media-all{ display: none; } /* desktop: the "+N photos" tile already does this */
.ich-media-track:focus-visible{ outline: 2px solid var(--ich-accent); outline-offset: -2px; }

@media (max-width: 860px){
	.ich-media-track{
		display: flex;
		gap: 0;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior-x: contain;
		scrollbar-width: none;
	}
	.ich-media-track::-webkit-scrollbar{ display: none; }
	.ich-media .ich-slide:nth-child(n+6){ display: block; } /* swipe shows every photo */
	.ich-listing .ich-media-more{ display: none; }
	.ich-slide-open:hover img{ transform: none; }
	.ich-listing .ich-media-all{
		right: auto;
		left: 12px;
		bottom: 12px;
		padding: 6px 12px;
		font-size: 0.8rem;
		gap: 6px;
	}
	.ich-media--more .ich-media-all{ display: inline-flex; }
	.ich-media-all-long{ display: none; }
	.ich-media-all-short{ display: inline; }
	.ich-slide,
	.ich-slide:first-child{
		flex: 0 0 100%;
		aspect-ratio: 4 / 3;
		scroll-snap-align: start;
	}
	.ich-media-count{
		display: block;
		position: absolute;
		right: 12px;
		bottom: 12px;
		background: rgba(35, 38, 43, 0.72);
		color: #fff;
		font-size: 0.8rem;
		letter-spacing: 0.04em;
		padding: 4px 10px;
		border-radius: 999px;
		pointer-events: none;
	}
}

/* ---- Info bar ---- */
.ich-info-bar{
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-end;
	gap: 24px;
	max-width: 1180px;
	margin: 0 auto;
	padding: 36px 24px 28px;
	border-bottom: 1px solid var(--ich-line);
}
.ich-info-bar .ich-address h1{
	font-size: clamp(1.6rem, 3vw, 2.4rem);
	margin: 0 0 4px;
}
.ich-full-address{
	font-size: 0.95rem;
	color: var(--ich-ink-soft);
	margin-bottom: 6px;
}
.ich-info-bar .ich-community{
	font-size: 0.95rem;
	color: var(--ich-ink-soft);
}
.ich-info-bar .ich-community a{
	color: var(--ich-accent);
	text-decoration: none;
	border-bottom: 1px solid var(--ich-accent-soft);
}
.ich-price-stats{
	text-align: right;
}
.ich-price{
	font-family: 'Fraunces', Georgia, serif;
	font-size: clamp(1.5rem, 2.6vw, 2.1rem);
	color: var(--ich-accent);
}
.ich-stats{
	margin-top: 6px;
	font-size: 0.95rem;
	color: var(--ich-ink-soft);
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 4px 14px;
}

/* Mobile: stack the info bar and left-align price + stats under the title
   (previously the right-aligned price block drifted off-center when it wrapped). */
@media (max-width: 860px){
	.ich-info-bar{
		flex-direction: column;
		align-items: flex-start;
		gap: 14px;
	}
	.ich-price-stats{ text-align: left; }
	.ich-stats{ justify-content: flex-start; }
}

.ich-status-badge{
	display: inline-block;
	font-size: 0.78rem;
	letter-spacing: 0.02em;
	padding: 5px 12px;
	border: 1px solid var(--ich-brass);
	color: var(--ich-brass);
	border-radius: 2px;
	margin-bottom: 10px;
}

/* ---- Body layout ---- */
.ich-body{
	max-width: 1180px;
	margin: 0 auto;
	padding: 40px 24px 80px;
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
	gap: 56px;
}
@media (max-width: 860px){
	.ich-body{ grid-template-columns: 1fr; gap: 40px; }
}

.ich-remarks{
	font-size: 1.05rem;
	line-height: 1.7;
	color: var(--ich-ink);
	margin-bottom: 40px;
}
.ich-remarks p{ margin: 0 0 1em; }
.ich-remarks-short{ margin: 0 0 6px; }
.ich-listing .ich-more{
	background: none;
	border: 0;
	padding: 4px 0;
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--ich-accent);
	border-bottom: 1px solid var(--ich-accent-soft);
	border-radius: 0;
	cursor: pointer;
}
.ich-listing .ich-more:hover{ color: var(--ich-ink); background: none; }
.ich-listing .ich-more:focus-visible{ outline: 2px solid var(--ich-accent); outline-offset: 2px; }
.ich-extra-content{ margin-bottom: 40px; }

/* Printing this page always shows the full description and just the main photo. */
@media print{
	.ich-remarks-full{ display: block !important; }
	.ich-remarks-short,
	.ich-more,
	.ich-media-count,
	.ich-media-all,
	.ich-media-more,
	.ich-lb,
	.ich-sticky-cta{ display: none !important; }
	.ich-slide:not(:first-child){ display: none; }
}

.ich-section{
	padding: 0 0 36px;
}
/* Section headings (Interior, Property, Lot & Details…) sit on a shaded band
   so each section reads as its own block. The band replaces the old divider line. */
.ich-listing .ich-section-label{
	font-family: 'Fraunces', Georgia, serif;
	font-style: italic;
	font-weight: 500;
	font-size: 1.35rem;
	color: var(--ich-accent);
	background: var(--ich-band);
	padding: 12px 18px;
	margin: 0 0 20px;
}
/* Print: no shading (it can vanish or print muddy on black-and-white printers).
   Section headings get solid black rules above and below instead. */
@media print{
	.ich-listing .ich-section-label{
		background: none;
		color: #000;
		padding: 6px 0;
		border-top: 2px solid #000;
		border-bottom: 1px solid #000;
	}
}

/* ---- Facts & Features (Zillow-style sub-groups) ---- */
.ich-subgroups{
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 22px 36px;
}
.ich-listing .ich-subgroup h3{
	font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ich-ink-soft);
	margin: 0 0 8px;
}
.ich-subgroup ul{
	list-style: none;
	margin: 0;
	padding: 0;
}
.ich-subgroup li{
	font-size: 0.95rem;
	line-height: 1.55;
	padding: 3px 0 3px 14px;
	position: relative;
}
.ich-subgroup li::before{
	content: "";
	position: absolute;
	left: 0;
	top: 0.8em;
	width: 5px;
	height: 5px;
	background: var(--ich-brass);
	border-radius: 50%;
}
.ich-subgroup .ich-k{ color: var(--ich-ink-soft); }
.ich-subgroup a{
	color: var(--ich-accent);
	text-decoration: none;
	border-bottom: 1px solid var(--ich-accent-soft);
}

.ich-map{
	margin-top: 16px;
	border: 1px solid var(--ich-line);
}
.ich-map iframe{ width: 100%; height: 260px; border: 0; display: block; }

/* ---- Sidebar ---- */
.ich-sidebar > div{
	background: var(--ich-card);
	border: 1px solid var(--ich-line);
	padding: 24px;
	margin-bottom: 20px;
}
.ich-sidebar h3{
	font-family: 'Fraunces', Georgia, serif;
	font-size: 1.1rem;
	margin: 0 0 14px;
}
.ich-cta{
	display: block;
	text-align: center;
	background: var(--ich-accent);
	color: #fff;
	padding: 13px 20px;
	text-decoration: none;
	font-size: 0.95rem;
	letter-spacing: 0.01em;
	transition: background-color 0.15s ease;
}
.ich-cta:hover{ background: var(--ich-ink); color: #fff; }

.ich-actions{
	display: flex;
	gap: 10px;
}
.ich-actions button{
	flex: 1;
	background: none;
	border: 1px solid var(--ich-line);
	padding: 10px;
	font-size: 0.85rem;
	color: var(--ich-ink);
	cursor: pointer;
	font-family: inherit;
}
.ich-actions button:hover{ border-color: var(--ich-accent); color: var(--ich-accent); }
.ich-actions button:focus-visible,
.ich-cta:focus-visible{ outline: 2px solid var(--ich-accent); outline-offset: 2px; }

/* ---- Share This Home (1.23.0, inc/listing-share.php) ----
   Quiet outline circles in the ink-soft tone; accent on hover. */
.ich-share{
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.ich-share li{ margin: 0; }
.ich-listing .ich-share-link{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 1px solid var(--ich-line);
	border-radius: 50%;
	background: none;
	color: var(--ich-ink-soft);
	cursor: pointer;
	text-decoration: none;
	transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.ich-listing .ich-share-link:hover{
	color: var(--ich-accent);
	border-color: var(--ich-accent);
	background: none;
}
.ich-listing .ich-share-link:focus-visible{ outline: 2px solid var(--ich-accent); outline-offset: 2px; }
.ich-share-link .ich-icon{ width: 17px; height: 17px; }
.ich-share-copy .ich-icon--check{ display: none; }
.ich-share-copy.is-copied .ich-icon--link{ display: none; }
.ich-share-copy.is-copied .ich-icon--check{ display: block; }
.ich-listing .ich-share-copy.is-copied{ color: var(--ich-accent); border-color: var(--ich-accent); }
.ich-share-note{
	min-height: 1.3em;
	margin: 8px 0 10px;
	font-size: 0.8rem;
	color: var(--ich-ink-soft);
}
.ich-share-note:empty{ margin-bottom: 6px; }
.ich-actions [hidden]{ display: none; }

/* ---- Price change under the price (1.23.0, inc/price-change.php) ----
   Deliberately small and muted: one line, no colour coding beyond a
   brass arrow. */
.ich-price-change{
	margin-top: 2px;
	font-size: 0.82rem;
	letter-spacing: 0.01em;
	color: var(--ich-ink-soft);
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 4px;
	flex-wrap: wrap;
}
.ich-price-change .ich-icon{
	width: 13px;
	height: 13px;
	color: var(--ich-brass);
	flex: none;
}
.ich-price-change-date{ color: var(--ich-ink-soft); opacity: 0.85; }
@media (max-width: 860px){
	.ich-price-change{ justify-content: flex-start; }
}

/* ---- Listing agents ---- */
.ich-agents ul{
	list-style: none;
	margin: 0;
	padding: 0;
}
.ich-agents li{
	padding: 10px 0;
	border-top: 1px solid var(--ich-line);
}
.ich-agents li:first-child{ border-top: none; padding-top: 0; }
.ich-agents li:last-child{ padding-bottom: 0; }
.ich-agent-name{
	display: block;
	font-weight: 500;
}
.ich-agent-brokerage{
	display: block;
	font-size: 0.85rem;
	color: var(--ich-ink-soft);
}
.ich-agent-phone{
	color: var(--ich-accent);
	text-decoration: none;
	font-size: 0.95rem;
}
.ich-agent-phone:hover{ text-decoration: underline; }

.ich-doc-link{
	display: inline-block;
	margin-top: 4px;
	color: var(--ich-accent);
	font-size: 0.95rem;
	text-decoration: none;
	border-bottom: 1px solid var(--ich-accent-soft);
}

@media (prefers-reduced-motion: reduce){
	.ich-cta,
	.ich-listing .ich-media-more,
	.ich-listing .ich-media-all,
	.ich-slide-open img{ transition: none; }
	.ich-slide-open:hover img,
	.ich-slide-open:focus-visible img{ transform: none; }
}

/* ---- Sticky mobile CTA ---- */
.ich-sticky-cta{
	display: none;
}
@media (max-width: 860px){
	.ich-sticky-cta{
		display: flex;
		gap: 10px;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 100;
		background: var(--ich-card);
		border-top: 1px solid var(--ich-line);
		padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
	}
	.ich-sticky-cta a{
		flex: 1;
		display: block;
		text-align: center;
		background: var(--ich-accent);
		color: #fff;
		padding: 14px;
		text-decoration: none;
		font-size: 1rem;
	}
	.ich-body{ padding-bottom: 90px; } /* keep content clear of the fixed bar */
	/* 1.23.0: square Share button beside the main button (two-class
	   selectors so Astra's own button:hover / :focus colours don't win) */
	.ich-sticky-cta .ich-sticky-share{
		flex: none;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 50px;
		padding: 0;
		background: var(--ich-card);
		border: 1px solid var(--ich-line);
		border-radius: 0;
		color: var(--ich-accent);
		cursor: pointer;
	}
	.ich-sticky-cta .ich-sticky-share:hover,
	.ich-sticky-cta .ich-sticky-share:focus{ background: var(--ich-card); color: var(--ich-ink); border-color: var(--ich-accent); }
	.ich-sticky-cta .ich-sticky-share:focus-visible{ outline: 2px solid var(--ich-accent); outline-offset: 2px; }
	.ich-sticky-share .ich-icon{ width: 20px; height: 20px; }
}
@media (min-width: 861px){
	.ich-sticky-share{ display: none; } /* wide screens: the sidebar box has the share buttons */
}
.ich-share-toast{
	position: fixed;
	left: 50%;
	bottom: 96px;
	transform: translate(-50%, 8px);
	z-index: 101;
	background: var(--ich-ink);
	color: #fff;
	font-size: 0.85rem;
	padding: 8px 14px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
}
.ich-share-toast.is-on{ opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce){
	.ich-share-toast,
	.ich-listing .ich-share-link{ transition: none; }
}
