/*
 Theme Name:   Astra Ecolumen
 Template:     astra
 Author:       Happy Hippopotam.us
 Description:  Child theme for Astra
 Version:      1.1.1
*/

/* =========================================================
   Proyecto Single Template
   ========================================================= */

/* Prevent horizontal scroll from full-bleed sections */
.single-ec_proyecto body,
.single-ec_proyecto #page {
	overflow-x: hidden;
}

.single-ec_proyecto #content {
	background-color: #f5f5f5;
}

.ec-proyecto-wrap {
	width: 100%;
}

/* Full-bleed wrapper — covers hero + impact in one band */
.ec-video-section {
	position: relative;
	left: 50%;
	width: 100vw;
	margin-left: -50vw;
	margin-right: -50vw;
	overflow: hidden;
}

/* Reset full-bleed on children now that the wrapper handles it */
.ec-video-section .ec-proyecto-hero,
.ec-video-section .ec-impacto {
	position: relative;
	left: auto;
	width: auto;
	margin-left: 0;
	margin-right: 0;
}

/* --- Video background --- */
.ec-video-bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
}

.ec-video-bg video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ec-video-overlay {
	position: absolute;
	inset: 0;
	background: rgba(6, 20, 12, 0.52);
}

/* Lift content above the video */
.ec-video-section .ec-proyecto-hero-inner,
.ec-video-section .ec-impacto-inner {
	position: relative;
	z-index: 1;
}

/* Remove solid bg when video is present — overlay handles the dark */
.ec-video-section.has-video .ec-proyecto-hero,
.ec-video-section.has-video .ec-impacto {
	background-color: transparent;
}

/* --- Hero --- */
.ec-proyecto-hero {
	background-color: #06140C;
	padding: 60px 20px 48px;
}

.ec-proyecto-hero-inner {
	max-width: 1200px;
	margin: 0 auto;
}

.ec-proyecto-location {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #D4F3D7;
	font-family: 'Raleway', sans-serif;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin: 0 0 14px;
}

.ec-proyecto-location svg {
	flex-shrink: 0;
	color: #45a437;
}

.ec-proyecto-title {
	font-family: 'Roboto', sans-serif;
	font-size: clamp(28px, 5vw, 48px);
	font-weight: 700;
	color: #ffffff;
	margin: 0;
	line-height: 1.15;
}

/* --- Content --- */
.ec-proyecto-content {
}

.ec-proyecto-content-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 20px;
}

/* Hide the default Astra post title on this CPT */
.ec-proyecto-wrap ~ * .entry-title,
.single-ec_proyecto .entry-title {
	display: none;
}

/* --- Impact Stats Section --- */
.ec-impacto {
	background-color: #06140C;
	padding: 64px 20px;
}

.ec-impacto-inner {
	max-width: 1200px;
	margin: 0 auto;
}

.ec-impacto-heading {
	font-family: 'Roboto', sans-serif;
	font-size: clamp(22px, 3vw, 32px);
	font-weight: 700;
	color: #ffffff;
	text-align: center;
	margin: 0 0 48px;
}

.ec-impacto-grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 20px;
}

.ec-impacto-card {
	flex: 0 1 auto;
	min-width: min-content;
	position: relative;
	overflow: hidden;
	background: rgba(212, 243, 215, 0.04);
	backdrop-filter: blur(6px) saturate(120%);
	-webkit-backdrop-filter: blur(6px) saturate(120%);
	border: 1px solid rgba(212, 243, 215, 0.16);
	border-radius: 12px;
	padding: 28px clamp(8px, 2vw - 4px, 20px) 24px;
	text-align: center;
	box-shadow:
		0 4px 24px rgba(0, 0, 0, 0.25),
		inset 0 1px 0 rgba(212, 243, 215, 0.12);
	transition: background 0.3s, border-color 0.3s, box-shadow 0.3s,
		backdrop-filter 0.3s, -webkit-backdrop-filter 0.3s;
}

/* Top-left light catch — the signature liquid glass sheen */
.ec-impacto-card::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: linear-gradient(
		145deg,
		rgba(255, 255, 255, 0.13) 0%,
		rgba(255, 255, 255, 0.05) 35%,
		transparent 65%
	);
	pointer-events: none;
}

.ec-impacto-card:hover {
	background: rgba(212, 243, 215, 0.07);
	backdrop-filter: blur(20px) saturate(160%);
	-webkit-backdrop-filter: blur(20px) saturate(160%);
	border-color: rgba(69, 164, 55, 0.45);
	box-shadow:
		0 6px 32px rgba(0, 0, 0, 0.4),
		inset 0 1px 0 rgba(212, 243, 215, 0.25);
}

.ec-impacto-card--highlight {
	background: rgba(69, 164, 55, 0.18);
	border-color: rgba(69, 164, 55, 0.45);
	box-shadow:
		0 4px 28px rgba(69, 164, 55, 0.2),
		inset 0 1px 0 rgba(212, 243, 215, 0.2);
}

.ec-impacto-card--highlight::before {
	background: linear-gradient(
		145deg,
		rgba(255, 255, 255, 0.16) 0%,
		rgba(255, 255, 255, 0.05) 35%,
		transparent 65%
	);
}

.ec-impacto-icon {
	color: #45a437;
	margin-bottom: 14px;
	display: flex;
	justify-content: center;
}

.ec-impacto-value {
	font-family: 'Roboto', sans-serif;
	font-size: clamp(28px, 3.5vw, 40px);
	font-weight: 700;
	color: #45a437;
	line-height: 1;
	margin-bottom: 4px;
	white-space: nowrap;
}

.ec-impacto-currency {
	margin-right: 2px;
}

.ec-impacto-unit {
	font-family: 'Raleway', sans-serif;
	font-size: 12px;
	font-weight: 600;
	color: #D4F3D7;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	min-height: 18px;
	margin-bottom: 10px;
}

.ec-impacto-label {
	font-family: 'Raleway', sans-serif;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.65);
	line-height: 1.4;
}

@media (max-width: 900px) {
	.ec-impacto-grid {
		display: grid;
		grid-template-columns: repeat(6, 1fr);
		gap: 12px;
	}
	/* First 3 cards — equal thirds (2 of 6 columns each) */
	.ec-impacto-card:nth-child(1),
	.ec-impacto-card:nth-child(2),
	.ec-impacto-card:nth-child(3) {
		grid-column: span 2;
	}
	/* Last 2 cards — equal halves (3 of 6 columns each) */
	.ec-impacto-card:nth-child(4),
	.ec-impacto-card:nth-child(5) {
		grid-column: span 3;
	}
}

@media (max-width: 600px) {
	.ec-proyecto-hero {
		padding: 40px 16px 32px;
	}
}
