/* ==========================================================================
   VMware Tech Summit 2026 - Taiwan Official Stylesheet (Refined Edition)
   Crafted with Broadcom/VMware Brand Guidelines, RWD, and High-Readability Layout
   ========================================================================== */

:root {
  --primary-purple: #760FDD;
  --dark-purple: #520B9B;
  --deep-purple-bg: #100424;
  --accent-blue: #005c8a;
  --accent-light-blue: #0095d3;
  --text-main: #1E293B;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --bg-light: #F8FAFC;
  --bg-card: #FFFFFF;
  --border-color: #E2E8F0;
  --success-green: #2E7D32;
  --error-red: #D32F2F;
  /* 議程分會識別色：小點、講者 hover 色條、卡片 hover 框線皆引用 */
  --track1-color: #016599;
  --track2-color: var(--primary-purple);
  --font-family: 'Metropolis', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "微軟正黑體", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  color: var(--text-main);
  background-color: #ffffff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  width: 100%;
  display: block;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  text-decoration: underline;
  color: var(--primary-purple);
}

/* 內容安全版心：1200px 呼吸感標準 */
.content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
}

/* --------------------------------------------------
   Header & Top Bar
-------------------------------------------------- */
#header .top {
  padding: 16px 0;
  background: #ffffff;
}

#header .logo {
  width: 175px;
  display: flex;
  align-items: center;
}

#header .logo img {
  width: 100%;
  height: auto;
}

.vm_line {
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, #0095D3 0%, #6DB33F 33%, #F58220 66%, #760FDD 100%);
}

#header .title {
  background-color: #7F35B2;
  background-image: url("../images/kv.png");
  background-repeat: no-repeat;
  background-position: right center;
  background-size: cover;
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: center;
}

#header .title::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /*background: linear-gradient(90deg, rgba(50, 8, 98, 0.95) 0%, rgba(72, 14, 136, 0.88) 52%, rgba(118, 15, 221, 0.45) 82%, rgba(118, 15, 221, 0.2) 100%);*/
  pointer-events: none;
}

#header .title .content {
  position: relative;
  z-index: 1;
  padding: 68px 28px;
  width: 100%;
}

#header .title .top-title {
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 680px; /* 保留右側約 40% 空間展示科技齒輪與雲端主視覺 */
}

#header .title .top-title h1 {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.18;
  margin: 0;
}

/* 雙行獨立排列：日期與地點 + 霧面圓形 Icon 徽章 */
.date-venue-stacked {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.kv-meta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1.6rem;
  color: #ffffff;
  letter-spacing: 0.2px;
}

.kv-meta-text {
  font-weight: 500;
  line-height: 1.4;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

/* 769–1000px：KV 標題拆成「VMware / Tech Summit 2026」兩行，避免與背景右側主視覺重疊 */
@media screen and (min-width: 769px) and (max-width: 1000px) {
  #header .title .top-title .kv-br {
    display: block;
  }
}

/* Quick Nav Anchor Bar */
.quick-nav {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.quick-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  white-space: nowrap;
  gap: 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  mask-image: linear-gradient(to right, transparent, black 20px, black calc(100% - 20px), transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 20px, black calc(100% - 20px), transparent);
}

.quick-nav ul::-webkit-scrollbar {
  display: none;
}

/* 依 JS 判斷的捲動位置切換遮罩：該側已無更多內容可滑時，該側就不再淡出 */
.quick-nav ul.at-start {
  mask-image: linear-gradient(to right, black, black calc(100% - 20px), transparent);
  -webkit-mask-image: linear-gradient(to right, black, black calc(100% - 20px), transparent);
}

.quick-nav ul.at-end {
  mask-image: linear-gradient(to right, transparent, black 20px, black);
  -webkit-mask-image: linear-gradient(to right, transparent, black 20px, black);
}

.quick-nav ul.no-scroll {
  mask-image: none;
  -webkit-mask-image: none;
}

.quick-nav li a {
  display: inline-block;
  padding: 14px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #4A5568;
  border-bottom: 3px solid transparent;
  text-decoration: none;
  transition: all 0.2s;
}

.quick-nav li a:hover,
.quick-nav li a.active {
  color: var(--primary-purple);
  border-bottom-color: var(--primary-purple);
}

