/*
 * XXTU RiPro Polish NavFix
 * 安全原则：不修改 header / logo / navbar / main-menu / mobile-menu 的布局。
 * 只美化内容区、卡片、分类筛选、详情页、侧边栏、分页、按钮、表单、页脚。
 */
:root{
  --xxtu-bg:#f6f2ed;
  --xxtu-bg-2:#fffaf5;
  --xxtu-card:#ffffff;
  --xxtu-text:#25212a;
  --xxtu-muted:#817783;
  --xxtu-line:rgba(53,42,58,.11);
  --xxtu-soft:#fff2e6;
  --xxtu-accent:#a96650;
  --xxtu-accent-2:#7d5691;
  --xxtu-deep:#312735;
  --xxtu-shadow:0 18px 46px rgba(72,51,63,.12);
  --xxtu-shadow-sm:0 10px 26px rgba(72,51,63,.09);
  --xxtu-radius:22px;
}

html{scroll-behavior:smooth;}
body{
  color:var(--xxtu-text);
  background:
    radial-gradient(circle at 12% -8%, rgba(255,207,172,.36), transparent 30%),
    radial-gradient(circle at 92% 5%, rgba(171,142,205,.20), transparent 28%),
    linear-gradient(180deg,#fbf7f1 0%,#f3eee8 44%,#f8f4ef 100%);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
a{transition:color .18s ease,background .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease,opacity .18s ease;}
a:hover{text-decoration:none;}
::selection{background:rgba(169,102,80,.20);color:#211722;}

/* 顶部导航、移动菜单保持父主题原生行为，不重置 transform，避免手机侧栏无法关闭。 */

/* Search - 只处理搜索框本身，不改变导航布局 */
.main-search,
.search-form.inline,
.search-form{
  border-radius:999px!important;
}
.search-form.inline,
.search-form{
  background:#fff;
  border:1px solid rgba(95,72,76,.12);
  box-shadow:0 12px 30px rgba(55,39,50,.08);
  overflow:hidden;
}
.search-field.inline-field,
.search-form .search-field,
.search-form input[type="search"],
.search-form input[type="text"]{
  background:#fff!important;
  color:var(--xxtu-text)!important;
  border:0!important;
  min-height:44px;
}
.search-submit,
.search-form .search-submit,
.search-form button[type="submit"]{
  border-radius:999px!important;
  background:linear-gradient(135deg,#9d604f,#75508e)!important;
  color:#fff!important;
  box-shadow:0 8px 18px rgba(126,75,153,.20);
  border:0!important;
}
.search-submit:hover,
.search-form button[type="submit"]:hover{filter:brightness(.97);}

/* Home sections */
.site-content{position:relative;}
.section{background:transparent!important;}
.section.bgcolor-fff{background:transparent!important;}
.section-title,
.module-title,
h3.section-title{
  color:var(--xxtu-deep)!important;
  font-weight:900!important;
  letter-spacing:.02em;
  margin-bottom:22px!important;
}
.section-title span,
.module-title span{
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.section-title span:before,
.module-title span:before{
  content:"";
  width:10px;height:24px;
  border-radius:99px;
  background:linear-gradient(180deg,var(--xxtu-accent),var(--xxtu-accent-2));
  box-shadow:0 8px 18px rgba(169,102,80,.22);
}

/* Post cards */
.post-grid,
.post-list,
.post,
.category-box,
.widget,
.entry-wrapper,
.author-box,
.related-posts .post,
.post-list .entry-wrapper{
  border-radius:var(--xxtu-radius)!important;
}
.post-grid,
.post-list,
.category-box,
.widget{
  background:rgba(255,255,255,.88)!important;
  border:1px solid rgba(77,60,72,.10)!important;
  box-shadow:var(--xxtu-shadow-sm)!important;
  overflow:hidden;
}
.post-grid:hover,
.post-list:hover,
.category-box:hover,
.widget:hover{
  transform:translateY(-3px);
  box-shadow:0 22px 52px rgba(73,48,62,.14)!important;
}
.post-grid .entry-media,
.post-grid .entry-thumbnail,
.post-grid .thumbnail,
.post-list .entry-media,
.post-list .entry-thumbnail,
.category-box .thumbnail,
.entry-thumbnails .thumbnail,
.entry-thumbnails-17codesign,
.entry-thumbnails-17codesign .thumbnail-17codesign{
  border-radius:18px!important;
  overflow:hidden;
  background:#eee6dd;
}
.post-grid img,
.post-list img,
.entry-thumbnail img,
.thumbnail img,
.category-box img{
  transition:transform .42s ease,filter .42s ease,opacity .25s ease;
}
.post-grid:hover img,
.post-list:hover img,
.category-box:hover img{
  transform:scale(1.035);
  filter:saturate(1.03) contrast(1.02);
}
.post-grid .entry-wrapper,
.post-list .entry-wrapper{
  background:transparent!important;
  padding:16px!important;
}
.entry-title,
.entry-title a,
.post-grid .entry-title a,
.post-list .entry-title a{
  color:#2c2530!important;
  font-weight:800!important;
  line-height:1.36!important;
}
.entry-title a:hover{color:var(--xxtu-accent)!important;}
.entry-meta,
.entry-meta a,
.entry-footer,
.post-grid .entry-excerpt,
.post-list .entry-excerpt{
  color:var(--xxtu-muted)!important;
}
.entry-meta .dot{opacity:.45;}

/* Buttons and commerce actions - 避开导航菜单，只处理内容区按钮 */
.site-content .button,
.site-content .btn,
.site-content .wp-block-button__link,
.site-content .go-download,
.site-content .downbtn,
.site-content .entry-footer a,
.site-content .pagination .nav-links a,
.site-content .pagination a,
.site-content .page-numbers,
.site-content .filter-tag a,
.site-content .filter-tab a,
.site-content .tags a,
.site-content .post-tags a,
.single .button,
.single .btn,
.single .wp-block-button__link{
  border-radius:999px!important;
}
.site-content .button,
.site-content .btn,
.site-content .wp-block-button__link,
.site-content .go-download,
.site-content .downbtn,
.single .button,
.single .btn,
.single .wp-block-button__link{
  border:0!important;
  background:linear-gradient(135deg,#fff7ef,#f1ded4)!important;
  color:#553442!important;
  box-shadow:0 10px 22px rgba(106,75,78,.10)!important;
  font-weight:800!important;
}
.site-content .button:hover,
.site-content .btn:hover,
.site-content .wp-block-button__link:hover,
.site-content .go-download:hover,
.site-content .downbtn:hover,
.single .button:hover,
.single .btn:hover,
.single .wp-block-button__link:hover{
  background:linear-gradient(135deg,#9d604f,#75508e)!important;
  color:#fff!important;
  transform:translateY(-2px);
  box-shadow:0 16px 30px rgba(112,70,142,.20)!important;
}

/* Filter / category bars */
.filter--content,
.term-bar,
.breadcrumbs{
  border-radius:24px!important;
  overflow:hidden;
  border:1px solid rgba(77,60,72,.10);
  box-shadow:var(--xxtu-shadow-sm);
}
.filter--content{
  background:rgba(255,255,255,.78)!important;
  padding:18px!important;
}
.filter-tag span{color:#4c3a4f!important;font-weight:900!important;}
.filter-tag a,
.filter-tab a{
  background:#fff!important;
  border:1px solid rgba(91,68,82,.12)!important;
  color:#675b68!important;
  padding:7px 13px!important;
  margin:4px 5px!important;
  font-weight:700;
}
.filter-tag a:hover,
.filter-tag a.on,
.filter-tab a.on,
.filter-tab a:hover{
  color:#fff!important;
  background:linear-gradient(135deg,#9d604f,#75508e)!important;
  border-color:transparent!important;
  box-shadow:0 10px 20px rgba(126,75,153,.16);
}
.term-bar{background-color:#302735!important;}
.term-bar:before{background:linear-gradient(135deg,rgba(34,22,38,.70),rgba(127,75,156,.46))!important;}
.term-title{color:#fff!important;font-weight:900!important;letter-spacing:.03em;}
.breadcrumbs{
  background:rgba(255,255,255,.78);
  padding:13px 18px!important;
  color:var(--xxtu-muted);
}
.breadcrumbs a{color:#6d4b7d!important;font-weight:700;}

/* Single page */
.article-content,
.single .content-area,
.single .entry-wrapper{
  background:rgba(255,255,255,.92)!important;
  border:1px solid rgba(77,60,72,.10)!important;
  box-shadow:var(--xxtu-shadow)!important;
  border-radius:28px!important;
}
.single .entry-wrapper{padding:28px!important;}
.single .entry-content,
.single .u-text-format{
  color:#302a32!important;
  font-size:16px;
  line-height:1.9;
}
.single .entry-content img{
  border-radius:18px;
  box-shadow:0 12px 36px rgba(66,45,56,.14);
}
.single .entry-title{
  font-size:clamp(26px,3vw,40px)!important;
  letter-spacing:-.02em;
}
#pay-single-box,
.pay-single-box,
.vip-price-box,
.down-box{
  border-radius:24px!important;
  border:1px solid rgba(126,75,153,.12)!important;
  background:linear-gradient(135deg,rgba(255,247,239,.94),rgba(249,241,255,.94))!important;
  box-shadow:0 16px 42px rgba(86,55,72,.12)!important;
}
.fenye span,
.fenye a{
  border-radius:999px!important;
  border:1px solid rgba(91,68,82,.12)!important;
  background:#fff!important;
  color:var(--xxtu-deep)!important;
}
.fenye a:hover,
.fenye span{background:var(--xxtu-deep)!important;color:#fff!important;}

/* Sidebar widgets */
.widget-area{position:relative;}
.widget{padding:20px!important;margin-bottom:22px!important;}
.widget-title,
.widget h3,
.widget .title{
  color:var(--xxtu-deep)!important;
  font-weight:900!important;
  padding-bottom:12px!important;
  border-bottom:1px solid rgba(77,60,72,.10)!important;
}
.widget a{color:#4c4051!important;font-weight:700;}
.widget a:hover{color:var(--xxtu-accent)!important;}
.widget ul li{border-bottom:1px dashed rgba(77,60,72,.12)!important;padding:10px 0!important;}

/* Pagination */
.pagination,
.nav-links{text-align:center;}
.page-numbers,
.pagination a,
.pagination span{
  min-width:40px;
  height:40px;
  line-height:40px;
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  background:#fff!important;
  border:1px solid rgba(91,68,82,.12)!important;
  color:#5d5360!important;
  box-shadow:0 8px 18px rgba(78,56,69,.08);
  margin:4px!important;
}
.page-numbers.current,
.pagination a:hover,
.page-numbers:hover{
  background:linear-gradient(135deg,#9d604f,#75508e)!important;
  color:#fff!important;
  border-color:transparent!important;
}

/* Footer and floating bar */
.site-footer{
  background:linear-gradient(180deg,#3b2d3c 0%,#271f2c 100%)!important;
  color:rgba(255,255,255,.72)!important;
  border-top:1px solid rgba(255,255,255,.08);
}
.site-footer a{color:rgba(255,255,255,.82)!important;}
.site-footer a:hover{color:#ffd5bd!important;}
.friendlinks-ul a,
.footer-links a{
  border-radius:999px;
  background:rgba(255,255,255,.08);
  padding:7px 13px;
  margin:4px;
  display:inline-flex;
}
.rollbar-item{
  border-radius:16px!important;
  background:rgba(255,255,255,.92)!important;
  color:var(--xxtu-deep)!important;
  box-shadow:0 10px 26px rgba(49,35,47,.16)!important;
  border:1px solid rgba(77,60,72,.08)!important;
}
.rollbar-item:hover{background:var(--xxtu-deep)!important;color:#fff!important;transform:translateY(-2px);}
.rollbar-item a{color:inherit!important;}

/* Forms / modals */
.site-content input,
.site-content textarea,
.site-content select,
.site-content .form-control,
.modal-content input,
.modal-content textarea,
.modal-content select{
  border-radius:16px!important;
  border:1px solid rgba(91,68,82,.14)!important;
  background:#fff!important;
  color:var(--xxtu-text)!important;
}
.site-content input:focus,
.site-content textarea:focus,
.site-content select:focus,
.site-content .form-control:focus{
  border-color:rgba(126,75,153,.38)!important;
  box-shadow:0 0 0 4px rgba(126,75,153,.10)!important;
}
.modal-content,.swal2-popup{
  border-radius:26px!important;
  box-shadow:0 28px 80px rgba(45,34,47,.22)!important;
}

/* Dark mode safety: keep readable, not pure black */
body.dark-open,
body.night,
.dark-open body{background:linear-gradient(180deg,#2f2935,#231f28)!important;}
body.dark-open .post-grid,
body.dark-open .post-list,
body.dark-open .widget,
body.dark-open .article-content,
body.dark-open .single .entry-wrapper{
  background:rgba(47,39,52,.88)!important;
  border-color:rgba(255,255,255,.08)!important;
  color:#eee8f1!important;
}
body.dark-open .entry-title,
body.dark-open .entry-title a,
body.dark-open .widget-title,
body.dark-open .single .entry-content{color:#fff8f1!important;}
body.dark-open .entry-meta,
body.dark-open .entry-excerpt,
body.dark-open .widget a{color:#d2c8d7!important;}

@media (max-width: 991px){
  .section{padding-top:24px;padding-bottom:24px;}
  .single .entry-wrapper{padding:20px!important;}
  .filter--content{padding:14px!important;}
}
@media (max-width: 767px){
  body{background:linear-gradient(180deg,#fbf7f1,#f3eee8);}
  .post-grid,.post-list,.widget{border-radius:18px!important;}
  .post-grid .entry-wrapper,.post-list .entry-wrapper{padding:12px!important;}
  .entry-title,.entry-title a{font-size:15px!important;}
  .filter-tag a,.filter-tab a{padding:7px 11px!important;font-size:13px!important;}
  .rollbar{right:10px!important;bottom:12px!important;}
  .rollbar-item{width:40px!important;height:40px!important;line-height:40px!important;}
}


/* ===== XXTU v1.0.2 交互与可读性修复 ===== */
/* 链接按钮：加强分隔，但保持温和，不做刺眼荧光色 */
.site-content .button,
.site-content .btn,
.site-content .wp-block-button__link,
.site-content .go-download,
.site-content .downbtn,
.single .button,
.single .btn,
.single .wp-block-button__link,
.home-cat-nav-wrap a,
.home-cat-nav-wrap .btn,
.home-cat-nav-wrap button,
.entry-content .wp-block-button__link,
.entry-content a.button,
.entry-content a.btn{
  background:linear-gradient(135deg,#fffaf2 0%,#f3e1d5 100%)!important;
  color:#4d2d3e!important;
  border:1px solid rgba(112,70,83,.26)!important;
  box-shadow:0 8px 18px rgba(93,62,73,.12), inset 0 1px 0 rgba(255,255,255,.88)!important;
  font-weight:850!important;
}
.site-content .button + .button,
.site-content .btn + .btn,
.site-content .wp-block-button + .wp-block-button,
.entry-content .wp-block-button + .wp-block-button{
  margin-left:8px!important;
}
.site-content .button:hover,
.site-content .btn:hover,
.site-content .wp-block-button__link:hover,
.site-content .go-download:hover,
.site-content .downbtn:hover,
.single .button:hover,
.single .btn:hover,
.single .wp-block-button__link:hover,
.home-cat-nav-wrap a:hover,
.home-cat-nav-wrap .btn:hover,
.home-cat-nav-wrap button:hover{
  background:linear-gradient(135deg,#8f4d60 0%,#594170 100%)!important;
  color:#fff!important;
  border-color:rgba(89,65,112,.42)!important;
  box-shadow:0 13px 28px rgba(89,65,112,.22)!important;
}

/* 页脚友情链接：让每个按钮有边界感，避免淡成一片 */
.friendlinks-ul,
.footer-links ul{
  gap:8px!important;
}
.friendlinks-ul li,
.footer-links li{
  margin:4px!important;
}
.friendlinks-ul a,
.footer-links a,
.site-footer .friendlinks-ul a,
.site-footer .footer-links a{
  min-height:34px;
  padding:8px 15px!important;
  border-radius:999px!important;
  background:linear-gradient(135deg,rgba(255,255,255,.16),rgba(255,213,189,.10))!important;
  border:1px solid rgba(255,255,255,.22)!important;
  color:rgba(255,255,255,.92)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.12), 0 8px 18px rgba(0,0,0,.12)!important;
  font-weight:800!important;
  letter-spacing:.01em;
}
.friendlinks-ul a:hover,
.footer-links a:hover,
.site-footer .friendlinks-ul a:hover,
.site-footer .footer-links a:hover{
  background:linear-gradient(135deg,#ffd1b8,#e9b3c4)!important;
  color:#3a2634!important;
  border-color:rgba(255,255,255,.48)!important;
}

/* 隐藏登录入口：只处理前台导航的登录按钮，不影响搜索和菜单 */
.site-header .login-btn,
.navbar .login-btn,
.actions > .login-btn,
.login-btn.navbar-button{
  display:none!important;
}

/* 手机端隐藏全屏按钮；电脑端保留 */
@media (max-width: 991px){
  .rollbar .rollbar-item[etap="to_full"],
  .rollbar [etap="to_full"]{
    display:none!important;
  }
}

/* 手机侧边菜单：恢复 RiPro 原生开关逻辑，覆盖旧版误伤 transform 的 CSS */
.off-canvas{
  -webkit-transform:translateX(320px)!important;
  transform:translateX(320px)!important;
  transition:-webkit-transform .3s cubic-bezier(.77,0,.175,1), transform .3s cubic-bezier(.77,0,.175,1)!important;
  pointer-events:none;
}
body.canvas-opened .off-canvas{
  -webkit-transform:translateX(0)!important;
  transform:translateX(0)!important;
  visibility:visible!important;
  pointer-events:auto;
}
body:not(.canvas-opened) .off-canvas{
  visibility:hidden!important;
  pointer-events:none!important;
}
.off-canvas .canvas-close{
  z-index:10002!important;
  cursor:pointer!important;
  pointer-events:auto!important;
}
.dimmer{
  cursor:pointer;
}

@media (max-width: 767px){
  .friendlinks-ul a,
  .footer-links a,
  .site-footer .friendlinks-ul a,
  .site-footer .footer-links a{
    min-height:36px;
    padding:8px 13px!important;
    font-size:13px!important;
  }
  .site-content .button,
  .site-content .btn,
  .site-content .wp-block-button__link{
    border-width:1px!important;
  }
}


/* ===== XXTU v1.0.3 菜单外链与详情页浮动按钮修复 ===== */
/* 详情页不显示“切换博客模式”按钮；首页/列表页保留 */
body.single .rollbar .tap-blog-style,
body.single-post .rollbar .tap-blog-style,
body.singular .rollbar .tap-blog-style,
body.single [etap="tap-blog-style"],
body.single-post [etap="tap-blog-style"]{
  display:none!important;
}

/* 菜单按钮视觉保持清晰，但不改变父主题菜单布局 */
.site-header .menu a,
.site-header .navbar a,
.off-canvas .menu a,
.off-canvas .navbar-nav a,
.footer-links a,
.friendlinks-ul a{
  text-decoration:none!important;
}
