:root {
    --tesi-navy: #0b2948;
    --tesi-navy-deep: #061b30;
    --tesi-blue: #12608d;
    --tesi-blue-light: #e9f3f8;
    --tesi-gold: #d5a323;
    --tesi-gold-light: #f6ecd0;
    --tesi-ink: #17263a;
    --tesi-muted: #5d6b7c;
    --tesi-line: #dce4eb;
    --tesi-surface: #f5f8fa;
    --tesi-white: #ffffff;
    --tesi-shadow: 0 18px 50px rgba(6, 27, 48, 0.11);
    --tesi-radius: 1.25rem;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--tesi-ink);
    background: var(--tesi-white);
    font-family: Inter, "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.65;
}

#content {
    flex: 1 0 auto;
}

a {
    color: var(--tesi-blue);
}

a:hover {
    color: var(--tesi-navy);
}

:focus-visible {
    outline: 3px solid rgba(213, 163, 35, 0.75);
    outline-offset: 3px;
}

.btn-primary {
    --bs-btn-bg: var(--tesi-blue);
    --bs-btn-border-color: var(--tesi-blue);
    --bs-btn-hover-bg: var(--tesi-navy);
    --bs-btn-hover-border-color: var(--tesi-navy);
    --bs-btn-active-bg: var(--tesi-navy-deep);
    --bs-btn-active-border-color: var(--tesi-navy-deep);
}

.btn-outline-primary {
    --bs-btn-color: var(--tesi-blue);
    --bs-btn-border-color: var(--tesi-blue);
    --bs-btn-hover-bg: var(--tesi-blue);
    --bs-btn-hover-border-color: var(--tesi-blue);
}

.text-primary {
    color: var(--tesi-blue) !important;
}

.bg-primary {
    background-color: var(--tesi-blue) !important;
}

.tesiuan-topbar {
    color: rgba(255, 255, 255, 0.82);
    background: var(--tesi-navy-deep);
    font-size: 0.82rem;
    letter-spacing: 0.01em;
}

.tesiuan-topbar a {
    color: #fff;
    text-decoration: none;
}

.tesiuan-topbar a:hover {
    color: var(--tesi-gold);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid rgba(11, 41, 72, 0.08);
    transition: box-shadow 180ms ease, background-color 180ms ease;
}

.site-header.is-scrolled {
    box-shadow: 0 10px 32px rgba(6, 27, 48, 0.1);
}

.tesiuan-navbar {
    min-height: 80px;
    padding: 0.75rem 0;
}

.tesiuan-brand {
    color: var(--tesi-navy);
    text-decoration: none;
    min-width: 0;
}

.tesiuan-brand:hover {
    color: var(--tesi-navy);
}

.tesiuan-brand-logo {
    width: auto;
    max-width: 190px;
    height: 52px;
    object-fit: contain;
}

.tesiuan-brand-mark {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: #fff;
    background: linear-gradient(145deg, var(--tesi-blue), var(--tesi-navy));
    border-radius: 0.9rem 0.35rem 0.9rem 0.35rem;
    box-shadow: 0 8px 20px rgba(18, 96, 141, 0.22);
    font-size: 1.45rem;
}

.tesiuan-brand-copy {
    min-width: 0;
    line-height: 1.15;
}

