/* ==========================================================================
   赤峰市中小微企业金融服务信用信息共享平台 —— 首页（index.jsp）专属样式
   说明：已从 index.jsp 内联 <style> 中抽出，并剔除与 website.css 重复的规则。
         website.css 需先加载，本文件在其后加载（同选择器时以本文件为准）。
   ========================================================================== */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f0f2f5;
  min-height: 100vh;
  font-size: 14px;
  overflow-x: hidden;
  transition: background-color 0.3s ease;
}

.top-bar .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-bar .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  width: 100%;
}

/* === 横幅区 === */
.banner {
  background: #2d6898;
  color: white;
  padding: 0;
  position: relative;
  overflow: hidden;
}

.banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  z-index: 0;
}

.banner .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* 轮播图*/
.banner-carousel {
  position: relative;
  z-index: 1;
}

.banner-slides {
  position: relative;
  overflow: hidden;
}

.banner-slide {
  display: none;
  animation: fadeSlide 0.6s ease;
}

.banner-slide.active {
  display: block;
}

.banner-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.banner-content {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 50px;
}

.banner-text {
  flex: 1;
}

.banner-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.3;
}

.banner-subtitle {
  font-size: 0.95rem;
  opacity: 0.9;
  margin-bottom: 10px;
}

.banner-desc {
  font-size: 0.85rem;
  opacity: 0.8;
  line-height: 1.6;
  max-width: 520px;
}

.banner-features {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.banner-feature {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.12);
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,0.15);
}

.banner-feature-icon {
  font-size: 1rem;
}

.banner-btn {
  padding: 12px 25px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
}

.banner-btn-primary {
  background: #4a8ac8;
  color: white;
}

.banner-btn-primary:hover {
  background: #4580bc;
}

.banner-btn-secondary {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.4);
  color: white;
}

.banner-btn-secondary:hover {
  background: rgba(255,255,255,0.25);
}

/* 轮播指示器*/
.banner-indicators {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 0 12px;
  position: relative;
  z-index: 2;
}

.banner-indicator {
  width: 24px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  padding: 0;
}

.banner-indicator.active {
  background: rgba(255,255,255,0.9);
  width: 40px;
}

/* 第二页业务卡片*/
.banner-biz-cards {
  display: flex;
  gap: 16px;
  margin-top: 10px;
}

.banner-biz-card {
  flex: 1;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 6px;
  padding: 12px 14px;
  backdrop-filter: blur(4px);
}

.banner-biz-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.banner-biz-card p {
  font-size: 0.8rem;
  opacity: 0.8;
  line-height: 1.5;
}

.banner-biz-tag {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  margin-top: 6px;
  margin-right: 4px;
}

/* 统计数据 */
.banner-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.banner-stat {
  text-align: center;
  background: rgba(255,255,255,0.1);
  padding: 16px 12px;
  border-radius: 8px;
  min-width: 95px;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.banner-stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: #90cdf4;
  line-height: 1;
  margin-bottom: 6px;
}

.banner-stat-label {
  font-size: 12px;
  opacity: 0.9;
}

/* === 容器 === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  min-width: 0;
}

/* === 主内容区 === */
.main-content {
  padding: 25px 0;
}

.content-grid {
  display: grid;
  grid-template-columns: 240px 1fr 240px;
  gap: 18px;
  align-items: stretch;
  min-width: 0;
}

/* 确保三栏高度一致*/
@media (min-width: 901px) {
  .sidebar-left,
  .main-center,
  .sidebar-right {
    align-self: stretch;
    display: flex;
    flex-direction: column;
  }

  .sidebar-left > .panel,
  .sidebar-right > .panel {
    min-height: 0;
  }

  .main-center > .panel {
    min-height: 0;
  }
}

/* === 桌面端：三栏按"行"对齐 ===
   第一行：快捷服务 | 产品与服务 | 优秀入驻企业（底部持平）
   第二行：最新公告 | 信用公示   | 合作金融机构 + 联系我们（顶部、底部持平） */

