/**
 * Estilos del Directorio B2B de Empresas y Servicios - Diario Venezuela
 * Versión: 2.1.1 (Diseño Horizontal 1 por Línea + Filtros en 2 Filas Ordenadas)
 */

/* ==========================================================================
   1. CONTENEDOR PRINCIPAL Y HEADER CENTRADO
   ========================================================================== */
.dv-directorio-container,
.dv-dir-pure-list-wrapper {
	max-width: 1180px;
	margin: 0 auto;
	padding: 10px 15px 50px;
	box-sizing: border-box;
	font-family: inherit;
	color: #2d3748;
}

.dv-dir-header--centered {
	text-align: center;
	margin-bottom: 28px;
	padding-bottom: 20px;
	border-bottom: 1.5px solid #edf2f7;
}

.dv-dir-header__title {
	margin: 0 0 10px 0 !important;
	font-size: 2.2rem !important;
	font-weight: 800 !important;
	color: #1b2c5a !important;
	line-height: 1.25 !important;
	letter-spacing: -0.5px;
}

.dv-dir-header__subtitle {
	margin: 0 auto 18px !important;
	font-size: 1.05rem !important;
	color: #64748b !important;
	max-width: 680px;
	line-height: 1.5 !important;
}

.dv-dir-header__cta {
	display: flex;
	justify-content: center;
}

/* ==========================================================================
   2. FORMULARIO DE FILTROS EN 2 FILAS ORDENADAS
   ========================================================================== */
.dv-dir-search-standalone-wrapper {
	max-width: 1100px;
	margin: 0 auto;
	padding: 10px 0;
}

.dv-dir-form {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	padding: 22px 24px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
	margin-bottom: 28px;
}

