/* VIP cards v6.9.6
   Isolated enhancement for cards in the listing. The approved base theme
   remains in style.css; this file can be removed without breaking layout. */

.vip-stack { gap: 14px; }

.vip-stack .ad-vip,
.main-list .ad-regular {
  transition: box-shadow 190ms ease, border-color 190ms ease,
              background-color 190ms ease, transform 190ms ease;
}

.vip-stack .ad-vip {
  border-color: #c8d7e7;
  box-shadow: 0 3px 15px rgba(32, 60, 91, .035);
}

.vip-stack .ad-vip::before {
  width: 3px;
  background-color: #4978ad;
}

/* Keep the badge in the natural document flow: no title overlap, even on phones. */
.vip-stack .ad-vip .ad-top {
  justify-content: flex-end;
  margin-bottom: 12px;
}

.vip-stack .ad-vip .ad-marker { gap: 8px; }
/* Keep the agreed VIP pill on desktop; draw its crown inline so neither
   caching nor a missing image resource can suppress the icon. */
.vip-stack .ad-vip .vip-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid #b8cfe7;
  border-radius: 999px;
  background: #e8f1fc;
  color: #245784;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: .025em;
  white-space: nowrap;
}
.vip-stack .ad-vip .vip-badge::before { content: none; display: none; }
.vip-stack .ad-vip .vip-badge .vip-crown-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  stroke: currentColor;
}

.vip-stack .ad-vip h3 { margin-bottom: 13px; }
.vip-stack .ad-vip .text { color: #283749; }

/* Light separators distinguish the preview, action and author contacts. */
.vip-stack .ad-vip .ad-actions {
  margin-top: 16px;
  margin-bottom: 14px;
  padding-top: 13px;
  border-top: 1px solid #e1e8f1;
}
.vip-stack .ad-vip .ad-contact-block {
  padding-top: 13px;
  border-top: 1px solid #e1e8f1;
}
.vip-stack .ad-vip .author-name { margin-bottom: 10px; }
.vip-stack .ad-vip .ad-contacts { gap: 9px; }
.vip-stack .ad-vip .contact-chip { max-width: 100%; min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.vip-stack .ad-vip .ad-bottom { margin-top: 14px; }

.vip-stack .ad-vip .read-link,
.vip-stack .ad-vip .contact-chip,
.main-list .ad-regular .read-link {
  transition: color 190ms ease, border-color 190ms ease,
              background-color 190ms ease, box-shadow 190ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .vip-stack .ad-vip:hover,
  .vip-stack .ad-vip:focus-within {
    transform: translateY(-3px);
    border-color: #8fb0d3;
    box-shadow: 0 12px 28px rgba(36, 69, 107, .105);
  }
  .vip-stack .ad-vip:hover .read-link,
  .vip-stack .ad-vip:focus-within .read-link {
    background: #28588c;
    color: #fff;
    border-color: #28588c;
  }
  .vip-stack .ad-vip .contact-chip:hover {
    background: #e9f2fd;
    border-color: #a7c2df;
    text-decoration: none;
  }
  .main-list .ad-regular:hover,
  .main-list .ad-regular:focus-within {
    transform: translateY(-2px);
    border-color: #d3dfed;
    background: #fbfdff;
    box-shadow: 0 8px 21px rgba(30, 59, 92, .07);
  }
}

.vip-stack .ad-vip .read-link:focus-visible,
.vip-stack .ad-vip .contact-chip:focus-visible,
.main-list .ad-regular .read-link:focus-visible {
  outline: 2px solid #2e6da9;
  outline-offset: 3px;
}

/* Touch screens: no card jump or fixed heights. */
@media (max-width: 560px) {

  /* Listing cards only: omit metadata on mobile, keep it on desktop
     and preserve full details on the dedicated announcement page. */
  .vip-stack .ad-vip .ad-index,
  .vip-stack .ad-vip .ad-date,
  .vip-stack .ad-vip .ad-bottom,
  .regular-feed .ad-regular .regular-head time,
  .regular-feed .ad-regular .regular-bottom {
    display: none !important;
  }
  .vip-stack .ad-vip .vip-badge { font-size: 11px; padding: 5px 10px; gap: 6px; }
  .vip-stack .ad-vip .vip-badge .vip-crown-icon {
    width: 16px; height: 16px; flex-basis: 16px;
  }
  .vip-stack .ad-vip .ad-top { margin-bottom: 10px; }
  .vip-stack .ad-vip .ad-actions { padding-top: 12px; }
  .vip-stack .ad-vip .ad-contact-block { padding-top: 12px; }
  .vip-stack .ad-vip .contact-chip { display: inline-block; white-space: normal; }
  .vip-stack .ad-vip .contact-chip .contact-icon { vertical-align: middle; margin-right: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  .vip-stack .ad-vip,
  .main-list .ad-regular,
  .vip-stack .ad-vip .read-link,
  .vip-stack .ad-vip .contact-chip,
  .main-list .ad-regular .read-link {
    transition: none;
    transform: none;
  }
}

/* v6.9.8: Desktop label is independent of .ad-top. 
   The old VIP label remains unchanged on mobile. */
.vip-label-desktop { display: none; }
@media (min-width: 561px) {
  .main-list article.ad-vip { position: relative; }
  .main-list article.ad-vip .vip-label-desktop {
    display: inline-flex !important;
    position: absolute;
    top: 13px;
    right: 17px;
    z-index: 3;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 32px;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid #bfd3e9;
    background: #e8f1fc;
    color: #285782;
    font: 800 13px/1.25 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(27,65,108,.04);
    pointer-events: none;
  }
  .main-list article.ad-vip .vip-label-desktop svg {
    display: block;
    flex: 0 0 19px;
    width: 19px;
    height: 19px;
    stroke: currentColor;
  }
  /* Reserve room for the label even when a number or date is present. */
  .main-list article.ad-vip .ad-top { padding-right: 105px; }
  /* Avoid duplicate VIP labels if the existing upper row is visible. */
  .main-list article.ad-vip .ad-top .vip-badge { display: none !important; }
  /* Keep text clear of the visible desktop badge. */
  .main-list article.ad-vip h3 { padding-right: 96px; }
}
@media (max-width: 560px) {
  .main-list article.ad-vip .vip-label-desktop { display: none !important; }
}
