/*
 * 桃園智慧產業學院 TIIAI
 * 人才培育頁面專屬樣式
 */

/* ========== Page Banner ========== */
.page-banner {
    margin-top: clamp(64px, 6.25vw, 120px);
    position: relative;
    overflow: hidden;
    height: 305px;
}

.page-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.page-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 40, 80, 0.6);
}

.page-banner-content {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    padding: 0 8%;
}

.page-banner-title {
    color: var(--white);
    font-size: 48px;
    font-weight: 700;
    letter-spacing: 4px;
}

/* ========== Breadcrumb & Share ========== */
.breadcrumb-bar {
    padding: 24px 0;
}

.breadcrumb-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8%;
}

.breadcrumb {
    font-size: clamp(13px, 0.9vw, 16px);
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--text-light);
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb .separator {
    margin: 0 4px;
}

.breadcrumb .current {
    color: var(--text);
}

.share-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.share-label {
    font-size: clamp(13px, 0.9vw, 16px);
    color: var(--text-light);
    margin-right: 4px;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(24px, 1.7vw, 30px);
    height: clamp(24px, 1.7vw, 30px);
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    transition: var(--transition);
}

.share-fb {
    background: #1877f2;
}

.share-fb:hover {
    background: #1565c0;
}

.share-line {
    background: #06c755;
}

.share-line:hover {
    background: #05a847;
}

.share-copy {
    background: #888;
}

.share-copy:hover {
    background: #666;
}

.share-btn svg {
    width: 55%;
    height: 55%;
}

/* ========== Training Categories ========== */
.training-categories {
    padding: 50px 0 40px;
    background: var(--white);
}

.training-categories .container {
    padding: 0 8%;
}

/* 上半部：標題 + 卡片（左右兩欄 + 分隔線） */
.categories-top {
    display: flex;
    align-items: flex-start;
    margin-bottom: 28px;
}

.category-column {
    flex: 1;
    padding: 0 16px;
}

.category-title {
    font-size: clamp(18px, 1.6vw, 30px);
    font-weight: 600;
    color: var(--primary);
    text-align: center;
    margin-bottom: 24px;
}

.category-column:last-child .category-title {
    color: #5ba3d9;
}

.category-divider-line {
    width: 1px;
    background: #ccc;
    align-self: stretch;
    flex-shrink: 0;
}

.category-cards {
    display: flex;
    gap: 14px;
}

/* 卡片：外層藍色背景 + 內層白色圓角（同首頁 service-card 結構） */
.cat-card {
    flex: 1;
    height: 305px;
    border-radius: 16px;
    overflow: hidden;
    background: var(--primary);
    padding: 4px;
    padding-top: 0;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    cursor: pointer;
}

/* 藍色頂部區域（放標籤） */
.cat-card-header {
    padding: 10px 12px;
    text-align: center;
}

.cat-label {
    display: block;
    font-size: clamp(18px, 1.5vw, 28px);
    color: var(--white);
    font-weight: 400;
}

/* 右邊欄（員工生產力專班）用淺藍 */
.category-column:last-child .cat-card {
    background: #5ba3d9;
}

.cat-card-body {
    padding: 20px 12px 24px;
    text-align: center;
    background: var(--white);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.cat-divider {
    display: none;
}

.cat-main-title {
    font-size: clamp(16px, 1.4vw, 30px);
    font-weight: 700;
    color: inherit;
    line-height: 1.5;
}

/* 左欄（企業競爭力專班）內文用深藍色 */
.category-column:first-child .cat-main-title {
    color: var(--primary);
}

/* 右欄（員工生產力專班）內文用淺藍色 */
.category-column:last-child .cat-main-title {
    color: #5ba3d9;
}

/* 活動照片：3張橫排跨全寬 */
.category-photos {
    display: flex;
    gap: 16px;
    padding: 0 16px;
}

.category-photos img {
    flex: 1;
    border-radius: 12px;
    object-fit: cover;
    height: 270px;
    min-width: 0;
    max-width: calc(33.333% - 11px);
}

/* ========== CTA Banner ========== */
.training-cta {
    background: var(--primary);
    padding: 50px 13%;
    text-align: left;
}

.cta-heading {
    font-size: clamp(22px, 2.6vw, 50px);
    font-weight: 700;
    color: var(--white);
    line-height: 1.5;
}

.cta-sub {
    font-size: clamp(13px, 1.1vw, 20px);
    color: rgba(255, 255, 255, 0.8);
    margin-top: 12px;
    letter-spacing: 2px;
    font-weight: 300;
}

/* ========== Course List ========== */
.training-courses {
    padding: 60px 0 80px;
    background: var(--white);
}

.training-courses .container {
    padding: 0 8%;
}

.course-list-wrapper {
    border: 1px solid #ddd;
    border-radius: 16px;
    padding: 40px clamp(24px, 3vw, 50px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.8);
}

.course-list-title {
    font-size: clamp(22px, 2vw, 38px);
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    margin-bottom: 36px;
}

.course-group {
    margin-bottom: 36px;
}

.course-group:last-child {
    margin-bottom: 0;
}

.course-group-title {
    font-size: clamp(16px, 1.3vw, 24px);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
}

.course-list {
    display: flex;
    flex-direction: column;
}

.course-row {
    display: flex;
    align-items: center;
    gap: clamp(10px, 1vw, 18px);
    padding: 12px 0;
}

.course-date {
    font-size: clamp(13px, 0.95vw, 17px);
    color: var(--text);
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 500;
}

.course-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px clamp(10px, 0.9vw, 16px);
    border-radius: 4px;
    font-size: clamp(12px, 0.85vw, 16px);
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 1px;
    min-width: clamp(48px, 3.5vw, 66px);
}

