/* =============================================
   2026 UDN 讀書館 PDA 借閱網
   Event Landing Page Stylesheet
   ============================================= */

/* ---- RESET & BASE ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --purple-bg: #c8b8d8;
  --purple-light: #e6dff0;
  --purple-dark: #5a3d7a;
  --purple-mid: #7b5fa3;
  --purple-section-bar: #4a2d6e;
  --orange: #f07020;
  --orange-light: #f5a033;
  --yellow-accent: #f5d020;
  --white: #ffffff;
  --text-dark: #2a1a3e;
  --text-body: #3d2d5a;
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 30px;
  --shadow-card: 0 4px 20px rgba(74, 45, 110, 0.15);
  --max-width: 1200px;
  --nav-height: 100px;
  --transition: 0.3s ease;
  --font-main: 'Noto Sans TC', 'Microsoft JhengHei', sans-serif;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  font-family: var(--font-main);
  background: url(assets/bg-pattern.jpg);
  color: var(--text-dark);
  line-height: 1.7;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

/* =============================================
   STICKY HEADER
   ============================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1001;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 16px rgba(74, 45, 110, 0.12);
  border-bottom: 2px solid rgba(123, 95, 163, 0.15);
  transition: box-shadow var(--transition);
}

.site-header.scrolled {
  box-shadow: 0 4px 30px rgba(74, 45, 110, 0.2);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.header-logo {
  flex-shrink: 0;
}

.header-logo img {
  height: 45px;
  width: auto;
  object-fit: contain;
}

.header-nav {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}

.nav-link {
  padding: 6px 16px;
  border-radius: var(--border-radius-lg);
  font-size: 20px;
  font-weight: 500;
  color: var(--text-body);
  transition:
    background var(--transition),
    color var(--transition);
  white-space: nowrap;
}

.nav-link:hover {
  background: var(--purple-mid);
  color: var(--white);
}

.header-social {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.social-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform var(--transition),
    opacity var(--transition);
}

.social-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.social-icon:hover {
  transform: scale(1.15);
  opacity: 0.9;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  transition: background var(--transition);
  flex-shrink: 0;
}

.hamburger:hover {
  background: rgba(123, 95, 163, 0.1);
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--purple-dark);
  border-radius: 2px;
  transition:
    transform 0.3s ease,
    opacity 0.2s ease,
    width 0.3s ease;
  transform-origin: center;
}

/* Mobile nav hidden on desktop; desktop nav always visible */
.mobile-nav {
  display: none !important;
}

/* Nav backdrop overlay */
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 10, 40, 0.45);
  z-index: 999;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* =============================================
   HERO BANNER
   ============================================= */
.hero-section {
  width: 100%;
  position: relative;
  overflow: hidden;
  background: #1a0a2e;
}

.hero-bg {
  width: 100%;
  line-height: 0;
  position: relative;
  max-width: 2600px;
  margin: 0 auto;
}

.hero-bg .desktop {
  display: block;
  aspect-ratio: 320 / 123;
}

.hero-bg .mobile {
  display: none;
  aspect-ratio: 336/ 560;
}

.hero-banner {
  width: 100%;
  height: auto;
  display: block;
}

.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 42%;
  pointer-events: none;
}

.hero-gif {
  width: 100%;
  height: auto;
  display: block;
}

/* =============================================
   SHARED SECTION STYLES
   ============================================= */
.page-content-wrapper {
  max-width: 1200px;
  margin: 40px auto;
  background: var(--white);
  border-radius: 24px;
  box-shadow: 0 8px 40px rgba(74, 45, 110, 0.18);
  overflow: hidden;
  padding: 100px 0;
  display: flex;
  flex-flow: column;
  gap: 70px;
}

.content-section {
  padding: 0 57px;
}

.section-container {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Section Title Bar - Dark Purple rounded banner */
.section-title-bar {
  background: #5d4385;
  border-radius: var(--border-radius-lg);
  padding: 14px 48px;
  text-align: center;
  margin-bottom: 50px;
  box-shadow: 0 4px 20px rgba(74, 45, 110, 0.3);
}

.section-title-bar h2 {
  color: var(--white);
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 700;
  letter-spacing: 4px;
}

.wrapper {
  max-width: 900px;
  margin: 0 auto;
}

/* =============================================
   RULES SECTION
   ============================================= */
.rules-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.rules-block {
  padding: 0;
}

.rules-subtitle {
  font-size: 30px;
  font-weight: 700;
  color: var(--purple-dark);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--purple-dark);
  display: inline-block;
}

.rules-block p {
  font-size: 20px;
  color: var(--text-body);
  line-height: 1.8;
}