.dv-dir-filter-box {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* FILA 1: BUSCADOR PRINCIPAL CON BOTÓN INTEGRADO */
.dv-dir-search-row {
	display: flex;
	gap: 12px;
	align-items: stretch;
}

.dv-dir-input-icon-wrap {
	position: relative;
	flex: 1 1 auto;
	display: flex;
	align-items: center;
}

.dv-dir-input-icon {
	position: absolute;
	left: 18px !important;
	top: 50% !important;
	transform: translateY(-50%) !important;
	color: #64748b !important;
	pointer-events: none;
	z-index: 3;
}

/* Asegurar padding-left generoso para que NUNCA se monte sobre la lupa */
.dv-dir-input--search {
	width: 100% !important;
	height: 50px !important;
	padding-left: 52px !important;
	padding-right: 18px !important;
	font-size: 1.02rem !important;
	border: 2px solid #cbd5e0 !important;
	border-radius: 10px !important;
	background-color: #f8fafc !important;
	color: #1a202c !important;
	transition: all 0.2s ease-in-out;
	box-sizing: border-box !important;
}

.dv-dir-input--search:focus {
	outline: none !important;
	border-color: #1b2c5a !important;
	background-color: #ffffff !important;
	box-shadow: 0 0 0 3px rgba(27, 44, 90, 0.12) !important;
}

.dv-dir-btn--submit {
	height: 50px !important;
	padding: 0 28px !important;
	font-size: 1rem !important;
	font-weight: 700 !important;
	border-radius: 10px !important;
	background-color: #1b2c5a !important;
	color: #ffffff !important;
	border: none;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	white-space: nowrap;
	transition: all 0.2s ease;
	box-shadow: 0 4px 12px rgba(27, 44, 90, 0.2);
}

.dv-dir-btn--submit:hover {
	background-color: #121e3f !important;
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(27, 44, 90, 0.28);
}

/* BOTÓN FILTROS AVANZADOS */
.dv-dir-btn--toggle-adv {
	height: 50px !important;
	padding: 0 20px !important;
	font-size: 0.96rem !important;
	font-weight: 700 !important;
	border-radius: 10px !important;
	background-color: #ffffff !important;
	color: #334155 !important;
	border: 2px solid #cbd5e0 !important;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	white-space: nowrap;
	transition: all 0.2s ease;
	box-sizing: border-box !important;
}

.dv-dir-btn--toggle-adv:hover,
.dv-dir-btn--toggle-adv.is-active {
	border-color: #1b2c5a !important;
	color: #1b2c5a !important;
	background-color: #f8fafc !important;
}

.dv-dir-btn--toggle-adv.has-active-filters {
	border-color: #1b2c5a !important;
	background-color: #eef2ff !important;
	color: #1b2c5a !important;
}

.dv-dir-adv-count {
	background-color: #1b2c5a;
	color: #ffffff;
	font-size: 0.72rem;
	font-weight: 800;
	border-radius: 10px;
	padding: 2px 7px;
	min-width: 14px;
	text-align: center;
	line-height: 1;
}

.dv-dir-chevron {
	transition: transform 0.25s ease;
}

.dv-dir-chevron.is-rotated {
	transform: rotate(180deg);
}

/* FILA 2: FILTROS SECUNDARIOS (SELECTS + CHECKBOX + LIMPIAR) EN COLUMNAS HORIZONTALES */
.dv-dir-filters-row {
	display: flex !important;
	flex-direction: row !important;
	gap: 10px !important;
	flex-wrap: wrap !important;
	align-items: center !important;
	padding-top: 14px !important;
	margin-top: 14px !important;
	border-top: 1px dashed #e2e8f0 !important;
}

.dv-dir-filters-collapsible.is-collapsed {
	display: none !important;
}

.dv-dir-filters-collapsible.is-open {
	display: flex !important;
}

.dv-dir-filter-col {
	flex: 1 1 170px !important;
	min-width: 140px !important;
}

.dv-dir-select {
	width: 100% !important;
	height: 44px !important;
	border: 1.5px solid #cbd5e0 !important;
	border-radius: 8px !important;
	padding: 0 14px !important;
	font-size: 0.92rem !important;
	color: #2d3748 !important;
	background-color: #ffffff !important;
	transition: all 0.2s ease;
	box-sizing: border-box !important;
	cursor: pointer;
}

.dv-dir-select:focus {
	outline: none !important;
	border-color: #1b2c5a !important;
	box-shadow: 0 0 0 3px rgba(27, 44, 90, 0.1) !important;
}

.dv-dir-filter-col--check {
	flex: 0 0 auto !important;
	min-width: auto !important;
}

.dv-dir-checkbox-wrap {
	display: inline-flex;
	align-items: center;
	height: 44px;
	padding: 0 16px;
	background: #f1f5f9;
	border: 1.5px solid #cbd5e0;
	border-radius: 8px;
	cursor: pointer;
	user-select: none;
	transition: background 0.2s ease;
	box-sizing: border-box;
}

.dv-dir-checkbox-wrap:hover {
	background: #e2e8f0;
}

.dv-dir-checkbox-wrap input[type="checkbox"] {
	margin-right: 8px;
	accent-color: #1b2c5a;
	cursor: pointer;
	width: 16px;
	height: 16px;
}

.dv-dir-checkbox-label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.88rem;
	font-weight: 700;
	color: #1b2c5a;
}

.dv-dir-filter-col--reset {
	flex: 0 0 auto !important;
	min-width: auto !important;
}

.dv-dir-btn--reset {
	height: 44px !important;
	padding: 0 16px !important;
	font-size: 0.88rem !important;
	font-weight: 600 !important;
	border-radius: 8px !important;
	border: 1.5px solid #cbd5e0 !important;
	background-color: transparent !important;
	color: #64748b !important;
	cursor: pointer;
	transition: all 0.2s ease;
	box-sizing: border-box;
}

.dv-dir-btn--reset:hover {
	background-color: #fee2e2 !important;
	color: #b91c1c !important;
	border-color: #f87171 !important;
}

/* ==========================================================================
   3. BOTONES COMUNES
   ========================================================================== */
.dv-dir-btn,
.dv-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	font-weight: 700;
	border-radius: 8px;
	text-decoration: none !important;
	transition: all 0.2s ease-in-out;
	white-space: nowrap;
	box-sizing: border-box;
}

.dv-dir-btn--cta {
	background-color: #ffffff;
	color: #1b2c5a !important;
	border: 2px solid #1b2c5a;
	padding: 9px 20px;
	font-size: 0.92rem;
	border-radius: 50px;
}

.dv-dir-btn--cta:hover {
	background-color: #1b2c5a;
	color: #ffffff !important;
	transform: translateY(-1px);
}

