/* ===========================================================
   IWW-NSC 2027 — homepage section styles
   =========================================================== */

/* ---------------- carousel ---------------- */
.carousel-wrap {
  padding: 10px 0 0;
  background: #ffffff
}

.carousel {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px
}

.cs-track {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 21/9;
  background: var(--navy-800);
  box-shadow: var(--shadow-2)
}

.cs-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .6s ease;
  pointer-events: none
}

.cs-slide.on {
  opacity: 1;
  pointer-events: auto
}

.cs-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.cs-image-media {
  object-fit: cover;
}

.cs-video-media {
  object-fit: cover;
  background: #030a24;
  cursor: pointer;
}

.cs-video-state {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(.94);
  width: 72px;
  height: 72px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 6;
}

.cs-video-state svg {
  width: 30px;
  height: 30px;
}

.cs-video-state.state-play {
  background: rgba(8, 22, 52, .38);
  color: rgba(255, 255, 255, .95);
}

.cs-video-state.state-stop {
  background: rgba(8, 22, 52, .3);
  color: rgba(255, 255, 255, .9);
}

.cs-video-state.is-show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.cs-slide image-slot {
  width: 100%;
  height: 100%
}

.cs-slide .ph {
  position: absolute;
  inset: 0;
  border-radius: 0;
  border: 0;
  background: repeating-linear-gradient(135deg, var(--navy-900), var(--navy-900) 14px, var(--navy-700) 14px, var(--navy-700) 28px)
}

.cs-video {
  flex-direction: column;
  gap: 16px;
  color: #fff
}

.cs-video .ph-label {
  background: rgba(255, 255, 255, .12);
  color: #dce6fb
}

.cs-play {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  border: 1.5px solid rgba(255, 255, 255, .5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff
}

.cs-play svg {
  width: 30px;
  height: 30px;
  margin-left: 4px
}

.cs-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, .92);
  color: var(--navy-800);
  box-shadow: var(--shadow-2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, transform .12s
}

.cs-arrow:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.06)
}

.cs-arrow svg {
  width: 22px;
  height: 22px
}

.cs-prev {
  left: 48px
}

.cs-next {
  right: 48px
}

.cs-dots {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 9px
}

.cs-mobile-meta {
  display: none;
}

.cs-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  padding: 0;
  background: rgba(255, 255, 255, .45);
  transition: background .15s, width .2s
}

.cs-dot.on {
  background: #fff;
  width: 26px;
  border-radius: 5px
}

/* ---------------- action bar (date / location / submit) ---------------- */
.action-wrap {
  background: #ffffff;
  padding: 16px 0 12px;
  margin-top: 0;
  margin-bottom: 18px;
}

.action-bar {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.action-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------------- countdown ---------------- */
.action-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-auth-ghost {
  padding: 9px 15px;
  border-radius: 10px;
  border: 1px solid #c7d2e8;
  background: #ffffff;
  color: var(--navy-800);
  box-shadow: none;
  font-size: 13px;
}

.btn-auth-ghost:hover {
  background: #f6f8fc;
}

.btn-auth-solid {
  padding: 9px 15px;
  border-radius: 10px;
  background: var(--navy-800);
  color: #ffffff;
  box-shadow: none;
  font-size: 13px;
}

.btn-auth-solid:hover {
  background: var(--navy-700);
}

/* ---------------- countdown ---------------- */
.countdown-wrap {
  background: #ffffff;
  padding: 0 0 24px;
  margin-top: 1.5rem;
}

#countdown {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  justify-content: center
}

.cd-card {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  font-family: var(--sans)
}

.cd-card svg {
  width: 20px;
  height: 20px;
  color: var(--danger)
}

.cd-label {
  font-weight: 600;
  color: var(--navy-800);
  font-size: 14.5px
}

.cd-sep {
  width: 1px;
  height: 22px;
  background: var(--line)
}

.cd-time {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: var(--navy-900);
  font-weight: 700
}

.cd-time b {
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em
}

.cd-time i {
  font-size: 11px;
  font-style: normal;
  color: var(--ink-soft);
  font-weight: 600;
  margin-left: 1px
}

.cd-colon {
  color: var(--navy-300);
  font-weight: 700;
  margin: 0 2px;
  align-self: center
}

/* ---------------- key dates timeline ---------------- */
.keydates {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px
}

.kd-scroll {
  overflow-x: auto;
  padding: 10px 4px 6px;
  scrollbar-width: thin
}

.keydates-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(140px, 1fr);
  min-width: 920px;
  position: relative
}

.keydates-track::before {
  content: "";
  position: absolute;
  left: 7%;
  right: 7%;
  top: calc(50% - 0px);
  height: 2px;
  background: var(--line);
  z-index: 0
}

.kd-node {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
  padding: 0 8px
}

.kd-title {
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.3;
  color: var(--ink-soft);
  height: 46px;
  display: flex;
  align-items: flex-end;
  justify-content: center
}

.kd-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--navy-300);
  margin: 12px 0
}

