/**
 * Biblioteca de Archivos — estilos del frontal.
 * Todo está basado en variables CSS para que el tema o Elementor puedan
 * sobrescribir colores sin tocar este archivo.
 */

.bib {
	--bib-primary: #0f8b8d;
	--bib-primary-hover: #0c7375;
	--bib-dark: #10395c;
	--bib-bg: #f6f8fb;
	--bib-surface: #ffffff;
	--bib-surface-soft: #eef3f7;
	--bib-border: #e3e9ef;
	--bib-text: #16273a;
	--bib-muted: #6b7a8d;
	--bib-radius: 12px;
	--bib-radius-sm: 8px;
	--bib-shadow: 0 1px 2px rgba(16, 57, 92, .06), 0 8px 24px rgba(16, 57, 92, .05);
	--bib-gap: 20px;
	--bib-cols: 3;
	--bib-cols-tablet: 2;
	--bib-cols-mobile: 1;

	box-sizing: border-box;
	color: var(--bib-text);
	font-size: 15px;
	line-height: 1.5;
}

.bib *,
.bib *::before,
.bib *::after,
.bib-modal *,
.bib-modal *::before,
.bib-modal *::after {
	box-sizing: border-box;
}

.bib img {
	max-width: 100%;
	height: auto;
}

.bib .screen-reader-text,
.bib-modal .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------------------------------------------------------------- Cabecera */

.bib-hero {
	position: relative;
	padding: 52px 32px 60px;
	border-radius: var(--bib-radius);
	background-color: var(--bib-dark);
	background-size: cover;
	background-position: center;
	color: #fff;
	overflow: hidden;
}

.bib-hero__inner {
	display: flex;
	align-items: center;
	gap: 40px;
	max-width: 1180px;
	margin: 0 auto;
}

.bib-hero__text {
	flex: 1 1 auto;
	min-width: 0;
}

.bib-hero__title {
	margin: 0 0 6px;
	font-size: clamp(30px, 4vw, 46px);
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -.02em;
	color: #fff;
}

.bib-hero__subtitle {
	margin: 0 0 26px;
	font-size: clamp(15px, 1.4vw, 18px);
	color: rgba(255, 255, 255, .82);
}

.bib-hero__note {
	flex: 0 0 auto;
	max-width: 230px;
	padding-left: 28px;
	border-left: 1px solid rgba(255, 255, 255, .28);
	font-size: 15px;
	line-height: 1.45;
	color: rgba(255, 255, 255, .9);
}

.bib-hero__note p {
	margin: 0 0 8px;
}

.bib-hero__note p:last-child {
	margin-bottom: 0;
}

/* ---------------------------------------------------------------- Buscador */

.bib__searchbar {
	margin-bottom: 24px;
}

.bib-search {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	max-width: 780px;
	padding: 7px 7px 7px 18px;
	border-radius: 999px;
	background: var(--bib-surface);
	box-shadow: 0 6px 20px rgba(16, 57, 92, .12);
}

.bib-search--standalone {
	box-shadow: none;
	border: 1px solid var(--bib-border);
}

.bib-search__icon {
	display: flex;
	flex: 0 0 auto;
	color: var(--bib-muted);
}

.bib-search__input {
	flex: 1 1 auto;
	min-width: 0;
	height: 42px;
	padding: 0 6px;
	border: 0;
	background: none;
	color: var(--bib-text);
	font-size: 16px;
	font-family: inherit;
	outline: none;
	box-shadow: none;
}

.bib-search__input::placeholder {
	color: #9aa8b8;
}

.bib-search__input::-webkit-search-cancel-button {
	cursor: pointer;
}

.bib-search__submit {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 42px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: var(--bib-primary);
	color: #fff;
	cursor: pointer;
	transition: background .18s ease;
}

.bib-search__submit:hover,
.bib-search__submit:focus-visible {
	background: var(--bib-primary-hover);
}

/* ----------------------------------------------------------------- Layout */

.bib__layout {
	display: grid;
	grid-template-columns: 280px minmax(0, 1fr);
	gap: 28px;
	align-items: start;
	margin-top: 28px;
}

