/**
 * RaleighMag Blog Posts grid
 */

.raleighmag-blog-posts-wrap {
	max-width: 100%;
	overflow: visible;
}

.raleighmag-blog-posts {
	--rmbp-text: #444444;
	--rmbp-muted: #999999;
	--rmbp-white: #ffffff;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 28px 24px;
	max-width: 100%;
	box-sizing: border-box;
	overflow: visible;
}

.raleighmag-blog-posts *,
.raleighmag-blog-posts *::before,
.raleighmag-blog-posts *::after {
	box-sizing: inherit;
}

.raleighmag-blog-posts__empty {
	margin: 0;
	font-family: "Open Sans", sans-serif;
	font-size: 14px;
	color: var(--rmbp-text);
}

.raleighmag-post-card {
	position: relative;
	display: flex;
	flex-direction: column;
	text-align: center;
	background: var(--rmbp-white);
	overflow: visible;
	min-width: 0;
}

/* Featured image area */
.raleighmag-post-image {
	position: relative;
	overflow: visible;
	isolation: isolate;
}

.raleighmag-post-image__link {
	position: relative;
	display: block;
	text-decoration: none;
	color: inherit;
	z-index: 1;
	pointer-events: auto;
}

.raleighmag-post-image__clip {
	display: block;
	position: relative;
	overflow: hidden;
	aspect-ratio: 3 / 4;
	clip-path: polygon(0 0, 100% 0, 100% calc(100% - 36px), calc(100% - 36px) 100%, 0 100%);
	background: #1a1a1a;
}

/* Bottom-right folded page corner (white dog-ear) */
.raleighmag-post-image__corner {
	position: absolute;
	right: 0;
	bottom: 0;
	width: 36px;
	height: 36px;
	pointer-events: none;
	z-index: 4;
}

.raleighmag-post-image__corner::before {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	background: var(--rmbp-white);
	clip-path: polygon(100% 0, 100% 100%, 0 100%);
	box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.08);
}

.raleighmag-post-image__corner::after {
	content: "";
	position: absolute;
	right: 1px;
	bottom: 1px;
	width: calc(100% - 2px);
	height: calc(100% - 2px);
	border-left: 1px solid rgba(0, 0, 0, 0.08);
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

.raleighmag-post-image__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 280px;
	background: linear-gradient(145deg, #2a2a2a 0%, #111111 100%);
}

.raleighmag-post-image__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(1.01);
	transition: transform 0.45s ease;
}

.raleighmag-post-image__link:hover .raleighmag-post-image__img,
.raleighmag-post-image__link:focus-visible .raleighmag-post-image__img {
	transform: scale(1.03);
}

/* Hover #1 — centered link icon overlay (image only) */
.raleighmag-link-overlay {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	margin: -26px 0 0 -26px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
	color: var(--rmbp-white);
	opacity: 0;
	visibility: hidden;
	transform: scale(0.92);
	transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
	pointer-events: none;
}

.raleighmag-link-overlay__svg {
	display: block;
	width: 22px;
	height: 22px;
}

.raleighmag-post-image__link:hover .raleighmag-link-overlay,
.raleighmag-post-image__link:focus-visible .raleighmag-link-overlay {
	opacity: 1;
	visibility: visible;
	transform: scale(1);
}

/* Share control — unified panel (button + menu = one hover area) */
.raleighmag-share-wrap {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 10;
	overflow: visible;
	pointer-events: auto;
}

.raleighmag-share-panel {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	position: relative;
	min-width: 44px;
	background: rgba(0, 0, 0, 0.55);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.raleighmag-share-panel::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 14px;
	height: 14px;
	background: rgba(0, 0, 0, 0.28);
	clip-path: polygon(0 0, 100% 0, 0 100%);
	pointer-events: none;
	z-index: 1;
}

.raleighmag-share {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--rmbp-white);
	cursor: pointer;
	overflow: visible;
	flex-shrink: 0;
	transition: background-color 0.2s ease;
}

.raleighmag-share:hover,
.raleighmag-share:focus-visible {
	background: rgba(255, 255, 255, 0.08);
	outline: none;
}

.raleighmag-share__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	overflow: visible;
	position: relative;
	z-index: 2;
}

.raleighmag-share__svg {
	display: block;
	width: 20px;
	height: 20px;
	overflow: visible;
}

/* Share menu — expands inside the same panel, no gap */
.raleighmag-share-menu {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	max-height: 0;
	overflow: hidden;
	opacity: 0;
	visibility: hidden;
	transition: max-height 0.25s ease, opacity 0.2s ease, visibility 0.2s ease;
}

.raleighmag-share-panel:hover .raleighmag-share-menu,
.raleighmag-share-panel:focus-within .raleighmag-share-menu,
.raleighmag-share-panel.is-open .raleighmag-share-menu {
	max-height: 260px;
	opacity: 1;
	visibility: visible;
}

.raleighmag-share-menu__link {
	display: block;
	width: 100%;
	padding: 9px 14px;
	border: 0;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	background: transparent;
	color: var(--rmbp-white);
	font-family: "Open Sans", sans-serif;
	font-weight: 600;
	font-size: 12px;
	line-height: 1.3;
	letter-spacing: 0.02em;
	text-align: left;
	text-decoration: none;
	text-transform: none;
	cursor: pointer;
	white-space: nowrap;
	transition: background-color 0.15s ease;
}