/* 非桌面端（<=1080px）保持原有布局：right-stack 不产生盒子，两个面板仍作为栏容器的直接子项 */
.sidebar-right > .right-stack {
  display: contents;
}

@media (min-width: 1081px) {
  .content-grid {
    grid-template-rows: auto minmax(0, 1fr);
    row-gap: 20px;
  }

  /* 让栏容器"透明化"，面板直接成为网格项
     （用 .content-grid 前缀提高优先级，避免被文件后部的基础 display:flex 覆盖） */
  .content-grid .sidebar-left,
  .content-grid .main-center,
  .content-grid .sidebar-right {
    display: contents;
  }

  /* 第一行 */
  .sidebar-left > .panel:nth-child(1) { grid-row: 1; grid-column: 1; }
  .main-center > .panel:nth-child(1)  { grid-row: 1; grid-column: 2; }
  .sidebar-right > .panel:nth-child(1) { grid-row: 1; grid-column: 3; }

  /* 第二行 */
  .sidebar-left > .panel:nth-child(2) { grid-row: 2; grid-column: 1; }
  .main-center > .panel:nth-child(2)  { grid-row: 2; grid-column: 2; }
  .sidebar-right > .right-stack       { grid-row: 2; grid-column: 3; }

  .main-center > .panel:nth-child(2) {
    min-height: 0;
  }

  /* 右侧第二行：合作金融机构自然高度，联系我们撑满剩余空间，使底部与信用公示持平 */
  .sidebar-right > .right-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 0;
    min-width: 0;
  }

  .sidebar-right > .right-stack > .panel:last-child {
    flex: 1;
    min-height: 0;
  }

  /* 最新公告撑满第二行剩余空间，避免左栏底部留白 */
  .sidebar-left > .panel:nth-child(2) > .panel-body {
    flex: 1;
  }

  /* 最新公告条目被拉伸后内容垂直居中 */
  .content-grid .sidebar-left > .panel:nth-child(2) .news-item {
    align-items: center;
  }

  /* 第一行内容自适应撑满行高，消除面板底部留白 */
  .content-grid .main-center > .panel:nth-child(1) > .panel-body,
  .content-grid .sidebar-right > .panel:nth-child(1) > .panel-body {
    flex: 1;
    min-height: 0;
  }

  /* 产品与服务：两行卡片均分高度撑满面板 */
  .content-grid .main-center > .panel:nth-child(1) .institutions-grid {
    flex: 1;
    grid-auto-rows: minmax(0, 1fr);
  }

  /* 优秀入驻企业：加大条目间隔并均匀分布 */
  .content-grid .sidebar-right > .panel:nth-child(1) .enterprise-list {
    gap: 14px;
  }

  .content-grid .sidebar-right > .panel:nth-child(1) .enterprise-item {
    display: flex;
    align-items: center;
  }
}

/* === 左侧栏 === */
.sidebar-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  align-self: stretch;
}

.sidebar-left > .panel {
  flex: none;
}

