/* =============================================
   BIOMED-X / TFP 官方網站 - 主要樣式
   ============================================= */

:root {
  /* 主視覺漸層 135deg #131426 → #074E8C → #113F5C */
  --primary: #074E8C;
  --primary-dark: #131426;
  --primary-light: #113F5C;
  --primary-rgb: 7, 78, 140;
  --accent: #40bfff;
  --accent-dark: #0288d1;
  --bg-light: #f4f7f9;
  --bg-white: #ffffff;
  --text-dark: #1a2332;
  --text-muted: #6c7a8d;
  --border: #dde3ea;
  --shadow: 0 2px 16px rgba(var(--primary-rgb),0.08);
  --shadow-hover: 0 6px 28px rgba(var(--primary-rgb),0.18);
  --radius: 10px;
  --radius-lg: 16px;
  --navbar-h: 72px;
}

* { box-sizing: border-box; }

body {
  font-family: 'Noto Sans TC', 'Segoe UI', sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  margin: 0;
  padding-top: var(--navbar-h);
}

/* =============================================
   NAVBAR
   ============================================= */
#mainNavbar {
  min-height: var(--navbar-h);
  background: var(--bg-white);
  border-bottom: 2px solid var(--primary-light);
  box-shadow: 0 2px 12px rgba(var(--primary-rgb),0.10);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1050;
}

/* 導覽列 Logo：預設隱藏；後台開啟時由 main.js 在 html 加上 site-navbar-logo-visible */
.navbar-brand img.site-navbar-logo {
  height: 44px;
  width: auto;
  max-width: min(220px, 46vw);
  object-fit: contain;
  display: none !important;
  flex-shrink: 0;
}

html.site-navbar-logo-visible .navbar-brand img.site-navbar-logo {
  display: block !important;
}

/* Nav items */
.navbar-nav .nav-link {
  color: var(--text-dark) !important;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.5rem 0.85rem !important;
  border-radius: 6px;
  transition: all 0.2s;
  position: relative;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--primary) !important;
  background: rgba(var(--primary-rgb),0.06);
}

/* Dropdown */
.nav-item.dropdown { position: relative; }
.nav-item.dropdown .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--primary);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-hover);
  min-width: 200px;
  padding: 0.5rem 0;
  z-index: 1060;
}
.nav-item.dropdown .dropdown-menu.show {
  display: block;
}
/* 蓋過 Bootstrap 與較高 specificity 規則，確保點擊後 .show 一定會顯示 */
#mainNavbar .nav-item.dropdown .dropdown-menu.show {
  display: block !important;
}
@media (min-width: 992px) and (hover: hover) and (pointer: fine) {
  .nav-item.dropdown:hover .dropdown-menu {
    display: block;
  }
}
.dropdown-menu .dropdown-item {
  padding: 0.55rem 1.2rem;
  font-size: 0.88rem;
  color: var(--text-dark);
  transition: all 0.15s;
  border-left: 3px solid transparent;
}
.dropdown-menu .dropdown-item:hover {
  background: rgba(var(--primary-rgb),0.06);
  color: var(--primary);
  border-left-color: var(--primary);
}

/* Lang switch */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}
.lang-btn {
  padding: 3px 10px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: transparent;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
}
.lang-btn.active, .lang-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* 手機／平板：漢堡展開為整塊實心底板，子選單內嵌展開 */
@media (max-width: 991.98px) {
  #mainNavbar .navbar-collapse {
    flex-basis: 100%;
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.75rem 0 1.25rem;
    background: var(--bg-white);
    border-top: 1px solid var(--border);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: 0 16px 40px rgba(26, 35, 50, 0.12);
    max-height: min(72vh, calc(100dvh - var(--navbar-h) - 12px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  #mainNavbar .navbar-nav {
    width: 100%;
    align-items: stretch;
    gap: 0 !important;
  }
  #mainNavbar .navbar-nav > .nav-item {
    width: 100%;
    border-bottom: 1px solid rgba(221, 227, 234, 0.85);
  }
  #mainNavbar .navbar-nav > .nav-item:last-of-type {
    border-bottom: none;
  }
  #mainNavbar .navbar-nav .nav-link {
    padding: 0.85rem 0.25rem !important;
    border-radius: 0;
  }
  #mainNavbar .nav-item.dropdown .dropdown-menu {
    position: static !important;
    float: none;
    width: 100%;
    min-width: 0;
    margin: 0 0 0.35rem 0;
    padding: 0.35rem 0 0.6rem;
    border: none;
    border-left: 3px solid var(--primary-light);
    border-radius: 0 8px 8px 0;
    box-shadow: none;
    background: var(--bg-light);
    transform: none !important;
    inset: auto !important;
  }
  #mainNavbar .lang-switch {
    width: 100%;
    justify-content: center;
    margin: 1rem 0 0;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
  }
}

