/* =========================================================
   ICTE 2026 — Updated CSS (styles.css)
   Fix: hero title line2 no longer overflows on mobile
   Added: Keynote Speakers vertical cards with portrait photos
   ========================================================= */

/* -------------------------
   Brand variables
------------------------- */
:root {
  --fhss-primary: #422C74; /* deep purple */
  --fhss-accent: #C794F9;  /* light purple */
  --fhss-gradient: linear-gradient(90deg, #422c74 0%, #C794F9 100%);

  --fhss-bg: #ffffff;
  --fhss-bg-soft: #F7F4FD;
  --fhss-bg-soft-2: #F2EDFB;
  --fhss-bg-soft-3: #E4DCF7;

  --fhss-text: #3B3838;
  --fhss-text-2: #333333;
  --fhss-muted: #7A7A7A;

  --fhss-border: #E0E0E0;
  --fhss-shadow: 0 10px 30px rgba(0,0,0,.08);
  --fhss-shadow-2: 0 6px 24px rgba(0,0,0,.10);

  --radius: 14px;
  --radius-sm: 10px;

  --container: 1180px;
}

/* -------------------------
   Base / reset
------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--fhss-text);
  background: var(--fhss-bg);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color .2s, background-color .2s, border-color .2s, transform .2s;
}

a:hover { color: var(--fhss-accent); }

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

h1, h2, h3, h4 {
  margin: 0;
  color: var(--fhss-text-2);
}

p {
  margin: 0;
  color: var(--fhss-muted);
}

.container {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  min-width: 0;
}

/* Prevent long strings from overflowing */
h1, h2, h3, h4, p, li, a, span, div {
  overflow-wrap: anywhere;
  word-break: normal;
}

/* -------------------------
   Topbar / Language switch
------------------------- */
.topbar {
  background: var(--fhss-bg);
  border-bottom: 1px solid var(--fhss-border);
  position: relative;
  z-index: 100;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
}

.brandline {
  font-size: 13px;
  color: var(--fhss-text);
  font-weight: 500;
}

.langswitch {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--fhss-bg-soft);
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--fhss-border);
  flex: 0 0 auto;
}

.langswitch button {
  background: transparent;
  border: none;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--fhss-text);
  cursor: pointer;
  transition: all .2s;
}

.langswitch button.active {
  background: var(--fhss-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(66,44,116,0.25);
}

/* -------------------------
   Language sections
------------------------- */
.lang-section { display: none; }

.lang-section.active {
  display: block;
  animation: fadeIn .4s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* -------------------------
   Header / Navigation
------------------------- */
header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--fhss-gradient);
  box-shadow: 0 4px 20px rgba(66,44,116,.15);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  min-width: 0;
}

.logo-badge {
  width: 42px;
  height: 42px;
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 16px;
  flex: 0 0 auto;
}

.logo-text { min-width: 0; }

.logo-text strong {
  display: block;
  font-size: 18px;
  line-height: 1.1;
}

.logo-text span {
  font-size: 12px;
  opacity: .9;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

nav a {
  padding: 8px 16px;
  border-radius: 999px;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}

nav a:hover {
  background: rgba(255,255,255,.15);
  color: #fff;
}

nav a.cta-nav {
  background: #fff;
  color: var(--fhss-primary);
}

nav a.cta-nav:hover {
  background: var(--fhss-bg-soft);
  transform: translateY(-1px);
}

/* -------------------------
   Hero
------------------------- */
.hero {
  background:
    radial-gradient(circle at 80% 20%, rgba(199,148,249,.15), transparent 50%),
    linear-gradient(180deg, var(--fhss-bg-soft) 0%, #fff 100%);
  padding: 60px 0;
  border-bottom: 1px solid var(--fhss-border);
}

.hero-kicker {
  display: inline-block;
  padding: 6px 14px;
  background: var(--fhss-primary);
  color: #fff;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 20px;
}

.hero h1,
.hero .hero-title {
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.15;
  color: var(--fhss-text-2);
  margin: 0 0 20px;
  max-width: 980px;
  overflow-wrap: anywhere;
}

.hero h1 span,
.hero .hero-title span {
  color: var(--fhss-primary);
}

.hero-subtitle {
  font-size: 20px;
  color: var(--fhss-muted);
  margin-bottom: 30px;
  max-width: 72ch;
}

.hero-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.meta-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #fff;
  border: 1px solid var(--fhss-border);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--fhss-text);
}

.meta-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--fhss-accent);
  border-radius: 50%;
}

/* -------------------------
   Buttons
------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .2s;
  user-select: none;
}

.btn-primary {
  background: var(--fhss-primary);
  color: #fff;
  box-shadow: 0 8px 20px rgba(66,44,116,.2);
}

.btn-primary:hover {
  background: #322158;
  color: #fff;
  transform: translateY(-2px);
}

.btn-outline {
  background: #fff;
  border-color: var(--fhss-border);
  color: var(--fhss-text);
}

.btn-outline:hover {
  border-color: var(--fhss-primary);
  color: var(--fhss-primary);
}

/* -------------------------
   Hero title line control
------------------------- */
.desktop-only { display: none; }

@media (min-width: 768px) {
  .desktop-only { display: inline; }
}

.hero .hero-title .line2 { white-space: normal; }

@media (min-width: 768px) {
  .hero .hero-title .line2 { white-space: nowrap; }
}

.no-wrap-desktop { white-space: normal; }

@media (min-width: 768px) {
  .no-wrap-desktop { white-space: nowrap; }
}