.notice-box {
  margin-top: 40px;
  background: #f5f5f5;
  border-radius: var(--border-radius-sm);
  padding: 24px 32px;
  max-height: 200px;
  overflow-y: auto;
}

.notice-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: 12px;
}

.notice-list {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.notice-item {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.7;
}

.notice-item.red {
  color: var(--orange);
}

/* =============================================
   PRIZES SECTION
   ============================================= */
.prize-subtitle-bar {
  margin-bottom: 36px;
}

.prize-main-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--purple-dark);
  text-decoration: underline;
  text-underline-offset: 4px;
  margin-bottom: 4px;
}

.prize-sub-note {
  font-size: 16px;
  color: var(--orange);
}

.prize-layout {
  display: flex;
  gap: 48px;
  align-items: flex-start;
  margin-bottom: 40px;
}

.prize-periods-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.prize-period-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.prize-bullet {
  color: var(--purple-dark);
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.period-label {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.period-detail {
  font-size: 20px;
  color: var(--text-body);
  margin-bottom: 2px;
}

.period-gift {
  font-size: 20px;
  color: var(--text-body);
  margin-bottom: 2px;
}

.period-note {
  font-size: 16px;
  color: #888;
}

.prize-link {
  color: var(--orange);
  font-weight: 600;
  transition: opacity var(--transition);
}

.prize-link:hover {
  opacity: 0.75;
}

.prize-image-col {
  flex-shrink: 0;
  width: 280px;
}

.prize-img {
  width: 100%;
}

.prize-addon-section {
  border-top: 2px solid var(--purple-light);
  padding-top: 32px;
  margin-bottom: 40px;
}

.addon-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: 16px;
}

/* =============================================
   BORROW SECTION
   ============================================= */
.borrow-platform {
  background: var(--white);
  border-radius: var(--border-radius-md);
  padding: 32px 36px;
  margin-bottom: 32px;
}

.platform-title-bar {
  border-radius: var(--border-radius-lg);
  padding: 12px 36px;
  text-align: center;
  display: inline-block;
  margin-bottom: 20px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 3px;
}

.platform-title-bar.purple {
  background: linear-gradient(
    135deg,
    var(--purple-section-bar) 0%,
    var(--purple-dark) 100%
  );
  color: var(--white);
}

.platform-title-bar.orange {
  background: linear-gradient(
    135deg,
    var(--orange) 0%,
    var(--orange-light) 100%
  );
  color: var(--white);
}

/* Shared filled pill — used by PC/NB and 影音課程 */
.platform-title-bar.filled-pill {
  background: #c27ed9;
  border: 3px solid var(--white);
  box-shadow: 0 0 0 3px #c27ed9;
  color: var(--white);
  display: block;
  width: fit-content;
  margin: 0 auto 40px;
  font-size: 30px;
  padding: 8px 48px;
  min-width: 400px;
}

/* Step row for 影音課程 sub-steps */
.borrow-step-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px auto 40px;
  justify-content: center;
}

.borrow-step-text {
  font-size: 18px;
  color: var(--text-body);
  line-height: 1.7;
}

/* Library Search Card */
.lib-search-card {
  padding: 32px 40px;
  margin: 16px 0 24px;
  position: relative;
  z-index: 10;
}

.lib-search-inner {
  display: flex;
  gap: 40px;
  align-items: center;
  justify-content: center;
}

.lib-search-left {
  position: relative;
}

.lib-search-heading {
  font-size: 46px;
  font-weight: 700;
  color: var(--purple-mid);
  margin-bottom: 20px;
}

.lib-search-form-wrap {
  width: 100%;
  max-width: 400px;
}

.lib-search-input-row {
  display: flex;
  border: 1.5px solid #c0b0d8;
  border-radius: 50px;
  overflow: visible;
  background: var(--white);
}

.lib-search-input {
  flex: 1;
  padding: 14px 20px;
  border: none;
  outline: none;
  font-size: 16px;
  font-family: var(--font-main);
  background: transparent;
  color: var(--text-body);
  border-radius: 50px 0 0 50px;
}

.lib-search-btn {
  background: var(--purple-mid);
  color: var(--white);
  border: none;
  padding: 0 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 50px 50px 0;
  transition: background var(--transition);
  flex-shrink: 0;
}

.lib-search-btn:hover {
  background: var(--purple-dark);
}

.lib-map-col {
  width: 320px;
  flex-shrink: 0;
}

.lib-map-img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(74, 45, 110, 0.2));
}

