/*
 * 桃園智慧產業學院 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.75);
}

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

.banner-text {
    max-width: 600px;
}

.banner-slogan {
    color: rgba(255, 255, 255, 0.8);
    font-size: clamp(12px, 1vw, 18px);
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 12px;
}

.page-banner-title {
    color: var(--white);
    font-size: clamp(32px, 3vw, 56px);
    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%;
}

/* ========== Section Title ========== */
.section-title-center {
    font-size: clamp(24px, 2vw, 38px);
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    margin-bottom: 40px;
}

.section-title-center.underline {
    text-decoration: none;
    font-weight: 600;
}

/* ========== Service Section ========== */
.service-section {
    padding: 50px 0 40px;
    background: var(--white);
}

.service-section .container {
    padding: 0 8%;
}

/* 服務卡片 - 類似 training.html 卡片樣式 */
.service-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.service-card {
    border-radius: 16px;
    overflow: hidden;
    background: var(--primary);
    padding: 4px;
    padding-top: 0;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.service-card:hover {
    box-shadow: 0 4px 20px rgba(0, 74, 137, 0.25);
}

/* 雙數卡片用淺藍色 */
.service-card:nth-child(even) {
    background: #5ba3d9;
}

.service-card:nth-child(even) .service-card-body p {
    color: #5ba3d9;
}

.service-card-header {
    padding: 10px 12px;
    text-align: center;
}

.service-card-header h3 {
    font-size: clamp(18px, 1.5vw, 28px);
    font-weight: 400;
    color: var(--white);
    margin: 0;
}

.service-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;
}

.service-card-body p {
    font-size: clamp(16px, 1.3vw, 24px);
    color: var(--primary);
    margin: 8px 0;
    font-weight: 500;
}

/* 活動照片 */
.service-photos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* 3 張版本（V6） */
.service-photos.service-photos-3 {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.service-photos img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
}

.service-photos.service-photos-3 img {
    aspect-ratio: 21 / 9;
}

/* ========== Booking Section ========== */
.booking-section {
    padding: 40px 0;
    background: var(--white);
}

.booking-section .container {
    padding: 0 8%;
}

.booking-desc {
    text-align: center;
    font-size: clamp(14px, 1vw, 18px);
    color: var(--text);
    margin: 20px 0 70px;
}

.booking-cards {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 80px;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.booking-card-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
}

.booking-connector-line {
    display: none;
}

/* L形連接線：從核心服務右下角 → 向右到專家陪伴上方 */
.booking-card-wrapper.booking-card-secondary::before {
    content: '';
    position: absolute;
    top: -35px;
    left: -70px;
    width: 270px;
    height: 25px;
    border-top: 2px solid var(--primary);
    border-right: 2px solid var(--primary);
    background: transparent;
}

/* L形連接線：從核心服務底部 → 向下 → 向右到專家陪伴左邊 */
.booking-card-wrapper.booking-card-secondary::after {
    content: '';
    position: absolute;
    bottom: 25px;
    left: -300px;
    width: 285px;
    height: 25px;
    border-bottom: 2px solid var(--primary);
    border-left: 2px solid var(--primary);
    background: transparent;
}

.booking-card-wrapper.booking-card-primary {
    margin-top: -20px;
}

.booking-card-wrapper.booking-card-secondary {
    margin-top: 40px;
}

.booking-card {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: var(--primary);
    padding: 4px;
    padding-top: 0;
    display: flex;
    flex-direction: column;
}

.booking-card-header {
    padding: 10px 12px;
    text-align: center;
}

.booking-card-header h3 {
    font-size: clamp(18px, 1.5vw, 28px);
    font-weight: 400;
    color: var(--white);
    margin: 0;
}

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

.booking-card-body p {
    font-size: clamp(15px, 1.2vw, 20px);
    color: var(--primary);
    line-height: 1.8;
    margin: 0;
}


/* ========== Process Section ========== */
.process-section {
    padding: 60px 0;
    background: var(--white);
}

.process-section .container {
    padding: 0 8%;
}

.process-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(30px, 4vw, 70px);
    flex-wrap: wrap;
}

.process-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.step-circle {
    width: clamp(48px, 4vw, 70px);
    height: clamp(48px, 4vw, 70px);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(20px, 1.8vw, 32px);
    font-weight: 700;
    color: var(--white);
    background: var(--primary);
}

