/* ======================================================================
   Hackathon details page (node--hackathon.html.twig) - "Event details"
   design: navy hero + countdown card, sticky section nav, main column +
   sticky side column, related events. Brand palette only.
   ====================================================================== */
.jada-ed {
  --ed-navy: var(--brand-navy);
  --ed-orange: var(--brand-orange);
  --ed-line: #e2e7ee;
  --ed-soft: #f3f5f8;
  --ed-muted: #4a5563;
  color: #172033;
}

/* ---------- Hero ---------- */
.jada-ed-hero {
  background: var(--ed-navy);
  color: #fff;
  overflow: hidden;
}

.jada-ed-hero__rings {
  position: absolute;
  left: -140px;
  top: -160px;
  opacity: .12;
  pointer-events: none;
}

.jada-ed-hero__inner {
  position: relative;
  padding-top: 40px;
  padding-bottom: 48px;
}

.jada-ed-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 40px;
  align-items: end;
}

.jada-ed-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.jada-ed-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .14);
  font-size: 13px;
  font-weight: 600;
}

.jada-ed-chip--status {
  background: #e3f6ee;
  color: #0a5c36;
}

.jada-ed-chip--status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-green);
}

.jada-ed-chip--soon { background: #fdeee8; color: #8e3a0d; }
.jada-ed-chip--soon i { background: var(--ed-orange); }
.jada-ed-chip--finished { background: #eceff1; color: #000; }
.jada-ed-chip--finished i { background: #000; }

.jada-ed-hero__title {
  margin: 0 0 14px;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
}

.jada-ed-hero__summary {
  max-width: 620px;
  margin: 0 0 28px;
  font-size: 1.1rem;
  line-height: 1.8;
  color: #dce4f0;
}

.jada-ed-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  font-size: .95rem;
}

.jada-ed-hero__meta span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.jada-ed-hero__meta svg {
  color: #f6a98f;
  flex: none;
}

/* Countdown card */
.jada-ed-cd-card {
  background: #fff;
  color: #172033;
  border-radius: 18px;
  padding: 22px;
}

.jada-ed-cd-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.jada-ed-cd-card__label {
  font-size: .95rem;
  font-weight: 600;
  color: var(--ed-navy);
}

.jada-ed-cd-card__day {
  font-size: .8rem;
  color: var(--ed-muted);
}

.jada-cd--card {
  display: block;
  color: var(--ed-navy);
}

.jada-cd--card .jada-cd__label {
  display: none;
}

.jada-cd--card .jada-cd__units {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.jada-cd--card .jada-cd__unit {
  background: var(--ed-soft);
  border-radius: 12px;
  padding: 10px 4px;
}

.jada-cd--card .jada-cd__unit b {
  font-size: 1.75rem;
  line-height: 1.1;
}

.jada-cd--card .jada-cd__unit i {
  font-size: .75rem;
  color: var(--ed-muted);
  margin-top: 2px;
}

.jada-ed-progress {
  height: 8px;
  margin-bottom: 18px;
  border-radius: 8px;
  background: #e6ebf2;
  overflow: hidden;
}

.jada-ed-progress > div {
  height: 100%;
  border-radius: 8px;
  background: var(--ed-orange);
}

/* Buttons */
.jada-ed-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}

.jada-ed-btn--orange { background: var(--ed-orange); color: #fff; }
.jada-ed-btn--orange:hover { background: #d85a30; color: #fff; }
.jada-ed-btn--navy { background: var(--ed-navy); color: #fff; }
.jada-ed-btn--navy:hover { background: var(--brand-navy-dark); color: #fff; }
.jada-ed-btn--outline { background: #fff; border-color: #cbd3de; color: var(--ed-navy); font-size: .95rem; }
.jada-ed-btn--outline:hover { border-color: var(--ed-navy); color: var(--ed-navy); }
.jada-ed-btn--disabled { background: #eceff1; color: #515a5f; cursor: default; }

/* ---------- Sticky section nav ---------- */
.jada-ed-secnav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 28px;
  overflow-x: auto;
  background: #fff;
  box-shadow: 0 0 0 100vmax #fff;
  clip-path: inset(0 -100vmax -1px 0);
  border-bottom: 1px solid var(--ed-line);
  font-weight: 500;
}

.jada-ed-secnav a {
  padding: 18px 0;
  border-bottom: 3px solid transparent;
  color: var(--ed-muted);
  white-space: nowrap;
}

.jada-ed-secnav a.is-active,
.jada-ed-secnav a:hover {
  border-bottom-color: var(--ed-navy);
  color: var(--ed-navy);
}

/* ---------- Layout ---------- */
.jada-ed-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  align-items: start;
  padding-top: 32px;
}

.jada-ed-main {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}

.jada-ed-side {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.jada-ed-card {
  padding: 28px;
  background: #fff;
  border: 1px solid var(--ed-line);
  border-radius: 16px;
  scroll-margin-top: 80px;
}

#rules {
  scroll-margin-top: 80px;
}

.jada-ed-card h2,
.jada-ed-h2 {
  margin: 0 0 12px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ed-navy);
}

.jada-ed-card h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  font-weight: 700;
}

.jada-ed-h2 {
  margin-bottom: 16px;
}

.jada-ed-sub {
  margin: 0 0 20px;
  font-size: .95rem;
  color: var(--ed-muted);
  line-height: 1.7;
}

.jada-ed-body {
  max-width: 72ch;
  margin-bottom: 8px;
  font-size: 1rem;
  line-height: 1.9;
  color: #374151;
}

.jada-ed-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.jada-ed-stats > div {
  padding: 16px;
  border-radius: 12px;
  background: var(--ed-soft);
}

.jada-ed-stats span {
  display: block;
  margin-bottom: 4px;
  font-size: .8rem;
  color: var(--ed-muted);
}

.jada-ed-stats strong {
  font-size: 1.25rem;
  color: var(--ed-navy);
}

/* ---------- Stages timeline ---------- */
.jada-ed-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.jada-ed-step {
  display: flex;
  gap: 16px;
}

.jada-ed-step__rail {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.jada-ed-step__dot {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #cbd3de;
  background: #fff;
  color: var(--ed-muted);
  font-weight: 700;
}

.jada-ed-step--done .jada-ed-step__dot {
  background: var(--ed-navy);
  border-color: var(--ed-navy);
  color: #fff;
}

.jada-ed-step--current .jada-ed-step__dot {
  background: var(--ed-orange);
  border-color: var(--ed-orange);
  color: #fff;
  box-shadow: 0 0 0 5px #fdeee8;
}

.jada-ed-step__line {
  flex-grow: 1;
  width: 2px;
  min-height: 20px;
  background: #dce2ea;
}

.jada-ed-step--done .jada-ed-step__line {
  background: var(--ed-navy);
}

.jada-ed-step__body {
  flex-grow: 1;
  padding-bottom: 22px;
}

.jada-ed-step__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-height: 36px;
}

.jada-ed-step__title {
  font-size: 1rem;
  font-weight: 600;
}

.jada-ed-step__date {
  margin-top: 2px;
  font-size: .9rem;
  color: var(--ed-muted);
}

.jada-ed-badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
}

.jada-ed-badge--done { background: #e6eef7; color: var(--ed-navy); }
.jada-ed-badge--current { background: #fdeee8; color: #8e3a0d; }
.jada-ed-badge--upcoming { background: #eef1f4; color: var(--ed-muted); }

/* ---------- Rules & conditions ---------- */
.jada-ed-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.jada-ed-two .jada-ed-card {
  padding: 24px;
}

.jada-ed-checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  line-height: 1.7;
  color: var(--ed-navy);
}

.jada-ed-checks--orange {
  color: #b3492a;
}

.jada-ed-checks li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.jada-ed-checks svg {
  flex: none;
  margin-top: 3px;
}

.jada-ed-checks span {
  color: #172033;
}

/* ---------- Registration card (Drupal webform inside) ---------- */
.jada-ed-reg-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.jada-ed-reg-head h2 {
  margin-bottom: 6px;
}

.jada-ed-reg-head .jada-ed-sub {
  margin: 0;
}

.jada-ed-deadline {
  padding: 6px 12px;
  border-radius: 20px;
  background: #fdeee8;
  color: #8e3a0d;
  font-size: .8rem;
  font-weight: 500;
}

.jada-ed-closed {
  padding: 2rem 1rem;
  text-align: center;
}

.jada-ed-closed span {
  display: block;
  margin-bottom: .5rem;
  font-size: 2.5rem;
}

.jada-reg-card .webform-submission-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.jada-reg-card .webform-submission-form > * {
  min-width: 0;
  margin: 0;
}

.jada-reg-card .webform-submission-form > .form-actions,
.jada-reg-card .webform-submission-form > fieldset,
.jada-reg-card .webform-submission-form > .captcha,
.jada-reg-card .webform-submission-form > .js-form-type-checkbox,
.jada-reg-card .webform-submission-form > .js-form-type-textarea,
.jada-reg-card .webform-submission-form > .js-form-type-radios,
.jada-reg-card .webform-submission-form > .webform-section,
.jada-reg-card .webform-submission-form > .js-webform-type-processed-text,
.jada-reg-card .webform-submission-form > .webform-type-webform-markup {
  grid-column: 1 / -1;
}

.jada-reg-card label {
  display: block;
  margin-bottom: 8px;
  font-size: .9rem;
  font-weight: 600;
}

.jada-reg-card input[type="text"],
.jada-reg-card input[type="email"],
.jada-reg-card input[type="tel"],
.jada-reg-card input[type="url"],
.jada-reg-card select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #cbd3de;
  border-radius: 10px;
  background: #f8fafc;
  color: #172033;
}

.jada-reg-card textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cbd3de;
  border-radius: 10px;
  background: #f8fafc;
}

.jada-reg-card input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--ed-navy);
}

.jada-reg-card .webform-button--submit,
.jada-reg-card .form-submit {
  min-height: 52px;
  padding: 0 36px;
  border: none;
  border-radius: 12px;
  background: var(--ed-orange);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.jada-reg-card .webform-button--submit:hover,
.jada-reg-card .form-submit:hover {
  background: #d85a30;
}

/* ---------- FAQ ---------- */
.jada-ed-faq details {
  border-bottom: 1px solid var(--ed-line);
}

.jada-ed-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 14px 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.jada-ed-faq summary::-webkit-details-marker {
  display: none;
}

.jada-ed-faq summary svg {
  flex: none;
  color: var(--ed-navy);
  transition: transform .2s;
}

.jada-ed-faq details[open] summary svg {
  transform: rotate(180deg);
}

.jada-ed-faq p {
  margin: 0 0 18px;
  line-height: 1.8;
  color: var(--ed-muted);
}

/* ---------- Side column ---------- */
.jada-ed-side .jada-ed-card {
  padding: 24px;
}

.jada-ed-side__title {
  font-size: 1.15rem !important;
  margin-bottom: 16px !important;
}

.jada-ed-facts {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
}

.jada-ed-facts > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.jada-ed-facts dt {
  color: var(--ed-muted);
  font-weight: 400;
}

.jada-ed-facts dd {
  margin: 0;
  font-weight: 600;
  text-align: end;
}

.jada-ed-side__cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 22px;
}

.jada-ed-share {
  display: flex;
  gap: 10px;
}

.jada-ed-share a,
.jada-ed-share button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  border: none;
  border-radius: 10px;
  background: var(--ed-soft);
  color: var(--ed-navy);
  font-weight: 700;
  cursor: pointer;
}

