/* ============================================
   PROGRAM DAYS ("Программа AI & Digital Bridge 2026")
   Figma: node 49:8266 — four stacked pieces:
     1. .pdays__title      — section heading
     2. .pdays__row        — two day cards (01.10 / 02–03.10)
     3. .hackbanner        — hackalem.ai promo banner
     4. .schedule          — day/hall picker + session cards

   Figma canvas is 1920px wide; 1rem = 10px at that
   width (see base.css), so every Figma px / 10 → rem.
   ============================================ */

.pdays {
  padding: 10rem 10rem;
}

.pdays__inner {
  width: 100%;
  max-width: 148rem;
  margin: 0 auto;
}

/* ============================================
   TITLE
   ============================================ */

.pdays__title {
  font-size: 6rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1.05;
  color: var(--color-white);
  margin-bottom: 4.8rem;
  overflow-wrap: break-word;
}

.pdays__title-gradient {
  background: linear-gradient(90deg, #FF6B2D 0%, #FF2D78 55%, #8B5CF6 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

/* ============================================
   DAY CARDS — 901 / 533 split from Figma
   ============================================ */

.pdays__row {
  display: grid;
  grid-template-columns: 901fr 533fr;
  gap: 2rem;
  margin-bottom: 4.8rem;
}

.pday {
  display: flex;
  gap: 3rem;
  padding: 4rem 3.2rem;
  border: 0.3rem solid rgba(255, 255, 255, 0.1);
  border-radius: 2.3rem;
  background: rgba(17, 16, 38, 0.7);
}

/* Highlighted (invite-only) day */
.pday--accent {
  border-color: var(--color-neon-blue);
}

.pday__icon {
  flex: 0 0 4rem;
  width: 4rem;
  height: 4rem;
  display: block;
}

.pday__content {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  flex-direction: column;
  gap: 2.4rem;
}

.pday__text {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.pday__date {
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--color-white);
}

.pday__desc {
  font-size: 2.4rem;
  font-weight: 400;
  line-height: 1.34;
  color: rgba(255, 255, 255, 0.7);
}

/* Gradient-text pill at the bottom of each card */
.pday__pill {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 4rem;
  padding: 0.8rem 2.9rem;
  border: 0.1rem solid rgba(255, 255, 255, 0.1);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0.1rem 0.2rem rgba(16, 24, 40, 0.05);

  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  text-align: center;

  background-image: none;
}

.pday__pill span {
  background: linear-gradient(90deg, #FF6B2D 26%, #8B5CF6 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

/* ============================================
   HACKATHON BANNER
   ============================================ */

.hackbanner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 0.6rem solid rgba(255, 255, 255, 0.1);
  border-radius: 3.6rem;
  aspect-ratio: 1456 / 543;
  box-shadow: 0 0 6rem rgba(139, 92, 246, 0.1);
  background: var(--color-deep-space);
}

.hackbanner__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Blurred venue photo, mirrored as in the design */
.hackbanner__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  filter: blur(1.5rem);
}

/* Scrim darkens the right half so the copy stays readable */
.hackbanner__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(10, 14, 26, 0) 20%,
    rgba(10, 14, 26, 0.69) 55%,
    rgba(10, 14, 26, 0.82) 100%
  );
}

.hackbanner__glow {
  position: absolute;
  opacity: 0.9;
}

.hackbanner__glow--1 {
  left: -7.2%;
  top: 45%;
  width: 34%;
}

.hackbanner__glow--2 {
  left: 26.5%;
  top: -27%;
  width: 29%;
}

/* Left-hand key visual */
.hackbanner__person {
  position: absolute;
  left: -0.4%;
  top: 56.5%;
  width: 48.4%;
  transform: translateY(-50%);
  object-fit: contain;
}

.hackbanner__content {
  position: absolute;
  left: 52%;
  top: 50%;
  transform: translateY(-50%);
  width: 43%;
  z-index: 1;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2rem;
}

.hackbanner__chips {
  display: flex;
  gap: 0.8rem;
}

.hackbanner__chip {
  padding: 1rem 1.6rem;
  border: 0.06rem solid rgba(255, 255, 255, 0.1);
  border-radius: 99rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(0.76rem);

  font-size: 2rem;
  line-height: 1.4;
  color: var(--color-white);
  white-space: nowrap;
}

.hackbanner__brand {
  display: flex;
  align-items: center;
  gap: 2rem;
  align-self: stretch;
}

