/* Home — Figma "Landing page" (2130:370), same reduced scale as the code-rendered pages. */

.fgt-home {
	--fgh-text: 0.96875rem;
	--fgh-green: var(--color-primary);
	--fgh-orange: var(--color-section-orange);
	--fgh-dark: var(--color-text);
}

@media (min-width: 1024px) {
	.fgt-home {
		--fgh-text: 1.0625rem;
	}
}

/*
 * The site's global styles (custom CSS in the database) darken the first group
 * of the old home with ".home main > .wp-block-group:first-child::before".
 * Here that group wraps the whole page, so cancel it. The Figma hero is not darkened.
 */
.fgt-home main > .wp-block-group.fgh:first-child::before {
	content: none;
}

/* Reset block-gap margins inside the home pattern; spacing is set below. */
.wp-block-group.fgh * {
	margin-block-start: 0;
	margin-block-end: 0;
}

.wp-block-group.fgh {
	font-size: var(--fgh-text);
	line-height: 1.45;
	color: var(--fgh-dark);
}

.fgh .fgh-section {
	box-sizing: border-box;
	width: 100%;
	max-width: var(--container-max);
	margin-left: auto;
	margin-right: auto;
	padding: 2.75rem var(--content-padding-x) 0;
}

.fgh .fgh-split-text > p + p,
.fgh .fgh-step > p + p,
.fgh .fgh-magazine > p,
.fgh .fgh-section > .wp-block-heading + p {
	margin-top: 0.9em;
}

/* Titles */
.fgh .fgh-title {
	margin-bottom: 1.25rem;
	font-family: var(--font-body);
	font-size: clamp(1.75rem, 3.6vw, 2.8rem);
	font-style: italic !important;
	font-weight: 600 !important; /* Aileron SemiBold Italic, as in the Figma */
	font-synthesis: none;
	line-height: 1.08;
	letter-spacing: 0;
	color: var(--fgh-green);
}

.fgh .fgh-title--plain {
	font-style: normal !important;
	font-weight: 600 !important;
}

.fgh .fgh-subtitle {
	margin-bottom: 0.75rem;
	font-family: var(--font-body);
	font-size: clamp(1.2rem, 1.95vw, 1.5rem);
	font-style: normal;
	font-weight: 700;
	line-height: 1.15;
	color: var(--fgh-dark);
}

.fgh .fgh-subtitle--center {
	text-align: center;
}

.fgh .fgh-link {
	color: var(--fgh-green);
	text-decoration: none;
}

.fgh .fgh-link:hover,
.fgh .fgh-link:focus-visible {
	text-decoration: underline;
}

.fgh .fgh-orange {
	color: var(--fgh-orange);
}

/* Hero */
.fgh .fgh-hero {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1.5rem;
	min-height: clamp(20rem, 34vw, 30rem);
	margin: 0 20px;
	padding: 3rem var(--content-padding-x);
	background: #2d2d2d url(../img/home/hero.webp) center 45% / cover no-repeat;
	text-align: center;
}

.fgh .fgh-hero-title {
	font-family: var(--font-body);
	font-size: clamp(2.2rem, 3.6vw, 3.25rem);
	font-style: italic !important;
	font-weight: 700 !important;
	line-height: 0.98;
	color: #fff;
	text-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

.fgh .fgh-hero-kicker {
	display: block;
	margin-bottom: 0.15em;
	font-size: 0.5em;
	font-weight: 300 !important;
}

/* Outline buttons */
.fgh .fgh-buttons {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.85rem 3rem;
}

.fgh .fgh-btn .wp-block-button__link {
	min-height: 0;
	padding: 0.5rem 1.4rem;
	border: 2px solid currentColor;
	border-radius: 50px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 6px 2px rgba(0, 0, 0, 0.15);
	font-family: var(--font-body);
	font-size: 0.975rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
}

.fgh .fgh-btn--green .wp-block-button__link {
	color: var(--fgh-green);
}

.fgh .fgh-btn--orange .wp-block-button__link {
	color: var(--fgh-orange);
}

.fgh .fgh-btn--green .wp-block-button__link:hover,
.fgh .fgh-btn--green .wp-block-button__link:focus-visible {
	border-color: var(--fgh-green);
	background: var(--fgh-green);
	color: #fff;
}

.fgh .fgh-btn--orange .wp-block-button__link:hover,
.fgh .fgh-btn--orange .wp-block-button__link:focus-visible {
	border-color: var(--fgh-orange);
	background: var(--fgh-orange);
	color: #fff;
}

/* Text + image rows */
.fgh .fgh-split {
	display: grid;
	gap: 1.5rem;
	align-items: start;
}

.fgh .fgh-split + .fgh-split {
	margin-top: 2.75rem;
}

.fgh .fgh-img img,
.fgh .fgh-magazine-img img {
	display: block;
	width: 100%;
	height: auto;
}

@media (min-width: 768px) {
	.fgh .fgh-split-text p,
	.fgh .fgh-magazine > p,
	.fgh #divulgacion > p {
		text-align: justify;
	}

	.fgh .fgh-split {
		gap: 2rem;
	}

	.fgh .fgh-split--text-first {
		grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	}

	.fgh .fgh-split--media-first {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
	}

	.fgh .fgh-split--text-first:has(.fgh-img--narrow) {
		grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
	}
}

/* Separators */
.fgh .fgh-sep {
	width: calc(100% - 2 * var(--content-padding-x));
	max-width: calc(var(--container-max) - 2 * var(--content-padding-x));
	height: 0;
	margin: 2.75rem auto 0;
	border: 0;
	border-top: 1px solid rgba(219, 74, 43, 0.45);
	opacity: 1;
}