/* =============================================
   LAYOUT: INNER PAGES
   ============================================= */
#pageWrapper { min-height: calc(100vh - var(--navbar-h)); }

#contentArea {
  width: 100%;
  min-width: 0;
  padding: 2rem 2.5rem;
}

/* =============================================
   PAGE SECTIONS
   ============================================= */
.page-section { display: none; }
.page-section.active { display: block; }

/* 參展商管理：捲入視圖時保留導覽列高度（scrollIntoView / 程式捲動） */
#sec-exhibitor-system,
#systemFormsPanel {
  scroll-margin-top: calc(var(--navbar-h) + 10px);
}

/* =============================================
   HOME PAGE
   ============================================= */
#home-section { padding: 0; }
#home-section.active { display: block; }

/* KV Banner */
.kv-swiper {
  position: relative;
  height: 520px;
  overflow: hidden;
}
.kv-swiper .swiper-slide {
  height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  position: relative;
}
.kv-swiper .swiper-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="30" fill="rgba(255,255,255,0.03)"/><circle cx="80" cy="80" r="40" fill="rgba(255,255,255,0.04)"/></svg>') center/cover;
  z-index: 0;
  pointer-events: none;
}
.kv-swiper .swiper-slide.kv-slide--photo-hero::before {
  opacity: 0.28;
}
.kv-swiper .swiper-slide.kv-slide--photo-hero {
  align-items: flex-end;
}
.kv-content {
  text-align: center;
  color: #fff;
  z-index: 1;
  padding: 2rem;
}
.kv-tag {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 0.3rem 1.2rem;
  border-radius: 20px;
  font-size: 0.8rem;
  margin-bottom: 1rem;
  letter-spacing: 0.1em;
}
.kv-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}
.kv-subtitle {
  font-size: 1.1rem;
  opacity: 0.85;
  margin-bottom: 1.5rem;
}
.kv-date {
  font-size: 1rem;
  background: rgba(255,255,255,0.12);
  display: inline-block;
  padding: 0.4rem 1.5rem;
  border-radius: 30px;
  margin-bottom: 1rem;
}
.kv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  margin-top: 0.25rem;
}
.kv-content--photo-only .kv-actions {
  margin-top: 0.75rem;
}
.kv-slide-btn-label--static {
  cursor: default;
  pointer-events: none;
  opacity: 0.95;
}
.kv-content--photo-only {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-self: stretch;
  width: 100%;
  min-height: 100%;
  padding-top: 3rem;
  padding-bottom: 2.75rem;
  z-index: 2;
}
.btn-kv-primary {
  background: #fff;
  color: var(--primary-dark);
  font-weight: 700;
  padding: 0.7rem 2rem;
  border-radius: 30px;
  border: none;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}
.btn-kv-primary:hover { background: var(--accent); color: #fff; }
.btn-kv-outline {
  background: transparent;
  color: #fff;
  font-weight: 700;
  padding: 0.7rem 2rem;
  border-radius: 30px;
  border: 2px solid rgba(255,255,255,0.6);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}
.btn-kv-outline:hover { background: rgba(255,255,255,0.15); color: #fff; }

/* Home sections */
.home-section-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 0.3rem;
  position: relative;
  padding-left: 1rem;
}
.home-section-title::before {
  content: '';
  position: absolute;
  left: 0; top: 10%; bottom: 10%;
  width: 4px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 2px;
}
.home-section-sub {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 1.5rem;
}

/* News cards */
.news-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.2rem 1.4rem;
  margin-bottom: 1rem;
  border-left: 4px solid var(--primary);
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
}
.news-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.news-card .news-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}
.news-card .news-tag {
  display: inline-block;
  background: rgba(var(--primary-rgb),0.1);
  color: var(--primary);
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 12px;
  margin-right: 6px;
  font-weight: 600;
}
.news-card .news-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-top: 0.3rem;
}

