.ninaivubook-connect-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 440px));
  column-gap: 26px;
  row-gap: 30px;
  align-items: start;
  justify-content: center;
  width: 100%;
  margin: 12px 0 24px;
  padding: 0 2px;
  box-sizing: border-box;
}

.ninaivubook-connect-grid *,
.ninaivubook-connect-grid *::before,
.ninaivubook-connect-grid *::after {
  box-sizing: border-box;
}

.ninaivubook-connect-card {
  --nbc-gold: #e1b45b;
  --nbc-blue-a: #173f5d;
  --nbc-blue-b: #0d2d48;
  --nbc-blue-c: #061f36;
  position: relative;
  display: grid;
  grid-template-rows: 50px minmax(0, 1fr) 46px;
  width: 100%;
  max-width: 440px;
  min-height: 300px;
  overflow: hidden;
  border: 1px solid rgba(82, 153, 208, 0.48);
  border-radius: 18px;
  background: linear-gradient(135deg, var(--nbc-blue-a) 0%, var(--nbc-blue-b) 54%, var(--nbc-blue-c) 100%);
  color: #fff;
  box-shadow: 0 12px 28px rgba(3, 19, 34, 0.22);
  font-family: Arial, Helvetica, sans-serif;
  isolation: isolate;
}

.ninaivubook-connect-card::before {
  position: absolute;
  inset: 50px 0 46px;
  z-index: -1;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 15%, rgba(56, 139, 202, 0.20), transparent 38%),
    radial-gradient(circle at 88% 78%, rgba(9, 65, 106, 0.30), transparent 42%);
}

.nbc-card-header {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  padding: 7px 50px 7px 16px;
  background: linear-gradient(180deg, #12171c 0%, #0b1015 100%);
  color: #fff;
}

.nbc-card-header::after {
  position: absolute;
  left: 32%;
  right: 32%;
  bottom: 7px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(225, 180, 91, 0.8), transparent);
}

.nbc-announcement-title {
  display: -webkit-box;
  overflow: hidden;
  color: var(--nbc-gold);
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.1;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

.nbc-brand-logo {
  position: absolute;
  top: 8px;
  right: 12px;
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.22);
}

.nbc-brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nbc-card-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  min-width: 0;
  min-height: 0;
  gap: 16px;
  align-items: center;
  padding: 20px 20px 18px 22px;
  color: #fff !important;
  text-decoration: none !important;
}

.nbc-card-content {
  min-width: 0;
}

.nbc-name {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 18px !important;
  color: var(--nbc-gold) !important;
  font-size: 24px !important;
  font-weight: 800 !important;
  line-height: 1.08 !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.nbc-life-dates {
  display: grid;
  gap: 9px;
}

.nbc-detail-row {
  display: grid;
  grid-template-columns: 18px auto minmax(0, 1fr);
  min-width: 0;
  column-gap: 7px;
  align-items: center;
}

.nbc-detail-icon {
  display: inline-flex;
  width: 17px;
  height: 17px;
  align-items: center;
  justify-content: center;
  color: var(--nbc-gold);
}

.nbc-detail-icon svg {
  width: 100%;
  height: 100%;
}

.nbc-detail-date {
  font-size: 17px;
  line-height: 1.18;
}

.nbc-life-label {
  color: #f2f5f7;
  font-weight: 750;
  white-space: nowrap;
}

.nbc-life-value {
  color: #fff;
  font-weight: 800;
  white-space: nowrap;
}

.nbc-detail-place {
  font-size: 11px;
  line-height: 1.2;
}

.nbc-place-label {
  color: #e7eef3;
  font-weight: 700;
  white-space: nowrap;
}

.nbc-place-value {
  min-width: 0;
  overflow: hidden;
  color: #f7fafc;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nbc-card-right {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
}

.nbc-photo-wrap {
  position: relative;
  width: 110px;
  height: 122px;
  flex: 0 0 auto;
}

.nbc-photo {
  display: flex;
  width: 110px;
  height: 122px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 3px solid #e8664f;
  border-radius: 8px;
  background: #eef1f3;
  color: #7a2537;
  object-fit: cover;
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24);
}

.nbc-flag-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  display: inline-flex;
  width: 29px;
  height: 29px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.96);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.30);
}

