/*
 * Services page (prototype: servicios.html). Exact replica: values are the prototype's.
 *
 * Service icons are decoration and come from CSS (pitalua-servicio--NN). Where the prototype
 * leaves a margin or a weight to the browser, it is written out: blockGap 0 zeroes the margins
 * of group children, and h3/h4 without font-weight are bold (700) by the UA.
 */

/* --- Shared: section heads ------------------------------------------------ */

/* The head div of .services-section (inline style), .recipients-head and .downloads-head. */
.pitalua-servicios__cabecera {
	max-width: 760px;
	margin-bottom: 52px;
}

/* .display h2 of the three section heads */
.pitalua-servicios__cabecera h2 {
	margin: 0 0 16px;
	font-size: clamp( 1.95rem, 2.8vw, 2.75rem );
}

/* .lead: the prototype's p keeps the UA margins. */
.pitalua-servicios__cabecera .pitalua-lead {
	margin: 1em 0;
}

/* --- .services-section ----------------------------------------------------- */

.pitalua-servicios {
	padding: clamp( 84px, 8.5vw, 114px ) 0;
	background: #fffaf5;
}

/* .services-list */
.pitalua-servicios__lista {
	display: grid;
	gap: 36px;
}

/* .service-block */
.pitalua-servicio {
	display: grid;
	grid-template-columns: 0.9fr 1.1fr;
	gap: clamp( 36px, 4.5vw, 68px );
	align-items: start;
	margin: 0;
	padding: clamp( 36px, 4vw, 52px );
	border: 1px solid var( --line );
	border-top: 3px solid var( --gold );
	background: var( --ivory );
	transition: 0.35s var( --ease );
}

.pitalua-servicio:hover {
	background: #fff;
	box-shadow: 0 16px 36px rgba( 82, 40, 74, 0.07 );
	transform: translateY( -3px );
}