.tesiuan-brand-title {
    display: block;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.tesiuan-brand-subtitle {
    display: block;
    margin-top: 0.25rem;
    color: var(--tesi-muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.tesiuan-navbar .nav-link {
    position: relative;
    color: var(--tesi-ink);
    font-size: 0.94rem;
    font-weight: 600;
    padding: 0.75rem 0.8rem !important;
}

.tesiuan-navbar .nav-link:hover,
.tesiuan-navbar .nav-link.active {
    color: var(--tesi-blue);
}

.tesiuan-navbar .nav-link.active::after {
    content: "";
    position: absolute;
    right: 0.8rem;
    bottom: 0.3rem;
    left: 0.8rem;
    height: 2px;
    background: var(--tesi-gold);
}

.tesiuan-dropdown-toggle {
    color: var(--tesi-muted);
    border: 0;
    background: transparent;
    padding: 0.5rem 0.35rem;
}

.tesiuan-navbar .dropdown-menu {
    border: 1px solid var(--tesi-line);
    border-radius: 0.85rem;
    box-shadow: var(--tesi-shadow);
    padding: 0.55rem;
}

.tesiuan-navbar .dropdown-item {
    border-radius: 0.55rem;
    padding: 0.6rem 0.75rem;
}

.tesiuan-navbar .dropdown-item:hover,
.tesiuan-navbar .dropdown-item.active {
    color: var(--tesi-navy);
    background: var(--tesi-blue-light);
}

.tesiuan-nav-search {
    white-space: nowrap;
    border-radius: 999px;
    padding: 0.62rem 1rem;
}

.tesiuan-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 82% 22%, rgba(213, 163, 35, 0.2), transparent 27%),
        linear-gradient(125deg, var(--tesi-navy-deep) 0%, var(--tesi-navy) 53%, #114f73 100%);
}

.tesiuan-hero::before,
.tesiuan-hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.tesiuan-hero::before {
    width: 36rem;
    height: 36rem;
    top: -21rem;
    right: -8rem;
}

.tesiuan-hero::after {
    width: 25rem;
    height: 25rem;
    right: 10rem;
    bottom: -20rem;
}

.tesiuan-hero.has-image {
    background-position: center;
    background-size: cover;
}

.tesiuan-hero.has-image::before {
    width: 100%;
    height: 100%;
    inset: 0;
    border: 0;
    border-radius: 0;
    background: linear-gradient(100deg, rgba(6, 27, 48, 0.96) 12%, rgba(11, 41, 72, 0.88) 53%, rgba(11, 41, 72, 0.55) 100%);
}

.tesiuan-hero-inner {
    min-height: 590px;
    display: flex;
    align-items: center;
    padding-top: 5.5rem;
    padding-bottom: 6.5rem;
}

.tesiuan-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.4rem;
    color: #f6ddb0;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.tesiuan-eyebrow::before {
    content: "";
    width: 2.3rem;
    height: 2px;
    background: var(--tesi-gold);
}

.tesiuan-hero-title {
    max-width: 760px;
    margin-bottom: 1.5rem;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.55rem, 5.3vw, 5rem);
    font-weight: 700;
    line-height: 0.99;
    letter-spacing: -0.045em;
}

.tesiuan-hero-description {
    max-width: 660px;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.78);
    font-size: clamp(1rem, 1.5vw, 1.22rem);
}

.tesiuan-hero-actions .btn {
    border-radius: 999px;
    padding: 0.8rem 1.35rem;
    font-weight: 700;
}

.tesiuan-hero-actions .btn-warning {
    --bs-btn-bg: var(--tesi-gold);
    --bs-btn-border-color: var(--tesi-gold);
    --bs-btn-color: var(--tesi-navy-deep);
    --bs-btn-hover-bg: #e3b640;
    --bs-btn-hover-border-color: #e3b640;
    --bs-btn-hover-color: var(--tesi-navy-deep);
}

.tesiuan-search-panel {
    position: relative;
    padding: 1.65rem;
    color: var(--tesi-ink);
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--tesi-radius);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.22);
}

.tesiuan-search-panel-title {
    color: var(--tesi-navy);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.45rem;
    font-weight: 700;
}

.tesiuan-search-form .form-control {
    min-height: 58px;
    border-color: #cfd9e2;
    border-radius: 0.8rem 0 0 0.8rem;
    padding-left: 1.1rem;
    font-size: 1rem;
}

.tesiuan-search-form .btn {
    min-width: 62px;
    border-radius: 0 0.8rem 0.8rem 0;
}

.tesiuan-search-help {
    margin-top: 0.85rem;
    color: var(--tesi-muted);
    font-size: 0.78rem;
}

.tesiuan-search-help a {
    font-weight: 700;
}

.tesiuan-stats-wrap {
    position: relative;
    z-index: 2;
    margin-top: -2.5rem;
}

.tesiuan-stats {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--tesi-line);
    border-radius: var(--tesi-radius);
    box-shadow: var(--tesi-shadow);
}

.tesiuan-stat {
    position: relative;
    padding: 1.5rem 1.6rem;
}

.tesiuan-stat + .tesiuan-stat::before {
    content: "";
    position: absolute;
    top: 22%;
    bottom: 22%;
    left: 0;
    width: 1px;
    background: var(--tesi-line);
}

