/**
 * Content Area & Sidebar
 *
 * @package EGCI_Template
 * @since 1.0.0
 */

/* ============================================
   Content Area
   ============================================ */

.posts-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(414px, 1fr));
	gap: 2rem;
	margin-bottom: 2rem;
}

.category .posts-grid {
	grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 768px) {
	.category .posts-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.category .posts-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.post-card {
	background-color: var(--egci-bg-light);
	border-radius: 8px;
	overflow: hidden;
	transition: var(--egci-transition);
}

.post-card__image {
	overflow: hidden;
}

.post-card__image img {
	width: 100%;
	height: 200px;
	object-fit: cover;
	transition: var(--egci-transition);
}

.post-card:hover .post-card__image img {
	transform: scale(1.05);
}

.post-card__content {
	padding: 1.5rem;
}

.post-card__content .entry-header {
	background: transparent;
	padding: 0;
	color: #373737;
	text-align: left;
}

.entry-header {
	position: relative;
	text-align: center;
	padding: 6rem 0;
	margin-bottom: 2rem;
	/* border-radius: 8px; */
	overflow: hidden;

	background-color: #f5f5f5;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.entry-header .sub {
	position: relative;
	z-index: 2;
	font-size: 1.1rem;
	line-height: 1.6;
	max-width: 50%;
	display: block;
	margin: 0 auto;
}

.engagements-subtitle {
	max-width: 800px;
	margin-bottom: 0;
	font-family: "Inter Tight", sans-serif;
	font-weight: 400;
	font-size: 1.05rem;
	line-height: 1.8;
	color: var(--egci-text-light);
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.engagements-subtitle p {
	margin-top: 0;
	margin-bottom: 0.39em;
	color: inherit;
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
}

.engagements-subtitle p:last-child {
	margin-bottom: 0;
}

.post-thumbnail img {
	width: 100%;
}

.content-area.projects-page .contact-grid {
	justify-content: center;
	grid-template-columns: 1fr;
	width: 50%;
}

/* ============================================
   Breadcrumbs
   ============================================ */

.egci-breadcrumbs {
	margin: 0 0 1rem;
	font-size: 0.875rem;
	color: var(--egci-text-light);
}

.egci-breadcrumbs ol {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 0;
}

.egci-breadcrumbs__item {
	display: inline-flex;
	align-items: center;
}

.egci-breadcrumbs__item + .egci-breadcrumbs__item::before {
	content: "›";
	margin: 0 0.6rem;
	opacity: 0.6;
}

.egci-breadcrumbs__link {
	color: inherit;
	text-decoration: none;
}

.egci-breadcrumbs__link:hover {
	opacity: 1;
	text-decoration: underline;
}

.egci-breadcrumbs__current {
	color: var(--egci-text);
	font-weight: 600;
}

/* Breadcrumbs inside hero header (white on overlay) */
.entry-header .egci-breadcrumbs {
	position: relative;
	z-index: 2;
	display: flex;
	/* justify-content: center; */
	color: rgba(255, 255, 255, 0.92);
	/* text-shadow: 0 2px 4px rgba(0, 0, 0, 0.25); */
}

.entry-header .egci-breadcrumbs__current {
	color: #fff;
}

.entry-header .egci-breadcrumbs__item + .egci-breadcrumbs__item::before {
	color: rgba(255, 255, 255, 0.65);
}

.entry-header .egci-breadcrumbs__link {
	color: #fff;
}

.entry-header .egci-breadcrumbs__link:hover {
	color: #fff;
}

.entry-header:not([style*="background-image"]) {
	background-color: #f5f5f5;
}

.entry-header:not([style*="background-image"])::before {
	display: none;
}

.entry-header:not([style*="background-image"]) .entry-title {
	font-size: 3rem;
	margin-bottom: 1rem;
	color: #1a1a1a;
	font-weight: 700;
}

.entry-title a {
	color: var(--egci-text);
	text-decoration: none;
}

.entry-title a:hover {
	color: var(--egci-primary);
	text-decoration: none;
}

.entry-meta {
	font-size: 0.875rem;
	color: var(--egci-text-light);
	margin-bottom: 1rem;
}

.entry-summary {
	color: var(--egci-text-light);
	margin-bottom: 1rem;
}

/* ============================================
   Project Gallery (Single Project)
   ============================================ */
.project-gallery {
	margin-bottom: 2.5rem;
}

.project-gallery__title {
	margin: 0 0 1rem;
	font-size: 1.5rem;
}

.project-gallery__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}

.project-gallery__item {
	display: block;
	/* border-radius: 12px; */
	overflow: hidden;
	background: var(--egci-bg-light);
	border: 1px solid rgba(0, 0, 0, 0.06);
}

.project-gallery__img {
	width: 100%;
	height: 220px;
	object-fit: cover;
	display: block;
	transition: transform 0.25s ease;
}

.project-gallery__item:hover .project-gallery__img {
	transform: scale(1.03);
}

@media (max-width: 992px) {
	.project-gallery__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.project-gallery__img {
		height: 200px;
	}
}

@media (max-width: 576px) {
	.project-gallery__grid {
		grid-template-columns: 1fr;
	}
	.project-gallery__img {
		height: 200px;
	}
}

/* ============================================
   Lightbox (Project Gallery)
   ============================================ */
body.egci-lightbox-open {
	overflow: hidden;
}

.egci-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
}

.egci-lightbox.is-open {
	display: block;
}

.egci-lightbox__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.82);
}

.egci-lightbox__dialog {
	position: absolute;
	inset: 0;
	display: grid;
	grid-template-columns: 56px 1fr 56px;
	align-items: center;
	padding: 18px;
	gap: 12px;
}

.egci-lightbox__stage {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	min-height: 0;
}

.egci-lightbox__img {
	max-width: 100%;
	max-height: 88vh;
	width: auto;
	height: auto;
	border-radius: 12px;
	box-shadow: 0 20px 80px rgba(0, 0, 0, 0.45);
	background: rgba(255, 255, 255, 0.04);
}

.egci-lightbox__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 42px;
	height: 42px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.22);
	background: rgba(0, 0, 0, 0.35);
	color: #fff;
	font-size: 28px;
	line-height: 40px;
	cursor: pointer;
}

.egci-lightbox__nav {
	width: 56px;
	height: 56px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.22);
	background: rgba(0, 0, 0, 0.35);
	color: #fff;
	font-size: 38px;
	line-height: 54px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	user-select: none;
}

.egci-lightbox__nav:hover,
.egci-lightbox__close:hover {
	background: rgba(255, 255, 255, 0.12);
}

@media (max-width: 576px) {
	.egci-lightbox__dialog {
		grid-template-columns: 44px 1fr 44px;
		padding: 12px;
	}
	.egci-lightbox__nav {
		width: 44px;
		height: 44px;
		font-size: 30px;
		line-height: 42px;
	}
	.egci-lightbox__img {
		max-height: 82vh;
		border-radius: 10px;
	}
}

.read-more {
	color: var(--egci-primary);
	font-weight: 600;
}

/* ============================================
   Sidebar
   ============================================ */
.sidebar {
	margin-top: 2rem;
}

.widget {
	margin-bottom: 2rem;
	padding: 1.5rem;
	background-color: var(--egci-bg-light);
	border-radius: 8px;
}

.widget-title {
	font-size: 1.25rem;
	margin-bottom: 1rem;
}
