/* ========================================
   Event Detail Page Styles
   ======================================== */

/* Hero */
.event-hero {
  /* Palindrome gradient: lime-green at 0% and 100% → invisible loop seam */
  background: linear-gradient(135deg,
    var(--color-lime-green)    0%,
    var(--color-golden-yellow) 18%,
    var(--color-sunset-orange) 33%,
    var(--color-coral)         50%,
    var(--color-sunset-orange) 67%,
    var(--color-golden-yellow) 82%,
    var(--color-lime-green)    100%
  );
  background-size: 400% 400%;
  animation: heroFlow 10s linear infinite;
  padding: calc(var(--space-20) + 72px) 0 var(--space-16);
  position: relative;
  overflow: hidden;
}

/* Pushes vivid colour down away from the header, fades into article at bottom */
.event-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    rgba(255,255,255,0.55) 0%,    /* bleach out the top so header is clear */
    rgba(255,255,255,0)    28%,   /* gradient fully visible from here down */
    rgba(0,0,0,0.08)       65%,
    var(--color-off-white)  100%  /* fade into article */
  );
  pointer-events: none;
}

.event-hero .container {
  position: relative;
  z-index: 2;
}

.event-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: rgba(255,255,255,0.85);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-8);
  transition: color var(--transition-fast), gap var(--transition-fast);
}

.event-back:hover {
  color: var(--color-white);
  gap: var(--space-3);
}

.event-back svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-fast);
}

.event-back:hover svg {
  transform: translateX(-3px);
}

.event-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.event-hero-tag {
  display: inline-block;
  padding: var(--space-1) var(--space-4);
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.event-hero-title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-4xl), 7vw, var(--text-7xl));
  font-weight: var(--font-weight-black);
  text-transform: uppercase;
  line-height: 0.95;
  color: var(--color-white);
  text-shadow: 0 4px 30px rgba(0,0,0,0.15);
  margin-bottom: var(--space-10);
}

/* Article Layout */
.event-article-container {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-16);
  align-items: start;
}

/* Writeup */
.event-writeup {
  min-width: 0;
}

.event-lead {
  font-size: var(--text-xl);
  line-height: 1.8;
  color: var(--color-charcoal);
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--space-10);
  padding-bottom: var(--space-10);
  border-bottom: 2px solid var(--color-gray-light);
}

.event-writeup h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  /*
   * Vertical hotspot gradient (pinned to viewport via background-attachment:fixed).
   * The viewport is divided into three zones:
   *   0–25%   → washed-out (pale peach / pale green) — headings not yet in focus
   *   30–70%  → vivid Aurora colours — this is where your eye is right now
   *   75–100% → washed-out again — headings already passed or below focus
   *
   * Whichever h2 sits in the 30-70% band of the viewport at any moment gets
   * the vivid treatment; others fade naturally. The 170deg angle gives enough
   * horizontal variation that the continuous drift animation reads as movement.
   * Palindrome (pale-peach at 0% and 100%) → seamless loop, no jump.
   */
  background: linear-gradient(170deg,
    #EDD5BC              0%,   /* washed-out warm — top of viewport */
    #EDD5BC              15%,
    var(--color-sunset-orange) 32%,  /* ramp into vivid */
    var(--color-golden-yellow) 50%,  /* hotspot — centre of viewport */
    var(--color-lime-green)    68%,  /* ramp out of vivid */
    #C2DBA8              85%,  /* washed-out cool — bottom of viewport */
    #C2DBA8              100%
  );
  background-size: 300% 100vh;
  background-attachment: fixed;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: h2Drift 14s linear infinite;
  margin: var(--space-10) 0 var(--space-4);
}

/* One direction only — coral ends at 100% position, coral starts at 0% → no visible seam */
@keyframes heroFlow {
  from { background-position: 0% 50%; }
  to   { background-position: 100% 50%; }
}