.tesiuan-stat-number {
    color: var(--tesi-navy);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.tesiuan-stat-label {
    margin-top: 0.35rem;
    color: var(--tesi-muted);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tesiuan-section {
    padding: 6rem 0;
}

.tesiuan-section-alt {
    background: var(--tesi-surface);
}

.tesiuan-section-kicker {
    margin-bottom: 0.8rem;
    color: var(--tesi-blue);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.tesiuan-section-title {
    max-width: 800px;
    margin-bottom: 1rem;
    color: var(--tesi-navy);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 3.5vw, 3.25rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.tesiuan-section-lead {
    max-width: 780px;
    color: var(--tesi-muted);
    font-size: 1.05rem;
}

.tesiuan-collection-card,
.tesiuan-item-card,
.tesiuan-value-card {
    height: 100%;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--tesi-line);
    border-radius: var(--tesi-radius);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.tesiuan-collection-card:hover,
.tesiuan-item-card:hover,
.tesiuan-value-card:hover {
    transform: translateY(-5px);
    border-color: rgba(18, 96, 141, 0.35);
    box-shadow: var(--tesi-shadow);
}

.tesiuan-collection-card {
    position: relative;
    padding: 1.7rem;
}

.tesiuan-collection-card::after {
    content: "";
    position: absolute;
    right: -2.5rem;
    bottom: -2.5rem;
    width: 7rem;
    height: 7rem;
    background: var(--tesi-blue-light);
    border-radius: 50%;
}

.tesiuan-collection-icon {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    color: var(--tesi-blue);
    background: var(--tesi-blue-light);
    border-radius: 0.85rem;
    font-size: 1.25rem;
}

.tesiuan-collection-title {
    position: relative;
    z-index: 1;
    color: var(--tesi-navy);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.25rem;
    font-weight: 700;
}

.tesiuan-collection-description {
    position: relative;
    z-index: 1;
    min-height: 3.2rem;
    color: var(--tesi-muted);
    font-size: 0.9rem;
}

.tesiuan-collection-meta {
    position: relative;
    z-index: 1;
    color: var(--tesi-blue);
    font-size: 0.82rem;
    font-weight: 800;
}

.tesiuan-card-link {
    color: inherit;
    text-decoration: none;
}

.tesiuan-item-thumb {
    position: relative;
    height: 240px;
    overflow: hidden;
    background: linear-gradient(145deg, #eaf1f5, #dce8ef);
}

.tesiuan-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 250ms ease;
}

.tesiuan-item-card:hover .tesiuan-item-thumb img {
    transform: scale(1.025);
}

.tesiuan-item-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(11, 41, 72, 0.48);
    font-size: 3.3rem;
}

.tesiuan-item-type {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.35rem 0.65rem;
    color: var(--tesi-navy-deep);
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tesiuan-item-body {
    padding: 1.35rem;
}

.tesiuan-item-title {
    color: var(--tesi-navy);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.32;
}

.tesiuan-item-meta {
    margin-top: 0.8rem;
    color: var(--tesi-muted);
    font-size: 0.82rem;
}

.tesiuan-value-card {
    padding: 1.8rem;
}

.tesiuan-value-icon {
    width: 3.2rem;
    height: 3.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--tesi-navy);
    background: var(--tesi-gold-light);
    border-radius: 50%;
    font-size: 1.25rem;
}

.tesiuan-value-card h3 {
    color: var(--tesi-navy);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.2rem;
    font-weight: 700;
}

.tesiuan-value-card p {
    margin: 0;
    color: var(--tesi-muted);
    font-size: 0.9rem;
}

.tesiuan-cta {
    overflow: hidden;
    color: #fff;
    background: linear-gradient(120deg, var(--tesi-navy-deep), var(--tesi-blue));
    border-radius: calc(var(--tesi-radius) + 0.4rem);
    box-shadow: var(--tesi-shadow);
}

.tesiuan-cta h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 700;
}

.site-footer {
    flex: 0 0 auto;
    color: rgba(255, 255, 255, 0.76);
    background: var(--tesi-navy-deep);
}

.site-footer a {
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--tesi-gold);
}

.tesiuan-footer-title {
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.35rem;
    font-weight: 700;
}

.tesiuan-footer-heading {
    margin-bottom: 1rem;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.tesiuan-footer-logo {
    max-width: 180px;
    max-height: 58px;
    padding: 0.25rem;
    object-fit: contain;
    background: #fff;
    border-radius: 0.55rem;
}

.tesiuan-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

#btn-back-to-top {
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(6, 27, 48, 0.28);
}

.browse-header,
.item-set-header,
.media-header,
.page-header {
    background: var(--tesi-surface) !important;
    border-bottom: 1px solid var(--tesi-line);
}

.browse-header h1,
.item-set-header h1,
.media-header h1,
.page-content h1,
.page-content h2 {
    color: var(--tesi-navy);
    font-family: Georgia, "Times New Roman", serif;
}

.card {
    border-color: var(--tesi-line);
}

.breadcrumb a,
.pagination a {
    color: var(--tesi-blue);
}

.page-content .blocks {
    max-width: 1120px;
    margin: 0 auto;
}

.tesiuan-home-page .page-meta-info {
    display: none;
}

/* Ficha de tesis: jerarquía catalográfica inspirada en repositorios académicos. */
body.tesiuan-record-page #content {
    background: #f2f4f6;
}

