/* Single property */

.property {
	max-width: var(--wrap);
	margin-inline: auto;
	padding: 4rem 1rem 0;
	color: var(--green);
}

.property__back {
	display: inline-flex;
	align-items: center;

	&:hover {
		text-decoration: underline;
	}

	.tag {
		padding-left: 0.5rem;
		font-size: 10px;
	}

	svg path {
		fill: var(--green);
	}
}

.property__title {
	justify-content: space-between;
	gap: 2rem;
	padding: 1.5rem 0 3rem;

	@media (min-width: 1024px) {
		display: flex;
	}

	h1 {
		padding-bottom: 0.5rem;
		font-size: 1.5rem;
		line-height: 2rem;
		font-weight: 600;

		@media (min-width: 1024px) {
			font-size: 1.875rem;
			line-height: 2.25rem;
		}

		@media (min-width: 1280px) {
			font-size: 2.25rem;
			line-height: 2.5rem;
		}
	}

	address {
		font-size: 1rem;

		@media (min-width: 1024px) {
			font-size: 1.125rem;
		}

		@media (min-width: 1280px) {
			font-size: 1.5rem;
		}
	}
}

.property__price {
	flex-shrink: 0;
	padding-top: 2.5rem;

	@media (min-width: 768px) {
		text-align: right;
	}

	@media (min-width: 1024px) {
		padding-top: 0;
	}
}

.property__price-value {
	padding-bottom: 0.5rem;
	font-size: 1.5rem;
	line-height: 2rem;
	font-weight: 600;

	@media (min-width: 1024px) {
		font-size: 1.875rem;
		line-height: 2.25rem;
	}

	@media (min-width: 1280px) {
		font-size: 2.25rem;
		line-height: 2.5rem;
	}
}

.property__price-label {
	font-size: 1rem;

	@media (min-width: 1024px) {
		font-size: 1.125rem;
	}

	@media (min-width: 1280px) {
		font-size: 1.5rem;
	}
}

.property__jump {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	margin-bottom: 2.5rem;
	background-color: var(--offwhite);
	border-color: var(--sage);

	@media (min-width: 768px) {
		flex-wrap: nowrap;
		border-bottom-width: 2px;
	}

	a {
		display: flex;
		align-items: center;
		gap: 0.5rem;
		width: 50%;
		padding-block: 0.75rem;
		color: var(--sage);

		@media (min-width: 768px) {
			justify-content: center;
			width: 100%;
		}

		&:hover,
		&:focus-visible {
			margin-bottom: -0.25rem;
			border-bottom: 4px solid var(--green);
			color: var(--green);

			path {
				fill: var(--green);
			}
		}
	}

	.tag {
		font-size: 10px;

		@media (min-width: 1024px) {
			font-size: 0.75rem;
		}
	}
}

.property__layout {
	position: relative;
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: 1.25rem;
	min-height: 100vh;
	padding-bottom: 6rem;

	@media (min-width: 1024px) {
		padding-bottom: 0;
	}
}

.property__main {
	grid-column: span 12 / span 12;
	width: 100%;

	@media (min-width: 1024px) {
		grid-column: span 7 / span 7;
	}

	@media (min-width: 1280px) {
		grid-column: span 8 / span 8;
	}
}

/* Gallery */

.property__gallery {
	padding-bottom: 4rem;
}

.property__slides {
	margin-bottom: 1rem;

	img {
		width: 100%;
		height: 300px;
		object-fit: cover;

		@media (min-width: 768px) {
			height: 600px;
		}
	}

	a {
		display: block;
		cursor: zoom-in;
	}

	.splide__arrow {
		position: absolute;
		top: 50%;
		z-index: 1;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 2.5rem;
		height: 2.5rem;
		padding: 0.5rem;
		border-radius: 50%;
		background: rgb(255 255 255 / 0.8);
		opacity: 0.8;
		transform: translateY(-50%);

		&:hover {
			opacity: 1;
		}

		svg {
			width: 1.2em;
			height: 1.2em;
			fill: var(--green);
		}
	}

	.splide__arrow--prev {
		left: 1em;

		svg {
			transform: scaleX(-1);
		}
	}

	.splide__arrow--next {
		right: 1em;
	}
}

.property__thumbs {
	.splide__slide {
		cursor: pointer;
		opacity: 0.85;

		&.is-active {
			opacity: 1;
			outline: 2px solid var(--green);
			outline-offset: -2px;
		}
	}

	img {
		width: 100%;
		height: 120px;
		object-fit: cover;
	}
}

