@font-face {
  font-family: "IBM Plex Sans";
  src: url(../css/fonts/IBMPlexSansVar.woff2) format("woff2");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url(../css/fonts/IBMPlexSansVar-Italic.woff2) format("woff2");
  font-weight: 100 700;
  font-style: italic;
  font-display: swap;
}

:root {
  /* FONTS */
  --font-family: "IBM Plex Sans", -apple-system, system-ui, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* COLORS */
  --brand-purple: #4f2dff;
}

body {
  font-family: var(--font-family);
}

/* Material Symbols Outlined (Google Fonts) — align with VuFind .icon--font behaviour */
.icon.icon--material-symbols.material-symbols-outlined {
  display: inline-block;
  max-width: 1.25em;
  line-height: 1;
  vertical-align: text-bottom;
  font-size: 1.25em;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.toolbar-btn .icon.icon--material-symbols.material-symbols-outlined,
.tag-chip .icon.icon--material-symbols.material-symbols-outlined {
  font-size: 1.1em;
  vertical-align: middle;
}

.main {
  background-color: #f6f6f6;
}

.main .container {
  background-color: #f6f6f6;
}

h2,
.h2 {
  font-weight: bold;
}

.alert-custom {
  background-color: #fff;
  border: 1px solid #e3e3e3;
  color: #000;
  font-weight: bold;
  border-radius: 0;
}

/* SPRITE */

.logo-sprite {
  background: url(../images/main-logos-sprite.png) !important;
  display: inline-block !important;
}

.hide-logo {
  opacity: 0; 
}

.sprite-selo-usabilidade {
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.sprite-facebook-logo {
  height: 20px !important;
  width: 10px !important;
  background-position: -134px -49px !important;
}
.sprite-fccn-logo {
  height: 20px !important;
  width: 61px !important;
  background-position: -109px -167px !important;
}
.sprite-fccn-long-logo {
  height: 40px !important;
  width: 189px !important;
  background-position: -45px -275px !important;
}
.sprite-fct-logo {
  height: 40px !important;
  width: 155px !important;
  background-position: -62px -393px !important;
}
.sprite-instagram-logo {
  height: 20px !important;
  width: 20px !important;
  background-position: -129px -521px !important;
}
.sprite-linkedin-logo {
  height: 20px !important;
  width: 20px !important;
  background-position: -129px -639px !important;
}
.sprite-logo-prr {
  height: 44px !important;
  width: 131px !important;
  background-position: -74px -745px !important;
}
.sprite-logo-republica-portuguesa {
  height: 44px !important;
  width: 159px !important;
  background-position: -60px -863px !important;
}
.sprite-logo-ue-nextgeneration {
  height: 44px !important;
  width: 165px !important;
  background-position: -57px -981px !important;
}
.sprite-rcaap-blanco {
  height: 118px !important;
  width: 279px !important;
  background-position: -0px -1062px !important;
}
.sprite-rcaap-preto {
  height: 60px !important;
  width: 142px !important;
  background-position: -68px -1209px !important;
}
.sprite-republica-portuguesa-logo {
  height: 40px !important;
  width: 100px !important;
  background-position: -89px -1337px !important;
}
.sprite-selo-usabilidade {
  height: 80px !important;
  width: 215px !important;
  background-position: -32px -1435px !important;
}
.sprite-x-logo {
  height: 20px !important;
  width: 20px !important;
  background-position: -129px -1583px !important;
}

/* HEADER */

header {
  background-color: #fff;
}

header .navbar,
header a,
header .nav a,
header .btn-link,
header button.dropdown-toggle {
  color: #000;
}

.header-resume {
  padding: 20px 0px 20px 20px;
  margin: 20px 0px 20px 0px;
  height: 100%;
  width: 50%;
  font-size: 1.2em;
  text-align: center;
  align-content: center;
  justify-content: center;
  text-align: justify;
}

@media (max-width: 767.98px) {
  .header-resume {
    width: 100%;
    padding: 12px 16px;
    margin: 12px 0;
    font-size: 1rem;
  }
}

.navbar {
  display: flex;
  flex-direction: column;
}

.nav-container {
  border-top: 1px solid rgb(206, 206, 206);
  border-bottom: 1px solid rgb(206, 206, 206);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.navbar-custom .navbar-line {
  font-size: 18px;
  font-weight: 400;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
}

.navbar-custom .nav-left,
.navbar-custom .nav-right {
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
  margin: 0;
}

.navbar-custom .nav-right .nav-search {
  display: inline-flex;
  align-items: center;
}

/* Mobile header UX: stack nav + make search usable */
@media (max-width: 767.98px) {
  .nav-container {
    border-top: 0;
    border-bottom: 0;
    padding: 0 16px;
  }

  .navbar-custom .navbar-line {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.25rem 0;
  }

  .navbar-custom .nav-left {
    flex-direction: row;
    align-items: center;
    gap: 1.25rem;
    margin: 0;
    width: 100%;
    justify-content: space-between;
  }

  .navbar-custom .nav-right {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0;
  }

  header .nav.navbar-nav > li > a,
  header .nav.navbar-nav button.dropdown-toggle {
    display: block;
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.18);
  }

  .navbar-custom .nav-right .nav-search {
    width: 100%;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.18);
  }

  /* Searchbox inside header: full width + aligned elements */
  .navbar-custom .nav-right .nav-search .nav.searchbox {
    width: 100%;
  }

  .navbar-custom .nav-right .nav-search .searchForm-inputs {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    text-align: left;
  }

  .navbar-custom .nav-right .nav-search .searchForm-query,
  .navbar-custom .nav-right .nav-search .searchForm_type {
    width: 100%;
  }

  .navbar-custom .nav-right .nav-search .advanced-search-link {
    align-self: flex-start;
    padding-left: 0;
  }
}
.navbar-custom .nav-right .dropdown-toggle::after {
  content: none;
}

header .nav.navbar-nav > li > a,
header .nav.navbar-nav button.dropdown-toggle {
  border-bottom: 2px solid transparent;
}

header .nav.navbar-nav > li > a:hover,
header .nav.navbar-nav > li > a:focus,
header .nav.navbar-nav button.dropdown-toggle:hover,
header .nav.navbar-nav button.dropdown-toggle:focus {
  color: #000;
  background-color: #fff;
  border-bottom: 2px solid #000;
  outline: none;
}

.navbar-nav .nav-link.active {
  color: #000;
  border-bottom: 2px solid #000;
}

header .banner.container {
  margin: 0;
  padding: 0;
  max-width: 100%;
}

header .banner.container .container {
  margin: 0;
  padding: 0;
  max-width: 1216px;
}

@media (min-width: 1400px) {
  .container-xl,
  .container-lg,
  .container-md,
  .container-sm,
  .container,
  footer {
    max-width: 1216px;
  }
}

header .banner .dropdown-menu {
  border-radius: 0;
}

header .dropdown-menu .active a {
  background-color: var(--brand-purple);
  color: #fff;
}

.searchForm .searchForm-query {
  position: relative;
  display: inline-block;
}

.searchForm .searchForm-submit {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: black;
  padding: 0;
  display: inline-flex;
  align-items: center;
}

.searchForm .active-filters {
  display: none;
}

.template-dir-record.template-name-view .active-filters {
  display: flex;
  align-items: center;
  font-size: 1rem;
}

.template-dir-record.template-name-view .searchForm .active-filters .reset-filters-btn {
  background-color: var(--brand-purple);
  border: 1px solid var(--brand-purple);
  color: #fff;
  padding: 0.3rem 0.65rem;
  border-radius: 0;
}

.template-dir-record.template-name-view .searchForm .active-filters .reset-filters-btn:hover,
.template-dir-record.template-name-view .searchForm .active-filters .reset-filters-btn:focus {
  background-color: #fff;
  color: var(--brand-purple);
  border-color: var(--brand-purple);
  text-decoration: none;
}

.template-dir-record.template-name-view .searchForm .active-filters .filter-value {
  color: #222;
  text-decoration: none;
}

.template-dir-record.template-name-view .searchForm .active-filters .filter-value:hover {
  text-decoration: underline;
  color: #fff;
}

.banner .navbar-header {
  margin: 0;
  padding: 20px 0px;
  width: 100%;
  max-width: 100%;
  background-color: #000;
  color: #fff;
  font-size: 0.9em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner .navbar-header .container {
  display: flex;
  align-items: center;
  justify-content: end;
}

.banner .navbar-header .logo {
  width: 60px;
  height: 20px;
  margin-right: 5px;
}

.record-logo img {
  max-width: 100%;
  height: auto;
  margin-bottom: 10px;
}

.record-list img.record-resource-icon {
  width: 76px;
  height: 76px;
  max-width: 76px;
  max-height: 76px;
  border-radius: 50%;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-top: 10px;
  object-fit: contain;
  border: 1px solid #e3e3e3;
}

.resource-logo-thumb {
  max-width: 90px;
  max-height: 90px;
  object-fit: contain;
}

.record-toolbar-placeholder {
  height: 46px;
}

.resource-extra-row td {
  vertical-align: top;
  width: 50%;
}

.resource-extra-row .field-label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}

.resource-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.resource-tags .tag-chip {
  display: inline-block;
  padding: 4px 8px;
  background: #f0f0f0;
  border-radius: 0;
  font-size: 0.95em;
}

.result-summary-text.clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.result-summary-text.expanded {
  -webkit-line-clamp: unset;
  display: block;
}

.result-summary-toggle {
  padding-left: 0;
  color: #000;
  font-weight: 600;
}

.result-summary-toggle:hover {
  color: var(--brand-purple);
  text-decoration: none;
}

.result-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.tag-chip {
  display: inline-block;
  padding: 4px 8px;
  background: #d7d7d7;
  border-radius: 0;
  font-size: 0.95em;
  text-align: center;
  align-items: center;
}

.tag-chip.chip-access {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.chip-access.open {
  background: #e1d4ff;
  color: var(--brand-purple);
}

.chip-access.restricted {
  background: #ffecec;
  color: #b30000;
}

.publication-description {
  margin: 10px 0 16px;
  font-size: 1.05em;
  line-height: 1.5;
}

.record-view-document {
  margin: 0 0 1.25rem;
}
.template-dir-record .record .mainbody .record-view-document a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--brand-purple);
  text-decoration: none;
  font-size: 1.2em;
  font-weight: 600;
}
.template-dir-record .record .mainbody .record-view-document a:hover .record-view-document-label {
  text-decoration: underline;
}
.template-dir-record .record .mainbody .record-view-document a .record-external-icon,
.template-dir-record .record .mainbody .record-view-document a:hover .record-external-icon {
  font-size: 1.2em;
  opacity: 0.8;
}

