/* =========================================================
   實習專區 practice.html 專用樣式
   沿用 labs.css 的基礎（色彩、開場、跑馬燈、進場動畫），
   本檔只放實習頁新增的元件；全部限定在 .intern-page 之下。
   ========================================================= */
.intern-page { --accent: #E4572E; padding-bottom: 0; }

/* ---------- 實習成果：機構案例 ---------- */
.case { background: var(--paper); border-radius: 24px; overflow: hidden; box-shadow: 0 1px 0 var(--line), 0 40px 80px -50px rgba(18, 19, 22, .45); }
.case + .case { margin-top: 40px; }
.case-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 32px; align-items: end; padding: clamp(28px, 4vw, 48px) clamp(24px, 4vw, 48px) 28px; border-bottom: 1px solid var(--line); }
.case-head .labs-mono { color: var(--accent); }
.case-head h4 { margin: 10px 0 0; font-size: clamp(26px, 3.4vw, 40px); font-weight: 900; line-height: 1.2; color: var(--ink); }
.case-head h4 small { display: block; font-size: .42em; font-weight: 700; letter-spacing: .12em; color: var(--ink-3); margin-top: 8px; }
.case-badge { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 112px; height: 112px; border-radius: 50%; background: var(--accent); color: #fff; text-align: center; transform: rotate(-8deg); box-shadow: 0 14px 30px -14px var(--accent); }
.case-badge b { font-size: 34px; font-weight: 900; line-height: 1; }
.case-badge span { font-size: 12px; margin-top: 4px; line-height: 1.3; }

.case-top { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); }
/* 影片（點擊才載入 YouTube，節省流量） */
.video { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.video img { width: 100%; height: 100%; object-fit: cover; opacity: .82; transition: transform 1s cubic-bezier(.2, .8, .2, 1), opacity .3s; }
.video button { position: absolute; inset: 0; width: 100%; border: 0; background: linear-gradient(0deg, rgba(0, 0, 0, .65), transparent 55%); cursor: pointer; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; padding: clamp(18px, 3vw, 32px); color: #fff; text-align: left; font-family: inherit; }
.video .play { position: absolute; left: 50%; top: 50%; width: 86px; height: 86px; margin: -43px 0 0 -43px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; box-shadow: 0 0 0 0 rgba(228, 87, 46, .55); animation: playPulse 2.2s ease-out infinite; transition: transform .25s; }
.video .play::before { content: ""; margin-left: 6px; border-style: solid; border-width: 15px 0 15px 24px; border-color: transparent transparent transparent #fff; }
.video button:hover .play { transform: scale(1.08); }
.video button:hover img, .video:hover img { transform: scale(1.03); opacity: 1; }
.video .vt { font-size: clamp(16px, 1.8vw, 20px); font-weight: 900; line-height: 1.4; text-shadow: 0 2px 10px rgba(0, 0, 0, .4); }
.video .vs { font-size: 13px; opacity: .85; margin-top: 4px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@keyframes playPulse { 0% { box-shadow: 0 0 0 0 rgba(228, 87, 46, .55); } 80%, 100% { box-shadow: 0 0 0 26px rgba(228, 87, 46, 0); } }

/* 統一欄位（填寫範本對應） */
.facts { margin: 0; padding: clamp(22px, 3vw, 32px); display: grid; gap: 0; align-content: start; background: #faf9f6; border-left: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.facts div:last-child { border-bottom: 0; }
.facts dt { font-size: 13px; font-weight: 700; color: var(--ink-3); display: flex; gap: 6px; align-items: baseline; }
.facts dt i { color: var(--accent); width: 14px; text-align: center; }
.facts dd { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink); }
.facts dd small { display: block; color: var(--ink-3); font-size: 12.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { font-size: 13px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }

.case-body { padding: clamp(24px, 4vw, 48px); display: grid; gap: 40px; }
.case-lead { font-size: 17px; line-height: 1.9; color: var(--ink-2); max-width: 52em; margin: 0; }
.case-lead b { color: var(--ink); }

/* 照片牆（便當盒排版） */
.sub-title { display: flex; align-items: baseline; gap: 12px; margin: 0 0 16px; font-size: 20px; font-weight: 900; color: var(--ink); }
.sub-title span { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 120px; gap: 10px; }
.bento a { position: relative; overflow: hidden; border-radius: 14px; background: #ddd; display: block; }
.bento img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s cubic-bezier(.2, .8, .2, 1); }
.bento a:hover img { transform: scale(1.06); }
.bento figcaption { position: absolute; left: 10px; bottom: 10px; right: 10px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.bento figcaption b { font-size: 11px; font-weight: 700; letter-spacing: .08em; background: var(--accent); color: #fff; padding: 2px 8px; border-radius: 5px; }
.bento figcaption span { font-size: 13px; color: #fff; font-weight: 700; text-shadow: 0 1px 6px rgba(0, 0, 0, .6); opacity: 0; transform: translateY(6px); transition: .3s; }
.bento a:hover figcaption span, .bento a:focus-visible figcaption span { opacity: 1; transform: none; }
.bento a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, .45), transparent 45%); pointer-events: none; }
.bento figure { margin: 0; height: 100%; }
.bento { grid-auto-rows: 100px; }
.b1 { grid-area: 1 / 1 / 4 / 4; }
.b2 { grid-area: 1 / 4 / 3 / 7; }
.b3 { grid-area: 3 / 4 / 5 / 6; }
.b4 { grid-area: 3 / 6 / 7 / 7; }
.b5 { grid-area: 4 / 1 / 7 / 3; }
.b6 { grid-area: 4 / 3 / 7 / 4; }
.b7 { grid-area: 5 / 4 / 7 / 6; }

/* 職務說明 */
.roles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.role { border: 1.5px solid var(--ink); border-radius: 16px; padding: 18px; display: grid; gap: 8px; align-content: start; transition: background .25s, color .25s, transform .25s; }
.role:hover { background: var(--ink); color: #fff; transform: translateY(-3px); }
.role i { font-size: 22px; color: var(--accent); }
.role b { font-size: 16px; }
.role p { margin: 0; font-size: 13.5px; line-height: 1.6; color: inherit; opacity: .75; }

/* 實習生心得 */
.voices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.voice { margin: 0; background: #fff6ec; border-radius: 18px; padding: 22px 20px 18px; position: relative; display: flex; flex-direction: column; gap: 14px; }
.voice:nth-child(2) { background: #eef5ff; } .voice:nth-child(3) { background: #f1f8ee; } .voice:nth-child(4) { background: #fbeff4; }
.voice::before { content: "“"; position: absolute; right: 14px; top: -6px; font-size: 80px; font-weight: 900; line-height: 1; color: var(--accent); opacity: .25; font-family: Georgia, serif; }
.voice blockquote { margin: 0; padding: 0; border: 0; font-size: 15px; line-height: 1.8; color: var(--ink); }
.voice figcaption { margin-top: auto; font-size: 13px; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.voice figcaption::before { content: ""; width: 18px; height: 2px; background: var(--accent); }

.more-soon { margin-top: 36px; }

/* ---------- 下半部：實習規定 ---------- */
.rule-band { background: var(--ink); color: #fff; padding: 88px 0 96px; margin-top: 96px; }
.rule-band .labs-section-head { border-bottom-color: rgba(255, 255, 255, .15); }
.rule-band .labs-section-head h3 { color: #fff; }
.rule-band .labs-section-head p { color: rgba(255, 255, 255, .6); }

.keyfacts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 64px; }
.keyfact { border: 1px solid rgba(255, 255, 255, .16); border-radius: 18px; padding: 22px; display: grid; gap: 6px; align-content: start; }
.keyfact b { font-size: clamp(32px, 3.6vw, 44px); font-weight: 900; line-height: 1; color: #ffd24d; font-variant-numeric: tabular-nums; }
.keyfact b small { font-size: .4em; font-weight: 700; margin-left: 4px; color: #fff; }
.keyfact span { font-size: 14px; line-height: 1.6; color: rgba(255, 255, 255, .72); }
.keyfact.alert { background: #E4572E; border-color: #E4572E; }
.keyfact.alert b { color: #fff; font-size: 20px; line-height: 1.4; }
.keyfact.alert a { color: #fff; font-weight: 900; font-size: 18px; text-decoration: underline; text-underline-offset: 3px; }

/* 流程 */
.flow-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.flow-tabs button { appearance: none; border: 1.5px solid rgba(255, 255, 255, .4); background: transparent; color: #fff; border-radius: 999px; padding: 10px 20px; font: 700 15px/1.2 inherit; font-family: inherit; cursor: pointer; text-align: left; }
.flow-tabs button small { display: block; font-weight: 500; font-size: 12px; opacity: .7; margin-top: 3px; }
.flow-tabs button[aria-selected="true"] { background: #fff; color: var(--ink); border-color: #fff; }
.flow[hidden] { display: none; }
.flow ol { list-style: none; margin: 0; padding: 0 0 12px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; counter-reset: st; }
.flow > ol > li { scroll-snap-align: start; counter-increment: st; background: rgba(255, 255, 255, .06); border-radius: 16px; padding: 18px 18px 20px; position: relative; display: grid; gap: 10px; align-content: start; }
.flow > ol > li::before { content: counter(st); font-size: 44px; font-weight: 900; line-height: 1; color: var(--flow, #9bd14b); }
.flow > ol > li:not(:last-child)::after { content: "→"; position: absolute; right: 14px; top: 20px; font-size: 20px; color: rgba(255, 255, 255, .35); }
.flow > ol > li > b { font-size: 17px; }
.flow > ol > li > ul { margin: 0; padding: 0 0 0 16px; list-style: disc; display: grid; gap: 6px; font-size: 13.5px; line-height: 1.6; color: rgba(255, 255, 255, .75); }
.flow li em { font-style: normal; color: #ffd24d; }
.flow .who { display: inline-block; font-size: 13px; font-weight: 700; background: var(--flow, #9bd14b); color: var(--ink); padding: 4px 12px; border-radius: 6px; margin-bottom: 14px; }
.flow-hint { font-size: 12.5px; color: rgba(255, 255, 255, .5); margin-top: 6px; }

/* 全年實習資格 */
.qualify { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 16px; margin-top: 64px; }
.qbox { background: #fff; color: var(--ink); border-radius: 20px; padding: 26px; }
.qbox h4 { margin: 0 0 4px; font-size: 20px; font-weight: 900; }
.qbox p.s { margin: 0 0 14px; font-size: 13.5px; color: var(--ink-3); }
.qbox ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.qbox li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; font-size: 14.5px; line-height: 1.6; }
.qbox li::before { content: "✓"; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; font-weight: 900; display: grid; place-items: center; margin-top: 2px; }

/* 實施要點全文 */
.rules { margin-top: 64px; display: grid; gap: 10px; }
.rules details { background: rgba(255, 255, 255, .06); border-radius: 16px; overflow: hidden; }
.rules summary { list-style: none; cursor: pointer; padding: 18px 22px; display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; }
.rules summary::-webkit-details-marker { display: none; }
.rules summary .n { font-size: 13px; font-weight: 700; color: #ffd24d; font-family: ui-monospace, Menlo, monospace; }
.rules summary b { font-size: 17px; }
.rules summary b small { display: block; font-size: 13px; font-weight: 400; color: rgba(255, 255, 255, .55); margin-top: 2px; }
.rules summary::after { content: "+"; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .5); display: grid; place-items: center; font-size: 18px; transition: transform .25s; }
.rules details[open] summary::after { transform: rotate(45deg); }
.rules details[open] { background: rgba(255, 255, 255, .1); }
.rules .rbody { padding: 0 22px 22px 78px; }
.rules ol { margin: 0; padding-left: 1.4em; display: grid; gap: 10px; font-size: 15px; line-height: 1.85; color: rgba(255, 255, 255, .82); }
.rules ol ol { margin-top: 8px; gap: 4px; list-style: lower-roman; }
.rules ol ol ol { list-style: lower-alpha; }

/* 下載與連結 */
.dl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 48px; }
.dl { display: grid; grid-template-columns: 48px 1fr auto; gap: 14px; align-items: center; padding: 18px 20px; border-radius: 16px; background: #fff; color: var(--ink) !important; transition: transform .25s, box-shadow .25s; }
.dl:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -16px rgba(0, 0, 0, .6); }
.dl .ic { width: 48px; height: 48px; border-radius: 12px; background: var(--bg); display: grid; place-items: center; font-size: 20px; color: var(--accent); }
.dl b { font-size: 15.5px; line-height: 1.4; }
.dl small { display: block; font-size: 12.5px; color: var(--ink-3); font-weight: 400; margin-top: 2px; }
.dl .go { font-size: 18px; color: var(--ink-3); transition: transform .25s; }
.dl:hover .go { transform: translate(3px, -3px); color: var(--accent); }

/* ---------- 響應式 ---------- */
@media (max-width: 991px) {
	.case-top { grid-template-columns: 1fr; }
	.facts { border-left: 0; border-top: 1px solid var(--line); }
	.roles, .voices, .keyfacts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.qualify, .dl-grid { grid-template-columns: 1fr; }
	.bento { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 110px; grid-auto-flow: dense; }
	.bento a.b1 { grid-column: span 4; grid-row: span 3; }
	.bento a.b2 { grid-column: span 4; grid-row: span 2; }
	.bento a.b3, .bento a.b5, .bento a.b6, .bento a.b7 { grid-column: span 2; grid-row: span 2; }
	.bento a.b4 { grid-column: span 2; grid-row: span 3; }
}
@media (max-width: 680px) {
	.case-head { grid-template-columns: 1fr; }
	.case-badge { width: 86px; height: 86px; justify-self: start; }
	.case-badge b { font-size: 26px; }
	.case-head { position: relative; }
	.roles, .voices, .keyfacts { grid-template-columns: 1fr; }
	.bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 120px; }
	.bento a.b1, .bento a.b2 { grid-column: span 2; grid-row: span 2; }
	.bento a.b3, .bento a.b4, .bento a.b5, .bento a.b6, .bento a.b7 { grid-column: span 1; grid-row: span 2; }
	.bento figcaption span { opacity: 1; transform: none; font-size: 12px; }
	.facts div { grid-template-columns: 76px minmax(0, 1fr); }
	.rules summary { grid-template-columns: 34px 1fr auto; padding: 16px; }
	.rules .rbody { padding: 0 16px 18px 16px; }
	.rule-band { padding: 64px 0 72px; }
}
@media (prefers-reduced-motion: reduce) { .video .play { animation: none; } }
@media (max-width: 680px) {
	.bento a.b7 { grid-column: span 2; }
	.video .vt { display: none; }
	.rules summary { grid-template-columns: 46px 1fr auto; }
	.rules summary .n { font-size: 11.5px; white-space: nowrap; }
}

/* ---------- 頁內選單（實習成果／實習法規與流程） ---------- */
.intern-page { overflow: visible; overflow-x: clip; --hdr: 0px; }   /* 讓選單可以 sticky */
.intern-subnav { position: sticky; top: var(--hdr); z-index: 90; background: rgba(243, 243, 240, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.intern-subnav .labs-wrap { display: grid; grid-template-columns: 1fr 1fr; }
.intern-subnav a { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 16px 20px 14px; color: var(--ink-3); transition: color .25s, background .25s; }
.intern-subnav a + a { border-left: 1px solid var(--line); }
.intern-subnav a .no { grid-row: 1 / 3; font: 900 26px/1 ui-monospace, Menlo, monospace; color: currentColor; opacity: .5; }
.intern-subnav a b { font-size: 18px; font-weight: 900; line-height: 1.3; }
.intern-subnav a small { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.intern-subnav a::after { content: ""; position: absolute; left: 20px; right: 20px; bottom: -1px; height: 4px; border-radius: 4px 4px 0 0; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.intern-subnav a:hover { color: var(--ink); background: rgba(255, 255, 255, .6); }
.intern-subnav a.is-on { color: var(--ink); }
.intern-subnav a.is-on .no { color: var(--accent); opacity: 1; }
.intern-subnav a.is-on::after { transform: scaleX(1); }
#showcase, #rules { scroll-margin-top: calc(var(--hdr) + 90px); }
.intern-page .labs-intro { padding-top: 64px; }
@media (max-width: 680px) {
	.intern-subnav a { padding: 12px 10px 10px; column-gap: 8px; }
	.intern-subnav a .no { font-size: 18px; }
	.intern-subnav a b { font-size: 15px; }
	.intern-subnav a small { display: none; }
	.intern-subnav a::after { left: 10px; right: 10px; }
}
/* 選單與主視覺圖片之間留白 */
.intern-page { padding-top: 36px; }
.intern-subnav { border-top: 1px solid var(--line); }
.intern-page .labs-intro { padding-top: 56px; }
@media (max-width: 680px) { .intern-page { padding-top: 20px; } .intern-page .labs-intro { padding-top: 40px; } }
/* 點選選單後，標題與選單之間保留適當距離 */
#showcase, #rules { scroll-margin-top: calc(var(--hdr) + var(--subnav, 88px) + 48px); }
@media (max-width: 680px) { #showcase, #rules { scroll-margin-top: calc(var(--hdr) + var(--subnav, 44px) + 32px); } }
/* 選單精簡版：單行排列，降低高度 */
.intern-subnav a { grid-template-columns: auto auto 1fr; grid-template-rows: auto; column-gap: 10px; align-items: baseline; padding: 12px 20px 11px; }
.intern-subnav a .no { grid-row: auto; font-size: 15px; }
.intern-subnav a b { font-size: 16px; }
.intern-subnav a small { font-size: 10.5px; letter-spacing: .14em; }
.intern-subnav a::after { height: 3px; }
@media (max-width: 680px) {
	.intern-subnav a { padding: 10px 10px 9px; column-gap: 6px; }
	.intern-subnav a .no { font-size: 13px; }
	.intern-subnav a b { font-size: 14.5px; }
}
/* 效能：捲動順暢 */
.intern-subnav { backdrop-filter: none; -webkit-backdrop-filter: none; background: #f3f3f0; }
.video .play { animation: none; box-shadow: none; }
.video .play::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--accent); animation: playRing 2.2s ease-out infinite; will-change: transform, opacity; }
@keyframes playRing { 0% { transform: scale(1); opacity: .7; } 80%, 100% { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .video .play::after { animation: none; } }