/* -------------------------
   Sections
------------------------- */
section { padding: 60px 0; }

.bg-light { background: var(--fhss-bg-soft-2); }

.section-header { margin-bottom: 40px; }

.section-header h2 {
  font-size: 32px;
  color: var(--fhss-primary);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-header h2::before {
  content: "";
  display: block;
  width: 6px;
  height: 24px;
  background: var(--fhss-accent);
  border-radius: 4px;
}

.section-header p {
  font-size: 16px;
  color: var(--fhss-muted);
  margin: 0;
  max-width: 700px;
}

.theme-lead {
  font-size: 16px;
  color: var(--fhss-muted);
  margin: 0;
  max-width: 760px;
}

/* -------------------------
   Cards
------------------------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.card {
  background: #fff;
  border: 1px solid var(--fhss-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--fhss-shadow);
  border-color: var(--fhss-accent);
}

.card h3 {
  font-size: 18px;
  color: var(--fhss-primary);
  margin: 0 0 12px;
}

.card p {
  margin: 0;
  font-size: 14.5px;
  color: var(--fhss-text);
  line-height: 1.65;
}

.card p + p { margin-top: 12px; }

/* -------------------------
   Conference Topics
------------------------- */
.topic-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
}

.topic-item {
  background: #fff;
  border: 1px solid var(--fhss-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.topic-head {
  background: var(--fhss-primary);
  color: #fff;
  padding: 16px 20px;
  font-weight: 700;
  font-size: 16px;
}

.topic-body { padding: 20px; }

.topic-body ul {
  margin: 0;
  padding-left: 20px;
  color: var(--fhss-text);
  font-size: 15px;
}

.topic-body li { margin-bottom: 8px; }

/* -------------------------
   Keynote Speakers
------------------------- */
.keynote-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 980px;
  margin: 0 auto;
}

.speaker-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.speaker-photo {
  width: 140px;
  height: 160px;
  flex: 0 0 140px;
  border-radius: 12px;
  object-fit: cover;
  object-position: center top;
  border: 1px solid var(--fhss-border);
  background: var(--fhss-bg-soft);
}

.speaker-info {
  min-width: 0;
}

.speaker-card h3 {
  font-size: 20px;
  color: var(--fhss-primary);
  margin-bottom: 10px;
}

.speaker-role {
  color: var(--fhss-text);
  font-size: 15px;
  line-height: 1.7;
}

/* -------------------------
   Timeline
------------------------- */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.timeline-row {
  display: flex;
  background: #fff;
  border: 1px solid var(--fhss-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.timeline-date {
  background: var(--fhss-bg-soft-3);
  color: var(--fhss-primary);
  padding: 20px;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-weight: 800;
  text-align: center;
  border-right: 1px solid var(--fhss-border);
}

.timeline-date span {
  font-size: 12px;
  font-weight: 600;
  color: var(--fhss-text);
  margin-top: 4px;
}

.timeline-content {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.timeline-content h4 {
  margin: 0 0 4px;
  font-size: 18px;
  color: var(--fhss-text-2);
}

.timeline-content p {
  margin: 0;
  color: var(--fhss-muted);
  font-size: 14px;
}

/* -------------------------
   Footer
------------------------- */
footer {
  background: #2A1C4A;
  color: #fff;
  padding: 60px 0 30px;
}

.footer-flex {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand {
  flex: 1;
  min-width: 280px;
}

.footer-brand h2 {
  margin: 0 0 12px;
  font-size: 20px;
  color: #fff;
}

.footer-brand p {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  max-width: 460px;
  line-height: 1.6;
}

.footer-links { min-width: 250px; }

.footer-links h3 {
  margin: 0 0 16px;
  font-size: 16px;
  color: var(--fhss-accent);
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li { margin-bottom: 10px; }

.footer-links a {
  color: rgba(255,255,255,0.8);
  font-size: 14px;
}

.footer-links a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  text-align: center;
}

/* -------------------------
   Responsive adjustments
------------------------- */
@media (max-width: 1024px) {
  :root { --container: 1120px; }
}

@media (max-width: 900px) {
  .hero { padding: 52px 0; }
  .hero-subtitle { font-size: 18px; }
  .topic-list { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
}

@media (max-width: 768px) {
  nav ul { display: none; }

  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .brandline { line-height: 1.35; }

  .footer-flex { flex-direction: column; }

  .timeline-row { flex-direction: column; }

  .timeline-date {
    border-right: none;
    border-bottom: 1px solid var(--fhss-border);
    padding: 12px;
    flex-direction: row;
    gap: 8px;
    min-width: auto;
    justify-content: flex-start;
  }

  .timeline-date span { margin-top: 0; }

  .hero .container > div[style*="display: flex"] {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .speaker-card {
    align-items: flex-start;
    gap: 16px;
  }

  .speaker-photo {
    width: 96px;
    height: 112px;
    flex-basis: 96px;
    border-radius: 10px;
    object-position: center top;
  }

  .speaker-card h3 {
    font-size: 18px;
  }

  .speaker-role {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .hero { padding: 44px 0; }

  .hero-kicker { margin-bottom: 14px; }

  .hero h1,
  .hero .hero-title {
    margin-bottom: 14px;
  }

  .hero-meta { margin-bottom: 26px; }

  .grid-3 { grid-template-columns: 1fr; }

  .topic-list { grid-template-columns: 1fr; }

  .speaker-card {
    flex-direction: column;
  }

  .speaker-photo {
    width: 120px;
    height: 140px;
    flex-basis: auto;
    object-position: center top;
  }
}