@keyframes h2Drift {
  from { background-position: 0% 50%; }
  to   { background-position: 100% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .event-hero   { animation: none; }
  .event-writeup h2 {
    background: var(--gradient-warm);
    background-attachment: scroll;
    background-size: auto;
    -webkit-background-clip: text;
    background-clip: text;
    animation: none;
  }
}

.event-writeup h2:first-of-type {
  margin-top: 0;
}

.event-writeup p {
  font-size: var(--text-lg);
  color: var(--color-gray);
  line-height: 1.85;
  margin-bottom: var(--space-6);
}

/* Speaker card */
.event-speaker-card {
  margin-top: var(--space-12);
  padding: var(--space-6) var(--space-8);
  background: var(--color-off-white);
  border-radius: var(--radius-xl);
  border-left: 4px solid transparent;
  border-image: var(--gradient-warm) 1;
}

.event-speaker-name-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-1);
}

.event-speaker-linkedin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #0A66C2;
  border-radius: var(--radius-md);
  color: white;
  flex-shrink: 0;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.event-speaker-linkedin:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.event-speaker-linkedin svg {
  width: 14px;
  height: 14px;
}

.event-speaker-card h3 {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-gray);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-2);
}

.event-speaker-name {
  font-size: var(--text-xl) !important;
  font-weight: var(--font-weight-bold) !important;
  color: var(--color-charcoal) !important;
  margin-bottom: var(--space-1) !important;
}

.event-speaker-title {
  font-size: var(--text-base) !important;
  color: var(--color-gray) !important;
  margin-bottom: 0 !important;
}

/* Sidebar */
.event-sidebar {
  position: sticky;
  top: calc(72px + var(--space-8));
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.event-sidebar-card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
}

.event-sidebar-card h3 {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-gray);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-4);
}

.event-details-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.event-details-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-charcoal);
  line-height: 1.5;
}

.event-details-list svg {
  width: 16px;
  height: 16px;
  color: var(--color-sunset-orange);
  flex-shrink: 0;
  margin-top: 2px;
}

.event-sidebar-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-3) var(--space-6);
  background: var(--gradient-warm);
  color: var(--color-white);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--radius-lg);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.event-sidebar-cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.event-sidebar-cta svg {
  width: 14px;
  height: 14px;
}

.event-hosts-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.event-hosts-list li {
  font-size: var(--text-sm);
  color: var(--color-charcoal);
  font-weight: var(--font-weight-medium);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-gray-light);
}

.event-hosts-list li:last-child {
  border-bottom: none;
}

/* More Events nav */
.event-nav-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.event-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  font-size: var(--text-sm);
  color: var(--color-charcoal);
  font-weight: var(--font-weight-medium);
  border-bottom: 1px solid var(--color-gray-light);
  transition: color var(--transition-fast);
}

.event-nav-link:last-child {
  border-bottom: none;
}

.event-nav-link:hover {
  color: var(--color-sunset-orange);
}

.event-nav-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.4;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.event-nav-link:hover svg {
  opacity: 1;
  transform: translateX(3px);
}

/* Responsive */
@media (max-width: 1024px) {
  .event-article-container {
    grid-template-columns: 1fr;
  }

  .event-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .event-nav-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .event-hero {
    padding-top: calc(var(--space-16) + 72px);
    padding-bottom: var(--space-12);
  }

  .event-hero-title {
    font-size: clamp(var(--text-3xl), 10vw, var(--text-5xl));
  }

  .event-hero-stats {
    gap: var(--space-8);
  }

  .event-sidebar {
    grid-template-columns: 1fr;
  }

  .event-nav-card {
    grid-column: auto;
  }

  .event-lead {
    font-size: var(--text-lg);
  }

  .event-writeup p {
    font-size: var(--text-base);
  }
}

@media (max-width: 480px) {
  .event-hero-stats {
    gap: var(--space-6);
  }

  .event-stat-value {
    font-size: var(--text-2xl);
  }
}
