/*
 * Anura Digital - Agentes Comerciales
 * Los colores toman los globales de Elementor (Sitio → Colores globales).
 * Para forzar otros, define estas variables en Elementor → Ajustes del sitio → CSS personalizado:
 *   .anura-ag { --ag-accent: #c00; --ag-text: #222; }
 */
.anura-ag {
	--ag-accent: var(--e-global-color-primary, #1f4e79);
	--ag-accent-2: var(--e-global-color-accent, var(--ag-accent));
	--ag-text: var(--e-global-color-text, #1d1d1b);
	--ag-muted: #6b6b6b;
	--ag-bg: #ffffff;
	--ag-soft: #f4f5f7;
	--ag-border: rgba(0, 0, 0, .1);
	--ag-radius: 14px;
	--ag-wa: #1fa855;
	color: var(--ag-text);
	font-family: inherit;
	width: 100%;
	max-width: 100%;
}

/* Elementor: el widget Shortcode dentro de un contenedor flex se encoge al contenido */
.elementor-widget-shortcode:has(.anura-ag),
.elementor-widget-shortcode:has(.anura-ag) .elementor-widget-container,
.elementor-widget-shortcode:has(.anura-ag) .elementor-shortcode {
	width: 100%;
	max-width: 100%;
	flex-grow: 1;
}

.anura-ag *,
.anura-ag *::before,
.anura-ag *::after { box-sizing: border-box; }

/* Filtro */
.anura-ag__filtro {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 24px;
}
.anura-ag button.anura-ag__chip {
	appearance: none;
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	padding: 10px 18px;
	border-radius: 999px;
	border: 1px solid var(--ag-border);
	background: var(--ag-bg);
	color: var(--ag-text);
	cursor: pointer;
	transition: background .2s, color .2s, border-color .2s;
}
.anura-ag button.anura-ag__chip:hover { border-color: var(--ag-accent); color: var(--ag-accent); background: var(--ag-bg); }
.anura-ag button.anura-ag__chip:focus-visible { outline: 2px solid var(--ag-accent); outline-offset: 2px; }
.anura-ag button.anura-ag__chip.is-active,
.anura-ag button.anura-ag__chip.is-active:hover,
.anura-ag button.anura-ag__chip.is-active:focus {
	background: var(--ag-accent);
	border-color: var(--ag-accent);
	color: #fff;
	box-shadow: none;
}

/* Rejilla */
.anura-ag__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
	gap: 20px;
}

/* Tarjeta */
.anura-ag__card {
	display: flex;
	flex-direction: column;
	background: var(--ag-bg);
	border: 1px solid var(--ag-border);
	border-radius: var(--ag-radius);
	padding: 22px;
	transition: border-color .2s, transform .2s, box-shadow .2s;
}
.anura-ag__card:hover {
	border-color: var(--ag-accent);
	transform: translateY(-2px);
	box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .25);
}
.anura-ag__card[hidden] { display: none; }
.anura-ag__card.is-entering { animation: anuraAgIn .3s ease both; }
@keyframes anuraAgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.anura-ag__head {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 16px;
}
.anura-ag__avatar {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}
.anura-ag__avatar--ph {
	display: inline-flex;
	align-items: flex-end;
	justify-content: center;
	overflow: hidden;
	background: var(--ag-soft);
}
.anura-ag__avatar--ph svg {
	width: 100%;
	height: 100%;
	display: block;
	fill: var(--ag-accent);
	opacity: .35;
}
.anura-ag .anura-ag__nombre {
	margin: 0;
	font-size: 17px;
	line-height: 1.3;
	font-weight: 600;
	color: var(--ag-text);
}
.anura-ag__rol {
	margin: 2px 0 0;
	font-size: 13px;
	color: var(--ag-muted);
}

/* Zonas */
.anura-ag__zonas {
	list-style: none;
	margin: 0 0 16px;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.anura-ag__zona {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin: 0;
	padding: 5px 10px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	border-radius: 6px;
	background: var(--ag-soft);
	color: var(--ag-text);
}
.anura-ag__zona[hidden] { display: none; }
.anura-ag__zona svg {
	width: 14px;
	height: 14px;
	fill: none;
	stroke: var(--ag-accent);
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* Contacto */
.anura-ag__contacto {
	list-style: none;
	margin: 0 0 18px;
	padding: 14px 0 0;
	border-top: 1px solid var(--ag-border);
	display: grid;
	gap: 8px;
}
.anura-ag__contacto li { margin: 0; padding: 0; }
.anura-ag .anura-ag__contacto a {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	max-width: 100%;
	font-size: 14px;
	color: var(--ag-text);
	text-decoration: none;
}
.anura-ag__contacto a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.anura-ag .anura-ag__contacto a:hover,
.anura-ag .anura-ag__contacto a:focus { color: var(--ag-accent); }
.anura-ag__contacto svg,
.anura-ag__wa svg {
	width: 17px;
	height: 17px;
	flex-shrink: 0;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.anura-ag__contacto svg { stroke: var(--ag-accent); }

/* WhatsApp: selectores reforzados para que el color de enlaces del tema/Elementor no lo pise */
.anura-ag a.anura-ag__wa,
.anura-ag a.anura-ag__wa:visited {
	margin-top: auto;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px 16px;
	border-radius: 10px;
	background: var(--ag-wa);
	color: #fff !important;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: filter .2s;
}
.anura-ag a.anura-ag__wa:hover,
.anura-ag a.anura-ag__wa:focus { color: #fff !important; background: var(--ag-wa); filter: brightness(.92); }
.anura-ag a.anura-ag__wa svg { stroke: #fff; }

/* Nota final */
.anura-ag__nota {
	margin: 22px 0 0;
	padding: 14px 18px;
	border-radius: 10px;
	background: var(--ag-soft);
	font-size: 14px;
	color: var(--ag-muted);
}
.anura-ag .anura-ag__nota a { color: var(--ag-accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.anura-ag .anura-ag__nota a:hover { text-decoration: none; }

@media (max-width: 600px) {
	.anura-ag__filtro { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
	.anura-ag__filtro::-webkit-scrollbar { display: none; }
	.anura-ag button.anura-ag__chip { flex-shrink: 0; }
	.anura-ag__grid { grid-template-columns: 1fr; gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
	.anura-ag__card, .anura-ag__card.is-entering { transition: none; animation: none; }
	.anura-ag__card:hover { transform: none; }
}