.tesiuan-item-shell {
    max-width: 1120px;
}

.tesiuan-record-card {
    overflow: hidden;
    background: var(--tesi-white);
    border: 1px solid var(--tesi-line);
    border-radius: 0.85rem;
    box-shadow: 0 12px 34px rgba(6, 27, 48, 0.08);
}

.tesiuan-item-titlebar {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1.05rem 1.25rem;
    color: #fff;
    background: linear-gradient(135deg, var(--tesi-navy-deep), #183e60);
    border-left: 4px solid var(--tesi-gold);
}

.tesiuan-item-title-icon {
    flex: 0 0 auto;
    display: grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    color: #77d8e4;
    font-size: 1.2rem;
}

.tesiuan-item-titlebar h1 {
    margin: 0;
    color: #fff;
    font-family: Inter, "Open Sans", system-ui, sans-serif;
    font-size: clamp(1.08rem, 1.9vw, 1.42rem);
    font-weight: 700;
    line-height: 1.35;
}

.tesiuan-item-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 1rem;
    margin-top: 0.35rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.72rem;
}

.tesiuan-item-summary span + span::before {
    content: "•";
    margin-right: 1rem;
    color: rgba(255, 255, 255, 0.38);
}

.tesiuan-item-summary .tesiuan-private {
    color: #ffe29a;
}

.tesiuan-item-toolbar {
    padding: 0.7rem 1.25rem;
    background: #fff;
    border-bottom: 1px solid var(--tesi-line);
}

.tesiuan-item-toolbar .item-actions {
    margin: 0 !important;
}

.tesiuan-item-toolbar .item-actions > .d-flex {
    justify-content: flex-end !important;
}

.tesiuan-item-toolbar .btn {
    --bs-btn-font-size: 0.74rem;
    --bs-btn-padding-y: 0.25rem;
    --bs-btn-padding-x: 0.55rem;
}

.tesiuan-resource-blocks {
    display: flex;
    flex-direction: column;
    padding: 1.15rem 1.25rem 1.5rem;
}

.tesiuan-resource-blocks > .tesiuan-record-metadata {
    order: 10;
}

.tesiuan-resource-blocks > .tesiuan-item-sets {
    order: 20;
}

.tesiuan-resource-blocks > .tesiuan-document-section {
    order: 30;
}

.tesiuan-resource-blocks > .media-list-section {
    order: 40;
}

.tesiuan-record-metadata {
    margin: 0 0 1rem;
    border-left: 3px solid #18a66b;
}

.tesiuan-metadata-table {
    margin: 0;
}

.tesiuan-metadata-row {
    display: grid;
    grid-template-columns: minmax(145px, 22%) minmax(0, 1fr);
    margin: 0;
    padding: 0.54rem 0.75rem;
    font-size: 0.83rem;
    line-height: 1.48;
}

.tesiuan-metadata-row:nth-child(odd) {
    background: #e7e9eb;
}

.tesiuan-metadata-row:nth-child(even) {
    background: #fff;
}

.tesiuan-metadata-row dt {
    margin: 0;
    padding-right: 1rem;
    color: #3f4d5b;
    font-weight: 700;
}