.step-label {
    font-size: clamp(14px, 1.1vw, 20px);
    font-weight: 500;
    color: var(--text);
}

.process-arrow {
    display: flex;
    align-items: flex-start;
}

.process-arrow svg {
    width: clamp(30px, 3vw, 50px);
    height: auto;
}

/* ========== CTA Section ========== */
.cta-section {
    padding: 40px 0 80px;
    background: var(--white);
}

.cta-section .container {
    display: flex;
    justify-content: center;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 0;
    width: 100%;
    max-width: 900px;
    background: #FF5454;          /* 預設紅色 */
    color: var(--white);
    font-size: clamp(18px, 1.5vw, 26px);
    font-weight: 600;
    border-radius: 12px;
    transition: var(--transition);
    text-decoration: none;
}

.cta-btn:hover {
    background: var(--primary);   /* hover 變藍色（原本預設色） */
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 74, 137, 0.3);
}

.cta-btn svg {
    width: clamp(20px, 1.5vw, 28px);
    height: clamp(20px, 1.5vw, 28px);
}

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

    .breadcrumb-bar .container,
    .service-section .container,
    .booking-section .container,
    .process-section .container,
    .success-cases-section .container,
    .training-stats .container {
        padding: 0 24px;
    }

    /* 服務項目 4 卡：2x2（V6） */
    .service-cards {
        grid-template-columns: repeat(2, minmax(0, 320px));
        justify-content: center;
        gap: 18px;
        max-width: 720px;
        margin: 0 auto 36px;
    }

    /* 服務卡內字級縮小 */
    .service-card-header h3 {
        font-size: 22px;
    }
    .service-card-body p {
        font-size: 18px;
    }

    /* 活動照片：V6 維持 3 欄，左右兩張溢出容器邊界 */
    .service-photos.service-photos-3 {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        width: 100vw;
        margin-left: calc(50% - 50vw);
        padding: 0;
    }
    .service-photos.service-photos-3 img {
        aspect-ratio: 16 / 9;        /* 平板：折衷高度 */
        border-radius: 8px;
    }
    /* 舊版 4 張落 fallback 為 2 欄 */
    .service-photos:not(.service-photos-3) {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 立即預約：兩卡並排（保留 L 連線），但 padding 縮 */
    .booking-cards {
        gap: 40px;
        max-width: 720px;
    }
    .booking-card-header h3 {
        font-size: 22px;
    }
    .booking-card-body {
        padding: 20px 24px;
    }
    .booking-card-body p {
        font-size: 16px;
    }
    .booking-card-wrapper.booking-card-secondary::before {
        left: -50px;
        width: 220px;
    }
    .booking-card-wrapper.booking-card-secondary::after {
        left: -240px;
        width: 230px;
    }

    /* 諮詢流程：間距縮 */
    .process-steps {
        gap: 14px;
    }

    /* 區塊標題（成功案例 / 服務項目 / 立即預約 / 諮詢流程） */
    .section-title-center {
        font-size: 28px;
        margin-bottom: 32px;
    }

    /* Service Hero / Intro 文字 — 平板沿用 training_new 預設置中（不額外覆寫） */
}