.jada-ed-share a {
  width: 44px;
}

.jada-ed-share button {
  flex-grow: 1;
  font-size: .85rem;
  font-weight: 600;
}

.jada-ed-share button.is-copied {
  background: var(--brand-green);
  color: #fff;
}

.jada-ed-help {
  padding: 20px;
  border-radius: 16px;
  background: #eaf0f7;
  color: var(--ed-navy);
  font-size: .9rem;
  line-height: 1.8;
}

.jada-ed-help strong {
  display: block;
  margin-bottom: 4px;
}

/* ---------- Related events ---------- */
.jada-ed-related {
  margin-top: 56px;
}

.jada-ed-related__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.jada-ed-related__head h2 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ed-navy);
}

.jada-ed-related__head a {
  font-weight: 600;
}

.jada-ed-related__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

/* ---------- Mobile sticky CTA ---------- */
.jada-ed-mobilebar {
  display: none;
}

@media (max-width: 1100px) {
  .jada-ed-hero__grid,
  .jada-ed-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .jada-ed-side {
    position: static;
  }

  .jada-ed-related__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .jada-ed-hero__title {
    font-size: 2rem;
  }

  .jada-ed-stats,
  .jada-ed-two,
  .jada-ed-related__grid,
  .jada-reg-card .webform-submission-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .jada-ed-side__cta {
    display: none;
  }

  .jada-ed-mobilebar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border-top: 1px solid var(--ed-line);
    box-shadow: 0 -4px 16px rgba(15, 64, 102, .08);
    font-size: .85rem;
    color: var(--ed-muted);
    line-height: 1.4;
  }

  .jada-ed-mobilebar strong {
    color: var(--ed-navy);
    font-size: .95rem;
  }

  .jada-ed-mobilebar .jada-cd__units {
    display: inline;
  }

  .jada-ed-mobilebar .jada-ed-btn {
    padding: 0 28px;
    min-height: 48px;
  }
}