.tesiuan-metadata-row dt small {
    display: block;
    margin-top: 0.1rem;
    color: var(--tesi-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.66rem;
    font-weight: 400;
}

.tesiuan-metadata-row dd {
    min-width: 0;
    margin: 0;
    color: #243344;
    overflow-wrap: anywhere;
}

.tesiuan-metadata-value + .tesiuan-metadata-value {
    margin-top: 0.22rem;
}

.tesiuan-metadata-value a {
    color: #0e6caf;
    text-underline-offset: 0.15em;
}

.tesiuan-language {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    margin-right: 0.4rem;
    padding: 0.05rem 0.3rem;
    color: #3d596e;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid #c8d1d8;
    border-radius: 0.2rem;
    font-size: 0.62rem;
    font-weight: 700;
}

.tesiuan-annotation {
    margin-top: 0.45rem;
    padding: 0.35rem 0.55rem;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid #d4dce2;
}

.tesiuan-annotation summary {
    color: var(--tesi-blue);
    cursor: pointer;
    font-weight: 700;
}

.tesiuan-item-sets {
    margin: 0 0 1.15rem;
    border: 1px solid var(--tesi-line);
    border-radius: 0.4rem;
}

.tesiuan-collection-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    color: #fff;
    background: var(--tesi-blue);
}

.tesiuan-collection-heading h2 {
    margin: 0;
    font-size: 0.86rem;
    font-weight: 700;
}

.tesiuan-collection-heading h2 i {
    margin-right: 0.4rem;
    color: #7fe0e8;
}

.tesiuan-collection-heading > span {
    display: inline-grid;
    min-width: 1.4rem;
    height: 1.4rem;
    padding: 0 0.35rem;
    place-items: center;
    color: var(--tesi-navy);
    background: #fff;
    border-radius: 0.7rem;
    font-size: 0.7rem;
    font-weight: 800;
}

.tesiuan-collection-list {
    padding: 0.7rem;
}

.tesiuan-collection-link {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.7rem;
    padding: 0.62rem 0.7rem;
    color: var(--tesi-ink);
    text-decoration: none;
    background: #fff;
    border: 1px solid var(--tesi-line);
    border-radius: 0.35rem;
}

.tesiuan-collection-link + .tesiuan-collection-link {
    margin-top: 0.5rem;
}

.tesiuan-collection-link:hover {
    color: var(--tesi-blue);
    border-color: #a8c8db;
    box-shadow: 0 4px 14px rgba(6, 27, 48, 0.08);
}

.tesiuan-collection-mark {
    display: grid;
    width: 2.15rem;
    height: 2.15rem;
    place-items: center;
    color: #fff;
    background: var(--tesi-blue);
    border-radius: 50%;
}

.tesiuan-collection-copy {
    display: block;
    min-width: 0;
}

.tesiuan-collection-copy strong,
.tesiuan-collection-copy small {
    display: block;
}

.tesiuan-collection-copy small {
    margin-top: 0.1rem;
    color: var(--tesi-muted);
}

.tesiuan-collection-count {
    color: var(--tesi-muted);
    font-size: 0.72rem;
    white-space: nowrap;
}

.tesiuan-collection-arrow {
    color: #96a4af;
}

.tesiuan-document-section {
    margin: 0;
    padding-top: 0.25rem;
}

.tesiuan-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.65rem;
    padding-bottom: 0.55rem;
    border-bottom: 2px solid var(--tesi-navy);
}

.tesiuan-section-heading h2 {
    margin: 0.05rem 0 0;
    color: var(--tesi-navy);
    font-size: 1rem;
    font-weight: 800;
}

.tesiuan-section-kicker {
    color: var(--tesi-blue);
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.tesiuan-file-count {
    color: var(--tesi-muted);
    font-size: 0.72rem;
    white-space: nowrap;
}

.tesiuan-media-record {
    overflow: hidden;
    background: #fff;
    border: 1px solid #cdd6dd;
    border-radius: 0.35rem;
}

.tesiuan-media-record + .tesiuan-media-record {
    margin-top: 1.1rem;
}

.tesiuan-media-frame {
    min-height: 260px;
    background: #24272d;
    text-align: center;
}

.tesiuan-media-frame iframe,
.tesiuan-media-frame object,
.tesiuan-media-frame embed {
    display: block;
    width: 100% !important;
    height: min(72vh, 720px) !important;
    min-height: 520px;
    border: 0;
}

.tesiuan-media-frame img,
.tesiuan-media-frame video {
    display: block;
    max-width: 100%;
    max-height: 720px;
    margin: 0 auto;
}

.tesiuan-media-frame audio {
    width: min(100% - 2rem, 720px);
    margin: 3rem auto;
}

.tesiuan-media-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0.75rem;
    background: #fff;
    border-top: 1px solid var(--tesi-line);
}