/* ========== Mobile (768px) ========== */
@media (max-width: 768px) {
    /* Service Hero / Intro 文字 — 沿用 training_new 預設置中 */
    .intro-title { font-size: 22px !important; line-height: 1.4; }
    .intro-desc p { font-size: 14px !important; line-height: 1.85; }

    /* Intro 背景：service page 手機調整（service_new 專用，不影響 training_new） */
    .training-intro {
        padding: 40px 0 60px;
        min-height: 0;
        background:
            url('../images/training_new/hero-deco.png') right -70% / 130% auto no-repeat,
            url('../images/training_new/intro-bg.png') center top / 130% auto no-repeat;
    }

    .page-banner {
        margin-top: 64px;
        height: 180px;
    }

    .page-banner-title {
        font-size: 24px;
        letter-spacing: 2px;
    }

    .banner-slogan {
        font-size: 11px;
        display: none;
    }

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

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

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

    /* Service Section */
    .service-section {
        padding: 30px 0 24px;
    }

    .service-section .container {
        padding: 0 16px;
    }

    .section-title-center {
        font-size: 20px;
        margin-bottom: 24px;
    }

    .service-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
        max-width: 90%;
        margin: 0 auto 24px;
    }

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

    .service-card-header {
        padding: 8px 8px;
    }

    .service-card-header h3 {
        font-size: 16px;
    }

    .service-card-body {
        padding: 12px 8px 16px;
        border-radius: 10px;
    }

    .service-card-body p {
        font-size: 14px;
        margin: 4px 0;
    }

    /* V6: 3 張照片左右延伸到視窗邊 */
    .service-photos.service-photos-3 {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        width: 100vw;
        margin-left: calc(50% - 50vw);
        padding: 0;
    }
    .service-photos.service-photos-3 img {
        aspect-ratio: 16 / 9;          /* 手機：橫向長方形 */
        border-radius: 6px;
    }
    /* 舊版 4 張 fallback */
    .service-photos:not(.service-photos-3) {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .service-photos:not(.service-photos-3) img {
        aspect-ratio: 1 / 1;
        border-radius: 8px;
    }

    /* Booking Section */
    .booking-section {
        padding: 30px 0;
    }

    .booking-section .container {
        padding: 0 16px;
    }

    .booking-desc {
        font-size: 18px;
        line-height: 1.6;
        margin-bottom: 24px;
    }

    .booking-cards {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }

    /* 隱藏 PC 用的 L 形連接線（手機直立堆疊不需要） */
    .booking-card-wrapper.booking-card-secondary::before,
    .booking-card-wrapper.booking-card-secondary::after {
        display: none;
    }
    .booking-card-wrapper.booking-card-primary,
    .booking-card-wrapper.booking-card-secondary {
        margin-top: 0;
        width: 100%;
        max-width: 360px;
    }

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

    .booking-card-header {
        padding: 8px 10px;
    }

    .booking-card-header h3 {
        font-size: 20px;
    }

    .booking-card-body {
        padding: 18px 16px;
        border-radius: 10px;
    }

    .booking-card-body p {
        font-size: 17px;
        line-height: 1.7;
    }

    /* Process Section */
    .process-section {
        padding: 30px 0;
    }

    .process-section .container {
        padding: 0 16px;
    }

    /* 手機版改為 2x2 排列：step1 → step2 ↙ step3 → step4 */
    .process-steps {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        grid-template-rows: auto auto auto;
        row-gap: 28px;
        column-gap: 8px;
        align-items: center;
        justify-items: center;
    }
    /* 第 1 列：step1, 箭頭, step2 */
    .process-steps > .process-step:nth-child(1)  { grid-column: 1; grid-row: 1; }
    .process-steps > .process-arrow:nth-child(2) { grid-column: 2; grid-row: 1; }
    .process-steps > .process-step:nth-child(3)  { grid-column: 3; grid-row: 1; }
    /* 中間斜向箭頭：用乾淨的 inline SVG 作 background，避免拉伸變形 */
    .process-steps > .process-arrow:nth-child(4) {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-self: stretch;
        align-self: stretch;
        transform: none;
        width: 100%;
        height: 110px;
        margin: -10px 0;
        background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 130' fill='none' stroke='%23004a89' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M188 8 L14 124'/><path d='M39 122 L14 124 L25 102'/></svg>") no-repeat center / contain;
    }
    .process-steps > .process-arrow:nth-child(4) svg {
        display: none;
    }
    /* 第 3 列：step3, 箭頭, step4 */
    .process-steps > .process-step:nth-child(5)  { grid-column: 1; grid-row: 3; }
    .process-steps > .process-arrow:nth-child(6) { grid-column: 2; grid-row: 3; }
    .process-steps > .process-step:nth-child(7)  { grid-column: 3; grid-row: 3; }

    .step-circle {
        width: 56px;
        height: 56px;
        font-size: 22px;
        border-width: 2px;
    }

    .step-label {
        font-size: 17px;
    }

    .process-arrow svg {
        width: 36px;
    }

    /* CTA Section */
    .cta-section {
        padding: 24px 0 50px;
    }

    .cta-btn {
        width: auto;
        padding: 18px 36px;
        font-size: 22px;
        gap: 12px;
    }

    .cta-section .container {
        text-align: center;
    }

    .cta-btn svg {
        width: 26px;
        height: 26px;
    }
}