.bib--full .bib__layout {
	grid-template-columns: minmax(0, 1fr);
}

.bib__main {
	min-width: 0;
}

/* ---------------------------------------------------------------- Filtros */

.bib-filters {
	position: sticky;
	top: 24px;
	padding: 18px 18px 20px;
	border: 1px solid var(--bib-border);
	border-radius: var(--bib-radius);
	background: var(--bib-surface);
	box-shadow: var(--bib-shadow);
}

.bib-filters__head {
	display: flex;
	align-items: center;
	gap: 8px;
	padding-bottom: 14px;
	margin-bottom: 6px;
	border-bottom: 1px solid var(--bib-border);
}

.bib-filters__icon {
	display: flex;
	color: var(--bib-primary);
}

.bib-filters__title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: var(--bib-text);
}

.bib-filters__reset {
	margin-left: auto;
	padding: 0;
	border: 0;
	background: none;
	color: var(--bib-primary);
	font-size: 13px;
	font-family: inherit;
	cursor: pointer;
	text-decoration: underline;
}

.bib-filters__group {
	padding: 14px 0;
	border-bottom: 1px solid var(--bib-border);
}

.bib-filters__group:last-of-type {
	border-bottom: 0;
}

.bib-filters__legend {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 0;
	border: 0;
	background: none;
	color: var(--bib-text);
	font-size: 14px;
	font-weight: 700;
	font-family: inherit;
	cursor: pointer;
}

.bib-filters__chevron {
	display: flex;
	color: var(--bib-muted);
	transition: transform .2s ease;
}

.bib-filters__legend[aria-expanded="false"] .bib-filters__chevron {
	transform: rotate(180deg);
}

.bib-filters__list {
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
}

.bib-filters__legend[aria-expanded="false"] + .bib-filters__list {
	display: none;
}

.bib-filters__item + .bib-filters__item {
	margin-top: 8px;
}

.bib-check {
	display: flex;
	align-items: center;
	gap: 9px;
	cursor: pointer;
	font-size: 14px;
	color: var(--bib-text);
}

.bib-check__input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.bib-check__box {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 17px;
	height: 17px;
	border: 1.5px solid #c6d0db;
	border-radius: 4px;
	background: #fff;
	transition: background .15s ease, border-color .15s ease;
}

.bib-check__box::after {
	content: "";
	width: 9px;
	height: 5px;
	border: 2px solid #fff;
	border-top: 0;
	border-right: 0;
	transform: rotate(-45deg) translate(1px, -1px);
	opacity: 0;
}

.bib-check__input:checked + .bib-check__box {
	border-color: var(--bib-primary);
	background: var(--bib-primary);
}

.bib-check__input:checked + .bib-check__box::after {
	opacity: 1;
}

.bib-check__input:focus-visible + .bib-check__box {
	outline: 2px solid var(--bib-primary);
	outline-offset: 2px;
}

.bib-check__label {
	flex: 1 1 auto;
}

.bib-check__count {
	color: var(--bib-muted);
	font-size: 13px;
	font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------- Toolbar */

.bib-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-bottom: 20px;
}

