/* Shared styles (editor + front) */
.wp-block-yunke-puerto-baru-numeros.pb-numeros-wrap {
	color: #111827;
}

/* Filter controls */
.wp-block-yunke-puerto-baru-numeros .filter-controls {
	text-align: center;
	margin-bottom: 2.5rem;
	display: flex;
	justify-content: center;
	gap: 2rem;
}

.wp-block-yunke-puerto-baru-numeros .filter-controls button {
	background: none;
	border: none;
	padding: 0;
	margin: 0;
	cursor: pointer;
	font-weight: 500;
	font-size: 17px;
	color: #1E1645;
	position: relative;
	transition: color 0.3s ease;
}

/* No underline by default */
.wp-block-yunke-puerto-baru-numeros .filter-controls button::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: -8px;
	width: 100%;
	height: 3px;
	background-color: transparent;
	transform: scaleX(0);
	transform-origin: center;
	transition: background-color 0.3s ease, transform 0.3s ease;
}

/* Hover does NOT change color */
.wp-block-yunke-puerto-baru-numeros .filter-controls button:hover {
	color: #1E1645;
}

/* Active state changes color and shows underline */
.wp-block-yunke-puerto-baru-numeros .filter-controls button.active {
	color: #009877;
}

.wp-block-yunke-puerto-baru-numeros .filter-controls button.active::after {
	background-color: #009877;
	transform: scaleX(1);
}

/* Grid and card layout */
.wp-block-yunke-puerto-baru-numeros .pb-grid {
	display: grid;
	grid-template-columns: repeat(var(--pb-columns, 3), minmax(0, 1fr));
	gap: 1.25rem;
	max-width: 1100px;
	margin: 0 auto;
	transition: transform 0.3s ease;
}

/* In editor, InnerBlocks wrappers sit between .pb-grid and the cards; flatten them so the grid works */
.wp-block-yunke-puerto-baru-numeros .pb-grid > .block-editor-inner-blocks,
.wp-block-yunke-puerto-baru-numeros .pb-grid > .block-editor-inner-blocks > .block-editor-block-list__layout {
	display: contents;
}

.wp-block-yunke-puerto-baru-numeros .pb-grid .block-editor-button-block-appender {
	grid-column: 1 / -1;
}

.wp-block-yunke-puerto-baru-numeros .pb-grid.pb-rearranging {
	transform: scale(0.997);
}

.wp-block-yunke-puerto-baru-numeros .pb-card {
	background: #fff;
	border-radius: 0;
	padding: 2rem 1.25rem;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.wp-block-yunke-puerto-baru-numeros .pb-card:hover {
	transform: translateY(-4px);
}

.wp-block-yunke-puerto-baru-numeros .pb-card.is-hiding {
	opacity: 0;
	transform: scale(0.92);
}

.wp-block-yunke-puerto-baru-numeros .pb-card.is-hidden {
	display: none;
}

.wp-block-yunke-puerto-baru-numeros .pb-card.is-showing {
	opacity: 1;
	transform: scale(1);
}

/* Responsive filter controls: show 3 buttons per view up to tablet width */
@media (max-width: 1024px) {
	.wp-block-yunke-puerto-baru-numeros .filter-controls {
		justify-content: flex-start;
		gap: 0.5rem;
		overflow-x: auto;
		scroll-snap-type: x proximity;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}

	.wp-block-yunke-puerto-baru-numeros .filter-controls::-webkit-scrollbar {
		display: none;
	}

	.wp-block-yunke-puerto-baru-numeros .filter-controls button {
		box-sizing: border-box;
		flex: 0 0 calc((100% - 1rem) / 3);
		min-width: 0;
		text-align: center;
		scroll-snap-align: start;
		padding: 0.35rem 0 0.65rem;
	}

	.wp-block-yunke-puerto-baru-numeros .filter-controls button::after {
		bottom: 0;
		width: 60%;
		left: 20%;
	}
}

/* Responsive layout: 1 column under 767px */
@media (max-width: 767px) {
	.wp-block-yunke-puerto-baru-numeros .pb-grid {
		grid-template-columns: 1fr !important;
		max-width: 100%;
	}

	.wp-block-yunke-puerto-baru-numeros .pb-card {
		width: 100%;
	}
}
