/* ===========================================================
   Portfolio Dev by M.Salman — Single Portfolio Page
   Modern, professional, IT-company look.
   =========================================================== */

.pdms-single-wrap {
	--pdms-accent: #02e3a7;
	--pdms-dark: #13144d;
	--pdms-hero-top: 13rem; /* space above badge/title so the overlay header never covers it */
	font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
	background: #ffffff;
	overflow-x: hidden;
}

.pdms-single-wrap * {
	box-sizing: border-box;
}

.pdms-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
}

/* ---------- Hero ----------
   margin-top pulls the hero up behind a transparent theme header;
   padding-top keeps the badge/title clear of the header's nav bar. */
.pdms-hero {
	position: relative;
	background: var(--pdms-dark);
	margin-top: -80px;
	padding: var(--pdms-hero-top, 13rem) 0 130px;
	overflow: hidden;
}

.pdms-hero-bg {
	position: absolute;
	inset: 0;
	background-image:
		radial-gradient(circle at 88% 15%, rgba(2,227,167,0.30), transparent 45%),
		radial-gradient(circle at 8% 85%, rgba(2,227,167,0.12), transparent 40%),
		radial-gradient(rgba(255,255,255,0.06) 1.5px, transparent 1.5px);
	background-size: auto, auto, 22px 22px;
}

.pdms-hero-inner {
	position: relative;
	z-index: 1;
}

.pdms-badge {
	display: inline-block;
	text-transform: uppercase;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 1.2px;
	color: var(--pdms-accent);
	background: rgba(2,227,167,0.14);
	border: 1px solid rgba(2,227,167,0.3);
	padding: 8px 18px;
	border-radius: 30px;
	margin-bottom: 24px;
}

.pdms-title {
	color: #ffffff;
	font-size: 46px;
	font-weight: 800;
	line-height: 1.2;
	max-width: 820px;
	margin: 0 0 36px 0;
}

.pdms-hero-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 48px;
}

.pdms-hero-meta-item {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.pdms-hero-meta-label {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 1px;
	font-weight: 600;
	color: rgba(255,255,255,0.55);
}

.pdms-hero-meta-value {
	font-size: 16px;
	font-weight: 700;
	color: #ffffff;
}

.pdms-hero-tech-icons {
	display: flex;
	gap: 12px;
}

.pdms-tech-icon {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 14px rgba(0,0,0,0.18);
	overflow: hidden;
	flex-shrink: 0;
}

.pdms-tech-icon img {
	width: 60%;
	height: 60%;
	object-fit: contain;
}

/* ---------- Featured image (overlaps hero) ---------- */
.pdms-featured-wrap {
	margin-top: -90px;
	position: relative;
	z-index: 2;
	border-radius: 22px;
	overflow: hidden;
	box-shadow: 0 30px 70px rgba(19,20,77,0.25);
	background: #000;
}

.pdms-featured-img {
	width: 100%;
	max-height: 560px;
	object-fit: cover;
	display: block;
}

/* ---------- Body grid ---------- */
.pdms-body-grid {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 60px;
	padding: 60px 0 20px;
}

.pdms-description {
	font-size: 16px;
	line-height: 1.9;
	color: #454a5e;
}

.pdms-description p {
	margin: 0 0 20px 0;
}

.pdms-description h2,
.pdms-description h3 {
	color: var(--pdms-dark);
	font-weight: 700;
	margin: 30px 0 14px 0;
}

.pdms-sidebar {
	position: relative;
}

.pdms-sidebar-card {
	background: #f6f7fb;
	border-radius: 20px;
	padding: 34px;
	position: sticky;
	top: 30px;
}

.pdms-sidebar-row {
	margin-bottom: 26px;
}

.pdms-sidebar-row:last-of-type {
	margin-bottom: 30px;
}

.pdms-sidebar-label {
	display: block;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 1px;
	font-weight: 700;
	color: #9296a8;
	margin-bottom: 8px;
}

.pdms-sidebar-value {
	font-size: 17px;
	font-weight: 700;
	color: var(--pdms-dark);
}

.pdms-cta-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	background: var(--pdms-dark);
	color: #ffffff !important;
	font-weight: 700;
	font-size: 14px;
	padding: 16px 20px;
	border-radius: 50px;
	text-decoration: none !important;
	transition: background .25s ease, transform .25s ease;
}

.pdms-cta-btn:hover {
	background: var(--pdms-accent);
	color: var(--pdms-dark) !important;
	transform: translateY(-2px);
}

/* ---------- Section headings ---------- */
.pdms-section-heading {
	font-size: 28px;
	font-weight: 800;
	color: var(--pdms-dark);
	margin: 0 0 30px 0;
}

/* ---------- Gallery — 2 images per row, each card auto-fits its image ---------- */
.pdms-gallery-section {
	padding: 50px 0;
	border-top: 1px solid #ececf3;
}