/* Related events (BRD UC10) on the hackathon page */
.jada-ed-workshops { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.jada-ed-workshops li { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px solid #e3e9ee; border-radius: 12px; }
.jada-ed-workshops__date { flex: 0 0 56px; height: 56px; border-radius: 12px; background: #e6f1f8; color: #0f4066; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.jada-ed-workshops__date strong { font-size: 1.3rem; }
.jada-ed-workshops__date span { font-size: .8rem; }
.jada-ed-workshops__body { flex: 1 1 auto; min-width: 0; }
.jada-ed-workshops__title { font-weight: 700; color: #0f4066; }

/* Published results (BRD UC15) */
.jada-ed-results { width: 100%; border-collapse: collapse; }
.jada-ed-results th { text-align: start; font-size: .85rem; color: #515a5f; padding: 8px; border-bottom: 2px solid #e3e9ee; }
.jada-ed-results td { padding: 10px 8px; border-bottom: 1px solid #e3e9ee; }
.jada-ed-results__rank { display: inline-flex; width: 32px; height: 32px; border-radius: 50%; align-items: center; justify-content: center; font-weight: 700; background: #eef2f6; color: #0f4066; }
.jada-ed-results__rank--1 { background: #f5c542; color: #4a3400; }
.jada-ed-results__rank--2 { background: #cfd8e0; color: #1f2d3a; }
.jada-ed-results__rank--3 { background: #e0a46a; color: #3e2205; }

/* ---------- Event sponsors (gold / silver / bronze) ---------- */
.jada-es { scroll-margin-top: 80px; }
.jada-es__tier + .jada-es__tier { margin-top: 18px; }
.jada-es__tier h3 { display: flex; align-items: center; gap: 8px; font-size: 1rem; color: var(--ed-muted); margin: 0 0 10px; }
.jada-es__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--tier); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tier) 22%, transparent); }
.jada-es ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.jada-es__tier--gold ul { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.jada-es__tier--silver ul { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.jada-es__tier--bronze ul { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.jada-es a { display: grid; gap: 8px; justify-items: center; padding: 14px; border: 1px solid var(--ed-line); border-top: 3px solid var(--tier);
  border-radius: 14px; background: #fff; text-decoration: none; color: var(--ed-navy); text-align: center; transition: transform .15s, box-shadow .15s; }
.jada-es a[href]:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(10, 26, 48, .1); }
.jada-es__logo { display: flex; align-items: center; justify-content: center; width: 100%; font-weight: 700; }
.jada-es__tier--gold .jada-es__logo { height: 84px; }
.jada-es__tier--silver .jada-es__logo { height: 64px; }
.jada-es__tier--bronze .jada-es__logo { height: 46px; }
.jada-es__logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.jada-es__name { font-size: .9rem; font-weight: 600; }
.jada-es__tier--bronze .jada-es__name { font-size: .8rem; }
