/* p2 主题 - 霞光下的思念（基于 WordPress P2 Child 主题） */

/* 重置 */
*{margin:0;padding:0;box-sizing:border-box}

body {
  background: #f1f1f1 url(../images/body-bg3.png) repeat left fixed;
  font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft YaHei", sans-serif;
  font-size: 62.5%;
  color: #555;
  line-height: 1.5;
}

a { color: #3478e3; text-decoration: none; }
a:hover { color: #d54e21; border-bottom: 1px solid #bbb; }
a img { border: 0; }

.right {
  float: right;
}

/* ==================== 头部 ==================== */
#header {
  /* width: 980px; */
  width: 760px;
  margin: 0 auto;
  position: relative;
  min-height: 120px;
  background: #fff url(../images/flower.jpg) no-repeat top center;
  -webkit-box-shadow: 1px 1px 5px rgba(0,0,0,0.2);
  -moz-box-shadow: 1px 1px 5px rgba(0,0,0,0.2);
  box-shadow: 1px 1px 5px rgba(0,0,0,0.2);
}

#header .sleeve {
  display: inline-block;
  margin: 20px auto;
}

#header h1 {
  display: inline-block;
  padding: 8px 10px;
  font-size: 40px;
  line-height: 1em;
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 200;
}

#header h1 a, #header h1 a:visited {
  color: #3478e3;
}
#header h1 a:hover { border: 0; color: #d54e21; }

#header small {
  display: block;
  clear: both;
  margin-top: -3px;
  padding: 0 12px 12px 12px;
  font-size: 13px;
  line-height: 1.2em;
  color: #3478e3;
}

/* ==================== 导航菜单 ==================== */
.menu {
  clear: both;
  float: left;
  margin: 10px 0;
  width: 100%;
}

.menu a {
  display: inline-block;
  padding: 0 10px;
  line-height: 40px;
  color: #666;
  font-size: 14px;
}
.menu a:hover {
  border: 0;
  background: #fff;
}
.menu a.current_page_item {
  color: #3478e3;
}

/* 父容器相对定位，以便子菜单绝对定位相对于它 */
.menu-item-has-children {
  position: relative;
  display: inline-block; /* 或者 block，视你的导航栏布局而定 */
}

/* 子菜单默认隐藏 */
.menu-item-has-children .sub-menu {
  display: none;
  position: absolute;
  top: 100%; /* 在父元素正下方 */
  left: -2px;
  background-color: #ffffff;
  border: 1px solid #ddd;
  min-width: 200px;
  z-index: 999;
  padding: 0;
  margin: 0;
  list-style: none;
  box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.2);
}

/* 鼠标悬停在父容器上时，显示子菜单 */
.menu-item-has-children:hover .sub-menu {
  display: block;
}

/* 子菜单内部样式 */
.menu-item-has-children .sub-menu li {
    border-top: 1px solid #ddd;
    font-size: 12px;
    white-space: normal;
    width: 200px;
}
.menu-item-has-children .sub-menu li a {
  display: block;
  padding: 6px 10px;
  color: #333;
  text-decoration: none;
  line-height: 1.6;
}

.menu-item-has-children .sub-menu li a:hover {
  background-color: #eee;
}

/* ==================== 主容器 ==================== */
#wrapper {
  /* width: 978px; */
  width: 758px;
  margin: 0 auto;
  margin-top: 20px;
  background: #fff;
  border: 1px solid #fff;
  position: relative;
  overflow: hidden;
  -webkit-box-shadow: 1px 1px 5px rgba(0,0,0,0.2);
  -moz-box-shadow: 1px 1px 5px rgba(0,0,0,0.2);
  box-shadow: 1px 1px 5px rgba(0,0,0,0.2);
}

.sleeve_main {
  /* margin-right: 242px; */
  background: #fff;
}

#main {
  padding: 0 14px 10px;
  font-size: 13px;
  background: #fff;
}

#main p, #main ul, #main ol {
  font-size: 1em;
  line-height: 1.5em;
  color: #555;
}

#main p { margin: 0.7em 0; }

#main img {
  max-width: 100%;
  height: auto;
  vertical-align: top;
  padding: 2px;
  border: 1px solid #eee;
}

/* ==================== 文章列表 ==================== */
#main ul#postlist {
  list-style: none;
  /* margin-top: 16px; */
  margin-left: 0;
  overflow: hidden;
}

#main ul#postlist li {
  border-top: 1px solid #bbb;
  padding: 14px 0 0;
  overflow: visible;
}

#main ul#postlist li.archive {
  border-top: 1px dashed #eee;
}

#main ul#postlist li:first-child {
  border-top: 0;
}

#main h2 {
  font-size: 28px;
  font-weight: normal;
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 500;
  color: #555;
  /* padding-top: 10px; */
  padding-bottom: 5px;
  line-height: 1.1em;
  position: relative;
}

#main h2 a { color: #3478e3; }
#main h2 a:hover { color: #d54e21; border: 0; }

