:root {
  --brand-blue: #000061;
  --brand-orange: #FF7A1A;
  --bg-light: #FAFAFA;
  --text-dark: #1A1A1A;
  --text-gray: #555;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;
}

body {
  font-family: "Microsoft JhengHei", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  margin: 0;
  color: var(--text-gray);
  background: var(--bg-light);
}

/* =========================================================
   HERO SECTION
   ========================================================= */
.hero {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
  overflow: hidden;
  padding: 8rem 1.5rem 8rem;
  z-index: 0;
}

.hero::before {
  content: "";
  position: absolute;
  bottom: -50%;
  left: -15%;
  width: 180%;
  height: 180%;
  background: url('../images/meet_taipei_ce.svg') center/contain no-repeat;
  opacity: 0.9;
  transform: rotate(-10deg);
  z-index: 1;
  pointer-events: none;
}

.hero * {
  position: relative;
  z-index: 3;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-copy {
  flex: 1 1 480px;
}

.hero-visual {
  flex: 1 1 400px;
  text-align: center;
}

.dna-visual {
  width: 100%;
  max-width: 480px;
  height: auto;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.1));
  animation: dnaFloat 10s ease-in-out infinite alternate;
}

@keyframes dnaFloat {
  0% { transform: translateY(0px) rotate(-1deg); }
  100% { transform: translateY(-10px) rotate(1deg); }
}

.hero-headline {
  font-size: clamp(3rem, 5.5vw, 4rem); /* ✅ 放大整體主標 */
  font-weight: 800;
  line-height: 1.15;                  /* 稍微壓緊，集中視覺 */
  letter-spacing: -0.01em;
  color: var(--brand-blue);
  margin-bottom: 1rem;
  text-shadow:
    0 3px 10px rgba(255, 255, 255, 0.85),
    0 2px 6px rgba(0, 0, 97, 0.25);
}

.hero-headline .sub-title {
  display: block;                     /* ✅ 確保另起一行 */
  margin-top: 0.4rem;
  font-size: 0.7em;                   /* ✅ 約主標的70%大小 */
  font-weight: 700;
  color: #1a1a8f;                     /* 可保持品牌藍系 */
  line-height: 1.3;                   /* 副標行距略鬆一點 */
}


.hero-meta {
  font-size: 1.35rem;
  color: #333;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.8;
  margin-bottom: 2.2rem;
  text-shadow: 0 2px 6px rgba(255, 255, 255, 0.8);
}

.hero-cta {
  display: inline-block;
  background: var(--brand-blue);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.9rem 1.6rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 97, 0.25);
  transition: all 0.25s ease;
}
.hero-cta:hover {
  background: var(--brand-orange);
  box-shadow: 0 8px 20px rgba(255, 122, 26, 0.3);
  transform: translateY(-2px);
}

@media (max-width: 992px) {
  .hero {
    padding: 6rem 1.5rem 5rem;
  }
  .hero::before {
    bottom: -30%;
    left: -20%;
    width: 180%;
    height: 180%;
    opacity: 0.7;
    transform: rotate(-10deg); 
  }
  .hero-headline {
    font-size: clamp(1.8rem, 6vw, 2.4rem);
    text-align: center;
  }
  .hero-meta, .hero-cta {
    text-align: center;
  }
}

@media (max-width: 768px) {
  .hero-visual {
    order: -1;
  }
  .hero-copy {
    text-align: center;
  }
  .hero-cta {
    display: inline-block;
    margin-top: 1rem;
  }
}

/* =========================================================
   ABOUT
   ========================================================= */
.about-block {
  background: #FFF9E6;
  padding: 4rem 1.5rem;
  border-top: 1px solid rgba(0,0,0,0.05);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.about-inner {
  max-width: 900px;
  margin: 0 auto;
  color: var(--text-dark);
}
.section-head {
  border-left: 4px solid var(--brand-blue);
  padding-left: 0.75rem;
  margin-bottom: 1.5rem;
}
.section-head h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-dark);
}
.about-body p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-gray);
  max-width: 90ch;
}

/* =========================================================
   SPEAKERS
   ========================================================= */
.speakers {
  background: var(--bg-light);
  padding: 4rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}
.speakers-header {
  border-left: 4px solid var(--brand-blue);
  padding-left: 0.75rem;
  margin-bottom: 2rem;
}
.speakers-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-dark);
}
.speakers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.speaker-card {
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 8px 24px rgba(0,0,0,0.05);
  padding: 1.25rem;
  text-align: center;
  transition: all 0.25s ease;
}
.speaker-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,102,204,0.15);
}
.speaker-photo {
  aspect-ratio: 4/3;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #f8f8f8;
  margin-bottom: 1rem;
}
.speaker-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}
.speaker-card:hover .speaker-photo img {
  transform: scale(1.04);
}
.speaker-name-tw {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
}
.speaker-title {
  color: var(--brand-orange);
  font-size: 0.95rem;
  font-weight: 500;
  margin-top: 0.3rem;
}
.speaker-org {
  color: var(--text-gray);
  font-size: 0.85rem;
  margin-top: 0.3rem;
}

/* =========================================================
   AGENDA
   ========================================================= */
