/* ============================================================
   IASTA 2026 — Ultra-Compact Masthead with Inline Logos & Title
   Places the three institute logos side-by-side on the left and
   the "IASTA 2026" title beside them on the same row, while
   preserving all existing visual styles, animations, and QR cards
   so the coverflow photo gallery is fully visible in one page.
   ============================================================ */

.masthead {
  padding: 0.6rem 1rem 0.65rem !important;
}

.masthead .masthead-inner {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: center;
  align-items: center;
  column-gap: 1.5rem;
  row-gap: 0.28rem;
  margin: 2px auto !important;
  padding: 0.55rem 1.25rem 0.65rem !important;
}

/* Logos side-by-side on the left of the title */
.masthead .logo-container {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 0 !important;
  flex-shrink: 0;
}

.masthead .logo-wrapper,
.masthead .logo-wrapper2,
.masthead .logo-wrapper3 {
  width: 68px !important;
  height: 68px !important;
}

/* "IASTA 2026" title stage beside the logos; fixed width prevents
   letter-spacing condense animation from shifting the logos */
.masthead .title-dissolve-stage {
  grid-column: 2;
  grid-row: 1;
  width: 490px;
  min-height: 4.3rem;
  margin: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.masthead h1 {
  font-size: 4.15rem !important;
  line-height: 1 !important;
  letter-spacing: 0.13em !important;
  margin: 0 !important;
  white-space: nowrap;
}

/* Keep flash-in highlight pills centered tightly around the inline "IASTA 2026"
   title so they do not overlap the logos on the left or QR card on the right */
.masthead .flashin-item {
  padding: 0.26rem 0.7rem;
  gap: 0.35rem;
  animation-name: flashin-to-title-inline;
}

.masthead .flashin-item .flashin-num {
  font-size: clamp(0.95rem, 1.6vw, 1.25rem);
}

.masthead .flashin-item .flashin-label {
  font-size: clamp(0.66rem, 1vw, 0.8rem);
}

@keyframes flashin-to-title-inline {
  0% {
    opacity: 0;
    filter: blur(12px) brightness(1.4);
    transform: translate3d(
        calc(-50% + calc(var(--start-x, 0px) * 0.5)),
        calc(-50% + calc(var(--start-y, -90px) * 0.6)),
        0
      )
      scale(0.72)
      rotate(var(--start-rot, 0deg));
  }
  18% {
    opacity: 1;
    filter: blur(0px) brightness(1.08);
    transform: translate3d(
        calc(-50% + calc(var(--hold-x, 0px) * 0.5)),
        calc(-50% + calc(var(--hold-y, -40px) * 0.6)),
        0
      )
      scale(1)
      rotate(0deg);
  }
  56% {
    opacity: 1;
    filter: blur(0px) brightness(1.15);
    transform: translate3d(
        calc(-50% + calc(var(--hold-x, 0px) * 0.38)),
        calc(-50% + calc(var(--hold-y, -40px) * 0.45)),
        0
      )
      scale(0.96)
      rotate(0deg);
  }
  84% {
    opacity: 0.78;
    filter: blur(6px) brightness(1.9);
    transform: translate3d(
        calc(-50% + calc(var(--target-x, 0px) * 0.65)),
        calc(-50% + calc(var(--target-y, 0px) * 0.65)),
        0
      )
      scale(0.48);
  }
  100% {
    opacity: 0;
    filter: blur(18px) brightness(2.4);
    transform: translate3d(
        calc(-50% + calc(var(--target-x, 0px) * 0.65)),
        calc(-50% + calc(var(--target-y, 0px) * 0.65)),
        0
      )
      scale(0.12);
  }
}

/* Full conference name, theme line, and metadata pills span full width below */
.masthead .full-name {
  grid-column: 1 / -1;
  margin: 0.1rem 0 0.2rem !important;
  font-size: 0.96rem !important;
  line-height: 1.25;
}

.masthead .theme-line {
  grid-column: 1 / -1;
  margin: 0 auto 0.4rem !important;
  font-size: 1.15rem !important;
  line-height: 1.2;
}

.masthead .masthead-meta {
  grid-column: 1 / -1;
  margin-top: 0 !important;
}

/* Proportionally sized QR cards so they fit comfortably inside the shorter masthead */
.qr-card {
  width: 122px;
  padding: 6px;
  font-size: 10px;
}

.qr-card span {
  margin-top: 5px;
}

@media (max-width: 1180px) {
  .qr-card {
    width: 100px;
    margin: 6px 6px;
  }
}

@media (max-width: 820px) {
  .masthead .masthead-inner {
    grid-template-columns: 1fr;
    row-gap: 0.25rem;
  }

  .masthead .logo-container,
  .masthead .title-dissolve-stage {
    grid-column: 1;
    grid-row: auto;
  }

  .masthead .title-dissolve-stage {
    width: 100%;
    min-height: 3.1rem;
  }

  .masthead h1 {
    font-size: 2.7rem !important;
    letter-spacing: 0.1em !important;
  }

  .masthead .logo-wrapper,
  .masthead .logo-wrapper2,
  .masthead .logo-wrapper3 {
    width: 48px !important;
    height: 48px !important;
  }
}
