
/* COMMON */
a {
    color: #495057;
	text-decoration: none;
}

a:hover {
	color: #0a58ca;
}

img {
	max-width: 100%;
}

pre, code {
	color: #f8f8f8;
	background-color: #495057;
}

code {
	display: inline;
	padding: 0.2em 0.4em;
	line-height: 1.4;
	border-radius: 3px;
	box-decoration-break: clone;
	-webkit-box-decoration-break: clone;
}

pre {
	overflow-x: auto;
	padding: 1.6rem 2.2rem;
	line-height: 1.5;
	border-radius: 5px !important;
}

/* BOOTSTRAP */
.list-group-item {
	background-color: inherit;
}

.badge {
	font-size: 0.875rem;
	font-weight: 400;
}

.bi {
	margin-right: .5rem!important;
}

.btn:focus,
.form-control:focus,
.form-select:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* PAGE */
section.page {
	font-size: 1.1rem;
}

section.page .page-description {
    font-style: italic;
}

section.page a {
	color: #0a58ca;
}

section.page p {
	margin-bottom: 1.2rem;
}

section.page h1.page-title {
	font-size: 2rem;
}

section.page h2 {
	font-size: 1.5rem;
}

section.page h3 {
	font-size: 1.3rem;
}

section.page h4 {
	font-size: 1.1rem;
}

section.page h5 {
	font-size: 1rem;
}

section.page h2,
section.page h3,
section.page h4,
section.page h5 {
	margin: 2rem 0 1rem 0;
}

/* NAV LINKS */
.nav-links {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
	margin: 0;
	padding: 0;
}

.nav-links a {
	color: #495057;
}

.nav-links a:hover {
	color: #0a58ca;
}

/* HOME */
.site-title {
	font-size: clamp(1.8rem, 2.5vw, 2.6rem);
}

.list-group-item h5 {
	font-size: 1.15rem;
}

/* FOOTER */
.footer-links {
	list-style: none;
	margin: 0;
	padding: 0;
}

@media (max-width: 575.98px) {
	section.page {
		font-size: 1rem;
	}

	section.page h1.page-title {
		font-size: 1.75rem;
	}
}

/* VIDEO EMBED RESPONSIVE */
.video-embed {
	overflow:hidden;
	padding-bottom: 56.25%; /* 16:9 */
	position:relative;
	height:0;
}
.video-embed iframe{
	left:0;
	top:0;
	height:100%;
	width:100%;
	position:absolute;
}
/* 导航栏整体布局 */
.header-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* 网站名称 */
.header-container .navbar-brand {
    flex-shrink: 0;
}

/* 搜索框区域 */
.header-search {
    flex: 1;
    display: flex;
    justify-content: center;
    min-width: 180px;
    max-width: 480px;
    margin: 0 auto;
}

/* 搜索表单 */
.header-search form {
    display: flex;
    width: 100%;
    gap: 6px;
}

/* 搜索输入框 */
.header-search input {
    flex: 1;
    min-width: 0;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
}

/* 搜索按钮 */
.header-search button {
    flex-shrink: 0;
    height: 36px;
    padding: 0 16px;
    border: none;
    border-radius: 4px;
    background: #343a40;
    color: white;
    cursor: pointer;
}

.header-search button:hover {
    background: #555;
}

/* 右侧导航 */
.header-container .nav-links {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* 移动端 */
@media (max-width: 768px) {
    .header-container {
        justify-content: space-between;
    }

    .header-search {
        order: 3;
        flex: 0 0 100%;
        max-width: none;
        margin: 0 0 8px;
    }

    .header-container .nav-links {
        margin-left: auto;
    }
}

/* ==============================
   ALTERNATING RETRO TIMELINE
============================== */

.timeline {
    position: relative;
    width: 100%;
    padding: 20px 0;
}

/* 中间竖线 */
.timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    margin-left: -1px;
    background: #d8d2c5;
}

/* 每个时间轴项目 */
.timeline-item {
    position: relative;
    width: 50%;
    padding: 0 35px 40px;
    box-sizing: border-box;
}

/* 左侧文章 */
.timeline-left {
    left: 0;
    text-align: right;
}