.result .result-arrow-link a.publication-link {
  color: #777;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.subject-chip {
  margin-right: 4px;
  margin-bottom: 8px;
  display: inline-block;
}

.result .result-arrow-link a.publication-link:hover {
  color: #000;
  text-decoration: none;
}

@media (max-width: 767.98px) {
  .result .result-arrow-link a.publication-link {
    justify-content: center;
    min-width: 2.75rem;
    min-height: 2.75rem;
    font-size: 1.15rem;
  }

  .result .result-arrow-link a.publication-link .publication-link-icon {
    margin: 0;
  }
}

.banner .navbar-header a {
  text-decoration: none;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: space-around;
  min-width: 260px;
}

.banner .navbar-header .header-fccn-external-icon,
.banner .navbar-header i {
  margin-left: 5px;
}

.nav.searchbox {
  padding: 0;
  margin: 0;
}

.searchForm .searchForm-query #searchForm_lookfor {
  min-width: 0;
  width: 100%;
}

@media (min-width: 768px) {
  .searchForm .searchForm-query #searchForm_lookfor {
    min-width: 400px;
  }
}

nav.breadcrumbs {
  display: none;
}

.banner .collapse:not(.show) {
  display: none !important;
}

/* END HEADER */

/* HOME */

.template-name-home .navbar-nav.nav-right .nav-search,
.template-name-advanced .navbar-nav.nav-right .nav-search {
  display: none;
}