.agenda {
  background: #FFF9E6;
  padding: 4rem 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}
.agenda h2 {
  border-left: 4px solid var(--brand-blue);
  padding-left: 0.75rem;
  color: var(--text-dark);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 2rem;
}
.agenda-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.agenda-item {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 6px 20px rgba(0,0,0,0.05);
  padding: 1.75rem;
  transition: all 0.25s ease;
}
.agenda-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(0,102,204,0.12);
}
.agenda-time {
  text-align: right;
  min-width: 80px;
  font-weight: 600;
  color: var(--brand-orange);
  border-right: 2px solid rgba(255,122,26,0.2);
  padding-right: 1rem;
}
.agenda-topic {
  color: var(--text-dark);
  font-weight: 600;
  margin: 0 0 0.25rem;
}
.agenda-speaker {
  color: var(--text-gray);
  font-size: 0.9rem;
}
.agenda-content {
  flex: 1;                /* ✅ 右側文字區自動撐滿剩餘空間 */
  min-width: 0;           /* ✅ 防止內容被壓縮 */
}
/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: #fff;
  color: #333;
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 3px solid #FF6A00;
}
.footer-sponsors {
  padding: 0 1rem 2rem;
  text-align: center;
}
.footer-sponsors-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 2rem;
}
@media (min-width: 992px) {
  .footer-sponsors-inner { grid-template-columns: repeat(3, 1fr); }
}
.sponsor-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: #FF6A00;
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}
.sponsor-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
}
.sponsor-logos img {
  max-height: 60px;
  max-width: 160px;
  transition: transform 0.25s ease;
}
.sponsor-logos img:hover {
  transform: scale(1.05);
}

/* FOLLOW US */
.footer-social {
  border-top: 1px solid rgba(0,0,0,0.1);
  border-bottom: 1px solid rgba(0,0,0,0.1);
  padding: 2rem 1rem;
  color: #333;
}
.footer-social-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 2rem;
}
@media (min-width: 992px) {
  .footer-social-inner {
    grid-template-columns: 1fr 340px;
    align-items: flex-start;
  }
}
.follow-list { list-style: none; padding: 0; margin: 0; }
.follow-title {
  color: #FF6A00;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  text-transform: uppercase;
}
.follow-list hr { border: none; border-top: 1px solid rgba(0,0,0,0.15); width: 120px; margin: 0.75rem 0 1rem; }
.follow-icons a {
  color: #333;
  margin-right: 0.75rem;
  text-decoration: none;
  transition: color .15s ease;
}
.follow-icons a:hover {
  color: #FF6A00;
}
.social-right iframe {
  border: none;
  overflow: hidden;
  max-width: 100%;
  width: 340px;
  height: 450px;
  background: transparent;
}
.copyright {
  display: block;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.5;
  color: rgba(0,0,0,0.6);
  padding: 1rem;
  letter-spacing: 0.03em;
  border-top: 1px solid rgba(0,0,0,0.1);
}

/* =========================================================
   RWD
   ========================================================= */
@media (max-width: 600px) {
  .agenda-item { flex-direction: column; }
  .agenda-time {
    border-right: none;
    background: rgba(255,122,26,0.08);
    border-radius: 6px;
    padding: 0.4rem 0.5rem;
  }
  .sponsor-logos img { max-height: 40px; max-width: 120px; }
  .footer-social-inner { grid-template-columns: 1fr; }
  .social-right iframe { width: 100%; height: 400px; }
}

/* =========================================================
   LANGUAGE SWITCH BUTTON
   ========================================================= */
.english {
  position: fixed;
  right: 30px;
  top: 30px;
  background: rgba(0,0,0,0.7);
  padding: 5px 10px;
  z-index: 10;
  border-radius: 4px;
}
.english a {
  color: #fff;
  text-decoration: none;
  letter-spacing: 1px;
}

/* 無障礙隱藏文字 */
.hide {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =========================================================
   淡入淡出輪播 + 卡片高度統一
   ========================================================= */
.speakers-fade {
  position: relative;
  min-height: 450px; /* ✅ 預留高度避免切換跳動 */
}

/* 所有區塊疊在一起，只顯示一個 */
.speakers-fade .speakers-grid {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease-in-out;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.speakers-fade .speakers-grid.fade-show {
  opacity: 1;
  pointer-events: auto;
  position: relative;
}

/* ✅ 卡片統一高度（不管圖片比例或文字長度） */
.speaker-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
  min-height: 420px; /* ✅ 統一卡片高度 */
  text-align: center;
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 8px 24px rgba(0,0,0,0.05);
  padding: 1.25rem;
  transition: transform 0.25s ease;
}
.speaker-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,102,204,0.15);
}

/* ✅ 圖片統一比例 */
.speaker-photo {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #ffffff;
  margin-bottom: 1rem;
}
.speaker-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ✅ 文字區排版統一 */
.speaker-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.speaker-title {
  color: var(--brand-orange);
  font-size: 0.95rem;
  font-weight: 500;
  margin-top: 0.3rem;
  line-height: 1.3;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
}
.speaker-org {
  color: var(--text-gray);
  font-size: 0.85rem;
  margin-top: 0.3rem;
}