/* --------------------------------------------------
   Main 2-Column Section (Hero Left + Form Right)
-------------------------------------------------- */
#container {
  font-weight: 400;
  background: #ffffff;
}

#container .main-split {
  display: flex;
  flex-wrap: wrap;
  padding: 40px 0 60px 0;
  background: #ffffff;
  gap: 40px;
}

#container .main-split .item:first-child {
  flex: 1 1 58%;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

#container .main-split .item:last-child {
  flex: 1 1 36%;
  padding: 24px 24px 48px 24px;
  background: #F1F5F9;
  border: 1.5px solid #E2E8F0;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  height: auto;
  /* 不隨左欄拉高：卡片只到報名按鈕＋下方內距為止 */
  align-self: flex-start;
  display: flex;
  flex-direction: column;
}

/* Greeting Block */
.greeting {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.info-title {
  font-size: 1.2rem;
  font-weight: 500;
  color: #0F172A;
  line-height: 1.4;
}

.big-font {
  font-size: 1.85rem;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.35;
}

.greeting p {
  font-size: 1.05rem;
  color: #475569;
  line-height: 1.8;
  margin: 0;
}

/* 段落間距：大於段內行距、小於標題與內文間距，維持層級 */
.greeting-body p + p {
  margin-top: 0.7em;
}

.purple-color {
  color: var(--primary-purple);
}

/* --------------------------------------------------
   Location Card (Replaces location-info.png)
-------------------------------------------------- */
.location-card {
  background: linear-gradient(135deg, white 0%, #F9F3FF 100%);
  outline: 1px #E2E8F0 solid;
  outline-offset: -1px;
  border-radius: 14px;
  padding: 24px 28px;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}

.location-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(118, 15, 221, 0.12);
}

.loc-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: 1 1 50%;
}

.loc-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(118, 15, 221, 0.12);
  color: var(--primary-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.loc-texts {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.loc-texts h4 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
  line-height: 1.35;
}

.loc-texts p {
  font-size: 0.95rem;
  color: #64748B;
  margin: 0;
  line-height: 1.5;
}

.map-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--primary-purple);
  color: #ffffff !important;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 6px;
  text-decoration: none !important;
  margin-top: 6px;
  transition: background 0.2s, transform 0.2s;
}

.map-btn:hover {
  background: var(--dark-purple);
  transform: translateY(-1px);
}

/* --------------------------------------------------
   3 Keyword Cards (Replaces keyword.png)
-------------------------------------------------- */
.keyword-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.keyword-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.keyword-card {
  background: linear-gradient(180deg, #760FDD 0%, #3D0E7E 55%, #2A0958 100%);
  border-radius: 16px;
  padding: 26px 18px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 25px rgba(25, 5, 56, 0.2);
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.keyword-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 35px rgba(118, 15, 221, 0.3);
}

.card-top-icon {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 18px;
}

.card-top-icon img {
  display: block;
  width: 100%;
  height: auto;
}

.keyword-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 6px 0;
  color: #ffffff;
  line-height: 1.25;
}

.keyword-card .card-subtitle {
  font-size: 0.88rem;
  color: #CBD5E1;
  margin-bottom: 14px;
  font-weight: 500;
}

.card-divider {
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #760FDD, rgba(118, 15, 221, 0));
  margin-bottom: 16px;
}

.keyword-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.keyword-card li {
  font-size: 0.9rem;
  color: #F1F5F9;
  display: flex;
  align-items: baseline;
  gap: 8px;
  line-height: 1.45;
}

.keyword-card li .bullet-plus {
  color: #A78BFA;
  font-weight: 700;
  font-size: 1rem;
}

/* --------------------------------------------------
   Event Notice Guidelines (Purple boxes)
-------------------------------------------------- */
.notice-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.box-area {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.purple-box {
  padding: 12px 18px;
  border: 1.5px solid #760FDD;
  background: rgba(118, 15, 221, 0.03);
  border-radius: 10px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.5;
}

.purple-box .plus-mark {
  color: var(--primary-purple);
  font-weight: 800;
  font-size: 1.1rem;
  line-height: 1.3;
}

.grey-line {
  height: 1px;
  background: #E2E8F0;
  margin: 10px 0;
}

/* --------------------------------------------------
   Sponsors（共同主辦／大會合作夥伴，位於活動須知上方）
   logo 為固定 60px 高畫布（視覺份量由設計在畫布內調整），寬度依比例，自然換行
-------------------------------------------------- */
.sponsor-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
  scroll-margin-top: 60px;
}

