/**
 * Corazón Maps — estilos del front (marcadores corazón, popup, filtros, tour).
 */

.cm-wrap {
	--cm-accent: #e11d48;
	--cm-radius: 16px;
	margin: 1.5em 0;
	color: #18181b;
}

.cm-title {
	margin: 0 0 0.75rem;
	font-size: 1.35rem;
	line-height: 1.3;
}

.cm-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 12px;
}

.cm-chip {
	border: 1px solid #e4e4e7;
	background: #fff;
	color: #3f3f46;
	border-radius: 999px;
	padding: 6px 14px;
	font-size: 13px;
	line-height: 1.4;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.cm-chip:hover {
	border-color: var(--cm-accent);
	color: var(--cm-accent);
	transform: translateY(-1px);
}

.cm-chip.is-active {
	background: var(--cm-accent);
	border-color: var(--cm-accent);
	color: #fff;
}

.cm-chip-tour {
	margin-left: auto;
	font-weight: 600;
}

.cm-body {
	display: flex;
	gap: 14px;
	align-items: stretch;
}

.cm-map {
	flex: 1 1 auto;
	min-width: 0;
	position: relative;
	border-radius: var(--cm-radius);
	overflow: hidden;
	box-shadow: 0 10px 30px rgba(24, 24, 27, 0.12);
	background: #eef0f2;
	z-index: 0;
}

.cm-map .leaflet-tile {
	filter: saturate(0.72) brightness(1.02);
}

.cm-list {
	width: 300px;
	flex: 0 0 300px;
	max-height: 560px;
	overflow: auto;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.cm-list-item {
	display: flex;
	align-items: center;
	gap: 10px;
	text-align: left;
	background: #fff;
	border: 1px solid #e4e4e7;
	border-radius: 12px;
	padding: 10px 12px;
	cursor: pointer;
	transition: border-color 0.2s ease, transform 0.15s ease;
}

.cm-list-item:hover {
	border-color: var(--cm-accent);
	transform: translateX(2px);
}

.cm-list-heart {
	color: var(--cm-accent);
	flex: 0 0 auto;
}

.cm-list-heart svg {
	width: 16px;
	height: 16px;
	display: block;
}

.cm-list-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.cm-list-text strong {
	font-size: 14px;
	color: #18181b;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cm-list-text small {
	color: #71717a;
	font-size: 12px;
}

/* ---------- Marcadores corazón ---------- */

.cm-marker {
	background: transparent;
	border: none;
}

.cm-heart {
	position: relative;
	width: 36px;
	height: 44px;
	display: grid;
	place-items: center;
	color: var(--cm-accent);
	filter: drop-shadow(0 6px 12px rgba(225, 29, 72, 0.35));
	animation: cm-pulse 2.4s ease-in-out infinite;
}

.cm-heart svg {
	width: 30px;
	height: 30px;
	display: block;
}

.cm-marker.is-active .cm-heart {
	animation-duration: 1.2s;
}

.cm-marker.is-active .cm-heart::after {
	content: '';
	position: absolute;
	inset: 4px 4px 12px;
	border: 2px solid var(--cm-accent);
	border-radius: 999px;
	opacity: 0.6;
	animation: cm-halo 1.6s ease-out infinite;
}

@keyframes cm-pulse {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.16); }
}

@keyframes cm-halo {
	0% { transform: scale(0.7); opacity: 0.7; }
	100% { transform: scale(1.6); opacity: 0; }
}

/* ---------- Popup ---------- */

.cm-popup-wrapper .leaflet-popup-content-wrapper {
	border-radius: 14px;
	box-shadow: 0 18px 40px rgba(24, 24, 27, 0.22);
	padding: 0;
	overflow: hidden;
}

.cm-popup-wrapper .leaflet-popup-content {
	margin: 0;
	width: auto !important;
	line-height: 1.45;
}

.cm-popup {
	min-width: 230px;
	max-width: 280px;
}

