:root {
  --nbr-blue: #0d6efd;
  --nbr-red: #dc3545;
  --nbr-navy: #0b1f3a;
  --nbr-page-bg: #f5f7fb;
  --nbr-card-shadow: 0 0.5rem 1.5rem rgba(15, 23, 42, 0.08);
  --nbr-card-shadow-hover: 0 0.75rem 1.75rem rgba(15, 23, 42, 0.16);
}

/* ------------------------------------------------------------------------- */
/* Page shell                                                                 */
/* ------------------------------------------------------------------------- */

.nbr-page {
  background:
    radial-gradient(circle at top left, rgba(13, 110, 253, 0.10), transparent 32rem),
    radial-gradient(circle at top right, rgba(220, 53, 69, 0.10), transparent 32rem),
    var(--nbr-page-bg);
  min-height: 100vh;
}

/* ------------------------------------------------------------------------- */
/* Homepage hero                                                              */
/* ------------------------------------------------------------------------- */

.nbr-hero-card {
  border: 0;
  border-radius: 1.25rem;
  overflow: hidden;
}

.nbr-hero-main {
  background:
    linear-gradient(135deg, rgba(11, 31, 58, 0.96), rgba(17, 73, 131, 0.92)),
    var(--nbr-navy);
  color: #fff;
}

.nbr-hero-side {
  background: linear-gradient(180deg, #fff, #eef5ff);
}

/* ------------------------------------------------------------------------- */
/* Shared card styles                                                         */
/* ------------------------------------------------------------------------- */

.nbr-stat-card,
.nbr-era-card,
.nbr-action-card {
  border: 1px solid transparent;
  border-radius: 1rem;
  box-shadow: var(--nbr-card-shadow);
}

.nbr-mini-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 700;
  color: #6c757d;
  transition: color 0.18s ease;
}

.nbr-big-number {
  font-size: 2.25rem;
  line-height: 1;
  font-weight: 800;
}

.nbr-card-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 110, 253, 0.10);
  color: var(--nbr-blue);
  font-weight: 800;
}

/* ------------------------------------------------------------------------- */
/* Homepage era cards and dropdown shades                                     */
/* ------------------------------------------------------------------------- */

.nbr-era-card {
  position: relative;
  height: 100%;
  overflow: visible;
  z-index: 1;
}

.nbr-era-card:has(.nbr-ship-popover.show),
.nbr-era-card:has(.nbr-ship-popover.collapsing) {
  z-index: 20;
}

.nbr-era-stripe {
  height: 0.35rem;
  background: linear-gradient(90deg, var(--nbr-blue), var(--nbr-red));
}

.nbr-card-img-wrap {
  height: clamp(90px, 10vw, 140px);
  max-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 1rem;
  padding-right: 1rem;
}

.nbr-card-top-img {
  width: auto;
  max-width: 90%;
  max-height: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.nbr-ship-popover {
  position: absolute;
  left: 5%;
  right: 5%;
  top: calc(100% - 1rem);
  z-index: 30;
}

.nbr-ship-shade {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.125);
  box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.18);
}

.nbr-ship-list {
  max-height: 21rem;
  overflow: auto;
}

.nbr-ship-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.55rem 0.25rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.nbr-ship-row:last-child {
  border-bottom: 0;
}

.nbr-ship-name {
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nbr-ship-table {
  font-size: 0.9rem;
}

.nbr-ship-table td {
  padding: 0.25rem 0.4rem;
  vertical-align: middle;
}

.nbr-ship-table td:first-child {
  width: 55%;
}

.nbr-ship-table td:nth-child(2) {
  width: 25%;
}

.nbr-ship-table td:nth-child(3) {
  width: 20%;
}

.nbr-shade-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.nbr-icon-up {
  display: none;
}

.nbr-shade-toggle[aria-expanded="true"] .nbr-icon-down {
  display: none;
}

.nbr-shade-toggle[aria-expanded="true"] .nbr-icon-up {
  display: inline-block;
}

/* ------------------------------------------------------------------------- */
/* Homepage action cards                                                      */
/* ------------------------------------------------------------------------- */

.nbr-action-card {
  display: block;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease;
}

.nbr-action-card:hover,
.nbr-action-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--nbr-card-shadow-hover);
  border-color: rgba(13, 110, 253, 0.35);
  background-color: #f8fbff;
}

.nbr-action-card:hover .nbr-mini-label,
.nbr-action-card:focus-visible .nbr-mini-label {
  color: var(--nbr-blue);
}

.nbr-action-card:focus-visible {
  outline: 0.2rem solid rgba(13, 110, 253, 0.25);
  outline-offset: 0.15rem;
}

@media (prefers-reduced-motion: reduce) {
  .nbr-action-card,
  .nbr-mini-label {
    transition: none;
  }

  .nbr-action-card:hover,
  .nbr-action-card:focus-visible {
    transform: none;
  }
}

/* ------------------------------------------------------------------------- */
/* Section divider                                                            */
/* ------------------------------------------------------------------------- */