/* Organizer logos */
.org-logo-box {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  transition: box-shadow 0.2s;
}
/* 主辦／協辦 Logo 固定顯示區（圖在框內等比置中） */
.org-logo-box .org-logo-frame {
  width: 100%;
  max-width: 140px;
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.4rem;
  padding: 4px 6px;
  box-sizing: border-box;
  background: rgba(6, 95, 110, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(var(--primary-rgb), 0.12);
}
.org-logo-box .org-logo-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
}
.org-logo-box:hover { box-shadow: var(--shadow-hover); }
.org-logo-box .org-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-dark);
  text-align: center;
}

#mainOrgContainerVisitor .org-logo-box.flex-fill {
  flex: 1 1 160px;
  min-width: 140px;
  max-width: 100%;
}

/* Speaker card */
.speaker-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-align: center;
  padding-bottom: 1.2rem;
  transition: all 0.2s;
}
.speaker-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.speaker-avatar {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, var(--primary-dark), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: rgba(255,255,255,0.4);
}
.speaker-avatar-photo {
  padding: 0;
  display: block;
  position: relative;
  overflow: hidden;
}
.speaker-avatar-photo .speaker-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  background: linear-gradient(135deg, var(--primary-dark), var(--accent));
}
.speaker-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0.8rem 0.5rem 0.2rem;
}
.speaker-title {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 0 0.5rem;
}

/* Exhibitor card */
.exhibitor-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.2rem;
  transition: all 0.2s;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.exhibitor-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.exhibitor-logo {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
  border-radius: 8px;
  margin-bottom: 0.8rem;
  font-size: 2rem;
  color: var(--primary);
}
/* 首頁參展商／媒合廠商輪播卡片內 Logo 圖 */
.exhibitor-card .exhibitor-logo-img {
  max-width: 84px;
  max-height: 84px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.exhibitor-name { font-weight: 700; font-size: 0.92rem; color: var(--text-dark); }
.exhibitor-zone {
  display: inline-block;
  background: rgba(var(--primary-rgb),0.1);
  color: var(--primary);
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.exhibitor-desc { font-size: 0.8rem; color: var(--text-muted); flex: 1; }

/* Quick register buttons */
.quick-reg {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--accent) 100%);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  color: #fff;
  margin: 2rem 0;
}
.quick-reg h3 { font-size: 1.6rem; font-weight: 800; margin-bottom: 0.5rem; }
.quick-reg p { opacity: 0.85; margin-bottom: 1.5rem; }
.quick-reg .reg-btns { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; }

/* =============================================
   BUTTONS
   ============================================= */
.btn-primary-tech {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border: none;
  padding: 0.6rem 1.8rem;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}
.btn-primary-tech:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  box-shadow: 0 4px 16px rgba(var(--primary-rgb),0.3);
  transform: translateY(-1px);
}
.btn-outline-tech {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 0.55rem 1.6rem;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}
.btn-outline-tech:hover {
  background: var(--primary);
  color: #fff;
}
.btn-accent {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  color: #fff;
  border: none;
  padding: 0.6rem 1.8rem;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}
.btn-accent:hover { opacity: 0.88; transform: translateY(-1px); }

/* =============================================
   CONTENT PAGE HEADER
   ============================================= */
.page-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  color: #fff;
  padding: 2rem 2.5rem;
  margin: -2rem -2.5rem 2rem;
}
.page-header h1 { font-size: 1.6rem; font-weight: 800; margin: 0; }
.page-header p { opacity: 0.8; font-size: 0.9rem; margin: 0.3rem 0 0; }
.page-breadcrumb {
  display: flex;
  gap: 0.5rem;
  font-size: 0.8rem;
  opacity: 0.7;
  margin-bottom: 0.5rem;
  align-items: center;
}
.page-breadcrumb span { opacity: 0.6; }

/* =============================================
   INFO CARDS / BOXES
   ============================================= */
.info-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.8rem;
  margin-bottom: 1.5rem;
}
.info-card h4 {
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--bg-light);
}

