:root {
  --navy: #0b2545;
  --navy-deep: #061a36;
  --gold: #c9a24b;
  --gold-bright: #e6c878;
  --cream: #faf6ee;
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --line: rgba(11, 37, 69, 0.12);
  --shadow: 0 8px 32px rgba(11, 37, 69, 0.12);
  --shadow-lift: 0 16px 48px rgba(11, 37, 69, 0.25);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  font-family: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ===== 封面 ===== */
.cover {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 100%);
  color: var(--cream);
  padding: 24px 40px 40px;
  display: flex;
  flex-direction: column;
}

.cover-header {
  text-align: center;
  max-width: 1600px;
  margin: 0 auto 20px;
  flex-shrink: 0;
}

.cover-date {
  display: inline-block;
  font-size: 28px;
  letter-spacing: 8px;
  color: var(--gold-bright);
  border: 1px solid var(--gold);
  padding: 8px 28px;
  margin-bottom: 14px;
  font-weight: 300;
}

.cover-title {
  font-size: clamp(56px, 7vw, 88px);
  font-weight: 700;
  letter-spacing: 12px;
  margin-bottom: 8px;
  background: linear-gradient(180deg, #fff 0%, var(--gold-bright) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cover-subtitle {
  font-size: 22px;
  letter-spacing: 4px;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 300;
}

.cover-divider {
  width: 48px;
  height: 1px;
  background: var(--gold);
  margin: 10px auto;
}

/* ===== 搜尋欄 ===== */
.search-wrap {
  position: relative;
  max-width: 520px;
  margin: 18px auto 4px;
}

.search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(201, 162, 75, 0.55);
  color: var(--cream);
  font-size: 16px;
  letter-spacing: 1px;
  padding: 12px 44px 12px 44px;
  border-radius: 999px;
  outline: none;
  transition: all 0.2s;
  font-family: inherit;
  -webkit-appearance: none;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.5px;
  font-size: 14px;
}

.search-input:focus {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 3px rgba(201, 162, 75, 0.2);
}

.search-input::-webkit-search-cancel-button { display: none; }

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold-bright);
  display: flex;
  pointer-events: none;
}

.search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: var(--cream);
  border: none;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 0 2px;
  transition: background 0.15s;
}

.search-clear.show { display: flex; }
.search-clear:hover { background: rgba(201, 162, 75, 0.7); color: var(--navy-deep); }

.search-hint {
  min-height: 20px;
  margin-top: 8px;
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--gold-bright);
  text-align: center;
}

.search-hint.empty { color: rgba(255, 255, 255, 0.55); }

/* 搜尋過濾狀態：命中 / 未命中 */
.category-board.filtering .logo-card.dim {
  opacity: 0.18;
  filter: grayscale(0.8);
  pointer-events: none;
}

.category-board.filtering .logo-card.hit {
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
  box-shadow: 0 12px 36px rgba(201, 162, 75, 0.4);
  transform: translateY(-4px);
}

@media (max-width: 640px) {
  .search-wrap { max-width: 92%; }
  .search-input { font-size: 15px; padding: 11px 40px 11px 40px; }
  .search-input::placeholder { font-size: 13px; }
}

.logo-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 18px;
  max-width: 1760px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
  min-height: 0;
}

/* ===== 業態分類佈局 ===== */
.category-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  max-width: 1760px;
  width: 100%;
  margin: 0 auto;
}

.cat-col {
  display: flex;
  flex-direction: column;
}

.cat-head {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 100%);
  color: var(--navy-deep);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 6px;
  text-align: center;
  padding: 10px 8px;
  border-radius: 12px 12px 0 0;
  margin-bottom: 12px;
  box-shadow: 0 4px 14px rgba(201, 162, 75, 0.25);
}

.cat-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cat-list .logo-card {
  aspect-ratio: 5 / 4;
}

.logo-card {
  background: #fff;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 18px 18px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  min-height: 0;
}

.logo-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(201, 162, 75, 0.12));
  opacity: 0;
  transition: opacity 0.3s;
}

.logo-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
}

.logo-card:hover::before { opacity: 1; }

.logo-img {
  width: 100%;
  flex: 1;
  object-fit: contain;
  margin-bottom: 16px;
  min-height: 0;
}

.logo-placeholder {
  width: 80%;
  flex: 1;
  border: 2px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
  border-radius: 8px;
}

.logo-meta {
  width: 100%;
  text-align: center;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.logo-name {
  font-size: 22px;
  color: var(--navy);
  line-height: 1.35;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.logo-industry {
  display: inline-block;
  font-size: 18px;
  color: var(--gold);
  background: rgba(201, 162, 75, 0.12);
  padding: 5px 16px;
  border-radius: 14px;
  letter-spacing: 2px;
  font-weight: 500;
}

.logo-count {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--navy);
  color: var(--gold-bright);
  font-size: 18px;
  padding: 4px 14px;
  border-radius: 14px;
  font-weight: 600;
  letter-spacing: 2px;
}

/* ===== 公司頁 ===== */
.page {
  min-height: 100vh;
  background: var(--cream);
}

.topbar {
  background: var(--navy);
  color: var(--cream);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-bright);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s;
}

