/* Naija Ballot · Featured Candidates, isolated from the existing site styles. */
.nb-featured[hidden] { display: none !important; }
.nb-featured,
.nb-featured * { box-sizing: border-box; }

.nb-featured {
  --nbf-deep: #0a2e24;
  --nbf-green: #23883b;
  --nbf-muted: #64766e;
  --nbf-border: #e1eae3;
  --nbf-pale: #eef7ee;
  position: relative;
  z-index: 20;
  isolation: isolate;
  width: min(1170px, calc(100% - 48px));
  /* Pull this section closer to the homepage address search. */
  margin: -28px auto clamp(42px, 5vw, 70px);
  padding: 34px 0 clamp(42px, 5vw, 64px);
  background: #fff;
  color: var(--nbf-deep);
  font-family: inherit;
}
/* Full-bleed white panel covers the site's landmark-footer illustration,
   while the featured cards stay aligned to the existing content width. */
.nb-featured::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: #fff;
  pointer-events: none;
}

.nb-featured-header {
  display: block;
  position: relative;
  text-align: center;
  margin-bottom: 26px;
}
/* A quiet action at the right, independent of the centred section heading. */
.nb-featured-get-featured {
  position: absolute;
  right: 0;
  top: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 15px;
  border: 1px solid #badcc2;
  border-radius: 999px;
  background: #f7fbf7;
  color: #136b36;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease;
}
.nb-featured-get-featured:hover {
  background: #eaf5eb;
  border-color: #95cda2;
}
.nb-featured-get-featured:focus-visible {
  outline: 3px solid #67b67a;
  outline-offset: 3px;
}

.nb-featured-heading { min-width: 0; margin: 0 auto; text-align: center; }
.nb-featured-eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  padding: 8px 15px;
  border-radius: 100px;
  background: #e8f5e4;
  color: #164b2f;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .17em;
  text-transform: uppercase;
}
.nb-featured-title {
  margin: 0;
  color: var(--nbf-deep);
  font-size: clamp(30px, 3.6vw, 43px);
  line-height: 1.08;
  font-weight: 750;
  letter-spacing: -.045em;
}
.nb-featured-title em {
  color: var(--nbf-green);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.06em;
  font-style: italic;
  font-weight: 500;
  letter-spacing: -.045em;
}
.nb-featured-subtitle {
  margin: 11px auto 0;
  max-width: 720px;
  color: #596760;
  font-size: 14px;
  line-height: 1.5;
}
.nb-featured-view-all {
  display: none; /* Reserved for a future dedicated featured-candidates page. */
  white-space: nowrap;
  color: var(--nbf-green);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.nb-featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}
.nb-featured-card {
  display: flex;
  min-width: 0;
  min-height: 179px;
  gap: 13px;
  padding: 11px;
  border: 1px solid var(--nbf-border);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(10, 46, 36, .045), 0 2px 3px rgba(10, 46, 36, .028);
  transition: box-shadow .2s ease, transform .2s ease;
}
.nb-featured-card:hover {
  box-shadow: 0 13px 32px rgba(10, 46, 36, .085);
  transform: translateY(-2px);
}
.nb-featured-photo {
  position: relative;
  display: flex;
  flex: 0 0 118px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 13px;
  background: linear-gradient(145deg,#e1eee4 0%,#f2f7ec 100%);
  color: #237a42;
  align-self: stretch;
  min-height: 148px;
}
.nb-featured-photo img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
}
.nb-featured-initials {
  font-weight: 800;
  font-size: 25px;
  letter-spacing: -.03em;
}
.nb-featured-body {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}
.nb-featured-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  margin: 1px 0 0;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.24;
  letter-spacing: -.02em;
  color: var(--nbf-deep);
}
.nb-featured-role {
  margin: 0;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.25;
  color: #23873a;
}
.nb-featured-location {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: #6b736e;
  font-size: 11px;
  line-height: 1.28;
  padding-left: 15px;
  position: relative;
  margin: 0;
}
.nb-featured-location::before {
  content: '';
  position: absolute;
  left: 1px;
  top: 2px;
  width: 11px;
  height: 12px;
  background: no-repeat center / 11px 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b736e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 5-8 12-8 12S4 15 4 10a8 8 0 1 1 16 0Z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E");
}
.nb-featured-party {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--nbf-pale);
  color: #315543;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.2;
}
.nb-featured-button {
  display: inline-flex;
  width: 100%;
  min-height: 31px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  background: #035537;
  color: #fff !important;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  text-decoration: none !important;
  transition: background .15s ease;
}
.nb-featured-button:hover { background: #087249; }
.nb-featured-button:focus-visible { outline: 3px solid #6fbc82; outline-offset: 3px; }
.nb-featured-button[aria-disabled="true"] { opacity: .55; background: #8ea79a; cursor: default; }
.nb-featured-disclaimer {
  color: #7a827c;
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
  margin: 17px 0 0;
}

@media (max-width: 1050px) {
  .nb-featured { margin-top: -18px; padding-top: 30px; }
  .nb-featured-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .nb-featured-photo { flex-basis: 124px; }
  .nb-featured-get-featured { position: static; margin: 16px auto 0; }
}
@media (max-width: 600px) {
  .nb-featured {
    width: calc(100% - 24px);
    margin: -14px auto 48px;
    padding: 26px 0 42px;
  }
  .nb-featured-header { margin-bottom: 22px; text-align: center; }
  .nb-featured-eyebrow { margin-bottom: 10px; padding: 7px 12px; font-size: 9px; }
  .nb-featured-title { font-size: clamp(27px, 6.7vw, 34px); letter-spacing: -.045em; }
  .nb-featured-subtitle { font-size: 12px; line-height: 1.45; margin-top: 9px; }
  .nb-featured-grid { gap: 10px; }
  .nb-featured-card {
    flex-direction: column;
    min-height: 0;
    gap: 9px;
    padding: 9px;
    border-radius: 15px;
  }
  .nb-featured-photo {
    flex: 0 0 auto;
    width: 100%;
    min-height: 0;
    aspect-ratio: 1.45 / 1;
    border-radius: 10px;
  }
  .nb-featured-photo img { object-position: center 24%; }
  .nb-featured-initials { font-size: 27px; }
  .nb-featured-body { width: 100%; gap: 5px; }
  .nb-featured-name { font-size: 13.5px; line-height: 1.2; }
  .nb-featured-role { font-size: 11px; }
  .nb-featured-location { font-size: 10px; }
  .nb-featured-party { font-size: 10px; margin-top: 4px; padding: 5px 8px; }
  .nb-featured-button { min-height: 32px; font-size: 11px; margin-top: auto; }
  .nb-featured-disclaimer { font-size: 10px; }
}
@media (max-width: 350px) {
  .nb-featured-title { font-size: 25px; }
  .nb-featured-grid { gap: 8px; }
  .nb-featured-card { padding: 7px; }
  .nb-featured-name { font-size: 12.5px; }
  .nb-featured-role, .nb-featured-button { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .nb-featured-card, .nb-featured-button { transition: none; }
}

/* Homepage-specific protections against broad site styles. */
#featured-candidates .nb-featured-header,
#featured-candidates .nb-featured-heading,
#featured-candidates .nb-featured-title,
#featured-candidates .nb-featured-subtitle { text-align: center; }
#featured-candidates .nb-featured-subtitle { margin-left: auto; margin-right: auto; }
