/* ============================================================
   A. SOLANES 2010 — Ficha de proyecto (single-proyecto)
   Replica el diseño Elementor con clases .as-pj-* y tokens del tema.
   Depende de main.css (tokens :root, .as-container, .as-btn, .as-richtext).
   ============================================================ */

.as-pj { color: var(--as-black); }

/* Eyebrow reutilizable (línea roja + texto) */
.as-pj-eyebrow {
	display: inline-block;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--as-red);
	margin-bottom: 14px;
	position: relative;
	padding-left: 50px;
}
.as-pj-eyebrow::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	width: 38px;
	height: 2px;
	background: var(--as-red);
}

/* ============================================================
   1. HERO
   ============================================================ */
.as-pj-hero {
	position: relative;
	min-height: 78vh;
	display: flex;
	align-items: flex-end;
	background-color: var(--as-black);
	background-size: cover;
	background-position: center;
	background-attachment: fixed;
	overflow: hidden;
	margin-top: -74px; /* bajo la cabecera sticky transparente */
	padding-top: 74px;
	color: #fff;
}
.as-pj-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.40) 50%, rgba(0,0,0,.88) 100%);
	z-index: 1;
}
.as-pj-hero__back {
	position: absolute;
	top: 90px;
	left: 20px;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #fff;
	text-decoration: none;
	font-size: .8rem;
	font-weight: 600;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	padding: 10px 18px;
	background: rgba(0,0,0,.35);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	border-radius: 4px;
	transition: background .3s ease;
}
.as-pj-hero__back:hover { background: var(--as-red); color: #fff; }

.as-pj-hero__content {
	position: relative;
	z-index: 2;
	padding-bottom: 70px;
}
.as-pj-badges {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 20px;
}
.as-pj-badge {
	display: inline-block;
	padding: 8px 16px;
	border-radius: 3px;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	line-height: 1.2;
}
.as-pj-badge--promoter { background: #fff; color: var(--as-black); }
.as-pj-badge--status { background: var(--as-red); color: #fff; }
.as-pj-badge--finalizada { background: var(--as-black); color: #fff; border: 1px solid rgba(255,255,255,.35); }
.as-pj-badge--nueva { background: var(--as-red); color: #fff; }
.as-pj-badge--en-curso { background: var(--as-red-light); color: #fff; }

.as-pj-hero__title {
	font-size: clamp(2.2rem, 5vw, 3.8rem);
	color: #fff;
	margin: 0 0 16px;
	font-weight: 800;
	line-height: 1.08;
	max-width: 900px;
}
.as-pj-hero__location {
	font-size: 1.1rem;
	color: rgba(255,255,255,.85);
	font-weight: 300;
	margin: 0;
	display: flex;
	align-items: center;
	gap: 8px;
}

/* ============================================================
   2. DATA STRIP
   ============================================================ */
.as-pj-data { background: var(--as-black); }
.as-pj-data__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.as-pj-data__item {
	padding: 35px 25px;
	text-align: center;
	border-right: 1px solid rgba(255,255,255,.08);
	transition: background .3s ease;
}
.as-pj-data__item:last-child { border-right: none; }
.as-pj-data__item:hover { background: rgba(255,255,255,.03); }
.as-pj-data__value {
	font-size: 1.5rem;
	font-weight: 800;
	color: var(--as-red-light);
	display: block;
	line-height: 1;
	margin-bottom: 8px;
	font-family: var(--as-head);
}
.as-pj-data__label {
	font-size: .7rem;
	font-weight: 600;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: rgba(255,255,255,.55);
}

/* ============================================================
   3. DESCRIPCIÓN + FICHA TÉCNICA
   ============================================================ */
.as-pj-detail { background: #fff; padding: 90px 0; }
.as-pj-detail__grid {
	display: grid;
	grid-template-columns: 1.3fr 1fr;
	gap: 70px;
	align-items: start;
}

/* --- Descripción --- */
.as-pj-desc__title {
	font-size: clamp(1.7rem, 3vw, 2.3rem);
	margin: 0 0 26px;
	font-weight: 800;
}
.as-pj-desc__body p {
	font-size: 1.05rem;
	line-height: 1.8;
	color: var(--as-gray-2);
	margin: 0 0 22px;
}
.as-pj-highlight {
	padding: 22px 24px;
	border-left: 3px solid var(--as-red);
	background: rgba(200,32,43,.04);
	border-radius: 0 6px 6px 0;
	font-size: 1.1rem;
	font-weight: 500;
	color: var(--as-black);
	line-height: 1.6;
	margin: 30px 0 0;
}

/* --- Ficha técnica (sidebar sticky) --- */
.as-pj-specs {
	background: var(--as-bg-soft);
	border-radius: 10px;
	padding: 40px 35px;
	border-top: 4px solid var(--as-red);
	position: sticky;
	top: 94px; /* deja hueco a la cabecera sticky (74px) */
}
.as-pj-specs__title {
	font-size: 1.2rem;
	margin: 0 0 25px;
	padding-bottom: 18px;
	border-bottom: 1px solid #e0e0e0;
	font-weight: 700;
}
.as-pj-spec-group { margin-bottom: 25px; }
.as-pj-spec-group:last-of-type { margin-bottom: 0; }
.as-pj-spec-group__title {
	font-size: .7rem;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--as-red);
	margin-bottom: 14px;
	display: block;
}
.as-pj-spec-list { list-style: none; padding: 0; margin: 0; }
.as-pj-spec-list li {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	padding: 10px 0;
	border-bottom: 1px solid #ececec;
	font-size: .92rem;
	gap: 15px;
}
.as-pj-spec-list li:last-child { border-bottom: none; }
.as-pj-spec-list__key { color: #999; font-weight: 500; flex-shrink: 0; }
.as-pj-spec-list__val { color: var(--as-black); font-weight: 600; text-align: right; }

.as-pj-specs__cta {
	display: block;
	width: 100%;
	margin-top: 28px;
	padding: 14px 24px;
	background: var(--as-red);
	color: #fff;
	text-decoration: none;
	text-align: center;
	font-size: .82rem;
	font-weight: 700;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	border-radius: 4px;
	border: 2px solid var(--as-red);
	transition: all .3s ease;
}
.as-pj-specs__cta:hover {
	background: var(--as-black);
	border-color: var(--as-black);
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 10px 20px rgba(0,0,0,.15);
}

/* ============================================================
   4. GALERÍA
   ============================================================ */
.as-pj-gallery { background: var(--as-bg-soft); padding: 90px 0; }
.as-pj-gallery__header { text-align: center; margin-bottom: 50px; }
.as-pj-gallery__header .as-pj-eyebrow { padding-left: 50px; }
.as-pj-gallery__header h2 {
	font-size: clamp(1.7rem, 3vw, 2.3rem);
	max-width: 700px;
	margin: 0 auto;
	font-weight: 800;
}
.as-pj-gallery__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 16px;
}
.as-pj-gallery__item {
	position: relative;
	border-radius: 8px;
	overflow: hidden;
	margin: 0;
	aspect-ratio: 4 / 3;
	transition: transform .5s ease, box-shadow .5s ease;
}
.as-pj-gallery__item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.as-pj-gallery__item:hover { transform: translateY(-4px); box-shadow: 0 20px 50px rgba(0,0,0,.18); }
.as-pj-gallery__item:hover img { transform: scale(1.04); }
/* Cuadrícula uniforme (aspect-ratio 4/3), sin imagen destacada en span:
   evita huecos en blanco sea cual sea el nº de fotos. */

/* ============================================================
   5. NAVEGACIÓN PREV / NEXT
   ============================================================ */
.as-pj-nav {
	background: #fff;
	border-top: 1px solid #ececec;
	border-bottom: 1px solid #ececec;
}
.as-pj-nav__grid {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	min-height: 100px;
	padding: 0 20px;
}
.as-pj-nav__item {
	display: flex;
	align-items: center;
	padding: 30px 35px;
	text-decoration: none;
	color: var(--as-black);
	transition: background .3s ease;
	gap: 15px;
}
.as-pj-nav__item:hover { background: var(--as-bg-soft); }
.as-pj-nav__item--prev { justify-content: flex-start; }
.as-pj-nav__item--next { justify-content: flex-end; text-align: right; }
.as-pj-nav__item--empty { pointer-events: none; }
.as-pj-nav__arrow {
	font-size: 1.6rem;
	font-weight: 300;
	color: var(--as-red);
	flex-shrink: 0;
	transition: transform .3s ease;
}
.as-pj-nav__item--prev:hover .as-pj-nav__arrow { transform: translateX(-5px); }
.as-pj-nav__item--next:hover .as-pj-nav__arrow { transform: translateX(5px); }
.as-pj-nav__label {
	font-size: .7rem;
	font-weight: 600;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: #999;
	display: block;
	margin-bottom: 4px;
}
.as-pj-nav__title { font-size: .98rem; font-weight: 700; color: var(--as-black); display: block; }
.as-pj-nav__center {
	display: flex;
	align-items: center;
	justify-content: center;
	border-left: 1px solid #ececec;
	border-right: 1px solid #ececec;
	padding: 20px 30px;
}
.as-pj-nav__all {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--as-black);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	transition: all .3s ease;
	font-size: .95rem;
}
.as-pj-nav__all:hover { background: var(--as-red); transform: scale(1.1); }

/* ============================================================
   6. CTA FINAL
   ============================================================ */
.as-pj-cta {
	background: linear-gradient(135deg, var(--as-black) 0%, #2a2a2a 100%);
	color: #fff;
	text-align: center;
	position: relative;
	overflow: hidden;
	padding: 90px 0;
}
.as-pj-cta::before {
	content: "";
	position: absolute;
	top: -180px;
	left: 50%;
	transform: translateX(-50%);
	width: 500px;
	height: 500px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(200,32,43,.18) 0%, transparent 70%);
	pointer-events: none;
}
.as-pj-cta__content { position: relative; z-index: 1; }
.as-pj-cta__heading {
	font-size: clamp(1.8rem, 4vw, 2.6rem);
	color: #fff;
	max-width: 800px;
	margin: 0 auto 18px;
	font-weight: 800;
}
.as-pj-cta__text {
	color: #c8c8c8;
	font-size: 1.1rem;
	max-width: 650px;
	margin: 0 auto 35px;
}
.as-pj-cta__btn { padding: 15px 40px; }

/* ============================================================
   RESPONSIVE — Tablet (992px)
   ============================================================ */
@media (max-width: 992px) {
	.as-pj-hero { background-attachment: scroll; min-height: 62vh; }
	.as-pj-detail { padding: 70px 0; }
	.as-pj-detail__grid { grid-template-columns: 1fr; gap: 50px; }
	.as-pj-specs { position: static; }
	.as-pj-gallery { padding: 70px 0; }
	.as-pj-cta { padding: 70px 0; }
}

/* ============================================================
   RESPONSIVE — Móvil (600px)
   ============================================================ */
@media (max-width: 600px) {
	.as-pj-hero { min-height: 56vh; }
	.as-pj-hero__content { padding-bottom: 50px; }
	.as-pj-data__grid { grid-template-columns: repeat(2, 1fr); }
	.as-pj-data__item {
		padding: 25px 18px;
		border-bottom: 1px solid rgba(255,255,255,.08);
	}
	.as-pj-data__value { font-size: 1.2rem; }
	.as-pj-detail { padding: 56px 0; }
	.as-pj-specs { padding: 30px 24px; }
	.as-pj-gallery { padding: 56px 0; }
	.as-pj-gallery__grid { grid-template-columns: 1fr; }
	.as-pj-gallery__item:first-child { grid-column: auto; grid-row: auto; aspect-ratio: 4 / 3; }
	.as-pj-cta { padding: 56px 0; }
	.as-pj-nav__grid { grid-template-columns: 1fr 1fr; }
	.as-pj-nav__center { display: none; }
	.as-pj-nav__item { padding: 22px 18px; }
	.as-pj-nav__title { font-size: .88rem; }
	.as-pj-nav__item--next { border-top: 1px solid #ececec; grid-column: 1 / -1; }
	.as-pj-nav__item--prev { grid-column: 1 / -1; }
}