.searchHomeContent {
  background-image: url(../images/Gradientes/png/Hero-Banner_Portal-RCAAP_V06.png);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  padding: calc(6rem + 6vw) 4vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.searchHomeContent > .container {
  background: transparent;
}

.searchHomeContent .searchForm .searchForm-submit {
  font-size: 1.35rem;
  color: purple;
}

.searchForm-inputs {
  text-align: center;
}

.searchHomeContent::after {
  content: "";
}

.searchHomeContent .searchForm-query {
  width: 70%;
}

.searchHomeContent .searchForm_type {
  width: 29%;
}

.searchHomeContent .advanced-search-link {
  display: none;
}

.searchHomeContent .searchForm_lookfor,
.searchHomeContent .searchForm_type {
  max-width: 900px;
  min-height: 2.875rem;
  height: auto !important;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  font-size: 18px;
  line-height: 1.4;
}

.searchHomeContent .searchForm_lookfor {
  width: 100%;
  padding-left: 0.875rem;
  padding-right: 2.5rem;
  display: block;
  margin: 0 auto;
}

.searchHomeContent .searchForm_type {
  padding-left: 0.875rem;
  padding-right: 2rem;
}

.searchHomeContent-search {
  margin-top: 1.25rem;
}

@media (min-width: 768px) {
  .searchHomeContent .searchForm-inputs,
  .searchHomeContent .searchHomeContent-meta {
    max-width: 60rem;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 767.98px) {
  .searchHomeContent .searchForm-inputs {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .searchHomeContent .searchForm-query,
  .searchHomeContent .searchForm_type {
    width: 100%;
  }
}

.searchHomeContent-meta {
  margin: 10px;
}

.searchHomeContent h1 {
  line-height: 1.2;
}

@media (min-width: 768px) {
  .searchHomeContent {
    height: 500px;
  }
}

.cofund-logo {
  filter: grayscale(100%);
}

/* Co-financed logos: column when narrow;*/
.cofinanced-logos-container {
  container-type: inline-size;
  container-name: cofinanced-logos;
  width: 100%;
}

.cofinanced-logos-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: 100%;
}

@container cofinanced-logos (min-width: 32rem) {
  .cofinanced-logos-row {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-evenly;
    align-items: center;
  }
}

@supports not (container-type: inline-size) {
  @media (min-width: 576px) {
    .cofinanced-logos-row {
      flex-direction: row;
      flex-wrap: wrap;
      justify-content: space-evenly;
    }
  }
}

/* ADVANCED SEARCH */

.template-name-advanced .main .container {
  background: transparent;
}

.template-name-advanced .main > .container {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100% !important;
}

.template-name-advanced .adv-term-remove {
  line-height: 2;
}

.adv-search-main-container {
  background: url("../images/Gradientes/png/Hero-Banner_Portal-RCAAP_V06.png")
    center / cover no-repeat !important;
  margin: 0 auto;
  padding-left: 20%;
  padding-right: 20%;
  padding-bottom: 50px;
  width: 100%;
  max-width: 100% !important;
}

@media (max-width: 1600px) {
  .adv-search-main-container {
    padding-left: 10%;
    padding-right: 10%;
  }
}

@media (max-width: 768px) {
  .adv-search-main-container {
    padding-left: 5%;
    padding-right: 5%;
  }
}

.template-name-advanced .search-header {
  color: #fff;
  background: transparent;
}

.template-name-advanced .search-body {
  margin-bottom: 10px;
}

#advSearchForm .icon-link {
  color: #000;
}
.adv-search {
  margin-top: 10px;
}

.template-name-advanced .adv-submit .btn-primary {
  width: 100%;
  margin: 20px 0;
}

.template-name-advanced .sidebar {
  background-color: transparent;
}

.template-name-advanced .sidebar a {
  color: #000;
}

.blender-adv-filters, .adv-submit {
  width: 90%;
  border: 0;
  margin: 10px 0 0;
  padding: 15px;
}

.blender-adv-filter-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.blender-adv-filter-item label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

@media (max-width: 991px) {
  .blender-adv-filter-grid {
    grid-template-columns: 1fr;
  }
}

/* Date range block (Ano de publicação) – same look as the select filters above */
.blender-adv-ranges fieldset.range {
  width: 90%;
  margin-top: 0;
  padding: 0 15px 15px;
}

.blender-adv-ranges fieldset.range legend {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  padding: 0;
  width: 100%;
  font-size: 1rem;
}

/* END ADVANCED SEARCH */
/* CARDS */

.card-option {
  border-radius: 0;
  border: 1px solid #e3e3e3;
  transition: all 0.2s ease;
  background-color: #fff;
  color: #000;
}

.card-option h3 {
  margin-top: 0;
  margin-left: 25px;
  font-size: 24px;
  font-weight: 600;
}

.card-option-icon {
  width: 100px;
  height: 100px;
  background-color: #fff;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  transition: background-color 0.2s ease;
  color: var(--brand-purple);
  flex-shrink: 0;
}

.card-option:hover .card-option-icon {
  color: #fff;
  background-color: var(--brand-purple);
}

.card-option-arrow {
  font-size: 1.25rem;
  color: var(--brand-purple);
}

.card-option:hover {
  background-color: var(--brand-purple);
  border-color: var(--brand-purple);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 0 0 0.15rem rgba(79, 45, 255, 0.15);
  text-decoration: none;
}

.card-option:hover h3,
.card-option:hover .card-option-arrow {
  color: #fff;
}

/* END CARDS */
/* END HOME */

/* FOOTER */
footer {
  margin: 0;
  padding: 0;
  border-top: 1px solid black;
  width: 100% !important;
  max-width: 100% !important;
  box-shadow: 7px 10px 12px -12px rgb(0 0 0 / 75%);
}
.footer-container {
  display: flex;
  width: 100%;
  flex-wrap: nowrap;
  align-content: space-around;
  justify-content: space-around;
  align-items: center;
}

footer hr {
  opacity: 1;
}

footer .border-secondary {
  --bs-border-opacity: 0.5;
}
.site-footer {
  font-size: 0.875rem;
}

.footer-top {
  background-color: #000000;
}

.footer-bottom {
  background-color: #222222;
}

.footer-about-text {
  max-width: 640px;
  line-height: 1.6;
  text-align: justify;
}

.site-footer address {
  font-style: normal;
}

.footer-logo {
  max-height: 40px;
}

.footer-social-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

footer .contact-btn {
  padding: 8px 32px;
}

footer .nav-link:hover,
.nav-link:focus {
  color: #fff;
  text-decoration: underline;
}

.footer-contact-block .footer-address {
  margin-top: .75rem;
  margin-bottom: 1.75rem;
}

.footer-contact-block .footer-address a,
.footer-contact-block .footer-address a:hover,
.footer-contact-block .footer-address a:focus {
  color: #fff;
  text-decoration: none;
}

.footer-contact-block .footer-address a:hover,
.footer-contact-block .footer-address a:focus {
  text-decoration: underline;
}

@media (max-width: 767.98px) {
  .site-footer .footer-top-brand-col {
    text-align: center;
    padding-bottom: 1rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  }

  .site-footer .footer-top-brand-row .col-md-5 {
    text-align: center;
  }
}

@media (min-width: 768px) {
  .site-footer .footer-top-brand-col {
    border-right: 1px solid rgba(255, 255, 255, 0.35);
    padding-right: 1.25rem;
  }
}

/* Institutional logos: column + spacing on small screens; row + dividers from tablet up */
.footer-institutional-logos {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .footer-institutional-logos {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
  }

  .footer-institutional-logo-item {
    display: flex;
    align-items: center;
    padding: 0.35rem 1.25rem 0.35rem 0;
    margin-right: 1.25rem;
    border-right: 1px solid rgba(255, 255, 255, 0.28);
  }

  .footer-institutional-logo-item:last-child {
    border-right: none;
    margin-right: 0;
    padding-right: 0;
  }
}

/* Social icons: usable tap targets without changing sprite size */
.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  color: inherit;
  text-decoration: none;
}

