.pdf-book-grid {
  display: grid;
  grid-template-columns: repeat(var(--pdf-book-columns, 3), minmax(0, 1fr));
  gap: 28px;
  margin: 34px 0;
}

@media (max-width: 1199px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .main-header,
  .menu-wrapper,
  #main-menu,
  .container,
  #primary,
  .content-full-width,
  .post,
  .page,
  .wpb-content-wrapper,
  .wpb_wrapper,
  .uvc-heading,
  .uvc-main-heading,
  .uvc-sub-heading,
  .pdf-book-library,
  .pdf-book-grid,
  .pdf-book-card,
  .pdf-book-filters {
    box-sizing: border-box;
    max-width: 100vw;
    width: 100% !important;
  }

  .vc_row,
  .wpb_row,
  .wpb_column,
  .vc_column_container,
  .vc_column-inner {
    box-sizing: border-box;
    max-width: 100vw;
  }

  .vc_row,
  .wpb_row {
    left: auto !important;
    right: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .vc_column_container,
  .vc_column-inner {
    left: auto !important;
    right: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .wpb_wrapper,
  #primary {
    padding-left: clamp(16px, 4vw, 32px);
    padding-right: clamp(16px, 4vw, 32px);
  }

  .menu-wrapper,
  #main-menu,
  .main-header {
    min-width: 0 !important;
  }

  img,
  iframe,
  video,
  embed,
  object {
    max-width: 100%;
  }
}

@media (max-width: 767px) {
  h1,
  .simple-title {
    font-size: clamp(1.75rem, 8vw, 2.3rem) !important;
    line-height: 1.18 !important;
    overflow-wrap: anywhere;
  }

  h2,
  .uvc-main-heading h2,
  .uvc-main-heading {
    font-size: clamp(1.35rem, 6vw, 1.9rem) !important;
    line-height: 1.25 !important;
    letter-spacing: 0.04em !important;
    overflow-wrap: anywhere;
  }

  h3 {
    font-size: clamp(1.15rem, 5vw, 1.55rem) !important;
    line-height: 1.3 !important;
  }

  p,
  li {
    font-size: 1rem;
    line-height: 1.75;
  }

  .wpb_wrapper,
  #primary {
    padding-left: 16px;
    padding-right: 16px;
  }
}

.pdf-book-library {
  display: grid;
  gap: 34px;
}

.pdf-book-filters {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(220px, 1fr) auto auto;
  gap: 12px;
  align-items: end;
  margin: 0 0 28px;
  padding: 18px;
  border: 1px solid rgba(183, 151, 91, 0.28);
  border-radius: 4px;
  background: #fffdf8;
  box-shadow: 0 10px 28px rgba(74, 55, 28, 0.06);
}

.pdf-book-filters label {
  display: grid;
  gap: 6px;
  color: #8b6a35;
  font-size: 0.86rem;
  font-weight: 700;
}

.pdf-book-filters select,
.pdf-book-filters input {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(155, 122, 61, 0.36);
  border-radius: 2px;
  background: #fff;
  color: #332b24;
  font: inherit;
}

.pdf-book-filters button,
.pdf-book-filters a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #9b7a3d;
  border-radius: 2px;
  background: #9b7a3d;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}

.pdf-book-filters a {
  background: #fffaf1;
  color: #8b6a35;
}

.pdf-book-filters button:hover,
.pdf-book-filters button:focus {
  background: #765c2f;
  border-color: #765c2f;
}

.pdf-book-filters a:hover,
.pdf-book-filters a:focus {
  background: #f3ead8;
  color: #765c2f;
}

.pdf-book-series {
  display: grid;
  gap: 16px;
}

.pdf-book-series h2 {
  margin: 0;
  color: #2c241e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  font-weight: 500;
  line-height: 1.25;
}

.pdf-book-series .pdf-book-grid {
  margin: 0;
}

.pdf-book-card {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  padding: 28px;
  border: 1px solid rgba(183, 151, 91, 0.28);
  border-radius: 4px;
  background: #fffdf8;
  box-shadow: 0 14px 36px rgba(74, 55, 28, 0.08);
  color: #332b24;
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
}

.pdf-book-grid .pdf-book-card {
  grid-template-columns: 1fr;
  text-align: center;
}

.pdf-book-card-single {
  margin-left: auto;
  margin-right: auto;
  max-width: min(860px, 100%);
}

.pdf-book-visual {
  display: flex;
  justify-content: center;
}

.pdf-book-cover {
  display: block;
  width: min(170px, 100%);
  aspect-ratio: 3 / 4.25;
  object-fit: cover;
  border: 1px solid rgba(142, 111, 65, 0.32);
  border-radius: 2px;
  background: #f7f0e3;
  box-shadow: 0 16px 28px rgba(65, 49, 28, 0.18);
}

.pdf-book-placeholder {
  display: grid;
  place-items: center;
  width: 170px;
  aspect-ratio: 3 / 4.25;
  border: 1px solid rgba(142, 111, 65, 0.32);
  border-radius: 2px;
  background: #f7f0e3;
  color: #8b6a35;
  font-weight: 700;
  letter-spacing: 0;
}