.nbc-flag {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nbc-card-footer {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: flex-end;
  padding: 7px 18px 8px 22px;
  border-top: 1px solid rgba(194, 221, 239, 0.32);
  background: rgba(3, 21, 37, 0.12);
}

.nbc-published-date {
  display: inline-flex;
  margin-right: auto;
  gap: 8px;
  align-items: center;
  color: rgba(221, 234, 242, 0.68);
  font-size: 10px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}

.nbc-published-icon {
  display: inline-flex;
  width: 15px;
  height: 15px;
  align-items: center;
  justify-content: center;
}

.nbc-published-icon svg {
  width: 100%;
  height: 100%;
}

.nbc-pill {
  display: inline-flex;
  min-height: 31px;
  gap: 7px;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border: 0;
  border-radius: 10px;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.nbc-pill-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  align-items: center;
  justify-content: center;
}

.nbc-pill-icon svg {
  width: 100%;
  height: 100%;
}

.nbc-pill-open {
  background: linear-gradient(180deg, #23c858 0%, #0da843 100%);
  color: #fff !important;
  text-decoration: none !important;
  box-shadow: 0 5px 12px rgba(0, 131, 52, 0.24);
  transition: transform 160ms ease, filter 160ms ease;
}

.nbc-pill-open:hover,
.nbc-pill-open:focus {
  color: #fff !important;
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.ninaivubook-connect-error,
.ninaivubook-connect-empty {
  padding: 14px 16px;
  border: 1px solid #ddd;
  background: #fff;
  color: #4b5563;
}

.ninaivubook-connect-error {
  border-left: 4px solid #b91c1c;
}

@media (max-width: 980px) {
  .ninaivubook-connect-grid,
  .nbc-cols-2,
  .nbc-cols-3,
  .nbc-cols-4 {
    grid-template-columns: 1fr;
    row-gap: 26px;
  }

  .ninaivubook-connect-card {
    max-width: 440px;
    margin-inline: auto;
  }
}

@media (max-width: 560px) {
  .ninaivubook-connect-grid,
  .nbc-cols-2,
  .nbc-cols-3,
  .nbc-cols-4 {
    row-gap: 22px;
  }

  .ninaivubook-connect-card {
    grid-template-rows: 52px minmax(0, 1fr) 48px;
    min-height: 300px;
    border-radius: 15px;
  }

  .ninaivubook-connect-card::before {
    inset: 52px 0 48px;
  }

  .nbc-card-header {
    padding: 7px 48px 7px 14px;
  }

  .nbc-announcement-title {
    font-size: 17px;
  }

  .nbc-brand-logo {
    top: 9px;
    right: 11px;
    width: 32px;
    height: 32px;
  }

  .nbc-card-main {
    grid-template-columns: minmax(0, 1fr) 102px;
    gap: 12px;
    padding: 20px 16px 18px 20px;
  }

  .nbc-name {
    margin-bottom: 18px !important;
    font-size: 22px !important;
  }

  .nbc-life-dates {
    gap: 9px;
  }

  .nbc-detail-row {
    grid-template-columns: 17px auto minmax(0, 1fr);
    column-gap: 7px;
  }

  .nbc-detail-icon {
    width: 16px;
    height: 16px;
  }

  .nbc-detail-date {
    font-size: 13px;
  }

  .nbc-detail-place {
    font-size: 10px;
  }

  .nbc-photo-wrap,
  .nbc-photo {
    width: 102px;
    height: 116px;
  }

  .nbc-flag-badge {
    top: -7px;
    right: -7px;
    width: 28px;
    height: 28px;
    border-width: 2px;
  }

  .nbc-card-footer {
    padding: 7px 14px 8px 20px;
  }

  .nbc-published-date {
    gap: 6px;
    font-size: 10px;
  }

  .nbc-published-icon {
    width: 13px;
    height: 13px;
  }

  .nbc-pill {
    min-height: 31px;
    padding: 6px 11px;
    border-radius: 8px;
    font-size: 12px;
  }

  .nbc-pill-icon {
    width: 14px;
    height: 14px;
    flex-basis: 14px;
  }
}

@media (max-width: 390px) {
  .nbc-card-main {
    grid-template-columns: minmax(0, 1fr) 88px;
    padding-left: 15px;
  }

  .nbc-name {
    font-size: 20px !important;
  }

  .nbc-detail-date {
    font-size: 12px;
  }

  .nbc-detail-place {
    font-size: 9px;
  }

  .nbc-photo-wrap,
  .nbc-photo {
    width: 88px;
    height: 104px;
  }
}
