/* page scroll lock when modal is open */
.no-scroll { overflow: hidden; }

/* overlay container */
.modal {
  position: fixed; inset: 0; z-index: 1000;
  display: none; /*toggled via JS*/
}

.modal.open{
    display: block;
}

/* dim background */
.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.55);
}

/* the black card */
.modal__card {
  position: relative;
  margin: 0 auto;
  margin-top: 130px;
  width: 100%;
  max-width: 500px;
  min-width: 200px;
  padding: 40px;
  background: #0f0f0f;

  /* BACKGROUND IMAGE */
  /*background-image: url("/img/cny2026/backgroundcny.jpg"); /* your generated image */
  /* background-size: cover;
  background-position: center;
  background-repeat: no-repeat; */


  color: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
  max-height: 84vh;
  overflow: auto;           /* list scrolls if long */
  text-align: center;       /* like your screenshot */

  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* close button */
.modal__close {
  position: sticky;
  top: 8px;
  margin-left: auto;   /* pushes it to the right */
  z-index: 5;

  border: 0;
  background: transparent;
  color: var(--text-color-1);
  font-size: 50px;
  cursor: pointer;
  line-height: 1;
  opacity: .9;


}

.modal__close:hover { opacity: 1; }


/* ===== Header ===== */
.modal__title{
    color: var(--text-color-1);
    font-family: var(--font-body);
    letter-spacing: 1px;
    font-weight: 100;
    font-size: var(--font-lg);
    position: static;
    z-index: 3;
    margin: 4px 36px 2px; /* leave space for the close button */
}

.modal__meta{
    font-family: var(--font-body);
    font-size: var(--font-sm);
    font-weight: 400;
    color: var(--text-color-3);
    line-height: 2;
    list-style-type: none;
}

/* ===== Body: courses list ===== */
.courses { 
  list-style: none; margin: 10px 0 0; padding: 0;
  display: grid; 
  gap: 10px;
  
}

.course{
    line-height: 2;
    border-bottom: 1px dashed rgba(255,255,255,0.08);
}

.course:last-child{
    border-bottom: none;
}

.course .cn{
    font-family: var(--font-body);
    font-size: var(--font-cn);
    font-weight: 100;
}

.course .en{
    font-family: var(--font-body);
    font-size: var(--font-en);
    font-weight: 100;
}


@media (max-width: 768px) {
  
  .modal__card{
    position: absolute;   /* take it out of normal flow */
    top: 50%;             /* push it down halfway */
    left: 50%;            /* push it right halfway */
    transform: translate(-50%, -50%); /* pull it back by half its own size */

    margin: 0;            /* reset desktop margin */
    padding: 20px;
    max-width: 315px;
    max-height: 85%;      /* still scrollable inside */
    width: 90%;           /* so it doesn’t stretch edge-to-edge */
  }

  #pager span{
    font-size: 10px;
  }
}




/* CHINESE NEW YEAR 2026 MODAL */
/* the black card */
.cny_bg {

  background-image: url("/img/cny2026/backgroundcny.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  background-color: rgba(0,0,0,0.55);
  background-blend-mode: multiply;

  
}