.hackbanner__logo {
  width: 36.44rem;
  height: 5.5rem;
  flex: 0 0 auto;
}

.hackbanner__brand-sep {
  width: 0.1rem;
  align-self: stretch;
  background: rgba(255, 255, 255, 0.5);
}

.hackbanner__powered {
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--color-white);
  white-space: nowrap;
}

.hackbanner__openai {
  width: 12.7rem;
  height: 3.5rem;
  flex: 0 0 auto;
}

/* Guinness record strip */
.hackbanner__record {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  align-self: stretch;
  padding: 0.8rem;
  border: 0.06rem solid rgba(255, 255, 255, 0.1);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.03);
}

.hackbanner__record-badge {
  flex: 0 0 6rem;
  width: 6rem;
  height: 6rem;
}

.hackbanner__record-text {
  flex: 1 1 0;
  min-width: 0;
  font-size: 1.6rem;
  line-height: 1.5;
  color: var(--color-white);
}

.hackbanner__record-text em {
  font-weight: 700;
  font-style: italic;
}

.hackbanner__text {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-self: stretch;
  color: rgba(255, 255, 255, 0.9);
}

.hackbanner__title {
  font-size: 2.4rem;
  font-weight: 600;
  line-height: 1.34;
}

.hackbanner__subtitle {
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.05em;
}

