/* ========================= 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('/img/banner_news.jpg');
    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: clamp(36px, calc((48/1918) * 100vw), 48px);
    font-weight: bold;
    color: var(--white);
    margin: 0;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.page-banner-title {
    font-family: Arial, sans-serif;
    font-size: clamp(42px, 5.6vw, 86px);
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    text-shadow: none;
}

/* 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: clamp(16px, calc((16/1918) * 100vw), 18px);
    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: clamp(44px, 6vw, 112px);
    margin-bottom: clamp(34px, 4vw, 62px);
    border-bottom: 2px solid #e5e7eb;
    justify-content: flex-start;
    width: 100%;
}

.news-tabs .content-title {
    background: none;
    border: none;
    font-family: var(--font-heading);
    font-size: clamp(20px, calc((24/1918) * 100vw), 24px);
    font-weight: 600;
    color: #55585d;
    padding: clamp(22px, 2.2vw, 34px) 0 clamp(28px, 2.6vw, 44px);
    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);
}

/* Featured Top News Carousel */
.news-featured {
    position: relative;
    width: 100%;
    margin: 0 0 calc((56/1918) * 100vw);
    padding: calc((34/1918) * 100vw) calc((66/1918) * 100vw);
}

.news-featured__viewport {
    width: 100%;
    overflow: hidden;
}

.news-featured__slider {
    display: flex;
    width: 100%;
    transition: transform 0.58s ease;
    will-change: transform;
}

.news-featured__slide {
    flex: 0 0 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.25fr);
    gap: calc((42/1918) * 100vw);
    align-items: stretch;
}

.news-featured__image-link {
    display: block;
    overflow: hidden;
}

.news-featured__image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.news-featured__image-link:hover .news-featured__image {
    transform: scale(1.035);
}

.news-featured__info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: clamp(10px, calc((14/1918) * 100vw), 16px);
    min-height: 100%;
    padding: calc((8/1918) * 100vw) 0;
    min-width: 0;
}

.news-featured__date {
    font-family: var(--font-body);
    font-size: clamp(18px, calc((22/1918) * 100vw), 22px);
    font-weight: 500;
    color: #5f5f5f;
    line-height: 1.2;
}

.news-featured__title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(24px, calc((28/1918) * 100vw), 28px);
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-featured__title a {
    color: var(--brand-primary) !important;
    text-decoration: none;
}

.news-featured__title a:hover {
    color: var(--brand-primary-dark) !important;
}

.news-featured__summary {
    max-width: 760px;
    margin: 0;
    color: var(--text-gray-500);
    font-family: var(--font-body);
    font-size: clamp(16px, calc((18/1918) * 100vw), 18px);
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-featured__more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: calc((8/1918) * 100vw);
    min-width: calc((138/1918) * 100vw);
    height: calc((38/1918) * 100vw);
    min-height: 34px;
    padding: 0 calc((22/1918) * 100vw);
    border-radius: 999px;
    background: var(--brand-primary);
    color: #fff !important;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition: background-color 0.25s ease, transform 0.25s ease;
}

.news-featured__more:hover {
    background: var(--brand-primary-dark);
    transform: translateY(-1px);
}

.news-featured__arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: calc((44/1918) * 100vw);
    height: calc((44/1918) * 100vw);
    min-width: 34px;
    min-height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(93, 99, 106, 0.72);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background-color 0.25s ease, transform 0.25s ease;
}

.news-featured__arrow span {
    font-size: clamp(24px, calc((30/1918) * 100vw), 30px);
    line-height: 1;
    transform: translateY(-1px);
}

.news-featured__arrow:hover,
.news-featured__arrow:focus-visible {
    background: var(--brand-primary);
    transform: translateY(-50%) scale(1.06);
    outline: none;
}

.news-featured__arrow--prev {
    left: 0;
}

.news-featured__arrow--next {
    right: 0;
}

