/* ===============================
   基础样式重置与设置
   =============================== */
html { 
    scrollbar-gutter: stable; /* Firefox/Chromium 新版支持 */
}

body {
    overflow-y: scroll; /* 老办法，强制一直显示右侧滚动条占位 */
}

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

body {
    background-color: #FFFFFF;
    font-family: "Helvetica Neue", Arial, sans-serif;
    color: #333333;
    line-height: 1.6;
}

/* ===============================
   通用容器样式
   =============================== */
.wrapper, .main-container, .nav-inner {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}

/* ===============================
   顶部用户工具条（独立一行）
   =============================== */
.top-bar {
    width: 100%;
    background-color: #F2F2F2;
    border-bottom: 1px solid #e0e0e0;
}

.top-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6px 15px;
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    font-size: 14px;
}

.top-bar-inner .top-link {
    color: #0C9499;
    text-decoration: none;
    font-weight: 500;
}

.top-bar-inner .top-link:hover {
    color: #FF6B35;
    text-decoration: underline;
}

/* Mobile */
@media (max-width: 767px) {
    .top-bar-inner {
        padding: 4px 10px;
        gap: 12px;
        font-size: 12px;
    }
}

/* ===============================
   头部 Banner 区域
   =============================== */
.header-area {
    background-color: #EBEBEB;
    width: 100%;
}

.title-logo-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
}

.title-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.main-title {
    color: #0B888D;
    font-size: 22px;
    margin: 0 0 10px 0;
    line-height: 1.3;
    font-weight: 600;
}

.sub-title {
    font-size: 18px;
    color: #666666;
    margin: 0;
    line-height: 1.3;
}

/* ===============================
   导航菜单样式
   =============================== */
.nav-container {
    width: 100%;
    background-color: #0C9499;
}

.nav-menu {
    margin: 0;
    padding: 2px 0;
    list-style: none;
    text-align: left;
}

.nav-menu li {
    display: inline;
}

