/**
 * File: assets/css/pages/projects/sections.css
 * Description: Projects page content sections.
 *
 * MAGIDA PROJECTS PAGE PASS 10:
 * - Keeps portfolio content honest while only one real case study exists.
 *
 * MAGIDA PROJECTS FIX PASS 10.1.1:
 * - Restores card styling for the pass 10.1 motion class names.
 * - Gives Case Study Format and Archive Structure boxes more padding and rounded corners.
 * - Keeps the lower content sections visually separate from the main Projects hero.
 *
 * MAGIDA HUMAN MEDIA PROJECTS PASS 23.5.5:
 * - Polishes the existing flagship image frame so approved screenshots sit inside the locked visual design.
 *
 * MAGIDA PASS 24.1.37:
 * - Normalizes the Projects flagship CTA buttons so they stay button-sized, not tile-sized.
 * - Tightens lower Projects archive section rhythm without touching the shared post-hero gap.
 *
 * MAGIDA PASS 24.1.38:
 * - Refines the Projects flagship screenshot crop so important left-side project text is not clipped.
 */

.magida-projects-section {
	position: relative;
	padding: clamp(76px, 8vw, 118px) 0;
	border-top: 1px solid rgba(190, 189, 229, 0.1);
}

.magida-projects-preview,
.magida-projects-coming,
.magida-projects-categories,
.magida-projects-final-cta {
	/* MAGIDA PASS 24.1.37: Tighten lower archive rhythm only; the global post-hero handoff remains untouched. */
	padding-top: clamp(58px, 6vw, 92px);
	padding-bottom: clamp(58px, 6vw, 92px);
}

.magida-projects-coming,
.magida-projects-final-cta {
	padding-top: clamp(52px, 5.5vw, 82px);
}

.magida-projects-section-header {
	max-width: 760px;
	margin-bottom: clamp(34px, 5vw, 56px);
}

.magida-projects-section-header h2 {
	margin: 0;
	color: var(--magida-text);
	font-family: var(--magida-font-heading);
	font-size: clamp(2.6rem, 5vw, 5.2rem);
	line-height: 0.95;
	letter-spacing: -0.075em;
}

.magida-projects-section-header p:not(.magida-eyebrow) {
	margin: 22px 0 0;
	color: var(--magida-text-soft);
	font-size: clamp(1.02rem, 1.8vw, 1.18rem);
	line-height: 1.72;
}

.magida-projects-flagship__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.82fr);
	gap: clamp(26px, 4vw, 46px);
	align-items: stretch;
}

.magida-projects-flagship__media {
	position: relative;
	min-height: 440px;
	padding: clamp(22px, 3vw, 34px);
	border-radius: 32px;
	overflow: hidden;
	background:
		radial-gradient(
			circle at 20% 20%,
			rgba(5, 223, 254, 0.16),
			transparent 32%
		),
		radial-gradient(
			circle at 90% 100%,
			rgba(124, 106, 251, 0.18),
			transparent 38%
		),
		rgba(8, 10, 18, 0.78);
}

.magida-projects-flagship__image {
	/* MAGIDA HUMAN MEDIA PROJECTS PASS 23.5.5: Keep approved screenshots inside the existing premium frame. */
	position: relative;
	z-index: 1;
	display: block;
	width: 100%;
	height: 100%;
	min-height: 360px;
	object-fit: cover;
	/* MAGIDA PASS 24.1.38: Keep the approved full-bleed crop, but anchor the Injumo mockup from the left so title text is not cut off. */
	object-position: left center;
	border: 1px solid rgba(190, 189, 229, 0.16);
	border-radius: 24px;
	box-shadow: 0 24px 72px rgba(0, 0, 0, 0.28);
}

.magida-projects-browser {
	position: relative;
	display: grid;
	grid-template-rows: auto 1fr;
	min-height: 360px;
	border: 1px solid rgba(190, 189, 229, 0.14);
	border-radius: 26px;
	background: rgba(6, 8, 14, 0.82);
	overflow: hidden;
}

