/* =============================================================================
   EuroSTAR — Global Series blocks shared styles
   Hero Banner (eurostar/hero-banner)
   Session Card Grid (eurostar/session-grid) + slide-in drawer
   Brand tokens are defined once below — adjust the pink/gold values here if
   marketing supplies exact hex codes.
   ============================================================================= */

:root {
  --es-sg-font: "Google Sans Flex", "Google Sans", "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --es-brand-purple: #8934fb;
  --es-brand-pink:   #ff2d78;
  --es-brand-gold:   #ffb81c;
  --es-brand-navy:   #141b4d;
  /* Dark card panel from the Figma design — adjust if marketing supplies an exact hex. */
  --es-sg-card-bg:   #2b0f4a;
}

/* =============================================================================
   Block 1 — Hero Banner
   ============================================================================= */

.es-hero-banner {
  position: relative;
  margin: 0;
  line-height: 0; /* kill inline-image gap */
  /* Full-bleed breakout — matches the sponsor-hero-outer--full technique. */
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.es-hero-banner-link {
  display: block;
}

.es-hero-banner-media,
.es-hero-banner-media img {
  display: block;
  width: 100%;
  height: auto;
}

/* Desktop only: cap the landscape banner height to 80% of the viewport so it
   never overflows the screen; object-fit:cover crops the overflow rather than
   distorting. With a tall graphic (e.g. 1920×1200) this shows the middle band
   and trims the top/bottom — use object-position to bias which part stays.
   Below 768px the <picture> swaps in the purpose-built portrait mobile image,
   which is meant to be tall, so it shows in full with no cap/crop. */
@media (min-width: 768px) {
  .es-hero-banner-media img {
    max-height: 80vh;
    object-fit: cover;
    object-position: center center;
  }
}

.es-hero-banner-callout {
  position: absolute;
  width: clamp(200px, 29vw, 552px);
  height: auto;
}

/* Vertically centred positions */
.es-hero-banner-callout--middle-left,
.es-hero-banner-callout--middle-right {
  top: 50%;
  transform: translateY(-50%);
}

.es-hero-banner-callout--middle-left {
  left: 4%;
}

.es-hero-banner-callout--middle-right {
  right: 10%;
}

/* Bottom-corner positions */
.es-hero-banner-callout--bottom-left {
  left: 4%;
  bottom: 6%;
}

.es-hero-banner-callout--bottom-right {
  right: 4%;
  bottom: 6%;
}

.es-hero-banner--placeholder {
  padding: 40px 20px;
  text-align: center;
  background: #f0f0f1;
  border: 2px dashed #c3c4c7;
  border-radius: 8px;
  font-family: var(--es-sg-font);
  line-height: 1.5;
}

@media (max-width: 767px) {
  /* On mobile, dock the callout at the bottom-centre of the banner so it
     clears the centred badge, whatever desktop position was chosen. */
  .es-hero-banner-callout {
    width: clamp(200px, 60vw, 320px);
    left: 50%;
    right: auto;
    top: auto;
    bottom: 5%;
    transform: translateX(-50%);
  }
}

/* =============================================================================
   Block 2 — Session Card Grid
   ============================================================================= */

   .es-scheme-navy{
    --es-outer-bg: #2b0f4a;
   }

   .gform_confirmation_wrapper .gform_wrapper {
    padding: 10px 10px 40px 20px;
    color: white;
}

.es-sgrid {
  --es-sg-bg: var(--es-brand-purple);
  background: var(--es-sg-bg);
  font-family: var(--es-sg-font);
  padding: 56px 20px 64px;
  /* Full-bleed breakout — matches the sponsor-hero-outer--full technique. */
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.es-sgrid-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.es-sgrid-heading {
  color: #fff;
  font-family: var(--es-sg-font);
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 700;
  text-align: center;
  margin: 0 0 40px;
}

/* Two dark-panel cards side by side (Figma layout), centred in the section. */
.es-sgrid-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 420px));
  gap: 48px 40px;
  justify-content: center;
}

.es-sgrid-card {
  width: 100%;
  max-width: 420px;
  text-align: left;
}

.es-sgrid-card.has-detail {
  cursor: pointer;
  transition: transform 0.18s ease;
}

.es-sgrid-card.has-detail:hover,
.es-sgrid-card.has-detail:focus-visible {
  transform: translateY(-4px);
}

.es-sgrid-card.has-detail:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
}

/* Dark panel, indented by half the photo width so the photo badge straddles
   its left edge (half on the purple, half on the panel) and pokes above the top. */
.es-sgrid-panel {
  position: relative;
  background: var(--es-sg-card-bg);
  min-height: 200px;
  padding: 26px 24px 32px 88px;
  margin-top: 16px; /* room for the photo to poke above the panel */
  margin-left: 64px; /* half of the 128px photo width */
}

.es-sgrid-photo {
  position: absolute;
  top: -28px;
  left: -64px; /* pull half the photo outside the panel */
  width: 128px;
}

.es-sgrid-photo img {
  display: block;
  width: 100%;
  height: auto;
}

.es-sgrid-title {
  color: #fff;
  font-family: var(--es-sg-font);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 16px;
}

.es-sgrid-speaker {
  margin-bottom: 12px;
}

.es-sgrid-speaker:last-child {
  margin-bottom: 20px;
}

.es-sgrid-speaker-name {
  display: block;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.35;
  margin-bottom: 2px;
}

.es-sgrid-speaker-role {
  display: block;
  color: var(--es-brand-gold);
  font-size: 14px;
  line-height: 1.35;
}

/* Pills stacked bottom-left; the pink pill sits on the panel's bottom edge,
   the globe icon straddles the panel's left edge like the photo above it. */