.tesiuan-media-description {
    min-width: 0;
}

.tesiuan-media-description h3 {
    margin: 0;
    color: var(--tesi-ink);
    font-size: 0.8rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.tesiuan-media-description p {
    margin: 0.15rem 0 0;
    color: var(--tesi-muted);
    font-size: 0.72rem;
}

.tesiuan-media-footer .btn {
    flex: 0 0 auto;
}

/* Catálogo y resultados de búsqueda. */
body.tesiuan-results-page #content {
    background: #eef1f3;
}

.tesiuan-results-main {
    min-height: 72vh;
}

.tesiuan-results-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 1.15rem;
    color: #fff;
    background: linear-gradient(135deg, var(--tesi-navy-deep), #1a466b);
    border-bottom: 3px solid #1dbb9d;
    border-radius: 0.55rem 0.55rem 0 0;
}

.tesiuan-results-eyebrow {
    display: block;
    margin-bottom: 0.15rem;
    color: #75dfd2;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.tesiuan-results-header h1 {
    margin: 0;
    color: #fff;
    font-family: Inter, "Open Sans", system-ui, sans-serif;
    font-size: clamp(1.15rem, 2.2vw, 1.65rem);
    font-weight: 750;
}

.tesiuan-results-header p {
    margin: 0.2rem 0 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.8rem;
}

.tesiuan-results-count {
    flex: 0 0 auto;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.72rem;
    white-space: nowrap;
}

.tesiuan-results-count strong {
    display: inline-grid;
    min-width: 2rem;
    height: 2rem;
    margin-right: 0.35rem;
    padding: 0 0.4rem;
    place-items: center;
    color: var(--tesi-navy);
    background: #fff;
    border-radius: 1rem;
    font-size: 0.82rem;
}

.tesiuan-results-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 0.85rem;
    margin-bottom: 1rem;
    padding: 0.7rem 0.85rem;
    background: #fff;
    border: 1px solid #d5dde3;
    border-top: 0;
    border-radius: 0 0 0.55rem 0.55rem;
    box-shadow: 0 5px 18px rgba(6, 27, 48, 0.06);
}

.tesiuan-results-search {
    flex: 1 1 320px;
    max-width: 470px;
}

.tesiuan-results-search .input-group-text {
    color: var(--tesi-blue);
    background: #edf4f7;
}

.tesiuan-results-controls {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
}

.tesiuan-results-controls .form-select {
    width: auto;
    min-width: 135px;
}

.tesiuan-results-controls .btn.active {
    color: #fff;
    background: var(--tesi-blue);
    border-color: var(--tesi-blue);
}

.tesiuan-results-pagination {
    display: flex;
    justify-content: center;
}

.tesiuan-results-pagination-top {
    flex: 1 1 100%;
    justify-content: flex-end;
    padding-top: 0.1rem;
    border-top: 1px solid #edf0f2;
}

.tesiuan-results-pagination-bottom {
    margin-top: 1.4rem;
    padding: 0.7rem;
    background: #fff;
    border: 1px solid #d5dde3;
    border-radius: 0.45rem;
}

.tesiuan-results-pagination nav > .d-flex {
    flex-wrap: wrap;
    justify-content: center;
}

.tesiuan-results-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
}

.tesiuan-result-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #d5dde3;
    border-left: 3px solid #2b8cff;
    border-radius: 0.48rem;
    box-shadow: 0 3px 12px rgba(6, 27, 48, 0.06);
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.tesiuan-result-card:hover,
.tesiuan-result-card:focus-within {
    z-index: 1;
    transform: translateY(-3px);
    border-color: #78b3ef;
    box-shadow: 0 10px 24px rgba(6, 27, 48, 0.13);
}