.kd-date {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  color: var(--navy-800)
}

.kd-node.done .kd-dot {
  background: var(--navy-300);
  border-color: var(--navy-300)
}

.kd-node.done .kd-date {
  color: var(--ink-soft);
  font-weight: 600
}

.kd-node.active .kd-dot {
  background: var(--danger);
  border-color: var(--danger);
  box-shadow: 0 0 0 5px rgba(156, 43, 59, .15)
}

.kd-node.active .kd-title,
.kd-node.active .kd-date {
  color: var(--danger)
}

.kd-node.next .kd-dot {
  background: var(--ok);
  border-color: var(--ok);
}

.kd-node.next .kd-title,
.kd-node.next .kd-date {
  color: var(--ok);
}

.kd-node.end .kd-dot {
  background: var(--navy-900);
  border-color: var(--navy-900);
}

.kd-node.end .kd-title,
.kd-node.end .kd-date {
  color: var(--navy-900);
}

.kd-tzcap {
  margin: 14px 0 0;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-soft);
  text-align: right
}

.kd-tzcap b {
  color: var(--navy-700);
  font-weight: 600
}

/* ---------------- 3-column block ---------------- */
.trio {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
  align-items: start
}

.trio-col {
  display: flex;
  flex-direction: column;
  min-width: 0
}

/* all columns have the same top alignment margin to form a perfect horizontal baseline */
.trio-col {
  margin-top: 30px
}

.trio-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px
}

.trio-head svg {
  width: 22px;
  height: 22px;
  color: #010b6a;
  flex: 0 0 auto
}

.trio-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  color: var(--navy-800)
}

/* scrollbox (previous editions + news) — fixed height, scrollbar on LEFT */
.scrollbox {
  height: 400px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-1);
  padding: 6px;
  direction: rtl;
  scrollbar-width: thin;
  scrollbar-color: #010b6a transparent
}

.scrollbox>* {
  direction: ltr
}

.scrollbox::-webkit-scrollbar {
  width: 8px
}

.scrollbox::-webkit-scrollbar-thumb {
  background: var(--navy-300);
  border-radius: 8px
}

.scrollbox::-webkit-scrollbar-track {
  background: transparent
}

.scrollbox-news {
  border-radius: 18px
}

.box-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: background .14s, border-color .14s
}

.box-row+.box-row {
  margin-top: 2px
}

.box-row:hover {
  background: var(--paper-2);
  border-color: var(--line)
}

.scrollbox-news .box-row {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
}

.scrollbox-news .box-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.box-row-main {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--navy-800);
  line-height: 1.35
}

.box-row-sub {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-soft)
}

.box-row-date {
  font-family: var(--sans);
  font-size: 11px;
  color: #9aa5b5;
  line-height: 1.3;
}

/* ---------------- previous editions timeline (left column) ---------------- */
.trio-left .scrollbox {
  position: relative;
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0;
  direction: ltr;
  height: 284px;
  scrollbar-width: none;
}

.trio-left .scrollbox::-webkit-scrollbar {
  display: none;
}

.trio-left .scrollbox::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 14px;
  bottom: 14px;
  width: 2px;
  background: var(--navy-100);
  z-index: 1;
}

.trio-left .box-row {
  padding: 6px 0 6px 20px;
  position: relative;
  border: none !important;
  background: transparent !important;
  text-align: left;
  z-index: 2;
}

.trio-left .box-row::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--navy-300);
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 1.5px var(--navy-300);
  z-index: 3;
  transition: background .15s, box-shadow .15s;
}

.trio-left .box-row:hover::before {
  background: var(--gold);
  box-shadow: 0 0 0 2px var(--gold);
}

.trio-left .box-row-main {
  font-size: 13.5px;
  color: var(--navy-800);
  font-weight: 600;
  line-height: 1.3;
}

.trio-left .box-row-sub {
  font-size: 12px;
  color: var(--ink-soft);
}

.trio-center {
  padding: 0 4px
}

.trio-center h2 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  color: #4a5670;
  margin: 0 0 16px;
  line-height: 1.25;
}

#trio-section .trio-center h2 {
  color: #4a5670 !important;
}

.welcome-text {
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------------- featured publications ---------------- */
.featured-pubs {
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: center;
  margin-top: 0;
}
.trio .scrollbox {
  margin-top: 0;
}

.pub-card {
  display: flex;
  gap: 16px;
  align-items: center;
  width: 100%;
  max-width: 380px;
}

.pub-cover {
  width: 80px;
  height: 110px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-left: 3px solid #ffffff;
  border-radius: 4px 8px 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: var(--shadow-1);
  flex-shrink: 0;
}

.pub-icon {
  width: 24px;
  height: 24px;
  color: var(--navy-800);
}

.pub-spine-text {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--navy-600);
  text-transform: uppercase;
}

.pub-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pub-title {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
  color: var(--navy-800);
  line-height: 1.35;
}

.pub-publisher {
  margin: 0 0 6px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-soft);
}

