/*
Theme Name: Chicilon Media
Theme URI: https://chicilonmedia.com/
Author: Chicilon AI Design Center
Author URI: https://chicilonmedia.com/
Description: Chicilon Media 品牌官网传统 WordPress 定制主题。完整保留 1440px 精细动效画板、桌面/移动端自适应双版式、NEX Brain™ 滚动交互叙事、C5A/CRA 双方案互动卡片，并深度集成 WordPress 菜单、文章系统、媒体库、自定义器与元数据管理。
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: chicilon-media
Tags: custom-logo, custom-menu, featured-images, full-width-template, one-column, theme-options
*/

/* ==========================================================================
   WordPress Core & Admin Bar Compatibility
   ========================================================================== */
body.admin-bar .sitenav {
  top: calc(32px + 16px * var(--s, .85));
}

body.admin-bar .mb-bar {
  top: calc(var(--mb-admin-offset, 0px) + max(8px, env(safe-area-inset-top)));
}

@media (max-width: 900px), (pointer: coarse) and (max-width: 1100px) {
  body.admin-bar .sitenav,
  body.admin-bar .mb-bar {
    top: calc(var(--mb-admin-offset, 0px) + max(8px, env(safe-area-inset-top)));
  }
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: #fbf4e9;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(52, 34, 27, 0.2);
  clip: auto !important;
  clip-path: none;
  color: #961e20;
  display: block;
  font-size: 14px;
  font-weight: 700;
  height: auto;
  left: 12px;
  line-height: normal;
  padding: 12px 18px;
  text-decoration: none;
  top: 12px;
  width: auto;
  z-index: 100000;
}

/* WordPress Custom Logo sizing inside .sitenav */
.sitenav .sn-logo .custom-logo-link {
  display: block;
  line-height: 0;
}

.sitenav .sn-logo img.custom-logo,
.sitenav .sn-logo img {
  display: block;
  width: 102px;
  height: 38px;
  object-fit: contain;
}

/* WordPress Menu Active States in .sitenav */
.sitenav li.current-menu-item > a,
.sitenav li.current-menu-ancestor > a,
.sitenav li.current_page_item > a,
.sitenav li.current_page_parent > a,
.sitenav li a[aria-current="page"],
.sitenav li a[aria-current="location"] {
  background: rgba(150, 30, 32, 0.11);
  color: #961e20;
}

/* Dynamic text inside News cards / client-edited headlines */
.copy .line.dynamic-line {
  white-space: normal;
}

.news-story-link .news-story-title {
  justify-content: flex-start;
}

