/* =============================================================
   ARADEL – SHARED PROSPERITY CARDS
   File: aradel-prosperity-cards/assets/aradel-prosperity-cards.css

   Base card chrome (.ar-card, .ar-card--media, .ar-card-grid,
   .ar-card-section, .ar-card__img-wrap, .ar-card__img zoom,
   .ar-card__title::after divider) is already defined in
   aradel-design-system.css and must not be duplicated here.

   This file contains ONLY:
   - Box-sizing scope
   - Section / inner-container layout
   - Heading + intro typography
   - Card body vertical-centre + left-align override (matches Value Chain)
   - Custom overlay (replaces base gradient for this module)
   - Full-card link overlay
   - Placeholder (no image)
   - Grid column override (!important to beat base responsive rule)
   - Responsive rules
   ============================================================= */

/* ── Box-sizing scope ────────────────────────────────────────────────────── */

.ar-pc-section *,
.ar-pc-section *::before,
.ar-pc-section *::after {
	box-sizing: border-box;
}

/* ── Section wrapper ─────────────────────────────────────────────────────── */
/* Section carries top/bottom padding + background only.
   No left/right padding here — that lives on .ar-pc-inner.           */

.ar-pc-section {
	padding-top: 0;
	padding-bottom: 120px;
	background: transparent;
}

/* ── Inner container ─────────────────────────────────────────────────────── */

.ar-pc-inner {
	max-width: 1440px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 112px;
	padding-right: 112px;
}

/* ── Section header (heading + intro) ───────────────────────────────────── */

.ar-pc__header {
	margin-bottom: 48px;
}

.ar-pc__heading {
	font-family: var(--ads-font, "Nunito Sans", sans-serif);
	font-size: 48px;
	font-style: normal;
	font-weight: 400;
	line-height: 64px;
	letter-spacing: 0.014px;
	color: #000000;
	margin: 0 0 16px;
}

.ar-pc__intro {
	font-family: var(--ads-font, "Nunito Sans", sans-serif);
	font-size: 18px;
	font-style: normal;
	font-weight: 400;
	line-height: 27px;
	color: #000000;
	margin: 0;
}

/* ── Grid — force 3 columns on desktop ──────────────────────────────────── */
/*
   The base .ar-card-grid--3 at ≤1024px collapses to 2-col.
   We override that breakpoint rule here so prosperity cards stay 3-col
   down to tablet (768px), matching the design intent.
   !important required — base responsive rule has equal specificity and
   was declared earlier in aradel-design-system.css.
*/

.ar-pc__grid.ar-card-grid--3 {
	display: grid !important;
	grid-template-columns: repeat(3, 1fr) !important;
	gap: 24px !important;
}

/* ── Card hover animation ────────────────────────────────────────────────── */

.ar-pc__card.ar-card--media {
	aspect-ratio: 3 / 4;
	transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1),
	            box-shadow 0.45s cubic-bezier(0.25, 1, 0.5, 1);
}

.ar-pc__card.ar-card--media:hover {
	transform: translateY(-6px);
	box-shadow: 0 20px 48px rgba(0, 0, 0, 0.18), 0 6px 16px rgba(0, 0, 0, 0.10);
}

/* ── Entrance animation ──────────────────────────────────────────────────── */
/*
   Cards start hidden (opacity 0, shifted down 32px).
   JS adds .is-visible via IntersectionObserver when card enters viewport.
   Each card gets a staggered delay via --ar-pc-delay CSS custom property
   set inline by JS.
*/

.ar-pc__card {
	opacity: 0;
	transform: translateY(32px);
	transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1),
	            transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
	transition-delay: var(--ar-pc-delay, 0ms);
}

