@charset "UTF-8";
/* =========================================================
   메인 바텀시트 팝업 (C안) - teacher homeRenew.jsp / partner main_new.jsp #popupBanner
   - 전역 .popup(popup.css) 클래스와 충돌하지 않도록 .mbs- 프리픽스 사용
   - 라이트 딤(38%) + 하단에서 올라오는 시트
   - 배너 가로 스와이프(scroll-snap) / 손잡이 아래로 끌어 닫기
   - 이미지 없는 텍스트형 배너 (bgColor 배경 + 장식 그래픽)
   - PC: 하단 중앙 460px 시트
   ========================================================= */

#popupBanner.mbs {
  position: fixed;
  inset: 0;
  z-index: 99990; /* .quick-banner(999) 위, .modal(99999) 아래 */
  font-family: 'Pretendard', sans-serif;
  visibility: hidden;
  transition: visibility 0s linear 0.4s;
}

#popupBanner.mbs.is-show {
  visibility: visible;
  transition: visibility 0s;
}

#popupBanner.mbs * {
  box-sizing: border-box;
}

/* 딤 */
#popupBanner .mbs-dim {
  position: absolute;
  inset: 0;
  background: rgba(0, 16, 62, 0.38);
  opacity: 0;
  transition: opacity 0.3s ease;
}

#popupBanner.is-show .mbs-dim {
  opacity: 1;
}

/* 시트 */
#popupBanner .mbs-sheet {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 100%;
  max-width: 460px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: #FFF;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -10px 30px rgba(0, 16, 62, 0.12);
  transform: translate(-50%, 100%);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#popupBanner.is-show .mbs-sheet {
  transform: translate(-50%, 0);
}

#popupBanner .mbs-sheet:focus {
  outline: none;
}

#popupBanner .mbs-sheet.is-dragging {
  transition: none;
}

/* 손잡이 (드래그 영역) */
#popupBanner .mbs-grab {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  cursor: grab;
  touch-action: none;
}

#popupBanner .mbs-grab i {
  display: block;
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: #D5DBE0;
}

#popupBanner.is-single .mbs-count,
#popupBanner.is-single .mbs-dots {
  display: none;
}

/* 배너 가로 스와이프 */
#popupBanner .mbs-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 4px 20px 0;
  scroll-padding: 0 20px;
  scrollbar-width: none;
}

#popupBanner .mbs-scroll::-webkit-scrollbar {
  display: none;
}

/* 텍스트형 배너 카드
   - 배경: 어드민 bgColor(inline) + 공통 광택 그라데이션 + 장식 원 2개
   - 어떤 bgColor 가 와도 어울리도록 장식은 흰색/검정 반투명으로만 처리 */
#popupBanner .mbs-item {
  position: relative;
  flex: 0 0 100%;
  display: flex;
  flex-direction: column;
  min-height: 210px;
  padding: 22px 22px 20px;
  border-radius: 16px;
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, 0.1) 100%);
  scroll-snap-align: start;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
}

#popupBanner .mbs-item::before {
  content: '';
  position: absolute;
  top: -70px;
  right: -60px;
  z-index: -1;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.13);
}

#popupBanner .mbs-item::after {
  content: '';
  position: absolute;
  right: 36px;
  bottom: -46px;
  z-index: -1;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 18px solid rgba(255, 255, 255, 0.1);
}

/* 상단: 부제목 라벨 + 순서 */
#popupBanner .mbs-item .mbs-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

#popupBanner .mbs-item .mbs-sub {
  display: inline-flex;
  align-items: center;
  height: 28px;
  max-width: 100%;
  padding: 0 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#popupBanner .mbs-item .mbs-count {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.18);
  color: #FFF;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* 본문: 설명 (메인 카피) */
#popupBanner .mbs-item .mbs-desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  margin-top: 16px;
  max-width: 88%;
  overflow: hidden;
  font-size: 25px;
  font-weight: 800;
  line-height: 1.34;
  letter-spacing: -0.03em;
  word-break: keep-all;
}

