/* ==========================================================================
   FICHA DE ESTABLECIMIENTO (single-establishments.php)
   y tarjeta de establecimiento (template-parts/establishment-card.php).
   ========================================================================== */

.mim-establishment {
	--mim-est-blue: #005888;
	--mim-est-light: #DDECF4;
	overflow: hidden;
}

/* --- Información: foto + logo, descripción y contacto ---------------------- */

.mim-est-info {
	display: flex;
	align-items: center;
	gap: 120px;
	max-width: 1520px;
	margin: 70px auto 0;
	padding: 0 20px 0 200px;
}

.mim-est-media {
	position: relative;
	flex: 0 1 768px;
	padding: 32px 0 0 52px;
}

.mim-est-media::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 86%;
	height: 92%;
	background-color: var(--mim-est-light);
	border-radius: 100px 0 100px 0;
}

.mim-est-media img {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 716 / 500;
	object-fit: cover;
	border-radius: 94px 0 0 0;
}

.mim-est-content {
	flex: 1 1 0;
	max-width: 652px;
}

.mim-est-logo {
	display: block;
	max-width: 225px;
	max-height: 93px;
	width: auto;
	height: auto;
	margin-bottom: 22px;
	object-fit: contain;
}

.mim-est-description {
	margin-bottom: 25px;
	font-family: 'Montserrat', sans-serif;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.5;
	color: #6F6F6F;
}

.mim-est-description p {
	margin: 0 0 1em;
	line-height: 1.5;
}

.mim-est-description p:last-child {
	margin-bottom: 0;
}

.mim-est-contact {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mim-est-contact li {
	display: flex;
	align-items: center;
	gap: 18px;
	font-family: 'Montserrat', sans-serif;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
	color: #333;
}

.mim-est-contact li + li {
	margin-top: 14px;
}

.mim-est-contact img {
	flex: 0 0 28px;
	width: 28px;
	height: 28px;
	object-fit: contain;
}

.mim-est-contact a {
	color: inherit;
	word-break: break-word;
}

.mim-est-contact a:hover,
.mim-est-contact a.is-underlined {
	text-decoration: underline;
}

.mim-est-services {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 25px 0 0;
	padding: 0;
	list-style: none;
}

.mim-est-services li {
	padding: 6px 14px;
	background-color: var(--mim-est-light);
	border-radius: 0 0 10px 0;
	font-family: 'Montserrat', sans-serif;
	font-size: 14px;
	font-weight: 600;
	color: #004D79;
}

.mim-est-services li::before {
	content: '✓ ';
}

.mim-est-menu {
	margin-top: 25px;
}

/* --- Relacionadas ------------------------------------------------------- */

.mim-est-related {
	max-width: 1520px;
	margin: 150px auto 100px;
	padding: 0 20px;
}

.mim-est-related-title {
	margin-bottom: 60px;
	text-align: center;
}

.mim-est-related-list {
	display: flex;
	justify-content: center;
	gap: 51px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mim-est-related-list > li {
	flex: 0 0 275px;
}

/* --- Tarjeta de establecimiento ------------------------------------------ */

.mim-est-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 323px;
	overflow: hidden;
	background-color: #DDECF4;
	border-radius: 0 0 50px 0;
	transition: transform .2s ease, box-shadow .2s ease;
}

.mim-est-card:hover,
.mim-est-card:focus-visible {
	transform: translateY(-4px);
	box-shadow: 0 10px 25px rgba(0, 88, 136, .15);
}

.mim-est-card-logo {
	display: flex;
	justify-content: center;
	align-items: center;
	height: 170px;
	padding: 10px 19px 0;
}

.mim-est-card-logo img {
	display: block;
	max-width: 100%;
	max-height: 160px;
	width: auto;
	height: auto;
	object-fit: contain;
}

.mim-est-card-name {
	flex: 1 1 auto;
	padding: 10px 19px 20px;
	font-family: 'Roboto Condensed', sans-serif;
	font-size: 25px;
	font-weight: 800;
	line-height: 1.05;
	text-align: center;
	text-transform: uppercase;
	color: #004D79;
}

.mim-est-card-button {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 58px;
	padding: 10px 20px;
	background-color: #00EAA4;
	border-radius: 0 0 50px 0;
	font-family: 'Montserrat', sans-serif;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
	text-align: center;
	text-transform: uppercase;
	color: #fff;
}

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

@media only screen and (max-width: 1300px) {
	.mim-est-info {
		gap: 60px;
		padding-left: 40px;
	}

	.mim-est-related-list {
		flex-wrap: wrap;
		gap: 40px;
	}
}

@media only screen and (max-width: 990px) {
	.mim-est-info {
		flex-direction: column-reverse;
		align-items: stretch;
		gap: 45px;
		padding: 0 20px;
	}

	.mim-est-content {
		max-width: none;
	}

	.mim-est-media {
		flex: none;
	}
}

@media only screen and (max-width: 767px) {
.mim-est-info {
		margin-top: 45px;
	}

	.mim-est-logo {
		margin-bottom: 18px;
	}

	.mim-est-contact li {
		gap: 14px;
	}

	.mim-est-contact img {
		flex-basis: 24px;
		width: 24px;
		height: 24px;
	}

	/* Foto: esquina inferior derecha y fondo detrás, como en el diseño móvil. */
	.mim-est-media {
		padding: 10px 0 0;
		margin-right: -6px;
	}

	.mim-est-media::before {
		top: 0;
		left: 41px;
		right: 0;
		width: auto;
		height: 98%;
		border-radius: 0 0 100px 0;
	}

	.mim-est-media img {
		aspect-ratio: 367 / 255;
		border-radius: 0 0 100px 0;
	}

	.mim-est-related {
		margin: 80px auto 60px;
	}

	.mim-est-related-title {
		margin-bottom: 30px;
		font-size: 36px;
	}

	/* Relacionadas: fila con scroll horizontal y tarjetas pequeñas. */
	.mim-est-related-list {
		flex-wrap: nowrap;
		justify-content: flex-start;
		gap: 26px;
		margin: 0 -20px;
		padding: 0 20px 10px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
	}

	.mim-est-related-list > li {
		flex: 0 0 143px;
		scroll-snap-align: start;
	}

	.mim-est-related-list .mim-est-card {
		min-height: 168px;
		border-radius: 0 0 29px 0;
	}

	.mim-est-related-list .mim-est-card-logo {
		height: 80px;
		padding: 15px 12px 0;
	}

	.mim-est-related-list .mim-est-card-logo img {
		max-height: 55px;
	}

	.mim-est-related-list .mim-est-card-name {
		padding: 8px 10px 10px;
		font-size: 18px;
	}

	.mim-est-related-list .mim-est-card-button {
		min-height: 30px;
		padding: 6px 10px;
		border-radius: 0 0 29px 0;
		font-size: 12px;
	}
}