.dv-btn--whatsapp {
	background-color: #25D366;
	color: #ffffff !important;
	height: 42px;
	padding: 0 16px;
	font-size: 0.9rem;
	box-shadow: 0 3px 8px rgba(37, 211, 102, 0.3);
	width: 100%;
}

.dv-btn--whatsapp:hover {
	background-color: #1ebe5d;
	transform: translateY(-1px);
	box-shadow: 0 5px 12px rgba(37, 211, 102, 0.4);
}

.dv-btn--secondary {
	background-color: #f1f5f9;
	color: #1b2c5a !important;
	border: 1px solid #cbd5e0;
	height: 40px;
	padding: 0 16px;
	font-size: 0.88rem;
	width: 100%;
}

.dv-btn--secondary:hover {
	background-color: #e2e8f0;
}

.dv-btn--primary {
	background-color: #1b2c5a;
	color: #ffffff !important;
	height: 42px;
	padding: 0 18px;
	font-size: 0.9rem;
	width: 100%;
}

.dv-btn--primary:hover {
	background-color: #121e3f;
}

.dv-btn--sm {
	height: 36px;
	padding: 0 14px;
	font-size: 0.85rem;
}

/* ==========================================================================
   4. BARRA DE RESULTADOS Y CHIPS ACTIVOS
   ========================================================================== */
.dv-dir-results-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 22px;
	font-size: 0.95rem;
	color: #475569;
	gap: 12px;
}

.dv-dir-counter strong {
	color: #1b2c5a;
	font-weight: 800;
}

.dv-dir-active-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.dv-dir-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #f1f5f9;
	color: #1e293b;
	font-size: 0.82rem;
	font-weight: 600;
	padding: 4px 12px;
	border-radius: 20px;
	border: 1px solid #cbd5e0;
}

.dv-dir-chip__remove {
	cursor: pointer;
	color: #94a3b8;
	font-weight: bold;
	font-size: 1.05rem;
	line-height: 1;
}

.dv-dir-chip__remove:hover {
	color: #ef4444;
}

/* ==========================================================================
   5. LISTADO HORIZONTAL (1 POR LÍNEA)
   ========================================================================== */
.dv-dir-results-wrapper {
	position: relative;
	min-height: 250px;
}

.dv-dir-grid--horizontal {
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin-bottom: 35px;
}

/* TARJETA HORIZONTAL B2B */
.dv-card--horizontal {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.dv-card--horizontal:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
	border-color: #cbd5e0;
}

/* Card Destacada Top 3 */
.dv-card--top3 {
	border: 2px solid #fcd535 !important;
	box-shadow: 0 4px 16px rgba(252, 213, 53, 0.25);
}

.dv-card--top3:hover {
	border-color: #eab308 !important;
	box-shadow: 0 10px 28px rgba(252, 213, 53, 0.35);
}

/* Card Verificada */
.dv-card--verified {
	border-left: 4.5px solid #1b2c5a;
}

/* COLUMNA 1: IMAGEN / LOGO */
.dv-card__media {
	flex: 0 0 260px;
	width: 260px;
	position: relative;
	background-color: #edf2f7;
	overflow: hidden;
	min-height: 180px;
}

.dv-card__media a {
	display: block;
	width: 100%;
	height: 100%;
}

.dv-card__image {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	transition: transform 0.3s ease;
}

.dv-card--horizontal:hover .dv-card__image {
	transform: scale(1.04);
}

.dv-card__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
}

.dv-card__badges {
	position: absolute;
	top: 10px;
	left: 10px;
	display: flex;
	flex-direction: column;
	gap: 5px;
	z-index: 2;
}

.dv-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 9px;
	font-size: 0.72rem;
	font-weight: 800;
	border-radius: 5px;
	text-transform: uppercase;
	letter-spacing: 0.4px;
}

.dv-badge--top3 {
	background: #fcd535;
	color: #1a202c;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.dv-badge--verified {
	background: #1b2c5a;
	color: #ffffff;
	box-shadow: 0 2px 6px rgba(27, 44, 90, 0.35);
}