.fgh .fgh-sep--short {
	width: min(40rem, 60%);
	border-top-color: #d9d9d9;
}

/* Timeline */
.fgh .fgh-timeline {
	position: relative;
	display: grid;
	gap: 1.5rem;
	margin-top: 1.75rem;
	padding-left: 1.75rem;
}

.fgh .fgh-timeline::before {
	content: "";
	position: absolute;
	top: 0.4rem;
	bottom: 0.4rem;
	left: 0.4rem;
	width: 2px;
	background: var(--fgh-green);
}

.fgh .fgh-step {
	position: relative;
}

.fgh .fgh-step::before {
	content: "";
	position: absolute;
	top: 0.3rem;
	left: calc(-1.75rem + 0.4rem - 7px + 1px);
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--fgh-green);
}

.fgh .fgh-step-label {
	font-weight: 700;
	color: var(--fgh-green);
}

@media (min-width: 768px) {
	.fgh .fgh-timeline {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		column-gap: 4rem;
		row-gap: 0;
		padding-left: 0;
	}

	.fgh .fgh-timeline::before {
		left: calc(50% - 1px);
	}

	.fgh .fgh-step {
		padding-bottom: 1.75rem;
	}

	.fgh .fgh-step:nth-child(odd) {
		grid-column: 1;
		text-align: right;
	}

	.fgh .fgh-step:nth-child(even) {
		grid-column: 2;
	}

	.fgh .fgh-step:nth-child(1) { grid-row: 1; }
	.fgh .fgh-step:nth-child(2) { grid-row: 2; }
	.fgh .fgh-step:nth-child(3) { grid-row: 3; }
	.fgh .fgh-step:nth-child(4) { grid-row: 4; }

	.fgh .fgh-step:nth-child(odd)::before {
		left: auto;
		right: calc(-2rem - 7px);
	}

	.fgh .fgh-step:nth-child(even)::before {
		left: calc(-2rem - 7px);
	}
}

/* Cards (areas, news, partners) */
.fgh .fgh-card {
	box-sizing: border-box;
	overflow: hidden;
	border: 2px solid var(--fgh-green);
	border-radius: 8px;
	background: #fff;
}

.fgh .fgh-card-title,
.fgh .fgh-card-title a {
	font-family: var(--font-body);
	font-style: normal !important;
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--fgh-dark);
	text-decoration: none;
}

.fgh .fgh-card-more a,
.fgh a.fgh-card-more {
	font-size: 0.975rem;
	color: var(--fgh-green);
	text-decoration: none;
}

.fgh .fgh-card-title a:hover,
.fgh .fgh-card-more a:hover,
.fgh a.fgh-card-more:hover {
	text-decoration: underline;
}

.fgh .fgh-card-img img {
	display: block;
	width: 100%;
	border-radius: 0;
	aspect-ratio: 381 / 188;
	height: auto;
	object-fit: cover;
}

/* Areas: 3 + 2 centred */
.fgh .fgh-areas {
	display: grid;
	gap: 1.25rem;
}

.fgh .fgh-area {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 0.45rem 0.9rem 0.6rem;
}

.fgh .fgh-area .fgh-card-img {
	margin: 0 -0.9rem;
}

@media (min-width: 640px) {
	.fgh .fgh-areas {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.fgh .fgh-area {
		grid-column: span 2;
	}

	.fgh .fgh-area:last-child {
		grid-column: 2 / span 2;
	}
}

@media (min-width: 1024px) {
	.fgh .fgh-areas {
		grid-template-columns: repeat(6, minmax(0, 1fr));
		gap: 1.5rem 1.75rem;
	}

	.fgh .fgh-area:nth-child(4) {
		grid-column: 2 / span 2;
	}

	.fgh .fgh-area:last-child {
		grid-column: 4 / span 2;
	}
}

/* Magazine */
.fgh .fgh-magazine-img {
	max-width: 46rem;
	margin: 1.75rem auto 0 !important;
}

.fgh .fgh-magazine .fgh-buttons {
	margin-top: 1.75rem;
}

/* News (query loop) */
.fgh .fgh-news {
	margin-top: 1.5rem;
}

.fgh .fgh-news .wp-block-post-template {
	gap: 1.5rem 1.75rem;
	margin: 0;
	padding: 0;
}

.fgh .fgh-news-more {
	margin-top: 1.75rem;
}

.fgh .fgh-news-card {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.fgh .fgh-news-card .fgh-card-img {
	margin: 0;
}

.fgh .fgh-news-card .fgh-card-img img {
	aspect-ratio: 16 / 9;
}

.fgh .fgh-news-card .fgh-card-title {
	padding: 0.85rem 1rem 0;
}

.fgh .fgh-news-card .fgh-card-more {
	margin-top: auto !important;
	padding: 0.85rem 1rem 0.9rem;
}

/* Partners */
.fgh .fgh-partners-section {
	padding-bottom: 3.9rem;
}

.fgh .fgh-partners {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
}

.fgh .fgh-partner {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 0.5rem 0.9rem 0.9rem;
}

.fgh .fgh-partner-name {
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.3;
}

.fgh .fgh-partner-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1;
	min-height: 6rem;
}

.fgh .fgh-partner-logo img {
	display: block;
	width: auto;
	max-width: 100%;
	max-height: 6rem;
	object-fit: contain;
}

@media (min-width: 768px) {
	.fgh .fgh-partners {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 1.25rem 1.5rem;
	}
}