/* 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);
    grid-template-columns: repeat(4, 1fr);
}

.primary-news-grid > .pagination,
.primary-news-grid > nav,
.primary-news-grid > .pager,
.primary-news-grid > .page {
    grid-column: 1 / -1;
    justify-self: center;
    width: 100%;
    margin-top: calc((24/1918) * 100vw);
}

.primary-news-grid > .pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

/* 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) 0;
    display: flex;
    flex-direction: column;
    gap: calc((12/1918) * 100vw);
    flex: 1;
}

.news-card-title {
    font-family: var(--font-heading);
    font-size: clamp(16px, calc((18/1918) * 100vw), 18px);
    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 {
    display: none;
}

.news-card-meta {
    font-family: var(--font-body);
    font-size: clamp(15px, calc((16/1918) * 100vw), 16px);
    font-weight: 500;
    color: #5f5f5f;
    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.2;
}

.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-news-grid {
    grid-template-columns: repeat(4, 1fr);
}

.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: clamp(24px, calc((28/1918) * 100vw), 28px);
    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: 16px;
    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);
    }

    .news-featured {
        padding-left: 44px;
        padding-right: 44px;
    }

    .news-featured__slide {
        grid-template-columns: 1fr;
        gap: 26px;
        align-items: center;
    }

    .news-featured__info {
        min-height: 0;
        gap: 16px;
        justify-content: flex-start;
        padding: 0;
    }

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

    .page-banner-title {
        font-size: clamp(42px, 5.6vw, 86px);
    }

    .breadcrumb-nav {
        font-size: 16px;
        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;
    }

    .page-banner-title {
        font-size: clamp(38px, 11vw, 58px);
    }

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

    /* 移动端标签 - 保持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: 16px;
        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;
    }

    .news-featured {
        margin-bottom: 34px;
        padding: 20px 0 10px;
    }

    .news-featured__slide {
        gap: 18px;
    }

    .news-featured__date {
        font-size: 16px;
    }

    .news-featured__title {
        font-size: 20px;
    }

    .news-featured__summary {
        font-size: 16px;
        line-height: 1.7;
    }

    .news-featured__more {
        min-width: 120px;
        height: 34px;
        padding: 0 18px;
        font-size: 16px;
    }

    .news-featured__arrow {
        top: calc(50vw * 0.5625 + 20px);
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
        background: rgba(93, 99, 106, 0.8);
    }

    .news-featured__arrow--prev {
        left: 8px;
    }

    .news-featured__arrow--next {
        right: 8px;
    }

    .news-featured__arrow span {
        font-size: 24px;
    }

    .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: 16px;
    }

    .news-card-meta {
        font-size: 15px;
        color: #5f5f5f;
    }

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

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

    .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: 16px;
        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;
    }
}

/* Keep the mobile news categories on one line, matching the Services tab treatment. */
@media (max-width: 1200px) {
    .news-tabs {
        justify-content: flex-start;
        gap: clamp(28px, 10vw, 64px);
        margin-bottom: 26px;
    }

    .news-tabs .content-title {
        flex: 0 1 auto;
        min-width: 0;
        padding: 12px 4px 16px;
        font-size: 17px;
        font-weight: 600;
        line-height: 1.25;
        text-align: center;
        white-space: nowrap;
        word-break: normal;
        word-spacing: normal;
    }

    .news-mobile-pagination {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        margin: 28px 0 10px;
    }

    .news-mobile-pagination[hidden] {
        display: none;
    }

    .news-mobile-pagination__button {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        border: 1px solid #cdd8e7;
        border-radius: 18px;
        background: #fff;
        color: #52647d;
        font-family: var(--font-body);
        font-size: 14px;
        font-weight: 600;
        line-height: 1;
    }

    .news-mobile-pagination__button.is-active {
        border-color: var(--brand-primary);
        background: var(--brand-primary);
        color: #fff;
    }

    .news-mobile-pagination__button:disabled {
        opacity: 0.38;
    }
}

@media (min-width: 1025px) {
    .news-featured {
        max-width: none;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: clamp(30px, 3.2vw, 56px);
        padding: 0;
    }

    .news-featured__viewport {
        background: rgb(249, 249, 249);
        border: 1px solid rgba(41, 167, 225, 0.12);
        box-shadow: 0 12px 30px rgba(12, 29, 74, 0.08);
    }

    .news-featured__slide {
        grid-template-columns: minmax(420px, 0.46fr) minmax(0, 1fr);
        gap: clamp(30px, 3vw, 58px);
        align-items: center;
        padding: clamp(22px, 2.2vw, 34px);
    }

    .news-featured__image {
        aspect-ratio: 16 / 10;
    }

    .news-featured__info {
        align-self: stretch;
        max-width: 780px;
        gap: clamp(12px, 1vw, 18px);
        padding: 0;
    }

    .news-featured__date {
        font-size: clamp(18px, 1.15vw, 22px);
        color: #5f5f5f;
    }

    .news-featured__title {
        font-size: clamp(22px, 1.32vw, 28px);
        line-height: 1.3;
    }

    .news-featured__summary {
        max-width: 700px;
        font-size: clamp(16px, 0.95vw, 18px);
        line-height: 1.7;
    }

    .news-featured__more {
        margin-top: auto;
        min-width: 128px;
        height: 36px;
        padding: 0 20px;
        font-size: 16px;
    }

    .news-featured__arrow--prev {
        left: 12px;
    }

    .news-featured__arrow--next {
        right: 12px;
    }
}
