/* ========================= News/Apply Case Page Styles ========================= */

/* 通用 a 标签样式 */
a,
a:link,
a:visited,
a:hover,
a:active {
    color: white;
    text-decoration: none;
}

/* Hero Section */
.news-hero-section {
    position: relative;
    width: 100%;
    height: calc((350/1918) * 100vw);
    min-height: 280px;
    display: flex;
    background-image: url('/images/kalex_05.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.news-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.15;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-main-title {
    font-family: var(--font-heading);
    font-size: calc((48/1918) * 100vw);
    font-weight: bold;
    color: var(--white);
    margin: 0;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    position: absolute;
    bottom: calc((25/1918) * 100vw);
    right: calc((94/1918) * 100vw);
    z-index: 2;
    font-family: var(--font-body);
    font-size: calc((14/1918) * 100vw);
    color: var(--white);
}

.breadcrumb-link {
    color: var(--white);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.breadcrumb-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 calc((8/1918) * 100vw);
}

.breadcrumb-current {
    opacity: 0.9;
}

/* Tab Navigation */
.news-tabs {
    display: flex;
    gap: calc((80/1918) * 100vw);
    margin-bottom: calc((40/1918) * 100vw);
    border-bottom: 2px solid var(--brand-gray-light);
    justify-content: flex-start;
    width: 100%;
}

.news-tabs .content-title {
    background: none;
    border: none;
    font-family: var(--font-heading);
    font-size: calc((24/1918) * 100vw);
    font-weight: 600;
    color: var(--text-gray-700);
    padding: calc((15/1918) * 100vw) 0;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
}

.news-tabs .content-title.active {
    color: var(--brand-primary);
}

.news-tabs .content-title.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--brand-primary);
}

.news-tabs .content-title:hover {
    color: var(--brand-primary);
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: calc((30/1918) * 100vw);
    width: 100%;
}

.primary-news-grid {
    margin-bottom: calc((60/1918) * 100vw);
}

/* News Card */
.news-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    background-color: rgb(249, 249, 249);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.news-card-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
}

.news-card-content {
    padding: calc((20/1918) * 100vw);
    display: flex;
    flex-direction: column;
    gap: calc((12/1918) * 100vw);
    flex: 1;
}

.news-card-title {
    font-family: var(--font-heading);
    font-size: calc((18/1918) * 100vw);
    font-weight: 600;
    color: var(--text-gray-700);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.news-card:hover .news-card-title {
    color: var(--brand-primary);
}

.news-card-description {
    font-family: var(--font-body);
    font-size: calc((14/1918) * 100vw);
    color: var(--text-gray-700);
    margin: 0;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.news-card-meta {
    font-family: var(--font-body);
    font-size: calc((12/1918) * 100vw);
    color: var(--text-gray-500);
    display: flex;
    align-items: baseline;
    gap: calc((8/1918) * 100vw);
    margin-top: auto;
}

.meta-separator {
    color: var(--text-gray-500);
}

.news-category,
.news-date {
    white-space: nowrap;
    line-height: 1;
}

.news-card-meta .news-date {
    font-size: inherit;
    /* 继承父元素 news-card-meta 的字体大小 */
}

/* Recommended News Section */
.recommended-section {
    margin-top: calc((60/1918) * 100vw);
    width: 100%;
    background-color: rgb(249, 249, 249);
    padding: calc((40/1918) * 100vw) 0;
    margin-left: calc((-94/1918) * 100vw);
    margin-right: calc((-94/1918) * 100vw);
    padding-left: calc((94/1918) * 100vw);
    padding-right: calc((94/1918) * 100vw);
}

.recommended-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: calc((40/1918) * 100vw);
    width: 100%;
}

.recommended-title {
    font-family: var(--font-heading);
    font-size: calc((28/1918) * 100vw);
    font-weight: 600;
    color: var(--brand-primary);
    margin: 0;
}

.learn-more-btn {
    /* 布局 */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    
    /* 间距 */
    padding: calc((8/1918) * 100vw) calc((25/1918) * 100vw);
    
    /* 外观 */
    background-color: var(--brand-primary);
    color: white !important;
    border: none;
    border-radius: calc((20/1918) * 100vw);
    
    /* 字体 */
    font-family: var(--font-body);
    font-size: calc((14/1918) * 100vw);
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    
    /* 交互 */
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.learn-more-btn:hover {
    background-color: var(--brand-primary-dark);
    color: white !important;
    transform: translateY(-1px);
}

.learn-more-btn:active {
    color: white !important;
    transform: translateY(0);
}

/* ========================= News Page Responsive ========================= */

/* Tablet */
@media (max-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-main-title {
        font-size: 36px;
    }

    .breadcrumb-nav {
        font-size: 13px;
        right: 40px;
        bottom: 20px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .news-hero-section {
        height: 220px;
        min-height: 220px;
        background-size: cover;
    }

    .hero-main-title {
        font-size: 28px;
    }

    .breadcrumb-nav {
        position: absolute;
        bottom: 15px;
        right: 20px;
        left: auto;
        text-align: right;
        font-size: 12px;
    }

    /* 移动端标签 - 保持PC端下划线风格，单行显示，标签内文字换行 */
    .news-tabs {
        display: flex;
        gap: 0;
        margin-bottom: 25px;
        border-bottom: 2px solid var(--brand-gray-light);
        justify-content: space-between; /* 标签均匀分布 */
    }

    .news-tabs .content-title {
        font-size: 12px;
        padding: 10px 3px;
        background: none;
        border-radius: 0;
        border: none;
        text-align: center;
        line-height: 1.3;
        white-space: pre-line; /* 保留换行，空格可换行 */
        word-break: break-word; /* 在空格处换行 */
        word-spacing: 100vw; /* 强制每个单词后换行 */
        flex: 1; /* 每个标签占据相等宽度 */
        min-width: 0; /* 允许 flex 缩小 */
        display: block;
        position: relative;
    }

    .news-tabs .content-title.active {
        color: var(--brand-primary);
        background: none;
        border: none;
    }

    .news-tabs .content-title.active::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        right: 0;
        height: 3px;
        background-color: var(--brand-primary);
    }

    .news-tabs .content-title:hover {
        color: var(--brand-primary);
        background: none;
        border: none;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .primary-news-grid,
    #news-content,
    #structure-content {
        margin-top: 25px !important;
    }

    .news-card-title {
        font-size: 16px;
        margin-bottom: 10px !important;
    }

    .news-card-description {
        font-size: 14px;
    }

    .news-card-meta {
        font-size: 12px;
    }

    .news-card-meta .news-date {
        font-size: inherit !important;
    }

    .news-card-content {
        padding: 16px;
    }

    .recommended-title {
        font-size: 20px;
        flex: 0 1 auto;
    }

    .recommended-header {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        width: 100%;
        margin-bottom: 25px !important;
    }

    .learn-more-btn {
        font-size: 13px;
        padding: 7px 16px;
        flex-shrink: 0;
    }

    .recommended-section {
        margin-left: -20px;
        margin-right: -20px;
        padding-left: 20px;
        padding-right: 20px;
        padding-top: 30px;
        padding-bottom: 30px;
    }
}