.footer-social-link:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 2px;
}

/* Match CTA width on narrow layouts (Contacts + Newsletter) */
@media (max-width: 991.98px) {
  .site-footer .footer-cta-btn {
    width: 100%;
    max-width: 20rem;
  }

  .site-footer .footer-contact-block .footer-cta-btn {
    display: block;
    margin-left: auto;
    margin-right: auto;
  }

  .site-footer .footer-social-newsletter .footer-cta-btn {
    text-align: center;
  }
}

/* END FOOTER */

/* RESULTS */

.result .media {
  padding: 10px 0;
}

.result .record-number {
  display: none;
}

.result .result-type {
  color: var(--brand-purple);
  margin: 10px 0;
}

.result .title {
  font-size: 1.25rem;
  margin-bottom: 5px;
}

.result .record-icon {
  width: 76px;
  height: 76px;
  max-width: 76px;
  max-height: 76px;
  border-radius: 50%;
  color: #ffffff;
  background-color: var(--brand-purple);
  display: inline-flex;
  align-items: center;
  padding: 0;
  margin-top: 10px;
  border: 1px solid #e3e3e3;
}

/* FACETS / SIDEBAR */

.sidebar {
  background-color: #f6f6f6;
}

.sidebar .facet-group .title,
.facet-group .facet,
.facet-load-indicator,
.facet-load-failed,
.facet-group .collapse,
.facet-group .collapsing,
.facet-group.full-facet-list .facet {
  border: none;
}

