/*
 * 본 프로젝트에서 추가한 스타일.
 * 원본은 팝업, 퀵메뉴 창, 이미지 확대 창을 스크립트의 인라인 스타일로 그린다. 같은 모습을 여기서 클래스로 정의한다.
 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

/*
 * 원본은 좁은 화면에서 일부 목록을 슬라이더로 바꿔 그린다. 두 가지를 모두 그려 두고 폭에 따라 하나만 보인다.
 * 메인은 768px 이하(mobile), IBDP 는 767px 이하(mobile-sm)에서 바뀐다.
 */
@media (min-width: 769px) {
  [data-variant='mobile'] {
    display: none !important;
  }
}
@media (max-width: 768px) {
  [data-variant='desktop'] {
    display: none !important;
  }
}
@media (min-width: 768px) {
  [data-variant='mobile-sm'] {
    display: none !important;
  }
}
@media (max-width: 767px) {
  [data-variant='desktop-sm'] {
    display: none !important;
  }
}

/* 메인 팝업 */
.popup-layer {
  position: fixed;
  z-index: 99999;
  top: 50%;
  left: 50%;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  max-width: calc(100vw - 40px);
  transform: translate(-50%, -50%);
}
.popup {
  max-width: 100%;
  background-color: #fff;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
.popup-content {
  overflow: hidden;
}
.popup-content img {
  display: block;
  max-width: 100%;
}
.popup__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background-color: #333;
  color: #fff;
  font-size: 13px;
}
.popup__footer label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.popup__footer button {
  background: none;
  border: none;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .popup-layer {
    inset: 0;
    z-index: 99998;
    display: block;
    max-width: none;
    background-color: rgba(0, 0, 0, 0.5);
    transform: none;
  }
  /* 먼저 등록한 팝업이 맨 위에 오도록 겹쳐 쌓는다. */
  .popup {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: calc(100001 - var(--popup-order, 0));
    width: calc(100vw - 32px) !important;
    max-width: 400px;
    transform: translate(-50%, -50%);
  }
  .popup-content {
    height: auto !important;
    max-height: 70vh;
  }
  .popup-content img {
    width: 100%;
  }
}

/* 퀵메뉴 창 (시간표, 강사소개, 에이클래스) */
.sq-modal__backdrop {
  position: fixed;
  inset: 0;
  z-index: 1040;
  background-color: rgba(0, 0, 0, 0.5);
}
.sq-modal__scroller {
  position: fixed;
  inset: 0;
  z-index: 1050;
  overflow-y: auto;
  outline: 0;
}
.sq-modal__dialog {
  position: relative;
  width: 600px;
  max-width: calc(100% - 20px);
  margin: 30px auto;
}
.sq-modal__dialog--lg {
  width: 900px;
}
.sq-modal__content {
  position: relative;
  overflow: hidden;
  background-color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}
.sq-modal__header {
  position: relative;
  padding: 15px;
  border-bottom: 1px solid #e5e5e5;
}
.sq-modal__header--dark {
  padding: 15px 20px;
  border-bottom: none;
  background-color: #222;
}
.sq-modal__header--black {
  border-bottom: none;
  background-color: #111;
}
.sq-modal__close {
  float: right;
  margin-top: -2px;
  padding: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.sq-modal__close--light {
  margin-top: 0;
  color: #000;
  opacity: 0.2;
}
.sq-modal__close--icon {
  margin-top: 0;
  font-size: 24px;
  font-weight: 400;
}
.sq-modal__title {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
  text-align: center;
}
.sq-modal__subtitle {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 800;
}
.sq-modal__tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  margin: 0;
  padding: 10px 0 0;
  list-style: none;
}
.sq-tab-link {
  display: inline-block;
  padding: 5px 14px;
  font-size: 14px;
  font-weight: 700;
  color: #ccc;
  text-decoration: none;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50px;
  cursor: pointer;
  transition:
    color 0.2s,
    border-color 0.2s;
}
.sq-tab-link.is-active {
  color: transparent;
  background-color: transparent;
  background-image: linear-gradient(to left, #eeb955, #ffe9be);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  border-color: #ffe9be;
}
.sq-modal__underline-tabs {
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: center;
}
.sq-modal__underline-tabs li {
  display: inline-block;
  padding: 2px 15px;
}
.sq-modal__underline-tab {
  display: inline-block;
  padding: 8px 0;
  font-size: 15px;
  font-weight: 400;
  color: #ccc;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  cursor: pointer;
}
.sq-modal__underline-tab.is-active {
  font-weight: 700;
  color: #ffe9be;
  border-bottom-color: #ffe9be;
}
.sq-modal__body a {
  display: block;
  width: 100%;
}
.sq-modal__body img {
  display: block;
  width: 100%;
  height: auto;
}
.sq-modal__body--padded {
  padding: 15px;
}
.sq-modal__body--scroll {
  max-height: 700px;
  overflow-y: auto;
}

/* 여름특강 카카오톡 후기 넘겨 보기 */
.gallery-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.9);
}
.gallery-overlay__figure {
  position: relative;
  display: inline-block;
  line-height: 0;
}
.gallery-overlay__figure img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
}
.gallery-overlay__close {
  position: absolute;
  right: 0;
  bottom: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.55);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.gallery-overlay__nav {
  position: absolute;
  top: 50%;
  z-index: 10000;
  background: none;
  border: none;
  color: #fff;
  font-size: 48px;
  cursor: pointer;
  transform: translateY(-50%);
}
.gallery-overlay__nav--prev {
  left: 20px;
}
.gallery-overlay__nav--next {
  right: 20px;
}
.gallery-overlay__counter {
  position: absolute;
  bottom: 20px;
  color: #fff;
  font-size: 14px;
}

/* 여름특강 설명 이미지 확대 */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  cursor: zoom-out;
}
.lightbox-modal img {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
}

/* 오류·없는 페이지 안내 */
.notice-page {
  padding: 200px 20px 160px;
}
.notice-page__title {
  margin-bottom: 20px;
  font-size: 32px;
  font-weight: 800;
  color: #111;
}
.notice-page__text {
  margin-bottom: 40px;
  font-size: 17px;
  color: #666;
}
