/* =============================================
   PONENTES — Layout, Sidebar & Cards
   ============================================= */

/* Two-column layout: program left, speakers right.
   gap: 0 so the sidebar's ::before bar acts as the divider. */
.xornadas-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 0;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  align-items: start;
}

/* Let the timeline section control its own horizontal padding.
   Reduce padding-top to bring the program up. */
.xornadas-layout .timeline-section {
  max-width: none;
  margin: 0;
  padding-top: 3rem;
  padding-right: 3rem;
}

/* ── "22 ABRIL" badge: left-aligned at the time column + connecting line ── */
.xornadas-layout .section-date {
  left: 0;
  transform: none;
  margin-bottom: 3rem;
}

/* Horizontal line that runs from the badge to the sidebar separator bar */
.xornadas-layout .section-date::after {
  content: '';
  position: absolute;
  left: calc(100% + 1.25rem);
  top: 50%;
  transform: translateY(-50%);
  /* Extend far right — body clips at viewport edge */
  width: calc(100vw + 200px); /* Extend far right — clipped by body/wrapper */
  height: 1px;
  background: linear-gradient(
    to right,
    rgba(59, 130, 246, 0.35) 0%,
    rgba(255, 255, 255, 0.10) 25%,
    rgba(255, 255, 255, 0.06) 55%,
    transparent 85%
  );
}

/* =============================================
   PONENTES SIDEBAR
   — No sticky, no scroll. Flows naturally.
   — Left bar mirrors the timeline vertical line.
   ============================================= */
.ponentes-sidebar {
  position: relative;
  /* Match the reduced timeline-section padding-top */
  padding-top: 3rem;
  padding-left: 2.5rem;
  padding-bottom: 6rem;
}

/* Vertical separator bar — same visual language as the timeline line */
.ponentes-sidebar::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 8%,
    rgba(255, 255, 255, 0.08) 92%,
    transparent 100%
  );
}

/* =============================================
   SECTION HEADER -> MOVED TO SHARED.CSS
   ============================================= */

/* =============================================
   PONENTE ITEM — List style, no heavy card box
   ============================================= */
.ponente-card {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.2s ease;
  border-radius: 12px;
  content-visibility: auto;
  contain-intrinsic-size: 0 70px;
}

.ponente-card:last-child {
  border-bottom: none;
}

.ponente-card:hover {
  background: rgba(255, 255, 255, 0.025);
}

/* Header row — the click trigger */
.ponente-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1rem 0.75rem 1rem 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  color: inherit;
  transition: padding-left 0.2s ease;
}

.ponente-card:hover .ponente-header {
  padding-left: 0.5rem;
}

/* =============================================
   AVATAR CIRCLE — Placeholder-ready
   ============================================= */