.bib-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.bib-chip {
	padding: 9px 18px;
	border: 1px solid var(--bib-border);
	border-radius: 999px;
	background: var(--bib-surface);
	color: var(--bib-text);
	font-size: 14px;
	font-family: inherit;
	line-height: 1.2;
	cursor: pointer;
	transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.bib-chip:hover {
	border-color: var(--bib-primary);
	color: var(--bib-primary);
}

.bib-chip.is-active {
	border-color: var(--bib-primary);
	background: var(--bib-primary);
	color: #fff;
}

.bib-sort__select {
	height: 38px;
	padding: 0 32px 0 14px;
	border: 1px solid var(--bib-border);
	border-radius: 999px;
	background: var(--bib-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7a8d' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center/16px;
	color: var(--bib-text);
	font-size: 14px;
	font-family: inherit;
	appearance: none;
	cursor: pointer;
}

.bib-toolbar__count {
	margin: 0 0 0 auto;
	color: var(--bib-muted);
	font-size: 14px;
}

/* ------------------------------------------------ Pestañas de categorías */

.bib-category-tabs {
	margin-top: 24px;
	border-bottom: 1px solid var(--bib-border);
	overflow-x: auto;
	overscroll-behavior-x: contain;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}

.bib-category-tabs__list {
	display: flex;
	align-items: stretch;
	width: max-content;
	min-width: 100%;
	padding: 0 4px;
}

.bib-category-tabs__button {
	position: relative;
	margin-bottom: -1px;
	padding: 12px 17px 11px;
	border: 0;
	border-bottom: 3px solid transparent;
	background: transparent;
	color: var(--bib-muted);
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	white-space: nowrap;
	cursor: pointer;
	transition: color .16s ease, border-color .16s ease, background .16s ease;
}

.bib-category-tabs__button:hover,
.bib-category-tabs__button:focus-visible {
	color: var(--bib-primary);
}

.bib-category-tabs__button:focus-visible {
	outline: 2px solid var(--bib-primary);
	outline-offset: -2px;
}

.bib-category-tabs__button.is-active,
.bib-category-tabs__button[aria-pressed="true"] {
	border-bottom-color: var(--bib-primary);
	color: var(--bib-primary);
}

/* ------------------------------------------------------------------ Grid */

.bib__results {
	position: relative;
	min-height: 120px;
}

.bib__grid {
	display: grid;
	grid-template-columns: repeat(var(--bib-cols), minmax(0, 1fr));
	gap: var(--bib-gap);
}

.bib--list .bib__grid {
	grid-template-columns: minmax(0, 1fr);
}

.bib--grouped .bib__grid {
	display: block;
}

.bib-group + .bib-group {
	margin-top: 32px;
}

.bib-group {
	padding-inline-start: calc(var(--bib-group-depth, 0) * 18px);
}

.bib-group__header {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0 0 16px;
}

.bib-group__header::after {
	content: "";
	flex: 1 1 auto;
	height: 1px;
	background: var(--bib-border);
}

.bib-group__title {
	margin: 0;
	color: var(--bib-dark);
	font-size: clamp(18px, 2vw, 22px);
	font-weight: 750;
	line-height: 1.25;
}

.bib-group--empty .bib-group__header {
	margin-bottom: 0;
}

.bib-group__grid {
	display: grid;
	grid-template-columns: repeat(var(--bib-cols), minmax(0, 1fr));
	gap: var(--bib-gap);
}

.bib--list .bib-group__grid {
	grid-template-columns: minmax(0, 1fr);
}

.bib__results[aria-busy="true"] .bib__grid {
	opacity: .45;
	pointer-events: none;
}

.bib__loader {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding-top: 60px;
}

.bib__spinner {
	display: block;
	width: 32px;
	height: 32px;
	border: 3px solid rgba(15, 139, 141, .2);
	border-top-color: var(--bib-primary);
	border-radius: 50%;
	animation: bib-spin .8s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
	.bib__spinner { animation-duration: 2s; }
}

/* ----------------------------------------------------------------- Card */

.bib-card {
	display: grid;
	grid-template-columns: minmax(84px, 32%) minmax(0, 1fr);
	gap: 16px;
	padding: 16px;
	border: 1px solid var(--bib-border);
	border-radius: var(--bib-radius);
	background: var(--bib-surface);
	box-shadow: var(--bib-shadow);
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.bib-card:hover {
	transform: translateY(-2px);
	border-color: #d4dde6;
	box-shadow: 0 10px 30px rgba(16, 57, 92, .1);
}

.bib--compact .bib-card {
	grid-template-columns: minmax(64px, 26%) minmax(0, 1fr);
	gap: 12px;
	padding: 12px;
}

.bib--list .bib-card {
	grid-template-columns: 96px minmax(0, 1fr);
	align-items: center;
	max-width: none;
}

.bib-card__thumb {
	position: relative;
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	border-radius: var(--bib-radius-sm);
	background: var(--bib-surface-soft);
	overflow: hidden;
	cursor: pointer;
	aspect-ratio: 3 / 4;
}

.bib--list .bib-card__thumb {
	aspect-ratio: 1 / 1;
}

.bib-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
}

.bib-card__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: linear-gradient(160deg, #eef3f7, #dde6ee);
	color: var(--bib-dark);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .04em;
}

.bib-card__zoom {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(16, 57, 92, .45);
	color: #fff;
	opacity: 0;
	transition: opacity .18s ease;
}

.bib-card__thumb:hover .bib-card__zoom,
.bib-card__thumb:focus-visible .bib-card__zoom {
	opacity: 1;
}

.bib-card__body {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.bib-badge {
	display: inline-flex;
	align-self: flex-start;
	align-items: center;
	padding: 4px 9px;
	border-radius: 5px;
	background: #6b7a8d;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .04em;
	line-height: 1.3;
	text-transform: uppercase;
}

.bib-badge--sm {
	padding: 3px 7px;
	font-size: 10px;
}

.bib-badge--pdf   { background: #e14b42; }
.bib-badge--docx  { background: #2563c9; }
.bib-badge--xlsx  { background: #1e8e4e; }
.bib-badge--pptx  { background: #dd7724; }
.bib-badge--video { background: #7c3aed; }
.bib-badge--audio { background: #0891b2; }
.bib-badge--image { background: #db2777; }
.bib-badge--zip   { background: #64748b; }
.bib-badge--txt   { background: #475569; }

.bib-card__title {
	margin: 10px 0 0;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -.01em;
}

.bib--compact .bib-card__title {
	font-size: 15px;
}

.bib-card__title a {
	color: var(--bib-text);
	text-decoration: none;
}

.bib-card__title a:hover {
	color: var(--bib-primary);
}

.bib-card__excerpt {
	margin: 6px 0 0;
	color: var(--bib-muted);
	font-size: 13.5px;
}

.bib-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 5px;
	margin: 8px 0 0;
	color: var(--bib-muted);
	font-size: 13px;
}

.bib-card__downloads {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 6px 0 0;
	color: var(--bib-muted);
	font-size: 13px;
	font-variant-numeric: tabular-nums;
}

.bib-card__downloads span {
	display: inline-flex;
}

.bib-card__size {
	color: #93a1b1;
}

.bib-card__actions {
	display: flex;
	gap: 8px;
	margin-top: auto;
	padding-top: 14px;
}

/* --------------------------------------------------------------- Botones */

.bib-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 40px;
	padding: 9px 18px;
	border: 1px solid transparent;
	border-radius: var(--bib-radius-sm);
	font-size: 14px;
	font-weight: 600;
	font-family: inherit;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background .16s ease, color .16s ease, border-color .16s ease;
}

.bib-btn span {
	display: inline-flex;
}

.bib-btn--soft {
	flex: 1 1 auto;
	background: var(--bib-surface-soft);
	color: #274056;
}

.bib-btn--soft:hover,
.bib-btn--soft:focus-visible {
	background: #e0e9f1;
	color: var(--bib-dark);
}

.bib-btn--primary {
	background: var(--bib-primary);
	color: #fff;
}

.bib-btn--primary:hover,
.bib-btn--primary:focus-visible {
	background: var(--bib-primary-hover);
	color: #fff;
}

.bib-btn--ghost {
	border-color: var(--bib-border);
	background: transparent;
	color: var(--bib-text);
}

.bib-btn--ghost:hover {
	border-color: var(--bib-primary);
	color: var(--bib-primary);
}

.bib-btn--lg {
	min-height: 48px;
	padding: 12px 26px;
	font-size: 15px;
}

.bib-btn--sm {
	min-height: 34px;
	padding: 6px 14px;
	font-size: 13px;
}

.bib-btn--block {
	width: 100%;
}

.bib-save {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 4px;
	border: 0;
	background: none;
	color: var(--bib-muted);
	font-size: 14px;
	font-family: inherit;
	cursor: pointer;
}

.bib-save:hover,
.bib-save.is-saved {
	color: var(--bib-primary);
}

.bib-save.is-saved .bib-save__icon svg {
	fill: currentColor;
}

/* ------------------------------------------------------------- Destacado */

.bib-featured--banner {
	display: grid;
	grid-template-columns: 230px minmax(0, 1fr) auto;
	gap: 26px;
	align-items: center;
	margin-top: 26px;
	padding: 20px;
	border: 1px solid var(--bib-border);
	border-radius: var(--bib-radius);
	background: var(--bib-surface);
	box-shadow: var(--bib-shadow);
}

.bib-featured__cover {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	border-radius: var(--bib-radius-sm);
	background: var(--bib-surface-soft);
	overflow: hidden;
	cursor: pointer;
	aspect-ratio: 16 / 10;
}

.bib-featured__cover .bib-card__img,
.bib-featured__cover .bib-card__placeholder {
	height: 100%;
	object-fit: cover;
}

.bib-featured__eyebrow {
	margin: 0 0 6px;
	color: var(--bib-primary);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .09em;
	text-transform: uppercase;
}

.bib-featured__heading {
	margin: 0 0 8px;
	font-size: clamp(19px, 2vw, 23px);
	font-weight: 700;
	line-height: 1.25;
}

.bib-featured__heading a {
	color: var(--bib-text);
	text-decoration: none;
}

.bib-featured__heading a:hover {
	color: var(--bib-primary);
}

.bib-featured__desc {
	margin: 0 0 12px;
	color: var(--bib-muted);
	font-size: 15px;
}

.bib-featured__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0;
	color: var(--bib-muted);
	font-size: 13.5px;
}

.bib-featured__actions {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 6px;
}

.bib-featured__actions .bib-save {
	justify-content: center;
}

/* Variante de la barra lateral */

.bib-featured--aside {
	margin-top: 18px;
	padding: 14px;
	border: 1px solid var(--bib-border);
	border-radius: var(--bib-radius-sm);
	background: #f4f9f9;
}

.bib-featured__label {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 12px;
	color: var(--bib-primary);
	font-size: 13px;
	font-weight: 700;
}

.bib-featured__row {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr);
	gap: 12px;
	margin-bottom: 12px;
}

.bib-featured__thumb {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: var(--bib-surface-soft);
	overflow: hidden;
	cursor: pointer;
	aspect-ratio: 3 / 4;
}

.bib-featured__thumb .bib-card__img,
.bib-featured__thumb .bib-card__placeholder {
	height: 100%;
	font-size: 10px;
}

.bib-featured__title {
	margin: 0 0 4px;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
}

.bib-featured__title a {
	color: var(--bib-text);
	text-decoration: none;
}

.bib-featured__excerpt {
	margin: 0;
	color: var(--bib-muted);
	font-size: 12.5px;
	line-height: 1.4;
}

/* ------------------------------------------------------------ Paginación */

.bib__pagination {
	display: flex;
	justify-content: center;
	margin-top: 28px;
}

.bib-pages {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.bib-pages .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 12px;
	border: 1px solid var(--bib-border);
	border-radius: var(--bib-radius-sm);
	background: var(--bib-surface);
	color: var(--bib-text);
	font-size: 14px;
	text-decoration: none;
}

.bib-pages a.page-numbers:hover {
	border-color: var(--bib-primary);
	color: var(--bib-primary);
}

.bib-pages .page-numbers.current {
	border-color: var(--bib-primary);
	background: var(--bib-primary);
	color: #fff;
}

.bib-pages .page-numbers.dots {
	border-color: transparent;
	background: none;
}

.bib-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	grid-column: 1 / -1;
	padding: 56px 20px;
	border: 1px dashed var(--bib-border);
	border-radius: var(--bib-radius);
	color: var(--bib-muted);
	text-align: center;
}

.bib-empty__icon {
	display: flex;
	color: #b6c2d0;
}

/* ------------------------------------------------------------ Categorías */

.bib-cats {
	display: grid;
	grid-template-columns: repeat(var(--bib-cols, 4), minmax(0, 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.bib-cats__link {
	display: flex;
	flex-direction: column;
	gap: 6px;
	height: 100%;
	padding: 20px;
	border: 1px solid var(--bib-border);
	border-radius: var(--bib-radius);
	background: var(--bib-surface);
	color: var(--bib-text);
	text-decoration: none;
	transition: border-color .16s ease, transform .16s ease;
}

.bib-cats__link:hover {
	border-color: var(--bib-primary);
	transform: translateY(-2px);
}

.bib-cats__icon {
	display: flex;
	color: var(--bib-primary);
}

.bib-cats__name {
	font-size: 16px;
	font-weight: 700;
}

.bib-cats__count {
	color: var(--bib-muted);
	font-size: 13px;
}

/* ----------------------------------------------------------------- Visor */

.bib-viewer {
	position: relative;
	width: 100%;
	height: var(--bib-viewer-height, 600px);
	border: 1px solid var(--bib-border);
	border-radius: var(--bib-radius);
	background: var(--bib-surface-soft);
	overflow: hidden;
}

.bib-viewer__stage {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.bib-viewer__stage > iframe,
.bib-viewer__stage > video,
.bib-viewer__stage > embed,
.bib-viewer__stage > object {
	width: 100%;
	height: 100%;
	border: 0;
}

.bib-viewer__stage > audio {
	width: 90%;
}

.bib-viewer__stage img {
	max-height: 100%;
	object-fit: contain;
}

.bib-viewer--empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	height: auto;
	padding: 40px 20px;
}

.bib-viewer__notice {
	margin: 0;
	color: var(--bib-muted);
}

.bib-viewer-trigger {
	position: relative;
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	border-radius: var(--bib-radius);
	background: var(--bib-surface-soft);
	overflow: hidden;
	cursor: pointer;
}

.bib-viewer-trigger__play {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(16, 57, 92, .35);
	color: #fff;
	opacity: 0;
	transition: opacity .18s ease;
}

.bib-viewer-trigger:hover .bib-viewer-trigger__play,
.bib-viewer-trigger:focus-visible .bib-viewer-trigger__play {
	opacity: 1;
}

/* ----------------------------------------------------------------- Modal */

.bib-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.bib-modal[hidden] {
	display: none;
}

.bib-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(9, 24, 40, .72);
	backdrop-filter: blur(2px);
}

.bib-modal__dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(1180px, 100%);
	height: min(92vh, 100%);
	border-radius: var(--bib-radius, 12px);
	background: #fff;
	overflow: hidden;
	box-shadow: 0 30px 70px rgba(0, 0, 0, .35);
}

.bib-modal__head {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 14px 18px;
	border-bottom: 1px solid #e3e9ef;
	background: #fff;
}

.bib-modal__title {
	flex: 1 1 auto;
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	color: #16273a;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.bib-modal__tools {
	display: flex;
	align-items: center;
	gap: 10px;
}

.bib-modal__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #eef3f7;
	color: #16273a;
	cursor: pointer;
}

.bib-modal__close:hover {
	background: #e0e9f1;
}

.bib-modal__body {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	background: #eef3f7;
}

.bib-modal__body > iframe,
.bib-modal__body > video,
.bib-modal__body > .bib-flipbook {
	width: 100%;
	height: 100%;
	border: 0;
}

.bib-modal__body > img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.bib-modal__body .bib-modal__center {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	color: #6b7a8d;
	text-align: center;
}

body.bib-modal-open {
	overflow: hidden;
}

/* ----------------------------------------------------------- Responsive */

@media (max-width: 1024px) {
	.bib__layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.bib-filters {
		position: static;
	}

	.bib__grid {
		grid-template-columns: repeat(var(--bib-cols-tablet), minmax(0, 1fr));
	}

	.bib-group__grid {
		grid-template-columns: repeat(var(--bib-cols-tablet), minmax(0, 1fr));
	}

	.bib-hero__inner {
		flex-direction: column;
		align-items: flex-start;
		gap: 24px;
	}

	.bib-hero__note {
		max-width: none;
		padding: 0 0 0 16px;
	}

	.bib-featured--banner {
		grid-template-columns: 180px minmax(0, 1fr);
	}

	.bib-featured__actions {
		grid-column: 1 / -1;
		flex-direction: row;
		align-items: center;
	}
}

@media (max-width: 640px) {
	.bib__grid {
		grid-template-columns: repeat(var(--bib-cols-mobile), minmax(0, 1fr));
	}

	.bib-group__grid {
		grid-template-columns: repeat(var(--bib-cols-mobile), minmax(0, 1fr));
	}

	.bib-category-tabs__button {
		padding-right: 14px;
		padding-left: 14px;
	}

	.bib-group {
		padding-inline-start: calc(var(--bib-group-depth, 0) * 12px);
	}

	.bib-hero {
		padding: 34px 20px 38px;
	}

	.bib-toolbar__count {
		width: 100%;
		margin-left: 0;
	}

	.bib-featured--banner {
		grid-template-columns: minmax(0, 1fr);
	}

	.bib-modal {
		padding: 0;
	}

	.bib-modal__dialog {
		width: 100%;
		height: 100%;
		border-radius: 0;
	}
}

/* ------------------------------------------------ Filtros plegables (móvil) */

.bib-filters__mobile {
	display: none;
	margin-left: auto;
	padding: 6px 14px;
	border: 1px solid var(--bib-border);
	border-radius: 999px;
	background: var(--bib-surface);
	color: var(--bib-text);
	font-size: 13px;
	font-family: inherit;
	cursor: pointer;
}

@media (max-width: 1024px) {
	.bib-filters__mobile {
		display: inline-flex;
	}

	.bib-filters__reset {
		margin-left: 10px;
	}

	.bib-filters__groups,
	.bib-filters .bib-featured--aside {
		display: none;
	}

	.bib-filters.is-open .bib-filters__groups {
		display: block;
	}

	.bib-filters.is-open .bib-featured--aside {
		display: block;
	}
}

/* ------------------------------------------------- Contenedores del visor */

.bib-modal__body > .bib-pdfviewer,
.bib-viewer__stage > .bib-pdfviewer,
.bib-modal__body > .bib-flipbook,
.bib-viewer__stage > .bib-flipbook {
	width: 100%;
	height: 100%;
}

.bib-viewer--bib,
.bib-viewer--flipbook {
	background: #2b3440;
}

/* ------------------------------------------------- Dentro del editor */

/* Marcador visible cuando un widget aún no tiene contenido que mostrar:
   sin él, el bloque quedaría a cero de alto y no se podría seleccionar. */
.bib-editor-notice {
	padding: 18px 20px;
	border: 1px dashed var(--bib-border, #e3e9ef);
	border-radius: var(--bib-radius, 12px);
	background: var(--bib-surface, #fff);
	color: var(--bib-muted, #6b7a8d);
	font-size: 14px;
	line-height: 1.45;
	text-align: center;
}

/* La barra pegajosa estorba al maquetar. */
body.elementor-editor-active .bib-filters {
	position: static;
}

/* ------------------------------------------ Filtros a la derecha */

.bib--sidebar-right .bib__layout {
	grid-template-columns: minmax(0, 1fr) 280px;
}

.bib--sidebar-right .bib__sidebar {
	order: 2;
}

.bib--sidebar-right .bib__main {
	order: 1;
}

@media (max-width: 1024px) {
	/* En pantallas estrechas los filtros van siempre arriba y a lo ancho.
	   Hace falta repetir el selector de dos clases: la regla de escritorio
	   gana por especificidad aunque esté fuera de esta media query. */
	.bib--sidebar-right .bib__layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.bib--sidebar-right .bib__sidebar {
		order: 0;
	}

	.bib--sidebar-right .bib__main {
		order: 1;
	}
}

/* Subcategorías sangradas dentro de la lista de filtros. */

.bib-filters__item {
	padding-left: calc(var(--bib-depth, 0) * 15px);
}

/* Tarjeta maquetada con Elementor: sólo participa en la cuadrícula, sin
   añadir marco ni fondo propios para no pelearse con el diseño. */

.bib-card-template {
	min-width: 0;
}