.pdf-book-content h3 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #2c241e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.pdf-book-meta {
  margin: 0 0 14px;
  color: #8b6a35;
  font-size: 0.94rem;
}

.pdf-book-content p {
  color: #4c4036;
  line-height: 1.7;
}

.pdf-book-toc {
  margin: 18px 0;
  max-width: 100%;
  min-width: 0;
  text-align: left;
}

.pdf-book-toc summary {
  cursor: pointer;
  color: #8b6a35;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 600;
}

.pdf-book-toc pre {
  max-height: 300px;
  overflow: auto;
  white-space: pre-wrap;
  margin-top: 10px;
  padding: 16px;
  border: 1px solid rgba(183, 151, 91, 0.22);
  border-radius: 4px;
  background: #fffaf1;
  color: #463a31;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.65;
}

.pdf-book-toc-lines {
  box-sizing: border-box;
  max-height: 300px;
  max-width: 100%;
  overflow: auto;
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(183, 151, 91, 0.22);
  border-radius: 4px;
  background: #fffaf1;
  color: #463a31;
}

.pdf-book-toc-line {
  display: flex;
  gap: 6px;
  align-items: baseline;
  min-width: 0;
  padding: 2px 0;
  font-size: 0.82rem;
  line-height: 1.35;
  white-space: nowrap;
  width: 100%;
}

.pdf-book-toc-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pdf-book-toc-dots {
  flex: 1 1 auto;
  min-width: 18px;
  border-bottom: 1px dotted rgba(139, 106, 53, 0.45);
  transform: translateY(-0.25em);
}

.pdf-book-toc-page {
  flex: 0 0 auto;
  color: #8b6a35;
  font-weight: 700;
  text-align: right;
}

.pdf-book-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  max-width: 100%;
  width: 100%;
}

.pdf-book-grid .pdf-book-actions {
  justify-content: center;
}

.pdf-book-download,
.pdf-book-read-online {
  display: inline-flex;
  flex: 1 1 150px;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  max-width: 100%;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid #9b7a3d;
  border-radius: 2px;
  background: #9b7a3d;
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-align: center;
  text-transform: uppercase;
}

.pdf-book-read-online {
  background: #fffaf1;
  color: #8b6a35;
}

.pdf-book-read-online:hover,
.pdf-book-read-online:focus {
  background: #f3ead8;
  color: #765c2f;
}

.pdf-book-download:hover,
.pdf-book-download:focus {
  background: #765c2f;
  border-color: #765c2f;
  color: #fff;
}

.pdf-book-reader {
  margin: 28px 0 42px;
  border: 1px solid rgba(183, 151, 91, 0.28);
  border-radius: 4px;
  background: #fffdf8;
  box-shadow: 0 14px 36px rgba(74, 55, 28, 0.08);
  overflow: hidden;
  box-sizing: border-box;
  max-width: 100%;
}

.pdf-book-reader-heading {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(183, 151, 91, 0.2);
  background: #fffaf1;
}

.pdf-book-reader-heading h3 {
  margin: 0;
  color: #2c241e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.3;
}

.pdf-book-reader-heading a {
  color: #8b6a35;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.pdf-book-reader-heading a:hover,
.pdf-book-reader-heading a:focus {
  color: #765c2f;
  text-decoration: underline;
}

.pdf-book-ebook {
  display: grid;
  gap: 0;
  background: #f7f0e3;
}

.pdf-book-ebook-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid rgba(183, 151, 91, 0.24);
  background: #fffdf8;
}

.pdf-book-ebook-toolbar button {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #9b7a3d;
  border-radius: 2px;
  background: #9b7a3d;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.15;
  text-transform: uppercase;
}

.pdf-book-ebook-toolbar button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.pdf-book-ebook-pages {
  color: #8b6a35;
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
}

.pdf-book-ebook-stage {
  display: grid;
  justify-items: center;
  min-height: var(--pdf-book-reader-min-height, 640px);
  overflow: auto;
  padding: 18px;
  background: #f6efe2;
}

.pdf-book-ebook-stage canvas {
  display: block;
  max-width: 100%;
  height: auto;
  background: #fff;
  box-shadow: 0 10px 28px rgba(65, 49, 28, 0.16);
}

.pdf-book-ebook-status {
  margin: 12px 0 0;
  color: #8b6a35;
  text-align: center;
}

.pdf-book-series-nav {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-top: 1px solid rgba(183, 151, 91, 0.2);
  background: #fffaf1;
}

.pdf-book-series-nav-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  color: #8b6a35;
  font-size: 0.92rem;
}

.pdf-book-series-nav-heading strong {
  color: #2c241e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  font-weight: 500;
}

.pdf-book-next-part {
  display: grid;
  gap: 3px;
  padding: 14px 16px;
  border: 1px solid rgba(155, 122, 61, 0.45);
  border-radius: 4px;
  background: #fffdf8;
  color: #2c241e;
  text-decoration: none;
}

.pdf-book-next-part span {
  color: #8b6a35;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.pdf-book-next-part strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 500;
}