.tesiuan-result-cover {
    display: flex;
    height: 175px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #8e9da8;
    text-decoration: none;
    background: #e8ecef;
    border-bottom: 1px solid #d8dfe4;
}

.tesiuan-result-cover img {
    display: block;
    width: 100%;
    height: 100%;
}

.tesiuan-result-cover.thumbnail-contain img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
}

.tesiuan-result-cover.thumbnail-cover img {
    object-fit: cover;
}

.tesiuan-result-placeholder {
    display: grid;
    width: 3.1rem;
    height: 3.1rem;
    place-items: center;
    color: #91a2ae;
    border: 2px solid #a9b6bf;
    border-radius: 0.35rem;
    font-size: 1.65rem;
}

.tesiuan-result-card-body {
    padding: 0.65rem 0.7rem 0.75rem;
}

.tesiuan-result-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.4rem;
}

.tesiuan-result-type,
.tesiuan-result-access {
    display: inline-flex;
    align-items: center;
    gap: 0.18rem;
    padding: 0.08rem 0.32rem;
    border-radius: 0.75rem;
    font-size: 0.57rem;
    font-weight: 750;
    line-height: 1.4;
}

.tesiuan-result-type {
    color: #1762a0;
    background: #e5f1fb;
    border: 1px solid #c8e0f3;
}

.tesiuan-result-access.is-available {
    color: #176c3a;
    background: #e2f5e9;
    border: 1px solid #bee6ce;
}

.tesiuan-result-access.is-unavailable {
    color: #6c4d19;
    background: #f5eddc;
    border: 1px solid #e7d6b4;
}

.tesiuan-result-card h2,
.tesiuan-result-list-item h2 {
    margin: 0;
    font-family: Inter, "Open Sans", system-ui, sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.38;
}

.tesiuan-advanced-result-title {
    margin: 0;
    font-family: Inter, "Open Sans", system-ui, sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.38;
}

.tesiuan-advanced-result-description {
    margin: 0.45rem 0 0;
    font-size: 0.68rem;
    line-height: 1.45;
}

.tesiuan-advanced-result-card .tesiuan-result-cover > a:not(.tesiuan-result-placeholder) {
    display: flex !important;
    width: 100%;
    align-items: center;
    justify-content: center;
}

.tesiuan-result-card h2 a,
.tesiuan-result-list-item h2 a {
    color: #182a3d;
    text-decoration: none;
}

.tesiuan-result-card h2 a::after {
    position: absolute;
    inset: 0;
    content: "";
}

.tesiuan-result-card h2 a:hover,
.tesiuan-result-list-item h2 a:hover {
    color: var(--tesi-blue);
}

.tesiuan-result-meta {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    margin-top: 0.48rem;
    padding-top: 0.42rem;
    color: #657481;
    border-top: 1px solid #e6ebee;
    font-size: 0.64rem;
}

.tesiuan-result-meta span {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    gap: 0.3rem;
}

.tesiuan-result-meta i {
    flex: 0 0 auto;
    margin-top: 0.08rem;
    color: #2f799e;
}

.tesiuan-results-list[hidden],
.tesiuan-results-grid[hidden] {
    display: none !important;
}

.tesiuan-results-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.tesiuan-result-list-item {
    display: grid;
    grid-template-columns: 95px minmax(0, 1fr) auto;
    min-height: 120px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #d5dde3;
    border-left: 3px solid #2b8cff;
    border-radius: 0.45rem;
}

.tesiuan-result-list-cover {
    display: grid;
    min-height: 120px;
    place-items: center;
    overflow: hidden;
    color: #91a2ae;
    background: #e8ecef;
    font-size: 1.6rem;
}

.tesiuan-result-list-cover img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tesiuan-result-list-copy {
    padding: 0.65rem 0.8rem;
}

.tesiuan-result-list-copy p {
    margin: 0.3rem 0 0;
    color: var(--tesi-muted);
    font-size: 0.72rem;
    line-height: 1.45;
}

.tesiuan-result-list-copy .tesiuan-result-meta {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
}

.tesiuan-result-open {
    display: grid;
    width: 2.75rem;
    place-items: center;
    color: #77909f;
    text-decoration: none;
    border-left: 1px solid #e3e8eb;
}