.sidebar .facet-group .text i {
  display: none;
}

.sidebar .facet-group {
  border: 1px solid #e3e3e3;
}

.slider-container {
  padding: 6px 0;
}
.slider-container .slider.slider-horizontal {
  width: 100%;
  height: 1.25rem;
}
.slider-container .slider-track {
  height: 4px;
  margin-top: -2px;
  top: 50%;
  left: 0;
  background: #d7d7d7;
  box-shadow: none;
  border-radius: 0;
}
.slider-container .slider-selection {
  height: 100%;
  background: #777;
  box-shadow: none;
  border-radius: 0;
}

.slider.slider-horizontal .slider-track {
  width: 274px;
}

.slider-container .slider-handle:active,
.slider-container .slider-handle:focus,
.slider-container .slider-handle:active,
.slider-container .slider-handle:focus,
.slider-container .slider-handle:hover {
  opacity: 1;
  box-shadow: none;
  background-color: #777;
  border-color: #777;
}
.slider-container .slider-handle {
  width: 14px;
  height: 10px;
  background: #777;
  background-image: none;
  border: 0;
  border-radius: 0;
  top: 50%;
  transform: translateY(-50%);
  opacity: 1;
}
.slider.slider-horizontal .slider-tick.min-slider-handle,
.slider.slider-horizontal .slider-handle.min-slider-handle {
  margin-left: 0;
  z-index: -1;
}
.slider.slider-horizontal .slider-tick.max-slider-handle,
.slider.slider-horizontal .slider-handle.max-slider-handle {
  margin-left: -14px;
  z-index: -1;
}

