/*
Theme Name: WOTools
Theme URI: https://towpdev.com
Author: towpdev
Author URI: https://towpdev.com
Version: 1.0
Description: A custom WordPress theme for lifestyle calculators.
*/

body { background: #f6f7fb; }
    .sidebar { 
      min-height: 100vh; 
      background: #f6f7fb; 
      border-right: 1px solid #eee; 
      position: sticky;
      top: 0;
      height: 100vh;
      overflow-y: auto;
    }
    .sidebar .nav-link.active { background: #e9ecef; font-weight: bold; }
    .card-hover:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.12); transform: translateY(-4px); transition: 0.2s; }
    .logo-img { width: auto; border-radius: 8px; }
    .logo-subimg { 
      text-align: center; 
      width: auto; 
      display: flex; 
      justify-content: center; 
      align-items: center; 
      margin: 0 auto !important; 
    }
    
    /* LOGO Cente setting  */
    .sidebar a:has(.logo-subimg) {
      justify-content: center !important;
      width: 100%;
    }
    .sidebar-title { font-size: 1.2rem; font-weight: normal; margin-left: 10px;}
    .sidebar-desc { font-size: 0.8rem; color: #888; }
    .category-title { font-size: 1.25rem; font-weight: bold; margin-top: 2rem; margin-bottom: 1rem; }
    .footer { background: none; border-top: 0; }
    .bi-card { display: none; }
    .custom-card { background: #fff; border-radius: 10px; box-shadow: 0 4px 24px rgba(0,0,0,0.08); border: none; transition: box-shadow 0.2s, transform 0.2s; }
    .custom-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.12); transform: translateY(-4px); }
    .icon-bg { background: #6c63ff; border-radius: 10px; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; margin-right: 1rem; flex-shrink: 0; }
    .icon-bg i { color: #fff; font-size: 2rem; }
    .card-title-custom { font-size: 1.15rem; color: #2574e6; font-weight: normal; }
    .card-desc-custom { color: #555; margin-top: 0.25rem; font-size: 0.8rem; }
    .custom-card .card-body > div:last-child { flex: 1; min-width: 0; }
    .text-truncate-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    @media (max-width: 991.98px) {
      .sidebar { 
        min-height: auto; 
        position: fixed;
        top: 0;
        left: -100%;
        height: 100vh;
        width: 280px;
        z-index: 1050;
        transition: left 0.3s ease;
        overflow-y: auto;
        background: #f6f7fb;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
      }
      .sidebar.show {
        left: 0;
      }
      .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1040;
      }
      .sidebar-overlay.show {
        display: block;
      }
      .mobile-menu-btn {
        display: block !important;
      }
    }
    .mobile-menu-btn {
      display: none;
    }
    
    .recommend-navbar, .recommend-navbar .navbar-expand-lg, .recommend-navbar .navbar-light {
      all: unset;
    }
    .recommend-nav-list {
      display: flex;
      gap: 2rem;
      margin-bottom: 0;
    }
    .recommend-nav-list li {
      list-style: none;
    }
    .recommend-nav-list a {
      position: relative;
      color: #2574e6;
      font-size: 1.0rem;
      text-decoration: none;
      padding: 0.2rem 0.2rem;
      border-radius: 4px;
      transition: background 0.2s, color 0.2s;
      overflow: hidden;
    }
    .recommend-nav-list a::after {
      content: '';
      display: block;
      position: absolute;
      left: 0;
      bottom: 0;
      width: 0;
      height: 2px;
      background: #6c63ff;
      transition: width 0.3s cubic-bezier(.4,0,.2,1);
    }
    .recommend-nav-list a:hover::after,
    .recommend-nav-list .current-menu-item > a::after {
      width: 100%;
    }
    .search-form { min-width: 220px; }
    .search-form form {
      display: flex;
      align-items: center;
      background: #f8f9fa;
      border-radius: 6px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.04);
      padding: 2px 6px;
    }
    .search-form input[type="search"] {
      border: none;
      background: transparent;
      outline: none;
      box-shadow: none;
      font-size: 1rem;
      padding: 0.5rem 0.75rem;
      min-width: 180px;
    }
    .search-form input[type="search"]:focus {
      background: #fff;
    }
    .search-form input[type="submit"], .search-form button {
      border: none;
      background: #6c63ff;
      color: #fff;
      padding: 0.5rem 0.9rem;
      border-radius: 4px;
      margin-left: 4px;
      font-size: 1.1rem;
      transition: background 0.2s;
    }
    .search-form input[type="submit"]:hover, .search-form button:hover {
      background: #2574e6;
    }
    
    .recommend-navbar .search-form input[type="search"] {
      transition: width 0.35s cubic-bezier(.4,0,.2,1), background 0.2s;
      width: 160px;
      max-width: 100%;
    }
    .recommend-navbar .search-form input[type="search"]:focus {
      width: 260px;
      background: #fff;
    }
    
 
    @media (max-width: 991.98px) {
      .recommend-navbar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
      }
      .recommend-navbar .search-form {
        min-width: auto;
        flex: 1;
        margin-left: 1rem;
      }
      .recommend-navbar .search-form input[type="search"] {
        width: 100%;
        min-width: 120px;
      }
      .recommend-navbar .search-form input[type="search"]:focus {
        width: 100%;
      }
    }
   
    .tool-title {
      font-size: 2.0rem;
      color: #222;
      letter-spacing: 1px;
      margin-bottom: 1.5rem;
    }
    .tool-meta {
      font-size: 0.9rem;
      color: #6c757d;
      margin-top: 22px;
    }
    .tool-meta a {
      color: #6c63ff;
      text-decoration: none;
    }
    .tool-meta a:hover {
      color: #2574e6;
    }
    .tool-intro .fs-5 {
      color: #2574e6;
    }
    .tool-summary-blockquote {
      background: #feffff;
      padding: 1.5rem;
      margin: 0;
      line-height: 25px;
      font-style: normal;      
      font-size: 1.0rem;
      border-radius: 6px;
      margin-left: -15px;
      margin-right: -15px;
    }
    .tool-main-full {
      background: #f6f7fb;
      border: 1px solid #e9ecef;
      margin-left: -15px;
      margin-right: -15px;
    }
    .tool-detail-full {
      background: #fff;
      border: 1px solid #e9ecef;
      border-radius: 6px;
      margin-left: -15px;
      margin-right: -15px;
    }
    .tool-detail-full .fs-5 {
      color: #2574e6;
    }
    .tool-content {
      font-size: 1.05rem;
      color: #444;
      line-height: 1.9;
    }
    @media (max-width: 767.98px) {
      .tool-title { font-size: 1.4rem; }
      .tool-summary-blockquote { padding: 1rem; font-size: 1rem; }
      .tool-password-generator-full, .tool-detail-full { 
        margin-left: 0; 
        margin-right: 0; 
        padding: 1.2rem !important; 
      }
    }
    

    .breadcrumb {
      background: transparent;
      padding: 0;
      margin: 0;
    }
    
    .breadcrumb-item + .breadcrumb-item::before {
      content: ">";
      color: #6c757d;
      font-weight: bold;
    }
    
    .breadcrumb-item a {
      color: #6c63ff;
      transition: color 0.2s;
    }
    
    .breadcrumb-item a:hover {
      color: #2574e6;
    }
    
    .breadcrumb-item.active {
      color: #6c757d;
    }
    
    .category-header {
      text-align: left;
      padding: 0.2rem 0;
      border-bottom: 1px solid #e9ecef;
      margin-bottom: 2rem;
    }
    
    .category-header .category-title {
      color: #333;
      font-size: 1.5rem;
      font-weight: 500;
      margin-bottom: 1rem;
    }
    
    .category-description {
      color: #6c757d;
      font-size: 1.1rem;
      max-width: 100%;
      margin: 0 0;
      line-height: 1.6;
    }
    
    /* pagination setting  */
    .pagination-wrapper {
      margin-top: 3rem;
    }
    
    .pagination .page-link {
      color: #007bff;
      border: 1px solid #dee2e6;
      padding: 0.5rem 0.75rem;
      margin: 0 2px;
      border-radius: 4px;
      transition: all 0.2s ease;
    }
    
    .pagination .page-link:hover {
      background-color: #e9ecef;
      border-color: #dee2e6;
      color: #0056b3;
    }
    
    .pagination .page-item.active .page-link {
      background-color: #007bff;
      border-color: #007bff;
      color: white;
    }
    
    .pagination .page-item.disabled .page-link {
      color: #6c757d;
      pointer-events: none;
      background-color: #fff;
      border-color: #dee2e6;
    }
    
    .pagination .page-item.navigation .page-link {
      font-weight: 500;
    }
    
    /* no posts found setting  */
    .no-posts-found {
      min-height: 400px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
    }
    
    .no-posts-icon {
      opacity: 0.5;
    }
    
    /* search page setting  */
    .search-form-container {
      background: #f8f9fa;
      border-radius: 8px;
      padding: 2rem;
      border: 1px solid #e9ecef;
    }
    
    .search-form-container .input-group {
      box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    }
    
    .search-form-container .form-control {
      border: 1px solid #dee2e6;
      border-right: none;
      border-radius: 4px 0 0 4px;
    }
    
    .search-form-container .btn {
      border-radius: 0 4px 4px 0;
    }
    
    /* responsive setting  */
    @media (max-width: 768px) {
      .category-header .category-title {
        font-size: 2rem;
      }
      
      .category-description {
        font-size: 1rem;
      }
      
      .pagination .page-link {
        padding: 0.375rem 0.5rem;
        font-size: 0.875rem;
      }
      
      .search-form-container {
        padding: 1rem;
      }
    }

    .tool-related-full {
      background: #f6f7fb;
      border: 1px solid #e9ecef;
      margin-left: -15px;
      margin-right: -15px;
    }
    .tool-related-full .card {
      transition: all 0.3s ease;
    }
    .tool-related-full .card:hover {
      transform: translateY(-4px);
      box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    }

/* WordPress 内容区域样式 */
.entry-content,
.post-content,
.page-content,
.tool-content {
  /* 基础段落样式 */
  p {
    margin-bottom: 1.2rem;
    line-height: 1.8;
    color: #333;
  }
  
  /* 空段落处理 */
  p:empty {
    display: none;
  }
  
  /* 加粗文本 */
  strong, b {
    font-weight: 600;
    color: #222;
  }
  
  /* 斜体文本 */
  em, i {
    font-style: italic;
    color: #555;
  }
  
  /* 删除线 */
  del, s {
    text-decoration: line-through;
    color: #999;
  }
  
  /* 下划线 */
  u {
    text-decoration: underline;
    text-decoration-color: #6c63ff;
  }
  
  /* 标题样式 */
  h1, h2, h3, h4, h5, h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
    color: #222;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
  h4 { font-size: 1.25rem; }
  h5 { font-size: 1.1rem; }
  h6 { font-size: 1rem; }
  
  /* 列表样式 */
  ul, ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
  }
  
  ul li, ol li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
  }
  
  ul {
    list-style-type: disc;
  }
  
  ol {
    list-style-type: decimal;
  }
  
  /* 嵌套列表 */
  ul ul, ol ol, ul ol, ol ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
  }
  
  /* 表格样式 */
  table {
    width: 100%;
    margin-bottom: 1.5rem;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
  
  table th {
    background: #f8f9fa;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #dee2e6;
  }
  
  table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
  }
  
  table tr:hover {
    background-color: #f8f9fa;
  }
  
  table tr:last-child td {
    border-bottom: none;
  }
  
  /* 引用块样式 */
  blockquote {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-left: 4px solid #6c63ff;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #555;
  }
  
  blockquote p {
    margin-bottom: 0;
  }
  
  blockquote cite {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #6c757d;
  }
  
  /* 代码样式 */
  code {
    background: #f1f3f4;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #e83e8c;
  }
  
  pre {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
  }
  
  pre code {
    background: none;
    padding: 0;
    color: #333;
  }
  
  /* 链接样式 */
  a {
    color: #6c63ff;
    text-decoration: none;
    transition: color 0.2s ease;
  }
  
  a:hover {
    color: #2574e6;
    text-decoration: underline;
  }
  
  /* 图片样式 */
  img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
  }
  
  /* 图片居中 */
  .aligncenter {
    display: block;
    margin: 1.5rem auto;
  }
  
  .alignleft {
    float: left;
    margin: 0 1rem 1rem 0;
  }
  
  .alignright {
    float: right;
    margin: 0 0 1rem 1rem;
  }
  
  /* 清除浮动 */
  .clearfix::after {
    content: "";
    display: table;
    clear: both;
  }
  
  /* 分隔线 */
  hr {
    border: none;
    height: 1px;
    background: #e9ecef;
    margin: 2rem 0;
  }
  
  /* 定义列表 */
  dl {
    margin-bottom: 1.5rem;
  }
  
  dt {
    font-weight: 600;
    color: #222;
    margin-top: 1rem;
  }
  
  dd {
    margin-left: 1rem;
    margin-bottom: 0.5rem;
    color: #555;
  }
  
  /* 地址样式 */
  address {
    font-style: normal;
    color: #6c757d;
    margin-bottom: 1rem;
  }
  
  /* 小文本 */
  small {
    font-size: 0.875em;
    color: #6c757d;
  }
  
  /* 标记文本 */
  mark {
    background: #fff3cd;
    padding: 2px 4px;
    border-radius: 3px;
  }
  
  /* 上标和下标 */
  sup, sub {
    font-size: 0.75em;
    line-height: 0;
  }
  
  /* 键盘文本 */
  kbd {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 0.875em;
    color: #495057;
  }
  
  /* 变量文本 */
  var {
    font-style: italic;
    color: #6c757d;
  }
  
  /* 响应式表格 */
  @media (max-width: 768px) {
    table {
      font-size: 0.9rem;
    }
    
    table th,
    table td {
      padding: 8px 10px;
    }
    
    .alignleft,
    .alignright {
      float: none;
      margin: 1rem 0;
    }
  }
  
  /* 打印样式 */
  @media print {
    .entry-content,
    .post-content,
    .page-content,
    .tool-content {
      color: #000;
    }
    
    table {
      box-shadow: none;
      border: 1px solid #000;
    }
    
    a {
      color: #000;
      text-decoration: underline;
    }
  }
}