.sponsor-heading {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--primary-purple);
  margin: 0;
  line-height: 1.3;
}

.sponsor-note {
  font-size: 14px;
  color: #94A3B8;
  line-height: 1.2;
  margin: 4px 0 0 0;
}

.sponsor-logos {
  list-style: none;
  margin: 12px 0 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
}

.sponsor-logos li {
  display: block;
  max-width: 100%;
}

.sponsor-logos img {
  display: block;
  height: 60px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

@media screen and (max-width: 768px) {
  .sponsor-section {
    gap: 12px;
  }
  .sponsor-heading {
    font-size: 1.2rem;
  }
  /* 手機：logo 畫布本身已有上方留白，標題／說明到 logo 不再另加間距 */
  .sponsor-logos {
    margin-top: 0;
    gap: 4px;
  }
}

/* --------------------------------------------------
   Registration Form (Right Column)
-------------------------------------------------- */
#reg {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#reg h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #0F172A;
  margin: 0 0 10px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid #E2E8F0;
}

#reg .input-wrap {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

#reg .row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}

#reg .row > label {
  font-size: 0.92rem;
  font-weight: 600;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 4px;
}

.star {
  color: var(--error-red);
  font-weight: 700;
}

.optional {
  color: #94A3B8;
  font-size: 0.82rem;
  font-weight: 400;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #CBD5E1;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  color: #0F172A;
  background-color: #ffffff;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

input:focus {
  outline: none;
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 3px rgba(118, 15, 221, 0.15);
}

/* Modern Validation Feedback */
input:user-invalid {
  border-color: var(--error-red);
  background-color: #FEF2F2;
}

input:user-invalid + .error-msg {
  display: block;
}

.error-msg {
  display: none;
  color: var(--error-red);
  font-size: 0.8rem;
  font-weight: 500;
  margin-top: 2px;
}

.error-msg.visible {
  display: block;
}

/* Radio Group */
.radio-area {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.radio-label {
  display: flex !important;
  align-items: center !important;
  gap: 12px;
  padding: 12px 14px;
  background: #ffffff;
  border: 1.5px solid #E2E8F0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.88rem !important;
  font-weight: 400 !important;
  color: #334155 !important;
  transition: all 0.2s;
}

.radio-label:hover {
  border-color: #A78BFA;
  background: #FDFBFF;
}

.radio-label input[type="radio"] {
  margin: 0;
  accent-color: var(--primary-purple);
  cursor: pointer;
  flex-shrink: 0;
}

.radio-label.selected {
  border-color: var(--primary-purple);
  background: rgba(118, 15, 221, 0.05);
  font-weight: 500 !important;
}

/* Checkboxes */
.checkbox-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  flex-wrap: wrap !important;
  gap: 0 12px !important;
  margin-top: 8px !important;
}

/* 同意條款錯誤訊息：換到下一行，對齊條款文字左緣（勾選框 18px＋間距 12px） */
.checkbox-row .error-msg {
  flex: 0 0 100%;
  padding-left: 30px;
}

.checkbox-row input[type="checkbox"] {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--primary-purple);
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-row label {
  display: block !important;
  /* basis 0：允許換行後，條款文字仍與勾選框同一行，不被擠到下一行 */
  flex: 1 1 0;
  min-width: 0;
  font-size: 0.85rem !important;
  font-weight: 400 !important;
  color: #475569 !important;
  line-height: 1.5 !important;
  cursor: pointer;
}

.checkbox-row label small {
  display: block;
  margin-top: 4px;
  color: #64748B;
  font-size: 0.8rem;
}

/* Submit Button */
.btn-wrap {
  margin-top: 14px;
}

.submit-btn {
  width: 100%;
  height: 52px;
  background: linear-gradient(135deg, #005c8a 0%, #0077b6 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 1.12rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 92, 138, 0.3);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.submit-btn-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.submit-btn:hover {
  background: linear-gradient(135deg, #004b70 0%, #005c8a 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 92, 138, 0.4);
}

.submit-btn:disabled {
  background: #94A3B8;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* --------------------------------------------------
   Floating Register Button (Clean UX when scrolled)
-------------------------------------------------- */
.floating-reg-btn {
  position: fixed;
  bottom: 64px;
  right: 32px;
  background: linear-gradient(135deg, var(--primary-purple) 0%, var(--dark-purple) 100%);
  color: #ffffff !important;
  font-size: 1.06rem;
  font-weight: 700;
  padding: 16px 28px;
  border-radius: 50px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 8px 24px rgba(118, 15, 221, 0.45);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transform: translateY(15px);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, bottom 0.15s ease-out;
  text-decoration: none !important;
  cursor: pointer;
}

.floating-reg-btn i {
  font-size: 1.35rem;
}

.floating-reg-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  animation: ctaBorderShimmer 3.5s ease-in-out infinite;
}

.floating-reg-btn:hover {
  box-shadow: 0 10px 30px rgba(118, 15, 221, 0.65);
  transform: translateY(-2px) scale(1.02);
}

@keyframes ctaBorderShimmer {
  0%, 100% {
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 8px 24px rgba(118, 15, 221, 0.45);
  }
  50% {
    border-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 28px rgba(168, 85, 247, 0.7), 0 0 14px rgba(255, 255, 255, 0.5);
  }
}

/* --------------------------------------------------
   Extended Sections（區塊共用標題）
-------------------------------------------------- */

.extra-section {
  padding: 80px 0 60px 0;
  border-top: 1px solid var(--border-color);
}

.section-title-wrap {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 40px auto;
}

.section-heading {
  font-size: 2.15rem;
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 12px 0;
  line-height: 1.3;
}

/* --------------------------------------------------
   Agenda Section: Full Chronological Flow (No Slop)
-------------------------------------------------- */
/* 議程區塊：上下淡入白色的淺灰漸層底，取代原本的上框線來區隔上半部 */
#agenda {
  border-top: none;
  background: linear-gradient(180deg, #FFFFFF 0%, #F8F9FA 5.35%, #F8F9FA 95.16%, #FFFFFF 100%);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1080px;
  margin: 0 auto;
}

.timeline-item {
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 24px 28px;
  display: flex;
  gap: 28px;
  align-items: flex-start;
  box-shadow: 2px 3px 4px rgba(0, 0, 0, 0.1);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.timeline-item:hover {
  border-color: #CBD5E1;
  box-shadow: 2px 3px 4px rgba(0, 0, 0, 0.1), 0 4px 16px rgba(0, 0, 0, 0.06);
}

/* 休息卡片：近白底 + 虛線框、無陰影，時間與標題於卡片內垂直置中 */
.timeline-item.break {
  background: #FEFEFE;
  border-style: dashed;
  padding: 16px 28px;
  align-items: center;
  box-shadow: none;
}

.timeline-item.break:hover {
  box-shadow: none;
}

.timeline-item.break .t-time {
  padding-top: 0;
}

/* 休息類標題降低層次：與時間同色、一般字重，不與有內容的議程同等突出 */
.timeline-item.break h4 {
  margin: 0;
  font-weight: 400;
  color: #64748B;
}

.timeline-item .t-time {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-purple);
  min-width: 125px;
  flex-shrink: 0;
  padding-top: 2px;
}

.timeline-item.break .t-time {
  color: #64748B;
}

.timeline-item .t-body {
  flex: 1;
}

.timeline-item h4 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0F172A;
  margin: 0 0 10px 0;
  line-height: 1.4;
}

/* 講者結構化排版（解決斷行與 AI 樣板問題） */
.speakers-structured-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.speaker-entry {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-left: 14px;
  border-left: 3px solid #CBD5E1;
  transition: border-left-color 0.2s;
}

.speaker-entry:hover {
  border-left-color: var(--primary-purple);
}

/* 第一行：演講人姓名 */
.speaker-primary-name {
  font-size: 1.02rem;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.35;
}

/* 第二行：服務單位與職稱（同一行呈現，無分隔線，色調一致；
   一般文字流排版，寬度不足時逐字彈性換行，而非整段被推到下一行） */
.speaker-meta {
  font-size: 0.88rem;
  line-height: 1.45;
  color: #64748B;
  text-wrap: pretty;
}

.speaker-affiliation {
  font-weight: 400;
  color: #64748B;
}

.speaker-title-sep {
  display: none;
}

.speaker-exact-title {
  font-size: 0.88rem;
  color: #64748B;
  font-weight: 400;
}

.timeline-item.keynote-item {
  background: #FAF7FD;
  border: 1px solid #EDE9FE;
}

.timeline-item.keynote-item:hover {
  border-color: #DDD6FE;
  box-shadow: 2px 3px 4px rgba(0, 0, 0, 0.1), 0 4px 16px rgba(118, 15, 221, 0.1);
}

/* 下午專題場次：桌面版時間右側直接並排兩張分會卡片，不顯示場次標題 */
@media screen and (min-width: 769px) {
  .timeline-item.session-item h4 {
    display: none;
  }
  .timeline-item.session-item .parallel-container {
    margin-top: 0;
  }
}

/* Parallel Sessions in Timeline（淡紫細框卡片 + 分會小標） */
.parallel-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 14px;
}

.parallel-col {
  background: #ffffff;
  border: 1px solid #E5DDFF;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, box-shadow 0.2s;
}

/* 分會卡片 hover：框線與陰影帶入各自的分會色 */
.parallel-col.track1:hover {
  border-color: #B8D5E6;
  box-shadow: 0 8px 24px rgba(1, 101, 153, 0.08);
}

.parallel-col.track2:hover {
  border-color: #D4C4FF;
  box-shadow: 0 8px 24px rgba(118, 15, 221, 0.06);
}

/* 分會內講者 hover 色條改用分會色（分會二即主色紫，與其他議程一致） */
.parallel-col.track1 .speaker-entry:hover {
  border-left-color: var(--track1-color);
}

.parallel-col.track2 .speaker-entry:hover {
  border-left-color: var(--track2-color);
}

.parallel-col-content {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.parallel-col .speakers-structured-list {
  margin-top: 0;
}

.track-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* 分會小標：分會一＝藍色圓點、分會二＝紫色菱形 */
.track-eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 400;
  color: #64748B;
  line-height: 1.4;
}

.track-dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  margin: 0 2px;
}

