/* ============================================================
   AHFIS Speaker Bio Modal — Enhancement Styles
   Drop-in layer. Does NOT override existing speaker-card styles;
   it only adds interactive states for bio-enabled cards and the
   modal itself. Existing non-bio cards are untouched.
   ============================================================ */

/* ---- Bio-enabled card interactive state ---- */
.speaker-card.clickable {
  cursor: pointer;
  position: relative;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.28s ease;
  outline: none;
}

.speaker-card.clickable:hover,
.speaker-card.clickable:focus-visible {
  transform: translateY(-5px);
  box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.18);
  border-color: rgba(0, 51, 102, 0.45);
}

.speaker-card.clickable:focus-visible {
  box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.35), 0 20px 30px -10px rgba(0, 0, 0, 0.18);
}

.speaker-card.clickable .speaker-image img {
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.speaker-card.clickable:hover .speaker-image img,
.speaker-card.clickable:focus-visible .speaker-image img {
  transform: scale(1.03);
}

/* "View Bio →" indicator — only injected on bio-enabled cards */
.speaker-view-bio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #003366; /* Summit Navy — AHFIS accent */
  text-decoration: none;
}

.speaker-view-bio .svb-arrow {
  display: inline-block;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.speaker-card.clickable:hover .speaker-view-bio .svb-arrow,
.speaker-card.clickable:focus-visible .speaker-view-bio .svb-arrow {
  transform: translateX(6px);
}

/* ---- Modal overlay ---- */
.ahfis-bio-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.75);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.26s ease, visibility 0.26s ease;
}

.ahfis-bio-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* ---- Modal panel ---- */
.ahfis-bio-modal {
  position: relative;
  width: 100%;
  max-width: 960px;
  max-height: 88vh;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.35);
  display: grid;
  grid-template-columns: 34% 66%;
  transform: translateY(16px) scale(0.97);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.3s ease;
}

.ahfis-bio-overlay.is-open .ahfis-bio-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* ---- Photo column ---- */
.ahfis-bio-photo {
  background: #f3f4f6;
  overflow: hidden;
}

.ahfis-bio-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* ---- Content column ---- */
.ahfis-bio-content {
  display: flex;
  flex-direction: column;
  max-height: 88vh;
  padding: 40px 44px 36px;
}

.ahfis-bio-scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 8px;
  margin-right: -8px;
}

.ahfis-bio-name {
  font-size: 2rem;
  line-height: 1.2;
  font-weight: 700;
  color: #111827;
  margin: 0 0 6px;
}

.ahfis-bio-designation {
  font-size: 1.0625rem;
  font-weight: 600;
  color: #003366;
  margin: 0 0 4px;
}

.ahfis-bio-organisation {
  font-size: 1rem;
  color: #4b5563;
  margin: 0 0 20px;
}

.ahfis-bio-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 20px;
}

.ahfis-bio-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #374151;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 5px 12px;
}

.ahfis-bio-chip svg {
  flex-shrink: 0;
  color: #003366;
}

.ahfis-bio-section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #003366;
  margin: 0 0 10px;
}

.ahfis-bio-text {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: #1f2937;
}

.ahfis-bio-text p {
  margin: 0 0 14px;
}

.ahfis-bio-text p:last-child {
  margin-bottom: 0;
}

.ahfis-bio-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.ahfis-bio-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #003366;
  text-decoration: none;
  transition: color 0.2s ease;
}

.ahfis-bio-link:hover {
  color: #001f3f;
  text-decoration: underline;
}

/* ---- Close button ---- */
.ahfis-bio-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #1f2937;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.ahfis-bio-close:hover,
.ahfis-bio-close:focus-visible {
  background: #003366;
  color: #ffffff;
  transform: rotate(90deg);
  outline: none;
}

.ahfis-bio-close svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}

/* ---- Mobile: vertical layout ---- */
@media (max-width: 768px) {
  .ahfis-bio-overlay {
    padding: 0;
    align-items: stretch;
  }

  .ahfis-bio-modal {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    max-width: 95vw;
    width: 95vw;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
  }

  .ahfis-bio-photo {
    height: 38vh;
    min-height: 220px;
  }

  .ahfis-bio-content {
    max-height: none;
    padding: 24px 22px 28px;
  }

  .ahfis-bio-name {
    font-size: 1.5rem;
  }

  .ahfis-bio-text {
    font-size: 1rem;
  }
}

@media (max-width: 380px) {
  .ahfis-bio-content {
    padding: 20px 16px 24px;
  }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .speaker-card.clickable,
  .speaker-card.clickable .speaker-image img,
  .speaker-view-bio .svb-arrow,
  .ahfis-bio-overlay,
  .ahfis-bio-modal,
  .ahfis-bio-close {
    transition: none !important;
  }
  .speaker-card.clickable:hover {
    transform: none;
  }
}