.raleighmag-share-menu__link:hover,
.raleighmag-share-menu__link:focus-visible {
	background: rgba(255, 255, 255, 0.12);
	outline: none;
	text-decoration: none;
	color: var(--rmbp-white);
}

.raleighmag-share-menu__link--disabled {
	opacity: 0.45;
	cursor: default;
	pointer-events: none;
}

.raleighmag-blog-posts a.raleighmag-share-menu__link {
	text-decoration: none;
}

.raleighmag-blog-posts a.raleighmag-share-menu__link:hover,
.raleighmag-blog-posts a.raleighmag-share-menu__link:focus,
.raleighmag-blog-posts a.raleighmag-share-menu__link:focus-visible {
	text-decoration: none;
}

/* Card body */
.raleighmag-post-card__body {
	padding: 18px 8px 0;
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.raleighmag-post-card__date {
	margin: 0 0 8px;
	font-family: "Open Sans", sans-serif;
	font-style: italic;
	font-weight: 600;
	font-size: 13px;
	line-height: 16px;
	color: rgb(153, 153, 153);
	text-decoration: none;
	text-transform: uppercase;
}

.raleighmag-post-card__date:hover,
.raleighmag-post-card__date:focus-visible {
	color: rgb(120, 120, 120);
	text-decoration: none;
}

.raleighmag-post-card__title {
	margin: 0 0 14px;
	max-width: 100%;
	font-family: "Raleway", sans-serif;
	font-weight: 600;
	font-size: 18px;
	line-height: 26px;
	color: var(--rmbp-text);
	text-align: center;
	text-transform: uppercase;
	word-wrap: break-word;
	overflow-wrap: break-word;
}

.raleighmag-post-card__title-link {
	color: inherit;
	text-decoration: none;
}

.raleighmag-post-card__title-link:hover,
.raleighmag-post-card__title-link:focus-visible {
	text-decoration: none;
	color: inherit;
}

/* Bottom metadata row */
.raleighmag-post-card__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	max-width: 100%;
	padding: 0 4px 4px;
	margin-top: auto;
}

.raleighmag-post-card__comments {
	font-family: "Open Sans", sans-serif;
	font-weight: 600;
	font-size: 13px;
	color: var(--rmbp-text);
	text-decoration: none;
	text-transform: uppercase;
}

.raleighmag-blog-posts a.raleighmag-post-card__date,
.raleighmag-blog-posts a.raleighmag-post-card__title-link,
.raleighmag-blog-posts a.raleighmag-post-card__comments {
	text-decoration: none;
}

.raleighmag-blog-posts a.raleighmag-post-card__date:hover,
.raleighmag-blog-posts a.raleighmag-post-card__date:focus,
.raleighmag-blog-posts a.raleighmag-post-card__date:focus-visible,
.raleighmag-blog-posts a.raleighmag-post-card__title-link:hover,
.raleighmag-blog-posts a.raleighmag-post-card__title-link:focus,
.raleighmag-blog-posts a.raleighmag-post-card__title-link:focus-visible,
.raleighmag-blog-posts a.raleighmag-post-card__comments:hover,
.raleighmag-blog-posts a.raleighmag-post-card__comments:focus,
.raleighmag-blog-posts a.raleighmag-post-card__comments:focus-visible {
	text-decoration: none;
}

.raleighmag-post-card__comments:hover,
.raleighmag-post-card__comments:focus-visible {
	text-decoration: none;
	color: var(--rmbp-text);
}

.raleighmag-post-card__likes {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--rmbp-muted);
	font-family: "Open Sans", sans-serif;
	font-size: 13px;
	line-height: 1;
}

.raleighmag-post-card__heart {
	display: inline-block;
	font-size: 15px;
	line-height: 1;
	font-weight: 400;
}

.raleighmag-post-card__like-count {
	font-weight: 400;
}

.raleighmag-blog-posts__load-more-wrap {
	display: flex;
	justify-content: center;
	padding: 28px 0 8px;
	margin-top: 4px;
}

.raleighmag-blog-posts__load-more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 160px;
	padding: 12px 28px;
	border: 1px solid var(--rmbp-text);
	border-radius: 0;
	background: transparent;
	color: var(--rmbp-text);
	font-family: "Open Sans", sans-serif;
	font-weight: 600;
	font-size: 13px;
	line-height: 1;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.raleighmag-blog-posts__load-more:hover,
.raleighmag-blog-posts__load-more:focus-visible {
	background: var(--rmbp-text);
	color: var(--rmbp-white);
	outline: none;
}

.raleighmag-blog-posts__load-more:disabled {
	opacity: 0.6;
	cursor: wait;
}

@media (max-width: 1100px) {
	.raleighmag-blog-posts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px 20px;
	}
}

@media (max-width: 600px) {
	.raleighmag-blog-posts {
		grid-template-columns: 1fr;
		gap: 22px;
	}

	.raleighmag-post-image__clip {
		aspect-ratio: 10 / 12;
	}
}

@media print {
	.raleighmag-share-wrap,
	.raleighmag-share-panel,
	.raleighmag-link-overlay {
		display: none !important;
	}
}