.nbr-section-break {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nbr-section-break::before,
.nbr-section-break::after {
  content: "";
  height: 0.35rem;
  flex: 1 1 auto;
  border-radius: 999rem;
  opacity: 0.75;
}

.nbr-section-break::before {
  background: linear-gradient(90deg, transparent, var(--bs-primary));
}

.nbr-section-break::after {
  background: linear-gradient(90deg, var(--bs-danger), transparent);
}

.nbr-section-break-mark {
  width: 0.85rem;
  height: 0.85rem;
  flex: 0 0 auto;
  border-radius: 999rem;
  background: linear-gradient(135deg, var(--bs-primary), var(--bs-danger));
  box-shadow: 0 0.35rem 0.9rem rgba(15, 23, 42, 0.18);
}

/* ------------------------------------------------------------------------- */
/* Themed modal                                                               */
/* ------------------------------------------------------------------------- */

.nbr-themed-modal {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(13, 110, 253, 0.28);
  box-shadow:
    0 1rem 3rem rgba(15, 23, 42, 0.22),
    0 0 0 0.2rem rgba(220, 53, 69, 0.08);
}

.nbr-themed-modal::before {
  content: "";
  display: block;
  height: 0.35rem;
  background: linear-gradient(90deg, var(--nbr-blue), var(--nbr-red));
}

.nbr-themed-modal .modal-header {
  border-bottom-color: rgba(13, 110, 253, 0.15);
}

.nbr-themed-modal .modal-footer {
  border-top-color: rgba(220, 53, 69, 0.15);
}

.nbr-modal-footnote {
  text-align: center;
  font-size: 0.85rem;
  color: #6c757d;
  border-top: 1px solid rgba(15, 23, 42, 0.10);
  font-style: italic;
}

/* ------------------------------------------------------------------------- */
/* Ship detail page                                                           */
/* ------------------------------------------------------------------------- */

.nbr-ship-detail-page .nbr-info-card {
  border: 0;
  border-radius: 1rem;
  box-shadow: 0 0.75rem 2rem rgba(15, 23, 42, 0.08);
  background: #fff;
}

.nbr-ship-detail-page .nbr-info-card .card-body {
  padding: 1.5rem;
}

.nbr-ship-title-card {
  overflow: hidden;
}

.nbr-ship-hero-main {
  background:
    radial-gradient(circle at top left, rgba(255, 193, 7, 0.28), transparent 34rem),
    linear-gradient(135deg, #10233f, #061425);
  color: #fff;
}

.nbr-ship-hero-side {
  background: #f8f9fa;
}

.nbr-ship-primary-image {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 1rem;
  background: #f8f9fa;
  border: 1px solid rgba(0, 0, 0, 0.125);
  padding: 0.75rem;
}

.nbr-ship-detail-page .nbr-ship-hero-image {
  display: block;
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  border-radius: 1rem;
  background: #f8f9fa;
  border: 1px solid rgba(0, 0, 0, 0.125);
  padding: 0.75rem;
}

.nbr-ship-badge {
  font-size: 0.95rem;
}

.nbr-detail-list dt {
  font-weight: 700;
  color: #344767;
}

.nbr-detail-list dd {
  margin-bottom: 0.85rem;
}

.nbr-narrative {
  line-height: 1.65;
}

.nbr-ship-detail-page .nbr-narrative {
  max-height: 34rem;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.nbr-narrative p:last-child,
.nbr-gallery-caption p:last-child,
.nbr-gallery-caption ul:last-child,
.nbr-gallery-caption ol:last-child,
.nbr-gallery-caption blockquote:last-child {
  margin-bottom: 0;
}

/* ------------------------------------------------------------------------- */
/* Ship detail gallery                                                        */
/* ------------------------------------------------------------------------- */

.nbr-gallery-shell {
  border: 1px solid rgba(0, 0, 0, 0.125);
  border-radius: 1rem;
  background: #fff;
  overflow: hidden;
}

.nbr-gallery-image-wrap {
  background:
    linear-gradient(45deg, rgba(0, 0, 0, 0.035) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(0, 0, 0, 0.035) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(0, 0, 0, 0.035) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(0, 0, 0, 0.035) 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  min-height: 430px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nbr-gallery-image {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.nbr-gallery-caption {
  max-height: 70vh;
  overflow-y: auto;
  font-size: 0.95rem;
  line-height: 1.55;
}

.nbr-gallery-caption-empty {
  color: #6c757d;
  font-style: italic;
}

.nbr-gallery-credit {
  font-size: 0.85rem;
  color: #6c757d;
}

/* Transparent hit areas; only the icon itself gets a visible circle. */
.nbr-gallery-shell .carousel-control-prev,
.nbr-gallery-shell .carousel-control-next,
.nbr-gallery-control,
.nbr-gallery-control:hover,
.nbr-gallery-control:focus,
.nbr-gallery-control:active {
  width: 4rem;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  opacity: 1;
}

.nbr-gallery-control .carousel-control-prev-icon,
.nbr-gallery-control .carousel-control-next-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: rgba(6, 20, 37, 0.60);
  background-size: 1.15rem 1.15rem;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.35);
}

.nbr-gallery-control:hover .carousel-control-prev-icon,
.nbr-gallery-control:hover .carousel-control-next-icon,
.nbr-gallery-control:focus .carousel-control-prev-icon,
.nbr-gallery-control:focus .carousel-control-next-icon {
  background-color: rgba(6, 20, 37, 0.78);
}

.nbr-gallery-thumb-strip {
  background: #f8f9fa;
}

.nbr-gallery-thumb-button img {
  width: 72px;
  height: 48px;
  object-fit: cover;
}

@media (max-width: 767.98px) {
  .nbr-gallery-image-wrap {
    min-height: 260px;
  }

  .nbr-gallery-caption {
    max-height: none;
  }
}