.magida-projects-browser__bar {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 50px;
	padding: 0 18px;
	border-bottom: 1px solid rgba(190, 189, 229, 0.12);
	background: rgba(255, 255, 255, 0.035);
}

.magida-projects-browser__bar span {
	width: 10px;
	height: 10px;
	border-radius: 999px;
	background: rgba(190, 189, 229, 0.28);
}

.magida-projects-browser__bar strong {
	margin-left: 8px;
	color: var(--magida-text-muted);
	font-size: 0.8rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.magida-projects-browser__body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 160px;
	gap: 24px;
	align-items: end;
	padding: clamp(28px, 4vw, 44px);
}

.magida-projects-browser__copy span,
.magida-projects-browser__copy em {
	display: block;
	color: var(--magida-text-muted);
	font-size: 0.82rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.magida-projects-browser__copy strong {
	display: block;
	max-width: 460px;
	margin: 14px 0 18px;
	color: var(--magida-text);
	font-family: var(--magida-font-heading);
	font-size: clamp(2.1rem, 4vw, 4rem);
	line-height: 0.96;
	letter-spacing: -0.075em;
}

.magida-projects-browser__device {
	display: grid;
	place-items: center;
	min-height: 190px;
	border: 1px solid rgba(5, 223, 254, 0.16);
	border-radius: 28px;
	background: linear-gradient(
		135deg,
		rgba(5, 223, 254, 0.14),
		rgba(124, 106, 251, 0.17)
	);
	color: var(--magida-text);
	font-family: var(--magida-font-heading);
	font-size: 3rem;
	font-weight: 900;
}

.magida-projects-flagship__content {
	display: grid;
	gap: 18px;
}

.magida-projects-facts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1px;
	padding: 1px;
	overflow: hidden;
	background: rgba(190, 189, 229, 0.1);
}

.magida-projects-facts div {
	padding: 22px;
	background: rgba(8, 10, 18, 0.9);
}

.magida-projects-facts span,
.magida-projects-services h3 {
	display: block;
	margin: 0 0 10px;
	color: var(--magida-accent-cyan);
	font-family: var(--magida-font-heading);
	font-size: 0.78rem;
	font-weight: 850;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.magida-projects-facts strong {
	color: var(--magida-text);
	font-size: 1rem;
	line-height: 1.4;
}

.magida-projects-services {
	padding: 26px;
}

.magida-projects-services__list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.magida-projects-services__list li {
	padding: 10px 13px;
	border: 1px solid rgba(5, 223, 254, 0.16);
	border-radius: 999px;
	background: rgba(5, 223, 254, 0.06);
	color: var(--magida-text-soft);
	font-size: 0.9rem;
	font-weight: 750;
}

.magida-projects-note {
	padding: 0 4px;
	color: var(--magida-text-soft);
	line-height: 1.7;
}

.magida-projects-note p {
	margin: 0;
}

.magida-projects-flagship__actions,
.magida-projects-final-cta__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}

.magida-projects-flagship__actions {
	/* MAGIDA PASS 24.1.37: Keep flagship CTAs as compact buttons instead of stretched tiles. */
	align-items: center;
	gap: 16px;
}

.magida-projects-flagship__actions .magida-button {
	width: auto;
	min-width: 168px;
	min-height: 52px;
	height: 52px;
	padding: 0 24px;
	align-self: center;
}

.magida-projects-preview__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}

.magida-projects-preview__card,
.magida-projects-categories__card {
	position: relative;
	isolation: isolate;
	border: 1px solid rgba(190, 189, 229, 0.13);
	background:
		linear-gradient(
			135deg,
			rgba(255, 255, 255, 0.035),
			rgba(255, 255, 255, 0.012)
		),
		rgba(8, 10, 18, 0.68);
	box-shadow: 0 22px 70px rgba(0, 0, 0, 0.24);
	overflow: hidden;
}

.magida-projects-preview__card {
	min-height: 210px;
	padding: clamp(26px, 3vw, 38px);
	border-radius: 28px;
}

