/* Listing pages under /carti/ — aligned with /topcarti/ theme */
.bn-carti-listing {
	--bn-ink: #3e4a64;
	--bn-coral: #bf5d54;
	--bn-paper: #f7f3ee;
	--bn-line: #e4d9cf;
	--bn-muted: #6d7585;
	font-family: "Open Sans", sans-serif;
	color: #555;
}

/* Sit flush under the fixed nav: cancel spacer + pad content for the bar height. */
body.has-bn-wp-nav:has(.bn-list-hero) .bn-wp-nav__offset {
	display: none;
	height: 0 !important;
}

body.has-bn-wp-nav:has(.bn-list-hero) .bn-wp-nav {
	border-bottom-color: transparent;
	box-shadow: none;
}

.bn-list-hero {
	--bn-hero-pad-y: 2.25rem;
	/* Visible band below the nav (not including nav/padding clearance). */
	--bn-hero-min-h: clamp(15rem, 38vh, 20rem);
	--bn-hero-nav-clear: 0px;
	position: relative;
	isolation: isolate;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: stretch;
	box-sizing: border-box;
	/* border-box: add pads back into min-height or the band collapses into a strip */
	min-height: calc(var(--bn-hero-min-h) + var(--bn-hero-nav-clear) + (2 * var(--bn-hero-pad-y)));
	margin-top: 0;
	padding: var(--bn-hero-pad-y) 0;
	text-align: center;
	color: #fff;
	background: #222a3a;
	box-shadow: inset 0 -4px 0 0 #222a3a;
}

body.has-bn-wp-nav .bn-list-hero {
	/* Pull 1px under the nav edge so no white seam remains. Content pad equal top/bottom. */
	--bn-hero-nav-clear: calc(var(--bn-wp-nav-offset, 3.75rem) + 1px);
	margin-top: -1px;
	padding: calc(var(--bn-hero-nav-clear) + var(--bn-hero-pad-y)) 0 var(--bn-hero-pad-y);
}

.bn-list-hero__media,
.bn-list-hero__veil {
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	pointer-events: none;
}

.bn-list-hero__media {
	bottom: 0;
	z-index: -2;
	background-color: #222a3a;
	background-image: var(--bn-hero-image);
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
}

.bn-list-hero__veil {
	bottom: -1px;
	z-index: -1;
	background:
		linear-gradient(180deg, rgba(34, 42, 58, 0.82) 0%, rgba(34, 42, 58, 0.62) 28%, rgba(34, 42, 58, 0.72) 55%, rgba(34, 42, 58, 0.92) 88%, #222a3a 100%),
		radial-gradient(ellipse 70% 55% at 50% 35%, rgba(191, 93, 84, 0.16), transparent 62%);
}

.bn-list-hero::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 5px;
	background: #222a3a;
	z-index: 0;
	pointer-events: none;
}

.bn-list-hero--carti {
	--bn-hero-image: url("/assets/img/heroes/hero-carti.jpg?v=2");
}

.bn-list-hero--carti-search .bn-list-hero__inner {
	max-width: 46rem;
}

.bn-carti-empty {
	padding: 1.5rem 0 2rem;
	color: #50575e;
	font: 600 1rem/1.5 "Open Sans", sans-serif;
}

.bn-list-hero--autori {
	--bn-hero-image: url("/assets/img/heroes/hero-autori.jpg?v=2");
}

.bn-list-hero--edituri {
	--bn-hero-image: url("/assets/img/heroes/hero-edituri.jpg?v=2");
}

.bn-list-hero__inner {
	position: relative;
	z-index: 1;
	max-width: 44rem;
}

.bn-list-hero h1,
.bn-carti-hero h1 {
	margin: 0 0 0.75rem;
	color: #fff;
	font: italic 800 clamp(2.15rem, 4.2vw, 2.95rem)/1.15 "Sansita", sans-serif;
	text-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.bn-list-hero .bn-carti-lead,
.bn-carti-hero .bn-carti-lead {
	max-width: 38rem;
	margin: 0 auto 1rem;
	font: 400 1.05rem/1.65 "Open Sans", sans-serif;
	color: rgba(255, 255, 255, 0.9);
}

.bn-list-hero .bn-carti-stat,
.bn-carti-hero .bn-carti-stat {
	display: inline-flex;
	align-items: baseline;
	justify-content: center;
	gap: 0.5rem;
	margin: 0 auto 1.35rem;
	padding: 0.55rem 1.15rem;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.14);
	backdrop-filter: blur(8px);
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}