/* Dropdown */
.lib-search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--white);
  border: 1px solid #ddd;
  border-radius: var(--border-radius-sm);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  z-index: 200;
  max-height: 240px;
  overflow-y: auto;
  display: none;
}

.lib-search-loading,
.lib-search-empty {
  padding: 16px;
  text-align: center;
  color: var(--text-body);
  font-size: 14px;
  display: none;
}

.lib-search-empty.warning {
  color: var(--orange);
  background: #fff5ee;
  border-radius: var(--border-radius-sm);
  font-weight: 500;
}

.lib-search-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: none;
  position: relative;
  z-index: 10;
}

.lib-search-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background var(--transition);
}

.lib-search-item:hover {
  background: var(--purple-light);
}

.lib-search-item:last-child {
  border-bottom: none;
}

.lib-search-item-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
}

.lib-search-item-info {
  font-size: 13px;
  color: var(--text-body);
  margin-top: 2px;
}

.borrow-method-heading {
  font-size: 30px;
  font-weight: 700;
  color: var(--purple-dark);
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 4px;
  margin-bottom: 30px;
}

.borrow-intro-text {
  font-size: 20px;
  color: var(--text-body);
  text-align: center;
  margin-bottom: 32px;
}

/* ---- Step Swiper (Swiper.js) ---- */
.pc-step-swiper-wrap {
  position: relative;
}

.pc-step-swiper {
  width: 100%;
}

.pc-swiper-btn-prev,
.pc-swiper-btn-next {
  position: absolute;
  top: 50%; /* default fallback; JS will override with exact image-center value */
  transform: translateY(-50%);
  margin-top: 0;
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  --swiper-navigation-color: #ffffff;
  --swiper-navigation-size: 18px;
  cursor: pointer;
}

.pc-swiper-btn-prev {
  left: 10px;
}

.pc-swiper-btn-next {
  right: 10px;
}

.pc-step-swiper .swiper-slide {
  text-align: center;
}

.step-slide-label {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.step-slide-desc {
  font-size: 20px;
  color: var(--text-body);

  line-height: 1.7;
  max-width: 880px;
  margin: 0 auto 30px;
}

.step-slide-img {
  border-radius: var(--border-radius-md);
  overflow: hidden;
  max-width: 700px;
  margin: 0 auto;
}

.step-slide-img img {
  width: 100%;
  height: auto;
}

/* Override Swiper nav buttons */
.pc-swiper-btn-prev:hover,
.pc-swiper-btn-next:hover {
  background: rgba(0, 0, 0, 0.35);
}

.swiper-button-prev svg {
  width: 24px;
  height: 24px;
  color: var(--purple-dark);
}

.swiper-button-next svg {
  width: 24px;
  height: 24px;
  color: var(--purple-dark);
}

/* ---- Mobile Step Swiper ---- */
.mobile-step-swiper-wrap {
  position: relative;
}

.mobile-step-swiper {
  width: 100%;
  margin-top: 24px;
}

.mob-swiper-btn-prev,
.mob-swiper-btn-next {
  position: absolute;
  top: 50%; /* fallback; JS will override with exact image-center value */
  transform: translateY(-50%);
  margin-top: 0;
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  --swiper-navigation-color: #ffffff;
  --swiper-navigation-size: 18px;
  cursor: pointer;
}

.mob-swiper-btn-prev {
  left: 10px;
}

.mob-swiper-btn-next {
  right: 10px;
}

.mob-swiper-btn-prev:hover,
.mob-swiper-btn-next:hover {
  background: rgba(0, 0, 0, 0.35);
}

.mobile-step-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  height: 100%;
}

.mobile-step-card img {
  aspect-ratio: 273 / 706;
}

.mobile-step-desc {
  font-size: 16px;
  color: var(--text-body);
  line-height: 1.65;
}

.mobile-phone-img-wrap {
  width: 100%;
  max-width: 260px;
  margin-top: auto;
}

.mobile-phone-img {
  width: 100%;
  height: auto;
  display: block;
}

.step-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--purple-mid);
  color: var(--white);
  font-size: 20px;
  font-weight: 700;
}

/* ---- Book Grid Hint ---- */
.book-grid-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  margin: 16px 0 24px;
  border: 2px dashed var(--purple-mid);
  border-radius: var(--border-radius-md);
  background: var(--purple-light);
  color: var(--purple-dark);
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  line-height: 1.6;
}

.book-grid-hint.hidden {
  display: none;
}

/* ---- Book Grid (4-col) ---- */
.book-grid {
  display: none;
}

.book-grid.visible {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px 20px;
  margin: 16px 0 24px;
}

.book-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.book-card-img {
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: var(--border-radius-sm);
  background: #eee;
}

