/**
 * HD Property Types Grid - ported from Portal's categories grid
 * (.ept-prop-cat) to match the original homesinjuneau.com design.
 */

.hd-prop-types {
	display: flex;
	flex-wrap: wrap;
	margin: 0 -15px;
}
.hd-pt-half {
	flex: 0 0 50%;
	max-width: 50%;
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-content: start;
}
.hd-pt-item {
	padding: 15px;
}
.hd-pt-item--big {
	grid-column: span 2;
}

/* simple fallback grid for non-6 tile counts */
.hd-prop-types--simple {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	margin: 0;
}

/* square tile with photo bg + dark overlay (original: #242a35 @ .702) */
.hd-pt-tile {
	position: relative;
	background-size: cover;
	background-position: center;
	border-radius: 3px;
	overflow: hidden;
}
.hd-pt-tile:before {
	content: "";
	display: block;
	padding-top: 100%; /* 1:1 ratio, as the original */
}
.hd-pt-overlay {
	position: absolute;
	inset: 0;
	background-color: #242a35;
	opacity: 0.702;
	transition: background-color .35s ease, opacity .35s ease;
}
.hd-pt-tile:hover .hd-pt-overlay {
	background-color: #16add0; /* accent blue on hover */
	opacity: 0.78;
}

/* animated 1px white border: draws from the corners and meets at the
   middle of each side, inset 20px from the tile edge */
.hd-pt-tile:after {
	content: "";
	position: absolute;
	inset: 20px;
	pointer-events: none;
	z-index: 1;
	background-image:
		linear-gradient(#fff, #fff), linear-gradient(#fff, #fff),
		linear-gradient(#fff, #fff), linear-gradient(#fff, #fff),
		linear-gradient(#fff, #fff), linear-gradient(#fff, #fff),
		linear-gradient(#fff, #fff), linear-gradient(#fff, #fff);
	background-position:
		left top, right top,        /* top side halves */
		left bottom, right bottom,  /* bottom side halves */
		left top, left bottom,      /* left side halves */
		right top, right bottom;    /* right side halves */
	background-repeat: no-repeat;
	background-size: 0 1px, 0 1px, 0 1px, 0 1px, 1px 0, 1px 0, 1px 0, 1px 0;
	transition: background-size .5s ease;
}
.hd-pt-tile:hover:after {
	background-size: 51% 1px, 51% 1px, 51% 1px, 51% 1px, 1px 51%, 1px 51%, 1px 51%, 1px 51%;
}

.hd-pt-content {
	position: absolute;
	z-index: 1;
	color: #fff;
	top: 50%;
	transform: translateY(-50%);
	text-align: center;
	margin: auto;
	left: 0;
	right: 0;
	padding: 0 15px;
}
.hd-pt-content h3 {
	color: #fff;
	margin: 0 0 6px;
	font-size: 22px;
	line-height: 1.3;
}
.hd-pt-item--big .hd-pt-content h3 {
	font-size: 28px;
}
.hd-pt-desc {
	display: block;
	text-align: center;
	margin-bottom: 15px;
	font-size: 14px;
	opacity: 0.9;
}

/* ghost button, revealed on hover (original behavior) */
.hd-pt-btn {
	display: inline-block;
	visibility: hidden;
	background: transparent;
	color: #fff;
	border: 1px solid #fff;
	border-radius: 3px;
	font-size: 14px;
	line-height: 1.2;
	padding: 8px 18px;
	text-decoration: none;
	position: relative;
	z-index: 2;
	transition: background .2s ease;
}
.hd-pt-tile:hover .hd-pt-btn {
	visibility: visible;
}
.hd-pt-btn:hover {
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
}

/* whole tile clickable */
.hd-pt-cover {
	position: absolute;
	inset: 0;
	z-index: 1;
}

@media (max-width: 767px) {
	.hd-pt-half {
		flex: 0 0 100%;
		max-width: 100%;
	}
}