.news-story-link .news-story-title .dynamic-line {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-feature-link .copy[data-i="44"] {
  justify-content: flex-start;
}

.news-feature-link .copy[data-i="44"] .dynamic-line {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* WordPress Editor Content Polish inside .reading-body */
.reading-body h3 {
  margin: 1.35em 0 0.45em;
  font-size: clamp(19px, 1.55vw, 24px);
  line-height: 1.45;
  letter-spacing: -0.02em;
}

.reading-body ul,
.reading-body ol {
  margin: 0.9em 0 0;
  padding-left: 1.35em;
  font-size: clamp(16px, 1.12vw, 19px);
  line-height: 1.9;
  color: #453930;
}

.reading-body li + li {
  margin-top: 0.35em;
}

.reading-body blockquote {
  margin: 1.4em 0;
  padding: 16px 22px;
  border-left: 3px solid #961e20;
  background: rgba(255, 250, 242, 0.8);
  border-radius: 0 14px 14px 0;
  color: #453930;
}

.reading-body img {
  max-width: 100%;
  height: auto;
  border-radius: 18px;
}

.reading-body figure {
  margin: 1.5em 0;
}

.reading-body figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: #64554c;
}

.aligncenter {
  display: block;
  margin-inline: auto;
}

.alignleft {
  float: left;
  margin: 0.4em 1.5em 1em 0;
}

.alignright {
  float: right;
  margin: 0.4em 0 1em 1.5em;
}

/* ==========================================================================
   Editorial Archive / Category / Search / Standard Page / 404 Layouts
   ========================================================================== */
.editorial-shell {
  min-height: calc(100vh - 110px);
  color: #261e19;
  background: radial-gradient(ellipse at 92% 14%, #f9e2c8 0, transparent 42%), #fbf4e9;
  padding: clamp(108px, 9.5vw, 156px) max(6vw, env(safe-area-inset-left), env(safe-area-inset-right)) 64px;
}

.editorial-inner {
  max-width: 1180px;
  margin-inline: auto;
}

.editorial-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  color: #961e20;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.editorial-kicker::before {
  content: "";
  width: 28px;
  height: 2px;
  background: currentColor;
}

.editorial-title {
  margin: 0;
  font-size: clamp(36px, 4.6vw, 68px);
  line-height: 1.15;
  letter-spacing: -0.04em;
  color: #181310;
}

.editorial-desc {
  max-width: 40em;
  margin: 18px 0 0;
  font-size: clamp(16px, 1.3vw, 20px);
  line-height: 1.75;
  color: #5b4c42;
}

.editorial-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.editorial-cats a {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(150, 30, 32, 0.18);
  background: rgba(255, 250, 242, 0.72);
  color: #3f332b;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.editorial-cats a:hover,
.editorial-cats a[aria-current="page"] {
  background: #961e20;
  border-color: #961e20;
  color: #fffaf2;
}

.editorial-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.editorial-card {
  display: flex;
  flex-direction: column;
  padding: 12px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: rgba(255, 250, 242, 0.72);
  box-shadow: 0 20px 40px rgba(76, 42, 25, 0.09);
  color: inherit;
  text-decoration: none;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.editorial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 48px rgba(76, 42, 25, 0.14);
}

.editorial-card-media {
  overflow: hidden;
  border-radius: 20px;
  aspect-ratio: 4 / 3.15;
  background: #ebe0d1;
}

.editorial-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.editorial-card:hover .editorial-card-media img {
  transform: scale(1.03);
}

.editorial-card-body {
  padding: 16px 12px 14px;
}

.editorial-card-meta {
  margin: 0;
  font-size: 13px;
  color: #6b5b50;
}

.editorial-card-title {
  margin: 8px 0 0;
  font-size: 20px;
  line-height: 1.4;
  color: #16110e;
  transition: color 0.2s ease;
}

.editorial-card:hover .editorial-card-title {
  color: #961e20;
}

.editorial-card-excerpt {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.65;
  color: #5c4e44;
}

.editorial-pagination {
  margin-top: 44px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.editorial-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.85);
  border: 1px solid rgba(150, 30, 32, 0.16);
  color: #2c221c;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.editorial-pagination .page-numbers.current,
.editorial-pagination a.page-numbers:hover {
  background: #961e20;
  border-color: #961e20;
  color: #fff;
}

.editorial-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.editorial-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  background: #961e20;
  color: #fffaf2;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.editorial-btn:hover {
  background: #7b1719;
}

.editorial-btn--ghost {
  background: rgba(255, 250, 242, 0.85);
  border: 1px solid rgba(150, 30, 32, 0.28);
  color: #961e20;
}

.editorial-btn--ghost:hover {
  background: rgba(150, 30, 32, 0.08);
}

.editorial-search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
  max-width: 540px;
}

.editorial-search-form input[type="search"] {
  flex: 1 1 260px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid #d3c2b2;
  background: #fffaf2;
  font: inherit;
  font-size: 15px;
  color: #201915;
}

.editorial-search-form button {
  border: 0;
  cursor: pointer;
}

.doc-footer {
  width: min(86%, 1390px);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px clamp(20px, 3vw, 44px);
  padding: 16px 0 26px;
  border-top: 1px solid #d3c2b2;
  color: #68584c;
}

.doc-footer nav {
  display: flex;
  flex-wrap: wrap;
  column-gap: clamp(14px, 2vw, 34px);
}

.doc-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  font-size: 14px;
  color: inherit;
}

.doc-footer a:hover {
  color: #961e20;
  text-decoration: underline;
}

.doc-footer img {
  display: block;
  width: 93px;
  height: auto;
}

.doc-footer small {
  margin-inline-start: auto;
}

.reading-page--single-page article {
  display: block;
  max-width: 820px;
}

.reading-page--single-page .reading-body {
  width: 100%;
  margin-top: 32px;
  padding-top: 12px;
}

@media (max-width: 960px) {
  .editorial-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .editorial-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .doc-footer,
  .contact-footer {
    width: calc(100% - 28px);
    margin: 32px auto 24px;
    padding: 20px 18px 16px;
    border-top: 0;
    border-radius: 24px;
    background: rgba(255, 250, 242, 0.90);
    border: 1px solid rgba(255, 255, 255, 0.94);
    box-shadow: 0 14px 34px rgba(76, 42, 25, 0.08);
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .doc-footer nav,
  .contact-footer nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(115, 84, 64, 0.12);
  }
  .doc-footer a,
  .contact-footer a {
    min-height: 38px;
  }
  .doc-footer small,
  .contact-footer small {
    width: 100%;
    margin: 0;
    padding-top: 12px;
    border-top: 1px solid rgba(115, 84, 64, 0.12);
    font-size: 12px;
    color: #7c6b5f;
  }
}
