@charset "UTF-8";

/* 长方形裁剪 */
.rectangle-img-wrapper {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

/* 正方形裁剪 */
.square-img-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 5%;          /* ✅ 现在是「宽度」的 5%，不是高度 */
  overflow: hidden;
}

.wrapper-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.top-radius {
  border-top-left-radius: var(--bs-card-inner-border-radius); 
  border-top-right-radius: var(--bs-card-inner-border-radius);
}

.bottom-radius {
  border-bottom-left-radius: var(--bs-card-inner-border-radius); 
  border-bottom-right-radius: var(--bs-card-inner-border-radius);
}


/* badge 弹跳动画 */
@keyframes badgePop {
    0%   { transform: translate(-50%, -50%) scale(1); }
    30%  { transform: translate(-50%, -50%) scale(1.5); }
    50%  { transform: translate(-50%, -50%) scale(0.9); }
    70%  { transform: translate(-50%, -50%) scale(1.2); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

.badge-pop {
    animation: badgePop 0.5s ease-out;
}

/* 数字翻滚效果（可选） */
@keyframes badgeFlash {
    0%   { background-color: #198754; }  /* Bootstrap success 绿 */
    100% { background-color: #212529; }  /* bg-dark 恢复原色 */
}
.badge-flash {
    animation: badgeFlash 0.6s ease-out, badgePop 0.5s ease-out;
}


/*  ✅ 课件标题样式：跟随 Plyr 控制栏显隐  */
.curriculum-title-overlay {
    position: absolute;
    left: 15px;
    bottom: 45px; /* 进度条上方 */
    z-index: 10;
    color: #fff;
    font-size: 16px;
    padding: 6px 12px;
    border-radius: 4px;
    pointer-events: none;
    max-width: 70%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: rgb(255, 128, 192, 0.2);

    /* ✅ 默认隐藏 */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* 
 * ✅ 关键：Plyr 初始化后会在 video 外层包裹一个 div.plyr
 * plyr--hide-controls 是加在这个 plyr 容器上的
 * 当控制栏显示时，该类被移除，标题同步显示
 */
.video-player .plyr:not(.plyr--hide-controls) .curriculum-title-overlay,
.plyr:not(.plyr--hide-controls) .curriculum-title-overlay {
    opacity: 1;
    visibility: visible;
}

/* ✅ 暂停时始终显示标题 */
.video-player .plyr.plyr--paused .curriculum-title-overlay,
.plyr.plyr--paused .curriculum-title-overlay {
    opacity: 1;
    visibility: visible;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.dropdown-menu.dropdown-animation-top120.show {
  -webkit-animation-duration: 0.3s;
          animation-duration: 0.3s;
  -webkit-animation-fill-mode: both;
          animation-fill-mode: both;
  -webkit-animation-name: dropdownslideIn;
          animation-name: dropdownslideIn;
  position: absolute !important;
  top: 125% !important;
}

.cursor-pointer {
    cursor: pointer;
}

.hr-sm {
  margin: 0.5rem 0;
}

.hr-lg {
  margin: 2rem 0;
}

/* 手机默认 */
.slide-banner {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.slide-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.slide-text-white {
  color: #fff;
  font-size: 1rem;
}

/* 平板 */
@media (min-width: 768px) {
  .slide-banner {
    aspect-ratio: 23 / 5;
  }
  .slide-text-white {
    font-size: 1.25rem;
  }
}

/* 电脑宽屏 */
@media (min-width: 1200px) {
  .slide-banner {
    aspect-ratio: 23 / 3;
  }
  .slide-text-white {
    font-size: 1.5rem;
  }
}

/* 覆蓋 Turn.js 產生的頁面元素 */
#turnjs-book .page,
#turnjs-book .hard,
#turnjs-book .sheet {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

@media print {
    body { display: none !important; }
}

/* 社群 icon 容器 */
.btn-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin:  0 5px;
  padding: 0px;
  border-radius: 3px;
  transition: all 0.2s ease;
}

/* icon 圖片統一大小 */
.btn-social img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

/* Facebook hover */
.btn-social.btn-facebook:hover {
  background-color: #1877f2;
}

/* LINE hover */
.btn-social.btn-line:hover {
  background-color: #06c755;
}

/* 可選：hover 時圖片變白 */
.btn-social:hover img {
  filter: brightness(0) invert(1);
}