.panel {
  background: white;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.panel-header {
  background: linear-gradient(90deg, #2d6098, #3a72a8);
  color: white;
  padding: 14px 18px;
  font-weight: 600;
  font-size: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-header a {
  color: white;
  font-size: 13px;
  font-weight: normal;
  opacity: 0.85;
}

.panel-header a:hover {
  opacity: 1;
  text-decoration: underline;
}

.panel-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  min-height: 0;
}

/* 快捷服务 */
.service-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
}

.service-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px dashed #eee;
  transition: all 0.2s;
  cursor: pointer;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

.service-item:last-child {
  border-bottom: none;
}

.service-item:hover {
  background: #f8f9fa;
  margin: 0 -15px;
  padding-left: 15px;
  padding-right: 15px;
  border-radius: 4px;
}

.service-icon {
  width: 28px;
  height: 28px;
  background: #fff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid #e8e8e8;
}

.service-text {
  flex: 1;
}

.service-name {
  font-weight: 600;
  color: #2d6098;
  font-size: 12px;
  margin-bottom: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-desc {
  font-size: 11px;
  color: #888;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 新闻列表 */
.news-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-item {
  padding: 8px 0;
  border-bottom: 1px solid #f5f5f5;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.news-date {
  background: #2d6098;
  color: white;
  padding: 3px 10px;
  border-radius: 3px;
  font-size: 12px;
  flex-shrink: 0;
}

.news-title {
  font-size: 13px;
  color: #333;
  line-height: 1.6;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* === 中间内容 === */
.main-center {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  align-self: stretch;
}

.main-center > .panel {
  flex: none;
}

/* 信用公示 */
.credit-tabs {
  display: flex;
  gap: 0;
  background: #f5f7fa;
  border-radius: 6px 6px 0 0;
  overflow: hidden;
}

.credit-tab {
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 600;
  color: #666;
  background: transparent;
  border: none;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}

.credit-tab:hover {
  color: #2d6098;
}

.credit-tab.active {
  background: white;
  color: #4a8ac8;
  border-bottom-color: #4a8ac8;
}

.credit-table {
  background: white;
  border-radius: 0 0 6px 6px;
  overflow-x: auto;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  flex: 1;
}

.credit-table table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 560px;
}

.credit-table th {
  background: #f8f9fa;
  color: #333;
  padding: 12px 10px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  border-bottom: 2px solid #e8e8e8;
  white-space: nowrap;
}

.credit-table th:last-child {
  width: 110px;
  min-width: 110px;
}

.credit-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.credit-table td:last-child {
  white-space: nowrap;
  width: 110px;
  min-width: 110px;
}

.credit-table td:first-child {
  max-width: none;
}

/* 移动端表格优化*/
@media (max-width: 768px) {
  .credit-table {
    overflow-x: auto;
  }
  .credit-table table {
    min-width: 600px;
  }
  .credit-table th,
  .credit-table td {
    padding: 8px 10px;
    font-size: 12px;
  }
}

.credit-table tr:last-child td {
  border-bottom: none;
}

.credit-table tr:hover {
  background: #f8f9fa;
}

.credit-panel {
  display: none;
}

/* 联合惩戒、风险预警列表左侧留出间隙，避免顶到边缘 */
.credit-panel .news-item {
  padding-left: 14px;
}

.credit-panel.active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.credit-panel.active .news-list {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.grade-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  border: 1px solid transparent;
}

/* 信用等级配色：由优到差 绿 → 黄 → 橙 → 红，未评级为灰 */
.grade-aaa { background: #b7e4c7; color: #0b5a2b; border-color: #8bd0a4; }

.grade-aa { background: #c8ebd4; color: #0f6b34; border-color: #9dd9b3; }

.grade-a { background: #d4edda; color: #155724; border-color: #a8dfba; }

.grade-b { background: #fff3cd; color: #856404; border-color: #f2dfa1; }

.grade-c { background: #ffe0c2; color: #9a4500; border-color: #f7c184; }

.grade-d { background: #f8d7da; color: #a12622; border-color: #efb3b8; }

.grade-none { background: #eceff1; color: #60707a; border-color: #d6dde1; }

.report-link {
  color: #4a8ac8;
  text-decoration: none;
  font-size: 12px;
}

.report-link:hover {
  color: #2d6098;
  text-decoration: underline;
}

/* 合作机构 */
.institutions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  grid-auto-rows: auto;
  min-width: 0;
  padding: 15px 0;
}

.inst-card {
  background: #f8f9fa;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  padding: 14px;
  display: flex;
  gap: 14px;
  align-items: center;
  transition: all 0.2s;
  cursor: pointer;
  overflow: hidden;
  min-height: 0;
}

.inst-card:hover {
  border-color: #4a8ac8;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.inst-card-highlight {
  background: linear-gradient(135deg, #e8f4fd, #d8ecf8);
  border-color: #4a8ac8;
  box-shadow: 0 2px 6px rgba(74,138,200,0.15);
}

.inst-card-highlight .inst-logo {
  background: linear-gradient(135deg, #4a8ac8, #5a9ad5);
}

.inst-card-highlight .inst-info h4 {
  color: #2d6098;
}

.inst-logo {
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, #2d6098, #3a72a8);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.inst-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.inst-info h4 {
  font-size: 13px;
  color: #2d6098;
  margin-bottom: 3px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inst-info p {
  font-size: 11px;
  color: #666;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  margin: 0;
}

/* === 右侧栏 === */
.sidebar-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  align-self: stretch;
}

.sidebar-right > .panel {
  flex: none;
}

/* 入驻企业 */
.enterprise-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.enterprise-item {
  padding: 6px 10px;
  background: #f8f9fa;
  border-radius: 4px;
  font-size: 12px;
  color: #333;
  line-height: 16px;
  display: block;
  transition: all 0.2s;
  border-left: 3px solid transparent;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-height: 0;
}

.enterprise-item:hover {
  background: #e8f4fd;
  border-left-color: #4a8ac8;
  color: #2d6098;
}

/* 联系方式 */
.contact-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
  font-size: 13px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.contact-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-text {
  color: #555;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.footer .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* === 响应式=== */
@media (max-width: 1240px) {
  .content-grid {
    grid-template-columns: 220px 1fr 220px;
    gap: 15px;
  }
  .container {
    max-width: 100%;
    padding: 0 20px;
  }
  .banner-content {
    gap: 20px;
  }
  .nav-logo-text {
    font-size: 0.95rem;
  }
  .nav-links {
    gap: 0;
  }
  .nav-link {
    padding: 23px 10px;
    font-size: 13px;
  }
}

@media (max-width: 1080px) {
  .content-grid {
    grid-template-columns: 1fr 1fr;
  }
  .sidebar-left {
    order: 1;
    height: auto;
  }
  .main-center {
    order: 2;
    grid-column: span 2;
    height: auto;
  }
  .sidebar-right {
    order: 3;
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    height: auto;
  }
  .sidebar-right .panel {
    margin-bottom: 0;
  }
  .banner-content {
    gap: 30px;
  }
  .banner-title {
    font-size: 1.9rem;
  }
  .nav-content {
    gap: 20px;
  }
  .nav-logo-text {
    font-size: 0.9rem;
  }
  .nav-logo {
    max-width: 200px;
  }
  .nav-link {
    padding: 23px 5px;
    font-size: 12px;
  }
  .nav-search input {
    width: 100px;
  }
}

@media (max-width: 900px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
  .sidebar-left, .sidebar-right, .main-center {
    grid-column: span 1;
    height: auto;
  }
  .sidebar-right {
    display: flex;
    flex-direction: column;
  }
  .banner-content {
    flex-direction: column;
    text-align: center;
  }
  .banner-stats {
    justify-content: center;
    flex-wrap: wrap;
    max-width: 500px;
    margin: 0 auto;
  }
  .institutions-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .nav-content {
    flex-wrap: wrap;
    gap: 10px;
    height: auto;
    padding: 10px 0;
  }
  .nav-logo {
    justify-content: center;
  }
  .nav-links {
    justify-content: center;
    flex-wrap: wrap;
  }
  .nav-search {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .banner {
    padding: 30px 0;
  }
  .banner-content {
    flex-direction: column;
    text-align: center;
    gap: 25px;
  }
  .banner-title {
    font-size: 1.6rem;
  }
  .banner-stat {
    padding: 15px 15px;
    min-width: 80px;
  }
  .banner-stat-number {
    font-size: 1.6rem;
  }

  .institutions-grid {
    grid-template-columns: 1fr;
  }
  .credit-tabs {
    flex-wrap: wrap;
  }
  .credit-tab {
    padding: 10px 15px;
    font-size: 12px;
  }
  .credit-table {
    overflow-x: auto;
  }
  .credit-table table {
    min-width: 600px;
  }
  .footer-content {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }
}