.nav-link {
    display: inline-block;
    color: #FFFFFF;
    text-decoration: none;
    padding: 10px 10px;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.nav-link:hover {
    background-color: #0B888D;
}

/* ===============================
   间距
   =============================== */
.spacer {
    height: 1px;
}

/* ===============================
   主内容区域
   =============================== */
.main-container {
    padding: 20px 15px;
}

/* ===============================
   内容区块
   =============================== */
.content-container {
    display: flex;
    gap: 30px;
    align-items: flex-start; /* ensure top-aligned */
}

.block {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #fff;
    border-radius: 6px;
}

.block h2 {
    color: #0B888D;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 20px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

/* ===============================
   搜索框
   =============================== */
.search-container {
    margin-bottom: 30px;
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-form input[type="text"] {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.search-form input[type="submit"] {
    padding: 8px 20px;
    background-color: #0C9499;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.search-form input[type="submit"]:hover {
    background-color: #0B888D;
}

/* ===============================
   文章列表
   =============================== */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* 核心调整1：卡片底部内边距清零，横线紧贴按钮 */
.post-card {
    border-bottom: 1px solid #eee;
    padding: 0; /* 完全清零内边距，横线在卡片最底部 */
    margin-bottom: 0px; /* 仅保留卡片之间的间距 */
}

.post-title {
    font-size: 18px;
    margin: 0 0 6px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-title a {
    text-decoration: none;
    color: #0C9499;
}

.post-title a:hover {
    color: #FF6B35;
}

/* ===============================
   元信息
   =============================== */
/* 核心调整2：元信息底部间距仅留2px，贴近按钮 */
.post-meta {
    display: flex;
    gap: 8px;
    font-size: 13px;
    color: #888;
    margin-bottom: 2px;
}

/* ===============================
   阅读更多（核心调整：完全紧贴横线）
   =============================== */
.read-more {
    display: block;
    text-align: right;
    padding-right: 0.5em; /* 保留右侧空格感 */
    /* 核心调整3：所有间距属性清零 */
    padding-bottom: 0;
    margin-top: 0;
    margin-bottom: 0;
    line-height: 1; /* 行高清零，避免隐形间距 */
    color: #0C9499;
    text-decoration: none;
}

.read-more:hover {
    color: #FF6B35;
    text-decoration: underline;
    /* hover时也保持间距清零 */
    padding-bottom: 0;
    margin-bottom: 0;
}

/* ===============================
   响应式
   =============================== */
@media (max-width: 767px) {
    .title-logo {
        width: 60px;
        height: 60px;
    }

    .main-title {
        font-size: 18px;
    }

    .sub-title {
        font-size: 15px;
    }

    .nav-link {
        font-size: 12px;
        padding: 4px 6px;
    }

    .content-container {
        flex-direction: column;
        gap: 20px;
    }

    .content-container .left-column,
    .content-container .right-column {
        flex: 1 1 auto;
    }
}

/* ===============================
   底部
   =============================== */
.footer-container {
    width: 100%;
    margin: 30px 0 0;
    padding: 20px 0;
    background-color: #f8f8f8;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.copyright-text {
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* 分类链接样式 */
.post-meta .category a {
    color: #0C9499;          /* same as post title */
    text-decoration: none;   /* no underline */
}

.post-meta .category a:hover {
    color: #FF6B35;
    text-decoration: underline;
}

/* ---------- Pagination links ---------- */
.pagination a {
    color: #0C9499;          /* same as post title */
    text-decoration: none;   /* no underline */
    display: inline-block;
    padding: 6px 10px;      /* 基础大小 */
    border-radius: 6px;
    line-height: 1.2;
    margin: 0 4px;          /* space between numbers */
}

.pagination a:hover {
    color: #FF6B35;
    text-decoration: underline;
}

/* Active page */
.pagination a.active {
    background-color: #0C9499;
    color: #ffffff;
    border-color: #0C9499;
    text-decoration: none;
    padding: 4px 5px;      
    border-radius: 6px;     
    font-weight: 600;       
    pointer-events: none;  
    cursor: default;      
}

/* Prevent hover effect on active page */
.pagination a.active:hover {
    color: #ffffff;
    background-color: #0C9499;
    border-color: #0C9499;
    text-decoration: none;
}

/* =========================================================
   Article/Page detail typography (match index style)
   ========================================================= */
.article-header {
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.article-title {
    color: #0B888D;           /* close to index tone family */
    font-size: 26px;
    line-height: 1.35;
    margin: 0 0 8px 0;
    font-weight: 600;
}

.article-meta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #888;
    margin: 0;                /* remove extra gap */
}

.article-meta-line .category {
    padding: 2px 6px;
    background-color: #f5f5f5;
    border-radius: 3px;
    font-size: 12px;
    color: #0C9499;
}

.article-meta-line .date-separator {
    color: #ccc;
}

.article-meta-line .date {
    font-size: 12px;
    color: #888;
}

.article-content {
    margin-top: 16px;         /* key: comfortable gap from time to body */
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.article-content p {
    margin: 0 0 1.15em 0;
}

.article-content ul,
.article-content ol {
    margin: 0 0 1.15em 1.2em;
}

.article-content li {
    margin: 0.35em 0;
}

.article-content img {
    max-width: 100%;
    height: auto;
    margin: 16px 0;
    border-radius: 6px;
}

.article-content blockquote {
    margin: 1.1em 0;
    padding: 10px 14px;
    border-left: 4px solid #0C9499;
    background: #f7f7f7;
    color: #555;
}

/* Mobile tune for article detail */
@media (max-width: 767px) {
    .article-title {
        font-size: 22px;
    }
    .article-content {
        font-size: 15px;
        line-height: 1.75;
    }
}

/* =========================================================
   Layout fix: keep column widths stable (prevent shrinking)
   ========================================================= */
/* Desktop default: stable 3:1 layout */
.content-container .left-column {
    flex: 0 0 75%;          /* do NOT shrink, fixed basis */
    min-width: 0;           /* prevent overflow pushing layout */
}

.content-container .right-column {
    flex: 0 0 25%;          /* do NOT shrink, fixed basis */
    min-width: 0;
}

/* Tablet: a bit more space for content */
@media (min-width: 768px) and (max-width: 1199px) {
    .content-container .left-column { flex-basis: 70%; }
    .content-container .right-column { flex-basis: 30%; }
}

/* =========================================================
   Top / Recommended tag (orange-red highlight)
   ========================================================= */
.recommended-tag {
    margin-left: 6px;
    padding: 0;                 /* no padding, inline text */
    background: none;
    color: #FF6B35;             /* orange-red highlight */
    font-size: inherit;         /* SAME as title */
    font-weight: 600;
    line-height: inherit;
    white-space: nowrap;
}

/* ===============================
   Mobile: 减小正文左右留白
   =============================== */
@media (max-width: 767px) {

    /* 外层容器左右留白：15px -> 8px */
    .wrapper, .main-container, .nav-inner {
        padding-left: 8px;
        padding-right: 8px;
    }

    /* main-container 自己又有 15px：一起缩小 */
    .main-container {
        padding-left: 8px;
        padding-right: 8px;
        padding-top: 12px;   /* 也可保留 20px，看你喜好 */
        padding-bottom: 12px;
    }

    /* 内容块内部：20px -> 12px（不然手机仍然很挤） */
    .block {
        padding: 12px;
    }
}
