/**
 * Program - two-day schedule for the Conferință page.
 *
 * Split out of conferinta.css: the host rejects FTP uploads over ~15 KB and
 * silently truncates them to zero bytes, so each stylesheet is kept well
 * under that ceiling. Enqueued alongside conferinta.css by
 * guru_conferinta_styles() in functions.php.
 *
 * Day switching is CSS only: hidden radio inputs plus :checked ~ selectors,
 * so nothing depends on JavaScript surviving an Elementor re-render, and it
 * stays keyboard operable. Below 767px the tabs are dropped and both days
 * render stacked - but the timeline rail is kept, with the time moved above
 * the session rather than beside it.
 *
 * The rail is drawn per row rather than as one absolute line, and the markup
 * flags the first/last row of each session group so the rail clips there.
 * That avoids masking the gap with an opaque colour, so the block does not
 * care what the section background is.
 *
 * GuruMedia - https://gurumedia.ro
 */

.gm-program input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* --- day tabs --- */
.gmp-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 34px;
}

.gmp-tabs label {
  font-family: Inter, sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #223A7B;
  background: #fff;
  border: 1px solid rgba(34, 58, 123, 0.18);
  border-radius: 15px;
  padding: 12px 28px;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.gmp-tabs label:hover {
  background: rgba(34, 58, 123, 0.06);
  border-color: rgba(34, 58, 123, 0.38);
  transform: translateY(-1px);
}

.gmp-r1:checked ~ .gmp-tabs label[for="gmp-d1"],
.gmp-r2:checked ~ .gmp-tabs label[for="gmp-d2"] {
  background: #223A7B;
  border-color: #223A7B;
  color: #fff;
}

.gmp-r1:focus-visible ~ .gmp-tabs label[for="gmp-d1"],
.gmp-r2:focus-visible ~ .gmp-tabs label[for="gmp-d2"] {
  outline: 2px solid #62A545;
  outline-offset: 2px;
}

.gm-program .gmp-day { display: none; }
.gmp-r1:checked ~ .gmp-day1,
.gmp-r2:checked ~ .gmp-day2 { display: block; }
.gmp-dayhead { display: none; }

/* --- rows --- */
.gmp-row {
  display: grid;
  grid-template-columns: 112px 26px 1fr;
  column-gap: 16px;
  align-items: start;
  padding: 13px 14px;
  margin: 0 -14px;
  border-radius: 6px;
  transition: background-color .18s ease;
}

.gmp-row:hover { background: rgba(34, 58, 123, 0.045); }

.gmp-time {
  font-size: 15px;
  font-weight: 600;
  color: #223A7B;
  text-align: right;
  font-variant-numeric: tabular-nums;
  padding-top: 3px;
}

/* --- the rail and its nodes --- */
.gmp-stem {
  position: relative;
  justify-self: center;
  width: 100%;
  align-self: stretch;
}

.gmp-stem::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -13px;
  bottom: -13px;
  width: 1px;
  background: rgba(34, 58, 123, 0.16);
  transform: translateX(-.5px);
}

.gmp-first .gmp-stem::before { top: 9px; }
.gmp-last  .gmp-stem::before { bottom: 0; }

.gmp-stem::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 9px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #62A545;
  transform: translateX(-50%);
  transition: background-color .18s ease, transform .18s ease;
}

.gmp-row:hover .gmp-stem::after {
  background: #62A545;
  transform: translateX(-50%) scale(1.22);
}

.gmp-row.is-break .gmp-stem::after { border-color: #223A7B; }
.gmp-row.is-break:hover .gmp-stem::after { background: #223A7B; }

/* --- row content --- */
.gmp-who {
  font-family: Merriweather, serif;
  font-size: 18px;
  color: #223A7B;
  line-height: 1.45;
  transition: color .18s ease;
}

.gmp-row:hover .gmp-who { color: #1a2d61; }

.gmp-what {
  font-size: 17px;
  color: #2D2A26;
  line-height: 1.65;
  margin-top: 3px;
}

.gmp-row.is-break .gmp-what {
  color: #666666;
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 0;
}

.gmp-i {
  width: 17px;
  height: 17px;
  flex: none;
  vertical-align: -3px;
}

/* --- session headings --- */
.gmp-group {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 30px 0 8px;
}

.gmp-group span {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: #223A7B;
  line-height: 1.6;
}

.gmp-group i {
  flex: 1;
  min-width: 24px;
  height: 1px;
  background: #E4E1E1;
}

/*
 * Mobile: tabs go, both days stack - but the rail stays. The row becomes two
 * columns, the stem spanning both grid rows on the left, with the time sitting
 * above the session instead of beside it.
 */
@media (max-width: 767px) {
  .gmp-tabs { display: none; }
  .gm-program .gmp-day { display: block !important; }
  .gm-program .gmp-day + .gmp-day { margin-top: 46px; }

  /* Day label above the date, rather than one run-on line. */
  .gmp-dayhead {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    text-align: left;
    margin: 0 0 24px;
  }

  .gmp-daynum {
    font-family: Inter, sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #223A7B;
    line-height: 1.4;
  }

  .gmp-daydate {
    font-family: Merriweather, serif;
    font-size: 21px;
    font-weight: 700;
    color: #223A7B;
    line-height: 1.35;
  }

  .gmp-row {
    grid-template-columns: 22px 1fr;
    grid-template-areas: "stem time" "stem body";
    column-gap: 14px;
    row-gap: 2px;
    padding: 12px 10px;
    margin: 0 -10px;
  }

  .gmp-stem { grid-area: stem; }
  .gmp-time { grid-area: time; text-align: left; padding-top: 0; font-size: 14px; }
  .gmp-body { grid-area: body; }

  .gmp-stem::before { top: -12px; bottom: -12px; }
  .gmp-first .gmp-stem::before { top: 7px; }
  .gmp-stem::after { top: 7px; }

  .gmp-group { margin: 26px 0 8px; }
  .gmp-group span { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .gmp-tabs label,
  .gmp-row,
  .gmp-stem::after,
  .gmp-who { transition: none; }
  .gmp-tabs label:hover { transform: none; }
  .gmp-row:hover .gmp-stem::after { transform: translateX(-50%); }
}