.cm-popup-photo {
	width: 100%;
	height: 120px;
	object-fit: cover;
	display: block;
}

.cm-popup-body {
	padding: 12px 14px 14px;
}

.cm-badge {
	display: inline-block;
	background: #ffe4e6;
	color: #991b1b;
	font-size: 11px;
	font-weight: 600;
	padding: 2px 10px;
	border-radius: 999px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.cm-popup-name {
	margin: 6px 0 4px;
	font-size: 16px;
	line-height: 1.25;
}

.cm-popup-note {
	margin: 0 0 4px;
	font-size: 13px;
	color: #52525b;
}

.cm-popup-address {
	margin: 0 0 10px;
	font-size: 12px;
	color: #71717a;
}

.cm-popup-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.cm-btn {
	border: 1px solid #e4e4e7;
	background: #fff;
	border-radius: 999px;
	padding: 6px 12px;
	font-size: 12.5px;
	cursor: pointer;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #3f3f46;
	position: relative;
	transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.cm-btn-like:hover {
	border-color: var(--cm-accent);
	color: var(--cm-accent);
}

.cm-btn-like.is-voted {
	background: var(--cm-accent);
	border-color: var(--cm-accent);
	color: #fff;
	cursor: default;
}

.cm-btn-fav.is-active {
	background: #09090b;
	border-color: #09090b;
	color: #fff;
}

.cm-btn-maps {
	color: var(--cm-accent);
	border-color: var(--cm-accent);
	text-decoration: none;
}

/* ---------- Ráfaga de corazones al votar ---------- */

.cm-burst-heart {
	position: absolute;
	left: 50%;
	top: 0;
	font-size: 14px;
	color: var(--cm-accent);
	pointer-events: none;
	animation: cm-burst 0.6s ease-out forwards;
}

@keyframes cm-burst {
	0% { transform: translate(0, 0) scale(1); opacity: 1; }
	100% { transform: translate(var(--bx, 0), -44px) scale(0.4); opacity: 0; }
}

/* ---------- HUD del modo tour ---------- */

.cm-tour {
	margin-top: 12px;
	background: #fff;
	border: 1px solid #e4e4e7;
	border-radius: 14px;
	padding: 10px 14px;
	display: flex;
	align-items: center;
	gap: 14px;
	box-shadow: 0 10px 30px rgba(24, 24, 27, 0.12);
	flex-wrap: wrap;
}

.cm-tour[hidden] {
	display: none;
}

.cm-tour-info {
	display: flex;
	flex-direction: column;
	min-width: 140px;
	flex: 1;
}

.cm-tour-info strong {
	font-size: 14px;
}

.cm-tour-info span {
	font-size: 12px;
	color: #71717a;
}

.cm-tour-bar {
	flex: 2 1 120px;
	height: 6px;
	background: #f4f4f5;
	border-radius: 999px;
	overflow: hidden;
}

.cm-tour-bar span {
	display: block;
	height: 100%;
	background: var(--cm-accent);
	transition: width 0.4s ease;
}

.cm-tour-controls {
	display: flex;
	gap: 6px;
}

.cm-tour-controls button {
	border: 1px solid #e4e4e7;
	background: #fff;
	border-radius: 10px;
	min-width: 34px;
	height: 34px;
	cursor: pointer;
	font-size: 14px;
	line-height: 1;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.cm-tour-controls button:hover {
	border-color: var(--cm-accent);
	color: var(--cm-accent);
}

.cm-empty {
	color: #71717a;
	font-size: 14px;
}

@media (max-width: 782px) {
	.cm-body {
		flex-direction: column;
	}

	.cm-list {
		width: 100%;
		flex: none;
		max-height: 240px;
	}

	.cm-chip-tour {
		margin-left: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cm-heart,
	.cm-marker.is-active .cm-heart,
	.cm-marker.is-active .cm-heart::after,
	.cm-burst-heart {
		animation: none !important;
	}
}
/* Accessible basemap switch and network status, outside the map controls. */
.cm-wrap .cm-basemap-info { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:8px 16px; padding:9px 0; color:#172d43; font-size:13px; line-height:1.45; }
.cm-wrap .cm-basemap-info[hidden], .cm-wrap .cm-basemap-status[hidden] { display:none !important; }
.cm-wrap .cm-basemap-info label { color:#172d43; background:#fff; padding:5px 8px; border-radius:6px; }
.cm-wrap .cm-basemap-select { color:#172d43; background:#fff; border:1px solid #aab8c5; border-radius:6px; padding:5px 8px; font:inherit; max-width:100%; }
.cm-wrap .cm-basemap-status { background:#fff; border:1px solid #c3cdd6; border-radius:6px; color:#172d43; padding:7px 10px; flex:1 1 220px; }

/* VIGOENFAMILIA MAPS 2.0 — isolated magazine interface */
.cm-wrap{--cm-navy:#102c46;--cm-ink:#142c43;--cm-muted:#526579;--cm-line:#dce4eb;--cm-surface:#f4f7fa;--cm-radius:14px;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;line-height:1.45;background:#fff;border:1px solid var(--cm-line);border-radius:18px;overflow:hidden;box-shadow:0 12px 38px #102c4610;color:var(--cm-ink);isolation:isolate;container-type:inline-size}
.cm-wrap *, .cm-wrap *::before,.cm-wrap *::after{box-sizing:border-box}
.cm-wrap button,.cm-wrap input,.cm-wrap select{font-family:inherit;letter-spacing:normal;text-transform:none;line-height:1.35;min-width:0;margin:0;box-shadow:none}
.cm-wrap button:focus-visible,.cm-wrap a:focus-visible,.cm-wrap select:focus-visible,.cm-wrap input:focus-visible{outline:3px solid #1879b3;outline-offset:2px}
.cm-wrap .cm-hero{background:var(--cm-navy);padding:23px 26px;color:#fff;display:grid;gap:4px;position:relative;overflow:hidden}
.cm-wrap .cm-hero::after{content:'♥';position:absolute;right:22px;top:-50px;font-size:200px;line-height:1;color:#ffffff0a;pointer-events:none}
.cm-wrap .cm-brand{font-size:12px;font-weight:850;letter-spacing:.12em;color:#fff;display:flex;gap:7px;align-items:center}.cm-brand span:last-child{color:#a8dce8}.cm-wrap .cm-brand-heart{color:#ff5374;font-size:18px;letter-spacing:0}
.cm-wrap .cm-title{color:#fff;font-size:clamp(23px,3vw,34px);font-weight:800;line-height:1.15;margin:2px 0;letter-spacing:-.035em}.cm-wrap .cm-hero p{margin:2px 0 0;font-size:13px;color:#dbe9f3}
.cm-wrap .cm-discover{display:flex;align-items:center;gap:8px;padding:14px 16px 9px;flex-wrap:wrap;background:#fff}
.cm-wrap .cm-searchbox{display:flex;align-items:center;gap:8px;flex:1 1 260px;background:#f6f8fa;border:1px solid #bacbd9;border-radius:11px;padding:0 12px;color:#102c46;min-width:0}.cm-wrap .cm-searchbox>span{font-size:23px;line-height:1}
.cm-wrap .cm-search{font-size:14px;display:block;width:100%;background:transparent;border:0;color:var(--cm-ink);padding:12px 0;min-height:43px;outline-offset:0;box-shadow:none}.cm-wrap .cm-search::placeholder{color:#54677a;opacity:1}
.cm-wrap .cm-control{background:#fff;color:var(--cm-ink);border:1px solid #cbd7e1;padding:9px 12px;border-radius:9px;font-size:12px;font-weight:650;cursor:pointer;min-height:38px;white-space:normal}.cm-wrap .cm-control:hover{background:#edf4f8;border-color:#89a4bb;color:#102c46}.cm-wrap button:disabled{opacity:.65;cursor:default}
.cm-wrap .cm-toolbar{padding:6px 16px 13px;gap:6px;margin:0;display:flex;flex-wrap:wrap}.cm-wrap .cm-chip{background:#edf2f6;border:1px solid #edf2f6;color:var(--cm-ink);padding:8px 12px;border-radius:9px;font-size:12px;font-weight:650;min-height:35px;white-space:nowrap}.cm-wrap .cm-chip:hover{border-color:#9db0c0;color:#102c46;transform:none}.cm-wrap .cm-chip.is-active{background:var(--cm-navy);border-color:var(--cm-navy);color:#fff}.cm-wrap .cm-chip-tour{margin-left:auto}
.cm-wrap .cm-viewbar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 16px;border-top:1px solid var(--cm-line);border-bottom:1px solid var(--cm-line);background:#f4f7fa;flex-wrap:wrap}.cm-wrap .cm-result-count{font-size:14px;font-weight:800;color:var(--cm-ink)}.cm-wrap .cm-view-actions{display:flex;gap:6px;flex-wrap:wrap}.cm-wrap .cm-view-actions .cm-control{font-size:11px;min-height:32px;padding:7px 9px}.cm-wrap [hidden]{display:none!important}
.cm-wrap .cm-feedback{padding:8px 16px;color:var(--cm-ink);background:#e9f4f8;font-size:12px;overflow-wrap:anywhere}
.cm-wrap .cm-body{display:flex;gap:0;align-items:stretch;min-height:0;background:#f6f8fa}.cm-wrap .cm-map{height:var(--cm-map-height,560px);flex:1 1 0;min-width:0;border-radius:0;box-shadow:none;background:#e7eef1;z-index:0}.cm-wrap .leaflet-tile{filter:none}
.cm-wrap .cm-sidebar{width:34%;min-width:235px;max-width:370px;flex:0 0 34%;height:var(--cm-map-height,560px);border-right:1px solid var(--cm-line);background:#f3f6f9;display:flex;flex-direction:column;min-height:0}.cm-wrap .cm-sidebar-head{display:flex;align-items:center;justify-content:space-between;gap:7px;padding:12px 10px;background:white;border-bottom:1px solid var(--cm-line);color:var(--cm-ink);font-size:12px}.cm-wrap .cm-sidebar-head strong{font-weight:800}.cm-wrap .cm-sort{font-size:11px;padding:6px 4px;border:1px solid #b9c9d7;background:#fff;color:var(--cm-ink);border-radius:6px;max-width:126px;min-height:30px}
.cm-wrap .cm-list{padding:10px;width:100%;flex:1 1 auto;max-height:none;min-height:0;overflow:auto;display:flex;gap:9px;flex-direction:column;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#a9b9c8 transparent}
.cm-wrap .cm-card{position:relative;background:#fff;border:1px solid #e0e7ee;border-radius:12px;box-shadow:0 2px 7px #132d4509;flex:none;overflow:hidden;margin:0;padding:0}.cm-wrap .cm-list-item{display:flex;gap:10px;width:100%;align-items:center;text-align:left;padding:9px 31px 9px 9px;background:#fff;color:var(--cm-ink);border:0;border-radius:12px;min-height:100px;cursor:pointer;transform:none}.cm-wrap .cm-list-item:hover{background:#f8fbfd;transform:none}.cm-wrap .cm-card-media{position:relative;display:block;width:84px;height:84px;flex:0 0 84px;border-radius:8px;overflow:hidden;background:#e4edf2}.cm-wrap .cm-card-placeholder{display:grid;place-items:center;position:absolute;inset:0;background:linear-gradient(145deg,#dcebf2,#e9f0f1);color:#315c73;font-size:29px;font-weight:700}.cm-wrap .cm-card-photo{position:absolute;inset:0;object-fit:cover;width:100%;height:100%;display:block}.cm-wrap .cm-list-text{min-width:0;flex:1;display:flex;gap:4px;flex-direction:column}.cm-wrap .cm-list-text strong{white-space:normal;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;color:var(--cm-ink);font-weight:800;font-size:13px;line-height:1.25}.cm-wrap .cm-list-text small{color:#526579;font-size:11px;line-height:1.3}.cm-wrap .cm-list-text .cm-card-cat{color:#126477;font-weight:800;text-transform:uppercase;letter-spacing:.025em;font-size:10px}.cm-wrap .cm-card-address{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.cm-wrap .cm-list-text .cm-card-likes{color:#a51b42;font-weight:650}.cm-wrap .cm-card-fav{position:absolute;top:7px;right:6px;background:white;border:1px solid #d8e2eb;color:#ad2447;border-radius:50%;height:29px;width:29px;padding:0;font-size:21px;line-height:1;display:grid;place-items:center;cursor:pointer}.cm-wrap .cm-card-fav.is-active{color:#fff;background:#d32750;border-color:#d32750}.cm-wrap .cm-more{margin:3px 0;flex:none}.cm-wrap .cm-empty{padding:20px 12px;color:var(--cm-muted);font-size:13px}
.cm-wrap .cm-heart{width:34px;height:36px;display:grid;place-items:center;color:var(--cm-accent);animation:none;filter:drop-shadow(0 2px 3px #142c4355)}.cm-wrap .cm-heart svg{width:32px;height:32px;stroke:white;stroke-width:1.7;paint-order:stroke;overflow:visible}.cm-wrap .cm-heart svg path{stroke:white;stroke-width:2;paint-order:stroke}.cm-wrap .cm-marker.is-active .cm-heart{transform:scale(1.15)}.cm-wrap .cm-marker.is-active .cm-heart::after{animation:none;display:none}.cm-wrap .cm-cluster{background:#fff;border:2.5px solid var(--cm-accent);border-radius:50%;display:grid;place-items:center;color:#a81c3e;font-size:14px;font-weight:850;box-shadow:0 3px 10px #102c4633}.cm-wrap .cm-cluster:hover{background:#fff0f3}.cm-wrap .cm-overlap{display:grid;gap:5px}.cm-wrap .cm-overlap .cm-control{font-size:11px;text-align:left}
.cm-wrap .leaflet-control-zoom a{color:var(--cm-navy);background:#fff}.cm-wrap .leaflet-control-attribution{font-size:10px;background:#fffffff0}.cm-wrap .cm-popup-wrapper .leaflet-popup-content-wrapper{border-radius:15px;box-shadow:0 9px 30px #102c4640;color:var(--cm-ink)}.cm-wrap .cm-popup-wrapper .leaflet-popup-content{min-width:0;max-width:100%}.cm-wrap .cm-popup-wrapper .leaflet-popup-close-button{background:#fff;color:var(--cm-navy);border-radius:50%;top:7px;right:7px;width:26px;height:26px;line-height:26px;box-shadow:0 2px 8px #102c4620}.cm-wrap .cm-popup{min-width:0;width:265px;max-width:100%;background:white}.cm-wrap .cm-popup-photo{height:145px;object-fit:cover;width:100%}.cm-wrap .cm-popup-body{padding:13px;display:flex;flex-direction:column;gap:6px}.cm-wrap .cm-badge{background:#e5f1f4;color:#126477;align-self:flex-start;padding:3px 7px;border-radius:5px;font-size:10px;font-weight:800;letter-spacing:.025em}.cm-wrap .cm-popup-name{font-size:19px;font-weight:850;color:var(--cm-ink);line-height:1.2;margin:0;overflow-wrap:anywhere}.cm-wrap .cm-popup-note,.cm-wrap .cm-popup-address{font-size:12px;color:#465d71;margin:0 0 3px;overflow-wrap:anywhere}.cm-wrap .cm-popup-note{white-space:pre-line}.cm-wrap .cm-btn{border:1px solid #bdccd9;background:white;color:var(--cm-ink);border-radius:8px;min-height:35px;justify-content:center;font-weight:700;font-size:12px;padding:8px;cursor:pointer;text-align:center;text-decoration:none;line-height:1.3}.cm-wrap .cm-btn.cm-primary{background:var(--cm-navy);color:#fff;border-color:var(--cm-navy)}.cm-wrap .cm-btn.cm-article{display:flex;color:var(--cm-ink)}.cm-wrap .cm-popup-actions{display:flex;gap:6px}.cm-wrap .cm-popup-actions .cm-btn{flex:1 1 auto}.cm-wrap .cm-btn-like{color:#a91b40;border-color:#e1acba}.cm-wrap .cm-btn-like.is-voted,.cm-wrap .cm-btn-fav.is-active{background:#b32248;border-color:#b32248;color:white}.cm-wrap .cm-share{background:transparent;color:#315b78;border:0;font-size:12px;padding:6px;cursor:pointer;text-decoration:underline}
.cm-wrap .cm-basemap-info{padding:8px 14px;border-top:1px solid var(--cm-line);background:#fff;font-size:11px}.cm-wrap .cm-tour{margin:8px 12px 12px;box-shadow:none;color:var(--cm-ink)}.cm-wrap .cm-tour-controls button{color:var(--cm-ink);background:#fff}
.cm-wrap.cm-list-view .cm-map{display:none}.cm-wrap.cm-list-view .cm-sidebar{width:100%;max-width:none;flex:1 1 100%;border:0}.cm-wrap.cm-list-view .cm-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(235px,1fr));align-content:start}.cm-wrap.cm-list-view .cm-more{grid-column:1/-1}
.cm-wrap:fullscreen,.cm-wrap.cm-full-fallback{border-radius:0;overflow:auto;background:white;width:100%;height:100%;max-width:none;margin:0;--cm-map-height:65vh}.cm-wrap:fullscreen .cm-body,.cm-wrap.cm-full-fallback .cm-body{--cm-map-height:65vh!important}.cm-wrap.cm-full-fallback{position:fixed;inset:0;z-index:2147483000}
.cm-wrap .cm-sr{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@container (max-width:720px){.cm-wrap .cm-body{flex-direction:column}.cm-wrap .cm-map{order:-1;flex:0 0 auto;height:min(var(--cm-map-height,560px),55vh);min-height:290px}.cm-wrap .cm-sidebar{width:100%;max-width:none;min-width:0;flex:none;height:315px;border:0;border-top:1px solid var(--cm-line)}.cm-wrap .cm-list{max-height:none}.cm-wrap .cm-hero{padding:18px}.cm-wrap .cm-toolbar{flex-wrap:nowrap;overflow:auto;scrollbar-width:thin;padding-bottom:10px}.cm-wrap .cm-chip{flex:none}.cm-wrap .cm-chip-tour{margin-left:0}.cm-wrap .cm-discover{padding:10px;gap:6px}.cm-wrap .cm-searchbox{flex-basis:100%}.cm-wrap .cm-viewbar{padding:8px 10px}.cm-wrap .cm-card-media{width:90px;flex-basis:90px}.cm-wrap.cm-list-view .cm-sidebar{height:min(65vh,680px)}.cm-wrap .cm-popup{width:235px}.cm-wrap .cm-popup-photo{height:105px}}
@media(max-width:480px){.cm-wrap{border-radius:12px}.cm-wrap .cm-control{font-size:11px}.cm-wrap .cm-hero .cm-title{font-size:25px}.cm-wrap .cm-popup{width:215px}.cm-wrap .cm-popup-body{padding:10px}.cm-wrap .cm-popup-name{font-size:17px}.cm-wrap .cm-popup-actions .cm-btn{font-size:11px}}