/* 右侧文章 */
.timeline-right {
    left: 50%;
    text-align: left;
}

/* 时间节点 */
.timeline-marker {
    position: absolute;
    top: 8px;
    width: 14px;
    height: 14px;
    border: 3px solid #8b7355;
    background: #f8f5ed;
    border-radius: 50%;
    z-index: 2;
    box-sizing: content-box;
}

/* 左侧节点 */
.timeline-left .timeline-marker {
    right: -10px;
}

/* 右侧节点 */
.timeline-right .timeline-marker {
    left: -10px;
}

/* 文章卡片 */
.timeline-card {
    padding: 18px;
    background: #1C1C1E;
    border: 1px solid #333336;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.035);
}

/* 日期 */
.timeline-date {
    margin-bottom: 12px;
    color: #ffff;
    font-size: 13px;
    letter-spacing: 0.5px;
}

/* 标题区域 */
.timeline-heading {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 左侧标题 */
.timeline-left .timeline-heading {
    flex-direction: row-reverse;
}

/* 封面 */
.timeline-cover {
    flex-shrink: 0;
}

.timeline-cover img {
    display: block;
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 3px;
}

/* 文章标题 */
.timeline-title {
    color: #ffff !important;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
}

.timeline-title {
    position: relative;
    display: inline-block;
    z-index: 1;
    overflow: hidden;
    text-decoration: none !important;
    border-bottom: none !important;
    transition: color 0.3s ease;
}

.timeline-title::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.18);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
    z-index: -1;
}

.timeline-title:hover::before {
    transform: scaleX(1);
}

.timeline-title:hover {
    color: #fff !important;
    text-decoration: none !important;
    border-bottom: none !important;
}

.timeline-title::after {
    content: none !important;
    display: none !important;
}

/* 摘要 */
.timeline-description {
    margin: 12px 0 8px;
    color: #77716a;
    font-size: 14px;
    line-height: 1.8;
}

/* 标签 */
.timeline-tags {
    margin-top: 10px;
}

.timeline-tags a {
    display: inline-block;
    margin: 3px;
    padding: 2px 8px;
    border: 1px solid #ded8cc;
    border-radius: 2px;
    color: #8b7355;
    font-size: 12px;
    text-decoration: none;
}

.timeline-tags a:hover {
    background: #8b7355;
    color: #fff;
    border-color: #8b7355;
}

/* 左侧标签对齐 */
.timeline-left .timeline-tags {
    text-align: right;
}

/* 右侧标签对齐 */
.timeline-right .timeline-tags {
    text-align: left;
}

/* ==============================
   MOBILE RETRO TIMELINE
============================== */

@media (max-width: 768px) {

    /* 时间轴整体 */
    .timeline {
        padding: 20px 0 20px 0;
    }

    /* 左侧时间轴竖线 */
    .timeline::before {
        left: 12px;
        width: 2px;
        background: #d8d2c5;
    }

    /* 所有文章统一单侧布局 */
    .timeline-item,
    .timeline-left,
    .timeline-right {
        position: relative;
        width: 100%;
        left: 0;
        padding: 0 0 25px 38px;
        text-align: left;
        box-sizing: border-box;
    }

    /* 时间节点 */
    .timeline-left .timeline-marker,
    .timeline-right .timeline-marker {
        left: 5px;
        right: auto;
        top: 20px;
        width: 10px;
        height: 10px;
        border: 2px solid #8b7355;
        background: #f8f5ed;
        box-sizing: content-box;
    }

    /* 文章卡片 */
    .timeline-card {
        width: 100%;
        padding: 15px;
        background: #1C1C1E;
        border: 1px solid #333336;
        border-radius: 5px;
        box-sizing: border-box;
    }

    /* 日期 */
    .timeline-date {
        margin-bottom: 12px;
        font-size: 12px;
        letter-spacing: 0.8px;
        color: #b3a28c;
    }

    /* 标题区域 */
    .timeline-heading,
    .timeline-left .timeline-heading {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 12px;
        text-align: left;
    }

    /* 封面 */
    .timeline-cover {
        flex-shrink: 0;
    }

    .timeline-cover img {
        display: block;
        width: 50px;
        height: 50px;
        object-fit: cover;
        border-radius: 3px;
    }

    /* 文章标题 */
    .timeline-title {
        display: inline-block;
        font-size: 15px;
        line-height: 1.6;
        color: #fff !important;
        text-decoration: none !important;
        overflow-wrap: anywhere;
    }

    /* 摘要 */
    .timeline-description {
        margin: 12px 0 8px;
        font-size: 13px;
        line-height: 1.7;
        color: #99938b;

        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        overflow: hidden;
    }

    /* 标签 */
    .timeline-tags {
        margin-top: 12px;
        text-align: left !important;
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
    }

    .timeline-tags a {
        margin: 0;
        padding: 3px 8px;
        font-size: 11px;
    }

}
/* ==========================================
   Search Page
========================================== */

