/*
Theme Name: 123
*/

/* Global Styles */
:root {
  --bg-color: #f0f5ff;
  --text-color: #2c3e50;
  --primary-color: #3498db;
  --secondary-color: #7f8c8d;
  --shadow-light: rgba(255, 255, 255, 0.8);
  --shadow-dark: rgba(209, 217, 230, 0.8);
  --border-color: rgba(221, 230, 245, 0.5);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
}

/* Neumorphic Components */
.neumorphic {
  background: var(--bg-color);
  border-radius: 15px;
  padding: 20px;
  box-shadow:
    3px 3px 6px var(--shadow-dark),
    -3px -3px 6px var(--shadow-light);
  border: 1px solid var(--border-color);
}

.neumorphic-inset {
  background: var(--bg-color);
  border-radius: 10px;
  box-shadow:
    inset 3px 3px 6px var(--shadow-dark),
    inset -3px -3px 6px var(--shadow-light);
}

/* Typography */
h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

h2 {
  font-size: 2rem;
  margin-bottom: 0.8rem;
  color: var(--text-color);
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.6rem;
  color: var(--text-color);
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: darken(var(--primary-color), 10%);
  text-decoration: underline;
}

/* Navigation */
.navbar {
  background-color: var(--bg-color);
  padding: 1rem 0;
  box-shadow: 0 2px 10px var(--shadow-dark);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-color);
}

.navbar-nav .nav-link {
  color: var(--text-color);
  padding: 0.5rem 1rem;
  margin: 0 0.25rem;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
  box-shadow:
    inset 2px 2px 4px var(--shadow-dark),
    inset -2px -2px 4px var(--shadow-light);
}

/* Cards */
.card {
  margin-bottom: 2rem;
  border: none;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.card-img-top {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  margin-bottom: 0.75rem;
}

.card-footer {
  background-color: transparent;
  border-top: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
}

/* Article Content */
.article-content {
  font-size: 1.1rem;
  line-height: 1.8;
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 1.5rem 0;
  box-shadow:
    3px 3px 6px var(--shadow-dark),
    -3px -3px 6px var(--shadow-light);
}

.article-content p {
  margin-bottom: 1.5rem;
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 2rem;
}

.widget {
  margin-bottom: 2rem;
}

.widget-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-color);
}

/* Tag Cloud */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-cloud a {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: var(--bg-color);
  border-radius: 20px;
  font-size: 0.875rem;
  color: var(--text-color);
  box-shadow:
    2px 2px 4px var(--shadow-dark),
    -2px -2px 4px var(--shadow-light);
  transition: all 0.3s ease;
}

.tag-cloud a:hover {
  transform: scale(1.1);
  box-shadow:
    3px 3px 6px var(--shadow-dark),
    -3px -3px 6px var(--shadow-light);
  text-decoration: none;
}

/* Progress Bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), #2ecc71);
  z-index: 1000;
  transition: width 0.3s ease;
}

/* Footer */
.site-footer {
  background-color: var(--bg-color);
  padding: 2rem 0;
  margin-top: 3rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--secondary-color);
}

/* Buttons */
.btn-neumorphic {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--bg-color);
  color: var(--text-color);
  border-radius: 10px;
  box-shadow:
    3px 3px 6px var(--shadow-dark),
    -3px -3px 6px var(--shadow-light);
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-neumorphic:hover {
  text-decoration: none;
  color: var(--text-color);
}

.btn-neumorphic:active {
  box-shadow:
    inset 3px 3px 6px var(--shadow-dark),
    inset -3px -3px 6px var(--shadow-light);
}

/* Breadcrumb */
.breadcrumb {
  background-color: var(--bg-color);
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  box-shadow:
    2px 2px 4px var(--shadow-dark),
    -2px -2px 4px var(--shadow-light);
  margin-bottom: 2rem;
}

.breadcrumb-item+.breadcrumb-item::before {
  content: "/";
  color: var(--secondary-color);
}

/* Pagination */
.pagination {
  justify-content: center;
  margin-top: 3rem;
}

.page-link {
  background-color: var(--bg-color);
  border: none;
  color: var(--text-color);
  margin: 0 0.25rem;
  border-radius: 10px;
  box-shadow:
    2px 2px 4px var(--shadow-dark),
    -2px -2px 4px var(--shadow-light);
  transition: all 0.3s ease;
}

.page-link:hover {
  background-color: var(--bg-color);
  color: var(--primary-color);
  box-shadow:
    3px 3px 6px var(--shadow-dark),
    -3px -3px 6px var(--shadow-light);
}

.page-item.active .page-link {
  background-color: var(--primary-color);
  color: white;
  box-shadow:
    inset 2px 2px 4px rgba(0, 0, 0, 0.2),
    inset -2px -2px 4px rgba(255, 255, 255, 0.2);
}




/* Responsive */
@media (max-width: 768px) {

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .navbar-collapse {
    margin-top: 1rem;
  }

  .card-img-top {
    height: 150px;
  }

  .sidebar {
    position: relative;
    top: auto;
    margin-top: 3rem;
  }
}

/* Utilities */
.text-muted {
  color: var(--secondary-color);
}

.badge {
  padding: 0.25rem 0.5rem;
  background-color: var(--primary-color);
  color: white;
  border-radius: 5px;
  font-size: 0.75rem;
}

/* Animations */
@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

.badge-pulse {
  animation: pulse 2s infinite;
}

/* Accessibility */
.screen-reader-text {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Print Styles */
@media print {

  .navbar,
  .sidebar,
  .site-footer,
  .reading-progress {
    display: none;
  }

  .article-content {
    width: 100%;
  }
}

.card-body>div>p {
  /* 设置行高，用于计算高度 */
  line-height: 1.5;

  /* 固定高度为3行文字的高度 */
  height: 4.5em;
  /* 3 * 1.5 = 4.5em */

  /* 限制最多显示3行 */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;

  /* 超出部分隐藏 */
  overflow: hidden;

  /* 文字超出时显示省略号 */
  text-overflow: ellipsis;

  /* 确保文字换行 */
  word-wrap: break-word;
  word-break: break-word;
}

h3.card-title.h5 {
  /* 强制单行显示 */
  white-space: nowrap;

  /* 超出部分隐藏 */
  overflow: hidden;

  /* 显示省略号 */
  text-overflow: ellipsis;

  /* 移除文本装饰（如下划线） */
  text-decoration: none;
}

span.pseudo-H3 {
  /* 显示为块级元素 */
  display: block;

  /* 字体大小 - h3 的默认大小 */
  font-size: 1.17em;

  /* 字体粗细 */
  font-weight: bold;

  /* 外边距 - 匹配 h3 的默认边距 */
  margin-top: 1em;
  margin-bottom: 1em;
  margin-left: 0;
  margin-right: 0;

  /* 行高 */
  line-height: normal;

  /* 继承字体 */
  font-family: inherit;

  /* 文本颜色继承 */
  color: inherit;
}

/* 当 pseudo-H3 是第一个子元素时，移除顶部边距 */
span.pseudo-H3:first-child {
  margin-top: 0;
}

@media (min-width: 992px) {

  ul.navbar-nav>*:nth-child(n+6) {
    display: none;
  }
}

/* 默认手机样式 - 最大宽度100% */
img.img-fluid.rounded {
  max-width: 100%;
}

/* 平板设备 - 最小宽度768px */
@media (min-width: 768px) {
  img.img-fluid.rounded {
    max-width: 66%;
  }
}

/* 电脑设备 - 最小宽度992px */
@media (min-width: 992px) {
  img.img-fluid.rounded {
    max-width: 33%;
  }
}