.page {
  background: var(--off-white);
}

.hero {
  position: relative;
  min-height: 320px;
  padding-top: 84px;
  overflow: hidden;
  background: var(--navy);
}

.heroBg {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, #091526 0%, #112040 42%, #1a3558 100%);
}

.heroPattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 12% 20%, rgba(201, 146, 58, 0.08) 0, transparent 22%),
    radial-gradient(circle at 82% 18%, rgba(201, 146, 58, 0.08) 0, transparent 24%),
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: auto, auto, 48px 48px, 48px 48px;
}

.heroGlow {
  position: absolute;
  right: 6%;
  top: 50%;
  width: 480px;
  height: 480px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 146, 58, 0.12) 0%, transparent 72%);
}

.heroContainer {
  position: relative;
  z-index: 1;
}

.heroInner {
  padding: 3.4rem 0 4.8rem;
}

.breadcrumb {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85rem;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
}

.current {
  color: var(--gold-light);
}

.heroTitle {
  margin: 0;
  max-width: 720px;
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.08;
  color: var(--white);
}

.heroSubtitle {
  max-width: 720px;
  margin: 1rem 0 0;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.8;
  font-size: 1rem;
}

.heroWave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
}

.heroWave svg {
  display: block;
  width: 100%;
}

.viewerSection {
  padding: 2rem 0 0;
}

.viewerWrap {
  display: none;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(180deg, #0a1628 0%, #101f37 100%);
  box-shadow: 0 28px 60px rgba(10, 22, 40, 0.24);
}

.viewerWrapOpen {
  display: block;
}

.viewerTopbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.viewerTopbarContent {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  max-width: calc(100% - 120px);
}

.nowReadingBadge {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  min-height: 28px;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: var(--gold);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.viewerTopTitle {
  margin-top: 0.8rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.96rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.viewerCloseButton {
  min-height: 42px;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.iframeStage {
  width: 100%;
  height: 680px;
  background: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pdfIframe {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
}

.pdfStatus {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(10, 22, 40, 0.6);
  font-weight: 600;
  padding: 2rem;
}

.viewerInfo {
  display: flex;
  justify-content: space-between;
  gap: 1.4rem;
  align-items: flex-start;
  padding: 1.5rem 1.6rem;
}

.viewerInfoMain {
  min-width: 0;
}

.viewerInfoMain h2 {
  margin: 0;
  color: var(--white);
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
}

.viewerMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 0.8rem;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.84rem;
}

.viewerMeta span {
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.viewerDescription {
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.8;
  white-space: pre-wrap;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.viewerDescriptionExpanded {
  display: block;
}

.descriptionToggle {
  margin-top: 0.6rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--gold-light);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}

.viewerActions {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  align-items: flex-end;
}

.downloadButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.9rem 1.2rem;
  border-radius: 14px;
  background: var(--gold);
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}

.moreStrip {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.2rem 1.4rem 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
}

.moreLabel {
  min-width: 142px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding-top: 0.5rem;
}

.moreItems {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  width: 100%;
}

.moreItem {
  display: flex;
  gap: 0.8rem;
  min-width: 280px;
  padding: 0.8rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  text-align: left;
  cursor: pointer;
}

.moreThumb {
  width: 58px;
  height: 76px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.moreTitle {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.4;
}

.moreMeta {
  margin-top: 0.35rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
}

.listSection {
  padding: 2rem 0 5rem;
}

.sectionHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.8rem;
}

.sectionText {
  margin: 0;
  color: var(--muted);
}

.viewToggle {
  display: flex;
  gap: 0.4rem;
}

.viewButton {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1.5px solid rgba(10, 22, 40, 0.12);
  background: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all var(--transition);
}

.viewButtonActive {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}

.gridList {
  grid-template-columns: 1fr;
}

.card {
  padding: 0;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(10, 22, 40, 0.08);
  background: rgba(255, 255, 255, 0.94);
  text-align: left;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  box-shadow: 0 14px 34px rgba(10, 22, 40, 0.06);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 42px rgba(10, 22, 40, 0.12);
  border-color: rgba(201, 146, 58, 0.28);
}

.cardActive {
  border-color: rgba(201, 146, 58, 0.45);
  box-shadow: 0 0 0 3px rgba(201, 146, 58, 0.16), 0 20px 42px rgba(10, 22, 40, 0.12);
}

.cardThumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #112040, #1f4c78);
}

.pdfThumbDesign {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #f8f6f2, #ebe4d6);
  color: #bd2f2f;
}

.pdfThumbDesignCompact {
  border-radius: inherit;
}

.pdfThumbFold {
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 16px 16px 0;
  border-color: transparent rgba(201, 146, 58, 0.45) transparent transparent;
}

.pdfThumbLines {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 46%;
}

.pdfThumbLines span {
  height: 4px;
  border-radius: 999px;
  background: rgba(10, 22, 40, 0.12);
}

.pdfThumbLines span:nth-child(2) {
  width: 82%;
}

.pdfThumbLines span:nth-child(3) {
  width: 92%;
}

.pdfThumbLines span:nth-child(4) {
  width: 68%;
}

.pdfThumbDesign strong {
  margin-top: 0.6rem;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pagesBadge {
  position: absolute;
  padding: 0.35rem 0.6rem;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  right: 0.8rem;
  bottom: 0.8rem;
  background: rgba(0, 0, 0, 0.82);
  color: var(--white);
}

.cardBody {
  padding: 1.3rem;
}

.gridList .card {
  display: grid;
  grid-template-columns: 300px 1fr;
}

.gridList .cardThumb {
  aspect-ratio: auto;
  min-height: 220px;
  height: 100%;
}

.gridList .cardBody {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.gridList .cardBody p {
  -webkit-line-clamp: 4;
}

.cardMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.76rem;
}

.cardBody h3 {
  margin: 0.75rem 0 0;
  color: var(--navy);
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  line-height: 1.35;
}

.cardBody p {
  margin: 0.7rem 0 0;
  color: #5f6f84;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.emptyState {
  padding: 3rem 1.5rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(10, 22, 40, 0.08);
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1100px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .viewerInfo,
  .moreStrip {
    flex-direction: column;
  }

  .viewerActions {
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .iframeStage {
    height: 480px;
  }
}

@media (max-width: 900px) {
  .sectionHead {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .heroInner {
    padding: 3rem 0 4.5rem;
  }

  .viewerTopbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .viewerTopbarContent {
    max-width: 100%;
    width: 100%;
  }

  .viewerCloseButton,
  .downloadButton {
    width: 100%;
  }

  .iframeStage {
    height: 480px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .gridList .card {
    grid-template-columns: 1fr;
  }

  .gridList .cardThumb {
    min-height: 200px;
  }
}
