/* Search Bar Styles */

.publication-search-wrapper {
	display: flex;
	justify-content: center;
	margin-bottom: 30px;
	padding: 20px 0;
}

.publication-search-input {
	width: 100%;
	max-width: 500px;
	padding: 12px 20px;
	font-size: 14px;
	border: 2px solid #39468B;
	border-radius: 4px;
	transition: all 0.3s ease;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.publication-search-input:focus {
	outline: none;
	border-color: #39468B;
	box-shadow: 0 0 0 3px rgba(57, 70, 139, 0.1);
}

.publication-search-input::placeholder {
	color: #999;
}

/* Responsive */
@media (max-width: 768px) {
	.publication-search-wrapper {
		padding: 15px 0;
		margin-bottom: 20px;
	}

	.publication-search-input {
		font-size: 13px;
		padding: 10px 16px;
	}
}

@media (max-width: 480px) {
	.publication-search-wrapper {
		padding: 10px 0;
		margin-bottom: 15px;
	}

	.publication-search-input {
		font-size: 12px;
		padding: 8px 12px;
	}
}

/* ---- AJAX Results Panel ---- */

.aprodeh-ajax-results {
	display: none;
	margin: 10px 0 40px;
}

/* Loading spinner */
.apr-loading {
	text-align: center;
	padding: 50px 20px;
	color: #39468B;
	font-size: 1rem;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
}

.apr-spinner {
	display: inline-block;
	width: 22px;
	height: 22px;
	border: 3px solid rgba(57,70,139,0.2);
	border-top-color: #39468B;
	border-radius: 50%;
	animation: apr-spin 0.7s linear infinite;
	flex-shrink: 0;
}

@keyframes apr-spin {
	to { transform: rotate(360deg); }
}

/* Sin resultados */
.apr-no-results {
	text-align: center;
	padding: 50px 20px;
	color: #666;
}
.apr-no-results-icon { font-size: 2.5rem; display: block; margin-bottom: 12px; }
.apr-no-results p { font-size: 1rem; margin: 0; }

/* Grid de resultados */
.apr-results-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 22px;
}

.apr-result-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.08);
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: transform 0.2s, box-shadow 0.2s;
}

.apr-result-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 6px 20px rgba(0,0,0,0.13);
}

.apr-result-img { height: 160px; overflow: hidden; background: #e8ecf5; }

.apr-result-thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.apr-result-thumb--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	font-size: 2.5rem;
}

.apr-result-body { padding: 16px 18px; flex: 1; display: flex; flex-direction: column; gap: 8px; }

.apr-result-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.apr-result-cat {
	background: #39468B;
	color: #fff;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.5px;
	padding: 3px 10px;
	border-radius: 20px;
	text-transform: uppercase;
}

.apr-result-year {
	font-size: 0.8rem;
	color: #999;
	margin-left: auto;
}

.apr-result-title {
	font-size: 0.98rem;
	font-weight: 700;
	color: #1a3d5c;
	margin: 0;
	line-height: 1.4;
}

.apr-result-excerpt {
	font-size: 0.85rem;
	color: #666;
	line-height: 1.55;
	margin: 0;
}

.apr-total-hint {
	text-align: center;
	margin: 20px 0 0;
	font-size: 0.85rem;
	color: #999;
}

/* Responsive */
@media (max-width: 600px) {
	.apr-results-grid { grid-template-columns: 1fr; }
}
