/* ═══════════════════════════════════════════════
   bnrm-custom.css — BNRM overrides for SciELO OPAC
   Loaded after style.css; overrides take effect without !important where possible.
   ═══════════════════════════════════════════════ */

/* ── Carousel ── */
#adoahCarousel {
  position: relative;
  width: 100%;
  max-width: 1170px;
  margin: 0 auto;
  overflow: hidden;
  background: #00314c;
}
#carouselTrack {
  display: flex;
  transition: transform 0.5s ease;
  width: 200%;
}

/* ── Perspectives slider ── */
.block.perspective .slider {
  position: relative;
}
.block.perspective .slide-container {
  overflow: hidden;
  height: auto !important;
}
.block.perspective .slide-wrapper {
  display: flex !important;
  gap: 12px;
  align-items: stretch;
  transition: transform 0.35s ease;
  position: relative !important;
  width: auto !important;
}
.block.perspective .slide-item {
  flex: 0 0 350px;
  min-width: 0;
  display: flex;
  padding: 0;
}
.block.perspective .slide-item .bnrm-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
}

/* Card body / title / footer */
.bnrm-card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 12px;
}
.bnrm-card-subtitle {
  display: block;
  margin-bottom: 4px;
  font-size: .78em;
  color: #7f7a71;
}
.bnrm-card-title {
  flex: 1 1 auto;
  font-size: .92em;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  color: #2c2c2c;
}
.bnrm-card-footer {
  margin-top: auto;
}

/* Arrows — float over card edges, no impact on card width */
.block.perspective .slider .slide-back,
.block.perspective .slider .slide-next {
  display: flex !important;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, .85);
  border: 1px solid rgba(0, 0, 0, .15);
  border-radius: 50%;
  cursor: pointer;
  color: #555;
  font-size: 15px;
  text-decoration: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .15);
  transition: background .2s, box-shadow .2s;
  z-index: 3;
}
.block.perspective .slider .slide-back { left: 4px; }
.block.perspective .slider .slide-next { right: 4px; }
.block.perspective .slider .slide-back:hover,
.block.perspective .slider .slide-next:hover {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
  color: #222;
}
.block.perspective .slider .slide-back[aria-disabled="true"],
.block.perspective .slider .slide-next[aria-disabled="true"] {
  opacity: .3;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════
   Courses section
   ═══════════════════════════════════════════════ */
.block.courses {
  padding: 15px;
  margin-top: 30px;
  background: #fafaf8;
  border-top: 1px solid #e4e1dc;
}
.block.courses h2 {
  font-size: 1.4em;
  margin: 10px 0;
  color: #2c2c2c;
}
.block.courses h2 span {
  color: #0D7377;
}

/* Tab bar */
.courses-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #e4e1dc;
  margin: 15px 0;
}
.courses-tab {
  padding: 10px 22px;
  font-size: .9em;
  font-weight: 600;
  color: #7f7a71;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  white-space: nowrap;
  transition: color .2s, border-color .2s;
  font-family: inherit;
}
.courses-tab:hover {
  color: #2c2c2c;
}
.courses-tab[aria-selected="true"] {
  color: #0D7377;
  border-bottom-color: #0D7377;
}

/* Panels */
.courses-panel {
  display: none;
  padding: 10px 0;
}
.courses-panel[data-active="true"] {
  display: block;
  animation: cpFade .3s ease;
}
@keyframes cpFade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Resource cards */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 15px;
}
.resource-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .125);
  border-radius: 4px;
  padding: 18px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color .2s, box-shadow .2s;
}
.resource-card:hover {
  border-color: #0D7377;
  box-shadow: 0 0 0 1px #0D7377;
  text-decoration: none;
  color: inherit;
}
.resource-icon {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.resource-icon--teal  { background: rgba(13, 115, 119, .10); color: #0D7377; }
.resource-icon--gold  { background: rgba(200, 169, 81, .15); color: #9a7d2e; }
.resource-icon--terra { background: rgba(200, 90, 58, .10);  color: #C85A3A; }
.resource-icon--navy  { background: rgba(0, 49, 76, .08);    color: #00314c; }
.resource-title {
  font-size: .9em;
  font-weight: 700;
  color: #2c2c2c;
}
.resource-desc {
  font-size: .8em;
  color: #7f7a71;
  line-height: 1.5;
}
.resource-tag {
  display: inline-block;
  font-size: .7em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 2px 8px;
  border-radius: 3px;
  background: rgba(13, 115, 119, .08);
  color: #0D7377;
  align-self: flex-start;
}

/* Training cards */
.training-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
}
.training-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .125);
  border-radius: 4px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .2s;
}
.training-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
  text-decoration: none;
  color: inherit;
}
.training-card-header {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.training-card-header--navy  { background: linear-gradient(135deg, #00314c, #0a4a6b); }
.training-card-header--teal  { background: linear-gradient(135deg, #095255, #0D7377); }
.training-card-header--brown { background: linear-gradient(135deg, #6b3a0a, #9a5c1e); }
.training-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.training-card-header h4 {
  font-size: .9em;
  font-weight: 700;
  margin: 0;
  color: #fff;
}
.training-card-header .tc-sub {
  font-size: .72em;
  color: rgba(255, 255, 255, .7);
}
.training-card-body { padding: 18px; }
.training-card-body p {
  font-size: .82em;
  color: #7f7a71;
  line-height: 1.5;
  margin: 0 0 12px;
}
.training-modules {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.training-modules li {
  font-size: .8em;
  color: #2c2c2c;
  display: flex;
  align-items: center;
  gap: 6px;
}
.training-modules li svg { flex-shrink: 0; color: #0D7377; }
.training-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 12px;
  padding: 7px 16px;
  background: #0D7377;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: .8em;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
  text-decoration: none;
}
.training-cta:hover {
  background: #095255;
  color: #fff;
  text-decoration: none;
}

/* Tool cards */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
}
.tool-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .125);
  border-radius: 4px;
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  transition: border-color .2s;
}
.tool-card:hover {
  border-color: #C8A951;
  text-decoration: none;
  color: inherit;
}
.tool-icon {
  width: 46px;
  height: 46px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tool-name {
  font-size: .9em;
  font-weight: 700;
  color: #2c2c2c;
  margin-bottom: 2px;
}
.tool-version {
  font-size: .7em;
  font-weight: 600;
  color: #C8A951;
  text-transform: uppercase;
  letter-spacing: .03em;
  display: inline-block;
  margin-bottom: 6px;
}
.tool-desc {
  font-size: .8em;
  color: #7f7a71;
  line-height: 1.5;
}

