/* ============================================================
   Keynote Speakers Section
   - Strip width is FIXED; slices share it with flex, so the
     active slice grows without pushing the details panel.
   - Details panel is at least as tall as the photos and only
     grows when "Read Full Bio" / "Read Talk Abstract" is opened.
   ============================================================ */

#keynote-speakers {
  --kn-height: 600px;        /* photo strip height              */
  --kn-strip-width: 650px;   /* total strip width (never moves) */
  --kn-accent: rgb(0, 159, 206);
  --kn-accent-dark: rgb(0, 95, 130);
  padding: 0;
  background: transparent;
}

/* ---------- Section header / diagonal background ---------- */

/* Keep the background image static: it scales with the screen
   width only, never with the height of the content inside. */
#keynote-speakers .diagonal-section {
  background-size: 100% auto !important;
  background-position: center top !important;
  background-repeat: no-repeat !important;
}

.keynote-intro {
  text-align: center;
  padding: 0 20px 20px;
}

#keynote-speakers .tier-title,
#keynote-speakers .tier-paragraph {
  color: #fff;
}

.keynote-hint {
  margin: 10px auto 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  font-style: italic;
}

.keynote-interactive-container {
  background: #fff;
  padding: 15px;
  text-align: left;
}

/* ---------- Grid: fixed strip + flexible panel ---------- */

.keynote-grid-wrapper {
  display: grid;
  grid-template-columns: var(--kn-strip-width) minmax(0, 1fr);
  gap: 25px;
  max-width: 1400px;
  margin: 0 auto;
  align-items: start;
}

/* ---------- Left: photo strip ---------- */

.speakers-strip {
  display: flex;
  width: var(--kn-strip-width);
  height: var(--kn-height);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  position: sticky;
  top: 20px;
}

.speaker-slice {
  position: relative;
  flex: 1 1 0;            /* every slice shares the fixed width */
  min-width: 0;
  height: 100%;
  cursor: pointer;
  overflow: hidden;
  outline: none;
  opacity: 0.75;
  transition: flex-grow 0.4s ease, opacity 0.4s ease;
}

.speaker-slice.active {
  flex-grow: 1.35;        /* a bit wider, strip total unchanged */
  opacity: 1;
  z-index: 2;
}

.slice-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(85%) brightness(0.6);
  transition: filter 0.4s ease, transform 0.4s ease;
}

.speaker-slice.active .slice-photo {
  filter: grayscale(0%) brightness(1);
  transform: scale(1.04);
}

/* Optional per-photo crop tweak */
.speaker-slice[data-speaker="speaker4"] .slice-photo {
  object-position: center 20%;
}

/* Frame drawn on top of the photo */
.speaker-slice::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 0 var(--kn-accent);
  transition: box-shadow 0.3s ease;
  pointer-events: none;
  z-index: 3;
}

.speaker-slice.active::after {
  box-shadow: inset 0 0 0 4px var(--kn-accent);
}

.speaker-slice:focus-visible::after {
  box-shadow: inset 0 0 0 4px var(--kn-accent-dark);
}

.slice-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.speaker-slice.active .slice-overlay {
  opacity: 0;
}

/* ---------- Date badges ---------- */

.date-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
}