.back-btn:hover { color: #fff; }

.topbar-title {
  font-size: 16px;
  letter-spacing: 4px;
  color: rgba(255, 255, 255, 0.8);
}

.topbar-meta {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 2px;
}

.company-header {
  max-width: 1760px;
  margin: 0 auto;
  padding: 28px 40px 20px;
}

.company-header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
}

.company-header-text {
  flex: 1;
}

.company-logo-wrap {
  width: 130px;
  height: 130px;
  flex-shrink: 0;
  background: #fff;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  box-shadow: var(--shadow);
}

.company-logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.company-logo-wrap .placeholder {
  font-size: 36px;
  font-weight: 700;
  color: var(--navy);
}

.company-name {
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.company-industry {
  display: inline-block;
  font-size: 16px;
  color: var(--gold);
  background: rgba(201, 162, 75, 0.12);
  border: 1px solid rgba(201, 162, 75, 0.3);
  padding: 5px 16px;
  border-radius: 14px;
  letter-spacing: 2px;
  font-weight: 500;
  margin-right: 12px;
  vertical-align: middle;
}

.company-stat {
  display: inline-block;
  font-size: 15px;
  color: var(--ink-soft);
  letter-spacing: 3px;
  vertical-align: middle;
}

.company-product {
  font-size: 18px;
  color: var(--ink);
  line-height: 1.6;
  margin: 10px 0 0;
  font-weight: 400;
}


/* ===== 雙欄：左學員 + 右簡報 ===== */
.two-col {
  max-width: 1760px;
  margin: 0 auto;
  padding: 8px 40px 40px;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  align-items: start;
}

.col-students { min-width: 0; }
.col-slides { min-width: 0; }

.student-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 簡報輪播 */
.slides-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 32px 48px;
}

.section-title {
  font-size: 20px;
  letter-spacing: 8px;
  color: var(--navy);
  font-weight: 700;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.section-title::before {
  content: "";
  width: 32px;
  height: 3px;
  background: var(--gold);
}

.slide-viewer {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
}

.slide-stage {
  aspect-ratio: 16 / 9;
  background: #f3eee2;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.slide-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.slide-empty {
  color: var(--ink-soft);
  font-size: 14px;
  letter-spacing: 2px;
  text-align: center;
}

.slide-empty small {
  display: block;
  margin-top: 8px;
  color: #999;
  font-size: 12px;
}

.slide-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(11, 37, 69, 0.7);
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.slide-nav:hover { background: var(--navy); }
.slide-nav.prev { left: 16px; }
.slide-nav.next { right: 16px; }

.slide-thumbs {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  background: #fafafa;
  border-top: 1px solid var(--line);
  justify-content: center;
}

.thumb {
  width: 110px;
  aspect-ratio: 16 / 9;
  background: #fff;
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--ink-soft);
}

.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.active { border-color: var(--gold); }

/* 學員卡（垂直：上照片 下資訊） */
.student-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.student-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.student-photo {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, #e8dfc7, #d9c995);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  font-weight: 700;
  color: var(--navy);
}

.student-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }

.student-info {
  padding: 8px 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
}

.student-title {
  font-size: 11px;
  color: var(--gold);
  background: rgba(201, 162, 75, 0.1);
  padding: 2px 8px;
  border-radius: 9px;
  letter-spacing: 0.5px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.student-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 1px;
  line-height: 1.2;
}

.student-nickname {
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.5px;
  font-style: italic;
}

.student-spouse {
  display: inline-block;
  font-size: 11px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 100%);
  color: var(--navy-deep);
  padding: 2px 9px;
  border-radius: 9px;
  letter-spacing: 1px;
  font-weight: 600;
  margin-top: 2px;
}

.student-spouse::before { content: "♥ "; }

.student-bio {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* ===== 座位表 ===== */
.seat-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 32px 48px;
}

.seat-header {
  text-align: center;
  margin-bottom: 22px;
}

.seat-header h2 {
  font-size: 30px;
  letter-spacing: 12px;
  color: var(--navy);
  font-weight: 700;
  margin-bottom: 16px;
}

.seat-search-wrap {
  position: relative;
  max-width: 480px;
  margin: 0 auto 8px;
}

.seat-search-input {
  width: 100%;
  background: #fff;
  border: 1px solid rgba(201, 162, 75, 0.55);
  color: var(--ink);
  font-size: 15px;
  letter-spacing: 1px;
  padding: 10px 40px 10px 40px;
  border-radius: 999px;
  outline: none;
  transition: all 0.2s;
  font-family: inherit;
  box-shadow: var(--shadow);
  -webkit-appearance: none;
}

.seat-search-input::placeholder {
  color: rgba(11, 37, 69, 0.4);
  font-size: 14px;
}

.seat-search-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 75, 0.2);
}

.seat-search-input::-webkit-search-cancel-button { display: none; }

