/**
 * archive-tours.css — Estilos para el Catálogo y Archivo de Tours (/tours/)
 *
 * Incluye:
 * - Hero banner con métricas de confianza y migas de pan.
 * - Disposición de 2 columnas (Sidebar Sticky a la izquierda + Cuadrícula a la derecha).
 * - Componentes de filtros (Búsqueda, Checkboxes personalizados, Acordeones).
 * - Barra superior de ordenación y pills de filtros activos.
 * - Reutilización y afinamiento de .tour-card en cuadrícula responsive.
 * - Versión móvil con panel off-canvas y botón de acción flotante.
 * - Soporte nativo integral para Modo Claro y Modo Oscuro.
 *
 * @package Machupicchu_Travel_Narcy
 * @since   1.0.0
 */

/* =========================================================================
 * 1. VARIABLES Y ESTRUCTURA BASE
 * ====================================================================== */
:root {
	--at-max-w: 1280px;
	--at-green: var(--mtn-green, #1a7a3c);
	--at-green-dark: var(--mtn-green-dark, #14612f);
	--at-green-light: var(--mtn-green-light, #f0f8f2);
	--at-orange: var(--mtn-orange, #f4611e);
	--at-orange-dark: var(--mtn-orange-dark, #dc4f10);
	--at-gold: var(--mtn-gold, #f2c230);
	--at-dark: var(--mtn-heading, #142016);
	--at-text: var(--mtn-text, #2c352e);
	--at-muted: var(--mtn-muted, #5b665b);
	--at-border: var(--mtn-border, #e8ebe8);
	--at-border-light: var(--mtn-border-light, #f0f3f0);
	--at-bg: var(--mtn-bg, #ffffff);
	--at-bg-alt: var(--mtn-bg-alt, #f8faf8);
	--at-card-bg: var(--mtn-bg-card, #ffffff);
}

[data-theme="dark"],
.dark-mode {
	--at-green: #3ec774;
	--at-green-dark: #2ea85f;
	--at-green-light: #15271c;
	--at-dark: #f3f7f4;
	--at-text: #d8e2d9;
	--at-muted: #8fa091;
	--at-border: #233126;
	--at-border-light: #1b261e;
	--at-bg: #101512;
	--at-bg-alt: #161e19;
	--at-card-bg: #18221b;
}

.archive-tours-page {
	background-color: var(--at-bg);
	color: var(--at-text);
	padding-bottom: 90px;
	width: 100%;
	transition: background-color 0.3s ease, color 0.3s ease;
}

.archive-tours-page .container {
	max-width: var(--at-max-w) !important;
	width: 100%;
	margin-left: auto !important;
	margin-right: auto !important;
	padding-left: 20px !important;
	padding-right: 20px !important;
	box-sizing: border-box !important;
}

/* =========================================================================
 * 2. HERO BANNER DEL ARCHIVO
 * ====================================================================== */
.archive-hero-banner {
	position: relative;
	min-height: 460px;
	background-size: cover;
	background-position: center 35%;
	background-repeat: no-repeat;
	display: flex;
	align-items: center;
	padding: clamp(90px, 9vw, 130px) 0 clamp(54px, 5.5vw, 75px);
	color: #ffffff;
	box-sizing: border-box;
	margin-bottom: 44px;
}

.archive-hero-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(14, 26, 17, 0.4) 0%, rgba(14, 26, 17, 0.72) 50%, rgba(14, 26, 17, 0.94) 100%);
	z-index: 1;
}

.archive-hero-container {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: var(--mtn-header-max, 1600px);
	margin-inline: auto;
	padding-inline: clamp(16px, 4vw, 48px);
	box-sizing: border-box;
}

/* Migas de Pan en Hero Banner */
.archive-hero-banner .breadcrumbs,
.archive-hero-banner .tour-breadcrumbs-simple,
.archive-breadcrumbs {
	margin: 0 0 20px;
}

.archive-hero-banner .breadcrumbs-list,
.archive-hero-banner .breadcrumbs ol,
.archive-breadcrumbs ol {
	display: flex !important;
	align-items: center !important;
	flex-wrap: wrap !important;
	gap: 8px !important;
	list-style: none !important;
	list-style-type: none !important;
	margin: 0 !important;
	padding: 0 !important;
	font-size: 13px !important;
	color: #d1ded3 !important;
}

.archive-hero-banner .breadcrumb-item,
.archive-hero-banner .breadcrumbs li,
.archive-breadcrumbs li {
	display: inline-flex !important;
	align-items: center !important;
	list-style: none !important;
	list-style-type: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.archive-hero-banner .breadcrumbs a,
.archive-hero-banner .breadcrumbs-list a,
.archive-breadcrumbs a {
	color: #d1ded3 !important;
	text-decoration: none !important;
	transition: color 0.15s ease;
}

.archive-hero-banner .breadcrumbs a:hover,
.archive-hero-banner .breadcrumbs-list a:hover,
.archive-breadcrumbs a:hover {
	color: #ffffff !important;
}

.archive-hero-banner .breadcrumbs .sep,
.archive-hero-banner .breadcrumbs-list .sep,
.archive-breadcrumbs .sep {
	color: #d1ded3 !important;
	opacity: 0.6;
	display: inline-block;
}

.archive-hero-banner .breadcrumbs .current,
.archive-hero-banner .breadcrumbs-list .current,
.archive-breadcrumbs .current {
	color: #ffffff !important;
	font-weight: 700 !important;
}

.archive-hero-header {
	max-width: 880px;
	margin-bottom: 30px;
}

.archive-hero-kicker {
	display: inline-block;
	background: var(--at-orange);
	color: #ffffff;
	padding: 5px 16px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-bottom: 14px;
	box-shadow: 0 2px 8px rgba(244, 97, 30, 0.35);
}

.archive-hero-title {
	font-family: var(--mtn-font-heading, 'Merriweather', serif);
	font-size: clamp(28px, 3.8vw, 46px);
	font-weight: 700;
	color: #ffffff;
	line-height: 1.2;
	margin: 0 0 16px;
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.archive-hero-subtitle {
	font-size: clamp(14.5px, 1.2vw, 17px);
	line-height: 1.7;
	color: #e5ece6;
	margin: 0;
	max-width: 780px;
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

/* Métricas Rápidas */
.archive-hero-metrics {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 24px;
}

.hero-metric-pill {
	background: rgba(18, 30, 21, 0.75);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 999px;
	padding: 8px 18px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 12.5px;
	font-weight: 700;
	color: #ffffff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	transition: background 0.2s ease, transform 0.2s ease;
}

.hero-metric-pill:hover {
	background: rgba(18, 30, 21, 0.9);
	transform: translateY(-1px);
}

.hero-metric-pill .mtn-icon {
	color: #3ec774;
	flex-shrink: 0;
}

/* =========================================================================
 * 3. LAYOUT PRINCIPAL (GRID 2 COLUMNAS)
 * ====================================================================== */
.archive-layout-grid {
	display: grid;
	grid-template-columns: 310px minmax(0, 1fr);
	gap: 36px;
	align-items: start;
}

/* =========================================================================
 * 4. SIDEBAR DE FILTROS (COLUMNA IZQUIERDA)
 * ====================================================================== */
.tour-filters-sidebar {
	position: sticky;
	top: 90px;
	z-index: 50;
}

.filters-sidebar-inner {
	background-color: var(--at-card-bg);
	border: 1px solid var(--at-border);
	border-radius: 12px;
	padding: 24px 20px;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
	transition: background-color 0.3s ease, border-color 0.3s ease;
}

.filters-sidebar-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 16px;
	margin-bottom: 18px;
	border-bottom: 1px solid var(--at-border);
}

.sidebar-header-title {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--at-green);
}

.sidebar-header-title h2 {
	font-size: 16px;
	font-weight: 800;
	color: var(--at-dark);
	margin: 0;
	letter-spacing: -0.2px;
}

.btn-close-filters {
	display: none;
	background: none;
	border: none;
	font-size: 24px;
	color: var(--at-muted);
	cursor: pointer;
	line-height: 1;
	padding: 0 4px;
}

/* Grupos de Filtros */
.filters-form {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.filter-group {
	display: flex;
	flex-direction: column;
	gap: 10px;
	border-bottom: 1px solid var(--at-border-light);
	padding-bottom: 18px;
}

.filter-group:last-of-type {
	border-bottom: none;
	padding-bottom: 0;
}

.filter-group-title {
	font-size: 13.5px;
	font-weight: 800;
	color: var(--at-dark);
	margin: 0;
	letter-spacing: 0.02em;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

/* Input de Búsqueda */
.filter-search-wrap {
	position: relative;
	width: 100%;
}

.filter-search-field {
	width: 100%;
	background-color: var(--at-bg-alt);
	border: 1px solid var(--at-border);
	border-radius: 8px;
	padding: 9px 34px 9px 12px;
	font-size: 13px;
	color: var(--at-dark);
	outline: none;
	box-sizing: border-box;
	transition: border-color 0.15s ease, background-color 0.3s ease, box-shadow 0.15s ease;
}

.filter-search-field:focus {
	border-color: var(--at-green);
	box-shadow: 0 0 0 3px rgba(26, 122, 60, 0.12);
}

.search-icon-decor {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--at-muted);
	pointer-events: none;
	display: flex;
	align-items: center;
}

/* Lista de Checkboxes */
.filter-options-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-height: 220px;
	overflow-y: auto;
	padding-right: 4px;
	scrollbar-width: thin;
}

.filter-checkbox-item {
	display: flex;
	align-items: center;
	gap: 9px;
	cursor: pointer;
	user-select: none;
	font-size: 13px;
	color: var(--at-text);
	transition: color 0.15s ease;
}

.filter-checkbox-item:hover {
	color: var(--at-green);
}

.filter-checkbox-item input[type="checkbox"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.checkbox-custom {
	position: relative;
	width: 17px;
	height: 17px;
	min-width: 17px;
	border: 1.5px solid var(--at-border);
	border-radius: 4px;
	background-color: var(--at-bg-alt);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.15s ease;
}

.filter-checkbox-item input[type="checkbox"]:checked + .checkbox-custom {
	background-color: var(--at-green);
	border-color: var(--at-green);
}

.filter-checkbox-item input[type="checkbox"]:checked + .checkbox-custom::after {
	content: '';
	width: 4px;
	height: 8px;
	border: solid #ffffff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
	margin-top: -2px;
}

.checkbox-label {
	font-size: 13px;
	font-weight: 500;
	line-height: 1.35;
}

/* Botones de Acción de Filtros */
.filter-actions-box {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 4px;
}

.btn-filter-reset {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	background-color: var(--at-bg-alt);
	color: var(--at-muted);
	border: 1px solid var(--at-border);
	border-radius: 6px;
	padding: 9px 14px;
	font-size: 12.5px;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.15s ease;
}

.btn-filter-reset:hover {
	background-color: var(--at-green-light);
	color: var(--at-green);
	border-color: var(--at-green);
}

.btn-filter-apply-mobile {
	display: none;
	width: 100%;
	background: var(--at-green);
	color: #ffffff;
	border: none;
	border-radius: 6px;
	padding: 12px 16px;
	font-size: 14px;
	font-weight: 800;
	cursor: pointer;
}

/* Banner de Ayuda Rápida en Sidebar */
.sidebar-help-banner {
	margin-top: 20px;
	background: linear-gradient(135deg, rgba(26, 122, 60, 0.08) 0%, rgba(244, 97, 30, 0.08) 100%);
	border: 1px solid rgba(26, 122, 60, 0.2);
	border-radius: 10px;
	padding: 16px 14px;
	text-align: center;
}

.help-kicker {
	font-size: 12px;
	font-weight: 800;
	color: var(--at-green);
	display: block;
	margin-bottom: 4px;
}

.help-text {
	font-size: 11.5px;
	line-height: 1.4;
	color: var(--at-muted);
	margin: 0 0 12px;
}

.btn-sidebar-help-wa {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	background-color: var(--at-green);
	color: #ffffff;
	border-radius: 20px;
	padding: 8px 14px;
	font-size: 12px;
	font-weight: 700;
	text-decoration: none;
	transition: background-color 0.15s ease, transform 0.15s ease;
}

.btn-sidebar-help-wa:hover {
	background-color: var(--at-green-dark);
	color: #ffffff;
	transform: translateY(-1px);
}

/* =========================================================================
 * 5. BARRA SUPERIOR DE RESULTADOS Y ORDENACIÓN
 * ====================================================================== */
.catalog-top-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	background-color: var(--at-card-bg);
	border: 1px solid var(--at-border);
	border-radius: 10px;
	padding: 14px 20px;
	margin-bottom: 24px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
	transition: background-color 0.3s ease, border-color 0.3s ease;
}

.toolbar-results-count {
	font-size: 14px;
	color: var(--at-muted);
}

.toolbar-results-count strong {
	color: var(--at-dark);
	font-weight: 800;
}

.toolbar-sorting-wrap {
	display: flex;
	align-items: center;
	gap: 10px;
}

.sort-label {
	font-size: 13px;
	font-weight: 700;
	color: var(--at-dark);
	white-space: nowrap;
}

.sort-select-input {
	background-color: var(--at-bg-alt);
	border: 1px solid var(--at-border);
	border-radius: 6px;
	padding: 8px 12px;
	font-size: 13px;
	font-weight: 600;
	color: var(--at-dark);
	outline: none;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.3s ease;
}

.sort-select-input:focus {
	border-color: var(--at-green);
}

/* Pills de Filtros Activos */
.active-filter-pills {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 20px;
	padding: 10px 14px;
	background-color: var(--at-bg-alt);
	border-radius: 8px;
	border: 1px solid var(--at-border-light);
}

.active-pills-label {
	font-size: 12px;
	font-weight: 700;
	color: var(--at-muted);
}

.pills-container {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
}

.filter-pill-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background-color: var(--at-card-bg);
	border: 1px solid var(--at-border);
	border-radius: 20px;
	padding: 4px 10px;
	font-size: 11.5px;
	font-weight: 700;
	color: var(--at-dark);
}

.filter-pill-remove {
	background: none;
	border: none;
	color: var(--at-muted);
	cursor: pointer;
	font-size: 14px;
	line-height: 1;
	padding: 0;
	display: flex;
	align-items: center;
}

.filter-pill-remove:hover {
	color: #ef4444;
}

.btn-clear-all-pills {
	background: none;
	border: none;
	font-size: 11.5px;
	font-weight: 700;
	color: var(--at-green);
	cursor: pointer;
	text-decoration: underline;
	padding: 0 4px;
}

/* =========================================================================
 * 6. CUADRÍCULA DE TOURS (CATÁLOGO)
 * ====================================================================== */
.archive-tours-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 24px;
}

/* Estado Vacío (Sin resultados) */
.no-tours-found-box {
	background-color: var(--at-card-bg);
	border: 1px dashed var(--at-border);
	border-radius: 12px;
	padding: 50px 24px;
	text-align: center;
	margin: 20px 0;
}

.empty-state-icon {
	color: var(--at-muted);
	margin-bottom: 16px;
	opacity: 0.7;
}

.no-tours-found-box h3 {
	font-size: 18px;
	font-weight: 800;
	color: var(--at-dark);
	margin: 0 0 8px;
}

.no-tours-found-box p {
	font-size: 14px;
	color: var(--at-muted);
	max-width: 480px;
	margin: 0 auto 20px;
}

.btn-empty-reset {
	background-color: var(--at-green);
	color: #ffffff;
	border: none;
	border-radius: 6px;
	padding: 10px 20px;
	font-size: 13.5px;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.btn-empty-reset:hover {
	background-color: var(--at-green-dark);
}

/* Barra Móvil de Activación de Filtros */
.mobile-filters-trigger-bar {
	display: none;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 20px;
}

.btn-mobile-filters {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background-color: var(--at-card-bg);
	border: 1px solid var(--at-border);
	border-radius: 8px;
	padding: 10px 16px;
	font-size: 13.5px;
	font-weight: 700;
	color: var(--at-dark);
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.active-filters-count {
	background-color: var(--at-orange);
	color: #ffffff;
	border-radius: 50%;
	width: 19px;
	height: 19px;
	font-size: 11px;
	font-weight: 800;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.mobile-sort-wrap .sort-select-input {
	height: 42px;
}

/* Fondo oscurecido para drawer móvil */
.filters-backdrop {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	z-index: 998;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.filters-backdrop.is-visible {
	display: block;
	opacity: 1;
}

/* =========================================================================
 * 7. RESPONSIVIDAD (1024px, 768px, 480px)
 * ====================================================================== */
@media (max-width: 1024px) {
	.archive-layout-grid {
		grid-template-columns: 280px minmax(0, 1fr);
		gap: 24px;
	}

	.archive-hero-metrics {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 860px) {
	.archive-layout-grid {
		grid-template-columns: 1fr;
	}

	.mobile-filters-trigger-bar {
		display: flex;
	}

	.catalog-top-toolbar {
		display: none;
	}

	/* Panel de Filtros en Modo Drawer Off-Canvas Móvil */
	.tour-filters-sidebar {
		position: fixed;
		top: 0;
		left: 0;
		bottom: 0;
		width: 320px;
		max-width: 86vw;
		height: 100vh;
		z-index: 999;
		transform: translateX(-100%);
		transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
		overflow-y: auto;
	}

	.tour-filters-sidebar.is-open {
		transform: translateX(0);
	}

	.filters-sidebar-inner {
		border-radius: 0;
		min-height: 100vh;
		border: none;
		border-right: 1px solid var(--at-border);
		box-shadow: 10px 0 30px rgba(0, 0, 0, 0.25);
	}

	.btn-close-filters {
		display: block;
	}

	.btn-filter-apply-mobile {
		display: block;
	}
}

@media (max-width: 580px) {
	.archive-hero-metrics {
		grid-template-columns: 1fr;
	}

	.archive-tours-grid {
		grid-template-columns: 1fr;
	}
}

/* =========================================================================
 * 8. MODO OSCURO ([data-theme="dark"] / .dark-mode)
 * ====================================================================== */
[data-theme="dark"] .filters-sidebar-inner,
[data-theme="dark"] .catalog-top-toolbar,
[data-theme="dark"] .btn-mobile-filters,
[data-theme="dark"] .no-tours-found-box,
.dark-mode .filters-sidebar-inner,
.dark-mode .catalog-top-toolbar,
.dark-mode .btn-mobile-filters,
.dark-mode .no-tours-found-box {
	background-color: var(--at-card-bg);
	border-color: var(--at-border);
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .filter-search-field,
[data-theme="dark"] .sort-select-input,
[data-theme="dark"] .btn-filter-reset,
[data-theme="dark"] .active-filter-pills,
.dark-mode .filter-search-field,
.dark-mode .sort-select-input,
.dark-mode .btn-filter-reset,
.dark-mode .active-filter-pills {
	background-color: var(--at-bg-alt);
	color: var(--at-dark);
	border-color: var(--at-border);
}

[data-theme="dark"] .checkbox-custom,
.dark-mode .checkbox-custom {
	background-color: var(--at-bg-alt);
	border-color: var(--at-border);
}

[data-theme="dark"] .filter-pill-item,
.dark-mode .filter-pill-item {
	background-color: var(--at-card-bg);
	color: var(--at-dark);
	border-color: var(--at-border);
}
