.rt-inner-banner--compact {
  min-height: 220px;
}

/* 防止页眉/页脚 Logo 与内容图撑破布局 */
#wrapper #logo img,
#wrapper #banner-logo,
#wrapper #navigation-logo {
  max-height: 52px;
  width: auto;
  height: auto;
  object-fit: contain;
}

#wrapper .footer-top-logo {
  width: 104px;
  height: 104px;
  max-width: 104px;
  max-height: 104px;
  overflow: hidden;
}

#wrapper .footer-top-logo img {
  max-width: 76px;
  max-height: 76px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.rt-impa-search-page {
  background: linear-gradient(135deg, #f3f4f6 0%, #f9fafb 100%);
  padding-bottom: 24px;
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

#content.rt-impa-search-page,
#content.rt-impa-search-page > section,
#content.rt-impa-search-page .row,
#content.rt-impa-search-page .col-1 {
  overflow: visible !important;
}

.rt-impa-search-wrap {
  max-width: min(1440px, 100%);
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 40px) 40px;
  overflow: visible;
}

.rt-impa-search-sticky {
  position: relative;
  z-index: 10040;
  margin-bottom: 20px;
}

.rt-impa-search-sticky__anchor {
  height: 0;
  pointer-events: none;
}

.rt-impa-search-box {
  display: flex;
  gap: 12px;
  align-items: center;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.rt-impa-search-box.is-fixed {
  position: fixed;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: min(1440px, calc(100% - clamp(32px, 6vw, 80px)));
  max-width: calc(100% - clamp(32px, 6vw, 80px));
  z-index: 10040;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.14);
  border-radius: 0 0 16px 16px;
}

.rt-impa-search-box input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  border: 2px solid rgba(15, 23, 42, 0.1);
  border-radius: 10px;
  font-size: 16px;
  background: #fff;
}

.rt-impa-search-box input:focus {
  outline: none;
  border-color: #20b2aa;
  box-shadow: 0 0 0 3px rgba(32, 178, 170, 0.12);
}

.rt-impa-search-btn {
  padding: 12px 24px;
  background: linear-gradient(135deg, #20b2aa 0%, #1a9690 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.rt-impa-search-btn:hover {
  background: linear-gradient(135deg, #1a9690 0%, #178880 100%);
}

.rt-impa-results {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  padding: 24px;
  min-height: 220px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.05);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.rt-impa-empty,
.rt-impa-loading,
.rt-impa-error {
  text-align: center;
  padding: 48px 20px;
  color: #64748b;
  font-size: 15px;
}

.rt-impa-empty__icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.rt-impa-error {
  color: #b91c1c;
}

.rt-impa-card + .rt-impa-card {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

.rt-impa-card__layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
}

.rt-impa-card__thumb,
.rt-impa-card__info {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 18px;
}

.rt-impa-card__thumb {
  position: relative;
  text-align: center;
}

.rt-impa-card__thumb img {
  max-width: 100%;
  max-height: 360px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  cursor: zoom-in;
}

.rt-impa-card__thumb img.is-lightbox-bound,
.result-content img.is-lightbox-bound {
  cursor: zoom-in;
}

.rt-impa-card__thumb-placeholder {
  padding: 48px 16px;
  color: #94a3b8;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
}

.rt-impa-type-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
}

.rt-impa-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  table-layout: fixed;
}

.rt-impa-table td {
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  word-break: break-word;
  vertical-align: top;
}

.rt-impa-table td:first-child {
  width: 140px;
  background: #f8fafc;
  font-weight: 600;
  color: #475569;
}

.rt-impa-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.rt-impa-tab {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
}

.rt-impa-tab.is-active {
  background: #20b2aa;
  border-color: #20b2aa;
  color: #fff;
}

.rt-impa-tab-panel {
  display: none;
}

.rt-impa-tab-panel.is-active {
  display: block;
}

.result-content-section {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  margin-top: 24px;
}

.result-content-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
  color: #0f172a;
}

.result-content-title span {
  display: block;
  margin-top: 6px;
  font-style: italic;
  font-weight: normal;
  font-size: 12px;
  color: #999;
}

.result-content {
  font-size: 14px;
  line-height: 1.7;
  color: #334155;
  word-break: break-word;
  overflow: hidden;
}

.result-content img {
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  display: block;
  margin: 12px auto;
  cursor: zoom-in;
  border: 2px solid #2196f3;
  border-radius: 4px;
  padding: 2px;
  box-sizing: border-box;
}

.rt-impa-card {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* 图片灯箱 */
.rt-impa-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  background: rgba(0, 0, 0, 0.92);
  cursor: zoom-out;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.rt-impa-lightbox.is-open {
  display: block;
}

.rt-impa-lightbox__content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 24px 24px;
  min-height: 100%;
  box-sizing: border-box;
  cursor: default;
  touch-action: none;
}

.rt-impa-lightbox__content img {
  max-width: 90vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  display: block;
  pointer-events: auto;
  cursor: zoom-out;
  object-fit: contain;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  transition: transform 0.08s ease-out;
  transform-origin: center center;
  border: none;
  padding: 0;
  margin: 0;
}

.rt-impa-lightbox__close {
  position: fixed;
  top: 16px;
  right: 16px;
  color: #fff;
  font-size: 28px;
  font-weight: 300;
  cursor: pointer;
  z-index: 100002;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: background 0.2s, border-color 0.2s;
  padding: 0;
}

.rt-impa-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
}

body.rt-impa-lightbox-open,
html.rt-impa-lightbox-open {
  overflow: hidden !important;
}

@media (max-width: 900px) {
  .rt-impa-lightbox__content img {
    max-width: 96vw;
    max-height: 72vh;
  }

  .rt-impa-lightbox__close {
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    font-size: 24px;
  }

  .rt-impa-search-wrap {
    padding: 0 12px 28px;
  }

  .rt-impa-search-box {
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
  }

  .rt-impa-search-box.is-fixed {
    width: calc(100% - 24px);
    max-width: calc(100% - 24px);
    border-radius: 0 0 12px 12px;
  }

  .rt-impa-search-btn {
    width: 100%;
  }

  .rt-impa-card__layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .rt-impa-results {
    padding: 14px;
  }

  .rt-impa-table td:first-child {
    width: 30%;
    min-width: 88px;
  }
}