.book-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
  display: block;
}

.book-card:hover .book-card-img img {
  transform: scale(1.04);
}

.book-step-3 {
  margin-bottom: 24px;
  margin-inline: auto;
  max-width: 100%;
}

.book-card-title {
  font-size: 18px;
  color: var(--text-body);
  text-align: center;
  line-height: 1.5;
}

/* ---- App Download ---- */
.app-note {
  font-size: 20px;
  color: var(--purple-mid);
  font-weight: 500;
  margin-bottom: 16px;
  text-align: center;
}

.app-note span {
  color: var(--orange);
}

.app-download-row {
  margin: 40px auto;
  max-width: 900px;
}

.app-download-img {
  width: 1200px;
  margin: 0 auto;
}

/* ---- Mobile Steps ---- */
.mobile-steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 16px;
}

.mobile-step-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.mobile-step-col p {
  font-size: 13px;
  color: var(--text-body);
  line-height: 1.6;
}

.mobile-phone-img-wrap {
  width: 100%;
  max-width: 140px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border: 2px solid var(--purple-light);
}

.mobile-phone-img {
  width: 100%;
  height: auto;
}

/* =============================================
   WINNERS SECTION
   ============================================= */
.winners-intro {
  margin-bottom: 32px;
}

.winners-rules-list {
  padding: 24px 28px;
  margin-bottom: 30px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.winners-rules-list li {
  font-size: 18px;
  color: var(--text-body);
  line-height: 1.7;
  padding-left: 8px;
}

.winners-note-box {
  text-align: center;
  color: var(--purple-section-bar);
  padding: 20px 28px;
  margin-top: 12px;
  font-size: 30px;
  font-weight: 400;
}

.winners-note-title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.winners-note-sub {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prize-name {
  color: var(--orange);
  font-weight: 600;
}

.winners-table-wrap {
  overflow-x: auto;
}

.winners-table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  font-size: 20px;
  table-layout: fixed;
}

.winners-table col.col-period {
  width: 15%;
}
.winners-table col.col-prize {
  width: 26%;
}
.winners-table col.col-winners {
  width: 39%;
}
.winners-table col.col-form {
  width: 20%;
}

.winners-table thead th {
  background: var(--purple-mid);
  color: var(--white);
  padding: 16px 12px;
  text-align: center;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 1px;
}

.winners-table tbody tr:nth-child(odd) td {
  background: rgba(169, 169, 169, 0.1);
}

.winners-table tbody tr:nth-child(even) td {
  background: rgba(114, 59, 129, 0.1);
}

.winners-table tbody td {
  padding: 20px 16px;
  color: var(--text-body);
  vertical-align: middle;
  text-align: center;
  line-height: 1.7;
}

.winners-table tbody td:first-child {
  color: black;
}

.winners-table tbody tr:hover td {
  filter: brightness(0.97);
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  color: black;
  padding: 32px 16px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-logos {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-logo {
  height: 36px;
  width: auto;
  object-fit: contain;
  transition: opacity var(--transition);
}

.footer-logo:hover {
  opacity: 1;
}

.footer-organizer-label {
  font-size: 20px;
  color: black;
  border-left: 1px solid black;
  border-right: 1px solid black;
  padding: 0 12px;
  letter-spacing: 0.05em;
}

.footer-copy {
  font-size: 16px;
  text-align: center;
  opacity: 0.7;
}

/* =============================================
   GO TO TOP
   ============================================= */
.go-top {
  position: fixed;
  bottom: 32px;
  right: 24px;
  z-index: 999;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--purple-mid);
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(74, 45, 110, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease, background 0.2s ease;
}

.go-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.go-top:hover {
  background: var(--purple-dark);
}

/* =============================================
   RESPONSIVE - Tablet
   ============================================= */
@media (max-width: 1024px) {
  .mobile-steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =============================================
   RESPONSIVE - Mobile
   ============================================= */
@media (max-width: 768px) {
  :root {
    --nav-height: 56px;
  }

  html {
    scroll-padding-top: 56px;
  }

  /* Mobile overrides for pc-step-swiper arrows */
  .pc-step-swiper-wrap {
    padding: 0;
  }
  .pc-step-swiper-wrap svg {
    color: var(--text-body);
  }

  .pc-swiper-btn-prev {
    left: 0;
  }

  .pc-swiper-btn-next {
    right: 0;
  }

  .mobile-step-swiper-wrap {
    padding: 0 44px;
  }

  .mob-swiper-btn-prev {
    left: 0;
  }

  .mob-swiper-btn-next {
    right: 0;
  }

  .hero-bg .desktop {
    display: none;
  }
  .hero-bg .mobile {
    display: block;
  }

  .hero-content {
    width: 85%;
    transform: translateX(-10%) translateY(-45%);
  }

  .header-inner {
    padding: 0 12px;
    position: relative;
    z-index: 1001;
  }

  .lib-search-heading {
    font-size: 30px;
    text-align: center;
  }

  /* Hide desktop nav, show mobile nav */
  .desktop-nav {
    display: none !important;
  }
  .mobile-nav {
    display: flex !important;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 8px 16px 24px;
    gap: 2px;
    box-shadow: 0 12px 32px rgba(74, 45, 110, 0.18);
    border-bottom: 2px solid var(--purple-light);
    z-index: 1000;
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition:
      transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
      opacity 0.3s ease;
  }

  .mobile-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-header {
    position: sticky;
  }

  .page-content-wrapper {
    padding: 20px 0;
    max-width: 90%;
    gap: 20px;
  }

  .hamburger {
    display: flex;
  }

  .header-left {
    flex: 1;
    gap: 8px;
  }
  .prize-main-title,
  .prize-sub-note {
    text-align: center;
  }
  .header-logo img {
    height: 30px;
  }

  .social-icon {
    width: 30px;
    height: 30px;
  }

  .nav-link {
    padding: 12px 16px;
    font-size: 16px;
    border-radius: 10px;
    border-bottom: 1px solid rgba(123, 95, 163, 0.08);
  }

  .nav-link:last-child {
    border-bottom: none;
  }

  .nav-backdrop.visible {
    display: block;
    opacity: 1;
  }

  .book-card-title {
    font-size: 16px;
  }

  .content-section {
    padding: 20px;
  }

  .rules-grid {
    grid-template-columns: 1fr;
    padding: 0 10px;
  }

  .borrow-platform {
    padding: 24px 0;
    margin-bottom: 16px;
  }

  .lib-search-left {
    order: 2;
  }
  .lib-map-col {
    order: 1;
    max-width: 150px;
  }

  .borrow-method-heading,
  .rules-subtitle {
    font-size: 20px;
    margin-bottom: 20px;
  }

  .mobile-step-swiper-wrap {
    --swiper-navigation-sides-offset: -10px;
  }
  .mobile-step-swiper-wrap svg {
    color: var(--text-body);
  }

  .app-note,
  .borrow-step-text,
  .step-slide-desc,
  .borrow-intro-text,
  .period-gift,
  .period-detail,
  .prize-main-title,
  .rules-block p {
    font-size: 16px;
  }

  .wrapper {
    padding: 0 10px;
  }

  .period-note {
    font-size: 14px;
  }

  .borrow-step-row {
    flex-flow: column nowrap;
    gap: 10px;
    margin-bottom: 16px;
  }

  .book-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 10px;
    margin-bottom: 40px;
  }

  .mobile-steps-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .section-title-bar {
    padding: 12px 24px;
    margin-bottom: 15px;
  }

  .winners-table {
    font-size: 15px;
  }

  #section-prizes .wrapper {
    display: flex;
    flex-flow: column nowrap;
  }
  .prize-subtitle-bar {
    order: 1;
  }
  .prize-layout {
    display: contents;
  }
  .prize-image-col {
    margin: auto;
    order: 4;
  }

  .notice-box {
    order: 5;
  }

  .prize-periods-col {
    order: 2;
    padding-bottom: 20px;
  }

  .prize-addon-section {
    padding-top: 20px;
    order: 3;
  }

  .prize-bullet {
    font-size: 16px;
  }

  .platform-title-bar.filled-pill {
    font-size: 22px;
    min-width: 200px;
    margin-bottom: 20px;
  }

  .winners-table thead th,
  .winners-table tbody td {
    padding: 10px 12px;
  }
  .swiper {
    overflow: auto;
  }
  .lib-search-inner {
    flex-flow: column;
  }

  .step-slide-label {
    font-size: 24px;
    margin-bottom: 0;
  }
  .winners-note-box {
    font-size: 16px;
    padding-inline: 0;
    padding-bottom: 0;
  }
}

@media (max-width: 480px) {
  .mobile-steps-grid {
    grid-template-columns: 1fr;
  }

  .modal-box {
    border-radius: var(--border-radius-sm);
    max-height: 92vh;
  }
  .footer-logos {
    gap: 10px;
  }

  .footer-copy {
    font-size: 14px;
  }
}

/* =============================================
   SCROLL ANIMATIONS
   ============================================= */
.fade-in-up {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Scrollbar styling */