.bn-list-hero .bn-carti-stat-num,
.bn-list-hero .bn-carti-stat-num b,
.bn-list-hero .bn-carti-stat-num strong,
.bn-carti-hero .bn-carti-stat-num,
.bn-carti-hero .bn-carti-stat-num b,
.bn-carti-hero .bn-carti-stat-num strong {
	color: #fff !important;
	font: italic 800 1.2rem/1 "Sansita", sans-serif;
	letter-spacing: 0.01em;
}

.bn-list-hero .bn-carti-stat-label,
.bn-carti-hero .bn-carti-stat-label {
	color: rgba(255, 255, 255, 0.82);
	font: 600 0.9rem/1.2 "Open Sans", sans-serif;
}

/* Fallback plain hero (e.g. /cauta/) when no photo shell is used */
.bn-carti-hero:not(.bn-list-hero__inner) {
	padding: 1.5rem 0 1.75rem;
	text-align: center;
}

.bn-carti-hero:not(.bn-list-hero__inner) h1 {
	color: #3E4A64;
	text-shadow: none;
	font-size: 2.25rem;
}

.bn-carti-hero:not(.bn-list-hero__inner) .bn-carti-lead {
	color: #555;
}

.bn-carti-hero:not(.bn-list-hero__inner) .bn-carti-stat {
	border-color: #eee4e1;
	background: linear-gradient(180deg, #ffffff 0%, #faf7f6 100%);
	box-shadow: 0 8px 22px rgba(62, 74, 100, 0.06);
	backdrop-filter: none;
}

.bn-carti-hero:not(.bn-list-hero__inner) .bn-carti-stat-num,
.bn-carti-hero:not(.bn-list-hero__inner) .bn-carti-stat-num b,
.bn-carti-hero:not(.bn-list-hero__inner) .bn-carti-stat-num strong {
	color: #3E4A64 !important;
}

.bn-carti-hero:not(.bn-list-hero__inner) .bn-carti-stat-label {
	color: #6d7585;
}

.bn-list-main.home_gallery_area {
	padding-top: 2rem;
}

.bn-carti-listing .gallery_f_inner {
	max-width: none !important;
	margin-left: -0.5rem;
	margin-right: -0.5rem;
}

.bn-carti-listing .gallery_f_inner > [class*="col-"] {
	padding-left: 0.5rem;
	padding-right: 0.5rem;
	margin-bottom: 1.35rem;
}

.bn-carti-listing .gallery_f_inner > [class*="col-"]:has(.bn-editura-card) {
	display: flex;
}

.bn-carti-search {
	display: flex;
	max-width: 28rem;
	width: 100%;
	margin: 0 auto;
	border: 1px solid #eee4e1;
	border-radius: 999px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 8px 24px rgba(62, 74, 100, 0.06);
}

.bn-carti-search input[type="text"],
.bn-carti-search input[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
	border: 0 !important;
	outline: none;
	box-shadow: none !important;
	padding: 0.85rem 1.1rem;
	font: 400 1rem/1.4 "Open Sans", sans-serif;
	color: #3E4A64;
	background: transparent;
	-webkit-appearance: none;
	appearance: none;
}

.bn-carti-search input[type="search"]::-webkit-search-decoration,
.bn-carti-search input[type="search"]::-webkit-search-cancel-button {
	-webkit-appearance: none;
}

.bn-carti-search button {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 3.1rem;
	border: 0;
	padding: 0 1.15rem;
	background: #BF5D54;
	color: #fff;
	font-size: 1rem;
	cursor: pointer;
	transition: background 0.2s ease;
}

.bn-carti-search button:hover {
	background: #3E4A64;
}

.bn-carti-search__icon {
	display: block;
	width: 1.15rem;
	height: 1.15rem;
	flex: 0 0 auto;
	overflow: visible;
	pointer-events: none;
}

.bn-carti-search button .bn-carti-search__icon {
	color: #fff;
	stroke: currentColor;
	fill: none;
}

.bn-carti-search__clear {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	align-self: center;
	width: 1.55rem;
	height: 1.55rem;
	margin: 0 0.15rem 0 0;
	border-radius: 999px;
	color: #5a6478;
	font: 600 1.15rem/1 "Open Sans", sans-serif;
	text-decoration: none;
	background: transparent;
	transition: color 0.15s ease, background 0.15s ease;
}

.bn-carti-search__clear:hover,
.bn-carti-search__clear:focus {
	color: #3E4A64;
	background: rgba(62, 74, 100, 0.08);
	outline: none;
}

.bn-carti-search--has-clear input[type="search"] {
	padding-right: 0.35rem;
}

.bn-list-hero .bn-carti-search {
	max-width: 32rem;
	border-color: rgba(255, 255, 255, 0.35);
	box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
}

.bn-carti-pagination {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
	margin: 2rem auto 1rem;
}

.bn-carti-pagination .page-info {
	font: 600 0.9rem/1.4 "Open Sans", sans-serif;
	color: #6d7585;
}

.bn-carti-pagination #paging {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.45rem;
}