.pdf-book-next-part:hover,
.pdf-book-next-part:focus {
  border-color: #9b7a3d;
  color: #2c241e;
}

.pdf-book-series-parts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pdf-book-series-parts a,
.pdf-book-series-parts span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(155, 122, 61, 0.36);
  border-radius: 999px;
  color: #8b6a35;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.pdf-book-series-parts a:hover,
.pdf-book-series-parts a:focus,
.pdf-book-series-parts .is-active {
  background: #9b7a3d;
  color: #fff;
}

@media (max-width: 900px) {
  .pdf-book-filters {
    grid-template-columns: 1fr 1fr;
  }

  .pdf-book-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .pdf-book-filters {
    grid-template-columns: 1fr;
  }

  .pdf-book-grid,
  .pdf-book-card,
  .pdf-book-card-single {
    grid-template-columns: 1fr;
  }

  .pdf-book-card {
    margin-left: auto;
    margin-right: auto;
    padding: 20px;
    width: min(100%, calc(100vw - 28px)) !important;
  }

  .pdf-book-card-single {
    width: min(100%, calc(100vw - 28px)) !important;
  }

  .pdf-book-content,
  .pdf-book-toc,
  .pdf-book-toc-lines {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .pdf-book-content h3 {
    font-size: clamp(1.45rem, 8vw, 2.15rem);
    line-height: 1.16;
  }

  .pdf-book-meta {
    font-size: clamp(1rem, 5vw, 1.22rem);
    line-height: 1.55;
  }

  .pdf-book-toc-lines {
    padding: 12px 10px;
    overflow-x: hidden;
  }

  .pdf-book-toc-line {
    gap: 5px;
    font-size: 0.68rem;
  }

  .pdf-book-toc-dots {
    min-width: 10px;
  }

  .pdf-book-toc-page {
    min-width: 28px;
  }

  .pdf-book-actions,
  .pdf-book-reader-heading {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .pdf-book-download,
  .pdf-book-read-online {
    flex-basis: auto;
    width: 100%;
  }

  .pdf-book-reader {
    margin-left: auto;
    margin-right: auto;
    width: min(100%, calc(100vw - 28px));
  }

  .pdf-book-reader-heading {
    padding: 14px;
  }

  .pdf-book-reader-heading h3 {
    font-size: clamp(1.45rem, 7vw, 2rem);
    text-align: center;
  }

  .pdf-book-ebook-toolbar {
    grid-template-columns: 1fr;
  }

  .pdf-book-ebook-toolbar button,
  .pdf-book-ebook-pages {
    width: 100%;
  }

  .pdf-book-ebook-stage {
    min-height: 68vh;
    padding: 12px;
  }
}

@media (max-width: 1199px) {
  .home .vc_row,
  .home .wpb_row,
  .home .vc_row > .wpb_column,
  .home .vc_row > .vc_column_container,
  .home .wpb_row > .wpb_column,
  .home .wpb_row > .vc_column_container {
    clear: both;
    display: block !important;
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .home #primary,
  .home .wpb-content-wrapper,
  .home .wpb_wrapper,
  .home .uvc-heading,
  .home .uvc-main-heading,
  .home .uvc-sub-heading {
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center;
  }

  .home #primary .wpb_wrapper {
    box-sizing: border-box;
    max-width: 860px;
    width: 100%;
  }

  .home .vc_row,
  .home .wpb_row {
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .home .vc_col-sm-1,
  .home .vc_col-sm-2,
  .home .vc_col-sm-3,
  .home .vc_col-sm-4,
  .home .vc_col-sm-5,
  .home .vc_col-sm-6,
  .home .vc_col-sm-7,
  .home .vc_col-sm-8,
  .home .vc_col-sm-9,
  .home .vc_col-sm-10,
  .home .vc_col-sm-11,
  .home .vc_col-sm-12,
  .home .vc_column_container,
  .home .vc_column-inner {
    clear: both;
    display: block !important;
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .home img,
  .home iframe,
  .home video {
    display: block;
    height: auto;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .home h1,
  .home .simple-title {
    font-size: clamp(2.25rem, 5vw, 3.25rem) !important;
    line-height: 1.15 !important;
  }

  .home h2,
  .home .uvc-main-heading,
  .home .uvc-main-heading h2 {
    font-size: clamp(1.85rem, 4vw, 2.65rem) !important;
    line-height: 1.2 !important;
  }

  .home p,
  .home li,
  .home .uvc-sub-heading {
    font-size: clamp(1.08rem, 2vw, 1.22rem) !important;
    line-height: 1.75 !important;
  }
}

@media (max-width: 767px) {
  .home h1,
  .home .simple-title {
    font-size: clamp(2rem, 9vw, 2.65rem) !important;
  }

  .home h2,
  .home .uvc-main-heading,
  .home .uvc-main-heading h2 {
    font-size: clamp(1.55rem, 7vw, 2.15rem) !important;
  }

  .home p,
  .home li,
  .home .uvc-sub-heading {
    font-size: 1.08rem !important;
    line-height: 1.78 !important;
  }

  .home .wpb_wrapper,
  .home #primary {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }
}