/* （Intro 內嵌橘色 CTA 已改為浮動 .float-cta，相關樣式已移除） */

/* ============================================================
   Service - 產業服務成效（沿用 training-stats，改 3 欄 + 加 icon）
   ============================================================ */
.stats-grid.stats-grid-3 {
    grid-template-columns: repeat(3, 1fr);
    max-width: 1200px;
}

/* icon 在數字上方 */
.service-stats .stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.service-stats .stat-icon svg,
.service-stats .stat-icon img {
    width: clamp(64px, 5.5vw, 88px);
    height: clamp(64px, 5.5vw, 88px);
    color: #fff;
    object-fit: contain;
}

/* sub 描述長文字要可換行 */
.service-stats .stat-sub {
    white-space: normal;
    text-align: center;
    font-size: clamp(15px, 1.2vw, 20px);
    line-height: 1.6;
    padding: 0 6px;
}

/* arrow 縮一點，跟設計稿較吻合 */
.service-stats .stat-arrow {
    font-size: 28px;
    margin: 16px 0 12px;
}

/* card 上方留 icon 空間 + 漸層往下推（深色保留至中段，數字白字較清楚） */
.service-stats .stat-card {
    padding: 36px 24px 32px;
    background: linear-gradient(180deg, #004a89 0%, #2862a0 45%, #6ba4d3 70%, #d6e6f2 85%, #ffffff 100%);
}

@media (max-width: 1024px) {
    .stats-grid.stats-grid-3 {
        gap: 24px;
    }
    .service-stats .stat-sub {
        font-size: 18px;
    }
}

@media (max-width: 767px) {
    /* 產業服務成效：2+1 布局（前兩張並排，第 3 張置中） */
    .stats-grid.stats-grid-3 {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
        max-width: 480px;
        margin: 0 auto;
    }
    .stats-grid.stats-grid-3 .stat-card:nth-child(3) {
        grid-column: 1 / span 2;
        max-width: calc(50% - 7px);
        justify-self: center;
    }
    .service-stats .stat-sub { font-size: 13px; }
    .service-stats .stat-icon svg { width: 36px; height: 36px; }
    .service-stats .stat-card { padding: 24px 14px 22px; }
    .service-stats .stat-arrow { font-size: 22px; margin: 10px 0 8px; }
    .stat-number {
        font-size: 50px;
        margin-bottom: 0px;
    }
    .stat-unit {
        font-size: 1em;
        font-weight: 400;
    }
}

/* ============================================================
   Service - 成功案例成果回饋
   ============================================================ */
.success-cases-section {
    padding: 60px 0 50px;
    background: #fff;
}
.success-cases-section .container {
    padding: 0 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.success-cases-list {
    display: flex;
    flex-direction: column;
    gap: 56px;          /* 列表上下距離加大 */
    margin-top: 70px;   /* 標題與列表間距加大 */
}

.success-case-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    align-items: center;
    gap: 40px;
}

.success-case-icon-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.success-case-icon {
    width: 130px;
    height: 130px;
    background: transparent;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-case-icon svg,
.success-case-icon img {
    width: 130px;
    height: 130px;
    object-fit: contain;
}

.success-case-name {
    font-family: "Noto Sans TC", sans-serif;
    font-size: clamp(15px, 1.15vw, 18px);
    color: #004a89;            /* 深藍 */
    margin: 0;
    text-align: center;
    font-weight: 700;          /* 粗體 */
    line-height: 1.4;
    letter-spacing: 0.5px;
}

/* speech bubble — 用 ::before 當灰色背景，這樣 title 可以被「壓在底下」 */
.success-case-bubble {
    background: transparent;
    border-radius: 28px;
    padding: 32px 44px 36px;
    position: relative;
    margin: 16px 0 0 22px;
    min-height: 130px;
    isolation: isolate;
}

/* 灰色 bubble 背景（z-index: 1，會「蓋住」title 在 bubble 框內的部分） */
.success-case-bubble::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #d9d9d9;
    border-radius: inherit;
    z-index: 1;
}

/* 左側三角箭頭（指向 icon） */
.success-case-bubble::after {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 14px solid transparent;
    border-bottom: 14px solid transparent;
    border-right: 14px solid #d9d9d9;
    z-index: 1;
}

.success-case-bubble-title {
    /* 深藍 tab 放在最後面（z-index: 0）→ 凸出 bubble 外的部分可見、bubble 內被灰色蓋住 */
    position: absolute;
    top: -40px;
    left: 0px;
    background: #004a89;
    color: #fff;
    font-family: "Noto Sans TC", sans-serif;
    font-size: clamp(16px, 1.2vw, 20px);
    font-weight: 700;
    margin: 0;
    /* 文字靠上：上 padding 縮小、下 padding 加大（下半藏到灰色底下） */
    padding: 8px 32px 50px;
    border-radius: 29px;
    letter-spacing: 1px;
    line-height: 1.4;
    box-shadow: 0 4px 10px rgba(0, 74, 137, 0.25);
    z-index: 0;
}

/* 文字 z-index 高於灰色背景，才不會被蓋住 */
.success-case-bubble-text {
    position: relative;
    z-index: 2;
}

.success-case-bubble-text {
    font-family: "Noto Sans TC", sans-serif;
    font-size: clamp(14px, 1.1vw, 18px);
    color: #333;
    line-height: 1.9;
    margin: 0;
    word-break: break-word;
}

/* Tablet */
@media (max-width: 1024px) {
    /* 平板：列表整體放大 */
    .success-cases-list {
        gap: 50px;
        margin-top: 56px;
    }
    .success-case-row {
        grid-template-columns: 140px 1fr;
        gap: 24px;
    }
    .success-case-icon {
        width: 100px;
        height: 100px;
    }
    .success-case-icon svg,
    .success-case-icon img {
        width: 100px;
        height: 100px;
    }
    .success-case-name {
        font-size: 16px;
    }
    .success-case-bubble {
        padding: 26px 28px 26px;
        margin-top: 18px;
        min-height: 120px;
    }
    .success-case-bubble-title {
        padding: 8px 28px 36px;
        font-size: 17px;
    }
    .success-case-bubble-text {
        font-size: 15px;
        line-height: 1.85;
    }
}

/* Mobile —— V6 設計：icon 置頂、bubble 滿版、底部灰線 */
@media (max-width: 767px) {
    .success-cases-section { padding: 40px 0 24px; }
    .success-cases-section .container {
        padding: 0 16px;
    }
    .success-cases-list {
        gap: 0;
        margin-top: 30px;
    }

    /* 改為直立堆疊：上 icon、下 bubble */
    .success-case-row {
        display: block;
        padding-top: 30px;
        padding-bottom: 30px;
        border-bottom: 1px solid #d8d8d8;
    }

    /* 上方 icon + 產業名稱（置中） */
    .success-case-icon-area {
        align-items: center;
        margin-bottom: 14px;
        padding: 0;
    }
    .success-case-icon {
        width: 88px;
        height: 88px;
    }
    .success-case-icon svg,
    .success-case-icon img {
        width: 88px;
        height: 88px;
    }
    .success-case-name {
        font-size: 16px;
        margin-top: 4px;
    }

    /* Bubble：保留圓角，灰底交給 ::before（讓藍色 tab 可以被蓋住） */
    .success-case-bubble {
        width: auto;
        margin: 0;
        padding: 30px 20px 28px;
        border-radius: 16px;
        min-height: 0;
        background: transparent !important;
        isolation: isolate;
        overflow: visible;
    }
    /* 灰底 overlay，z-index:1，可蓋住 z-index:0 的 title */
    .success-case-bubble::before {
        display: block;
        content: '';
        position: absolute;
        inset: 0;
        background: #d9d9d9;
        border-radius: inherit;
        z-index: 1;
    }
    /* 左下角小箭頭/尾巴（speech bubble tail） */
    .success-case-bubble::after {
        display: block;
        content: '';
        position: absolute;
        left: 22px;
        bottom: -10px;
        top: auto;
        transform: none;
        border: none;
        width: 18px;
        height: 14px;
        background: #d9d9d9;
        clip-path: polygon(0 0, 100% 0, 30% 100%);
        z-index: 1;
    }

    /* 標題 tab：藏在灰色底下、上方露出（與電腦版同效果） */
    .success-case-bubble-title {
        font-size: 14px;
        padding: 6px 22px 26px;
        left: 0px;
        top: -28px;
        border-radius: 14px;
        letter-spacing: 0.5px;
        z-index: 0;
    }
    .success-case-bubble-text {
        font-size: 12px;
        line-height: 1.7;
    }

    /* 最後一筆不要底線 */
    .success-case-row:last-child {
        border-bottom: none;
    }
}

/* ============================================================
   浮動側邊欄：經濟部產業競爭力輔導團 CTA
   ============================================================ */
.float-cta {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    transition: transform 0.35s ease;
}

/* 收合狀態：整個 panel 滑到右邊 */
.float-cta.is-collapsed .float-cta-panel {
    transform: translateX(calc(100% + 8px));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.float-cta.is-collapsed .float-cta-arrow {
    transform: rotate(180deg);
}

/* 收合/展開 切換按鈕 — 灰色 tab，部分藏在橘色 panel 底下（露出左半） */
.float-cta-toggle {
    position: absolute;
    top: 0px;
    left: -22px;
    width: 36px;
    height: 44px;
    background: #b8b8b8;
    border: none;
    border-radius: 10px 0 0 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: -2px 3px 8px rgba(0, 0, 0, 0.12);
    padding: 0px 12px 0 0;
    z-index: 0;                   /* 灰色在橘色底下 */
    transition: background 0.2s;
}

/* 橘色 panel 浮在灰色 toggle 之上 */
.float-cta-panel {
    position: relative;
    z-index: 1;
}

.float-cta-toggle:hover {
    background: #a8a8a8;
}

.float-cta-arrow {
    font-size: 24px;
    color: #fff;
    line-height: 1;
    font-weight: 700;
    display: inline-block;
    transition: transform 0.3s;
}

/* 收合狀態下按鈕貼緊視窗右邊（panel 滑掉後 toggle 仍可點） */
.float-cta.is-collapsed .float-cta-toggle {
    left: auto;
    right: 0;
    top: 14px;
    border-radius: 10px 0 0 10px;
}

/* 主橘色 panel */
.float-cta-panel {
    background: #FF8C2E;
    color: #fff;
    padding: 22px 26px 24px;
    border-radius: 16px;
    box-shadow: -6px 10px 24px rgba(255, 140, 46, 0.35);
    min-width: 320px;
    max-width: 360px;
    transition: transform 0.35s ease, opacity 0.25s ease;
}

.float-cta-title {
    margin: 0 0 14px;
    font-family: "Noto Sans TC", sans-serif;
    font-size: clamp(18px, 1.4vw, 22px);
    font-weight: 700;
    letter-spacing: 1px;
}

.float-cta-title em {
    font-style: italic;
}

.float-cta-list {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
}

.float-cta-list li {
    font-family: "Noto Sans TC", sans-serif;
    font-size: clamp(14px, 1.05vw, 17px);
    line-height: 2;
    padding-left: 18px;
    position: relative;
}

.float-cta-list li::before {
    content: '•';
    position: absolute;
    left: 4px;
    top: 0;
    font-size: 1.2em;
}

.float-cta-btn {
    display: block;
    background: #fff;
    color: #FF6A1A;
    text-align: center;
    padding: 12px 20px;
    border-radius: 12px;
    font-family: "Noto Sans TC", sans-serif;
    font-size: clamp(15px, 1.15vw, 18px);
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    letter-spacing: 1px;
}

.float-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

/* Tablet */
@media (max-width: 1024px) {
    .float-cta-panel {
        min-width: 260px;
        max-width: 300px;
        padding: 18px 22px 20px;
    }
}

/* Mobile：手機版預設收合 */
@media (max-width: 767px) {
    .float-cta-panel {
        min-width: 240px;
        max-width: 280px;
        padding: 16px 18px 18px;
    }
    .float-cta-title { font-size: 16px; margin-bottom: 10px; }
    .float-cta-list li { font-size: 13px; line-height: 1.85; }
    .float-cta-btn { font-size: 14px; padding: 10px 16px; }
    .float-cta-toggle { width: 28px; }
    .float-cta-arrow { font-size: 22px; }
}