.decorator-logo-wrap {
  text-align: center;
  margin: -0.25rem 0 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.decorator-logo {
  max-height: 100px;
  max-width: min(100%, 320px);
  width: auto;
  height: auto;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
}

.detail-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.detail-item:last-child { border-bottom: none; }
.detail-icon {
  width: 36px;
  height: 36px;
  background: rgba(var(--primary-rgb),0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1rem;
  flex-shrink: 0;
}
.detail-label { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.15rem; }
.detail-value { font-size: 0.95rem; font-weight: 600; color: var(--text-dark); }

/* =============================================
   STEPS (REGISTRATION FLOW)
   ============================================= */
.step-flow {
  display: flex;
  gap: 0;
  align-items: stretch;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}
.step-item {
  flex: 1;
  min-width: 200px;
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1rem;
  text-align: center;
  position: relative;
}
.step-item + .step-item::before {
  content: '→';
  position: absolute;
  left: -18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: var(--primary-light);
  font-weight: 900;
}
.step-num {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 900;
  margin: 0 auto 0.8rem;
}
.step-title { font-size: 0.95rem; font-weight: 700; color: var(--text-dark); margin-bottom: 0.3rem; }
.step-desc { font-size: 0.8rem; color: var(--text-muted); }

/* 參展商權益 exhibitor.html#exhibitor-rights：單欄全寬 */
#exhibitorRightsMount {
  text-align: left;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
#exhibitorRightsMount .exhibitor-rights-single-col > .col-12 {
  width: 100%;
}
#exhibitorRightsMount .exhibitor-rights-single-col .info-card + .info-card {
  margin-top: 0;
}
#exhibitorRightsMount .er-step-item.step-item {
  text-align: left;
}
#exhibitorRightsMount .er-step-item .step-num {
  margin-left: 0;
  margin-right: auto;
}

/* =============================================
   TABLE
   ============================================= */
.table-tech {
  width: 100%;
  border-collapse: collapse;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--bg-white);
}
.table-tech thead th {
  background: var(--primary);
  color: #fff;
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}
.table-tech tbody tr { border-bottom: 1px solid var(--border); transition: background 0.15s; }
.table-tech tbody tr:nth-child(even) { background: rgba(var(--primary-rgb),0.03); }
.table-tech tbody tr:hover { background: rgba(var(--primary-rgb),0.07); }
.table-tech tbody td { padding: 0.8rem 1rem; font-size: 0.88rem; vertical-align: middle; }

.table-scroll-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* =============================================
   SEARCH & FILTER
   ============================================= */
.search-bar {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.2rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  align-items: flex-end;
}
.search-bar .form-control, .search-bar .form-select {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.88rem;
  padding: 0.5rem 0.9rem;
}
.search-bar .form-control:focus, .search-bar .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb),0.12);
  outline: none;
}

/* =============================================
   FLOOR MAP
   ============================================= */
.floormap-img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  cursor: zoom-in;
  transition: transform 0.2s;
}
.floormap-img:hover { transform: scale(1.01); }

.zone-item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  background: var(--bg-white);
  box-shadow: 0 1px 6px rgba(var(--primary-rgb),0.06);
  cursor: default;
  transition: all 0.2s;
}
.zone-item:hover { box-shadow: var(--shadow); transform: translateX(4px); }
.zone-dot {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 0.2rem;
}
.zone-name { font-size: 0.88rem; font-weight: 600; color: var(--text-dark); }
.zone-detail {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-top: 0.35rem;
}

/* =============================================
   TRAFFIC TABS
   ============================================= */
