/*
Theme Name: 甲秀又一村
Template: twentytwentyfive
Version: 1.1.0
*/

* {
  box-sizing: border-box;
}

body {
  background: #f4efe3;
  color: #2f2a22;
  font-family: "Noto Serif SC", "Songti SC", "SimSun", serif;
}

a {
  color: #8f2f23;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.jx-site {
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(143,47,35,.05) 1px, transparent 1px),
    linear-gradient(#f8f3e8, #efe5d2);
  background-size: 44px 44px, auto;
}

.jx-header {
  border-bottom: 1px solid rgba(93, 67, 40, .18);
  background: rgba(250, 246, 237, .92);
}

.jx-header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 22px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.jx-brand {
  min-width: 0;
}

.jx-logo-link {
  display: inline-flex;
  text-decoration: none;
}

.jx-logo {
  display: block;
  width: min(430px, 54vw);
  height: auto;
}

.jx-subtitle {
  margin: 6px 0 0;
  color: #76644d;
  font-size: 16px;
}

.jx-header-meta {
  min-width: 178px;
  padding: 12px 16px;
  border-left: 1px solid rgba(93, 67, 40, .22);
  color: #5d4a35;
  text-align: right;
  line-height: 1.55;
  font-size: 14px;
  white-space: nowrap;
}

.jx-header-meta p {
  margin: 0;
}

.jx-header-meta p:first-child {
  font-weight: 700;
  color: #3f3327;
}

.jx-layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 22px 54px;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.jx-sidebar {
  position: sticky;
  top: 18px;
  padding: 16px;
  border: 1px solid rgba(93, 67, 40, .22);
  background: rgba(255, 252, 245, .78);
  overflow: hidden;
}

.jx-sidebar h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.jx-write-button,
.jx-share-copy,
.jx-share-weibo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid #8f2f23;
  background: #8f2f23;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  font-size: 14px;
}

.jx-write-button {
  width: auto;
  max-width: 100%;
  margin-bottom: 16px;
}

.jx-year {
  border-top: 1px solid rgba(93, 67, 40, .16);
  padding: 8px 0;
  font-size: 13.5px;
}

.jx-year summary {
  cursor: pointer;
  color: #493a2a;
  font-weight: 700;
}

.jx-year ul {
  margin: 8px 0 0;
  padding-left: 16px;
}

.jx-year li {
  margin: 6px 0;
  line-height: 1.35;
}

.jx-post-card {
  padding: 24px 0 28px;
  border-bottom: 1px solid rgba(93, 67, 40, .18);
}

.jx-post-card h2,
.jx-single h1 {
  margin-top: 0;
  line-height: 1.25;
}

.jx-meta {
  color: #7a6a56;
  font-size: 14px;
}

.jx-post-card .wp-block-post-excerpt__excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 30;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.8;
}

.jx-post-card .wp-block-post-excerpt__more-link {
  margin-top: 10px;
  display: inline-flex;
  color: #8f2f23;
  font-weight: 700;
}

.jx-single {
  background: rgba(255, 252, 245, .72);
  border: 1px solid rgba(93, 67, 40, .16);
  padding: 28px;
}

.jx-single-content {
  line-height: 1.9;
  font-size: 18px;
}

.jx-share {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid rgba(93, 67, 40, .18);
}

.jx-share-title {
  margin: 0 0 12px;
  font-weight: 700;
}

.jx-share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.jx-wechat-qr {
  margin-top: 14px;
  display: none;
}

.jx-wechat-qr img {
  width: 160px;
  height: 160px;
  border: 8px solid #fffaf0;
  box-shadow: 0 8px 28px rgba(50, 35, 20, .12);
}

@media (max-width: 820px) {
  .jx-header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .jx-logo {
    width: min(390px, 86vw);
  }

  .jx-header-meta {
    width: 100%;
    min-width: 0;
    border-left: 0;
    border-top: 1px solid rgba(93, 67, 40, .18);
    padding: 10px 0 0;
    text-align: left;
  }

  .jx-layout {
    grid-template-columns: 1fr;
  }

  .jx-sidebar {
    position: static;
  }

  .jx-single {
    padding: 20px;
  }
}

/* Refinements: article scale and Shanghai lane header texture */
.jx-header {
  position: relative;
  overflow: hidden;
}

.jx-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/wp-content/themes/jiaxiu-classic/assets/jiaxiu-header-shanghai-lilong.png");
  background-size: cover;
  background-position: center right;
  opacity: .16;
  filter: sepia(.24) contrast(.88);
  pointer-events: none;
}

.jx-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(250,246,237,.9) 0%, rgba(250,246,237,.72) 52%, rgba(250,246,237,.58) 100%);
  pointer-events: none;
}