.pdms-gallery-stack {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	gap: 26px;
	align-items: start; /* each card takes its own image's height */
}

.pdms-gallery-stack > .pdms-gallery-frame {
	width: 100% !important;
	max-width: 100% !important;
	float: none !important;
	margin: 0 !important;
}

.pdms-gallery-frame {
	width: 100%;
	height: auto !important;
	aspect-ratio: auto !important;
	line-height: 0;
	border-radius: 18px;
	overflow: hidden;
	background: #f1f2f8;
	box-shadow: 0 16px 40px rgba(19,20,77,0.10);
	opacity: 0;
	transform: translateY(26px);
	transition: opacity .6s ease, transform .6s ease;
}

.pdms-gallery-frame.pdms-in-view {
	opacity: 1;
	transform: translateY(0);
}

.pdms-gallery-frame img {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
	max-height: none !important;
	object-fit: contain;
	margin: 0 !important;
	cursor: zoom-in;
	transition: transform .5s ease;
}

.pdms-gallery-frame:hover img {
	transform: scale(1.03);
}

/* ---------- Related Portfolio ---------- */
.pdms-related-section {
	padding: 50px 0 90px;
	border-top: 1px solid #ececf3;
}

.pdms-related-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 26px;
}

.pdms-related-card {
	display: block;
	text-decoration: none !important;
	background: #ffffff;
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 10px 30px rgba(19,20,77,0.08);
	transition: transform .25s ease, box-shadow .25s ease;
}

.pdms-related-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 18px 40px rgba(19,20,77,0.14);
}

.pdms-related-img-wrap {
	width: 100%;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: #f0f1f6;
}

.pdms-related-img-wrap img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.pdms-related-body {
	padding: 20px 22px;
}

.pdms-related-category {
	display: inline-block;
	text-transform: uppercase;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .6px;
	color: var(--pdms-accent);
	margin-bottom: 8px;
}

.pdms-related-title {
	font-size: 17px;
	font-weight: 700;
	color: var(--pdms-dark);
	margin: 0;
	line-height: 1.4;
}

/* ---------- Lightbox ---------- */
.pdms-lightbox {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(10,10,25,0.92);
	z-index: 99999;
	align-items: center;
	justify-content: center;
	padding: 30px;
}

.pdms-lightbox.active {
	display: flex;
}

.pdms-lightbox img {
	max-width: 90%;
	max-height: 88vh;
	border-radius: 12px;
	box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}

.pdms-lightbox-close {
	position: absolute;
	top: 26px;
	right: 36px;
	color: #fff;
	font-size: 38px;
	cursor: pointer;
	line-height: 1;
	opacity: .8;
	transition: opacity .2s ease;
}

.pdms-lightbox-close:hover {
	opacity: 1;
}

/* ===================== Responsive ===================== */
@media (max-width: 1024px) {
	.pdms-single-wrap {
		--pdms-hero-top: 11rem;
	}
	.pdms-title {
		font-size: 36px;
	}
	.pdms-body-grid {
		grid-template-columns: 1fr;
	}
	.pdms-sidebar-card {
		position: static;
	}
	.pdms-related-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.pdms-single-wrap {
		--pdms-hero-top: 9.5rem;
	}
	.pdms-hero {
		margin-top: -60px;
		padding: var(--pdms-hero-top, 9.5rem) 0 90px;
	}
	.pdms-title {
		font-size: 28px;
	}
	.pdms-hero-meta {
		gap: 26px;
	}
	.pdms-featured-wrap {
		margin-top: -60px;
		border-radius: 16px;
	}
	.pdms-gallery-stack {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 12px;
	}
	.pdms-gallery-frame {
		border-radius: 12px;
	}
	.pdms-related-grid {
		grid-template-columns: 1fr;
	}
	.pdms-section-heading {
		font-size: 22px;
	}
	.pdms-lightbox-close {
		top: 14px;
		right: 20px;
		font-size: 30px;
	}
}

/* ===================== Extra mobile polish ===================== */
@media (max-width: 480px) {
	.pdms-single-wrap {
		--pdms-hero-top: 9rem;
	}
	.pdms-container {
		padding: 0 16px;
	}
	.pdms-hero {
		padding: var(--pdms-hero-top, 9rem) 0 80px;
	}
	.pdms-title {
		font-size: 24px;
		margin-bottom: 26px;
	}
	.pdms-hero-meta {
		gap: 18px 24px;
	}
	.pdms-gallery-section {
		padding: 36px 0;
	}
	.pdms-gallery-stack {
		gap: 10px;
	}
	.pdms-gallery-frame {
		border-radius: 10px;
		box-shadow: 0 8px 20px rgba(19,20,77,0.10);
	}
}