.traffic-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.traffic-tab {
  padding: 0.5rem 1.2rem;
  border-radius: 30px;
  border: 1.5px solid var(--border);
  background: var(--bg-white);
  color: var(--text-dark);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.traffic-tab.active, .traffic-tab:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.traffic-content { display: none; }
.traffic-content.active { display: block; }
.map-embed {
  width: 100%;
  height: 360px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.map-embed--traffic {
  height: 400px;
  padding: 0;
  overflow: hidden;
  position: relative;
  background: #eef6f8;
  border-radius: var(--radius) var(--radius) 0 0;
  border: none;
  box-shadow: none;
}

.map-embed--traffic .map-embed-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.map-embed--traffic .map-embed-img-link {
  display: block;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
}

.map-embed--traffic .map-embed-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.map-embed-caption {
  background: var(--bg-white);
}

/* =============================================
   TIMELINE
   ============================================= */
.timeline { position: relative; padding: 1rem 0; }
.timeline::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 2px;
}
.timeline-item {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
  position: relative;
}
.timeline-dot {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb),0.15);
  z-index: 1;
}
.timeline-body {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.3rem;
  flex: 1;
}
.timeline-date { font-size: 0.78rem; color: var(--primary); font-weight: 700; margin-bottom: 0.3rem; }
.timeline-title { font-size: 0.95rem; font-weight: 700; color: var(--text-dark); margin-bottom: 0.3rem; }
.timeline-desc { font-size: 0.82rem; color: var(--text-muted); }

/* =============================================
   SCHEDULE TABLE (AGENDA)
   ============================================= */
.agenda-table th.time-col { width: 100px; background: var(--primary-dark); }
.agenda-cell {
  background: rgba(var(--primary-rgb),0.06);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  font-size: 0.8rem;
  margin: 2px;
}
.agenda-cell .session-title { font-weight: 600; color: var(--primary-dark); }
.agenda-cell .session-speaker { color: var(--text-muted); font-size: 0.75rem; }

/* =============================================
   EXHIBITOR LIST CARDS
   ============================================= */
.exhibitor-list-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.2rem;
  margin-bottom: 1rem;
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  transition: all 0.2s;
}
.exhibitor-list-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.exhibitor-list-logo {
  width: 104px;
  height: 104px;
  background: var(--bg-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--primary);
  flex-shrink: 0;
}
.exhibitor-list-logo .exhibitor-logo-img,
.exhibitor-list-logo img {
  max-width: 94%;
  max-height: 94%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.exhibitor-list-info { flex: 1; }
.exhibitor-list-name { font-weight: 700; font-size: 1rem; color: var(--text-dark); margin-bottom: 0.3rem; }
.exhibitor-list-meta { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.meta-badge {
  font-size: 0.73rem;
  padding: 2px 10px;
  border-radius: 12px;
  font-weight: 600;
}
.badge-zone { background: rgba(var(--primary-rgb),0.1); color: var(--primary); }
.badge-booth { background: rgba(0,201,167,0.12); color: var(--accent-dark); }
.exhibitor-list-desc { font-size: 0.82rem; color: var(--text-muted); }
.exhibitor-list-link { font-size: 0.82rem; color: var(--primary); font-weight: 600; text-decoration: none; }
.exhibitor-list-link:hover { text-decoration: underline; }

.exhibitor-list-actions {
  flex-shrink: 0;
  align-self: center;
}
.exhibitor-list-cta {
  font-size: 0.78rem;
  padding: 0.4rem 0.9rem;
  white-space: nowrap;
}

/* =============================================
   HOTEL CARDS
   ============================================= */
.hotel-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: all 0.2s;
}
.hotel-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.hotel-img {
  height: 160px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: rgba(255,255,255,0.3);
}
.hotel-img.hotel-img-photo {
  padding: 0;
  overflow: hidden;
  background: #e8eef0;
}
.hotel-img.hotel-img-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hotel-body { padding: 1.2rem; }
.hotel-name { font-weight: 700; font-size: 0.95rem; color: var(--text-dark); margin-bottom: 0.4rem; }
.hotel-meta { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.8rem; }

/* =============================================
   FORM STYLES
   ============================================= */
.form-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 2rem;
}
.form-card h4 {
  font-weight: 700;
  color: var(--primary-dark);
  border-bottom: 2px solid var(--bg-light);
  padding-bottom: 0.7rem;
  margin-bottom: 1.2rem;
}
.form-label { font-weight: 600; font-size: 0.88rem; color: var(--text-dark); }
.form-control, .form-select {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.88rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb),0.12);
}

