﻿@charset "UTF-8";
/* -------------------------------------------------------------
  Sass CSS3 Mixins! The Cross-Browser CSS3 Sass Library
  By: Matthieu Aussaguel, http://www.mynameismatthieu.com, @matthieu_tweets

  List of CSS3 Sass Mixins File to be @imported and @included as you need

  The purpose of this library is to facilitate the use of CSS3 on different browsers avoiding HARD TO READ and NEVER
  ENDING css files

  note: All CSS3 Properties are being supported by Safari 5
  more info: http://www.findmebyip.com/litmus/#css3-properties

------------------------------------------------------------- */
body {
  background-image: none;
}

.ebook-kv {
  position: relative;
  background-color: var(--color-primary);
}
.ebook-kv:before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-image: url(../images/ebook/kv-bg.svg);
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
/* 圖片框架：從 left:320px 開始，高度排除底部裝飾條 */
.ebook-kv .kv-image-frame {
  position: absolute;
  top: 0;
  left: 320px;
  right: 0;
  height: calc(100% - 92px);
  overflow: hidden;
  z-index: 0;
}
.ebook-kv .kv-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}
/* 色塊遮罩：初始在圖片上方之外，動畫時滑入/滑出 */
.ebook-kv .kv-wipe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-primary);
  transform: translateY(-100%);
  z-index: 1;
}
.ebook-kv .kv-controls {
  position: absolute;
  top: 68%;
  left: 64px;
  z-index: 5;
}
.ebook-kv .kv-controls .btn {
  background-color: #09090B;
  color: #fff;
  border-color: #09090B;
  box-shadow: 0 3px 2px -2px rgba(9, 9, 11, 0.12), 0 4px 3px -2px rgba(9, 9, 11, 0.14);
}
.ebook-kv .kv-controls .kv-counter {
  font-size: 0.75rem;
  font-weight: 600;
}
.ebook-kv .kv-controls .kv-current {
  font-size: 1rem;
  font-weight: 400;
  margin-right: 4px;
}
/* kv-slider 容器 */
.ebook-kv .kv-slider {
  position: relative;
  height: 70dvh;
  min-height: 560px;
}

/* 底部裝飾 */
.ebook-kv .kv-slider:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 92px;
  width: 100%;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0) 50%),
    var(--color-primary);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  z-index: 2;
  pointer-events: none;
}

/* 右側毛玻璃裝飾 */
.ebook-kv .kv-slider:before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 20%;
  height: 100%;
  clip-path: polygon(100% 0%, 100% 0%, 100% 100%, 0% 100%);
  background-color: rgba(249, 115, 22, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2;
  pointer-events: none;
}
.ebook-kv .content {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  padding-left: 64px;
  padding-right: 170px;
  z-index: 3;
  padding-bottom: 80px;
}
.ebook-kv .content:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* 核心 1：用 clip-path 切出左上到右下的斜角 (四個點的座標) */
  clip-path: polygon(0 0, 100% 0%, 63% 100%, 0% 100%);
  background-image: url(../images/ebook/kv-bg.svg);
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
.ebook-kv .title {
  font-size: 3rem;
  line-height: 1.55;
  font-weight: 600;
  color: #431407;
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.ebook-search {
  position: relative;
  z-index: 3;
  margin-top: -34px;
}
.ebook-search .ebook-container {
  width: calc(100% - 24px * 2);
  max-width: 720px;
  margin: 0 auto;
}
.ebook-search .ebook-search-box {
  width: 100%;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 0 2px rgba(26, 28, 26, 0.12), 0 4px 8px rgba(26, 28, 26, 0.14);
  background-color: var(--color-base-100);
}
.ebook-search .ebook-search-inner {
  margin: 0 -13px;
}
.ebook-search .input {
  margin: 0 13px;
  width: calc(100% / 2 - 13px * 2);
}
.ebook-search .input .icon-calendar {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 14px;
  height: 14px;
  background-image: url(../images/ebook/icon-calendar.svg);
  /* 自訂圖示只負責顯示，不擋點擊，否則桌面版點日曆開不出原生 picker */
  pointer-events: none;
  z-index: 1;
}
/* 桌面版 Chrome/Safari：把原生日曆熱區鋪滿輸入框（透明），點欄位就能彈日曆 */
.ebook-search input[type="date"] {
  position: relative;
  cursor: pointer;
}
.ebook-search input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: auto;
  height: auto;
  inset-inline-end: 0;
  cursor: pointer;
  z-index: 2;
}
[data-mode="dark"] .ebook-search .icon-calendar {
  background-image: url(../images/ebook/icon-calendar_white.svg);
  opacity: .4;
}