.facet a {
  color: #000;
  text-decoration: none;
}

.facet .badge {
  background-color: #ccc;
  color: #000;
}

.sidebar .facet.active,
.sidebar .facet.active:hover,
.sidebar .active-filters .facet,
.sidebar .active-filters .facet:hover {
  background-color: #fff;
}

.active-filters .facet a,
.facet-group .active a {
  color: var(--brand-purple);
}

.facet-group .facet {
  background: none;
}

.facet-group .facet > .text {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  padding-left: 1.6rem;
}

.facet-group .facet > .text::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0.8rem;
  height: 0.8rem;
  transform: translateY(-50%);
  border: 1px solid #777;
  border-radius: 2px;
  background: #fff;
}

.facet-group .facet.active > .text::before {
  border-color: var(--brand-purple);
  background: var(--brand-purple);
}

.sidebar .reset-filters-btn {
  background-color: #ccc;
  border-color: #fff;
  color: #000;
  font-weight: bold;
  padding: 8px 16px;
  text-align: center;
  display: block;
  width: 100%;
}

.main .active-filters .reset-filters-btn {
  background-color: var(--brand-purple);
  border-color: var(--brand-purple);
  color: #fff;
}

.main .active-filters .reset-filters-btn:hover {
  background-color: #fff;
  border-color: var(--brand-purple);
  color: var(--brand-purple);
}

.main .active-filters {
  padding: 8px;
}

/* END FACETS / SIDEBAR */

/* PAGINATION */

.pager {
  justify-content: start;
}

.pager .page-item:first-child .page-link,
.pager .page-item:last-child .page-link {
  border-radius: 0;
  display: none;
}

.pagination > li.page-prev a,
.pagination > li.page-next a {
  font-size: 0;
}

.pagination > li.page-prev a .icon,
.pagination > li.page-next a .icon {
  font-size: 1rem;
}

.pagination {
  gap: 6px;
}

.pagination .page-item .page-link {
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 0;
  background: transparent;
  color: #000;
}

.pagination .page-item.active .page-link {
  border-color: #000;
  background-color: #fff;
  font-weight: 600;
}

/* END PAGINATION */

/* LIST */

.result-body a {
  text-decoration: underline;
  color: #000;
}

.result-body a.title {
  text-decoration: none;
  color: #000;
}

.result-body a.title:hover {
  text-decoration: underline;
  color: var(--brand-purple);
}

.result-body .result-formats span {
  border-radius: 0;
  background-color: #e3e3e3;
  color: #000;
}

.result .result-arrow-link {
  display: flex;
  align-items: end;
  justify-content: center;
  padding: 10px;
}
.result .result-arrow-link a {
  color: #000;
}

.record-list .result .media {
  flex-wrap: wrap;
}

.record-list .result .result-arrow-link--below {
  flex: 0 0 100%;
  width: 100%;
  justify-content: flex-end;
  padding: 6px 10px 4px;
}

@media (min-width: 768px) {
  .result-body {
      float: left;
      width: 95%;
  }
}

.record-list .result {
  background-color: #fff;
  border: 1px solid #e3e3e3;
  border-radius: 0;
  margin-bottom: 20px;
  box-shadow: none;
  min-height: 180px;
  padding: 10px;
}

.record-list .record-checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
}

#author-publications-container .record-list .record-checkbox {
  display: none;
}

.bulkActionButtons {
  display: flex;
  margin-bottom: 5px;
  justify-content: space-between;
  flex-direction: row-reverse;
  align-items: center;
  gap: 0.75rem 1rem;
}

.bulkActionButtons .bulk-checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
}

.bulkActionButtons .bulk-actions-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bulkActionButtons .bulk-actions-list > li {
  margin: 0;
}

.bulkActionButtons .bulk-selection-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.bulkActionButtons .bulk-checkbox input {
  margin-right: 5px;
}

.bulkActionButtons .toolbar-btn {
  border-radius: 0;
  background-color: var(--brand-purple);
  color: #fff;
}

.bulkActionButtons .icon.fa {
  display: none;
}