.es-sgrid-times {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0px;
  margin-top: -30px;
  padding-left: 50px; /* globe centre lands on the panel edge (64px) */
}

.es-sgrid-pill {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 0 ;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

.es-sgrid-pill--pink {
  background: var(--es-brand-pink);
  color: #fff;
  margin-left: 14px; /* starts at the panel's left edge (50px + 14px = 64px) */
}

.es-sgrid-pill--gold {
  background: var(--es-brand-gold);
  color: var(--es-brand-navy);
}

.es-sgrid-time-secondary {
  display: flex;
  align-items: center;
  gap: 1px;
  margin-left: -12px;
}

.es-sgrid-globe {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 30px;
  border-radius: 0;
  background: var(--es-sg-card-bg);
  color: #fff;
  flex: none;
}

.es-sgrid--placeholder {
  padding: 40px 20px;
  text-align: center;
  background: #f0f0f1;
  border: 2px dashed #c3c4c7;
  border-radius: 0px;
  font-family: var(--es-sg-font);
  line-height: 1.5;
}

/* ---------- Slide-in drawer (mirrors Programme 2026 drawer) ---------- */

.es-sgrid-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 27, 77, 0.55);
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 9998;
}

.es-sgrid-overlay.open {
  opacity: 1;
}

.es-sgrid-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(480px, 100%);
  background: #fff;
  box-shadow: -12px 0 40px rgba(20, 27, 77, 0.25);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  font-family: var(--es-sg-font);
  line-height: 1.5;
}

.es-sgrid-drawer.open {
  transform: translateX(0);
}

.es-sgrid-drawer:focus {
  outline: none;
}

.es-sgrid-drawer-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: var(--es-brand-purple);
  color: #fff;
  cursor: pointer;
  z-index: 1;
  transition: background 0.15s ease, transform 0.15s ease;
}

/* The X is drawn with pure CSS (two rotated bars) rather than an inline SVG,
   because a security/sanitiser plugin on staging strips <svg> from block output.
   The bars are drawn directly on the BUTTON (a stable 40×40 position:absolute
   box) with a fixed width — the inner <span> collapses to 0 width inside the
   flex button on staging, so we must not depend on it. The empty span in the
   markup is harmless and left in place. Fixed px width + scoped !important so
   theme/plugin width rules can't zero the bars out. */
.es-sgrid-drawer-close::before,
.es-sgrid-drawer-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px !important;
  height: 2.5px;
  margin: -1.25px 0 0 -9px;
  background: #fff;
  border-radius: 0px;
}

.es-sgrid-drawer-close::before {
  transform: rotate(45deg);
}

.es-sgrid-drawer-close::after {
  transform: rotate(-45deg);
}

.es-sgrid-drawer-close:hover,
.es-sgrid-drawer-close:focus-visible {
  background: var(--es-brand-navy);
  transform: rotate(90deg);
}

.es-sgrid-drawer-close:focus-visible {
  outline: 3px solid var(--es-brand-pink);
  outline-offset: 2px;
}

.es-sgrid-drawer-body {
  overflow-y: auto;
  padding: 28px 28px 40px;
}

.es-sgrid-drawer-body .es-sgrid-detail-head {
  padding-right: 40px; /* clear the close button */
  margin-bottom: 20px;
}

.es-sgrid-drawer-body .es-sgrid-detail-photo {
  display: block;
  width: 140px;
  height: auto;
  margin-bottom: 16px;
}

.es-sgrid-drawer-body .es-sgrid-detail-title {
  color: var(--es-brand-navy);
  font-family: var(--es-sg-font);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 12px;
}

.es-sgrid-drawer-body .es-sgrid-times {
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  margin: 0 0 4px;
  padding-left: 0;
}

.es-sgrid-drawer-body .es-sgrid-pill--pink {
  margin-left: 0;
}

.es-sgrid-drawer-body .es-sgrid-detail-label {
  color: var(--es-brand-purple);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 22px 0 8px;
}

.es-sgrid-drawer-body .es-sgrid-detail-desc {
  color: #333;
  font-size: 15px;
}

.es-sgrid-drawer-body .es-sgrid-detail-desc p {
  margin: 0 0 12px;
}

.es-sgrid-drawer-body .es-sgrid-detail-speaker {
  margin-bottom: 16px;
}

.es-sgrid-drawer-body .es-sgrid-speaker-name {
  color: var(--es-brand-navy);
  font-size: 16px;
}

.es-sgrid-drawer-body .es-sgrid-speaker-role {
  color: #666;
}

.es-sgrid-drawer-body .es-sgrid-speaker-bio {
  color: #333;
  font-size: 14px;
  margin: 6px 0 0;
}

body.es-sgrid-drawer-open {
  overflow: hidden;
}

/* Below ~900px two 420px cards can't fit without crushing the text column,
   so drop to a single centred column early. */
@media (max-width: 900px) {
  .es-sgrid-grid {
    grid-template-columns: minmax(0, 420px);
    gap: 40px;
  }
}

@media (max-width: 600px) {
  .es-sgrid {
    padding: 40px 16px 48px;
  }

  .es-sgrid-panel {
    min-height: 170px;
    padding: 22px 18px 28px 68px;
    margin-left: 50px; /* half of the 100px mobile photo */
  }

  .es-sgrid-photo {
    left: -50px;
    width: 100px;
  }

  .es-sgrid-times {
    padding-left: 37px; /* globe centre lands on the 50px panel edge */
  }

  .es-sgrid-pill--pink {
    margin-left: 13px;
  }

  .es-sgrid-drawer {
    width: 100%;
  }
}