.parallel-col.track1 .track-dot {
  background: var(--track1-color);
  border-radius: 50%;
}

.parallel-col.track2 .track-dot {
  background: var(--track2-color);
  border-radius: 1px;
  transform: rotate(45deg);
}

.parallel-col h5 {
  font-size: 1.08rem;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
  line-height: 1.45;
}

/* --------------------------------------------------
   Registration Closed State (單一頁面狀態切換)
-------------------------------------------------- */
.registration-closed-banner {
  display: none;
  margin: 0px auto 60px auto;
  max-width: 393px;
  background: #F1F5F9;
  border: 1.5px solid #CBD5E1;
  border-radius: 12px;
  padding: 16px 28px;
  text-align: center;
  color: #475569;
  font-weight: 700;
  font-size: 1.12rem;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  scroll-margin-top: 120px;
}

.registration-closed-banner i {
  font-size: 1.35rem;
  color: #64748B;
}

body.registration-closed #register {
  display: none !important;
}

body.registration-closed #floatingRegBtn {
  display: none !important;
}

body.registration-closed .main-split {
  display: block !important;
}

body.registration-closed .main-split .item:first-child {
  max-width: 100%;
  margin: 0 auto;
  width: 100%;
}

body.registration-closed .registration-closed-banner {
  display: flex;
}