.meta {
  color: #888;
  font-size: 0.85em;
  margin: 0.7em 0;
}
.meta a { color: #888; border: 0; }
.meta a:hover { color: #d54e21; }

/* ==================== 文章内容 ==================== */
.postcontent {
  overflow: visible;
  /* padding-left: 60px; */
  font-size: 16px;
  color: #555;
  line-height: 1.6;
}

.postcontent .title {
  padding: 10px 0 5px;
  font-size: 1.8em;
  font-weight: 500;
}

.postcontent p {
  margin: 0.7em 0;
  line-height: 1.6;
  color: #555;
}

.postcontent img {
  max-width: 100%;
  height: auto;
  padding: 2px;
  border: 1px solid #eee;
  vertical-align: top;
}

.postcontent blockquote {
  padding-left: 8px;
  color: #888;
  background: #f1f1f1;
  padding: 2px 12px;
  margin: 0.7em 0;
}

.postcontent blockquote p { margin: 0; }

.postcontent h1, .postcontent h2, .postcontent h3,
.postcontent h4, .postcontent h5, .postcontent h6 {
  margin-top: 0.3em;
  margin-bottom: 0.3em;
  padding: 5px 0;
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.postcontent h1 { font-size: 2em; font-weight: 500; }
.postcontent h2 { font-size: 1.8em; font-weight: 500; color: #555; }
.postcontent h3 { font-size: 1.6em; font-weight: 500; color: #555; }
.postcontent h4 { font-size: 1.4em; font-weight: 500; margin-left: 0; }
.postcontent h5 { font-size: 1.3em; }
.postcontent h6 { font-size: 1.2em; }

.postcontent ul, .postcontent ol {
  margin: 10px 0 22px 20px !important;
}
.postcontent li {
  border: 0 !important;
  padding: 2px 0 0 !important;
  display: list-item;
}

.postcontent a { color: #3478e3; }
.postcontent a:hover { color: #d54e21; }

.bottom-of-entry {
  display: block;
  margin-bottom: 1px;
  overflow: hidden;
  width: 100%;
  height: 9px;
}

.more-link {
  display: inline-block;
  margin: 0 0 14px 0;
  font-size: 13px;
  color: #3478e3;
}
.more-link:hover { color: #d54e21; }

.archive-title {
  margin-top: 14px;
  border-bottom: 1px solid #ccc;
}

/* ==================== 分页 ==================== */
.page-nav {
  clear: both;
  overflow: hidden;
  border-top: 1px solid #bbb;
  margin-top: 16px;
  padding-top: 10px;
}

.page-nav p {
  float: left;
  width: 50%;
  margin: 0;
}
.page-nav p.nav-older { float: right; text-align: right; }

.page-nav a { color: #3478e3; font-size: 13px; }
.page-nav a:hover { color: #d54e21; }

/* ==================== 文章导航 ==================== */
.navigation {
  clear: both;
  overflow: hidden;
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px solid #bbb;
}
.navigation p { float: left; width: 50%; margin: 0; }
.navigation p.nav-newer { float: right; text-align: right; }
.navigation a { color: #3478e3; font-size: 13px; }
.navigation a:hover { color: #d54e21; }

/* ==================== 页脚 ==================== */
#footer {
  /* width: 978px; */
  width: 758px;
  margin: 20px auto 0;
  border: 1px solid #fff;
  background: #fff;
  -webkit-box-shadow: 1px 1px 5px rgba(0,0,0,0.2);
  -moz-box-shadow: 1px 1px 5px rgba(0,0,0,0.2);
  box-shadow: 1px 1px 5px rgba(0,0,0,0.2);
  clear: both;
}

#footer p {
  margin: 10px 15px;
  font-size: 13px;
  color: #777;
}

#footer a { color: #3478e3; }
#footer a:hover { color: #d54e21; }

/* ==================== 标签云 (手动实现版 - 中线对齐/无背景/多色) ==================== */
.custom-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px; /* 标签间距 */
  padding: 20px;
  justify-content: center;
  align-items: center; /* Flex 容器内的行之间垂直居中 */
  line-height: 1; /* 基础行高 */
}

.custom-tag-cloud a.my-tag-link {
  display: inline-block; /* 允许设置宽高和 vertical-align */
  vertical-align: middle; /* 关键：实现不同字号的中线对齐 */
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 0 2px; /* 去除上下 padding，左右少量留白，避免背景感 */
  border-radius: 2px;

  /* 确保没有背景色 */
  background-color: transparent !important;

  /* 颜色由 EJS 内联样式控制，这里不设置 color */
}

/* 悬停效果：仅加粗或轻微放大，保持无背景 */
.custom-tag-cloud a.my-tag-link:hover {
  transform: scale(1.15);
  opacity: 0.8; /* 或者稍微变淡 */
  border-bottom: none !important; /* 覆盖全局 a:hover 的下划线 */
  text-shadow: 0 1px 2px rgba(0,0,0,0.1); /* 可选：增加一点立体感 */
}

/* ==================== 响应式 ==================== */
@media (max-width: 980px) {
  #header, #wrapper, #footer { width: 100%; }
  .sleeve_main { margin-right: 0; }
  #sidebar { float: none; width: 100%; padding: 10px; }
  .postcontent { padding-left: 0; }
  .more-link { margin-left: 0; }
}

@media (max-width: 480px) {
  #header h1 { font-size: 28px; }
  .menu a { line-height: 30px; padding: 0 8px; font-size: 12px; }
  #main { padding: 10px; }
}
