/* --- Configuración Base y Reseteo --- */
* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

:root {
	--primary: #0f172a; /* Azul Oscuro Imperial (Elegancia y Confianza) */
	--accent: #10b981; /* Verde Esmeralda (Rapidez y Eficiencia) */
	--accent-hover: #059669;
	--bg-light: #f8fafc;
	--text-dark: #1e293b;
	--text-muted: #64748b;
	--footer-bg: #090d16;
}

html, body {
	height: 100%;
	font-family: 'Segoe UI', system-ui, sans-serif;
	color: var(--text-dark);
	background-color: var(--bg-light);
}

/* --- TRUCO DEL FOOTER PEGADO AL FONDO (STICKY FOOTER) --- */
.layout-wrapper {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	/* Fuerza al contenedor a ocupar el 100% del alto de la pantalla */
}

.layout-content {
	flex: 1;
	/* Esto empuja activamente al footer hacia el límite inferior */
}

/* --- Header Estilizado --- */
.main-header {
	background: #ffffff;
	border-bottom: 1px solid #e2e8f0;
	position: sticky;
	top: 0;
	z-index: 1000;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.header-container {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1.2rem 2rem;
}

.logo-envia {
	font-size: 1.6rem;
	font-weight: 800;
	color: var(--primary);
	letter-spacing: -0.03em;
}

.logo-cr {
	font-size: 1.6rem;
	font-weight: 800;
	color: var(--accent);
	letter-spacing: -0.03em;
}

.nav-menu a {
	text-decoration: none;
	color: var(--text-muted);
	margin: 0 1.2rem;
	font-weight: 600;
	font-size: 0.95rem;
	transition: color 0.2s;
}

.nav-menu a:hover, .nav-menu a.active {
	color: var(--accent);
}

/* --- Hero Slider --- */
.hero-slider {
	background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
	color: white;
	padding: 6rem 2rem 8rem 2rem;
	text-align: center;
	position: relative;
}

.slide-content h1 {
	font-size: 2.8rem;
	margin-bottom: 1rem;
	font-weight: 800;
	letter-spacing: -0.02em;
}

.slide-content p {
	font-size: 1.25rem;
	color: #94a3b8;
	font-weight: 400;
}

/* --- Buscador en Tarjeta Flotante --- */
.search-section {
	margin-top: -4.5rem;
	/* Solapa limpiamente el cotizador sobre el fondo oscuro del Hero */
	padding: 0 2rem;
	position: relative;
	z-index: 10;
}

.search-container {
	max-width: 950px;
	margin: 0 auto;
}

.search-card {
	background: white;
	padding: 2.5rem;
	border-radius: 16px;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px
		rgba(0, 0, 0, 0.04);
	border: 1px solid rgba(226, 232, 240, 0.8);
}

.search-card h3 {
	margin-bottom: 1.5rem;
	color: var(--primary);
	font-size: 1.4rem;
	font-weight: 700;
}

.search-grid {
	display: grid;
	grid-template-columns: 1fr 1fr auto;
	gap: 1.5rem;
	align-items: end;
}

.input-group {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.input-group label {
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--text-dark);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

/* PrimeFaces CommandButton */
body .ui-button.btn-search-p {
	height: 52px !important;
}

* /
	/* --- Secciones Informativas --- */   
.info-section {
	max-width: 1200px;
	margin: 6rem auto;
	padding: 0 2rem;
	text-align: center;
}

.info-section h2 {
	margin-bottom: 3.5rem;
	font-size: 2.2rem;
	font-weight: 800;
	color: var(--primary);
}

.features-grid {
	display: flex;
	gap: 2rem;
	flex-wrap: wrap;
	justify-content: center;
}

.feature-card {
	background: white;
	padding: 3rem 2rem;
	border-radius: 16px;
	flex: 1;
	min-width: 280px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 10px 15px -3px
		rgba(0, 0, 0, 0.03);
	border: 1px solid #f1f5f9;
	transition: transform 0.3s ease;
}

.feature-card:hover {
	transform: translateY(-5px);
}

.feature-card .icon {
	font-size: 2.8rem;
	margin-bottom: 1.2rem;
}

.feature-card h3 {
	margin-bottom: 0.8rem;
	color: var(--primary);
	font-size: 1.3rem;
	font-weight: 700;
}

.feature-card p {
	color: var(--text-muted);
	font-size: 0.98rem;
	line-height: 1.6;
}

/* --- FOOTER CLÁSICO (EL PRIMERO QUE TE GUSTÓ) --- */
.main-footer {
	background-color: var(--primary);
	color: #e2e8f0;
	padding: 50px 20px 20px 20px;
	border-top: 1px solid #1e293b;
}

.footer-container {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 40px;
}

.footer-col {
	flex: 1;
	min-width: 280px;
}

.footer-col h3 {
	color: #ffffff;
	font-size: 1.5rem;
	font-weight: 800;
	margin-bottom: 1.2rem;
}

.footer-col h3 span {
	color: var(--accent);
}

.footer-col h4 {
	color: #ffffff;
	font-size: 1.1rem;
	font-weight: 700;
	margin-bottom: 1.2rem;
	border-left: 3px solid var(--accent);
	padding-left: 10px;
}

.footer-col p {
	color: #94a3b8;
	font-size: 0.95rem;
	line-height: 1.6;
}

.footer-col ul {
	list-style: none;
	padding: 0;
}

.footer-col ul li {
	margin-bottom: 12px;
}

.footer-col ul li a {
	color: #94a3b8;
	text-decoration: none;
	font-size: 0.95rem;
	font-weight: 500;
	transition: color 0.2s, padding-left 0.2s;
	display: inline-block;
}

.footer-col ul li a:hover {
	color: var(--accent);
	padding-left: 4px;
}

.footer-bottom {
	max-width: 1200px;
	margin: 40px auto 0 auto;
	padding-top: 25px;
	border-top: 1px solid #1e293b;
	text-align: center;
	font-size: 0.9rem;
	color: #64748b;
}

.footer-bottom p {
	font-weight: 500;
}

/* Estilos para detalle de servicios y lineas */
.servicios-detalle {
	max-width: 1100px;
	margin: 3rem auto;
	padding: 0 1rem;
}

.servicio-card {
	background: #ffffff;
	border-radius: 12px;
	padding: 1rem 1.25rem;
	margin: 1.25rem 0;
	box-shadow: 0 6px 18px rgba(2, 6, 23, 0.04);
	border: 1px solid #eef2f6;
}

.servicio-title {
	margin-bottom: 0.75rem;
	color: var(--primary);
	font-weight: 800;
}

.empty-service {
	color: var(--text-muted);
	padding: 0.5rem 0;
}

.linea-row {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.75rem 0;
	border-top: 1px dashed #eef2f6;
	align-items: flex-start;
}

.linea-info {
	flex: 1 1 60%;
}

.linea-config {
	flex: 0 0 35%;
	text-align: right;
	color: var(--text-dark);
}

.lineas-hijas {
	margin-top: 0.5rem;
	padding-left: 1rem;
	border-left: 3px solid #f1f5f9;
}

.linea-hija {
	padding: 0.35rem 0;
	color: var(--text-muted);
}

/* Nuevo: clases específicas para la tarjeta de servicio (mover estilos inline aquí) */
.servicio-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid #edf2f7;
	padding-bottom: 1rem;
	margin-bottom: 1.25rem;
}

.servicio-badge {
	padding: 0.35rem 0.85rem;
	border-radius: 20px;
	font-size: 0.8rem;
	font-weight: 600;
	display: inline-block;
}

.servicio-badge.directo {
	background: #e6fffa;
	color: #234e52;
}

.servicio-badge.con-escalas {
	background: #fefcbf;
	color: #744210;
}

.servicio-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2rem;
	align-items: center;
}