/* 하단: 자세히 보기 */
#popupBanner .mbs-item .mbs-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 18px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

#popupBanner .mbs-item .mbs-more i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  position: relative;
}

#popupBanner .mbs-item .mbs-more i::before {
  content: '';
  width: 6px;
  height: 6px;
  margin-left: -2px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

#popupBanner .mbs-item:hover .mbs-more i {
  background: rgba(255, 255, 255, 0.4);
}

/* 인디케이터 : 숫자 버튼 (261109 점 → 숫자, 클릭 영역 확대) */
#popupBanner .mbs-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 14px 0 0;
}

#popupBanner .mbs-dots button {
  position: relative;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 16px;
  background: #F1F4F6;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 32px;
  color: #8A96A3;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: background 0.2s, color 0.2s;
}

#popupBanner .mbs-dots button:hover {
  background: #E4E9ED;
  color: #555;
}

#popupBanner .mbs-dots button.on {
  background: #19CEB3;
  color: #FFF;
}

/* 자동 이동 중: 활성 번호 배경이 왼쪽부터 채워지는 진행 표시 */
#popupBanner .mbs-dots button::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: -1;
  width: 0;
  background: #19CEB3;
}

#popupBanner.is-auto .mbs-dots button.on {
  background: #8FE3D6;
}

#popupBanner.is-auto .mbs-dots button.on::after {
  animation: mbsProgress var(--mbs-delay, 4s) linear forwards; /* JS POPUP_BANNER_DELAY 를 --mbs-delay 로 주입 (미지정 시 4s) */
}

@keyframes mbsProgress {
  from { width: 0; }
  to { width: 100%; }
}

/* 하단 : 텍스트형 닫기 (261109 큰 버튼 → 작은 텍스트) */
#popupBanner .mbs-btns {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px 10px;
}

#popupBanner .mbs-btns button {
  padding: 10px 8px;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  color: #8A96A3;
  cursor: pointer;
}

#popupBanner .mbs-btns button:hover {
  color: #333;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#popupBanner .mbs-btns .mbs-btn-close {
  font-weight: 700;
  color: #333;
}

#popupBanner button:focus-visible,
#popupBanner a:focus-visible {
  outline: 2px solid #19CEB3;
  outline-offset: 2px;
}

/* 시트 노출 중 배경 스크롤 잠금 */
html.mbs-lock,
html.mbs-lock body {
  overflow: hidden;
}

/* PC: 화면 하단에서 살짝 띄운 카드형 */
@media screen and (min-width: 961px) {
  #popupBanner .mbs-sheet {
    bottom: 24px;
    border-radius: 20px;
    box-shadow: 0 24px 60px -12px rgba(0, 16, 62, 0.4);
    transform: translate(-50%, calc(100% + 24px));
  }
}

/* 모바일 */
@media screen and (max-width: 540px) {
  #popupBanner .mbs-item {
    min-height: 196px;
    padding: 20px 20px 18px;
  }

  #popupBanner .mbs-item .mbs-desc {
    margin-top: 14px;
    max-width: 100%;
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #popupBanner .mbs-dim,
  #popupBanner .mbs-sheet {
    transition: none;
  }

  #popupBanner .mbs-scroll {
    scroll-behavior: auto;
  }
}

/* =========================================================
   261113 : PC 배너 나란히 보기 (.is-grid-on)
   - JSP : 배너 2~4개면 .is-grid + .is-count-N 부여
   - JS(popupBannerGridApply) : 아래 조건일 때만 .is-grid-on 부여
       · 배너 2~3개 : 1025px 이상
       · 배너 4개   : 1280px 이상 (1025~1279px 은 카드가 좁아 스와이프 유지)
   - 그 외(모바일·태블릿, 1개, 5개 이상)는 기존 스와이프 그대로
   - 슬라이드·자동 이동·인디케이터·n/n 카운트 없이 한 화면에 모두 노출
   ========================================================= */
#popupBanner.is-grid-on .mbs-sheet {
  width: calc(100% - 80px);
}