body.registration-closed #navRegisterItem a {
  color: #64748B;
  background: transparent;
  border-radius: 0;
  padding: 14px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 3px solid transparent;
}

body.registration-closed #navRegisterItem a:hover {
  color: var(--primary-purple);
  border-bottom-color: var(--primary-purple);
}

/* --------------------------------------------------
   Footer (極簡純粹設計)
-------------------------------------------------- */
#footer {
  padding: 44px 0;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
}

#footer .content {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

#footer .footer-logo {
  width: 175px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.copyright {
  font-size: 0.85rem;
  color: #64748B;
  line-height: 1.6;
  text-align: right;
}

/* --------------------------------------------------
   Modals & Overlays
-------------------------------------------------- */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 540px;
  padding: 36px 48px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  text-align: center;
  position: relative;
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@media screen and (max-width: 520px) {
  .modal-card {
    padding-left: 24px;
    padding-right: 24px;
  }
}

.modal-icon-success {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px auto;
}

.modal-icon-success svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.modal-icon-success .check-circle,
.modal-icon-success .check-mark {
  fill: none;
  stroke: url(#checkGradient);
  stroke-width: 9.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
}

/* 彈窗由 display:none 轉為顯示時，動畫會自動重新播放 */
.modal-overlay.active .check-circle {
  animation: checkDraw 0.6s cubic-bezier(0.65, 0, 0.35, 1) 0.2s forwards;
}

.modal-overlay.active .check-mark {
  animation: checkDraw 0.4s cubic-bezier(0.65, 0, 0.35, 1) 0.8s forwards;
}

@keyframes checkDraw {
  to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .modal-overlay.active .check-circle,
  .modal-overlay.active .check-mark {
    animation: none;
    stroke-dashoffset: 0;
  }
}

/* 送出失敗提醒：琥珀色驚嘆號（#D97706 對白底約 3.2:1） */
.modal-icon-alert {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px auto;
}

.modal-icon-alert svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.modal-icon-alert .alert-circle,
.modal-icon-alert .alert-line {
  fill: none;
  stroke: #D97706;
  stroke-width: 9.5;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
}

.modal-icon-alert .alert-dot {
  fill: #D97706;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0);
}

.modal-overlay.active .alert-circle {
  animation: checkDraw 0.6s cubic-bezier(0.65, 0, 0.35, 1) 0.2s forwards;
}

.modal-overlay.active .alert-line {
  animation: checkDraw 0.3s cubic-bezier(0.65, 0, 0.35, 1) 0.8s forwards;
}

.modal-overlay.active .alert-dot {
  animation: alertDotPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) 1.1s forwards;
}

