/* دو کاندیدا کنار هم + موبایل — فایل جدا تا کش قبلی نماند */

.about-preview-flag {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.4rem 0.85rem;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: #3b2a08;
  background: #f6d48a;
  border-bottom: 1px solid rgba(59, 42, 8, 0.14);
}

body.has-vote-duo {
  --vote-bar-h: 54px;
}

body.has-vote-duo.has-preview-flag {
  --preview-flag-h: 34px;
}

.page-about-preview.has-preview-flag .topbar.topbar--campaign {
  height: calc(var(--nav-h) + var(--vote-bar-h) + var(--preview-flag-h, 34px)) !important;
}

.page-about-preview.has-preview-flag .vote-campaign {
  padding-top: calc(var(--nav-h) + var(--vote-bar-h) + var(--preview-flag-h, 34px) + 1.5rem) !important;
}

.kp-vote-strip--duo {
  flex: 0 0 var(--vote-bar-h);
}

.kp-vote-strip--duo .kp-vote-strip__row {
  flex-wrap: nowrap;
  row-gap: 0.35rem;
}

.kp-vote-strip__pair {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.7rem;
  min-width: 0;
  font-weight: 800;
  color: #fff8ea;
}

.kp-vote-strip__pair span {
  white-space: nowrap;
}

.kp-vote-strip__pair em {
  margin-right: 0.2rem;
  font-style: normal;
  font-weight: 800;
  color: #f0b45a;
  font-variant-numeric: tabular-nums;
}

.kp-vote-strip__btns {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-inline-start: auto;
  min-width: 0;
}

.kp-vote-strip__btns .kp-vote-strip__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.32rem 0.78rem !important;
  font-size: 0.76rem !important;
}

.vote-campaign .about-head {
  max-width: none !important;
  text-align: center;
}

.vote-campaign .about-h2 {
  font-weight: 900 !important;
  color: #003838 !important;
  text-shadow:
    0 0 12px rgba(127, 224, 216, 0.55),
    0 0 28px rgba(10, 122, 114, 0.28);
}

.vote-campaign__lead {
  max-width: 46rem !important;
  margin-inline: auto !important;
  white-space: normal !important;
}

.vote-duo {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 1.25rem;
  align-items: stretch;
  margin-bottom: 1.5rem;
  max-width: 100%;
}

.vote-person {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  height: 100%;
}

.vote-duo .vote-campaign__layout {
  display: flex !important;
  flex-direction: column !important;
  grid-template-columns: none !important;
  align-items: stretch !important;
  gap: 0.9rem !important;
  height: 100%;
  margin-bottom: 0;
}

.vote-duo .vote-campaign__portrait,
.vote-duo .vote-campaign__panel {
  order: 0 !important;
  width: 100%;
  max-width: 100%;
}

.vote-duo .vote-campaign__portrait {
  position: relative !important;
  overflow: hidden !important;
  min-height: 0 !important;
  height: auto !important;
  align-self: auto !important;
  border-radius: 20px;
}

.vote-duo .vote-campaign__portrait img {
  position: static !important;
  inset: auto !important;
  display: block;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  object-fit: contain !important;
  object-position: center top !important;
}

.vote-duo .vote-campaign__panel {
  flex: 1 1 auto;
  display: flex !important;
  flex-direction: column !important;
  padding: 1.25rem 1.15rem 1.1rem !important;
}

.vote-duo .vote-campaign__panel h3 {
  font-size: clamp(1.15rem, 1.6vw, 1.45rem) !important;
}