/* Content sections */

.property__section {
	max-width: 900px;
	padding-bottom: 3rem;
	scroll-margin-top: 10rem;

	h2 {
		padding-bottom: 1.25rem;
		font-size: 2.25rem;
		line-height: 2.5rem;
	}

	&#map-section {
		padding-bottom: 4rem;
	}
}

.property__facts {
	& > div {
		display: grid;
		padding-block: 1rem;
		border-bottom: 2px solid var(--sage);

		@media (min-width: 640px) {
			grid-template-columns: repeat(2, minmax(0, 1fr));
		}
	}

	dt,
	dd {
		font-size: 1.25rem;
		line-height: 1.75rem;

		@media (min-width: 1280px) {
			font-size: 1.5rem;
			line-height: 2rem;
		}
	}

	dt {
		padding-bottom: 0.5rem;
		font-weight: 600;

		@media (min-width: 640px) {
			padding-bottom: 0;
		}
	}
}

.property__summary {
	white-space: pre-line;
}

.property__bullets {
	margin-left: 1rem;
	list-style: disc;

	li {
		padding-bottom: 0.5rem;
	}
}

.property__doc {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	margin-bottom: 1.5rem;
	padding: 0.75rem;
	background-color: var(--green-mid);
	font-family: var(--font-label);
	font-size: 10px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--offwhite);
	transition: background-color 0.15s;
	overflow-wrap: anywhere;

	@media (min-width: 1280px) {
		font-size: 0.75rem;
	}

	&:hover {
		background-color: var(--green);
	}

	svg {
		flex-shrink: 0;
	}

	svg path {
		fill: var(--offwhite);
	}
}

.property__map {
	width: 100%;
	height: 300px;

	@media (min-width: 1024px) {
		height: 600px;
	}
}

/* Broker sidebar */

.property__aside {
	grid-column: span 12 / span 12;

	@media (min-width: 1024px) {
		grid-column: span 5 / span 5;
	}

	@media (min-width: 1280px) {
		grid-column: span 4 / span 4;
	}
}

.broker-card {
	z-index: 3;
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: 1rem;
	margin-inline: -1.5rem;
	padding: 1.5rem;
	background-color: var(--offwhite);

	@media (min-width: 1024px) {
		position: sticky;
		top: 8rem;
	}

	&.broker-card--lead {
		z-index: 4;
	}
}

.broker-card__photo {
	grid-column: span 12 / span 12;
	width: 100%;
	height: 400px;
	clip-path: var(--cut-hex);

	@media (min-width: 640px) {
		grid-column: span 5 / span 5;
		height: 20rem;
	}

	@media (min-width: 1024px) {
		grid-column: span 4 / span 4;
		height: 10rem;
	}
}

.broker-card__meta {
	/* Full width on phones (the photo sits on its own row above). */
	grid-column: span 12 / span 12;

	@media (min-width: 640px) {
		grid-column: span 7 / span 7;
	}

	@media (min-width: 1024px) {
		grid-column: span 8 / span 8;
	}
}

.broker-card__name {
	font-size: 1.5rem;
	line-height: 2rem;
	font-weight: 600;

	@media (min-width: 1024px) {
		font-size: 1.125rem;
		line-height: 1.75rem;
	}

	@media (min-width: 1280px) {
		font-size: 1.5rem;
		line-height: 2rem;
	}

	a:hover {
		text-decoration: underline;
	}
}

.broker-card__company {
	padding-bottom: 1rem;
	font-size: 1rem;

	@media (min-width: 1024px) {
		font-size: 0.875rem;
	}

	@media (min-width: 1280px) {
		font-size: 1rem;
	}
}

.broker-card__contact {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding-bottom: 0.5rem;
	font-size: 1rem;
	overflow-wrap: anywhere;

	@media (min-width: 1024px) {
		font-size: 0.875rem;
	}

	@media (min-width: 1280px) {
		font-size: 1rem;
	}

	&:hover {
		text-decoration: underline;
	}

	svg {
		flex-shrink: 0;
	}
}

.property__share-links {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem 0 2rem;

	a:hover path {
		fill: var(--green-dark);
	}
}

.property__aside-heading {
	padding-bottom: 1rem;
	font-size: 1.5rem;
	line-height: 2rem;
	font-weight: 200;

	&.property__aside-heading--small {
		padding-bottom: 0;
		font-size: 1rem;
		font-weight: 400;
	}
}