.ar-pc__card.is-visible {
	opacity: 1;
	transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
	.ar-pc__card {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* ── Card body ───────────────────────────────────────────────────────────── */
/*
   Base already sets position:absolute; bottom:0; z-index:2.
   We only need to ensure colour override beats Bricks cascade.
*/

.ar-pc__card .ar-card__body.ar-pc__body {
	padding: 28px;
	color: #ffffff !important;
	background: transparent;
}

.ar-pc__card .ar-card__body.ar-pc__body *,
.ar-pc__card .ar-card__body.ar-pc__body h3,
.ar-pc__card .ar-card__body.ar-pc__body p {
	color: #ffffff !important;
}

/* ── Card title ──────────────────────────────────────────────────────────── */
/* Base .ar-card__title::after provides the white divider line.
   We keep it but adjust margins to suit centred layout.             */

.ar-pc__card .ar-pc__title {
	font-family: var(--ads-font, "Nunito Sans", sans-serif);
	font-size: 24px;
	font-weight: 600;
	line-height: 32px;
	letter-spacing: -0.001em;
	color: #ffffff !important;
	margin: 0;
}

/* Divider line — left-aligned like Value Chain */
.ar-pc__card .ar-pc__title::after {
	content: '';
	display: block;
	width: 32px;
	height: 2px;
	background: rgba(255, 255, 255, 0.6);
	margin: 12px 0 16px; /* left-flush, matches Value Chain pattern */
}

/* ── Card text ───────────────────────────────────────────────────────────── */

.ar-pc__card .ar-pc__text {
	font-size: 18px !important;
	line-height: 27px !important;
	color: #ffffff !important;
	margin: 0 0 20px;
}

/* ── CTA ─────────────────────────────────────────────────────────────────── */

.ar-pc__cta {
	display: flex;
	justify-content: flex-start;
	margin-top: 4px;
}

.ar-pc__card .ar-action[data-tone="white"] {
	color: #fff;
}

/* ── Overlay — override base gradient with bottom-weighted tint ──────────── */
/*
   Flat 70% green was washing out text even though z-index is correct.
   Bottom-weighted gradient: near-black at bottom where text sits,
   light green tint at top so image reads through. Text is now backed
   by a dark enough surface to read crisply at white.
*/

.ar-pc__card .ar-card__overlay {
	background: linear-gradient(
		to top,
		rgba(0, 20, 16, 0.92) 10%,
		rgba(0, 60, 50, 0.70) 40%,
		rgba(0, 90, 78, 0.35) 75%,
		rgba(0, 90, 78, 0.10) 100%
	);
	transition: background 0.4s ease;
}

.ar-pc__card:hover .ar-card__overlay {
	background: linear-gradient(
		to top,
		rgba(0, 20, 16, 0.96) 0%,
		rgba(0, 60, 50, 0.80) 40%,
		rgba(0, 90, 78, 0.45) 75%,
		rgba(0, 90, 78, 0.15) 100%
	);
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
	.ar-pc-inner {
		padding-left: 64px;
		padding-right: 64px;
	}

	.ar-pc__heading {
		font-size: 38px;
		line-height: 48px;
		margin-bottom: 12px;
	}

	.ar-pc__header {
		margin-bottom: 40px;
	}
}

@media (max-width: 768px) {
	.ar-pc-section {
		padding-bottom: 80px;
	}

	.ar-pc-inner {
		padding-left: 24px;
		padding-right: 24px;
	}

	.ar-pc__heading {
		font-size: 28px;
		line-height: 38px;
	}

	.ar-pc__intro {
		font-size: 16px;
		line-height: 26px;
	}

	.ar-pc__header {
		margin-bottom: 32px;
	}

	/* Tablet: 2 columns */
	.ar-pc__grid.ar-card-grid--3 {
		display: grid !important;
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 24px !important;
	}

	.ar-pc__card .ar-card__body.ar-pc__body {
		padding: 24px 20px;
	}

	.ar-pc__card .ar-pc__title {
		font-size: 24px;
		line-height: 32px;
	}

	.ar-pc__card .ar-pc__text {
		font-size: 16px !important;
		line-height: 24px !important;
	}
}

@media (max-width: 480px) {
	.ar-pc-section {
		padding-bottom: 64px;
	}

	/* Mobile: 1 column */
	.ar-pc__grid.ar-card-grid--3 {
		display: grid !important;
		grid-template-columns: 1fr !important;
		gap: 24px !important;
	}
}

/* =============================================================
   MODAL SYSTEM
   Scoped to .ar-pc__modal-overlay
   Ported directly from aradel-esg-pillars.css — selectors only differ.
   ============================================================= */

/* ── Hidden template containers ──────────────────────────────────────────── */

.ar-pc__modal-tpl {
	display: none;
}

/* ── Triggers ────────────────────────────────────────────────────────────── */

.ar-pc__modal-trigger {
	display: inline-block;
	cursor: pointer;
	/* pointer-events left intact — WAAPI circle animation must fire normally */
}

.ar-pc__card-modal-trigger {
	cursor: pointer;
}

/* ── Overlay (fixed backdrop + centering shell) ──────────────────────────── */

.ar-pc__modal-overlay {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	box-sizing: border-box;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

/* Keep in DOM for transition — visibility handles visual hiding */
.ar-pc__modal-overlay[hidden] {
	display: flex !important;
}

.ar-pc__modal-overlay.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* ── Backdrop: frosted glass ─────────────────────────────────────────────── */

.ar-pc__modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, 0.72);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

/* ── Modal panel ─────────────────────────────────────────────────────────── */

.ar-pc__modal-panel {
	position: relative;
	z-index: 1;
	background: #ffffff;
	border-radius: 20px;
	width: 100%;
	max-width: 760px;
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.10), 0 4px 16px rgba(0, 0, 0, 0.06);
	box-sizing: border-box;
	transform: scale(0.96) translateY(8px);
	transition: transform 0.25s ease;
}

.ar-pc__modal-overlay.is-open .ar-pc__modal-panel {
	transform: scale(1) translateY(0);
}

/* ── Close button ────────────────────────────────────────────────────────── */

.ar-pc__modal-close {
	position: absolute;
	top: 24px;
	right: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: #F3F3F3;
	color: #01303A;
	cursor: pointer;
	flex-shrink: 0;
	transition: background 0.2s ease, color 0.2s ease;
	z-index: 2;
}

.ar-pc__modal-close:hover {
	background: #01303A;
	color: #ffffff;
}

.ar-pc__modal-close:focus-visible {
	outline: 2px solid #C1000F;
	outline-offset: 3px;
}

/* ── Modal inner ─────────────────────────────────────────────────────────── */

.ar-pc__modal-inner {
	padding: 56px 56px 64px;
}

@media (max-width: 1024px) {
	.ar-pc__modal-inner {
		padding: 48px 40px 56px;
	}
}

@media (max-width: 640px) {
	.ar-pc__modal-inner {
		padding: 48px 28px 48px;
	}
}

/* ── Modal title ─────────────────────────────────────────────────────────── */

.ar-pc__modal-title {
	margin: 0;
	color: #000000;
	font-family: 'Nunito Sans', sans-serif;
	font-size: 48px;
	font-weight: 400;
	line-height: 64px;
	letter-spacing: 0.014px;
}

@media (max-width: 1024px) {
	.ar-pc__modal-title {
		font-size: 36px;
		line-height: 48px;
	}
}

@media (max-width: 640px) {
	.ar-pc__modal-title {
		font-size: 28px;
		line-height: 38px;
	}
}

/* ── Divider ─────────────────────────────────────────────────────────────── */

.ar-pc__modal-divider {
	height: 1px;
	background: #000000;
	margin: 50px 0;
}

@media (max-width: 640px) {
	.ar-pc__modal-divider {
		margin: 32px 0;
	}
}

/* ── Modal body copy ─────────────────────────────────────────────────────── */

.ar-pc__modal-body {
	color: #000000;
	font-family: 'Nunito Sans', sans-serif;
	font-size: 18px;
	font-weight: 400;
	line-height: 27px;
}

.ar-pc__modal-body p {
	margin: 0 0 18px;
}

.ar-pc__modal-body p:last-child {
	margin-bottom: 0;
}

.ar-pc__modal-body ul,
.ar-pc__modal-body ol {
	margin: 0 0 18px;
	padding-left: 24px;
}

.ar-pc__modal-body li {
	margin-bottom: 8px;
}

@media (max-width: 640px) {
	.ar-pc__modal-body {
		font-size: 16px;
		line-height: 25px;
	}
}

/* ── Body scroll lock ────────────────────────────────────────────────────── */

body.ar-pc-modal-open {
	overflow: hidden;
}