.day2-badge    { background: linear-gradient(90deg, #8E1229, #C51F3D); }
.day2-pm-badge { background: linear-gradient(90deg, #B38A0A, #E5B517); }
.day3-badge    { background: linear-gradient(90deg, rgb(0, 95, 130), rgb(0, 159, 206)); }

.date-text {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  white-space: nowrap;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* ---------- Right: details panel ---------- */

.speaker-details-panel {
  background: #fff;
  padding: 15px 20px;
  min-width: 0;
  min-height: var(--kn-height);   /* same height as the photos */
  display: flex;
  flex-direction: column;
}

.speaker-details {
  display: none;
  flex: 1;
  flex-direction: column;
}

.speaker-details.active {
  display: flex;
  animation: knFadeIn 0.4s ease-in-out;
}

@keyframes knFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.details-header { margin-bottom: 24px; }

.details-name {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--kn-accent);
  margin: 0 0 10px;
}

.details-title {
  font-size: 1.3rem;
  color: #666;
  font-weight: 500;
  font-style: italic;
  margin: 0 0 10px;
}

.details-company {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 10px;
  padding: 5px;
  background: #fff;
/*  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);*/
}

.company-logo { height: 50px; width: auto; object-fit: contain; }

.company-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
}

.company-name a,
.details-extended a {
  color: var(--kn-accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 159, 206, 0.4);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.company-name a:hover,
.details-extended a:hover {
  color: var(--kn-accent-dark);
  border-bottom-color: var(--kn-accent-dark);
}

.speaking-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 5px;
/*  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);*/
}

/* Left borders match the badge colours */
.day2-info    { border-left: 4px solid #C51F3D; }
.day2-pm-info { border-left: 4px solid #E5B517; }
.day3-info    { border-left: 4px solid var(--kn-accent); }

.speaking-day,
.speaking-time {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
}

.talk-info {
  background: #fff;
  /*box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 15px 20px;
  margin-bottom: 25px;
  border-left: 4px solid var(--kn-accent); */
}

.talk-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 4px;
}

.talk-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--kn-accent-dark);
  margin: 0;
}

.details-bio p,
.details-extended p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #333;
  margin: 0 0 15px;
}

.details-divider {
  border: 0;
  border-top: 2px solid rgba(0, 159, 206, 0.3);
  margin: 20px 0;
}

.abstract-heading {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--kn-accent-dark);
  margin: 0 0 10px;
}

/* ---------- Buttons ---------- */

.details-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 5px;
}

.details-more-btn {
  background: var(--kn-accent);
  color: #fff;
  border: none;
  padding: 12px 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 3px 8px rgba(0, 159, 206, 0.3);
}

.details-more-btn:hover {
  background: var(--kn-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 159, 206, 0.4);
}

.details-abstract-btn {
  background: #fff;
  color: var(--kn-accent);
  box-shadow: inset 0 0 0 2px var(--kn-accent);
}

.details-abstract-btn:hover {
  background: var(--kn-accent-dark);
  color: #fff;
  box-shadow: inset 0 0 0 2px var(--kn-accent-dark);
}

/* ---------- Responsive ---------- */

@media (max-width: 1200px) {
  #keynote-speakers { --kn-height: 420px; }

  .keynote-grid-wrapper {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .speakers-strip {
    width: 100%;
    max-width: var(--kn-strip-width);
    margin: 0 auto;
    position: static;
  }

  .speaker-details-panel { min-height: 0; }
  .details-name { font-size: 2rem; }
}

@media (max-width: 768px) {
  #keynote-speakers { --kn-height: 360px; }

  .speaker-details-panel { padding: 12px 15px; }
  .details-name  { font-size: 1.8rem; }
  .details-title { font-size: 1.1rem; }
  .company-logo  { height: 40px; }
  .company-name  { font-size: 1rem; }
  .date-text     { font-size: 0.75rem; letter-spacing: 1px; }
  .talk-title    { font-size: 1.3rem; }
}

@media (max-width: 576px) {
  .speakers-strip {
    flex-wrap: wrap;
    height: auto;
  }

  .speaker-slice,
  .speaker-slice.active {
    flex: 0 0 50%;
    height: 260px;
  }

  .speaker-details-panel { padding: 10px 12px; }
  .details-name { font-size: 1.6rem; }

  .details-company {
    flex-direction: column;
    text-align: center;
  }

  .details-more-btn { width: 100%; }
  .keynote-intro h2 { font-size: 2rem !important; }
}

@media (prefers-reduced-motion: reduce) {
  .speaker-slice,
  .slice-photo,
  .speaker-details.active { transition: none; animation: none; }
}
