/* cphos.cn static site – visual fixes on top of the original theme CSS */

/* ============ 1. 列表卡片：整卡可点 / 等高 / 去掉多余的底边线 ============ */
.ast-row .post,
.ast-row .sdm_downloads {
  padding: 0 !important;
  margin-bottom: 0 !important;
  position: relative;
}
.cphos-card-hit {
  display: block;
  width: 100%;
  color: inherit;
  text-decoration: none;
}
.cphos-card-hit:hover,
.cphos-card-hit:focus {
  color: inherit;
  text-decoration: none;
}
.ast-row .post .ast-article-inner,
.ast-row .sdm_downloads .ast-article-inner {
  display: block;
  width: 100%;
  border-bottom: 0 !important;
}
.ast-row .post .post-content,
.ast-row .sdm_downloads .post-content {
  display: block;
  width: 100%;
}
.ast-row .post .read-more,
.ast-row .sdm_downloads .read-more {
  margin: 10px 0 0 0 !important;
  padding: 10px 20px 18px 20px !important;
}
.ast-row .post .entry-title,
.ast-row .sdm_downloads .entry-title {
  font-size: 1.13rem !important;
  line-height: 1.5 !important;
  font-weight: 700;
  color: #333;
  margin: 0 0 6px 0 !important;
}
.ast-row .post .entry-title a,
.ast-row .sdm_downloads .entry-title a {
  color: #333;
}
.ast-row .post .entry-header,
.ast-row .sdm_downloads .entry-header {
  margin-bottom: 6px !important;
}
.ast-row .post .sdm-card-size,
.ast-row .sdm_downloads .sdm-card-size {
  margin: 0 !important;
  padding: 6px 20px 0 20px !important;
  font-size: 0.95rem !important;
  color: #475569;
}
.ast-row .post .ast-article-inner,
.ast-row .sdm_downloads .ast-article-inner {
  padding-bottom: 0 !important;
}
.ast-row .post .cat-name {
  color: #1e3a8a;
}
.ast-row .sdm_downloads .sdm-card-size {
  padding: 6px 20px 0 20px;
  color: #475569;
  font-size: 0.95rem;
}

/* ============ 2. 顶部导航：取消上浮，hover 背景高度一致 ============ */
.cphos-navigation {
  gap: 4px;
  align-items: center;
}
.cphos-nav-button,
.cphos-articles-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px !important;
  border-radius: 8px !important;
  line-height: 1;
  box-sizing: border-box;
  transition: background-color 0.2s ease, color 0.2s ease !important;
}
.cphos-nav-button:hover,
.cphos-articles-btn:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  transform: none !important;
  color: #fff !important;
}

/* ============ 3. “联考”下拉菜单对齐 ============ */
.cphos-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 36px;
}
.cphos-dropdown-content {
  display: none;
  position: absolute !important;
  top: calc(100% + 2px) !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  min-width: 168px;
  margin: 0 !important;
  padding: 8px !important;
  background: #1e3a8a !important;
  border: 2px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 10px !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45) !important;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease;
}
.cphos-dropdown-content::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
  background: transparent;
  border: none;
  width: auto;
  z-index: 1;
}
.cphos-dropdown-content::after {
  display: none !important;
}
.cphos-dropdown:hover .cphos-dropdown-content {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.cphos-dropdown-link {
  padding: 10px 14px !important;
  margin: 2px 0;
  border-bottom: 0 !important;
  border-radius: 6px !important;
  font-size: 14px;
}
.cphos-dropdown-link:first-child {
  margin-top: 0 !important;
  border-radius: 6px !important;
}
.cphos-dropdown-link:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  padding-left: 14px !important;
}

/* ============ 4. 页脚：公众号在左，快捷导航全页面居中，Email 在右 ============ */
@media (min-width: 601px) {
  .cphos-footer-container {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr;
    align-items: center !important;
    column-gap: 32px;
    row-gap: 10px;
  }
  .cphos-footer-left {
    justify-self: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 0;
  }
  .cphos-footer-center {
    justify-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 0;
  }
  .cphos-footer-right {
    justify-self: end;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    min-width: 0;
  }
}
.cphos-footer-center .cphos-footer-nav {
  display: flex;
  flex-direction: row !important;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 16px;
}
.cphos-footer-nav {
  display: flex;
  flex-direction: row !important;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.cphos-footer-btn {
  padding: 2px 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  text-decoration: none !important;
  width: auto !important;
}
.cphos-footer-btn:hover,
.cphos-footer-btn:focus {
  background: transparent !important;
  text-decoration: underline !important;
  text-underline-offset: 4px;
  color: #fff !important;
}

/* ============ 5. 其他小修 ============ */
@media (max-width: 768px) {
  .cphos-slide-desc {
    left: 12px;
    right: 12px;
    margin: 0 0 20px 0;
    padding: 6px 10px;
    font-size: 0.95rem;
    line-height: 1.45;
    white-space: normal;
    background: rgba(8, 16, 40, 0.55);
    border-radius: 8px;
  }
  .cphos-slide-tag {
    left: 12px;
    margin: 0 0 66px 0;
  }
}
.cphos-notification-list .entry-title,
.cphos-exam-analysis-list .entry-title,
.cphos-data-list .entry-title,
.cphos-events-list .entry-title,
.cphos-about-us-list .entry-title,
.cphos-resource-list .entry-title {
  line-height: 1.45;
}
.sdm_post_item .sdm_download_link .sdm_download {
  display: inline-block;
}
.entry-content { overflow-wrap: anywhere; }
.entry-content .katex-display { overflow-x: auto; overflow-y: hidden; }
.cphos-schedule-table-container { -webkit-overflow-scrolling: touch; }
#page { min-height: 100vh; }
/* 页脚移动端：保留公众号二维码和 Email，隐藏快捷导航 */
@media (max-width: 600px) {
  .cphos-footer-center {
    display: none !important;
  }
  .cphos-footer-container {
    flex-direction: column;
    align-items: center;
  }
  .cphos-footer-left,
  .cphos-footer-right {
    width: 100%;
    align-items: center;
    text-align: center;
  }
}