/* 17FIT 商學院 — blog 首頁 */
:root {
  --blue: #2F6FEB;
  --blue-700: #1F54C4;
  --blue-50: #EEF3FE;
  --blue-100: #DCE7FD;
  --ink: #111827;
  --ink-2: #374151;
  --ink-3: #5B6472;
  --line: #E3E7EE;
  --bg: #F6F8FB;
  --card: #FFFFFF;
  --font: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, monospace;
  --radius: 12px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.7; color: var(--ink-2); background: var(--bg); }
[hidden]:not([hidden="until-found" i]) { display: none !important; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------- Intro ---------- */
.intro {
  background: var(--card); border-bottom: 1px solid var(--line);
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 32px 32px; background-position: -1px -1px;
}
.intro-in { max-width: 1120px; margin: 0 auto; padding: 64px 24px 56px; background: linear-gradient(180deg, rgba(255,255,255,.55), #fff 80%); }
.kicker {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 4px 12px; border-radius: 999px;
  font-size: 14px; font-weight: 600; letter-spacing: .04em; color: var(--blue-700); background: var(--blue-50);
}
.kicker::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.intro h1 { margin: 0 0 16px; font-size: clamp(34px, 6vw, 56px); line-height: 1.15; font-weight: 800; letter-spacing: -.01em; color: var(--ink); }
.intro-desc { margin: 0 0 32px; max-width: 36em; font-size: clamp(16px, 2vw, 19px); color: var(--ink-2); }

.search { max-width: 560px; }
.search-label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 700; color: var(--ink); }
.search-box { position: relative; display: flex; align-items: center; }
.search-ico { position: absolute; left: 16px; color: var(--ink-3); --od-icon-size: 20px; pointer-events: none; }
.search-box input {
  width: 100%; height: 56px; padding: 0 52px 0 48px; font: inherit; font-size: 17px; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: 14px;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.search-box input::placeholder { color: #8A93A0; }
.search-box input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(47,111,235,.16); }
.search-box input::-webkit-search-cancel-button { display: none; }
.search-clear {
  position: absolute; right: 8px; width: 40px; height: 40px; border: 0; border-radius: 10px; background: none;
  color: var(--ink-3); cursor: pointer; display: flex; align-items: center; justify-content: center; --od-icon-size: 18px;
}
.search-clear:hover { background: var(--blue-50); color: var(--ink); }

/* ---------- Browse ---------- */
.browse-in { max-width: 1120px; margin: 0 auto; padding: 48px 24px 64px; scroll-margin-top: var(--top-offset, 64px); }
.browse { scroll-margin-top: var(--top-offset, 64px); }
.browse-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 16px; }
.browse-head h2 { margin: 0; font-size: 24px; line-height: 1.3; color: var(--ink); font-weight: 800; }
.status { margin: 0; font-size: 14px; color: var(--ink-3); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; margin: 0 -2px 16px; scrollbar-width: thin; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px;
  font: inherit; font-size: 15px; font-weight: 600; color: var(--ink-2); white-space: nowrap;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
  transition: border-color .15s var(--ease), background-color .15s var(--ease), color .15s var(--ease);
}
.chip:hover { border-color: var(--blue); color: var(--blue-700); }
.chip-n { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--ink-3); background: var(--bg); border-radius: 999px; padding: 0 8px; line-height: 20px; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip[aria-pressed="true"] .chip-n { background: rgba(255,255,255,.18); color: #fff; }

/* ---------- Post cards ---------- */
.posts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.post-card { margin: 0; min-width: 0; }
.pc-link {
  display: flex; flex-direction: column; gap: 12px; height: 100%; padding: 24px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink-2); text-decoration: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.pc-link:hover { border-color: var(--blue); box-shadow: 0 12px 32px rgba(47,111,235,.12); transform: translateY(-2px); }
.pc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 13px; color: var(--ink-3); }
.pc-cat { font-weight: 700; color: var(--blue-700); background: var(--blue-50); border-radius: 6px; padding: 2px 8px; white-space: nowrap; }
.pc-meta time, .pc-read { white-space: nowrap; }
.pc-title { margin: 0; font-size: 20px; line-height: 1.45; font-weight: 800; color: var(--ink); }
.pc-excerpt { margin: 0; font-size: 15px; line-height: 1.7; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pc-tags li { font-size: 12px; color: var(--ink-3); border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; line-height: 22px; }
.pc-more { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; color: var(--blue-700); --od-icon-size: 16px; }
.pc-link:hover .pc-more .od-icon { transform: translateX(3px); }
.pc-more .od-icon { transition: transform .2s var(--ease); }

/* Featured */
.post-card.is-featured { grid-column: 1 / -1; }
.is-featured .pc-link { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; padding: 32px; align-items: center; }
.pc-body { display: flex; flex-direction: column; gap: 12px; min-width: 0; height: 100%; }
.is-featured .pc-title { font-size: clamp(22px, 3vw, 30px); line-height: 1.35; }
.is-featured .pc-excerpt { font-size: 16px; -webkit-line-clamp: 4; }
.pc-badge { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .06em; color: #fff; background: var(--blue); border-radius: 6px; padding: 2px 8px; }
.pc-cover { display: block; width: 100%; overflow: hidden; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.pc-cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease); }
.pc-link:hover .pc-cover img { transform: scale(1.02); }
.post-card:not(.is-featured) .pc-cover { margin: -8px -8px 4px; width: calc(100% + 16px); }
@media (max-width: 1023px) {
  .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .is-featured .pc-link { grid-template-columns: 1fr; gap: 24px; padding: 24px; }
  .intro-in { padding: 48px 16px 40px; }
  .browse-in { padding: 40px 16px 48px; }
}
@media (max-width: 640px) { .posts { grid-template-columns: 1fr; } }

/* ---------- Empty ---------- */
.empty { text-align: center; padding: 48px 24px; background: var(--card); border: 1px dashed #C9D1DD; border-radius: var(--radius); }
.empty-ico { --od-icon-size: 40px; color: var(--ink-3); margin-bottom: 8px; }
.empty-title { margin: 0 0 4px; font-size: 18px; font-weight: 800; color: var(--ink); }
.empty-desc { margin: 0 0 20px; color: var(--ink-3); }
.more { display: flex; justify-content: center; margin-top: 32px; }
.more-n { font-weight: 400; color: var(--ink-3); margin-left: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 24px;
  border-radius: 999px; font: inherit; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease); --od-icon-size: 18px;
}
.btn-primary { background: var(--blue); color: #fff; border: 0; }
.btn-primary:hover { background: var(--blue-700); color: #fff; }
.btn-ghost { background: #fff; color: var(--blue-700); border: 2px solid var(--blue); }
.btn-ghost:hover { background: var(--blue-50); color: var(--ink); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--ink); color: #D7DCE4; }
.cta-in { max-width: 1120px; margin: 0 auto; padding: 48px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta-in h2 { margin: 0 0 8px; font-size: clamp(22px, 3vw, 28px); line-height: 1.35; color: #fff; }
.cta-in p { margin: 0; max-width: 40em; color: #C3CAD5; }
@media (max-width: 1023px) { .cta-in { padding: 40px 16px; } }
.od-icon { width: var(--od-icon-size, 1em); height: var(--od-icon-size, 1em); flex: none; display: inline-block; vertical-align: middle; }
