/*--------------------------------------------------------------
# Footer: franja hierba y pie (referencia diseño SOGAMA)
--------------------------------------------------------------*/

/*
 * Solape hierba / main: o fondo do <main> continúa baixo a franja de césped
 * (PNG con transparencia). As landings non precisan configuración extra.
 */
:root {
	--sogama-grass-height: 56px;
	--sogama-grass-overlap: 40px;
}

#page > main {
	position: relative;
	z-index: 1;
	padding-bottom: calc(3rem + var(--sogama-grass-overlap));
}

/* Landings a ancho completo: o fondo do main chega á zona do césped */
#page > main.site-main--landing {
	max-width: none;
	width: 100%;
	padding-left: 0;
	padding-right: 0;
}

.site-footer-region {
	position: relative;
	z-index: 5;
	margin-top: calc(-1 * var(--sogama-grass-overlap));
	isolation: isolate;
}

/* Franja de hierba sobre el pie (imagen en img/grass-footer.png) */
.grass-footer {
	display: block;
	width: 100%;
	min-height: var(--sogama-grass-height);
	margin: 0;
	padding: 0;
	border: 0;
	background-color: transparent;
	background-image: url("../img/grass-footer.png");
	background-repeat: repeat-x;
	background-position: center top;
	background-size: auto 100%;
	pointer-events: none;
}

.site-footer.site-footer--main {
	background: #fff;
	color: var(--sogama-color-footer-text);
	border-top: none;
	font-family: var(--sogama-font-body);
}

.site-footer__content {
	max-width: 1280px;
	margin: 0 auto;
	padding: 2.25rem clamp(1rem, 4vw, 2rem) 2rem;
	display: flex;
	flex-direction: column;
	gap: 2.25rem;
	box-sizing: border-box;
	align-items: stretch;
}

@media screen and (min-width: 48em) {

	.site-footer__content {
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: flex-start;
		align-items: flex-start;
		column-gap: 70px;
		row-gap: 2rem;
	}

	.site-footer__column--brand {
		flex: 0 1 auto;
		max-width: min(100%, 28rem);
	}

	.site-footer__column--contact {
		flex: 1 1 auto;
		min-width: 0;
		max-width: none;
	}
}

.site-footer__column--brand {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.site-footer__logos {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem 1.25rem;
}

.site-footer__logo img {
	display: block;
	height: auto;
	width: auto;
}

.site-footer__logo--sogama img {
	max-height: 56px;
}

.site-footer__logo--xacobeo img {
	max-height: 64px;
}

.site-footer__social-list {
	display: flex;
	flex-wrap: wrap;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 0.4rem;
}

/* Iconos circulares marrón SOGAMA (iconos SVG en blanco) */
.site-footer__social-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.125rem;
	height: 2.125rem;
	border-radius: 50%;
	background: var(--sogama-color-brown);
	transition: background 0.2s ease, transform 0.15s ease;
}

.site-footer__social-link:hover,
.site-footer__social-link:focus {
	background: var(--sogama-color-brown-dark);
	outline: none;
}

.site-footer__social-link img {
	display: block;
	width: 18px;
	height: 18px;
}

.site-footer__column--contact .site-footer__heading {
	margin: 0 0 0.85rem;
	font-family: var(--sogama-font-nav);
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: normal;
	text-transform: none;
	color: var(--sogama-color-heading);
}

.site-footer__address {
	margin: 0 0 0.65rem;
	line-height: 1.65;
	font-size: 0.9375rem;
	color: var(--sogama-color-footer-text);
}

/* Mantiene espacio + «Ver mapa» en la misma línea que el final de la dirección cuando cabe. */
.site-footer__map-inline {
	display: inline;
	white-space: nowrap;
}

.site-footer__map-link {
	display: inline;
	margin: 0;
	color: var(--sogama-color-brand);
	font-weight: 600;
	text-decoration: none;
}

.site-footer__map-link:hover,
.site-footer__map-link:focus {
	text-decoration: underline;
}

.site-footer__contact-line {
	margin: 0 0 0.4rem;
	line-height: 1.5;
	font-size: 0.9375rem;
}

.site-footer__contact-email,
.site-footer__contact-email:visited {
	font-weight: 700;
	color: var(--sogama-color-footer-text);
	text-decoration: none;
}

.site-footer__contact-email:hover,
.site-footer__contact-email:focus {
	color: var(--sogama-color-brand);
	text-decoration: underline;
}

.site-footer__contact-phone {
	font-weight: 500;
	color: var(--sogama-color-footer-text);
	text-decoration: none;
}

.site-footer__contact-phone:hover,
.site-footer__contact-phone:focus {
	color: var(--sogama-color-brand);
	text-decoration: underline;
}

/* Botón outline: borde y texto azul, fondo blanco */
.site-footer__btn {
	display: inline-block;
	margin-top: 0.85rem;
	padding: 0.55rem 1.25rem;
	background: #fff;
	color: var(--sogama-color-brand) !important;
	font-family: var(--sogama-font-nav);
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-decoration: none;
	border: 1px solid var(--sogama-color-brand);
	border-radius: 5px;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.site-footer__btn:hover,
.site-footer__btn:focus {
	background: rgba(0, 123, 196, 0.06);
	color: var(--sogama-color-brand-dark) !important;
	border-color: var(--sogama-color-brand-dark);
}

/* Franja inferior: menú WordPress «menu-legal», tipografía reducida */
.site-footer__legal {
	background: #fff;
	border-top: 1px solid #e0e0e0;
	padding: 0.65rem clamp(1rem, 4vw, 2rem);
	font-family: var(--sogama-font-body);
}

.site-footer__legal-inner {
	max-width: 1280px;
	margin: 0 auto;
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	align-items: center;
	gap: 0.45rem 1rem;
	text-align: right;
}

.site-footer__copyright {
	margin: 0;
	font-size: 0.75rem;
	font-weight: 500;
	color: var(--sogama-color-text);
	letter-spacing: 0.02em;
	line-height: 1.4;
}

.footer-nav--legal-bar {
	margin: 0;
}

.footer-menu--legal-bar {
	display: flex;
	flex-wrap: wrap;
	list-style: none;
	margin: 0;
	padding: 0;
	align-items: center;
	justify-content: flex-end;
	gap: 0;
}

.footer-menu--legal-bar li {
	display: flex;
	align-items: center;
	margin: 0;
}

.footer-menu--legal-bar li + li::before {
	content: "|";
	margin: 0 0.4rem;
	color: #c8c8c8;
	font-weight: 400;
	font-size: 0.75rem;
}

.footer-menu--legal-bar a,
.footer-menu--legal-bar a:visited {
	font-family: var(--sogama-font-body);
	font-size: 0.75rem;
	font-weight: 400;
	color: var(--sogama-color-brand);
	text-decoration: underline;
	text-underline-offset: 0.15em;
	text-decoration-thickness: 1px;
	line-height: 1.4;
}

.footer-menu--legal-bar a:hover,
.footer-menu--legal-bar a:focus,
.footer-menu--legal-bar a:visited:hover,
.footer-menu--legal-bar a:visited:focus {
	color: var(--sogama-color-brand-dark);
	text-decoration: underline;
}

.site-footer__legal-fallback {
	margin: 0;
	font-size: 0.75rem;
	color: var(--sogama-color-footer-text);
	line-height: 1.5;
	max-width: 22rem;
}