.ebook-main {
  padding-top: 110px;
  padding-bottom: 58px;
}
.ebook-main .ebook-container {
  max-width: 1180px;
  padding: 0 24px;
  margin: 0 auto;
}
.ebook-main .ebook-list {
  margin: -20px;
}
.ebook-main .ebook-list .item {
  width: calc(100% / 4 - 20px * 2);
  margin: 20px;
  display: block;
}
.ebook-main .ebook-list .image {
  position: relative;
  padding: 24px;
  margin-bottom: 8px;
}
.ebook-main .ebook-list .image .inner {
  width: 100%;
  max-width: 157px;
  margin: 0 auto;
  position: relative;
  box-shadow: 0 0 2px rgba(26, 28, 26, 0.12), 0 8px 16px rgba(26, 28, 26, 0.14);
  overflow: hidden;
  border: 1px solid rgba(26, 28, 26, 0.2);
}
.ebook-main .ebook-list .image .inner:before {
  content: "";
  padding-top: 150.318471338%;
  display: block;
}
.ebook-main .ebook-list .image .inner img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ebook-main .ebook-list .view {
  position: absolute;
  right: 8px;
  bottom: 12px;
  border-radius: 8px;
  padding: 3px 10px;
  height: 20px;
  background-image: url(../images/ebook/bg-noise.png);
  font-size: var(--text-sm);
  line-height: 1;
  box-shadow: 0 0 2px rgba(26, 28, 26, 0.12), 0 4px 8px rgba(26, 28, 26, 0.14);
  color: var(--color-base-content);
}
.ebook-main .ebook-list .view .icon-visibility {
  margin-right: 8px;
  width: 12px;
  height: 12px;
  background-repeat: no-repeat;
  background-image: url(../images/ebook/icon-visibility.svg);
}
.ebook-main .ebook-list .date {
  font-size: 1em;
  line-height: 1.75;
  color: var(--color-base-content);
  opacity: .6;
}
.ebook-main .ebook-list .main-text {
  font-size: 1.5em;
  line-height: 1.3333;
  font-weight: 700;
  color: var(--color-base-content);
}
.ebook-main .page-btn {
  margin-top: 40px;
}
[data-mode="dark"] .ebook-main .view .icon-visibility {
  background-image: url(../images/ebook/icon-visibility_white.svg);
}

@media (max-width: 1280px) and (min-width: 1025px) {
  .ebook-kv .kv-controls {
    left: 5vw;
  }
  .ebook-kv .kv-slider {
    padding-bottom: 7.1875vw;
  }
  .ebook-kv .kv-slider:after {
    height: 7.1875vw;
  }
  .ebook-kv .kv-image-frame {
    left: 25vw;
    height: calc(100% - 7.1875vw);
  }
  .ebook-kv .content {
    padding-left: 5vw;
    padding-right: 13.28125vw;
    padding-bottom: 6.25vw;
  }
  .ebook-kv .title {
    font-size: 3.75vw;
  }
}
@media (max-width: 1024px) and (min-width: 768px) {
  .ebook-kv .kv-slider:before {
    width: 20%;
    height: 100%;
    clip-path: polygon(100% 50%, 100% 0%, 100% 100%, 50% 100%);
  }
  .ebook-kv .kv-image-frame {
    left: 238px;
  }
  .ebook-kv .content {
    padding-left: 24px;
    padding-right: 14.281vw;
    padding-bottom: 6.25vw;
  }
  .ebook-kv .kv-controls {
    left: 24px;
  }
  .ebook-kv .title {
    font-size: 2.25rem;
  }

  .ebook-main .ebook-list {
    margin: -20px -12px;
  }
  .ebook-main .ebook-list .item {
    width: calc(100% / 3 - 12px * 2);
    margin: 20px 12px;
  }
}
@media (max-width: 767px) {
  .ebook-kv .kv-controls {
    top: calc(100% - 97px - 40px);
    left: 24px;
  }
  .ebook-kv .kv-slider {
    padding-bottom: 252px;
  }
  .ebook-kv .kv-slider:before {
    width: 60%;
    height: 20%;
    clip-path: polygon(10% 0, 100% 20%, 100% 0);
  }
  .ebook-kv .kv-slider:after {
    height: 252px;
  }
  /* mobile: 圖片回到全寬，高度排除底部標題區 */
  .ebook-kv .kv-image-frame {
    left: 0;
    height: calc(100% - 252px);
  }
  .ebook-kv .content {
    top: inherit;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    min-height: 314px;
    padding-left: 24px;
    padding-right: 24px;
    padding-bottom: 152px;
    padding-top: 70px;
    display: block;
  }
  .ebook-kv .content:before {
    clip-path: polygon(0 0, 100% 15%, 100% 100%, 0% 100%);
    background-image: url(../images/ebook/kv-bg_s.svg);
  }
  .ebook-kv .title {
    font-size: 1.875rem;
  }

  .ebook-search .ebook-container {
    max-width: 376px;
  }
  .ebook-search .ebook-search-inner {
    margin: 0;
  }
  .ebook-search .input {
    margin: 0;
    width: 100%;
  }
  .ebook-search .input + .input {
    margin-top: 25px;
  }

  .ebook-main {
    padding-top: 45px;
  }
  .ebook-main .ebook-list {
    margin: -20px -12px;
  }
  .ebook-main .ebook-list .item {
    width: calc(100% / 2 - 12px * 2);
    margin: 20px 12px;
  }
}
