/* style.css - 內容區塊與網格系統 */
@font-face {
    font-family: 'NotoSansTC';
    src: url('../fonts/NotoSansTC-VariableFont_wght.ttf') format('opentype');
    font-style: normal;
}

body {
    font-family: 'NotoSansTC';
    line-height: 1.6;
    background: #fff;
    margin: 0;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

a {
    color: #000;
    text-decoration: none;
}

#main-content {
    position: relative;
}

.content_box {
    max-width: 1240px;
    margin: 0px auto;
    padding: 15px 10px
}


.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 15px 20px;
}

.section-padding {
    padding: 80px 0;
}

.banner {
    width: 100%;
}

.banner img {
    width: 100%;
}

/*編輯器*/
.edit {
    font-size: 1rem;
    font-weight: 400;
    line-height: 2;
}

.edit iframe {
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
}

.edit table {
    max-width: 100%;
}

.edit img {
    max-width: 100%;
    height: auto;
}

.edit p {
    margin-bottom: 0px;
}

.edit ul {
    list-style-type: disc;
    padding-left: 1.5rem;
}

.edit table td {
    padding: 5px;
    border: 1px solid rgba(0, 0, 0, .2);
}

/* Banner */
.hero-banner {
    height: 500px;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('photonics-bg.jpg') center/cover;
    display: flex;
    align-items: center;
    color: white;
    text-align: center;
}

.hero-content {
    width: 100%;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
}

.btn-primary {
    background: var(--ncu-blue);
    color: white;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: bold;
}

/*index news*/

.index_news_ad_bg {
    position: relative;
    padding: 0 0 3.45% 0;
    background-color: #f4f6fa;
}

.index_news_ad_bg .content_box {
    padding: 0px 10px;
}

.index_news_ad_bg:after {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    padding: 0;
}

.index_news_ad_row_new {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 15px;
}

.index_news_box_new {
    /*background-color: #a30a0a;*/
    /* Deep red matched to screenshot */
    padding: 40px 30px;
    margin-bottom: 40px;
}

.section-header-new {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 30px;
}

.title-main-new {
    color: #fff;
    font-size: 1.8rem;
    margin: 0;
    letter-spacing: 2px;
    font-weight: 900;
}

.view-more-new {
    position: absolute;
    right: 0;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.7);
    padding: 5px 15px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.view-more-new:hover {
    background: #fff;
    color: #a30a0a;
}