@keyframes alertDotPop {
  to { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .modal-overlay.active .alert-circle,
  .modal-overlay.active .alert-line {
    animation: none;
    stroke-dashoffset: 0;
  }

  .modal-overlay.active .alert-dot {
    animation: none;
    transform: scale(1);
  }
}

.modal-card h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 8px 0;
}

.modal-card .modal-desc {
  font-size: 0.95rem;
  color: #64748B;
  margin: 0 0 24px 0;
  line-height: 1.5;
  text-align: left;
}

.modal-btn-close {
  background: var(--primary-purple);
  color: #ffffff;
  border: none;
  padding: 12px 30px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
}

.modal-btn-close:hover {
  background: var(--dark-purple);
}

.modal-card .modal-desc a {
  color: var(--primary-purple);
  font-weight: 600;
  white-space: nowrap;
}

.modal-btn-secondary {
  background: transparent;
  color: #64748B;
  border: none;
  padding: 10px 30px;
  margin-top: 8px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  width: 100%;
}

.modal-btn-secondary:hover {
  color: #0F172A;
  background: #F1F5F9;
}

/* Loading Spinner Modal */
#loadingModal .modal-content {
  background: #ffffff;
  padding: 24px 36px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #334155;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #E2E8F0;
  border-top-color: var(--primary-purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --------------------------------------------------
   Responsive Web Design (RWD) Media Queries
-------------------------------------------------- */
@media screen and (max-width: 992px) {
  #container .main-split {
    flex-direction: column;
    gap: 30px;
  }
  #container .main-split .item:first-child,
  #container .main-split .item:last-child {
    flex: 1 1 100%;
    width: 100%;
  }
  .parallel-container {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 768px) {
  /* 報名卡片手機版：左右內距縮減到 16px，避免內容離卡片邊緣太遠 */
  #container .main-split .item:last-child {
    padding: 24px 16px 48px 16px;
  }

  /* 手機版 KV 專屬適配（~400px 高度、86% 水平對齊、強化可讀性遮罩） */
  #header .title {
    min-height: 390px;
    background-position: 86% center;
    background-size: cover;
  }
  #header .title::before {
    background: linear-gradient(180deg, rgba(46, 8, 90, 0.55) 0%, rgba(65, 12, 120, 0.45) 60%, rgba(95, 20, 160, 0.3) 100%);
  }
  #header .title .content {
    padding: 46px 20px;
  }
  #header .title .top-title {
    max-width: 100%;
    gap: 12px;
  }
  #header .title .top-title h1 {
    font-size: 32px;
    line-height: 1.25;
  }
  .date-venue-stacked {
    gap: 10px;
    margin-top: 4px;
  }
  .kv-meta-row {
    font-size: 1.2rem;
    gap: 10px;
  }
  .keyword-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .keyword-card {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    padding: 22px 20px;
    text-align: center;
  }
  .keyword-card .card-info {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
  }
  .keyword-card .card-icon-wrap {
    flex: 0 0 auto;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    order: 0;
  }
  .keyword-card .card-top-icon {
    margin: 0 auto 16px;
    width: 215px;
    max-width: 75%;
  }
  .keyword-card h3 {
    font-size: 1.15rem;
    margin-bottom: 4px;
  }
  /* 手機版標題還原單行 */
  .keyword-card .br-desktop {
    display: none;
  }
  .keyword-card .card-subtitle {
    font-size: 0.82rem;
    margin-bottom: 10px;
  }
  .keyword-card .card-divider {
    margin-bottom: 12px;
  }
  .keyword-card ul {
    gap: 8px;
    align-items: center;
  }
  .keyword-card li {
    font-size: 0.82rem;
    line-height: 1.4;
  }
  .location-card {
    gap: 20px;
    padding: 20px 18px;
  }
  .timeline-item {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    column-gap: 10px;
    row-gap: 8px;
  }
  .timeline-item .t-time {
    min-width: unset;
    padding-top: 0;
    order: 1;
  }
  /* .t-body 本身消失於盒模型，讓其子元素（標題/內文/講者列表/分會卡片）
     直接成為 .timeline-item 的 flex 子項，時間獨立一行，其餘內容各自換行至下一整行 */
  .timeline-item .t-body {
    display: contents;
  }
  .timeline-item h4 {
    order: 3;
    flex-basis: 100%;
  }
  .timeline-item .t-body > p {
    order: 4;
    flex-basis: 100%;
  }
  .timeline-item .speakers-structured-list {
    order: 5;
    flex-basis: 100%;
  }
  .timeline-item .parallel-container {
    order: 6;
    /* flex-basis 需明確算入負 margin 補回的寬度，單純用 100% + 負 margin
       並不會讓 flex 項目實際變寬，只是位移，因此要一併放大 basis */
    flex-basis: calc(100% + 32px);
    /* 讓分會卡片貼齊到左右 12px，而非沿用外層卡片 28px 的內距 */
    margin-left: -16px;
    margin-right: -16px;
  }
  .floating-reg-btn {
    bottom: 20px;
    right: 16px;
    font-size: 0.88rem;
    padding: 10px 18px;
    gap: 6px;
  }
  .floating-reg-btn i {
    font-size: 1.15rem;
  }
  #footer .content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
  }
  .copyright {
    text-align: left;
  }
}

