/* Home page "Conference Timeline": compact past-edition cards (added 02-12-2026).
   Used by views/frontend/home-past-compact.php. On desktop the cards fill the height
   of the Event Gallery photo grid beside them. */

.pec-list {
  --pec-c1: #e23c65;
  --pec-c2: #80618f;
  --pec-ink: #1e293b;
  --pec-muted: #475569;
  --pec-line: #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pec-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.375rem 1.5rem 1.5rem 1.75rem;
  background: #fff;
  border: 1px solid var(--pec-line);
  border-radius: 16px;
  box-shadow: 0 4px 14px -6px rgba(15, 23, 42, .12);
  overflow: hidden;
  transition: box-shadow .3s ease, border-color .3s ease;
}
.pec-card > * {
  flex-shrink: 0;
}
.pec-card::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--pec-c1), var(--pec-c2));
}
.pec-card:hover {
  border-color: #f3b4c4;
  box-shadow: 0 14px 30px -14px rgba(15, 23, 42, .28);
}

/* Year tile, place and dates */
.pec-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: .875rem;
}
.pec-year {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--pec-c1), var(--pec-c2));
  box-shadow: 0 8px 18px -8px rgba(226, 60, 101, .7);
  color: #fff;
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -.01em;
}
.pec-head-text {
  min-width: 0;
}
.pec-place {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0;
  color: var(--pec-ink);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  transition: color .3s ease;
}
.pec-card:hover .pec-place {
  color: var(--pec-c1);
}
.pec-place svg {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  color: var(--pec-c1);
}
.pec-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem .75rem;
  margin: .375rem 0 0;
  color: var(--pec-muted);
  font-size: .875rem;
  font-weight: 500;
}
.pec-meta span {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
}
.pec-meta svg {
  width: 15px;
  height: 15px;
  color: var(--pec-c2);
}
.pec-name {
  padding: .125rem .5rem;
  border-radius: 6px;
  background: #f5f0f8;
  color: var(--pec-c2);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .02em;
}

/* Short description, 3 lines (the full report is one click away) */
.pec-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  margin: 0 0 1rem;
  color: var(--pec-muted);
  font-size: .875rem;
  line-height: 1.6;
}

/* Stats strip */
.pec-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  border-radius: 12px;
  background: #fdf2f5;
}
.pec-stats li {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: .625rem .5rem;
  text-align: center;
}
.pec-stats li + li {
  border-left: 1px solid #f6d3dd;
}
.pec-stats strong {
  color: var(--pec-c1);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.2;
}
.pec-stats span {
  color: var(--pec-muted);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* Speakers / Committee / Posters toggles */
.pec-people {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
}
.pec-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: 42px;
  padding: .5rem .625rem;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: .8125rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background .25s ease, color .25s ease, box-shadow .25s ease;
}
.pec-pill svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
}
.pec-pill .pec-chevron {
  width: 14px;
  height: 14px;
  transition: transform .25s ease;
}
.pec-pill[aria-expanded="true"] .pec-chevron {
  transform: rotate(180deg);
}
.pec-count {
  min-width: 1.5rem;
  padding: .0625rem .375rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .75);
  font-size: .75rem;
  text-align: center;
}
.pec-pill-dark  { background: #f1f5f9; border-color: #e2e8f0; color: #334155; }
.pec-pill-rose  { background: #fff1f3; border-color: #fecdd6; color: #e11d48; }
.pec-pill-teal  { background: #f0fdfa; border-color: #c4f1e8; color: #0f766e; }
.pec-pill-dark:hover,
.pec-pill-dark[aria-expanded="true"] { background: linear-gradient(135deg, #475569, #334155); border-color: transparent; color: #fff; }
.pec-pill-rose:hover,
.pec-pill-rose[aria-expanded="true"] { background: linear-gradient(135deg, #fb7185, #f43f5e); border-color: transparent; color: #fff; }
.pec-pill-teal:hover,
.pec-pill-teal[aria-expanded="true"] { background: linear-gradient(135deg, #2dd4bf, #14b8a6); border-color: transparent; color: #fff; }
.pec-pill:hover .pec-count,
.pec-pill[aria-expanded="true"] .pec-count {
  background: rgba(255, 255, 255, .25);
}
.pec-pill:focus-visible,
.pec-report:focus-visible {
  outline: 3px solid rgba(226, 60, 101, .45);
  outline-offset: 2px;
}

/* Open list */
.pec-panel {
  padding: .625rem;
  border: 1px solid var(--pec-line);
  border-radius: 12px;
  background: #f8fafc;
}
.pec-panel[hidden] {
  display: none !important;
}
.pec-panel-title {
  margin: 0 0 .5rem .25rem;
  color: var(--pec-ink);
  font-size: .8125rem;
  font-weight: 700;
}
.pec-panel-list {
  max-height: 15rem;
  overflow-y: auto;
  padding-right: .25rem;
}
.pec-panel-list .participant-item:last-child {
  margin-bottom: 0;
}
.pec-panel-empty {
  margin: 0;
  padding: .5rem .25rem;
  color: #64748b;
  font-size: .875rem;
}

/* Spacing below the toggles and the open list; the report button sits at the bottom */
.pec-card > .pec-people {
  margin-bottom: 1.125rem;
}
.pec-card > .pec-panel {
  margin-top: -.5rem;
  margin-bottom: 1.125rem;
}
.pec-card > .pec-report {
  align-self: flex-start;
  margin-top: auto;
}

/* Desktop: the two columns end level, so the cards fill the photo grid's height */
@media (min-width: 1024px) {
  .content-grid.pec-grid {
    align-items: stretch;
  }
  .pec-grid > .timeline-column {
    display: flex;
    flex-direction: column;
  }
  .pec-grid > .gallery-section {
    align-self: start; /* keeps the gallery sticky when a long list is open */
  }
  .pec-grid .pec-list {
    flex: 1 1 auto;
    margin-bottom: 2.5rem;
  }
  .pec-grid .pec-card {
    flex: 1 0 auto; /* share the spare height; grow when a list is opened */
  }
}

/* Phones */
@media (max-width: 575px) {
  .pec-card {
    padding: 1.125rem 1rem 1.25rem 1.25rem;
  }
  .pec-year {
    width: 54px;
    height: 54px;
    font-size: 1rem;
  }
  .pec-place {
    font-size: 1.25rem;
  }
  .pec-pill {
    flex-direction: column;
    gap: .25rem;
    padding: .5rem .25rem;
    font-size: .75rem;
  }
  .pec-pill svg {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pec-card,
  .pec-place,
  .pec-pill,
  .pec-pill .pec-chevron {
    transition: none;
  }
}
