/* 全局样式 */
button,
input,
select,
a {
  box-shadow: none !important;
}
body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #3b415c;
  background: #f5f7fe;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body > main {
  flex: 1;
}
.navbar .navbar-nav {
  padding-left: 200px;
}
.navbar-nav .nav-link {
  font-size: 22px !important;
}
/* 自定义标签页样式 */
.nav-pills .nav-link {
  border: none;
  background: none;
  color: #666;
  position: relative;
  padding: 12px 0;
  margin-right: 40px;
}

.nav-pills .nav-link.active {
  color: #007bff;
  background: none;
  border: none;
}

.nav-pills .nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 3px;
  background-color: #007bff;
}

.nav-pills {
  border-bottom: 1px solid #dee2e6;
}

/* 头部样式 */
header {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
  font-size: 1.2rem;
}
.navbar-brand h1 {
  font-size: 1.25rem;
  margin-bottom: 0;
}
.navbar-brand p {
  font-size: 0.52rem;
  margin-bottom: 0;
}

.navbar-nav .nav-link {
  color: #333 !important;
  font-weight: normal;
  padding: 0.5rem 1rem;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
  color: #007bff !important;
}

.navbar-nav .nav-link.active {
  color: #007bff !important;
  position: relative;
  font-weight: bold;
}

.navbar-nav .nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 3px;
  background-color: #007bff;
}

/* 横幅样式 */
.hero-banner {
  max-height: 300px;
  overflow: hidden;
}

.hero-banner img {
  object-fit: cover;
  height: 300px;
}

/* 卡片样式 */
.card {
  border: 1px solid #e9ecef;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s ease;
}

.card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.card-header {
  background-color: rgba(22, 119, 255, 0.08);
  border-bottom: 1px solid #e9ecef;
  font-weight: 600;
  padding-top: 15px;
  padding-bottom: 15px;
}

.card-header.bg-primary {
  background-color: #007bff !important;
}

/* 链接样式 */
a {
  color: #333;
  transition: color 0.3s ease;
}

a:hover {
  color: #007bff;
}

.text-primary {
  color: #007bff !important;
}

/* 服务平台样式 */
.service-item {
  cursor: pointer;
  transition: transform 0.3s ease;
  padding: 10px;
  border-radius: 8px;
}

.service-item:hover {
  transform: translateY(-2px);
  background-color: #f8f9fa;
}

.service-item img {
  border-radius: 8px;
  transition: transform 0.3s ease;
  max-width: 100%;
}

.service-item:hover img {
  transform: scale(1.05);
}
.service-item:hover .title {
  color: #007bff !important;
}

/* Tabbar样式 */
.tabbar {
  list-style: none;
  padding: 0;
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.tabbar-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  cursor: pointer;
  border-radius: 8px;
  margin: 4px 15px;
  position: relative;
  background-color: #e4efff;
}

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