/* 精準媒合表：公司領域複選 — 核取方塊與區塊更醒目 */
.vendor-domain-picks {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.vendor-domain-pick {
  border: 2px solid rgba(var(--primary-rgb), 0.35);
  border-radius: 10px;
  padding: 0.9rem 1rem 1rem;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.vendor-domain-pick:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12);
}
.vendor-domain-pick-check.form-check {
  display: flex;
  align-items: center;
  padding-left: 0;
}
.vendor-domain-pick-check {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
  min-height: 1.75rem;
}
.vendor-domain-pick-check .form-check-input {
  float: none;
  width: 1.28rem;
  height: 1.28rem;
  margin-top: 0;
  margin-left: 0;
  border-width: 2px;
  border-color: var(--primary-dark);
  cursor: pointer;
  flex-shrink: 0;
}
.vendor-domain-pick-check .form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}
.vendor-domain-pick-check .form-check-label {
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--primary-dark);
  cursor: pointer;
  line-height: 1.35;
  padding-top: 0.05rem;
}
.vendor-domain-subs {
  border-left: 3px solid rgba(var(--primary-rgb), 0.25);
  padding-left: 0.85rem;
  margin-left: 0.15rem;
}
.vendor-domain-subs .form-check-label {
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--text-body, #333);
}
.vendor-domain-attendee-card {
  border-color: rgba(var(--primary-rgb), 0.28) !important;
}

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  background: var(--bg-light);
  cursor: pointer;
  transition: all 0.2s;
}
.upload-zone:hover { border-color: var(--primary); background: rgba(var(--primary-rgb),0.04); }
.upload-zone i { font-size: 2rem; color: var(--primary-light); margin-bottom: 0.5rem; display: block; }
.upload-zone p { font-size: 0.85rem; color: var(--text-muted); margin: 0; }

/* Login tabs */
.traffic-tab.traffic-tab-locked {
  cursor: not-allowed;
  opacity: 0.55;
  pointer-events: auto;
}

.login-type-tabs { display: flex; gap: 1rem; margin-bottom: 2rem; }
.login-type-btn {
  flex: 1;
  padding: 1.2rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-white);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.login-type-btn:hover, .login-type-btn.active {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb),0.05);
}
.login-type-btn i { font-size: 1.8rem; color: var(--primary); display: block; margin-bottom: 0.4rem; }
.login-type-btn span { font-size: 0.85rem; font-weight: 600; color: var(--text-dark); }

/* =============================================
   REGISTRATION PAGE
   ============================================= */
.reg-choice {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  padding: 3rem 0;
}
.reg-big-btn {
  flex: 1;
  min-width: 260px;
  max-width: 380px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  border: 2px solid transparent;
}
a.reg-big-btn {
  display: block;
  text-decoration: none;
  color: inherit;
}
a.reg-big-btn:hover {
  color: inherit;
}
.reg-big-btn:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-5px);
  border-color: var(--primary);
}
.reg-big-btn i { font-size: 3rem; color: var(--primary); margin-bottom: 1rem; display: block; }
.reg-big-btn h3 { font-weight: 800; color: var(--primary-dark); font-size: 1.3rem; margin-bottom: 0.5rem; }
.reg-big-btn p { font-size: 0.85rem; color: var(--text-muted); }

/* =============================================
   CO-EXHIBITION CARDS
   ============================================= */