.servicio-left {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.empresa-info {
	font-size: 0.95rem;
	color: #4a5568;
}

.ids-info {
	font-size: 0.85rem;
	color: #718096;
}

/* Botón seleccionar (Primefaces) */
.ui-button.btn-seleccionar {
	padding: 0.5rem 1rem !important;
}

/* Timeline / detalle de conexiones */
.timeline-card {
	background: #f7fafc;
	padding: 1rem;
	border-radius: 8px;
	border-left: 4px solid #319795;
}

.timeline-title {
	font-size: 0.85rem;
	font-weight: 700;
	color: #2d3748;
	margin-bottom: 0.75rem;
	text-transform: uppercase;
}

.timeline-list {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	position: relative;
}

.timeline-item {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	position: relative;
}

.timeline-dot {
	width: 8px;
	height: 8px;
	background: #319795;
	border-radius: 50%;
	margin-top: 5px;
	flex-shrink: 0;
}

.timeline-item .destinos {
	font-size: 0.85rem;
	font-weight: 600;
	color: #2d3748;
}

/* Colores y pequeñas utilidades para iconos y etiquetas dentro de la tarjeta */
.opcion-envios {
	font-size: 0.85rem;
	font-weight: 700;
	color: #718096;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.icono-flecha {
	color: #319795;
	font-size: 0.95rem;
	margin: 0 0.5rem;
}

.icono-empresa {
	color: #319795;
	margin-right: 0.5rem;
}

.icono-marcador {
	color: #e53e3e;
	margin-right: 0.5rem;
}

/* Asegurar que el título use el mismo estilo que el antiguo 'servicio-title' */
.servicio-title {
	margin: 0.25rem 0 0 0;
	font-size: 1.25rem;
	color: #1a202c;
	font-weight: 700;
}

/* Estilos para mensajes de Faces/PrimeFaces dentro de la sección de tarjetas */
.ui-messages, .ui-messages .ui-messages-info, .ui-messages .ui-messages-warn,
	.ui-messages .ui-messages-error, .ui-messages .ui-messages-fatal {
	max-width: 1100px;
	margin: 0 auto 1rem auto;
}

.ui-messages .ui-messages-info .ui-message-text, .ui-messages .ui-messages-warn .ui-message-text,
	.ui-messages .ui-messages-error .ui-message-text, .ui-messages .ui-messages-fatal .ui-message-text
	{
	font-weight: 600;
}

 
/* --- No Data Found (empty state) --- */
.no-data-wrap {
	display: flex;
	justify-content: center;
	margin-top: 4rem;
	margin-bottom: 4rem;
}

.no-data-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	padding: 2.5rem 2rem;
	text-align: center;
	max-width: 500px;
	width: 100%;
	box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px
		rgba(0, 0, 0, 0.05);
}

.no-data-icon {
	width: 64px;
	height: 64px;
	background: #fff5f5;
	color: #e53e3e;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 1.25rem auto;
	font-size: 1.75rem;
	box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.no-data-title {
	margin: 0 0 0.5rem 0;
	font-size: 1.25rem;
	font-weight: 700;
	color: #1a202c;
}

.no-data-desc {
	margin: 0 0 1.5rem 0;
	font-size: 0.925rem;
	color: #718096;
	line-height: 1.5;
}

/* --- Media Queries para Responsividad --- */

@media ( max-width : 768px) {
	.search-section {
		padding: 0;
	}
	.search-grid {
		grid-template-columns: 1fr;
	}
	.ui-button.btn-search-p {
		width: 100%;
	}
	
	.search-card{
	  padding: 1rem;
	}
}