/* COLUMNA 2: DETALLES CENTRALES */
.dv-card__body {
	flex: 1 1 auto;
	padding: 22px 24px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.dv-card__header-line {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 6px;
	flex-wrap: wrap;
}

.dv-card__rubro {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 0.78rem;
	font-weight: 800;
	color: #d32929;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.dv-card__license {
	font-size: 0.78rem;
	color: #64748b;
	font-weight: 600;
}

.dv-card__title {
	margin: 0 0 10px 0 !important;
	font-size: 1.28rem !important;
	font-weight: 700 !important;
	line-height: 1.35 !important;
}

.dv-card__title a {
	color: #1b2c5a !important;
	text-decoration: none !important;
	transition: color 0.2s ease;
}

.dv-card__title a:hover {
	color: #d32929 !important;
}

.dv-card__meta-group {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	font-size: 0.88rem;
	color: #64748b;
	margin-bottom: 10px;
}

.dv-card__meta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.dv-card__summary {
	margin: 0 !important;
	font-size: 0.92rem !important;
	color: #475569 !important;
	line-height: 1.5 !important;
}

/* COLUMNA 3: ACCIONES Y CONVERSIÓN */
.dv-card__actions {
	flex: 0 0 220px;
	width: 220px;
	padding: 22px 20px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: stretch;
	gap: 10px;
	border-left: 1px solid #f1f5f9;
	background-color: #fafbfc;
	box-sizing: border-box;
}

.dv-card__trust-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	background: #ecfdf5;
	color: #065f46;
	font-size: 0.78rem;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 6px;
	border: 1px solid #a7f3d0;
	margin-bottom: 2px;
}

.dv-card__free-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #f1f5f9;
	color: #64748b;
	font-size: 0.75rem;
	font-weight: 600;
	padding: 4px 8px;
	border-radius: 6px;
	margin-bottom: 2px;
}

.dv-card__call-meta {
	font-size: 0.82rem;
	color: #64748b;
	text-align: center;
	font-weight: 600;
}

.dv-card__claim-link {
	text-align: center;
	font-size: 0.78rem;
	margin-top: 2px;
}

.dv-card__claim-link a {
	color: #64748b;
	text-decoration: underline;
}

.dv-card__claim-link a:hover {
	color: #1b2c5a;
}

/* ==========================================================================
   6. PAGINACIÓN Y ESTADOS VACÍOS
   ========================================================================== */
.dv-pagination {
	margin-top: 30px;
	text-align: center;
}

.dv-pagination__list {
	display: inline-flex;
	list-style: none;
	padding: 0;
	margin: 0;
	gap: 6px;
	align-items: center;
}

.dv-pagination__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 10px;
	border-radius: 8px;
	border: 1px solid #cbd5e0;
	background: #ffffff;
	color: #2d3748;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none !important;
	transition: all 0.2s ease;
	box-sizing: border-box;
}

.dv-pagination__link:hover {
	border-color: #1b2c5a;
	color: #1b2c5a;
	background: #edf2f7;
}

.dv-pagination__link--active {
	background: #1b2c5a !important;
	color: #ffffff !important;
	border-color: #1b2c5a !important;
}

.dv-pagination__dots {
	padding: 0 6px;
	color: #a0aec0;
}

.dv-dir-loader {
	display: none;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(255, 255, 255, 0.78);
	backdrop-filter: blur(2px);
	z-index: 10;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	border-radius: 12px;
	font-weight: 600;
	color: #1b2c5a;
}

.dv-dir-loader.is-active {
	display: flex;
}

.dv-dir-spinner {
	width: 40px;
	height: 40px;
	border: 3.5px solid #e2e8f0;
	border-top-color: #1b2c5a;
	border-radius: 50%;
	animation: dv-spin 0.75s infinite linear;
}

@keyframes dv-spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

.dv-dir-empty-state {
	background: #ffffff;
	border: 1px dashed #cbd5e0;
	border-radius: 14px;
	padding: 50px 20px;
	text-align: center;
}

.dv-dir-empty-state__icon {
	margin-bottom: 15px;
}

.dv-dir-empty-state__title {
	margin: 0 0 8px 0;
	font-size: 1.25rem;
	font-weight: 700;
	color: #2d3748;
}

.dv-dir-empty-state__desc {
	margin: 0 0 20px 0;
	color: #718096;
	font-size: 0.95rem;
}