.tabbar-item:hover {
  background: linear-gradient(87deg, rgba(22, 119, 255, 0.5) 0%, #1677ff 100%);
  color: white;
}

.tabbar-item.active {
  background: linear-gradient(87deg, rgba(22, 119, 255, 0.5) 0%, #1677ff 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.tabbar-item::after {
  position: absolute;
  top: 50%;
  right: -10px;
  transform: translateY(-50%);
  content: "▶";
  font-size: 0.8rem;
  color: transparent;
}

.tabbar-item:hover::after,
.tabbar-item.active::after {
  color: #1677ff;
}

.tabbar-content {
  display: flex;
  align-items: center;
}

.tabbar-icon {
  font-size: 1.2rem;
  margin-right: 10px;
}

.tabbar-text {
  font-size: 1rem;
  font-weight: 500;
}

/* 列表样式 */
.list-unstyled li {
  margin-left: 15px;
  margin-right: 15px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f1f1;
  position: relative;
  transition: all 0.3s ease;
}

.list-unstyled li:last-child {
  border-bottom: none;
}

.list-unstyled li:hover {
  padding-left: 20px;
}

.list-unstyled li:hover::before {
  content: "•";
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: #007bff;
  font-weight: bold;
  font-size: 1.2rem;
}

.list-unstyled li a {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  max-width: calc(100% - 100px);
}

/* 响应式设计 */
@media (max-width: 991px) {
  .navbar-brand {
    font-size: 1rem;
  }
  .navbar-brand h1 {
    font-size: 1rem;
  }
  .navbar-brand p {
    font-size: 0.42rem;
  }

  .hero-banner img {
    height: 200px;
  }

  .card-body {
    padding: 1rem;
  }

  .service-item {
    margin-bottom: 1rem;
  }

  .d-flex.justify-content-between {
    flex-direction: column;
    align-items: flex-start !important;
  }

  .text-muted.small {
    margin-top: 0.25rem;
  }

  /* 移动端tabbar样式 */
  .tabbar {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    background-color: transparent;
    border-radius: 0;
    padding: 10px 0;
    margin: 0 -15px;
    padding-left: 15px;
    padding-right: 15px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .tabbar::-webkit-scrollbar {
    display: none;
  }

  .tabbar-item {
    flex: 0 0 auto;
    min-width: 120px;
    margin: 0 8px 0 0;
    padding: 12px 20px;
    border-radius: 25px;
    border: 1px solid #e9ecef;
    background-color: white;
    white-space: nowrap;
    justify-content: center;
  }

  .tabbar-item:last-child {
    margin-right: 15px;
  }

  .tabbar-item.active {
    background: linear-gradient(90deg, #007bff 0%, #0056b3 100%);
    border-color: #007bff;
    color: white;
  }

  .tabbar-item::after {
    display: none;
  }

  .tabbar-content {
    justify-content: center;
  }

  .tabbar-icon {
    margin-right: 8px;
    font-size: 1rem;
  }

  .tabbar-text {
    font-size: 0.9rem;
  }
  .list-unstyled li a {
    max-width: 100%;
  }
  .list-unstyled li:hover {
    padding-left: 0px;
  }
  .list-unstyled li:hover::before {
    content: none;
  }

  .navbar-nav .nav-link.active::after {
    content: none;
  }
}
@media (max-width: 768px) {
  /* 服务平台竖排布局 */
  .card-body .row .col-4 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

@media (max-width: 576px) {
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }

  .hero-banner img {
    height: 150px;
  }

  .card {
    margin-bottom: 1rem;
  }

  .navbar-brand span {
    font-size: 0.9rem;
  }

  footer .col-md-6 {
    text-align: center !important;
    margin-bottom: 1rem;
  }

  /* 服务平台竖排布局 */
  .card-body .row .col-4 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

@media (min-width: 992px) {
  .navbar-expand-lg .navbar-nav .nav-link {
    padding-left: 0;
    padding-right: 0;
    margin: 0 25px;
  }
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  animation: fadeIn 0.6s ease-out;
}

/* 表格样式 */
.table > :not(caption) > * > * {
  background-color: rgba(246, 247, 250, 1);
  padding-top: 15px;
  padding-bottom: 15px;
}
.table-striped > tbody > tr:nth-of-type(odd) > * {
  --bs-table-bg-type: #fff;
}

/* 表格横向滚动优化 */
.table-responsive {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #c1c1c1 #f1f1f1;
}

.table-responsive::-webkit-scrollbar {
  height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

/* 小屏设备表格优化 */
@media (max-width: 768px) {
  .table-responsive {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
  }

  .table-responsive table {
    min-width: 800px; /* 确保表格有最小宽度，触发横向滚动 */
  }

  .table th,
  .table td {
    white-space: nowrap; /* 防止文本换行 */
    min-width: 100px; /* 设置最小列宽 */
  }

  .table th:first-child,
  .table td:first-child {
    min-width: 60px; /* 序号列较窄 */
  }

  .table th:nth-child(4),
  .table td:nth-child(4) {
    min-width: 200px; /* 工种/职业方向名称列较宽 */
  }
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

/* 打印样式 */
@media print {
  .navbar,
  footer {
    display: none;
  }

  .card {
    box-shadow: none;
    border: 1px solid #000;
  }

  a {
    color: #000 !important;
    text-decoration: none;
  }
}

/* 列表样式 */
.list-result {
  margin: 0;
  padding: 0;
  list-style-type: none;
}

.list-result .item {
  padding: 8px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  border-left: 1px solid transparent;
}

.list-result .item:hover {
  background-color: #f8f9fa;
}

.list-result .item.active {
  background: linear-gradient(135deg, #e3f2fd 0%, white 100%);
  border-left: 1px solid #2196f3;
  color: #1976d2;
  font-weight: 500;
}

.list-result .item.active:before {
  content: "";
  position: absolute;
  left: 0px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, #2196f3, #1976d2);
}

.caption {
  caption-side: top; /* 顶部 */
  text-align: center; /* 可选：标题居中 */
  background: #8d98b7;
  color: white;
}

/* 表格列等宽样式 */
.table-equal-width {
  /* table-layout: fixed; */
  border: 1px solid #dee2e6;
}

.table-equal-width th,
.table-equal-width td {
  width: auto;
  text-align: center;
  vertical-align: middle;
  border: 1px solid #dee2e6;
}

.table-custom > :not(caption) > * > * {
  padding-top: 5px;
  background: #fff;
  padding-bottom: 5px;
}
.table-custom .tr-gray td {
  background: #f6f7fa;
}
.table-custom .th-gray th {
  background: #bbc3dd;
}

/* 底部样式 */
.page-footer {
  background-color: #024586;
  border-top: 1px solid #e9ecef;
  margin-top: auto;
  color: white;
}

.page-footer a {
  color: white;
  text-decoration: none;
}
.page-footer p {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

@media (min-width: 992px) {
  .navbar-brand {
    position: absolute;
  }
}

.carousel {
  border-radius: 16px;
  overflow: hidden;
}

.card-header h6 {
  font-size: 18px;
}

.pagination {
  color: #1c264f;
}
.pagination .page-link {
  color: inherit;
}
.pagination .active > .page-link {
  color: white;
}
.pagination-jumper {
  width: 60px;
  margin-left: 10px;
  position: relative;
}
.pagination-jumper .form-control {
  padding-right: 22px;
}
.pagination-jumper .icon {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
}

.notice-content p {
  text-indent: 2em;
}

.table-custom-style {
  text-align: center;
  border: 1px solid #e7e7eb;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 10px;
  overflow: hidden;
}
.table-custom-style thead tr th {
  background-color: #f6f7fa;
  border-bottom: none;
}
.table-custom-style > :not(caption) > * > * {
  background-color: white;
}

.btn-group-custom {
  display: flex;
}
.btn-group-custom .item {
  background-color: rgba(22, 119, 255, 0.1);
  padding: 9px 15px;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
}
.btn-group-custom .item.active {
  background-color: rgba(22, 119, 255, 1);
  color: white;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  border-radius: 100px;
  background-size: 60% 60%;
  width: 30px;
  height: 30px;
}

.navbar > .container-fluid {
  padding-left: 0;
  padding-right: 0;
}