.jx-header-inner {
  position: relative;
  z-index: 1;
}

.jx-post-card h2 {
  font-size: clamp(28px, 3.2vw, 42px);
  font-weight: 800;
}

.jx-post-card .wp-block-post-excerpt__excerpt {
  font-size: clamp(20px, 2.1vw, 28px);
  line-height: 1.72;
}

.jx-post-card .wp-block-post-excerpt__more-link {
  font-size: clamp(19px, 1.9vw, 24px);
  font-weight: 800;
}

@media (max-width: 820px) {
  .jx-post-card h2 {
    font-size: 28px;
  }

  .jx-post-card .wp-block-post-excerpt__excerpt {
    font-size: 20px;
  }

  .jx-post-card .wp-block-post-excerpt__more-link {
    font-size: 18px;
  }
}

/* Show a fuller home-page excerpt: about 8-9 lines */
.jx-post-card .wp-block-post-excerpt__excerpt {
  -webkit-line-clamp: 9;
}

/* Final readability and header fixes */
.jx-header::before,
.jx-header::after {
  display: none;
}

.jx-header-inner {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.jx-header-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/wp-content/themes/jiaxiu-classic/assets/jiaxiu-header-shanghai-lilong.png");
  background-size: cover;
  background-position: center right;
  opacity: .24;
  filter: sepia(.22) contrast(.92);
  z-index: -2;
}

.jx-header-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(250,246,237,.94) 0%, rgba(250,246,237,.78) 48%, rgba(250,246,237,.58) 100%);
  z-index: -1;
}

.jx-post-card h2 {
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 800;
}

.jx-custom-excerpt,
.jx-post-card .wp-block-post-excerpt__excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 9;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: clamp(17px, 1.65vw, 23px);
  line-height: 1.72;
  margin: 18px 0 0;
}

.jx-post-card .wp-block-read-more,
.jx-post-card .wp-block-post-excerpt__more-link {
  display: inline-flex;
  margin-top: 12px;
  color: #8f2f23;
  font-size: clamp(16px, 1.45vw, 20px);
  font-weight: 800;
}

.jx-sidebar {
  font-size: 15px;
}

.jx-sidebar h2 {
  font-size: 20px;
}

.jx-write-button {
  font-size: 15.5px;
  min-height: 38px;
}

.jx-year {
  font-size: 14.5px;
}

@media (max-width: 820px) {
  .jx-post-card h2 {
    font-size: 25px;
  }

  .jx-custom-excerpt,
  .jx-post-card .wp-block-post-excerpt__excerpt {
    font-size: 18px;
  }

  .jx-post-card .wp-block-read-more,
  .jx-post-card .wp-block-post-excerpt__more-link {
    font-size: 16px;
  }
}

/* Make the Shanghai lane header background clearly visible */
.jx-header-inner::before {
  opacity: .62;
  filter: sepia(.12) contrast(1.06) saturate(.9);
}

.jx-header-inner::after {
  background: linear-gradient(90deg, rgba(250,246,237,.78) 0%, rgba(250,246,237,.52) 46%, rgba(250,246,237,.22) 100%);
}

/* Make Shanghai date/weather clearer over the header image */
.jx-header-meta {
  color: #8f2f23;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.62;
  background: rgba(250, 246, 237, .54);
  padding: 12px 16px;
  border-left: 1px solid rgba(143, 47, 35, .35);
  text-shadow: 0 1px 0 rgba(255, 250, 240, .8);
}

.jx-header-meta p:first-child {
  color: #8f2f23;
}

@media (max-width: 820px) {
  .jx-header-meta {
    font-size: 16px;
    background: rgba(250, 246, 237, .62);
  }
}

/* Account links in sidebar */
.jx-account-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.jx-account-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #8f2f23;
  background: #8f2f23;
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
}

.jx-account-links span {
  display: none;
}

/* Mobile reading order: posts first, archive/sidebar after content */
@media (max-width: 820px) {
  .jx-layout > main {
    order: 1;
  }

  .jx-layout > .jx-sidebar {
    order: 2;
  }
}

/* Archive title search */
.jx-archive-search {
  margin: 0 0 12px;
}

.jx-archive-search input {
  width: 100%;
  min-height: 36px;
  border: 1px solid rgba(143, 47, 35, .28);
  background: rgba(255, 252, 245, .9);
  color: #493a2a;
  padding: 0 10px;
  font-family: inherit;
  font-size: 14.5px;
  outline: none;
}

.jx-archive-search input:focus {
  border-color: #8f2f23;
  box-shadow: 0 0 0 2px rgba(143, 47, 35, .12);
}

.jx-archive-search input::placeholder {
  color: #9a8064;
}
