: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;
}

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

/* 響應式 */
@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; }
}
