/* =============================================
   News & Media — Listing Widget
   Semantic HTML + Flexbox, no frameworks
   ============================================= */

/* ---------- Section ---------- */
.naml-listing {
	display: flex;
	flex-direction: column;
	gap: 24px;
	background-color: #ffffff;
	width: 100%;
	box-sizing: border-box;
}

/* ---------- Filter Bar ---------- */
.naml-filters {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
}

.naml-filters__controls {
	display: flex;
	align-items: center;
	gap: 12px;
}

/* Select wrapper */
.naml-filters__select-wrap {
	position: relative;
	display: inline-flex;
	align-items: center;
}

.naml-filters__select {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background-color: #ffffff;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 14px 14px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	color: #9ca3af;
	font-family: 'Inter', sans-serif;
	font-size: 14px;
	font-weight: 400;
	padding: 10px 40px 10px 16px;
	cursor: pointer;
	min-width: 140px;
	box-sizing: border-box;
	transition: border-color 0.2s ease;
}

.naml-filters__select:focus {
	outline: 2px solid #2b7bb2;
	outline-offset: 2px;
	border-color: #2b7bb2;
}

/* Chevron desenhado no select via background-image; SVG oculto para não duplicar */
.naml-filters__chevron {
	display: none;
}

/* Search wrapper */
.naml-filters__search-wrap {
	position: relative;
	display: flex;
	align-items: center;
}

.naml-filters .naml-filters__search-wrap .naml-filters__search-icon {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	width: 15px;
	height: 15px;
	color: #9ca3af;
	pointer-events: none;
	z-index: 1;
}

.naml-filters .naml-filters__search-wrap .naml-filters__search {
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 400;
	color: #374151;
	font-family: 'Inter', sans-serif;
	height: 42px;
	box-sizing: border-box;
	background-color: #ffffff;
	padding: 10px 16px 10px 36px;
	padding-left: 36px !important;
	width: 200px;
	transition: border-color 0.2s ease;
	z-index: 0;
}

.naml-filters .naml-filters__search-wrap .naml-filters__search::placeholder {
	color: #9ca3af;
	font-weight: 400;
}

.naml-filters .naml-filters__search-wrap .naml-filters__search:focus {
	outline: 2px solid #2b7bb2;
	outline-offset: 2px;
	border-color: #2b7bb2;
}

/* Submit button (visible without JS) */
.naml-filters__submit {
	display: none;
	padding: 10px 16px;
	background-color: #1b3a5c;
	color: #ffffff;
	border: none;
	border-radius: 4px;
	font-family: 'Inter', sans-serif;
	font-size: 14px;
	cursor: pointer;
}

/* When JS is not available show the submit button */
.no-js .naml-filters__submit {
	display: inline-block;
}

/* Divider */
.naml-filters__divider {
	height: 1px;
	background-color: #e5e7eb;
	width: 100%;
}

/* ---------- Grid ---------- */
.naml-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	width: 100%;
}

.naml-grid--cols-3 .naml-card {
	flex: 1 1 calc(33.333% - 14px);
	min-width: 260px;
}

.naml-grid--cols-2 .naml-card {
	flex: 1 1 calc(50% - 10px);
	min-width: 280px;
}

/* ---------- Card ---------- */
.naml-card {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	background-color: #ffffff;
	border: 1px solid #e5e7eb;
	border-top: 3px solid #2b7bb2;
	border-radius: 8px;
	box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.06);
	overflow: hidden;
	box-sizing: border-box;
	transition: box-shadow 0.2s ease;
}

.naml-card:hover {
	box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.10);
}

.naml-card__body {
	display: flex;
	flex-direction: column;
	padding: 35px 33px 0 33px;
	gap: 0;
}

.naml-card__date {
	display: block;
	font-family: 'Inter', sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 20px;
	color: #6e7180;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	margin-bottom: 16px;
}

.naml-card__category {
	display: block;
	font-family: 'Inter', sans-serif;
	font-size: 12px;
	font-weight: 600;
	line-height: 16px;
	color: #2b7bb2;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	margin-bottom: 20px;
}

.naml-card__title {
	font-family: 'Inter', sans-serif;
	font-size: 18px;
	font-weight: 600;
	line-height: 28px;
	color: #1a1a1a;
	margin: 0;
	padding: 0;
}

.naml-card__title-link {
	color: inherit;
	text-decoration: none;
}

.naml-card__title-link:hover,
.naml-card__title-link:focus {
	color: #2b7bb2;
}

.naml-card__footer {
	padding: 28px 33px 33px 33px;
	border-top: 1px solid #e5e7eb;
	margin-top: 20px;
}

.naml-card__link {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-family: 'Inter', sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 20px;
	color: #2b7bb2;
	text-decoration: none;
}

.naml-card__link:hover,
.naml-card__link:focus {
	text-decoration: underline;
}

.naml-card__link-icon {
	display: block;
	flex-shrink: 0;
}

/* ---------- Empty ---------- */
.naml-listing__empty {
	font-family: 'Inter', sans-serif;
	font-size: 16px;
	color: #6e7180;
	margin: 0;
	padding: 40px 0;
	text-align: center;
}

/* ---------- Pagination ---------- */
.naml-pagination {
	border-top: 1px solid #e5e7eb;
	padding-top: 40px;
	display: flex;
	justify-content: center;
}

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

.naml-pagination__item {
	display: flex;
	align-items: center;
}

.naml-pagination__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-width: 40px;
	height: 40px;
	padding: 0 8px;
	font-family: 'Inter', sans-serif;
	font-size: 14px;
	font-weight: 400;
	color: #1a1a1a;
	text-decoration: none;
	border-bottom: 2px solid transparent;
	box-sizing: border-box;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.naml-pagination__btn:hover {
	color: #2b7bb2;
}

.naml-pagination__btn--active {
	font-weight: 500;
	color: #2b7bb2;
	border-bottom-color: #2b7bb2;
	cursor: default;
}

.naml-pagination__btn--prev,
.naml-pagination__btn--next {
	color: #6e7180;
	text-transform: lowercase;
}

.naml-pagination__btn--prev:hover,
.naml-pagination__btn--next:hover {
	color: #2b7bb2;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.naml-grid--cols-3 .naml-card {
		flex: 1 1 calc(50% - 10px);
	}
}

@media (max-width: 640px) {
	.naml-filters {
		flex-direction: column;
		align-items: stretch;
	}

	.naml-filters__controls {
		flex-direction: column;
	}

	.naml-filters__select {
		width: 100%;
	}

	.naml-filters .naml-filters__search-wrap .naml-filters__search {
		width: 100%;
	}

	.naml-grid--cols-3 .naml-card,
	.naml-grid--cols-2 .naml-card {
		flex: 1 1 100%;
	}
}