#popupBanner.is-grid-on.is-count-2 .mbs-sheet {
  max-width: 760px;
}

#popupBanner.is-grid-on.is-count-3 .mbs-sheet {
  max-width: 1080px;
}

#popupBanner.is-grid-on.is-count-4 .mbs-sheet {
  max-width: 1240px;
}

/* 시트 폭 : #popupBanner.is-grid-on.is-count-4 .mbs-sheet 아래 */
#popupBanner.is-grid-on.is-count-5 .mbs-sheet {
  max-width: 1400px;
}

#popupBanner.is-grid-on .mbs-scroll {
  display: grid;
  gap: 16px;
  overflow: visible;
  scroll-snap-type: none;
  padding: 6px 24px 0;
}

#popupBanner.is-grid-on.is-count-2 .mbs-scroll {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#popupBanner.is-grid-on.is-count-3 .mbs-scroll {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#popupBanner.is-grid-on.is-count-4 .mbs-scroll {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* 5열 : #popupBanner.is-grid-on.is-count-4 .mbs-scroll 아래 */
#popupBanner.is-grid-on.is-count-5 .mbs-scroll {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

#popupBanner.is-grid-on .mbs-item {
  min-width: 0;
  scroll-snap-align: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#popupBanner.is-grid-on .mbs-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -8px rgba(0, 16, 62, 0.3);
}

/* 3열 이상은 카드 폭이 좁아 메인 카피 크기를 단계적으로 낮춤 */
#popupBanner.is-grid-on.is-count-3 .mbs-item .mbs-desc {
  max-width: 100%;
  font-size: 22px;
}

#popupBanner.is-grid-on.is-count-4 .mbs-item {
  padding: 20px 20px 18px;
}

popupBanner.is-grid-on.is-count-4 .mbs-item .mbs-desc {
  max-width: 100%;
  font-size: 20px;
}

/* 카드·카피 크기 : #popupBanner.is-grid-on.is-count-4 .mbs-item .mbs-desc 아래 */
#popupBanner.is-grid-on.is-count-5 .mbs-item {
  padding: 18px 18px 16px;
}

#
#popupBanner.is-grid-on.is-count-5 .mbs-item .mbs-desc {
  max-width: 100%;
  font-size: 19px;
}

#popupBanner.is-grid-on .mbs-count,
#popupBanner.is-grid-on .mbs-dots {
  display: none;
}

#popupBanner.is-grid-on .mbs-btns {
  padding: 14px 18px 12px;
}

@media (prefers-reduced-motion: reduce) {
  #popupBanner.is-grid-on .mbs-item {
    transition: none;
  }

  #popupBanner.is-grid-on .mbs-item:hover {
    transform: none;
  }
}

/* =========================================================
   261116 : PC 배너 5개 이상 - 4장씩 보이며 한 칸씩 롤링 (.is-roll-on)
   - JSP : 배너 5개 이상이면 .is-roll 부여
   - JS(popupBannerGridApply) : 1280px 이상일 때만 .is-roll-on 부여 + 앞 4장 복제(.mbs-clone)
     → 1234 → 2345 → 3451 → 4512 → 5123 → 1234 … 끊김 없이 순환
   - 1279px 이하는 기존 1장 스와이프 그대로
   ========================================================= */
#popupBanner.is-roll-on .mbs-sheet {
  width: calc(100% - 80px);
  max-width: 1240px;
}

#popupBanner.is-roll-on .mbs-scroll {
  gap: 16px;
  padding: 6px 24px 0;
  scroll-padding: 0 24px;
}

#popupBanner.is-roll-on .mbs-item {
  flex: 0 0 calc((100% - 48px) / 4); /* 4장 = 전체 폭 - 간격 3개 */
  padding: 20px 20px 18px;
}

#popupBanner.is-roll-on .mbs-item .mbs-desc {
  max-width: 100%;
  font-size: 20px;
}

#popupBanner.is-roll-on .mbs-btns {
  padding: 14px 18px 12px;
}