.index_news_row_new {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.news-card-new {
    background: #fff;
    display: block;
    text-decoration: none;
    color: #333;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.news-card-new:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.card-img {
    aspect-ratio: 4/3;
    overflow: hidden;
    background-color: #eee;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.news-card-new:hover .card-img img {
    transform: scale(1.05);
}

.card-text {
    padding: 20px;
    padding-bottom: 45px;
    /* space for icon */
}

.card-text .title {
    font-size: 1.05rem;
    line-height: 1.5;
    margin: 0;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #333;
}

.news-card-new .icon-more {
    position: absolute;
    bottom: 15px;
    right: 15px;
    color: #ccc;
    font-size: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.news-card-new .icon-more::before {
    content: ">";
    font-family: inherit;
    font-weight: 900;
    line-height: 1;
}

.news-card-new:hover .icon-more {
    color: #a30a0a;
    border-color: #a30a0a;
}

@media (max-width: 1024px) {
    .index_news_row_new {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    /* 最新消息、研究學術、修業及課程 - 手機版左圖右文本 */
    .index_news_row_new {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .news-card-new {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        padding: 10px;
        background: #f9f9f9;
        border-bottom: 1px solid #e5e5e5;
        border-radius: 4px;
    }

    .card-img {
        flex-shrink: 0;
        width: 100px;
        height: 100px;
        overflow: hidden;
        border-radius: 4px;
        background-color: #eee;
    }

    .card-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .card-text {
        padding: 0;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }

    .card-text .title {
        font-size: 13px;
        margin: 0 0 6px 0;
        line-height: 1.4;
        -webkit-line-clamp: 2;
        color: #333;
    }

    .card-text .date {
        font-size: 11px;
        color: #999;
        margin: 0;
    }

    .news-card-new .icon-more {
        display: none;
    }

    .section-header-new {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        margin-bottom: 20px;
    }

    .title-main-new {
        font-size: 1.3rem;
        letter-spacing: 1px;
    }

    .view-more-new {
        position: static;
        align-self: flex-end;
        font-size: 0.8rem;
        padding: 4px 12px;
    }
}

.index_news_list {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    margin-top: 20px;
}

.index_news_list .time_box {
    width: 110px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
}

.index_news_list .time_box .type {
    color: #fff;
    background: var(--ncu-red);
    font-size: 0.8rem;
    text-align: center;
    padding: 6px 5px;
    border-radius: 20px;
}

.index_news_list {}

.index_news_list .time_box .time {
    display: none;
}

.index_news_list .time_box .time .day {}

.index_news_list .time_box .time .year_month {}

.index_news_list .title_box {
    width: calc(100% - 110px);
}

.index_news_list .title_box .title {
    font-size: 1rem;
    margin-bottom: 0px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.index_news_list .title_box time {
    font-size: 0.75rem;
}

/*
.index_news_list:first-child .title_box .title {
    font-size: 26px;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.index_news_list:first-child .time_box .time {
    display: flex;
    flex-wrap: wrap;
    font-weight: 900;

}

.index_news_list:first-child .time_box .time .day {
    width: 100%;
    font-size: 28px;
    text-align: center;
}

.index_news_list:first-child .time_box .time .year_month {
    width: 100%;
    font-size: 1rem;
    text-align: center;
}

.index_news_list:first-child {
    margin-bottom: 27px;
    padding-bottom: 24px;
    border-bottom: 1px solid #edf0f3;
}

.index_news_list:first-child .title_box {
    padding-left: 29px;
    border-left: 1px solid #edf0f3;
}

.index_news_list:first-child .title_box time {
    display: none;
}
*/
@media only screen and (max-width: 760px) {
    .index_news_box {
        width: 100%;
        padding: 0px 10px;
    }

    .index_news_row {
        margin-bottom: 40px;
    }
}

/* 最新消息 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background: var(--ncu-red);
    border-radius: 12px 12px 0 0;
}

.title-main {
    color: #000;
    font-size: 1.4rem;
    border-left: 4px solid #ffffff;
    padding-left: 12px;
    margin-bottom: 0px;
}

.section-header .title-main,
.section-header a {
    color: #fff;
    transition: opacity 0.3s;
}

.section-header a:hover {
    opacity: 0.8;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.news-card {
    border: 1px solid #ddd;
    padding: 0px;
    background: #fff;
    transition: 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
    border-color: var(--ncu-blue);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.news-card .img {
    width: 100%;
    height: 260px;
    object-fit: cover;
}

.news-card .img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card .text-box {
    padding: 15px;
}

.category-tag {
    background: #eee;
    color: #444;
    padding: 3px 8px;
    font-size: 0.85rem;
    font-weight: bold;
}

.tag-honor {
    background: #FDE68A;
    color: #92400E;
}

.news-card h3 a {
    color: var(--ncu-blue);
    font-size: 1.2rem;
}

/* 學術演講 */
.seminar-section {
    background: #f9f9f9;
    padding: 80px 0;
}

.seminar-item {
    background: #fff;
    display: flex;
    padding: 25px;
    align-items: center;
    border-bottom: 1px solid #eee;
    margin-top: 20px;
}

.date-badge {
    text-align: center;
    width: 100px;
    border-right: 1px solid #ddd;
    margin-right: 30px;
}

.seminar-detail {
    width: calc(100% - 130px);
}

.day {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: var(--ncu-blue);
}

.month {
    font-size: 0.9rem;
    color: #666;
}

.seminar-text {
    display: flex;
    flex-wrap: wrap;
}

.seminar-text .text {
    width: 100%;
    padding-bottom: 10px;
}

.swiper-slide img {
    width: 100%;
}

.swiper_ph {
    display: none;
}

@media only screen and (max-width: 760px) {
    .swiper_pc {
        display: none;
    }

    .swiper_ph {
        display: block;
    }
}

/* Swiper Navigation Buttons */
.bannerSwiper .swiper-button-prev,
.bannerSwiper .swiper-button-next {
    top: 50%;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.bannerSwiper .swiper-button-prev:hover,
.bannerSwiper .swiper-button-next:hover {
    background: rgba(255, 255, 255, 1);
}

.bannerSwiper .swiper-button-prev::after,
.bannerSwiper .swiper-button-next::after {
    font-size: 16px;
    color: #333;
    font-weight: bold;
}

@media (max-width: 768px) {

    .bannerSwiper .swiper-button-prev,
    .bannerSwiper .swiper-button-next {
        width: 35px;
        height: 35px;
    }

    .bannerSwiper .swiper-button-prev::after,
    .bannerSwiper .swiper-button-next::after {
        font-size: 14px;
    }
}

/*page title*/
.paper_class_row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.paper_class_row a {
    position: relative;
    display: block;
    padding: 5px 15px;
    border: 2px solid #000000;
    color: #000000;
    font-size: 1rem;
    margin: 10px;
}

.paper_class_row a.active {
    border: 2px solid #d3ac2b;
    color: #d3ac2b;
}

.page_tiele_box {
    padding: 0px 15px;
    margin-bottom: 60px;
    margin-top: 20px;
}

.page_tiele_box .title {
    text-align: center;
    letter-spacing: 3px;
    font-size: 1.875rem;
    color: #000;
    line-height: 1.5;
    margin: 0;
}

.path_box {
    text-align: center;
}

.path_box a {
    font-size: 0.75rem;
    color: #999;
    letter-spacing: 1px;
}

.path_box>a+a:before {
    content: "/\00a0";
    padding: 0 5px;
    color: #ccc;
}

.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.intro-image-box {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    aspect-ratio: 4 / 3;
    background-color: #f0f0f0;
}

.intro-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.intro-image-box:hover img {
    transform: scale(1.03);
}

.intro-title {
    color: #003366;
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 30px;
    position: relative;
}

.intro-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -12px;
    width: 60px;
    height: 3px;
    background-color: #b3995d;
}

.intro-text {
    color: #444444;
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.intro-cta {
    margin-top: 35px;
}


.btn-outline-blue {
    display: inline-block;
    padding: 12px 30px;
    color: #003366;
    border: 2px solid #003366;
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-outline-blue:hover {
    background-color: #003366;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.2);
}

.btn-outline-blue:focus {
    outline: 3px solid #b3995d;
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .intro-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .intro-title {
        font-size: 1.75rem;
        margin-bottom: 25px;
    }

    .intro-image-box {
        aspect-ratio: 16 / 9;
    }
}


/* 研究領域網格 */
.en-sub {
    font-size: 1.2rem;
    color: #999;
    font-weight: 300;
    margin-left: 10px;
}

.fields-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.field-item {
    background: #ffffff;
    border: 1px solid #f0f0f0;
    padding: 40px 25px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-top: 5px solid #003366;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.field-item:hover {
    box-shadow: 0 15px 35px rgba(0, 51, 102, 0.1);
    transform: translateY(-8px);
    border-top-color: #b3995d;
}

.field-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 50%;
    padding: 15px;
    transition: background 0.3s;
    overflow: hidden;
}

.field-item:hover .field-icon {
    background: #eef2f6;
}

.field-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.field-item h3 {
    color: var(--ncu-blue);
    margin-bottom: 20px;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.field-item p {
    font-size: 1rem;
    color: #555;
    line-height: 1.7;
    margin: 0;
    flex-grow: 1;
}

.impact-stats {
    background-color: #001a33;
    color: white;
    padding: 60px 0;
    margin: 40px 0;
}

.stats-flex {
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: #B3995D;
    /* 中大金 */
    margin-bottom: 5px;
}

.stat-label {
    font-size: 1.1rem;
    letter-spacing: 1px;
}

@media (max-width: 600px) {
    .stats-flex {
        flex-direction: column;
        gap: 30px;
    }
}


.news_ii_title_box {
    display: flex;
    padding-bottom: 15px;
    border-bottom: 1px solid #dfdfdf;
    align-items: flex-start;
}

.news_ii_title_box .back_btn {
    display: flex;
    align-items: center;
    width: 100px;
    height: 40px;
    margin-right: 50px;
    padding: 10px 10px 10px 10px;
    position: relative;
    border: 2px solid var(--web-txt);
    border-radius: 10px;
    justify-content: center;
}

.news_ii_title_box .title {
    width: calc(100% - 150px);
    font-size: 2.125rem;
    margin-bottom: 0px;
    color: var(--web-txt);
    font-weight: 900;
}

.news_ii_time {
    display: block;
    padding: 5px 15px;
    margin: 20px 0px;
    text-align: end;
    width: 100%;
    font-size: 1rem;
    font-weight: 900;
}

.page_back_btn {
    display: flex;
    justify-content: center;
    margin: 40px 0px;
}

.page_back_btn a {
    padding: 5px 15px;
    border: 2px solid #000000;
    color: #000000;
    font-size: 1rem;
}

/* ================== ROOT DIRECTORY PAGES CONSOLIDATED STYLES ================== */

/* --- From index.php --- */
#news {
    position: relative;
}

.particle-canvas-box {
    position: absolute;
    left: 0px;
    top: 0px;
    height: 100%;
    width: 100%;
    z-index: -1;
}

#particle-canvas {
    width: 100%;
    height: 100%;
}

/* --- From news.php --- */
.pg-news-container {
    max-width: 1200px;
    margin: 40px auto;
    font-family: 'Noto Sans TC', 'Arial', sans-serif;
    padding: 0 20px;
}

.pg-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px;
}

.pg-news-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
}

.pg-news-card:hover {
    transform: translateY(-5px);
}

.pg-news-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--ncu-blue);
    margin-bottom: 20px;
}

.pg-news-date {
    display: flex;
    flex-direction: column;
}

.pg-news-year {
    font-size: 2.625rem;
    font-weight: 800;
    line-height: 1;
    color: var(--ncu-red2);
    letter-spacing: -1px;
}

.pg-news-month-day {
    font-size: 0.8rem;
    color: var(--ncu-red2);
    font-weight: bold;
    margin-top: 5px;
}

.pg-news-category {
    font-size: 0.8rem;
    color: var(--ncu-blue);
    font-weight: bold;
}

.pg-news-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.pg-news-title {
    font-size: 1rem;
    font-weight: bold;
    color: #222;
    line-height: 1.5;
    margin: 0 0 15px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pg-news-excerpt {
    font-size: 0.9375rem;
    color: #777;
    line-height: 1.6;
    margin: 0 0 20px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pg-news-image {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
    margin-top: auto;
}

@media (max-width: 768px) {
    .pg-news-grid {
        grid-template-columns: 1fr;
    }
}

/* --- From student.php / information.php / highschool.php (List Page Styles) --- */
.pg-list-container {
    margin-top: 30px;
}

.pg-list-item {
    display: flex;
    align-items: center;
    padding: 15px 10px;
    border-bottom: 1px dashed #ccc;
    text-decoration: none;
    color: var(--web-txt, #333);
    transition: all 0.3s;
}

.pg-list-item:hover {
    background-color: #f9f9f9;
}

.pg-list-image {
    width: 120px;
    height: 80px;
    object-fit: cover;
    margin-right: 20px;
    border-radius: 4px;
}

.pg-list-content {
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.pg-list-category {
    background-color: var(--ncu-blue, #003366);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-right: 15px;
    white-space: nowrap;
}

.pg-list-date {
    color: #888;
    font-size: 0.8rem;
    margin-right: 15px;
    white-space: nowrap;
}

.pg-list-title {
    font-size: 1rem;
    font-weight: 500;
    flex-grow: 1;
}

.category-btn-group {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 8px 20px;
    border: 1px solid var(--ncu-blue, #003366);
    border-radius: 20px;
    color: var(--ncu-blue, #003366);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: all 0.3s;
}

.category-btn:hover,
.category-btn.active {
    background-color: var(--ncu-blue, #003366);
    color: white;
}

@media (max-width: 768px) {
    .pg-list-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .pg-list-image {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
        margin-right: 0;
        margin-bottom: 15px;
    }

    .pg-list-content {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .pg-list-category,
    .pg-list-date {
        margin-bottom: 8px;
    }
}

/* --- From research.php --- */
.pg-research-list {
    margin-top: 30px;
}

.pg-research-item {
    display: flex;
    align-items: center;
    padding: 15px 10px;
    border-bottom: 1px dashed #ccc;
    text-decoration: none;
    color: var(--web-txt, #333);
    transition: all 0.3s;
}

.pg-research-item:hover {
    background-color: #f9f9f9;
}

.pg-research-category {
    background-color: var(--ncu-blue, #003366);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-right: 15px;
    white-space: nowrap;
}

.pg-research-date {
    color: #888;
    font-size: 0.8rem;
    margin-right: 15px;
    white-space: nowrap;
}

.pg-research-title {
    font-size: 1rem;
    font-weight: 500;
    flex-grow: 1;
}

@media (max-width: 768px) {
    .pg-research-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .pg-research-category,
    .pg-research-date {
        margin-bottom: 8px;
    }
}

/* --- From download.php --- */
.download-list-container {
    margin-top: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    overflow: hidden;
}

.download-item {
    display: flex;
    align-items: center;
    padding: 18px 25px;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: var(--web-txt, #333);
    transition: background-color 0.2s;
}

.download-item:hover {
    background-color: #f8fbff;
}

.download-item:last-child {
    border-bottom: none;
}

.download-icon {
    font-size: 24px;
    color: var(--ncu-blue, #003366);
    margin-right: 20px;
    width: 30px;
    text-align: center;
}

.download-content {
    flex-grow: 1;
}

.download-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 4px;
    display: block;
}

.download-meta {
    font-size: 0.8rem;
    color: #888;
    display: flex;
    gap: 15px;
}

.download-btn {
    padding: 8px 20px;
    background-color: var(--ncu-blue, #003366);
    color: white;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.download-btn:hover {
    background-color: var(--ncu-gold, #cda052);
    color: white;
}

@media (max-width: 768px) {
    .download-item {
        flex-direction: column;
        align-items: flex-start;
        position: relative;
        padding-bottom: 25px;
    }

    .download-icon {
        margin-bottom: 10px;
    }

    .download-btn {
        margin-top: 15px;
        align-self: flex-start;
    }
}

/* --- From class.php --- */
.class-layout {
    display: flex;
    gap: 40px;
    margin-top: 30px;
}

.class-sidebar {
    width: 250px;
    flex-shrink: 0;
}

.sidebar-title {
    background-color: var(--ncu-blue, #003366);
    color: white;
    padding: 15px 20px;
    font-size: 1rem;
    font-weight: bold;
    margin: 0;
    border-radius: 4px 4px 0 0;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    border: 1px solid #eee;
    border-top: none;
    border-radius: 0 0 4px 4px;
    background-color: #fff;
}

.sidebar-menu li {
    border-bottom: 1px solid #eee;
}

.sidebar-menu li:last-child {
    border-bottom: none;
}

.sidebar-menu a {
    display: block;
    padding: 12px 20px;
    color: #444;
    text-decoration: none;
    font-size: 0.9375rem;
    transition: all 0.2s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background-color: #f5f8fa;
    color: var(--ncu-blue, #003366);
    padding-left: 25px;
    font-weight: bold;
}

.sidebar-menu a i {
    margin-right: 8px;
    font-size: 0.8rem;
    color: var(--ncu-gold, #cda052);
}

.class-content {
    flex-grow: 1;
    min-width: 0;
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.class-content-title {
    font-size: 1.625rem;
    color: var(--ncu-blue, #003366);
    margin-top: 0;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
    font-weight: bold;
}

@media (max-width: 900px) {
    .class-layout {
        flex-direction: column;
        gap: 20px;
    }

    .class-sidebar {
        width: 100%;
    }
}

/* --- From team.php --- */
.team-view-controls {
    text-align: right;
    margin-bottom: 20px;
}

.team-view-btn {
    background: #f0f0f0;
    border: 1px solid #ccc;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 0.8rem;
    color: #333;
    transition: all 0.3s;
    border-radius: 4px;
}

.team-view-btn:not(:last-child) {
    margin-right: 5px;
}

.team-view-btn.active {
    background: var(--ncu-blue, #003366);
    color: white;
    border-color: var(--ncu-blue, #003366);
}

.team-view-btn i {
    margin-right: 5px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.team-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 51, 102, 0.15);
}

.team-card-img {
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 3px solid var(--ncu-blue, #003366);
}

.team-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-card-body {
    padding: 20px;
}

.team-name {
    font-size: 1.25rem;
    color: var(--ncu-blue, #003366);
    margin: 0 0 5px 0;
    font-weight: 700;
}

.team-title {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 15px;
    font-weight: 500;
}

.team-info {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
}

.team-info i {
    color: var(--ncu-gold, #cda052);
    width: 20px;
    margin-top: 4px;
}

.team-links {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #eee;
    display: flex;
    gap: 10px;
}

.team-btn {
    display: inline-block;
    padding: 6px 12px;
    background: #f4f6fa;
    color: var(--ncu-blue, #003366);
    border-radius: 4px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: background 0.2s;
}

.team-btn:hover {
    background: var(--ncu-blue, #003366);
    color: white;
}

.team-list {
    display: none;
}

.team-list-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.team-list-table th {
    background: var(--ncu-blue, #003366);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 500;
}

.team-list-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    color: #444;
    vertical-align: top;
}

.team-list-table tr:hover td {
    background: #f9fbfd;
}

.team-list-table tr:last-child td {
    border-bottom: none;
}

.team-list-name {
    font-size: 1.1rem;
    color: var(--ncu-blue, #003366);
    font-weight: 600;
}

.team-list-title {
    font-size: 0.9rem;
    color: #777;
    margin-top: 3px;
}

.team-list-contact {
    font-size: 0.9rem;
}

.team-list-contact div {
    margin-bottom: 5px;
}

.team-list-contact i {
    color: var(--ncu-gold, #cda052);
    width: 20px;
}

@media (max-width: 768px) {
    .team-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }

    .team-list-table thead {
        display: none;
    }

    .team-list-table,
    .team-list-table tbody,
    .team-list-table tr,
    .team-list-table td {
        display: block;
        width: 100%;
    }

    .team-list-table tr {
        margin-bottom: 15px;
        border: 1px solid #eee;
        border-radius: 8px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    }

    .team-list-table td {
        text-align: left;
        padding: 10px 15px;
        position: relative;
    }

    .team-list-table td::before {
        content: attr(data-label);
        font-weight: bold;
        display: block;
        color: var(--ncu-blue, #003366);
        margin-bottom: 5px;
    }
}

/* --- From contact.php --- */
.contact-form-container {
    max-width: 900px;
    margin: 40px auto;
}

.contact-form-container .form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.contact-form-container .form-group {
    flex: 1;
    min-width: 250px;
    margin-bottom: 25px;
}

.contact-form-container .form-group.full-width {
    flex: 100%;
}

.contact-form-container label {
    display: block;
    margin-bottom: 12px;
    font-size: 0.9375rem;
    color: #444;
}

.contact-form-container input[type="text"],
.contact-form-container input[type="email"],
.contact-form-container textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #f2f2f2;
    background-color: #fafafa;
    border-radius: 4px;
    font-size: 0.9375rem;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.contact-form-container input:focus,
.contact-form-container textarea:focus {
    outline: 3px solid #a30a0a;
    outline-offset: 1px;
    border-color: #a30a0a;
    background-color: #fff;
}

.contact-form-container textarea {
    resize: vertical;
}

.contact-form-container .captcha-group input {
    width: 150px;
    display: block;
    margin-bottom: 15px;
}

.contact-form-container .captcha-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 5px;
}

.contact-form-container .captcha-img-box {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.contact-form-container .captcha-img-box:focus {
    outline: 3px solid #a30a0a;
    outline-offset: 2px;
}

.contact-form-container .auth-sound-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--ncu-blue, #003366);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.contact-form-container .auth-sound-btn:hover {
    background: var(--ncu-red2, #810000);
}

.contact-form-container .auth-sound-btn:focus {
    outline: 3px solid #a30a0a;
    outline-offset: 2px;
}

.contact-form-container .auth-sound-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.contact-form-container .form-submit {
    text-align: center;
    margin-top: 30px;
}

.contact-form-container .submit-btn {
    padding: 10px 40px;
    background-color: var(--ncu-blue, #003366);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.contact-form-container .submit-btn:hover {
    background-color: var(--ncu-gold, #cda052);
}

/* --- From personnel.php --- */
.personnel-container {
    max-width: 1000px;
    margin: 30px auto;
}

.personnel-wrapper {
    display: flex;
    border: 1px solid #333;
    margin-bottom: 30px;
    background: #fff;
    align-items: stretch;
}

.personnel-photo {
    width: 250px;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-right: 1px solid #333;
}

.personnel-photo img {
    width: 100%;
}

.personnel-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.personnel-header {
    background-color: #6e5494;
    color: #fff;
    font-size: 1.25rem;
    font-weight: bold;
    text-align: center;
    padding: 12px;
    border-bottom: 1px solid #333;
    letter-spacing: 2px;
    margin-bottom: 0px;
}

.personnel-details-box {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.personnel-detail-row {
    display: flex;
    border-bottom: 1px solid #333;
    flex-grow: 1;
}

.personnel-detail-row:last-child {
    border-bottom: none;
}

.personnel-detail-label {
    width: 120px;
    border-right: 1px solid #333;
    text-align: center;
    font-weight: bold;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 20px;
    flex-shrink: 0;
}

.personnel-detail-content {
    color: #333;
    background: #fafafa;
    padding: 15px 20px;
    font-size: 1rem;
    line-height: 1.8;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

@media (max-width: 768px) {
    .personnel-wrapper {
        flex-direction: column;
    }

    .personnel-photo {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #333;
    }
}

/* Sitemap Styling */
.sitemap01 {
    list-style: disc;
    padding-left: 20px;
    margin-top: 30px;
}

.sitemap01>li {
    margin-bottom: 40px;
    border-left: 4px solid #eee;
    padding-left: 20px;
}

.sitemap01 li p {
    font-weight: bold;
    font-size: 1.25rem;
    margin-bottom: 15px;
    color: #a30a0a;
    /* NCU Red */
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.sitemap01 ol {
    list-style: decimal;
    padding-left: 20px;
}

.sitemap01 ol li {
    margin-bottom: 8px;
    font-size: 1.05rem;
}

.sitemap01 a {
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
}

.sitemap01 a:hover {
    color: #a30a0a;
    text-decoration: underline;
}

.sitemap-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* Pagination Styling */
.manu {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 50px;
    flex-wrap: wrap;
    clear: both;
}

.pagination-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #444;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    background: #fff;
    font-size: 0.95rem;
}

.pagination-item:hover {
    border-color: #a30a0a;
    color: #a30a0a;
    background: #fff5f5;
    text-decoration: none;
}

.pagination-item.current {
    background: #a30a0a;
    color: #fff;
    border-color: #a30a0a;
    cursor: default;
}

.pagination-item.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f8f8f8;
    pointer-events: none;
}

@media (max-width: 768px) {
    .pagination-item {
        min-width: 35px;
        height: 35px;
        padding: 0 10px;
        font-size: 0.85rem;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
    }
}

.team-ii-layout {
    display: flex;
    gap: 40px;
    margin-top: 30px;
    margin-bottom: 40px;
}

.team-ii-sidebar {
    flex: 0 0 280px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.team-ii-photo {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.team-ii-photo img {
    width: 100%;
    height: auto;
    display: block;
}

.team-ii-info-card {
    background: #f8fafc;
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid #3b82f6;
}

.team-ii-info {
    margin-bottom: 15px;
    font-size: 14px;
    color: #475569;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.team-ii-info:last-child {
    margin-bottom: 0;
}

.team-ii-info i {
    color: #3b82f6;
    margin-top: 2px;
    flex-shrink: 0;
}

.team-ii-info a {
    color: #3b82f6;
    text-decoration: none;
    word-break: break-all;
}

.team-ii-info a:hover {
    text-decoration: underline;
}

.team-ii-main {
    flex: 1;
    min-width: 0;
}

.team-ii-header {
    margin-bottom: 30px;
}

.team-ii-title {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.team-ii-badge {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 15px;
}

.team-ii-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.team-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #3b82f6;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.team-btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.team-btn i {
    font-size: 13px;
}

.team-ii-content-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin: 40px 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.edit {
    color: #374151;
    line-height: 1.8;
    font-size: 15px;
}

.edit img {
    max-width: 100%;
    height: auto;
    margin: 15px 0;
    border-radius: 6px;
}

.page_back_btn {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.back_btn {
    display: inline-block;
    padding: 10px 20px;
    background: #e2e8f0;
    color: #475569;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back_btn:hover {
    background: #cbd5e1;
    color: #1e293b;
}

/* RWD: 平板及以下 */
@media (max-width: 1024px) {
    .team-ii-layout {
        gap: 30px;
    }

    .team-ii-sidebar {
        flex: 0 0 240px;
    }

    .team-ii-title {
        font-size: 28px;
    }
}

/* 圖片庫區塊樣式 */
.team-galleries-row {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.team-gallery-col {
    flex: 1;
    min-width: 0;
    /* 防止 Swiper 撐破容器 */
}

.team-gallery-box {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.gallery-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 4px solid #3b82f6;
}

.teamGallerySwiper {
    width: 100%;
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
}

.teamGallerySwiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.teamGallerySwiper .swiper-slide .file-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #475569;
    text-decoration: none;
    font-weight: 600;
}

.teamGallerySwiper .swiper-slide .file-placeholder span {
    font-size: 32px;
    margin-bottom: 10px;
}

/* RWD: 圖片庫在手機版改為上下排列 */
@media (max-width: 768px) {
    .team-galleries-row {
        flex-direction: column;
    }

    .teamGallerySwiper {
        height: 250px;
    }
}

/* RWD: 手機 */
@media (max-width: 768px) {
    .team-ii-layout {
        flex-direction: column;
        gap: 30px;
        margin-top: 20px;
        margin-bottom: 30px;
    }

    .team-ii-sidebar {
        flex: 0 0 auto;
    }

    .team-ii-photo {
        max-width: 300px;
        margin: 0 auto;
    }

    .team-ii-info-card {
        max-width: 300px;
        margin: 0 auto;
        width: 100%;
    }

    .team-ii-title {
        font-size: 24px;
    }

    .team-ii-buttons {
        flex-direction: column;
    }

    .team-btn {
        width: 100%;
        justify-content: center;
    }
}

/*暫時*/
.footer-access {
    display: none;
}