@media (max-width: 767.98px) {
  .bulkActionButtons {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .bulkActionButtons .bulk-selection-list {
    align-self: flex-start;
  }

  .bulkActionButtons .bulk-actions-list .toolbar-btn {
    width: 100%;
    justify-content: center;
  }
}

/* END LIST */

.searchtools .icon-link {
  color: #000;
}

/* END RESULTS */

/* FORMS */

.form-control {
  border-radius: 0;
}

.adv-group {
  border: none;
}

.btn,
#groupPlaceHolder,
.search-filter-toggle {
  border-radius: 0;
}

.btn-primary {
  background-color: var(--brand-purple);
  border-color: var(--brand-purple);
}

.btn-primary:hover,
:not(.btn-check) + .btn:active {
  background-color: #fff;
  color: var(--brand-purple);
  border-color: var(--brand-purple);
}

.form-control:hover,
.form-control:focus {
  border-color: var(--brand-purple);
}

form .form-control:focus {
  border-color: var(--brand-purple);
  --outline-color: none;
}

form .form-control {
  border: 2px solid #e3e3e3;
}

#groupPlaceHolder:hover {
  color: #fff;
}

/* END FORMS */

/* DETAIL */

.record .record-type-label {
  font-weight: 600;
  color: var(--brand-purple);
  font-size: 1.4em;
  margin-bottom: 10px;
}

.record .record-type-label.resource {
  color: #000;
}

.template-dir-record .record-nav {
  width: 100%;
}

.template-dir-record .record-nav .action-toolbar .toolbar-btn {
  border-radius: 0;
  background-color: transparent;
  color: #000;
  border: 1px solid #000;
  margin-right: 10px;
}

.action-toolbar {
  display: flex;
  justify-content: center;
}

.template-dir-record .record-nav .action-toolbar .cite-record,
.template-dir-record .record-nav .action-toolbar .print-record,
.template-dir-record .record-nav .action-toolbar .export-record {
  display: flex;
  flex-direction: row-reverse;
}

.template-dir-record .record-nav .action-toolbar .sms-record,
.template-dir-record .record-nav .action-toolbar .permalink-record {
  display: none;
}

.template-dir-record .record .sidebar {
  width: 40%;
  background-color: #fff;
  border: 1px solid #e3e3e3;
  border-radius: 0;
  margin-top: 0;
  margin-bottom: 20px;
  box-shadow: none;
  min-height: 180px;
  padding: 20px;
  align-self: flex-start;
}

.template-dir-record .record {
  display: flex;
  gap: 20px;
}

.template-dir-record .record.sourcePerson {
  flex-direction: column;
  max-width: 100%;
}

/* Project Detail Structure: left column stacks detail + related pubs; sidebar is one grid cell (no row-stretch gap) */

.template-dir-record .record.sourceProject:has(> .sidebar) {
  display: grid;
  grid-template-columns: 1fr 25%;
  gap: 20px;
  align-items: start;
}

.template-dir-record .record.sourceProject .project-record-main-column {
  grid-column: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.template-dir-record .record.sourceProject .project-record-main-column .mainbody {
  margin-bottom: 20px;
}

.template-dir-record .record.sourceProject .sidebar {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  width: 100%;
  max-width: 100%;
}

#project-publications-container .record-list .record-checkbox {
  display: none;
}

/* Publication Detail Structure */

.template-dir-record .record.sourcePublication .record-checkbox {
  display: none;
}

.template-dir-record .record.sourcePublication {
  display: grid;
  grid-template-columns: 1fr 25%;
  gap: 20px;
  align-items: start;
}
.template-dir-record .record.sourcePublication .mainbody {
  grid-column: 1;
  grid-row: 1;
}
.template-dir-record .record.sourcePublication .funded-projects-setup {
  grid-column: 1;
  grid-row: 2;
}

/* Print: hide loading state and pagination so spinner/buttons do not appear in print */
@media print {
  #funded-projects-container:has(.icon--spin),
  #author-publications-container:has(.icon--spin),
  #project-publications-container:has(.icon--spin),
  .funded-projects-setup .js-pagination,
  .author-publications-setup .js-pagination,
  .project-publications-setup .js-pagination {
    display: none;
  }
}
.template-dir-record .record.sourcePublication .sidebar {
  grid-column: 2;
  grid-row: 1 / -1;
}
.template-dir-record .record.sourcePublication .sidebar{
  width: 100%;
  max-width: 100%;
}

.template-dir-record .record .mainbody {
  background-color: #fff;
  width: 100%;
  border: 1px solid #e3e3e3;
  border-radius: 0;
  margin-bottom: 60px;
  box-shadow: none;
  min-height: 180px;
  padding: 20px;
  align-self: flex-start;
}

.template-dir-record .sourceSolr .mainbody .table tr {
  display: block;
  padding-top: 5px;
  padding-bottom: 5px;
}

.template-dir-record .sourcePublication .mainbody .table th {
  width: 30%;
}

.template-dir-record .sourcePublication .mainbody .table tr:first-child {
  border-top: 1px solid #e3e3e3;
}