.seat-search-wrap .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  pointer-events: none;
}

.seat-search-wrap .search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(11, 37, 69, 0.12);
  color: var(--navy);
  border: none;
  cursor: pointer;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 0 2px;
}

.seat-search-wrap .search-clear.show { display: flex; }
.seat-search-wrap .search-clear:hover { background: var(--gold); color: #fff; }

.seat-hint {
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 2px;
  margin-top: 4px;
}

.seat-hint.empty { color: #b04a4a; }

.seat-board {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 22px;
}

.seat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.seat-zone {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 14px 12px;
  position: relative;
  box-shadow: var(--shadow);
}

.zone-num {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 32px;
  font-weight: 900;
  color: rgba(11, 37, 69, 0.08);
  letter-spacing: 0;
  line-height: 1;
  pointer-events: none;
}

.zone-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.seat-cell {
  background: linear-gradient(180deg, #fdfaf3 0%, #f5edd8 100%);
  border: 1px solid rgba(201, 162, 75, 0.35);
  border-radius: 10px;
  padding: 10px 8px 8px;
  min-height: 76px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.18s;
  position: relative;
  overflow: hidden;
}

.seat-cell:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: 0 8px 20px rgba(201, 162, 75, 0.35);
  background: linear-gradient(180deg, #fff 0%, #fbf1d6 100%);
}

.seat-cell.sub {
  background: linear-gradient(180deg, #fff8e1 0%, #ffe9a8 100%);
  border: 1.5px solid var(--gold);
  box-shadow: 0 4px 12px rgba(201, 162, 75, 0.35);
}

.seat-company {
  font-size: 11px;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 3px;
  line-height: 1.2;
}

.seat-name {
  font-size: 15px;
  color: var(--navy);
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.2;
}

.seat-nick {
  font-size: 11px;
  color: var(--ink-soft);
  font-style: italic;
  margin-top: 2px;
  letter-spacing: 0.5px;
}

.seat-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  background: var(--gold);
  color: var(--navy-deep);
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.4;
}

/* 過濾狀態 */
.seat-board.filtering .seat-cell.dim {
  opacity: 0.2;
  filter: grayscale(0.8);
  pointer-events: none;
}

.seat-board.filtering .seat-cell.hit {
  outline: 3px solid var(--gold-bright);
  outline-offset: 2px;
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 26px rgba(201, 162, 75, 0.55);
  z-index: 2;
}

.podium {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--gold-bright);
  text-align: center;
  padding: 16px;
  border-radius: 12px;
  font-size: 22px;
  letter-spacing: 12px;
  font-weight: 700;
  max-width: 60%;
  margin: 0 auto 22px;
  box-shadow: var(--shadow);
}

.seat-legend {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 1px;
  flex-wrap: wrap;
}

.seat-legend .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(180deg, #fdfaf3 0%, #f5edd8 100%);
  border: 1px solid rgba(201, 162, 75, 0.4);
  margin-right: 6px;
  vertical-align: middle;
}

.seat-legend .dot.sub {
  background: linear-gradient(180deg, #fff8e1 0%, #ffe9a8 100%);
  border: 1.5px solid var(--gold);
}

/* 封面：座位表按鈕 */
.cover-btn-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.cover-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(201, 162, 75, 0.12);
  border: 1px solid var(--gold);
  color: var(--gold-bright);
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 3px;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
  font-family: inherit;
}

.cover-btn:hover {
  background: var(--gold);
  color: var(--navy-deep);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(201, 162, 75, 0.45);
}

.cover-btn-fun {
  background: rgba(230, 200, 120, 0.15);
  border-color: var(--gold-bright);
  color: var(--gold-bright);
}

.cover-btn-fun:hover {
  background: var(--gold-bright);
  color: var(--navy-deep);
  box-shadow: 0 6px 18px rgba(230, 200, 120, 0.55);
}

@media (max-width: 900px) {
  .seat-row { grid-template-columns: 1fr; }
  .podium { max-width: 100%; letter-spacing: 8px; }
  .seat-page { padding: 20px 16px 40px; }
  .seat-name { font-size: 14px; }
}

/* 響應式 */
@media (max-width: 1440px) {
  .logo-grid { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 1200px) {
  .logo-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 900px) {
  .logo-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .cover { padding: 32px 20px 48px; }
}

@media (max-width: 1100px) {
  .two-col { grid-template-columns: 1fr; gap: 24px; }
  .student-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
  }
}

@media (max-width: 640px) {
  .logo-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .cover-title { letter-spacing: 4px; }
  .topbar { padding: 12px 16px; }
  .topbar-title { display: none; }
  .company-header { padding: 24px 16px 16px; }
  .company-header-inner { flex-direction: column; text-align: center; gap: 16px; }
  .two-col { padding: 8px 16px 32px; }
  .slide-thumbs { gap: 6px; padding: 8px; }
  .student-list { grid-template-columns: 1fr; }
  .logo-name { font-size: 13px; }
  .logo-industry { font-size: 10px; }
}