.magida-projects-preview__card::before,
.magida-projects-categories__card::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -2;
	background:
		radial-gradient(
			circle at 18% 10%,
			rgba(5, 223, 254, 0.12),
			transparent 34%
		),
		radial-gradient(
			circle at 100% 100%,
			rgba(124, 106, 251, 0.1),
			transparent 38%
		);
	opacity: 0.74;
}

.magida-projects-preview__card::after,
.magida-projects-categories__card::after {
	content: "";
	position: absolute;
	right: 22px;
	bottom: 22px;
	z-index: -1;
	width: 76px;
	height: 76px;
	border: 1px solid rgba(5, 223, 254, 0.14);
	border-radius: 24px;
	background: rgba(5, 223, 254, 0.035);
}

.magida-projects-preview__card span {
	display: block;
	color: var(--magida-text-muted);
	font-family: var(--magida-font-heading);
	font-size: 0.84rem;
	font-weight: 850;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.magida-projects-preview__card h3 {
	margin: 16px 0 0;
	color: var(--magida-text);
	font-family: var(--magida-font-heading);
	font-size: clamp(1.65rem, 2.4vw, 2.45rem);
	line-height: 1;
	letter-spacing: -0.06em;
}

.magida-projects-preview__card p,
.magida-projects-categories__card p {
	margin: 12px 0 0;
	color: var(--magida-text-soft);
	line-height: 1.65;
}

.magida-projects-coming__panel,
.magida-projects-final-cta__panel {
	display: grid;
	grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr);
	gap: clamp(24px, 4vw, 56px);
	align-items: center;
	padding: clamp(30px, 5vw, 58px);
	border-radius: 30px;
}

.magida-projects-coming__panel h2,
.magida-projects-final-cta__panel h2 {
	margin: 0;
	color: var(--magida-text);
	font-family: var(--magida-font-heading);
	font-size: clamp(2.05rem, 4vw, 4rem);
	line-height: 0.98;
	letter-spacing: -0.07em;
}

.magida-projects-coming__panel p,
.magida-projects-final-cta__panel p {
	margin: 0;
	color: var(--magida-text-soft);
	line-height: 1.72;
}

.magida-projects-categories__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
}

.magida-projects-categories__card {
	min-height: 190px;
	padding: clamp(24px, 2.7vw, 34px);
	border-radius: 26px;
}

.magida-projects-categories__card span {
	display: block;
	color: var(--magida-text);
	font-family: var(--magida-font-heading);
	font-size: 1rem;
	font-weight: 850;
	letter-spacing: -0.025em;
}

.magida-projects-final-cta__panel {
	grid-template-columns: 1fr;
	max-width: 980px;
	margin: 0 auto;
	text-align: center;
}

.magida-projects-final-cta__actions {
	justify-content: center;
}

@media (max-width: 1180px) {
	.magida-projects-flagship__grid {
		grid-template-columns: 1fr;
	}

	.magida-projects-preview__grid,
	.magida-projects-categories__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 760px) {
	.magida-projects-section {
		padding: 70px 0;
	}

	.magida-projects-preview,
	.magida-projects-coming,
	.magida-projects-categories,
	.magida-projects-final-cta {
		padding-top: 56px;
		padding-bottom: 56px;
	}

	.magida-projects-section-header h2 {
		font-size: clamp(2.25rem, 13vw, 3.4rem);
	}

	.magida-projects-browser__body,
	.magida-projects-coming__panel {
		grid-template-columns: 1fr;
	}

	.magida-projects-browser__device {
		min-height: 150px;
	}

	.magida-projects-facts,
	.magida-projects-preview__grid,
	.magida-projects-categories__grid {
		grid-template-columns: 1fr;
	}

	.magida-projects-flagship__actions,
	.magida-projects-final-cta__actions {
		align-items: stretch;
		flex-direction: column;
	}

	.magida-projects-flagship__actions .magida-button {
		width: 100%;
		min-width: 0;
	}
}