.ponente-avatar {
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--cat-color-bg, rgba(59, 130, 246, 0.08));
  border: 2px solid var(--cat-color, #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 4px rgba(6, 18, 44, 1),            /* dark gap ring */
    0 0 16px color-mix(in srgb, var(--cat-color, #3b82f6) 20%, transparent);
  overflow: hidden;
  position: relative;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Subtle inner vignette to make it look like a photo placeholder */
.ponente-avatar::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.ponente-card:hover .ponente-avatar {
  box-shadow:
    0 0 0 4px rgba(6, 18, 44, 1),
    0 0 24px color-mix(in srgb, var(--cat-color, #3b82f6) 40%, transparent);
  border-color: var(--cat-color, #3b82f6);
}

.ponente-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  position: relative;
  z-index: 1;
}

.ponente-avatar-initials {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--cat-color, #3b82f6);
  letter-spacing: 0.04em;
  user-select: none;
  position: relative;
  z-index: 1;
}

/* =============================================
   NAME & ROLE
   ============================================= */
.ponente-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.ponente-name {
  font-size: 0.83rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
}

.ponente-role {
  font-size: 0.69rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Expand chevron */
.ponente-chevron {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  color: rgba(255, 255, 255, 0.25);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
}

.ponente-header[aria-expanded="true"] .ponente-chevron {
  transform: rotate(180deg);
  color: rgba(255, 255, 255, 0.6);
}

/* =============================================
   BIO (expandable)
   ============================================= */
.ponente-bio {
  padding: 0 0.75rem 1.25rem 0;
  margin-left: calc(54px + 1rem);   /* align with name column */
}

.ponente-bio-text {
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 1rem;
}

/* "Ver na programación" CTA */
.ponente-go-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.95rem;
  background: rgba(59, 130, 246, 0.07);
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 100px;
  color: var(--accent-blue);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.22s ease;
}

.ponente-go-btn:hover {
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(59, 130, 246, 0.38);
  transform: translateX(3px);
}

.ponente-go-btn i {
  width: 12px;
  height: 12px;
}

/* =============================================
   TIMELINE HIGHLIGHT ANIMATION
   ============================================= */
@keyframes timelineHighlight {
  0%   { box-shadow: 0 0 0  0px rgba(255, 255, 255, 0.00); }
  20%  { box-shadow: 0 0 0  5px rgba(255, 255, 255, 0.18); border-color: rgba(255,255,255,0.35); }
  65%  { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0.04); }
  100% { box-shadow: 0 0 0  0px rgba(255, 255, 255, 0.00); }
}

.timeline-item--highlight .timeline-content--talk,
.timeline-item--highlight .timeline-content--ceremony {
  animation: timelineHighlight 1.8s cubic-bezier(0.4, 0, 0.2, 1);
  border-color: rgba(255, 255, 255, 0.28) !important;
}

/* =============================================
   RESPONSIVE — ≤1200px: narrower sidebar
   ============================================= */
@media (max-width: 1200px) {
  .xornadas-layout {
    grid-template-columns: 1fr 290px;
  }
}

/* =============================================
   RESPONSIVE — ≤1024px: stacked (mobile)
   Sidebar appears below the timeline, no bar.
   ============================================= */
@media (max-width: 992px) {
  .xornadas-layout {
    grid-template-columns: 1fr;
    padding: 0 1rem;
  }

  .xornadas-layout .timeline-section {
    padding-right: 0;
  }

  .ponentes-sidebar {
    padding-left: 0;
    padding-top: 4rem;
  }

  .ponentes-sidebar::before {
    display: none;
  }

  /* Ensure horizontal lines don't wrap and cause horizontal scroll */
  .xornadas-layout .section-date::after {
    width: 200vw;
  }
}

@media (max-width: 1024px) {
  .xornadas-layout {
    grid-template-columns: 1fr;
    padding: 0 1.5rem;
  }

  .xornadas-layout .timeline-section {
    padding-right: 0;
  }

  /* Restore centered badge and hide connecting line on mobile */
  .xornadas-layout .section-date {
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 3rem;
  }

  .xornadas-layout .section-date::after {
    display: none;
  }

  /* Restore default top padding on mobile */
  .xornadas-layout .timeline-section {
    padding-top: 4rem;
  }

  .ponentes-sidebar {
    padding-top: 1rem;
    padding-left: 0;
    padding-bottom: 5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 1rem;
  }

  /* Hide the vertical bar on mobile */
  .ponentes-sidebar::before {
    display: none;
  }

  .ponentes-header {
    margin-top: 3rem;
  }

  .ponente-bio {
    margin-left: calc(54px + 1rem);
  }
}

@media (max-width: 768px) {
  .xornadas-layout {
    padding: 0 1rem;
  }

  .ponente-header {
    padding: 0.9rem 0.5rem 0.9rem 0;
  }

  .ponente-avatar {
    width: 48px;
    height: 48px;
  }

  .ponente-bio {
    margin-left: calc(48px + 1rem);
  }
}

/* =============================================
   SIDEBAR LOCALIZACIÓN
   ============================================= */
/* Localización goes first — no top separator needed */
.sidebar-localizacion {
  margin-bottom: 0;
}

/* Ponentes section follows — gets the separator */
.sidebar-localizacion + .ponentes-header {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.sidebar-localizacion-header {
  margin-bottom: 1.25rem;
}

/* Venue info chips */
.venue-chips {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.venue-chip {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.65rem 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}

.venue-chip-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-blue);
  margin-top: 1px;
}

.venue-chip-icon i {
  width: 13px;
  height: 13px;
}

.venue-chip-body {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.venue-chip-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-blue);
  opacity: 0.7;
}

.venue-chip-value {
  font-size: 0.78rem;
  font-weight: 500;
  color: #fff;
  line-height: 1.35;
}

/* ── Futuristic map placeholder ── */
.sidebar-map-placeholder {
  position: relative;
  height: 190px;
  border-radius: 14px;
  overflow: hidden;
  background: #020b1a;
  border: 1px solid rgba(59, 130, 246, 0.18);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 0 60px rgba(6, 18, 44, 0.8);
  margin-bottom: 1.25rem;
}

/* Grid lines */
.map-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* Diagonal accent lines */
.map-grid::before,
.map-grid::after {
  content: '';
  position: absolute;
  inset: 0;
}
.map-grid::before {
  background-image: linear-gradient(135deg,
    transparent 40%, rgba(6, 182, 212, 0.04) 40%,
    rgba(6, 182, 212, 0.04) 41%, transparent 41%,
    transparent 60%, rgba(6, 182, 212, 0.04) 60%,
    rgba(6, 182, 212, 0.04) 61%, transparent 61%
  );
  background-size: 80px 80px;
}
.map-grid::after {
  background: radial-gradient(ellipse at 55% 55%, rgba(59, 130, 246, 0.12) 0%, transparent 65%);
}

/* Concentric rings around the pin */
.map-rings {
  position: absolute;
  top: 50%;
  left: 55%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
}
.map-rings::before,
.map-rings::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(59, 130, 246, 0.15);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.map-rings::before { width: 80px;  height: 80px; }
.map-rings::after  { width: 120px; height: 120px; border-color: rgba(59, 130, 246, 0.08); }

/* Location pin */
.map-pin {
  position: absolute;
  top: 50%;
  left: 55%;
  transform: translate(-50%, -50%);
}

.map-pin-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.8), 0 0 20px rgba(59, 130, 246, 0.4);
  position: relative;
  z-index: 2;
}

@keyframes mapPulse {
  0%   { transform: translate(-50%, -50%) scale(1);   opacity: 0.5; }
  100% { transform: translate(-50%, -50%) scale(3.5); opacity: 0; }
}

.map-pin-pulse,
.map-pin-pulse--2 {
  position: absolute;
  top: 50%; left: 50%;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.4);
  animation: mapPulse 2.4s ease-out infinite;
  z-index: 1;
}
.map-pin-pulse--2 {
  animation-delay: 1.2s;
}

/* Horizontal scan line */
@keyframes mapScan {
  0%   { top: 0%;   opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.map-scan-line {
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(6, 182, 212, 0.15) 20%,
    rgba(6, 182, 212, 0.5) 50%,
    rgba(6, 182, 212, 0.15) 80%,
    transparent 100%
  );
  animation: mapScan 4s linear infinite;
  pointer-events: none;
}

/* Coordinates label */
.map-label {
  position: absolute;
  bottom: 10px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.map-label span {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(6, 182, 212, 0.7);
  font-family: 'Courier New', monospace;
  text-transform: uppercase;
}