/* .service-meta */
.pitalua-servicio__meta {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

/* .service-badge: the icon (.service-badge-icon, 64x64) is the ::before. */
.pitalua-servicio__insignia {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.pitalua-servicio__insignia::before {
	content: "";
	flex: none;
	width: 64px;
	height: 64px;
	background: center / contain no-repeat;
}

.pitalua-servicio--01::before {
	background-image: url( "../../img/decor/servicio-01.webp" );
}

.pitalua-servicio--02::before {
	background-image: url( "../../img/decor/servicio-02.webp" );
}

.pitalua-servicio--03::before {
	background-image: url( "../../img/decor/servicio-03.webp" );
}

.pitalua-servicio--04::before {
	background-image: url( "../../img/decor/servicio-04.webp" );
}

.pitalua-servicio--05::before {
	background-image: url( "../../img/decor/servicio-05.webp" );
}

.pitalua-servicio--06::before {
	background-image: url( "../../img/decor/servicio-06.webp" );
}

/* .service-badge-num */
.pitalua-servicio__numero {
	margin: 0;
	color: var( --gold );
	font-family: var( --serif );
	font-size: 2rem;
	font-weight: 600;
	line-height: 1;
}

/* .service-meta h2 (not .display) */
.pitalua-servicio__meta h2 {
	margin: 0;
	color: var( --plum );
	font-family: var( --serif );
	font-size: clamp( 1.45rem, 1.8vw, 1.85rem );
	font-weight: 600;
	letter-spacing: normal;
	line-height: 1.24;
}

/* .service-desc */
.pitalua-servicio__descripcion {
	margin: 0;
	color: #5a4f58;
	font-size: clamp( 0.92rem, 1.04vw, 1rem );
	line-height: 1.8;
}

/* .service-detail h3 */
.pitalua-servicio__detalle h3 {
	margin: 0 0 16px;
	color: var( --gold );
	font-family: var( --serif );
	font-size: 0.92rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	line-height: 1.6;
	text-transform: uppercase;
}

/* .service-bullets */
/* .service-more: the "Explorar área" link under each card's scope (spec servicios-individuales). */
.pitalua-servicio__mas {
	margin-top: 28px;
}

/* The prototype's link sits alone; the block's wrapper div would add a line box around the
   inline-flex link (30px instead of 27px). As a flex container it keeps the link's own size. */
.pitalua-servicio__mas .wp-block-button {
	display: flex;
}

.pitalua-servicio__alcance {
	display: grid;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pitalua-servicio__alcance li {
	position: relative;
	padding-left: 20px;
	color: var( --ink );
	font-size: 0.88rem;
	line-height: 1.68;
}

.pitalua-servicio__alcance li::before {
	content: "";
	position: absolute;
	top: 0.6em;
	left: 0;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var( --gold );
}

/* --- .recipients ----------------------------------------------------------- */

.pitalua-destinatarios {
	position: relative;
	overflow: hidden;
	padding: clamp( 84px, 8.5vw, 114px ) 0;
	border-top: 1px solid var( --line );
	border-bottom: 1px solid var( --line );
	background: var( --ivory );
}

/* .recipients-head h2 */
.pitalua-destinatarios .pitalua-servicios__cabecera h2 {
	margin: 0 0 18px;
	line-height: 1.2;
}

/* .recipients-grid */
.pitalua-destinatarios__rejilla {
	display: grid;
	grid-template-columns: 1.15fr 1fr 1fr;
	gap: 24px;
}

/* .rec-card */
.pitalua-destinatario {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 38px 30px;
	border: 1px solid var( --line );
	border-top: 3px solid var( --gold );
	background: #fffaf5;
	transition: 0.35s var( --ease );
}

.pitalua-destinatario:hover {
	box-shadow: 0 14px 32px rgba( 82, 40, 74, 0.07 );
	transform: translateY( -3px );
}

/* .rec-card-tag */
.pitalua-destinatario__etiqueta {
	display: block;
	margin: 0 0 14px;
	color: var( --gold );
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	line-height: 1.6;
	text-transform: uppercase;
}

/* .rec-card h3 */
.pitalua-destinatario h3 {
	margin: 0 0 14px;
	color: var( --plum );
	font-family: var( --serif );
	font-size: 1.18rem;
	font-weight: 600;
	line-height: 1.3;
}

/* .rec-card p */
.pitalua-destinatario p:not( .pitalua-destinatario__etiqueta ) {
	margin: 0;
	color: var( --muted );
	font-size: 0.87rem;
	line-height: 1.75;
}

/* .rec-card.featured */
.pitalua-destinatario--destacado {
	border: 1px solid rgba( 195, 155, 76, 0.4 );
	border-top: 3px solid var( --gold );
	background: var( --plum-deep );
	color: var( --ivory );
	box-shadow: 0 16px 36px rgba( 63, 30, 57, 0.14 );
}

.pitalua-destinatario--destacado:hover {
	box-shadow: 0 20px 42px rgba( 63, 30, 57, 0.2 );
	transform: translateY( -4px );
}

.pitalua-destinatario--destacado h3 {
	color: var( --ivory );
}

.pitalua-destinatario--destacado p:not( .pitalua-destinatario__etiqueta ) {
	color: #d8cad2;
}

/* --- .timing --------------------------------------------------------------- */

.pitalua-momentos {
	position: relative;
	padding: clamp( 84px, 8.5vw, 114px ) 0;
	background: #fffaf5;
}

.pitalua-momentos::before {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 55%;
	background: url( "../../img/decor/patron-claro.webp" ) center / 280px repeat;
	opacity: 0.38;
	-webkit-mask-image: linear-gradient( to left, rgba( 0, 0, 0, 1 ) 15%, transparent 95% );
	mask-image: linear-gradient( to left, rgba( 0, 0, 0, 1 ) 15%, transparent 95% );
	pointer-events: none;
}

/* .timing-inner */
.pitalua-momentos__rejilla {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 1fr 1.15fr;
	gap: clamp( 44px, 5.5vw, 76px );
	align-items: start;
}

/* .timing-copy. The admin bar offset only exists for logged-in users. */
.pitalua-momentos__texto {
	position: sticky;
	top: calc( 104px + var( --wp-admin--admin-bar--height, 0px ) );
	align-self: start;
	height: fit-content;
}

/* .timing-copy h2 */
.pitalua-momentos__texto h2 {
	margin: 0 0 20px;
	font-size: clamp( 1.95rem, 2.8vw, 2.75rem );
	line-height: 1.2;
}

/* .timing-copy p */
.pitalua-momentos__texto > p:not( .pitalua-eyebrow ) {
	margin: 0 0 24px;
	color: #5f535d;
	font-size: clamp( 0.98rem, 1.08vw, 1.06rem );
	line-height: 1.86;
}

/*
 * The UA's bold. The prototype loads Montserrat only up to 600, so its 700 is drawn with the
 * 600 design; the theme's variable file reaches 900, so the axis is pinned to match.
 */
.pitalua-momentos__texto strong {
	font-weight: 700;
	font-variation-settings: "wght" 600;
}

/* .timing-highlight */
.pitalua-momentos__lema {
	margin-bottom: 28px;
	padding: 14px 20px 14px 24px;
	border-left: 3px solid var( --gold );
	background: rgba( 195, 155, 76, 0.08 );
}

/* .timing-highlight p */
.pitalua-momentos__lema p {
	margin: 0;
	color: var( --plum );
	font-family: var( --serif );
	font-size: 1.08rem;
	font-weight: 500;
	line-height: 1.6;
}

/* .timing-action */
.pitalua-momentos__accion {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	margin-top: 32px;
}

/* .timing-action .btn */
.pitalua-momentos__accion .wp-block-button .wp-block-button__link {
	min-height: 54px;
	padding: 0 34px;
	font-size: 0.76rem;
	letter-spacing: 0.13em;
	box-shadow: 0 10px 26px rgba( 82, 40, 74, 0.2 );
	transition: all 0.35s var( --ease );
}

.pitalua-momentos__accion .wp-block-button .wp-block-button__link:hover {
	box-shadow: 0 14px 34px rgba( 195, 155, 76, 0.3 );
	transform: translateY( -2px );
}

/* .timing-action-note */
.pitalua-momentos__nota {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	color: #6b5d69;
	font-size: 0.78rem;
	font-weight: 500;
	line-height: 1.4;
}

.pitalua-momentos__nota::before {
	content: "";
	display: inline-block;
	flex-shrink: 0;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var( --gold );
}

/* .timing-matrix-box */
.pitalua-momentos__matriz {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: clamp( 30px, 3.8vw, 42px );
	border: 1px solid var( --line );
	border-top: 3px solid var( --gold );
	background: #fff;
	box-shadow: 0 16px 42px rgba( 82, 40, 74, 0.07 );
}

/* .timing-matrix-head */
.pitalua-momentos__cabecera {
	padding-bottom: 16px;
	border-bottom: 1px solid var( --line );
}

/* .timing-matrix-badge */
.pitalua-momentos__etiqueta {
	display: block;
	margin: 0 0 8px;
	color: var( --gold );
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	line-height: 1.6;
	text-transform: uppercase;
}

/* .timing-matrix-head h3 */
.pitalua-momentos__cabecera h3 {
	margin: 0 0 8px;
	color: var( --plum );
	font-family: var( --serif );
	font-size: clamp( 1.22rem, 1.5vw, 1.42rem );
	font-weight: 700;
	line-height: 1.28;
}

/* .timing-matrix-head p */
.pitalua-momentos__cabecera p:not( .pitalua-momentos__etiqueta ) {
	margin: 0;
	color: var( --muted );
	font-size: 0.86rem;
	line-height: 1.65;
}

/* .timing-triggers */
.pitalua-momentos__lista {
	display: grid;
	gap: 12px;
}

/* .trigger-card */
.pitalua-momento {
	display: grid;
	grid-template-columns: 36px 1fr;
	gap: 16px;
	align-items: start;
	padding: 16px 18px;
	border: 1px solid var( --line );
	border-left: 3px solid transparent;
	background: #fffaf5;
	transition: all 0.28s var( --ease );
}

.pitalua-momento:hover {
	border-color: var( --line );
	border-left-color: var( --gold );
	background: #fff;
	box-shadow: 0 8px 24px rgba( 82, 40, 74, 0.06 );
	transform: translateX( 5px );
}

/* .trigger-num */
.pitalua-momento__numero {
	margin: 0;
	color: var( --gold );
	font-family: var( --serif );
	font-size: 1.1rem;
	font-weight: 600;
	line-height: 1.2;
}

/* .trigger-content h4 */
.pitalua-momento__contenido h4 {
	margin: 0 0 5px;
	color: var( --plum );
	font-family: var( --serif );
	font-size: 0.98rem;
	font-weight: 600;
	line-height: 1.32;
}

/* .trigger-content p */
.pitalua-momento__contenido p {
	margin: 0;
	color: #5a4f58;
	font-size: 0.84rem;
	line-height: 1.62;
}

/* --- .downloads-section ---------------------------------------------------- */

.pitalua-descargables {
	position: relative;
	overflow: hidden;
	padding: clamp( 84px, 8.5vw, 114px ) 0;
	border-top: 1px solid var( --line );
	background: #fffaf5;
}

/* .downloads-head */
.pitalua-descargables .pitalua-servicios__cabecera {
	margin-bottom: 48px;
}

/*
 * .downloads-grid. The prototype's one-column rule for it sits in the max-width: 980px block,
 * which comes BEFORE this declaration in its <style>: the later two-column rule wins at every
 * width, so the grid never collapses. Replicated as is.
 */
.pitalua-descargables__rejilla {
	display: grid;
	grid-template-columns: repeat( 2, 1fr );
	gap: 32px;
}

/* .download-card */
.pitalua-descargable {
	position: relative;
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: clamp( 32px, 3.8vw, 44px );
	border: 1px solid var( --line );
	border-top: 3px solid var( --gold );
	background: var( --ivory );
	transition: 0.35s var( --ease );
}

.pitalua-descargable:hover {
	background: #fff;
	box-shadow: 0 14px 34px rgba( 82, 40, 74, 0.07 );
	transform: translateY( -3px );
}

/* .download-badge */
.pitalua-descargable__etiqueta {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 14px;
	color: var( --gold );
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	line-height: 1.6;
	text-transform: uppercase;
}

/* .download-card h3 */
.pitalua-descargable h3 {
	margin: 0 0 14px;
	color: var( --plum );
	font-family: var( --serif );
	font-size: clamp( 1.22rem, 1.5vw, 1.45rem );
	font-weight: 700;
	line-height: 1.32;
}

/* .download-card p */
.pitalua-descargable p:not( .pitalua-descargable__etiqueta ) {
	flex-grow: 1;
	margin: 0 0 28px;
	color: var( --muted );
	font-size: 0.88rem;
	line-height: 1.75;
}

/* .download-action */
.pitalua-descargable__accion {
	margin-top: auto;
}

/*
 * The prototype's .btn neither forbids wrapping nor centres its text: in the narrow columns
 * these labels break between words and their lines start at the left. word-break undoes
 * core's break-word, which would split the words and shrink the min-content that sizes the
 * download columns. white-space and text-align are stated here too so the page does not
 * depend on what base.css sets for .wp-block-button__link.
 */
.pitalua-descargable .wp-block-button .wp-block-button__link,
.pitalua-momentos__accion .wp-block-button .wp-block-button__link {
	text-align: start;
	white-space: normal;
	word-break: normal;
}

/* The guide's is a <button> in the prototype: the UA centres its lines. */
.pitalua-descargable .is-style-dorado .wp-block-button__link {
	text-align: center;
}

/* --- Responsive ------------------------------------------------------------ */

@media ( max-width: 980px ) {

	.pitalua-servicio {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.pitalua-destinatarios__rejilla {
		grid-template-columns: 1fr;
	}

	.pitalua-momentos__rejilla {
		grid-template-columns: 1fr;
		gap: 32px;
	}

	.pitalua-momentos__texto {
		position: static;
	}
}