/* ==========================================================================
   7. RESPONSIVE BREAKPOINTS (MÓVILES Y TABLETS)
   ========================================================================== */
@media (max-width: 900px) {
	.dv-card--horizontal {
		flex-direction: column;
	}
	.dv-card__media {
		flex: 0 0 auto;
		width: 100%;
		height: 200px;
	}
	.dv-card__actions {
		flex: 0 0 auto;
		width: 100%;
		border-left: none;
		border-top: 1px solid #f1f5f9;
		padding: 16px 20px;
	}
}

@media (max-width: 640px) {
	.dv-dir-search-row {
		flex-direction: column;
	}
	.dv-dir-btn--submit,
	.dv-dir-btn--toggle-adv {
		width: 100%;
		justify-content: center;
	}
	.dv-dir-header__title {
		font-size: 1.7rem !important;
	}
}

/* ==========================================================================
   8. GRID DE CATEGORÍAS B2B (SHORTCODE [dv_directorio_categorias])
   ========================================================================== */
.dv-cat-grid-wrapper {
	max-width: 1180px;
	margin: 0 auto 35px;
	padding: 10px 15px;
	box-sizing: border-box;
}

.dv-cat-grid {
	display: grid;
	grid-template-columns: repeat(var(--dv-cat-cols, 4), minmax(0, 1fr));
	gap: 20px;
	width: 100%;
}

.dv-cat-grid--cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dv-cat-grid--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dv-cat-grid--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dv-cat-grid--cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.dv-cat-grid--cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

/* TARJETA DE CATEGORÍA (ESTILO REFERENCIA / DIVI FRIENDLY) */
.dv-cat-card {
	background: #ffffff;
	border: 1.5px solid #e2e8f0;
	border-radius: 14px;
	padding: 24px 16px 20px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	text-decoration: none !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
	transition: all 0.22s ease-in-out;
	box-sizing: border-box;
	cursor: pointer;
}

.dv-cat-card:hover {
	transform: translateY(-4px);
	border-color: #cbd5e1;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.07);
	text-decoration: none !important;
}

.dv-cat-card__icon-wrap {
	width: 60px;
	height: 60px;
	margin-bottom: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	transition: transform 0.2s ease;
}

.dv-cat-card:hover .dv-cat-card__icon-wrap {
	transform: scale(1.08);
}

.dv-cat-card__image {
	max-width: 100% !important;
	max-height: 100% !important;
	width: auto !important;
	height: auto !important;
	object-fit: contain !important;
	display: block;
}

.dv-cat-card__placeholder {
	color: #64748b;
}

.dv-cat-card__title {
	margin: 0 !important;
	font-size: 0.98rem !important;
	font-weight: 700 !important;
	color: #1e293b !important;
	line-height: 1.35 !important;
	transition: color 0.2s ease;
}

.dv-cat-card:hover .dv-cat-card__title {
	color: #1b2c5a !important;
}

.dv-cat-card__count {
	margin-top: 8px;
	font-size: 0.75rem;
	font-weight: 600;
	color: #64748b;
	background: #f1f5f9;
	padding: 3px 10px;
	border-radius: 12px;
	display: inline-block;
}

.dv-cat-grid-empty {
	text-align: center;
	padding: 30px;
	background: #f8fafc;
	border-radius: 12px;
	color: #64748b;
}

/* RESPONSIVE DE CATEGORÍAS */
@media (max-width: 980px) {
	.dv-cat-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
		gap: 16px;
	}
}

@media (max-width: 680px) {
	.dv-cat-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 12px;
	}
	.dv-cat-card {
		padding: 18px 12px;
	}
	.dv-cat-card__icon-wrap {
		width: 48px;
		height: 48px;
		margin-bottom: 10px;
	}
	.dv-cat-card__title {
		font-size: 0.88rem !important;
	}
}

/* ==========================================================================
   9. MÓDULO DESACOPLADO DE RESULTADOS
   ========================================================================== */
.dv-directorio-container--results-only {
	padding-top: 15px;
	padding-bottom: 40px;
}

.dv-dir-results-title {
	font-size: 1.5rem !important;
	font-weight: 800 !important;
	color: #1b2c5a !important;
	margin: 0 0 16px 0 !important;
}