.search-page {
    min-height: 60vh;
}

.search-heading {
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(128, 128, 128, 0.3);
}

.search-heading h2 {
    font-size: 26px;
    font-weight: bold;
}

.search-heading p {
    margin-top: 10px;
    opacity: 0.7;
}


/* Search result card */

.search-result-item {
    padding: 22px 25px;
    margin-bottom: 15px;
    background: rgba(128, 128, 128, 0.06);
    border: 1px solid rgba(128, 128, 128, 0.2);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.search-result-item:hover {
    background: rgba(128, 128, 128, 0.12);
    border-color: rgba(128, 128, 128, 0.45);
}


/* Date */

.search-result-date {
    font-size: 12px;
    opacity: 0.65;
    margin-bottom: 10px;
}


/* Title */

.search-result-title {
    font-size: 21px;
    font-weight: bold;
    margin-bottom: 10px;
}

.search-result-title a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.25s ease;
}

.search-result-title a:hover {
    opacity: 0.65;
}


/* Description */

.search-result-description {
    font-size: 14px;
    line-height: 1.8;
    opacity: 0.75;
    margin-bottom: 12px;
}


/* Tags */

.search-result-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.search-result-tags a {
    padding: 3px 9px;
    font-size: 11px;
    color: inherit;
    text-decoration: none;
    border: 1px solid rgba(128, 128, 128, 0.35);
    transition: background 0.2s ease;
}

.search-result-tags a:hover {
    background: rgba(128, 128, 128, 0.2);
}


/* Empty state */

.search-empty {
    padding: 40px 20px;
    text-align: center;
    opacity: 0.75;
}


/* Mobile */

@media (max-width: 768px) {

    .search-result-item {
        padding: 17px;
        margin-bottom: 12px;
    }

    .search-result-title {
        font-size: 18px;
    }

    .search-result-description {
        font-size: 13px;
    }

}
/* ==========================================
   TIMELINE CARD - DIRECTIONAL ARROW
   PC 端短箭头指示角
========================================== */

@media (min-width: 769px) {

    .timeline-card {
        position: relative;
        overflow: visible;
    }

    /* 箭头外边框 */
    .timeline-card::before,
    .timeline-card::after {
        content: "";
        position: absolute;
        top: 12px;
        width: 0;
        height: 0;
        z-index: 2;
    }

    /* 外层边框 */
    .timeline-card::before {
        border-top: 9px solid transparent;
        border-bottom: 9px solid transparent;
    }

    /* 内层填充 */
    .timeline-card::after {
        top: 13px;
        border-top: 8px solid transparent;
        border-bottom: 8px solid transparent;
    }

    /* 左侧卡片：箭头朝右 */
    .timeline-left .timeline-card::before {
        right: -13px;
        border-left: 13px solid #333336;
    }

    .timeline-left .timeline-card::after {
        right: -12px;
        border-left: 12px solid #1C1C1E;
    }

    /* 右侧卡片：箭头朝左 */
    .timeline-right .timeline-card::before {
        left: -13px;
        border-right: 13px solid #333336;
    }

    .timeline-right .timeline-card::after {
        left: -12px;
        border-right: 12px solid #1C1C1E;
    }
}

/* 移动端隐藏箭头 */
@media (max-width: 768px) {
    .timeline-card::before,
    .timeline-card::after {
        display: none !important;
    }
}