.bn-carti-pagination a,
.bn-carti-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 0.85rem;
	border: 1px solid #eee4e1;
	border-radius: 999px;
	background: #fff;
	color: #3E4A64;
	font: 700 0.9rem/1 "Open Sans", sans-serif;
	text-decoration: none;
	transition: all 0.15s ease;
}

.bn-carti-pagination a:hover {
	border-color: #BF5D54;
	color: #BF5D54;
	text-decoration: none;
}

.bn-carti-pagination .active,
.bn-carti-pagination span.active {
	background: #BF5D54;
	border-color: #BF5D54;
	color: #fff;
	box-shadow: 0 8px 18px rgba(191, 93, 84, 0.25);
}

/* Legacy listing footer styles replaced by /assets/css/bn-site-footer.css */

.bn-carti-listing .bn-autor-card {
	text-align: center;
}

.bn-carti-listing .bn-autor-photo {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.bn-carti-listing .bn-autor-photo a {
	display: inline-block;
}

.bn-carti-listing .bn-autor-photo .autor-foto-credit {
	display: block;
	margin: 0.4rem auto 0;
	max-width: 200px;
	width: 100%;
	font-size: 0.7rem;
	line-height: 1.3;
	color: #6d7585;
	text-align: center;
}

.bn-carti-listing .bn-autor-photo .autor-foto-credit a {
	color: #6d7585;
	text-decoration: underline;
	display: inline;
}

.bn-carti-listing .bn-autor-photo .autor-foto-credit a:hover {
	color: #BF5D54;
}

.bn-carti-listing .bn-autor-card img {
	width: 100%;
	max-width: 200px;
	height: 240px;
	object-fit: cover;
	object-position: center top;
	border-radius: 0.75rem;
	border: 1px solid #eee4e1;
	box-shadow: 0 8px 22px rgba(62, 74, 100, 0.08);
	background: #faf7f6;
}

.bn-carti-listing .bn-autor-card h2 {
	margin: 0.85rem 0 0;
	font: italic 800 1.2rem/1.3 "Sansita", sans-serif;
	text-align: center;
}

.bn-carti-listing .bn-autor-card h2 a {
	color: #3E4A64 !important;
	text-decoration: none;
}

.bn-carti-listing .bn-autor-card h2 a:hover {
	color: #BF5D54 !important;
}

.bn-carti-listing .bn-editura-card {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: stretch;
	width: 100%;
	margin: 0;
	box-sizing: border-box;
	text-align: center;
	padding: 1rem 0.75rem 0.85rem;
	border: 1px solid #eee4e1;
	border-radius: 0.85rem;
	background: linear-gradient(180deg, #ffffff 0%, #faf7f6 100%);
	box-shadow: 0 8px 22px rgba(62, 74, 100, 0.06);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.bn-carti-listing .bn-editura-card:hover {
	border-color: #e4d4cf;
	box-shadow: 0 12px 28px rgba(62, 74, 100, 0.1);
}

.bn-carti-listing .bn-editura-logo,
.bn-carti-listing .bn-editura-card .g_item_text {
	width: 100%;
}

.bn-carti-listing .bn-editura-logo a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 110px;
	padding: 0.35rem;
	box-sizing: border-box;
}

.bn-carti-listing .bn-editura-card img {
	width: auto;
	max-width: 160px;
	max-height: 90px;
	object-fit: contain;
	object-position: center;
	background: transparent;
	border: 0;
	box-shadow: none;
	border-radius: 0;
}

.bn-carti-listing .bn-editura-fallback {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	border-radius: 999px;
	background: #fff;
	border: 1px solid #eee4e1;
	color: #BF5D54;
	font: italic 800 1.75rem/1 "Sansita", sans-serif;
}

.bn-carti-listing .bn-editura-card h2 {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	margin: 0.75rem 0 0;
	min-height: 2.6em;
	font: italic 800 1.15rem/1.3 "Sansita", sans-serif;
	text-align: center;
}

.bn-carti-listing .bn-editura-card h2 a {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	color: #3E4A64 !important;
	text-decoration: none;
}

.bn-carti-listing .bn-editura-card h2 a:hover {
	color: #BF5D54 !important;
}

.bn-carti-listing .bn-editura-meta {
	margin: 0.35rem 0 0;
	color: #6d7585;
	font: 600 0.85rem/1.3 "Open Sans", sans-serif;
}

@media (min-width: 768px) {
	.bn-list-hero {
		--bn-hero-min-h: clamp(17rem, 40vh, 22rem);
	}
}

@media (min-width: 992px) {
	.bn-list-hero {
		--bn-hero-min-h: clamp(18rem, 42vh, 24rem);
	}
}

@media (max-width: 767px) {
	.bn-list-hero {
		--bn-hero-pad-y: 1.85rem;
		--bn-hero-min-h: clamp(14rem, 40vh, 18rem);
		padding: var(--bn-hero-pad-y) 0;
	}
	body.has-bn-wp-nav .bn-list-hero {
		padding: calc(var(--bn-hero-nav-clear) + var(--bn-hero-pad-y)) 0 var(--bn-hero-pad-y);
	}
	.bn-list-hero h1,
	.bn-carti-hero h1 {
		font-size: 1.75rem;
	}
	.bn-list-hero .bn-carti-lead,
	.bn-carti-hero .bn-carti-lead {
		font-size: 0.95rem;
		padding: 0 0.5rem;
	}
	.bn-list-hero .bn-carti-stat,
	.bn-carti-hero .bn-carti-stat {
		padding: 0.45rem 0.9rem;
		gap: 0.4rem;
	}
	.bn-list-hero .bn-carti-stat-num,
	.bn-list-hero .bn-carti-stat-num b,
	.bn-list-hero .bn-carti-stat-num strong,
	.bn-carti-hero .bn-carti-stat-num,
	.bn-carti-hero .bn-carti-stat-num b,
	.bn-carti-hero .bn-carti-stat-num strong {
		font-size: 1.05rem;
	}
	.bn-list-hero .bn-carti-stat-label,
	.bn-carti-hero .bn-carti-stat-label {
		font-size: 0.8rem;
	}
	/* Book cover sizing is handled by bn-book-listing.css (fixed 2:3 frame). */
	.bn-carti-listing .bn-autor-card img {
		height: 200px;
		max-height: 200px !important;
	}
	.bn-carti-listing .bn-editura-logo a {
		height: 90px;
	}
	.bn-carti-listing .bn-editura-card img {
		max-width: 130px;
		max-height: 70px !important;
	}
	.bn-carti-listing .bn-editura-card h2 {
		font-size: 0.95rem !important;
		line-height: 1.3 !important;
	}
}

/* /topcarti/ booklist: year dropdown must overlay outside the hero band */
.bn-list-hero.bn-list-hero--booklist {
	overflow: visible !important;
}