.co-ex-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: all 0.2s;
}
.co-ex-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.co-ex-banner {
  height: 200px;
  background: linear-gradient(135deg, #1a3a5c, #2e7d9e);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.co-ex-banner.tfp-banner { background: linear-gradient(135deg, #1d5c4a, #2ea87c); }
.co-ex-banner h2 {
  font-size: 2.2rem;
  font-weight: 900;
  color: rgba(255,255,255,0.95);
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
  z-index: 1;
}
.co-ex-body { padding: 1.5rem; }
.co-ex-body h4 { font-weight: 800; color: var(--text-dark); margin-bottom: 0.5rem; }
.co-ex-body p { font-size: 0.88rem; color: var(--text-muted); }

/* =============================================
   CONTACT BOX
   ============================================= */
.contact-box {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 2rem 2.5rem;
}
.contact-box h4 { font-weight: 800; font-size: 1.1rem; margin-bottom: 1rem; }
.contact-box .contact-row { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.6rem; font-size: 0.92rem; }
.contact-box i { opacity: 0.7; }

/* =============================================
   IMAGE LIGHTBOX
   ============================================= */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
#lightbox.show { display: flex; }
#lightbox img { max-width: 90vw; max-height: 85vh; border-radius: var(--radius); box-shadow: 0 8px 40px rgba(0,0,0,0.5); }

/* =============================================
   SWIPER OVERRIDES
   ============================================= */
.swiper-pagination-bullet-active { background: var(--primary) !important; }
.swiper-button-next, .swiper-button-prev { color: var(--primary) !important; }
/* 合作夥伴輪播：寬度／卡片比照主辦單位（col-6 / md-4 / lg-2） */
#home-section .partner-swiper,
#home-section .match-swiper {
  overflow: hidden;
  width: 100%;
}
#home-section .partner-swiper .swiper-slide,
#home-section .match-swiper .swiper-slide {
  height: auto;
  box-sizing: border-box;
  padding: 0;
  background: transparent;
  box-shadow: none;
}
#home-section #sponsorContainer .sponsor-partner-card,
#home-section .partner-swiper .sponsor-partner-card,
#home-section .match-swiper .sponsor-partner-card {
  width: 100%;
  height: 100%;
  min-height: 80px;
  justify-content: flex-start;
}
#home-section #sponsorContainer .sponsor-partner-card .org-name,
#home-section .partner-swiper .sponsor-partner-card .org-name,
#home-section .match-swiper .sponsor-partner-card .org-name {
  margin-top: 0.15rem;
}
#home-section #sponsorContainer .sponsor-partner-desc,
#home-section .partner-swiper .sponsor-partner-desc,
#home-section .match-swiper .sponsor-partner-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.45;
  font-weight: 400;
  text-align: center;
  white-space: pre-line;
  width: 100%;
  margin-top: 0.35rem;
}

/* =============================================
   FOOTER
   ============================================= */
footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.75);
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}
footer .footer-logo { font-size: 1.3rem; font-weight: 900; color: #fff; margin-bottom: 0.4rem; }
footer .footer-sub { font-size: 0.8rem; opacity: 0.6; margin-bottom: 1rem; }
footer h6 { color: #fff; font-weight: 700; font-size: 0.88rem; margin-bottom: 0.8rem; }
footer ul { list-style: none; padding: 0; margin: 0; }
footer ul li { margin-bottom: 0.4rem; }
footer ul li a { color: rgba(255,255,255,0.6); text-decoration: none; font-size: 0.82rem; transition: color 0.2s; }
footer ul li a:hover { color: var(--accent); }
footer .footer-copy { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 2rem; padding-top: 1rem; text-align: center; font-size: 0.78rem; opacity: 0.5; line-height: 1.65; }
footer .social-links { display: flex; gap: 0.8rem; margin-top: 0.8rem; }
footer .social-links a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; color: #fff; text-decoration: none; transition: all 0.2s; font-size: 0.9rem; }
footer .social-links a:hover { background: var(--accent); }

/* =============================================
   DOWNLOAD TABLE
   ============================================= */
.file-icon { font-size: 1.2rem; }
.file-icon.pdf { color: #e74c3c; }
.file-icon.doc { color: #2980b9; }
.file-icon.xls { color: #27ae60; }
.file-icon.zip { color: #f39c12; }

/* =============================================
   COMPETITION
   ============================================= */
.judge-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.2rem;
  text-align: center;
  transition: all 0.2s;
}
.judge-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.judge-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: rgba(255,255,255,0.4);
  margin: 0 auto 0.8rem;
}
.judge-name { font-weight: 700; font-size: 0.9rem; color: var(--text-dark); }
.judge-title { font-size: 0.78rem; color: var(--text-muted); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 991px) {
  #contentArea { padding: 1.5rem 1rem; }
  .page-header { padding: 1.5rem 1rem; margin: -1.5rem -1rem 1.5rem; }
  .kv-swiper, .kv-swiper .swiper-slide { height: 380px; }
  .kv-title { font-size: 2rem; }
}

@media (max-width: 767px) {
  .kv-swiper, .kv-swiper .swiper-slide { height: 320px; }
  .kv-title { font-size: 1.5rem; }
  .step-flow { flex-direction: column; }
  .step-item + .step-item::before { display: none; }
  .search-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1rem;
    gap: 0.65rem;
  }
  .search-bar > * {
    width: 100%;
    min-width: 0;
  }
  .search-bar .form-control,
  .search-bar .form-select {
    font-size: 16px; /* 避免 iOS 聚焦輸入時整頁放大 */
  }
  .search-bar .btn-primary-tech {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
  }

  .reg-choice { flex-direction: column; align-items: center; }
  .login-type-tabs { flex-direction: column; }
  .co-ex-card { max-width: 100%; }

  /* 參展商列表：手機改為左圖右文，官網按鈕獨立整列 */
  .exhibitor-list-card {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 1rem;
    gap: 0.75rem;
  }
  .exhibitor-list-logo {
    width: 72px;
    height: 72px;
    font-size: 1.45rem;
    border-radius: 10px;
  }
  .exhibitor-list-info {
    flex: 1 1 calc(100% - 72px - 0.75rem);
    min-width: 0;
  }
  .exhibitor-list-name {
    font-size: 0.95rem;
    line-height: 1.3;
    word-break: break-word;
  }
  .exhibitor-list-meta {
    gap: 0.4rem;
  }
  .exhibitor-list-meta .meta-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    max-width: 100%;
    word-break: break-word;
  }
  .exhibitor-list-desc {
    font-size: 0.8rem;
    line-height: 1.55;
    word-break: break-word;
  }
  .exhibitor-list-actions {
    flex: 1 0 100%;
    align-self: stretch;
    margin: 0;
    padding-top: 0.35rem;
    border-top: 1px solid var(--border);
    text-align: center;
  }
  .exhibitor-list-cta {
    width: 100%;
    max-width: 100%;
    white-space: normal;
    font-size: 0.85rem;
    padding: 0.55rem 1rem;
    box-sizing: border-box;
  }

  .exhibitor-list-card:hover {
    transform: none;
  }

  .quick-reg .reg-btns { flex-direction: column; align-items: center; }
}

/* Swiper home sections */
.home-swiper {
  padding-bottom: 40px !important;
  overflow: hidden;
  width: 100%;
}

/* 參展及媒合報名、觀展報名：表單提示（固定於視窗內、可捲動；長文不超出螢幕） */
#exhibitorInlineMessage.exhibitor-toast-pop,
#vr-form-msg.exhibitor-toast-pop {
  position: fixed;
  left: 50%;
  z-index: 10800;
  box-sizing: border-box;
  width: min(480px, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0;
  box-shadow: 0 10px 40px rgba(6, 95, 110, 0.28);
  border-radius: 12px;
  text-align: left;
  word-break: break-word;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

/* 參展商：貼近螢幕下緣（避開安全區） */
#exhibitorInlineMessage.exhibitor-toast-pop {
  bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  max-height: min(70vh, calc(100vh - 5.5rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
}

/* 觀展報名：置於視窗中央，確保捲到表單底部送出時仍在可視範圍內（避免貼底被瀏覽列遮擋） */
#vr-form-msg.exhibitor-toast-pop {
  top: 50%;
  bottom: auto;
  transform: translate(-50%, -50%);
  max-height: min(75vh, calc(100vh - 2rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
}

@supports (height: 100dvh) {
  #exhibitorInlineMessage.exhibitor-toast-pop {
    max-height: min(70dvh, calc(100dvh - 5.5rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
  }
  #vr-form-msg.exhibitor-toast-pop {
    max-height: min(75dvh, calc(100dvh - 2rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
  }
}

/* 媒合廠商表單：SendGrid 成功寄送次數 HUD（工作階段累計） */
#exhibitorMailHud.exhibitor-mail-hud {
  position: fixed;
  top: max(0.75rem, env(safe-area-inset-top, 0px));
  right: max(0.75rem, env(safe-area-inset-right, 0px));
  z-index: 10750;
  max-width: min(280px, calc(100vw - 1.5rem));
  padding: 0.4rem 0.65rem;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #0a3d44;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(var(--primary-rgb), 0.35);
  border-radius: 10px;
  box-shadow: 0 6px 22px rgba(6, 95, 110, 0.18);
  pointer-events: none;
  text-align: right;
  word-break: break-word;
}

#exhibitorMailHud.exhibitor-mail-hud .exhibitor-mail-hud__inner strong {
  font-size: 1.05em;
  color: #067a6e;
}
