:root {
    --primary-color: #A5300F;
    --secondary-color: #DEB887;
    --text-color: #333;
    --bg-color: #FFF8DC;
}

body {
    font-family: "Microsoft YaHei", "Helvetica Neue", sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    padding-top: 56px;
}

.navbar {
    background-color: var(--primary-color);
}

.navbar-brand, .nav-link {
    color: white !important;
}

.nav-link.active {
    border-bottom: 2px solid white;
}

.language-switch {
    margin-left: 15px;
    cursor: pointer;
    color: white;
    background: none;
    border: 1px solid white;
    padding: 5px 10px;
    border-radius: 4px;
}

.language-switch:hover {
    background-color: rgba(255,255,255,0.1);
}

[lang="en"] {
    display: none;
}

body.english [lang="zh"] {
    display: none;
}

body.english [lang="en"] {
    display: block;
}

section {
    padding: 80px 0;
    display: none;
}

#home {
    display: block;
    min-height: calc(100vh - 56px);
}

.section-title {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 50px;
}

.team-member {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.timeline::before {
    content: '';
    position: absolute;
    width: 2px;
    background: var(--primary-color);
    top: 320px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-content {
    width: 900px;
    margin: 0 auto;
    padding: 30px;
    background: linear-gradient(to right, #fff, #faf6f5);
    border-radius: 12px;
    position: relative;
    overflow: auto;
}

.lineage-image-container {
    float: left;
    width: 240px;
    margin-right: 30px;
    margin-bottom: 20px;
}

.lineage-image {
    width: 240px;
    height: 320px;
    border: 1px solid rgba(165, 48, 15, 0.2);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.lineage-text-container {
    overflow: visible;
    min-height: 320px;
    position: relative;
    padding-bottom: 50px;
}

.lineage-text-container h4 {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 12px;
}

.lineage-text-container p {
    color: #666;
    line-height: 1.6;
    font-size: 1.1em;
    margin: 0;
    padding: 0;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.timeline-content::after {
    content: '';
    display: table;
    clear: both;
}

@media (max-width: 992px) {
    .timeline-content {
        width: 100%;
        max-width: 800px;
    }
}

@media (max-width: 768px) {
    .timeline-content {
        padding: 20px;
    }

    .lineage-image-container {
        float: none;
        margin: 0 auto 20px;
    }

    .lineage-text-container {
        min-height: auto;
        text-align: center;
    }
}

.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.list-group-item {
    border-left: none;
    border-right: none;
    border-radius: 0 !important;
}

.list-group-item:first-child {
    border-top: none;
}

.list-group-item:last-child {
    border-bottom: none;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.contact-link:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.contact-link i {
    margin-right: 8px;
    font-size: 1.2em;
}

.contact-info p {
    margin-bottom: 1.5rem;
}

body:not(.english) [lang="en"] {
    display: none;
}

body.english [lang="zh"] {
    display: none;
}

.intro-content h3 span {
    display: block;
    font-size: 1.5rem;
}

.intro-content h3 [lang="en"] {
    font-size: 1.4rem;
}

.intro-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 6;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    line-height: 1.8;
    max-height: calc(1.8em * 6);
}

@media (max-width: 768px) {
    .intro-text {
        -webkit-line-clamp: 5;
        max-height: calc(1.8em * 5) !important;
    }
}

@media (max-width: 576px) {
    .intro-text {
        -webkit-line-clamp: 4;
        max-height: calc(1.8em * 4) !important;
    }
}

@media (max-width: 768px) {
    .intro-card {
        height: auto !important;
        min-height: 520px;
    }

    .image-wrapper {
        height: 200px !important;
    }

    .intro-text {
        -webkit-line-clamp: 5;
        max-height: calc(1.8em * 5) !important;
    }
}

@media (max-width: 576px) {
    .intro-card {
        height: auto !important;
        min-height: 470px;
    }

    .image-wrapper {
        height: 180px !important;
    }

    .intro-text {
        -webkit-line-clamp: 4;
        max-height: calc(1.8em * 4) !important;
    }
}

.intro-card {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .intro-card .row {
        flex-direction: row !important;
    }
}

@media (max-width: 767px) {
    .intro-card .row {
        flex-direction: column !important;
    }

    .col-md-5, .col-md-7 {
        width: 100%;
    }

    .order-md-2 {
        order: -1;
    }
}

.timeline-content {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.timeline-content:hover .lineage-image {
    transform: scale(1.02);
}

.timeline-content h4 {
    position: relative;
    display: inline-block;
}

.timeline-content h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--primary-color);
}

.timeline-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: var(--primary-color);
    border-radius: 50%;
    left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    z-index: 2;
    transition: all 0.3s ease;
    bottom: -28px;
}

.timeline-dot:hover {
    transform: translateX(-50%) scale(1.2);
    box-shadow: 0 0 8px rgba(165, 48, 15, 0.4);
}

.timeline-item:last-child .timeline-dot {
    display: none;
}

.timeline-item {
    position: relative;
    padding: 20px 0;
}

.read-more-btn {
    position: relative;
    margin-top: 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
    display: block;
    width: fit-content;
}

.read-more-btn:hover {
    background-color: #8b2a0d;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(165, 48, 15, 0.3);
}

.lineage-text-container p {
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.learn-more-btn {
    background-color: var(--primary-color);
    border: none;
    color: white;
    padding: 8px 20px;
    border-radius: 4px;
    margin-top: 5px;
    transition: all 0.3s ease;
}

.learn-more-btn:hover {
    background-color: #8b2a0d;
    color: white;
}

.news-item {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #eee;
}

.news-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.news-detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: none;
}

.news-detail-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    margin: 50px auto;
    background: white;
    padding: 40px;
    border-radius: 12px;
}

.close-detail {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: var(--primary-color);
}

.news-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
}

.news-detail-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 1000;
    overflow-y: auto;
    padding-top: 56px;
}

.news-detail-container {
    max-width: 1000px;
    margin: 30px auto;
    padding: 20px;
}

.back-button {
    position: fixed;
    top: 70px;
    left: 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 1001;
}

.back-button:hover {
    background-color: #8b2a0d;
}

.news-detail-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.news-detail-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.main-content {
    transition: opacity 0.3s ease;
}

.main-content.hidden {
    display: none;
}

.news-detail-page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100vh;
    background: var(--bg-color);
    z-index: 1000;
    padding-top: 56px;
}

.intro-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.intro-card:hover img {
    transform: scale(1.05);
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(165, 48, 15, 0.3);
}
body:not(.english) [lang="en"] {
    display: none;
}
body.english [lang="zh"] {
    display: none;
}

.news-tab {
    font-weight: 500;
    outline: none;
}
.news-tab:hover {
    background: var(--primary-color) !important;
    color: white !important;
}
.news-tab.active {
    background: var(--primary-color) !important;
    color: white !important;
}
.news-item:last-child {
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}
.news-meta i {
    color: var(--primary-color);
}