.vote-duo .vote-campaign__facts {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.vote-duo .vote-campaign__facts strong {
  font-size: 0.84rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.vote-duo .vote-campaign__bio {
  font-size: 0.88rem !important;
  line-height: 1.85 !important;
}

.vote-duo .vote-campaign__stamp {
  white-space: normal !important;
  max-width: 100%;
}

.vote-duo-resumes {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.vote-duo-resumes .vote-resume {
  grid-template-columns: 1fr !important;
}

.vote-duo-resumes .vote-resume-wrap {
  margin-top: 0;
}

@media (max-width: 1100px) {
  .kp-vote-strip__pair span:first-child {
    display: none;
  }
}

@media (max-width: 900px) {
  body.has-vote-duo {
    --vote-bar-h: 56px;
  }

  .topbar.topbar--campaign:has(.kp-vote-strip--duo) {
    height: auto !important;
    min-height: calc(var(--nav-h) + var(--vote-bar-h));
  }

  .kp-vote-strip--duo {
    flex: 0 0 auto !important;
    height: auto !important;
    min-height: 48px;
    padding-block: 0.42rem;
  }

  .kp-vote-strip--duo .kp-vote-strip__row {
    flex-wrap: nowrap;
    gap: 0.4rem;
  }

  .kp-vote-strip--duo .kp-vote-strip__pair {
    display: none !important;
  }

  .kp-vote-strip--duo .kp-vote-strip__btns {
    width: auto;
    flex: 1 1 auto;
    margin-inline-start: auto;
  }

  .kp-vote-strip--duo .kp-vote-strip__btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 40px;
    padding: 0.42rem 0.5rem !important;
    font-size: 0.74rem !important;
  }

  .page-about .vote-campaign {
    padding-top: calc(var(--nav-h) + 4.35rem + env(safe-area-inset-top, 0px)) !important;
    padding-bottom: 2.1rem !important;
    overflow-x: clip;
  }

  .page-about-preview.has-preview-flag .vote-campaign {
    padding-top: calc(var(--nav-h) + 6.35rem + env(safe-area-inset-top, 0px)) !important;
  }

  .vote-campaign .about-h2 {
    font-size: clamp(1.12rem, 5.4vw, 1.55rem) !important;
    line-height: 1.55 !important;
  }

  .vote-campaign__lead {
    font-size: 0.88rem !important;
    line-height: 1.8 !important;
  }

  .vote-campaign > .container {
    width: 100%;
    padding-inline: 0.55rem;
  }

  .vote-duo {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 0.5rem;
    margin-bottom: 1.1rem;
  }

  .vote-duo-resumes {
    grid-template-columns: 1fr !important;
    gap: 1.1rem;
  }

  .vote-duo .vote-campaign__layout {
    gap: 0.45rem !important;
  }

  .vote-duo .vote-campaign__portrait {
    border-radius: 12px;
  }

  .vote-duo .vote-campaign__portrait img {
    max-height: min(38vh, 260px) !important;
    margin-inline: auto;
  }

  .vote-duo .vote-campaign__panel {
    padding: 0.7rem 0.55rem 0.6rem !important;
    border-radius: 14px;
  }

  .vote-duo .vote-campaign__stamp {
    margin-bottom: 0.45rem !important;
    padding: 0.16rem 0.42rem !important;
    font-size: 0.58rem !important;
    line-height: 1.4;
  }

  .vote-duo .vote-campaign__panel h3 {
    font-size: 0.82rem !important;
    line-height: 1.4 !important;
    margin-bottom: 0.2rem !important;
  }

  .vote-duo .vote-campaign__role {
    font-size: 0.64rem !important;
    line-height: 1.45 !important;
    margin-bottom: 0.5rem !important;
  }

  .vote-duo .vote-campaign__facts {
    grid-template-columns: 1fr !important;
    gap: 0.28rem;
    margin-bottom: 0.5rem;
  }

  .vote-duo .vote-campaign__facts li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.3rem;
    padding: 0.32rem 0.4rem;
  }

  .vote-duo .vote-campaign__facts span,
  .vote-duo .vote-campaign__facts strong {
    display: inline;
    margin: 0;
    font-size: 0.62rem;
    line-height: 1.35;
  }

  .vote-duo .vote-campaign__bio {
    font-size: 0.68rem !important;
    line-height: 1.65 !important;
    margin-bottom: 0.5rem !important;
  }

  .vote-duo .vote-campaign__highlights {
    justify-content: flex-start;
    gap: 0.25rem;
    margin-bottom: 0.55rem;
  }

  .vote-duo .vote-campaign__highlights li {
    font-size: 0.58rem;
    padding: 0.18rem 0.38rem;
  }

  .vote-duo a.vote-box.vote-box--hero {
    padding: 0.55rem 0.4rem !important;
    border-radius: 12px !important;
    gap: 0.08rem !important;
  }

  .vote-duo a.vote-box.vote-box--hero .vote-box__btn {
    font-size: 0.88rem !important;
  }

  .vote-duo a.vote-box.vote-box--hero .vote-box__line {
    white-space: normal !important;
    text-align: center;
    font-size: 0.62rem !important;
  }

  .vote-resume li {
    padding: 0.75rem 0.8rem;
    font-size: 0.86rem;
    line-height: 1.8;
  }
}

@media (max-width: 520px) {
  body.has-vote-duo {
    --vote-bar-h: 52px;
  }

  .kp-vote-strip--duo .kp-vote-strip__kicker {
    display: none;
  }

  .kp-vote-strip--duo .kp-vote-strip__btns {
    width: 100%;
    margin-inline-start: 0;
  }

  .kp-vote-strip--duo .kp-vote-strip__btn {
    min-height: 42px;
    font-size: 0.78rem !important;
  }

  .page-about .vote-campaign,
  .page-about-preview.has-preview-flag .vote-campaign {
    padding-top: calc(var(--nav-h) + 4.1rem + env(safe-area-inset-top, 0px)) !important;
  }

  .page-about-preview.has-preview-flag .vote-campaign {
    padding-top: calc(var(--nav-h) + 6.1rem + env(safe-area-inset-top, 0px)) !important;
  }

  .vote-duo {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  }

  .vote-duo .vote-campaign__facts {
    grid-template-columns: 1fr !important;
  }

  .vote-duo .vote-campaign__portrait img {
    max-height: min(34vh, 220px) !important;
  }
}

@media (max-width: 380px) {
  .vote-duo {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 0.32rem;
  }

  .vote-duo .vote-campaign__panel {
    padding: 0.55rem 0.42rem 0.5rem !important;
  }

  .vote-duo .vote-campaign__panel h3 {
    font-size: 0.74rem !important;
  }

  .vote-duo .vote-campaign__facts {
    grid-template-columns: 1fr !important;
  }

  .vote-duo .vote-campaign__facts li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem;
    padding: 0.28rem 0.32rem;
  }

  .vote-duo .vote-campaign__facts span,
  .vote-duo .vote-campaign__facts strong {
    font-size: 0.58rem;
  }
}