/* ≤647px：日期與地點改為垂直堆疊（648px 以上並排時兩項文字皆可維持單行） */
@media screen and (max-width: 660px) {
  .location-card {
    flex-direction: column;
  }
  .loc-item {
    width: 100%;
    flex: 1 1 100%;
  }
}

/* 541–768px：三大核心關鍵卡片改為圖左文右，圖片隨卡片寬度縮放以平衡左右留白 */
@media screen and (min-width: 541px) and (max-width: 768px) {
  .keyword-card {
    flex-direction: row;
    align-items: center;
    gap: 24px;
    padding: 22px 24px;
    text-align: left;
  }
  .keyword-card .card-icon-wrap {
    flex: 0 0 auto;
    width: clamp(150px, 32%, 220px);
  }
  .keyword-card .card-top-icon {
    width: 100%;
    max-width: none;
    margin: 0;
  }
  .keyword-card ul {
    align-items: flex-start;
  }
}

/* ≤540px：描述清單整體水平置中，各項目維持靠左對齊 */
@media screen and (max-width: 540px) {
  .keyword-card ul {
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    align-items: flex-start;
    text-align: left;
  }
}

@media screen and (max-width: 380px) {
  .keyword-card {
    padding: 16px 14px;
  }
  .keyword-card .card-top-icon {
    width: 185px;
    max-width: 72%;
    margin-bottom: 12px;
  }
}
