/* =========================================================
   Architect Portfolio — Front End Styles
   ========================================================= */

:root {
	--apg-accent: #b5651d;
	--apg-dark: #1a1f27;
	--apg-text: #232830;
	--apg-muted: #767c88;
	--apg-gap: 30px;
	--apg-transition: 0.5s cubic-bezier(.25,.8,.25,1);
}

.apg-wrap * { box-sizing: border-box; }

.apg-wrap {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Arial, sans-serif;
	color: var(--apg-text);
	max-width: 1320px;
	margin: 0 auto;
	padding: 20px 16px 60px;
}

/* ---------- Toolbar / Tabs (centered) ---------- */
.apg-toolbar {
	display: flex;
	justify-content: center;
	margin-bottom: 40px;
}

.apg-tabs {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 12px;
}

.apg-tab {
	background: transparent;
	border: none;
	color: var(--apg-text);
	font-size: 15px;
	font-weight: 600;
	letter-spacing: .02em;
	padding: 10px 28px;
	cursor: pointer;
	transition: color .25s ease, background .25s ease;
	position: relative;
}
.apg-tab::after {
	content: "";
	position: absolute;
	left: 50%; bottom: 2px;
	width: 0; height: 2px;
	background: var(--apg-accent);
	transition: width .25s ease, left .25s ease;
}
.apg-tab:hover { color: var(--apg-accent); }
.apg-tab.is-active { color: var(--apg-accent); }
.apg-tab.is-active::after { left: 0; width: 100%; }

.apg-tabs-sub {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 36px;
}
.apg-subtab {
	background: transparent;
	border: 1px solid #d6d3cd;
	color: var(--apg-text);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: .02em;
	padding: 9px 22px;
	border-radius: 999px;
	cursor: pointer;
	transition: all .25s ease;
}
.apg-subtab:hover { border-color: var(--apg-accent); color: var(--apg-accent); }
.apg-subtab.is-active { border-color: var(--apg-accent); color: #fff; background: var(--apg-accent); }

/* ---------- Grid ---------- */
.apg-grid {
	display: grid;
	gap: var(--apg-gap);
	grid-template-columns: repeat(3, 1fr);
}
.apg-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.apg-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 900px) {
	.apg-grid.cols-2, .apg-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
	.apg-grid.cols-2, .apg-grid.cols-3 { grid-template-columns: 1fr; }
}

.apg-no-posts { color: var(--apg-muted); font-style: italic; text-align: center; }

/* ---------- Mobile: tabs scroll horizontally instead of wrapping/stacking ---------- */
@media (max-width: 680px) {
	.apg-tabs,
	.apg-tabs-sub {
		flex-wrap: nowrap;
		justify-content: flex-start;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		padding-bottom: 4px;
	}
	.apg-tabs::-webkit-scrollbar,
	.apg-tabs-sub::-webkit-scrollbar { display: none; }

	.apg-tab,
	.apg-subtab {
		white-space: nowrap;
		flex: 0 0 auto;
	}
}

/* ---------- Card — clean image, subtle zoom on hover, no radius ---------- */
.apg-card {
	cursor: pointer;
	position: relative;
}

.apg-card-inner {
	position: relative !important;
	aspect-ratio: 4 / 5;
	overflow: hidden !important;
	background: #eee;
	border-radius: 0 !important;
	box-shadow: none !important;
}

.apg-card-img {
	position: absolute !important;
	top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	object-fit: cover !important;
	border-radius: 0 !important;
	margin: 0 !important;
	transform: scale(1);
	transition: transform .8s cubic-bezier(.25,.8,.25,1);
}
.apg-card:hover .apg-card-img { transform: scale(1.06); }

/* ---------- Modal / popup slider — white, premium ---------- */
.apg-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	align-items: center;
	justify-content: center;
}
.apg-modal.is-open { display: flex; }

.apg-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(20,20,22,.55);
	animation: apgFade .25s ease;
}

.apg-modal-dialog {
	position: relative;
	z-index: 2;
	width: min(1100px, 92vw);
	max-height: 90vh;
	background: #ffffff !important;
	padding: 30px 30px 34px;
	box-shadow: 0 30px 80px rgba(0,0,0,.25);
	border-radius: 0 !important;
	animation: apgPop .3s cubic-bezier(.25,.8,.25,1);
}

.apg-modal-title {
	color: var(--apg-text);
	font-size: 21px;
	font-weight: 700;
	margin: 0 44px 18px 4px;
}

.apg-modal-close {
	position: absolute;
	top: 18px; right: 20px;
	background: #f2f1ee;
	color: var(--apg-text);
	border: none;
	width: 38px; height: 38px;
	border-radius: 50%;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	transition: background .2s ease, color .2s ease;
}
.apg-modal-close:hover { background: var(--apg-accent); color: #fff; }

.apg-slider {
	position: relative;
	width: 100%;
	height: min(66vh, 620px);
	overflow: hidden;
	background: #f7f6f3 !important;
}

.apg-slider-track {
	display: flex;
	height: 100%;
	transition: transform .45s cubic-bezier(.25,.8,.25,1);
}
.apg-slide {
	min-width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}
.apg-slide img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.apg-slider-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255,255,255,.9);
	color: var(--apg-text);
	border: none;
	width: 44px; height: 44px;
	border-radius: 50%;
	font-size: 16px;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0,0,0,.12);
	transition: background .2s ease, color .2s ease;
	z-index: 3;
}
.apg-slider-nav:hover { background: var(--apg-accent); color: #fff; }
.apg-slider-prev { left: 14px; }
.apg-slider-next { right: 14px; }

.apg-slider-dots {
	position: absolute;
	bottom: 14px;
	left: 0; right: 0;
	display: flex;
	justify-content: center;
	gap: 8px;
	z-index: 3;
}
.apg-dot {
	width: 8px; height: 8px;
	border-radius: 50%;
	background: rgba(0,0,0,.2);
	cursor: pointer;
	transition: background .2s ease, transform .2s ease;
}
.apg-dot.is-active { background: var(--apg-accent); transform: scale(1.3); }

@keyframes apgFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes apgPop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }

body.apg-modal-open { overflow: hidden; }
