/* Matches the Elementor kit: secondary #29323B, text #7A7A7A, primary #FFDFBE; Montserrat headings, Proxima Nova body. */
.ebg-portfolio {
	--ebg-dark: #29323B;
	--ebg-text: #7A7A7A;
	--ebg-accent: #FFDFBE;
	--ebg-orange: #e98a26;
	font-family: "Proxima Nova", Sans-serif;
	color: var(--ebg-text);
	padding: 4% 10%;
	box-sizing: border-box;
}
.ebg-portfolio *, .ebg-portfolio *::before, .ebg-portfolio *::after { box-sizing: border-box; }
.ebg-portfolio a { text-decoration: none; }

/* Filter */
.ebg-filter { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-bottom: 50px; }
.ebg-filter__btn {
	font-family: "Montserrat", Sans-serif;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--ebg-orange) !important;
	padding: 4px 0;
	border-bottom: 2px solid transparent;
	transition: color .2s, border-color .2s;
}
.ebg-filter__btn:hover { color: var(--ebg-dark) !important; }
.ebg-filter__btn.is-active { border-bottom-color: var(--ebg-accent); }

/* Archive sections + grid */
.ebg-section { margin-bottom: 20px; }
.ebg-section[hidden], .ebg-card[hidden], .ebg-empty[hidden] { display: none; }
.ebg-section__title {
	font-family: "Montserrat", Sans-serif;
	font-size: 20px;
	font-weight: 400;
	text-transform: uppercase;
	color: var(--ebg-dark);
	margin: 0 0 24px;
}
.ebg-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 30px; }
.ebg-card { padding-bottom: 60px; }
.ebg-card__link { display: block; color: var(--ebg-dark); }
.ebg-card__media { display: block; position: relative; padding-bottom: 60%; overflow: hidden; background: #f2f2f2; }
.ebg-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ebg-card__media::after { content: ""; position: absolute; inset: 0; background: rgba(41, 50, 59, .15); opacity: 0; transition: opacity .3s; }
.ebg-card__link:hover .ebg-card__media::after { opacity: 1; }
.ebg-card__title { font-family: "Proxima Nova", Sans-serif; font-size: 20px; font-weight: 400; text-transform: none; color: var(--ebg-dark); margin: 14px 0 0; }
.ebg-card__cats { display: block; margin-top: 4px; font-size: 13px; letter-spacing: .04em; color: var(--ebg-orange) !important; }
.ebg-empty { color: var(--ebg-dark); }

/* Single + archive: override Hello Elementor's .site-main width cap so pages match the original (~1300px wide) */
.ebg-portfolio.ebg-single, .ebg-portfolio.ebg-archive { width: min(1300px, 90%); max-width: none; margin-inline: auto; padding: 4% 0; }

/* Single: hero */
.ebg-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 90px; margin-bottom: 60px; }
.ebg-hero__text { flex: 0 1 38%; }
.ebg-hero__media { flex: 0 1 650px; margin-left: auto; }
.ebg-hero__media img { display: block; width: 100%; height: 500px; object-fit: cover; }
.ebg-hero__status { font-family: "Montserrat", Sans-serif; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--ebg-text); margin: 0 0 10px; }
.ebg-hero__title { font-family: "Montserrat", Sans-serif; font-size: 30px; font-weight: 400; text-transform: none; color: var(--ebg-dark); margin: 0 0 12px; line-height: 1.2; }
.ebg-hero__cats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.ebg-hero__cats li + li::before { content: ""; display: inline-block; width: 1px; height: 14px; background: #ddd; margin: 0 12px; vertical-align: middle; }
.ebg-hero__cats a { color: var(--ebg-orange) !important; font-size: 14px; }
.ebg-hero__cats a:hover { color: var(--ebg-dark) !important; }
.ebg-video { position: relative; width: 100%; padding-bottom: 56.25%; background: #000; }
.ebg-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Single: description + gallery */
.ebg-description { margin-top: 24px; font-size: 16px; line-height: 1.7; }
.ebg-description p { margin: 0 0 1em; }
.ebg-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 50px; margin-bottom: 40px; }
.ebg-gallery__item { display: block; overflow: hidden; }
.ebg-gallery__item img { display: block; width: 100%; height: auto; transition: transform .4s; }
.ebg-gallery__item:hover img { transform: scale(1.03); }
.ebg-back { margin-top: 30px; }
.ebg-back a { font-family: "Montserrat", Sans-serif; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--ebg-dark); }
.ebg-back a:hover { color: var(--ebg-text); }

/* Lightbox */
.ebg-lb { position: fixed; inset: 0; z-index: 99999; background: rgba(20, 24, 28, .94); display: flex; align-items: center; justify-content: center; }
.ebg-lb img { max-width: 92vw; max-height: 88vh; display: block; }
.ebg-lb button { position: absolute; background: none; border: 0; color: #fff; font-size: 40px; line-height: 1; cursor: pointer; padding: 16px; }
.ebg-lb__close { top: 6px; right: 10px; }
.ebg-lb__prev { left: 6px; top: 50%; transform: translateY(-50%); }
.ebg-lb__next { right: 6px; top: 50%; transform: translateY(-50%); }

@media (max-width: 1024px) {
	.ebg-hero { gap: 40px; }
	.ebg-gallery { gap: 24px; }
}
@media (max-width: 767px) {
	.ebg-portfolio { padding: 8% 6%; }
	.ebg-portfolio.ebg-single, .ebg-portfolio.ebg-archive { width: 88%; padding: 8% 0; }
	.ebg-grid, .ebg-gallery { grid-template-columns: 1fr; }
	.ebg-grid { gap: 0; }
	.ebg-card { padding-bottom: 40px; }
	.ebg-hero { flex-direction: column; align-items: stretch; gap: 24px; }
	.ebg-hero__text { flex: none; }
	.ebg-hero__media { flex: none; max-width: none; width: 100%; }
	.ebg-hero__media img { height: auto; max-height: 420px; }
}