.hackbanner__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  padding: 2rem 4rem;
  border-radius: 11.6rem;
  background: linear-gradient(90deg, #8B5CF6 0%, #FF6B2D 100%);
  box-shadow: 0 0.3rem 0.3rem rgba(0, 0, 0, 0.09), 0 0.1rem 0.2rem rgba(0, 0, 0, 0.1);

  font-size: 2.8rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.05em;
  color: var(--color-white);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hackbanner__btn:hover {
  transform: translateY(-0.2rem);
  box-shadow: 0 0.8rem 2.4rem rgba(139, 92, 246, 0.45);
}

/* ============================================
   SCHEDULE — menu (left) + session cards (right)
   ============================================ */

.schedule {
  display: flex;
  align-items: flex-start;
  gap: 2.4rem;
  margin-top: 4.8rem;
}

/* Hidden until the API confirms there are programs — beats display:flex */
.schedule[hidden] {
  display: none;
}

.schedule__menu {
  flex: 0 0 42rem;
  width: 42rem;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.schedule__title {
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.05em;
  color: var(--color-white);
  margin-bottom: 0.8rem;
}

.schedule__subtitle {
  font-size: 1.8rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.03em;
  color: rgba(255, 255, 255, 0.7);
}

/* --- Day switch --- */

.schedule__days {
  display: flex;
  gap: 0.4rem;
  padding: 0.4rem;
  border: 0.1rem solid rgba(255, 255, 255, 0.15);
  border-radius: 9.9rem;
  background: rgba(255, 255, 255, 0.05);
}

.schedule__day {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0.8rem;
  border: 0;
  border-radius: 99.9rem;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.schedule__day-date {
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 2rem;
  color: #CDCDCD;
}

.schedule__day-name {
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.6rem;
  color: rgba(255, 255, 255, 0.7);
}

.schedule__day.is-active {
  background: linear-gradient(138deg, #4635C4 0%, #7B61FF 100%);
  box-shadow: 0 0.6rem 2.2rem rgba(123, 97, 255, 0.45);
}

.schedule__day.is-active .schedule__day-date {
  color: var(--color-white);
}

/* --- Hall picker --- */

.schedule__hall {
  position: relative;
}

.schedule__hall-btn {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  width: 100%;
  padding: 1.6rem 2.4rem 1.6rem 1.6rem;
  border: 0.1rem solid #2C3246;
  border-radius: 2.4rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

.schedule__hall-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0.8rem;
  border: 0.1rem solid rgba(255, 255, 255, 0.15);
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.05);
}

.schedule__hall-icon img {
  width: 2.4rem;
  height: 2.4rem;
  display: block;
}

.schedule__hall-text {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  line-height: 1.3;
}

.schedule__hall-label {
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  color: rgba(255, 255, 255, 0.7);
}

.schedule__hall-value {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--color-white);
}

.schedule__hall-chevron {
  width: 1.1rem;
  flex: 0 0 auto;
  transition: transform 0.2s ease;
}

.schedule__hall.is-open .schedule__hall-chevron {
  transform: rotate(180deg);
}

.schedule__hall-list {
  display: none;
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  top: calc(100% + 0.8rem);
  padding: 0.8rem;
  margin: 0;
  list-style: none;
  border: 0.1rem solid #2C3246;
  border-radius: 1.6rem;
  background: #12162A;
  box-shadow: 0 1.2rem 3.2rem rgba(0, 0, 0, 0.45);
}

.schedule__hall.is-open .schedule__hall-list {
  display: block;
}

.schedule__hall-option {
  width: 100%;
  padding: 1.2rem 1.6rem;
  border: 0;
  border-radius: 1.2rem;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 1.8rem;
  color: rgba(255, 255, 255, 0.85);
  text-align: left;
}

.schedule__hall-option:hover,
.schedule__hall-option.is-active {
  background: rgba(255, 255, 255, 0.07);
  color: var(--color-white);
}

/* --- Working hours --- */

.schedule__time {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.8rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.03em;
  color: rgba(255, 255, 255, 0.7);
}

.schedule__time-dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
}

/* --- Session list --- */

.schedule__main {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

/* Day/hall filtering toggles [hidden]; flex containers need it forced */
.schedule [hidden] {
  display: none !important;
}

/* Speaker with no bio in the API — nothing to expand */
.person--no-bio .person__chevron {
  visibility: hidden;
}

.session {
  display: flex;
  align-items: stretch;
  border: 0.2rem solid rgba(255, 255, 255, 0.2);
  border-radius: 2rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.03) 100%);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.session.is-open {
  border-color: var(--color-neon-blue);
}

.session__time {
  flex: 0 0 13.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
  padding: 2.4rem;
  border-right: 0.1rem solid rgba(255, 255, 255, 0.2);
}

.session__range {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.session__start {
  font-size: 2.4rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.03em;
  color: var(--color-white);
}

.session__bar {
  width: 0.1rem;
  height: 2.6rem;
  background: linear-gradient(180deg, #7B5CFF 0%, rgba(255, 122, 69, 0.5) 100%);
}

.session__end {
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.03em;
  color: #9C9CBD;
}

.session__tz {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #9C9CBD;
}

.session__body {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.6rem;
  padding: 2.4rem;
}

.session__title {
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.03em;
  color: var(--color-white);
}

.session__divider {
  width: 100%;
  height: 0.1rem;
  border: 0;
  margin: 0;
  background: rgba(255, 255, 255, 0.12);
}

/* Compact moderator / speaker summary */
.session__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 3.2rem;
}

.session__meta-group {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.session__meta-label {
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.6rem;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  color: #9C9CBD;
  white-space: nowrap;
}

.avatar-group {
  display: flex;
  align-items: center;
  -webkit-mask-image: linear-gradient(90deg, #000 72%, transparent 100%);
          mask-image: linear-gradient(90deg, #000 72%, transparent 100%);
}

.avatar-group .avatar {
  margin-right: -1.07rem;
}

.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 3.2rem;
  height: 3.2rem;
  border: 0.07rem solid #2D2C43;
  border-radius: 50%;
  background: #2A2A43;
  overflow: hidden;
}

.avatar img {
  width: 50%;
  height: 50%;
  object-fit: contain;
}

.avatar--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Expandable details */
.session__details {
  display: none;
  width: 100%;
  flex-direction: column;
  gap: 1.6rem;
}

.session.is-open .session__details {
  display: flex;
}

.session__list {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  width: 100%;
}

.session__list-title {
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 2.4rem;
  letter-spacing: -0.03em;
  color: var(--color-white);
}

.session__people {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.person {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  width: 100%;
}

.person__head {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  width: 100%;
  padding: 0 0.8rem 0 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

.person__head[disabled] {
  cursor: default;
}

.person__user {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex: 1 1 0;
  min-width: 0;
}

.person .avatar {
  width: 4rem;
  height: 4rem;
  border-width: 0.1rem;
}

.person__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
}

.person__name {
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 2rem;
  color: var(--color-white);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person__role {
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 2rem;
  color: #9C9CBD;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person__chevron {
  width: 1.1rem;
  flex: 0 0 auto;
  transition: transform 0.2s ease;
}

.person.is-open .person__chevron {
  transform: rotate(180deg);
}

.person__bio {
  display: none;
  padding-left: 4.8rem;
  font-size: 1.4rem;
  line-height: 2rem;
  color: #9C9CBD;
}

.person.is-open .person__bio {
  display: block;
}

/* Показать / скрыть */
.session__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 0.7rem 1.4rem;
  border: 0;
  border-radius: 3.86rem;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  font-family: inherit;
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--color-white);
}

.session__toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.session__toggle-chevron {
  width: 1.1rem;
  transition: transform 0.2s ease;
}

.session.is-open .session__toggle-chevron {
  transform: rotate(180deg);
}

.session__toggle-more { display: inline; }
.session__toggle-less { display: none; }
.session.is-open .session__toggle-more { display: none; }
.session.is-open .session__toggle-less { display: inline; }

/* ============================================
   RESPONSIVE
   ============================================ */

/* LAPTOP ≤ 1280px — schedule menu above the cards */
@media (max-width: 1280px) {
  .schedule {
    flex-direction: column;
  }

  .schedule__menu {
    flex: 0 0 auto;
    width: 100%;
  }

  .schedule__main {
    width: 100%;
  }
}

/* TABLET ≤ 900px */
@media (max-width: 900px) {
  .pdays {
    padding: 8rem 4rem;
  }

  .pdays__title {
    font-size: 4.8rem;
    margin-bottom: 3.2rem;
  }

  .pdays__row {
    grid-template-columns: 1fr;
    gap: 1.6rem;
  }

  .pday {
    padding: 3.2rem 2.4rem;
    gap: 2rem;
  }

  .pday__date {
    font-size: 3.4rem;
  }

  .pday__desc,
  .schedule__subtitle,
  .schedule__time {
    font-size: 2rem;
  }

  .pday__pill {
    font-size: 2rem;
  }

  /* Banner switches to a stacked card — the key visual becomes a backdrop */
  .hackbanner {
    aspect-ratio: auto;
    border-width: 0.4rem;
    border-radius: 2.8rem;
  }

  .hackbanner__person,
  .hackbanner__glow {
    display: none;
  }

  .hackbanner__scrim {
    background: linear-gradient(180deg, rgba(10, 14, 26, 0.72) 0%, rgba(10, 14, 26, 0.88) 100%);
  }

  /* Stays positioned so it paints above the absolute .hackbanner__media */
  .hackbanner__content {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    width: 100%;
    padding: 3.2rem 2.4rem;
    gap: 2.4rem;
  }

  .hackbanner__chip {
    font-size: 1.9rem;
  }

  .hackbanner__brand {
    flex-wrap: wrap;
    gap: 1.6rem;
  }

  .hackbanner__logo {
    width: 30rem;
    height: auto;
  }

  .hackbanner__brand-sep {
    display: none;
  }

  .hackbanner__powered {
    font-size: 1.9rem;
  }

  .hackbanner__openai {
    width: 13rem;
    height: auto;
  }

  .hackbanner__record-text,
  .hackbanner__subtitle {
    font-size: 1.9rem;
  }

  .hackbanner__title {
    font-size: 2.8rem;
  }

  .hackbanner__btn {
    font-size: 2.6rem;
    padding: 1.8rem 3rem;
  }

  .session__title {
    font-size: 2.8rem;
  }

  .session__meta-label,
  .session__list-title,
  .person__name,
  .person__role,
  .person__bio,
  .session__toggle {
    font-size: 1.8rem;
  }

  .schedule__day-date {
    font-size: 1.9rem;
  }

  .schedule__day-name {
    font-size: 1.7rem;
  }

  .schedule__hall-label {
    font-size: 1.7rem;
  }

  .schedule__hall-value {
    font-size: 2.2rem;
  }
}

/* PHONE ≤ 560px — time rail moves above the session body */
@media (max-width: 560px) {
  .pdays {
    padding: 6rem 2.4rem;
  }

  .pdays__title {
    font-size: 4rem;
  }

  .session {
    flex-direction: column;
  }

  .session__time {
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 1.2rem;
    padding: 1.6rem 2rem;
    border-right: 0;
    border-bottom: 0.1rem solid rgba(255, 255, 255, 0.2);
  }

  .session__range {
    flex-direction: row;
    align-items: center;
  }

  .session__bar {
    width: 1.6rem;
    height: 0.1rem;
  }

  .session__body {
    padding: 2rem;
  }

  .session__meta {
    gap: 2rem;
  }

  .person__bio {
    padding-left: 0;
  }
}
