/* Megamenú de la cabecera y menú del popup móvil (inc/megamenu.php). */

.bpm,
.bpmm {
	--bpm-tinta: var(--e-global-color-primary, #23282f);
	--bpm-gris: var(--e-global-color-secondary, #767676);
	--bpm-acento: var(--e-global-color-accent, #e7b46f);
	--bpm-filete: #d8d8d8;
	font-family: var(--e-global-typography-text-font-family, "Source Sans 3"), sans-serif;
}

.bpm ul,
.bpmm ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.bpm a,
.bpmm a {
	text-decoration: none;
	transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}

/* Primer nivel */

.bpm {
	position: relative;
}

.bpm .bpm-lista-principal {
	display: flex;
	align-items: center;
}

.bpm .bpm-item {
	padding: 0 10px;
}

.bpm .bpm-item__enlace {
	display: block;
	color: var(--bpm-tinta);
	font-size: 18px;
	font-weight: 600;
	line-height: 27px;
}

.bpm .bpm-item__enlace:hover,
.bpm .bpm-item__enlace:focus-visible,
.bpm .bpm-item.is-actual > .bpm-item__enlace,
.bpm .bpm-item.is-abierto > .bpm-item__enlace {
	color: var(--bpm-acento);
}

/* Panel: --bpm-left, --bpm-width y --bpm-hueco los calcula megamenu.js
   a partir del elemento de data-ancho. */

.bpm .bpm-panel {
	position: absolute;
	top: 100%;
	left: var(--bpm-left, 0);
	z-index: 999;
	width: var(--bpm-width, min(1200px, 100vw));
	padding-top: var(--bpm-hueco, 0);
	opacity: 0;
	visibility: hidden;
	/* Al cerrar, la visibilidad cambia cuando ha terminado el fundido. */
	transition: opacity 0.3s cubic-bezier(0.48, 0.01, 0.5, 0.99), visibility 0s linear 0.3s;
}

.bpm:not(.bpm--js) .bpm-item:hover > .bpm-panel,
.bpm:not(.bpm--js) .bpm-item:focus-within > .bpm-panel,
.bpm .bpm-item.is-abierto > .bpm-panel {
	opacity: 1;
	visibility: visible;
	/* Al abrir, visible al instante (también con teclado). */
	transition: opacity 0.3s cubic-bezier(0.48, 0.01, 0.5, 0.99), visibility 0s;
}

.bpm .bpm-panel__caja {
	display: grid;
	padding: 20px 30px 30px;
	background: #fff;
	border: 1px solid var(--bpm-filete);
	border-top: 0;
	color: var(--bpm-tinta);
	font-size: 16px;
	line-height: 1.5;
}

.bpm .bpm-panel__col {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: 10px;
}

.bpm .bpm-panel__col:first-child {
	border-right: 1px solid var(--bpm-filete);
}

.bpm .bpm-panel__col + .bpm-panel__col {
	padding-left: 40px;
}

.bpm .bpm-panel--conocenos .bpm-panel__caja { grid-template-columns: 40fr 60fr; }
.bpm .bpm-panel--servicios .bpm-panel__caja { grid-template-columns: 1fr 2fr; }
.bpm .bpm-panel--perspectiva .bpm-panel__caja { grid-template-columns: 75fr 25fr; }
.bpm .bpm-panel--perspectiva .bpm-panel__col:first-child { padding-right: 45px; }
.bpm .bpm-panel--perspectiva .bpm-panel__col + .bpm-panel__col { padding-left: 45px; }

/* Piezas comunes */

.bpm .bpm-titulo {
	margin-bottom: 20px;
	color: var(--bpm-tinta);
	font-size: 22px;
	font-weight: 600;
	line-height: 33px;
}

.bpm .bpm-lista {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.bpm .bpm-lista__enlace {
	color: var(--bpm-tinta);
	font-size: 17px;
	font-weight: 500;
	line-height: 1.5;
}

.bpm .bpm-titulo:hover,
.bpm .bpm-lista__enlace:hover,
.bpm .bpm-titulo:focus-visible,
.bpm .bpm-lista__enlace:focus-visible {
	color: var(--bpm-acento);
}

.bpm .bpm-mas {
	color: var(--bpm-acento);
	font-size: 17px;
	font-weight: 500;
	line-height: 1;
}

.bpm .bpm-mas:hover,
.bpm .bpm-mas:focus-visible {
	color: var(--bpm-tinta);
}

/* Conócenos */

.bpm .bpm-geiser__antetitulo {
	margin: 0 0 20px;
	color: var(--bpm-acento);
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
}

.bpm .bpm-geiser__logo {
	display: block;
	width: 100px;
	height: auto;
	margin-bottom: 20px;
}

.bpm .bpm-geiser__texto {
	margin: 0 0 20px;
	font-size: 16px;
	line-height: 24px;
}

.bpm .bpm-geiser__boton {
	padding: 12px 24px;
	background: #ff4563;
	color: #fff;
	font-size: 15px;
	font-weight: 500;
	line-height: 1;
	text-transform: uppercase;
}

.bpm .bpm-geiser__boton:hover,
.bpm .bpm-geiser__boton:focus-visible {
	background: var(--bpm-tinta);
	color: #fff;
}

/* Servicios */

.bpm .bpm-servicios__texto {
	margin: 0 0 24px;
	color: var(--bpm-gris);
	font-size: 17px;
	line-height: 28px;
}

.bpm .bpm-servicios__pregunta {
	margin: 0 0 20px;
	font-size: 20px;
	font-weight: 600;
	line-height: 1;
}

.bpm .bpm-pildoras {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

.bpm .bpm-pildora {
	display: block;
	padding: 12px 24px;
	background: #fff;
	border: 2px solid #f5f5f5;
	border-radius: 20px;
	color: var(--bpm-acento);
	font-size: 18px;
	font-weight: 600;
	line-height: 1;
}

.bpm .bpm-pildora:hover,
.bpm .bpm-pildora:focus-visible {
	background: var(--bpm-acento);
	border-color: var(--bpm-acento);
	color: #fff;
}

/* Perspectiva */

.bpm .bpm-tarjetas {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 30px;
	width: 100%;
}

.bpm .bpm-tarjeta {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.bpm .bpm-tarjeta__imagen {
	display: block;
	width: 100%;
	margin-bottom: 20px;
}

.bpm .bpm-tarjeta__imagen img {
	display: block;
	width: 100%;
	height: 160px;
	object-fit: cover;
}

.bpm .bpm-tarjeta__categoria {
	margin-bottom: 10px;
	padding: 5px 15px;
	background: #f7f7f7;
	border-radius: 99px;
	color: var(--bpm-acento);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.5;
}

.bpm .bpm-tarjeta__titulo {
	margin-bottom: 10px;
	color: var(--bpm-tinta);
	font-size: 19px;
	font-weight: 600;
	line-height: 24px;
}

.bpm .bpm-tarjeta__titulo:hover,
.bpm .bpm-tarjeta__titulo:focus-visible,
.bpm .bpm-tarjeta__categoria:hover,
.bpm .bpm-tarjeta__categoria:focus-visible {
	text-decoration: underline;
}

.bpm .bpm-tarjeta__fecha {
	color: var(--bpm-gris);
	font-size: 14px;
	line-height: 1.5;
}

.bpm .bpm-panel--perspectiva .bpm-mas {
	margin-top: 23px;
}

/* Menú del popup móvil */

.bpmm .bpmm-item--n0 {
	padding: 17px 0;
}

.bpmm .bpmm-item__fila {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.bpmm .bpmm-item__enlace {
	color: var(--bpm-tinta);
	font-size: 22px;
	font-weight: 400;
	line-height: 33px;
}

.bpmm .bpmm-item--n1 {
	padding: 6px 0;
}

.bpmm .bpmm-item--n1 .bpmm-item__enlace {
	font-size: 18px;
	line-height: 24px;
}

.bpmm .bpmm-item__enlace:hover,
.bpmm .bpmm-item__enlace:focus-visible,
.bpmm .bpmm-item__enlace[aria-current="page"] {
	color: var(--bpm-acento);
}

.bpmm .bpmm-sub {
	padding-top: 16px;
}

.bpmm .bpmm-sub[hidden] {
	display: none;
}

/* El tema padre da fondo y color a todos los botones: se anulan aquí. */
.bpmm .bpmm-item__abrir,
.bpmm .bpmm-item__abrir:hover,
.bpmm .bpmm-item__abrir:focus {
	display: grid;
	place-items: center;
	flex: none;
	width: 44px;
	height: 44px;
	/* Zona táctil de 44 px sin alargar la fila de 33 px. */
	margin: -6px -12px -6px 0;
	padding: 0;
	background: none;
	border: 0;
	color: var(--bpm-tinta);
	cursor: pointer;
}

.bpmm .bpmm-item__abrir span {
	width: 0;
	height: 0;
	border-top: 4px solid transparent;
	border-bottom: 4px solid transparent;
	border-left: 6px solid currentColor;
	transition: transform 0.2s;
}

.bpmm .bpmm-item__abrir[aria-expanded="true"] span {
	transform: rotate(90deg);
}

@media (prefers-reduced-motion: reduce) {
	.bpm-panel,
	.bpmm-item__abrir span {
		transition: none;
	}
}