.template-dir-record .sourcePublication .mainbody .table tr td,
.template-dir-record .sourcePublication .mainbody .table tr th {
  padding: 20px 0;
}

.template-dir-record .record .mainbody a {
  text-decoration: underline;
  color: #000;
}

.template-dir-record .record .mainbody .media-body h1 {
  font-size: 2em;
  font-weight: 600;
  padding-bottom: 20px;
}

.template-dir-record .record .mainbody .record-tabs {
  display: none;
}

.template-dir-record .record .sidebar h2 {
  padding: 10px;
}

.template-dir-record .record .list-group .list-group-item {
  border-top: none;
  border-bottom: 1px solid #e3e3e3;
  border-left: none;
  border-right: none;
  border-radius: 0;
  margin-bottom: 10px;
  border-radius: 0;
  padding-bottom: 20px;
}

.template-dir-record .record .list-group .list-group-item .related__title {
  color: #000;
}

.template-dir-record .record .resource-details .table th,
.template-dir-record .record .resource-details .table td {
  display: block;
  text-align: left;
  padding: 4px 0;
}

.template-dir-record .record .resource-details .table .resource-extra-row {
  display: flex;
}

.template-dir-record .record .resource-details .table > :not(caption) > * > * {
  border-bottom-width: 0;
  border-top-width: 0;
}

/* Responsive detail page (mobile): avoid squeezed main column and toolbar overflow */
@media (max-width: 767.98px) {
  /* Toolbar: wrap + scroll if needed */
  .template-dir-record .record-nav .action-toolbar {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.5rem;
    padding: 0 0.25rem;
  }

  .template-dir-record .record-nav .action-toolbar > li {
    flex: 0 0 auto;
  }

  .template-dir-record .record-nav .action-toolbar .toolbar-btn {
    margin-right: 0;
    padding: 0.55rem 0.75rem;
    font-size: 0.95rem;
    line-height: 1.1;
    white-space: nowrap;
  }

  /* Generic record layout: sidebar below main */
  .template-dir-record .record {
    flex-direction: column;
  }

  .template-dir-record .record .mainbody {
    padding: 16px;
    margin-bottom: 1rem;
  }

  .template-dir-record .record .sidebar,
  .template-dir-record .record .author-publications-setup,
  .template-dir-record .record .project-publications-setup,
  .template-dir-record .record .funded-projects-setup {
    width: 100%;
    padding: 16px;
  }

  /* Publication layout: collapse grid to single column */
  .template-dir-record .record.sourcePublication {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .template-dir-record .record.sourcePublication .mainbody {
    grid-column: 1;
    grid-row: 1;
  }

  .template-dir-record .record.sourcePublication .funded-projects-setup {
    grid-column: 1;
    grid-row: 2;
  }

  .template-dir-record .record.sourcePublication .sidebar {
    grid-column: 1;
    grid-row: 3;
  }

  /* Project layout: single column — detail + pubs, then sidebar */
  .template-dir-record .record.sourceProject:has(> .sidebar) {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .template-dir-record .record.sourceProject .project-record-main-column {
    grid-column: 1;
    grid-row: 1;
  }

  .template-dir-record .record.sourceProject .sidebar {
    grid-column: 1;
    grid-row: 2;
  }

  /* Core fields (ALL sources): stack label/value vertically, uniform spacing */
  .template-dir-record .record .mainbody .table tr {
    display: block;
    padding: 0.75rem 0;
    border-top: 1px solid #e3e3e3;
  }

  .template-dir-record .record .mainbody .table tr:first-child {
    border-top: 0;
  }

  .template-dir-record .record .mainbody .table th,
  .template-dir-record .record .mainbody .table td {
    display: block;
    width: 100%;
    padding: 0.15rem 0;
    text-align: left;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .template-dir-record .record .mainbody .table th {
    font-weight: 600;
    color: #000;
  }

  /* Avoid double separators: keep only the row divider we add above */
  .template-dir-record .record .mainbody .table > :not(caption) > * > * {
    border-bottom-width: 0 !important;
  }

  /* Avoid “compressed columns” in resource/project layouts that override table styles */
  .template-dir-record .record .resource-details .table th,
  .template-dir-record .record .resource-details .table td {
    display: block;
    width: 100%;
    padding: 0.15rem 0;
  }

  .template-dir-record .record .mainbody .media-body h1 {
    font-size: 1.5em;
    padding-bottom: 12px;
  }
}

/* END DETAIL */

/* STATIC PAGE */

.template-dir-content #content a {
  text-decoration: underline;
  color: #000;
}

.template-dir-content pre code {
  padding: 10px;
  background-color: white;
  display: block;
}

/* END STATIC PAGE */