.tesiuan-result-open:hover {
    color: #fff;
    background: var(--tesi-blue);
}

.tesiuan-no-results {
    padding: 4rem 1.25rem;
    text-align: center;
    background: #fff;
    border: 1px solid #d5dde3;
    border-radius: 0.5rem;
}

.tesiuan-no-results > i {
    display: block;
    margin-bottom: 0.7rem;
    color: #8ea0ad;
    font-size: 2.5rem;
}

.tesiuan-no-results h2 {
    color: var(--tesi-navy);
    font-size: 1.25rem;
}

.tesiuan-no-results p {
    color: var(--tesi-muted);
}

@media (max-width: 991.98px) {
    .tesiuan-navbar {
        min-height: 70px;
    }

    .tesiuan-navbar .navbar-collapse {
        margin-top: 0.8rem;
        padding: 0.8rem;
        background: #fff;
        border: 1px solid var(--tesi-line);
        border-radius: 1rem;
        box-shadow: var(--tesi-shadow);
    }

    .tesiuan-navbar .nav-link.active::after {
        display: none;
    }

    .tesiuan-nav-search {
        width: 100%;
        margin-top: 0.5rem;
    }

    .tesiuan-hero-inner {
        min-height: auto;
        padding-top: 4rem;
        padding-bottom: 5rem;
    }

    .tesiuan-search-panel {
        margin-top: 2rem;
    }

    .tesiuan-results-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tesiuan-results-controls {
        justify-content: flex-start;
    }
}

@media (max-width: 767.98px) {
    .tesiuan-topbar .tesiuan-motto {
        display: none;
    }

    .tesiuan-brand-logo {
        max-width: 150px;
        height: 44px;
    }

    .tesiuan-brand-title {
        font-size: 1.2rem;
    }

    .tesiuan-brand-subtitle {
        font-size: 0.58rem;
        letter-spacing: 0.07em;
    }

    .tesiuan-hero-title {
        font-size: clamp(2.4rem, 12vw, 3.6rem);
    }

    .tesiuan-stats-wrap {
        margin-top: -1.4rem;
    }

    .tesiuan-stat {
        padding: 1.1rem 0.8rem;
        text-align: center;
    }

    .tesiuan-stat + .tesiuan-stat::before {
        top: 25%;
        bottom: 25%;
    }

    .tesiuan-stat-number {
        font-size: 1.55rem;
    }

    .tesiuan-stat-label {
        font-size: 0.61rem;
        letter-spacing: 0.04em;
    }

    .tesiuan-section {
        padding: 4.25rem 0;
    }

    .tesiuan-record-card {
        border-right: 0;
        border-left: 0;
        border-radius: 0;
    }

    .tesiuan-item-shell {
        padding-right: 0;
        padding-left: 0;
    }

    .tesiuan-item-titlebar,
    .tesiuan-item-toolbar,
    .tesiuan-resource-blocks {
        padding-right: 0.85rem;
        padding-left: 0.85rem;
    }

    .tesiuan-item-summary span + span::before {
        display: none;
    }

    .tesiuan-metadata-row {
        grid-template-columns: 1fr;
        gap: 0.25rem;
        padding: 0.65rem 0.7rem;
    }

    .tesiuan-metadata-row dt {
        padding-right: 0;
        color: var(--tesi-navy);
    }

    .tesiuan-collection-link {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .tesiuan-collection-count {
        display: none;
    }

    .tesiuan-media-frame iframe,
    .tesiuan-media-frame object,
    .tesiuan-media-frame embed {
        height: 68vh !important;
        min-height: 420px;
    }

    .tesiuan-media-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .tesiuan-results-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.7rem;
    }

    .tesiuan-results-toolbar,
    .tesiuan-results-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .tesiuan-results-search,
    .tesiuan-results-controls .form-select,
    .tesiuan-results-controls .btn,
    .tesiuan-results-controls .btn-group {
        width: 100%;
        max-width: none;
    }

    .tesiuan-results-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tesiuan-result-list-item {
        grid-template-columns: 76px minmax(0, 1fr);
    }

    .tesiuan-result-open {
        display: none;
    }
}

@media (max-width: 479.98px) {
    .tesiuan-results-grid {
        grid-template-columns: 1fr;
    }

    .tesiuan-result-cover {
        height: 215px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