.pub-action {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s;
}

.pub-action:hover {
  color: var(--navy-600);
}

/* ---------------- sponsors band ---------------- */
.sponsors-wrap {
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 40px;
  padding: 30px 0 32px
}

.sponsors {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
  text-align: center
}

.sp-group+.sp-group {
  margin-top: 6px
}

.sp-label {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--navy-800);
  font-weight: 700;
  margin: 0 0 14px
}

.sp-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center
}

.sp-card {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-1);
  padding: 11px 18px
}

.sp-mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  flex: 0 0 auto;
  background: repeating-linear-gradient(135deg, var(--paper-2), var(--paper-2) 5px, var(--paper-3) 5px, var(--paper-3) 10px);
  border: 1px dashed var(--navy-300)
}

.sp-name {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--navy-800)
}

.sp-rule {
  width: 80px;
  height: 1px;
  background: var(--line);
  margin: 20px auto
}

/* ---------------- shells ---------------- */
.page-main {
  min-height: 40vh
}

/* ---------------- quick links ---------------- */
.scrollbox-ql {
  border-radius: 18px;
  height: 160px;
}

.scrollbox-ql .box-row {
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid #e2e8f0;
}

.scrollbox-ql .box-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

/* ---------------- responsive ---------------- */
@media (min-width:901px) and (max-width:1120px) {
  .nav-inner {
    flex-wrap: wrap
  }
}

@media (max-width:768px) {
  .trio {
    grid-template-columns: 1fr;
    gap: 30px
  }

  .trio-center {
    order: -1
  }

  .trio-col {
    margin-top: 0
  }

  .scrollbox {
    height: 230px
  }
}

@media (max-width:900px) {
  /* Keep the off-canvas menu in one vertical column. Without this override,
     the column flex container wraps items sideways when viewport height is low. */
  .nav-inner {
    flex-wrap: nowrap;
  }

  .nav-inner > .nav-item,
  .nav-inner > .nav-brand-item {
    flex: 0 0 auto;
  }

  .carousel {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 0;
  }

  .action-wrap {
    display: block;
    position: sticky;
    top: 57px;
    z-index: 1250;
    padding: 7px 0 7px;
    margin-bottom: 18px;
    border-bottom: 1px solid #e9edf6;
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(3px);
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    transition: opacity .22s ease, transform .22s ease;
  }

  .action-wrap.is-mobile-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .action-bar {
    padding: 0 12px;
  }

  .action-left {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .action-left::-webkit-scrollbar {
    display: none;
  }

  .action-left .pill {
    width: auto;
    min-width: 0;
    justify-content: center;
    border-radius: 999px;
    padding: 8px 11px;
    font-size: 10.5px;
    line-height: 1.2;
    white-space: nowrap;
    flex: 0 0 auto;
  }

  .cs-prev {
    left: 14px
  }

  .cs-next {
    right: 14px
  }

  .cs-track {
    aspect-ratio: 16/11
  }

  .cs-arrow {
    display: none !important;
  }

  .cs-mobile-meta {
    position: absolute;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    z-index: 7;
    max-width: calc(100% - 20px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .95);
    color: #010b6a;
    border: 1px solid rgba(1, 11, 106, .18);
    text-decoration: none;
    font-family: var(--sans);
    font-weight: 600;
    font-size: 11px;
    line-height: 1.2;
    box-shadow: 0 8px 24px rgba(6, 14, 40, .35);
    backdrop-filter: blur(2px);
  }

  .cs-mobile-meta .csm-part {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    white-space: nowrap;
  }

  .cs-mobile-meta svg {
    width: 12px;
    height: 12px;
    flex: 0 0 auto;
    color: #010b6a;
  }

  .cs-mobile-meta .csm-loc {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 38vw;
  }

  .banner-inner {
    grid-template-columns: 1fr !important;
    text-align: left;
    gap: 18px
  }

  .banner-div {
    display: none
  }

  .banner-media {
    grid-template-columns: repeat(3, 1fr) !important;
    grid-auto-rows: 54px
  }

  .banner-media .tall {
    grid-row: span 1 !important;
    height: 54px !important
  }

  .action-right {
    display: none;
  }

  #trio-section .trio-col.trio-important,
  #trio-section .column-heading,
  #trio-section .scrollbox-news,
  #trio-section .trio-col.trio-important *,
  .keydates,
  #keydates-track {
    display: none !important;
  }
}

body.homepage-entrance #trio-section .trio-col {
  opacity: 0;
  animation: subpage-rise-in .82s cubic-bezier(.22, .8, .23, 1) forwards;
}

body.homepage-entrance #trio-section .trio-col:nth-child(2) {
  animation-delay: .12s;
}

@media (max-width:1100px) {
  #trio-section .trio-col.trio-important,
  #trio-section .column-heading,
  #trio-section .scrollbox-news,
  #trio-section .trio-col.trio-important *,
  .keydates,
  #keydates-track {
    display: none !important;
  }
}