.tag-online {
    background: #5ba3d9;
    color: var(--white);
}

.tag-physical {
    background: var(--primary);
    color: var(--white);
}

.course-name {
    font-size: clamp(13px, 0.95vw, 17px);
    color: var(--text);
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.course-line {
    flex: 1;
    height: 0;
    border-bottom: 1.5px dashed #bbb;
    min-width: 10px;
}

.course-register-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px clamp(18px, 1.5vw, 28px);
    border: 2px solid var(--primary);
    border-radius: 6px;
    background: var(--primary);
    color: var(--white);
    font-size: clamp(13px, 0.95vw, 17px);
    font-weight: 700;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
    min-width: clamp(100px, 8vw, 140px);
    text-align: center;
}

.course-register-btn:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.course-coming-soon-btn {
    background: #b3d4f0;
    border-color: #b3d4f0;
    color: var(--white);
}

.course-coming-soon-btn:hover {
    background: #9ac4e8;
    border-color: #9ac4e8;
}

/* ========== Tablet (1024px) ========== */
@media (max-width: 1024px) {
    .page-banner {
        margin-top: 80px;
        height: 200px;
    }

    .breadcrumb-bar .container,
    .training-categories .container,
    .training-courses .container {
        padding: 0 24px;
    }

    .training-cta {
        padding: 40px 24px;
    }

    .category-column {
        padding: 0 10px;
    }

    .cat-card-body {
        padding: 10px 8px 16px;
    }

    .cat-main-title {
        font-size: 16px;
    }

    .category-photos img {
        height: 14vw;
    }

    .course-list-wrapper {
        padding: 28px 20px;
    }

    .course-name {
        white-space: normal;
        flex-shrink: 1;
    }
}

/* ========== Mobile (768px) ========== */
@media (max-width: 768px) {
    .page-banner {
        margin-top: 64px;
        height: 160px;
    }

    .page-banner-title {
        font-size: 22px;
    }

    .breadcrumb-bar {
        padding: 10px 0;
    }

    .breadcrumb-bar .container {
        padding: 0 16px;
    }

    .share-btn {
        width: 26px;
        height: 26px;
    }

    /* Categories */
    .training-categories {
        padding: 24px 0 16px;
    }

    .training-categories .container {
        padding: 0 16px;
    }

    .categories-top {
        flex-direction: column;
        gap: 20px;
    }

    .category-divider-line {
        width: 100%;
        height: 1px;
    }

    .category-column {
        padding: 0;
    }

    .category-title {
        font-size: 17px;
        margin-bottom: 14px;
    }

    .category-cards {
        gap: 8px;
    }

    .cat-card {
        border-radius: 12px;
    }

    .cat-card-bar {
        height: 12px;
    }

    .cat-card-body {
        padding: 10px 6px 14px;
    }

    .cat-main-title {
        font-size: 15px;
    }

    .cat-label {
        font-size: 11px;
    }

    .category-photos {
        gap: 8px;
        margin-top: 4px;
    }

    .category-photos img {
        height: 22vw;
        border-radius: 8px;
    }

    /* CTA */
    .training-cta {
        padding: 32px 16px;
    }

    .cta-heading {
        font-size: 20px;
    }

    .cta-sub {
        font-size: 12px;
    }

    /* Course List */
    .training-courses {
        padding: 24px 0 36px;
    }

    .training-courses .container {
        padding: 0 16px;
    }

    .course-list-wrapper {
        padding: 20px 14px;
        border-radius: 12px;
    }

    .course-list-title {
        font-size: 18px;
        margin-bottom: 20px;
    }

    .course-group {
        margin-bottom: 24px;
    }

    .course-group-title {
        font-size: 15px;
        margin-bottom: 10px;
    }

    .course-row {
        flex-wrap: wrap;
        gap: 6px 8px;
        padding: 10px 0;
        border-bottom: 1px solid #eee;
    }

    .course-row:last-child {
        border-bottom: none;
    }

    .course-date {
        font-size: 12px;
    }

    .course-tag {
        font-size: 11px;
        padding: 1px 8px;
        min-width: 40px;
    }

    .course-name {
        font-size: 12px;
        white-space: normal;
        flex-shrink: 1;
    }

    .course-line {
        display: none;
    }

    .course-register-btn {
        font-size: 12px;
        padding: 3px 14px;
        margin-left: auto;
    }

    .course-coming-soon-btn {
        font-size: 12px;
        padding: 3px 14px;
        margin-left: auto;
    }
}
