/* ===========================================
   Annual Conference single event (clean markup)
   Row 1: header (left) + submenu (right)
   Row 2: About + Description full width
   Mobile: menu moves to the bottom
   =========================================== */

.smdm-evt-info--conf {
  background-color: unset !important;
  border: unset !important;
  margin-top: 0 !important;
}

/* ---------- HERO ---------- */
.smdm-evt-info--conf .smdm-evt-hero-row {
  margin: 0;
}

.smdm-evt-info--conf .smdm-hero-wrap--banner {
  margin: 0 0 18px;
}

.smdm-evt-info--conf .smdm-hero-img {
  width: 100%;
  height: auto;
  min-height: 100% !important;
  max-height: unset !important;
  display: block;
}

/* ---------- TOP ROW: header + submenu (DESKTOP) ---------- */
.smdm-evt-info--conf .smdm-evt-main {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 50/50 */
  gap: 40px;
  align-items: flex-start;
  margin-top: 0;
}

/* left: header only */
.smdm-evt-info--conf .smdm-evt-main__left {
  min-width: 0;
}

/* right: submenu */
.smdm-evt-info--conf .smdm-evt-main__right {
  min-width: 0;
}

/* keep submenu flush to top */
.smdm-evt-info--conf .smdm-evt-main__right .smdm-subnav {
  margin-top: 0;
}

/* ---------- BELOW ROW: About + Description ---------- */
.smdm-evt-info--conf .smdm-evt-content {
  width: 100%;
}

/* summary card styling */
.smdm-evt-info--conf .smdm-summary-card {
  border-top: 2px solid var(--line);
  margin-top: 32px;
  padding-top: 10px;
}

.smdm-evt-info--conf .smdm-summary-wide {
  border-top: none !important;
}

.smdm-evt-info--conf .smdm-summary-block {
  margin-top: 20px;
}

/* if summary_html already contains <p> tags, don't wrap it in another <p> visually */
.smdm-evt-info--conf .smdm-summary__body > p:first-child {
  margin-top: 0;
}

/* ---------- Submenu buttons: 2-column grid on desktop + equal button sizes ---------- */
@media (min-width: 901px) {

  .smdm-evt-info--conf .smdm-subnav__buttons {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    align-items: stretch; /* make every grid item stretch */
  }

  .smdm-evt-info--conf .smdm-subnav__button {
    width: 100%;
    height: 100%;
    display: flex; /* let link fill */
  }

  .smdm-evt-info--conf .smdm-subnav__button .wp-block-button__link {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.2;
    padding-top: 14px;
    padding-bottom: 14px;
  }
}

/* ---------- Mobile / Tablet (≤900px): menu goes to bottom ---------- */
@media (max-width: 900px) {

  /* make the whole event wrapper a column flex container */
  .smdm-evt-info--conf {
    display: flex;
    flex-direction: column;
  }

  /* flatten the top-row wrapper so left/right can be re-ordered */
  .smdm-evt-info--conf .smdm-evt-main {
    display: contents;
  }

  /* header first */
  .smdm-evt-info--conf .smdm-evt-main__left {
    order: 1;
    width: 100%;
  }

  /* About/Description second */
  .smdm-evt-info--conf .smdm-evt-content {
    order: 2;
    width: 100%;
  }

  /* menu last */
  .smdm-evt-info--conf .smdm-evt-main__right {
    order: 3;
    width: 100%;
    margin-top: 16px;
  }

  /* Mobile: submenu buttons full width and stacked + equal sizing */
  .smdm-evt-info--conf .smdm-subnav__buttons {
    display: flex !important;
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }

  .smdm-evt-info--conf .smdm-subnav__button {
    width: 100%;
    display: flex;
  }

  .smdm-evt-info--conf .smdm-subnav__button .wp-block-button__link {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.2;
    padding-top: 14px;
    padding-bottom: 14px;
  }
}
