:root {
  --ufs-library-ink: #241d18;
  --ufs-library-soft-ink: #5f5147;
  --ufs-library-brown: #5d3b24;
  --ufs-library-copper: #b96737;
  --ufs-library-orange: #df5a28;
  --ufs-library-paper: #f3ede3;
  --ufs-library-paper-deep: #e7d9c7;
  --ufs-library-charcoal: #1b1c1c;
  --ufs-library-serif: "EB Garamond Local", Georgia, "Times New Roman", serif;
  --ufs-library-sans: "Roboto Flex", "Segoe UI", Arial, sans-serif;
}

.ufs-study-library-page #main-content,
.ufs-study-library-page .et-l--body,
.ufs-study-library-page .et-l--body > .et_builder_inner_content,
.ufs-study-library-page #left-area,
.ufs-study-category-page #main-content,
.ufs-study-category-page .et-l--body,
.ufs-study-category-page .et-l--body > .et_builder_inner_content,
.ufs-study-category-page #left-area {
  overflow: visible;
}

.ufs-study-library-page #main-content .container,
.ufs-study-category-page #main-content .container {
  width: 100%;
  max-width: none;
  padding: 0;
}

.ufs-study-library-page #main-content .container::before,
.ufs-study-library-page #sidebar,
.ufs-study-category-page #main-content .container::before,
.ufs-study-category-page #sidebar {
  display: none !important;
}

.ufs-study-library-page #left-area,
.ufs-study-category-page #left-area {
  width: 100%;
  padding: 0;
}

.ufs-library,
.ufs-library * {
  box-sizing: border-box;
}

.ufs-library {
  color: var(--ufs-library-ink);
  font-family: var(--ufs-library-sans);
}

.ufs-library h1,
.ufs-library h2,
.ufs-library h3,
.ufs-library h4 {
  color: var(--ufs-library-ink);
  font-family: var(--ufs-library-serif);
  font-weight: 650;
}

.ufs-library a:focus-visible,
.ufs-library input:focus-visible,
.ufs-library button:focus-visible {
  outline: 3px solid rgba(223, 90, 40, 0.86);
  outline-offset: 4px;
}

.ufs-study-library-page .et_pb_section.ufs-library,
.ufs-study-category-page .et_pb_section.ufs-library {
  margin: 0 !important;
}

.ufs-library .et_pb_row {
  width: min(90%, 1220px) !important;
  max-width: 1220px !important;
}

/* Compact, editable page hero. */
.ufs-library-hero.et_pb_section {
  position: relative;
  display: flex;
  min-height: 405px;
  overflow: hidden;
  isolation: isolate;
  align-items: center;
  padding: 58px 0 72px !important;
  background-color: #1b1917 !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
}

.ufs-library-hero.et_pb_section::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(90deg, rgba(15, 14, 13, 0.36), rgba(15, 14, 13, 0.08) 28%, rgba(15, 14, 13, 0.2) 72%, rgba(15, 14, 13, 0.4)),
    linear-gradient(180deg, rgba(10, 10, 10, 0.08), rgba(10, 10, 10, 0.26));
  pointer-events: none;
}

.ufs-library-hero.et_pb_section::after {
  position: absolute;
  right: -2%;
  bottom: -1px;
  left: -2%;
  z-index: 2;
  height: 17px;
  content: "";
  background: #f1ece4;
  clip-path: polygon(0 58%, 3% 44%, 7% 67%, 11% 49%, 15% 72%, 19% 47%, 24% 62%, 29% 42%, 34% 68%, 39% 49%, 44% 73%, 49% 43%, 54% 64%, 59% 47%, 64% 71%, 69% 45%, 74% 65%, 79% 48%, 84% 71%, 89% 45%, 94% 64%, 100% 50%, 100% 100%, 0 100%);
}

.ufs-library-hero-row {
  margin: auto !important;
}

.ufs-library-hero-copy {
  max-width: 780px;
  margin: 0 auto !important;
  text-align: center;
}

.ufs-library-hero-copy h1 {
  margin: 0 0 12px !important;
  padding: 0 !important;
  color: #fbf2e5 !important;
  font-size: clamp(3.5rem, 6.2vw, 5.25rem) !important;
  letter-spacing: -0.035em;
  line-height: 0.96 !important;
  text-shadow: 0 3px 24px rgba(0, 0, 0, 0.58);
  text-wrap: balance;
}

.ufs-library-hero-copy p {
  max-width: 680px;
  margin: 0 auto !important;
  color: #f2e9dc !important;
  font-size: clamp(1.05rem, 1rem + 0.24vw, 1.22rem) !important;
  line-height: 1.55 !important;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.68);
  text-wrap: balance;
}

/* Search panel */
.ufs-library-search-section.et_pb_section {
  position: relative;
  z-index: 4;
  padding: 0 0 58px !important;
  background: transparent !important;
}

.ufs-library-search-row {
  display: grid !important;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 34px;
  align-items: center;
  margin-top: -42px !important;
  padding: 30px 36px !important;
  border: 1px solid rgba(88, 60, 40, 0.28);
  background:
    linear-gradient(rgba(248, 243, 235, 0.96), rgba(241, 232, 219, 0.97)),
    var(--ufs-site-parchment-texture, none);
  box-shadow: 0 18px 45px rgba(45, 31, 22, 0.18);
}

.ufs-library-search-row > .et_pb_column {
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
}

.ufs-library-search-copy h2 {
  margin: 0 0 5px !important;
  padding: 0 !important;
  font-size: clamp(2rem, 3.2vw, 2.8rem) !important;
  line-height: 1.02 !important;
}

.ufs-library-search-copy p {
  margin: 0 !important;
  color: var(--ufs-library-soft-ink);
  font-size: 0.98rem;
  line-height: 1.5;
}

.ufs-library-search-form.et_pb_search {
  display: block;
  min-height: 56px;
  overflow: hidden;
  border: 1px solid #ab947d !important;
  border-radius: 0 !important;
  background: rgba(255, 253, 248, 0.92) !important;
  box-shadow: inset 0 1px 7px rgba(71, 49, 34, 0.08);
}

.ufs-library-search-form .et_pb_searchform {
  display: flex !important;
  width: 100% !important;
  height: 100%;
  min-height: 54px;
  align-items: stretch;
}

.ufs-library-search-form .et_pb_searchform > div {
  display: flex !important;
  flex: 1 1 100% !important;
  width: 100% !important;
  min-width: 0;
  align-items: stretch;
}

.ufs-library-search-form input.et_pb_s {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 56px;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--ufs-library-ink) !important;
  font-family: var(--ufs-library-sans) !important;
  font-size: 1rem !important;
}

.ufs-library-search-form input.et_pb_s::placeholder {
  color: #76695f !important;
}

.ufs-library-search-form input.et_pb_searchsubmit {
  position: static !important;
  flex: 0 0 124px !important;
  width: 124px !important;
  min-width: 118px;
  height: auto !important;
  margin: 0 !important;
  padding: 0 20px !important;
  border: 0 !important;
  border-left: 1px solid #7b5336 !important;
  border-radius: 0 !important;
  background: #3a281f var(--ufs-button-charcoal) center / 100% 100% no-repeat !important;
  color: #f7ead8 !important;
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

/* Section rhythm */
.ufs-library-content.et_pb_section {
  padding: 66px 0 !important;
  background: transparent !important;
}

.ufs-library-content--tinted.et_pb_section {
  background: rgba(82, 58, 39, 0.055) !important;
  box-shadow: inset 0 1px rgba(91, 63, 44, 0.12), inset 0 -1px rgba(91, 63, 44, 0.1);
}

.ufs-library-heading-row {
  padding: 0 0 24px !important;
}

.ufs-library-heading {
  max-width: 820px;
}

.ufs-library-heading h2 {
  margin: 0 0 8px !important;
  padding: 0 !important;
  font-size: clamp(2.45rem, 4.5vw, 3.7rem) !important;
  letter-spacing: -0.027em;
  line-height: 1 !important;
  text-wrap: balance;
}

.ufs-library-heading p {
  max-width: 720px;
  margin: 0 !important;
  color: var(--ufs-library-soft-ink);
  font-size: 1.04rem;
  line-height: 1.58;
}

/* Discovery routes */
.ufs-library-route-row,
.ufs-library-shelf-row {
  display: grid !important;
  gap: 20px;
}

.ufs-library-route-row::after,
.ufs-library-shelf-row::after,
.ufs-library-search-row::after {
  display: none !important;
  content: none !important;
}

.ufs-library-route-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ufs-library-route-row > .et_pb_column,
.ufs-library-shelf-row > .et_pb_column {
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
}

.ufs-library-route.et_pb_module {
  position: relative;
  height: 100%;
  min-height: 210px;
  margin: 0 !important;
  padding: 27px 24px 24px !important;
  overflow: hidden;
  border: 1px solid rgba(89, 61, 42, 0.24);
  background: rgba(248, 243, 234, 0.9);
  box-shadow: 0 9px 22px rgba(53, 35, 24, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.ufs-library-route.et_pb_module::before {
  display: block;
  width: 34px;
  height: 2px;
  margin-bottom: 24px;
  content: "";
  background: var(--ufs-library-copper);
  box-shadow: 9px 6px 0 rgba(185, 103, 55, 0.32);
}

.ufs-library-route:hover {
  z-index: 2;
  border-color: rgba(124, 77, 45, 0.44);
  box-shadow: 0 17px 34px rgba(53, 35, 24, 0.14);
  transform: translateY(-4px);
}

.ufs-library-route .et_pb_blurb_content,
.ufs-library-route .et_pb_text_inner {
  max-width: none;
  height: 100%;
}

.ufs-library-route .ufs-library-card-link {
  display: flex;
  height: 100%;
  color: inherit;
  flex-direction: column;
  text-decoration: none;
}

.ufs-library-route h3 {
  margin: 0 0 10px !important;
  padding: 0 !important;
  font-size: 1.42rem !important;
  line-height: 1.12 !important;
}

.ufs-library-route h3,
.ufs-library-route h3 a {
  color: var(--ufs-library-ink) !important;
  text-decoration: none;
}

.ufs-library-route p {
  margin: 0 !important;
  padding: 0 !important;
  color: var(--ufs-library-soft-ink);
  font-size: 0.94rem;
  line-height: 1.52;
}

.ufs-library-route .ufs-library-card-action,
.ufs-library-route .et_pb_blurb_description::after {
  display: block;
  margin-top: 18px;
  color: var(--ufs-library-brown);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ufs-library-route .ufs-library-card-action {
  margin-top: auto;
  padding-top: 18px;
}

.ufs-library-route .et_pb_blurb_description::after {
  content: "Explore this path \2192";
}

/* Study modules */
.ufs-library-study-module .ufs-blog {
  align-items: stretch;
}

.ufs-library-study-module .ufs-blog__card {
  overflow: hidden;
  border: 1px solid rgba(88, 59, 39, 0.24);
  border-radius: 0;
  background: rgba(247, 240, 230, 0.93);
  box-shadow: 0 10px 26px rgba(45, 31, 22, 0.1);
}

.ufs-library-study-module .ufs-blog__card:hover {
  border-color: rgba(139, 82, 47, 0.5);
  box-shadow: 0 19px 38px rgba(45, 31, 22, 0.17);
}

.ufs-library-study-module .ufs-blog__media {
  background: #30261f;
}

.ufs-library-study-module .ufs-blog__image {
  width: 100%;
  height: 215px;
  aspect-ratio: auto;
  object-fit: cover;
}

.ufs-library-study-module .ufs-blog__content {
  padding: 22px 22px 20px;
}

.ufs-library-study-module .ufs-blog__title {
  font-family: var(--ufs-library-serif) !important;
  font-size: 1.46rem !important;
  font-weight: 650 !important;
  letter-spacing: -0.016em;
  line-height: 1.08 !important;
}

.ufs-library-study-module .ufs-blog__title a {
  color: var(--ufs-library-ink) !important;
}

.ufs-library-study-module .ufs-blog__meta {
  margin-top: 9px;
  color: #8a6044;
  font-size: 0.73rem;
  font-weight: 720;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.ufs-library-study-module .ufs-blog__excerpt {
  margin-top: 11px;
  color: var(--ufs-library-soft-ink);
  font-size: 0.91rem;
  line-height: 1.5;
}

.ufs-library-study-module .ufs-blog__read-more {
  align-self: flex-start;
  margin-top: 18px;
  padding: 10px 0 2px;
  color: var(--ufs-library-brown) !important;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ufs-library-featured-module .ufs-blog__image {
  height: 230px;
}

.ufs-library-featured-module .ufs-blog__card:nth-child(1) {
  border-color: rgba(178, 103, 57, 0.5);
}

.ufs-library-featured-module .ufs-blog__card:nth-child(1) .ufs-blog__content::before {
  display: block;
  margin-bottom: 9px;
  color: var(--ufs-library-copper);
  content: "A fresh discovery";
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

/* Topic shelves */
.ufs-library-shelf-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-bottom: 20px !important;
}

.ufs-library-shelf.et_pb_module {
  position: relative;
  height: 100%;
  min-height: 172px;
  margin: 0 !important;
  padding: 24px 22px 22px !important;
  border: 1px solid rgba(92, 64, 45, 0.2);
  border-top: 3px solid var(--ufs-library-brown);
  background: rgba(252, 248, 241, 0.78);
  transition: background-color 160ms ease, transform 160ms ease;
}

.ufs-library-shelf:hover {
  background-color: rgba(250, 241, 228, 0.98);
  transform: translateY(-3px);
}

.ufs-library-shelf .et_pb_blurb_content,
.ufs-library-shelf .et_pb_text_inner {
  max-width: none;
  height: 100%;
}

.ufs-library-shelf .ufs-library-card-link {
  display: flex;
  height: 100%;
  color: inherit;
  flex-direction: column;
  text-decoration: none;
}

.ufs-library-shelf h3 {
  margin: 0 0 8px !important;
  padding: 0 !important;
  font-size: 1.3rem !important;
  line-height: 1.1 !important;
}

.ufs-library-shelf h3,
.ufs-library-shelf h3 a {
  color: var(--ufs-library-ink) !important;
  text-decoration: none;
}

.ufs-library-shelf p {
  margin: 0 !important;
  padding: 0 !important;
  color: var(--ufs-library-soft-ink);
  font-size: 0.89rem;
  line-height: 1.47;
}

.ufs-library-shelf .ufs-library-card-action,
.ufs-library-shelf .et_pb_blurb_description::after {
  display: block;
  margin-top: 14px;
  color: var(--ufs-library-copper);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.ufs-library-shelf .ufs-library-card-action {
  margin-top: auto;
  padding-top: 14px;
}

.ufs-library-shelf .et_pb_blurb_description::after {
  content: "Open collection \2192";
}

.ufs-library-latest-module .ufs-blog__pagination {
  margin-top: 36px;
}

.ufs-library-latest-module .ufs-blog__pagination a,
.ufs-library-latest-module .ufs-blog__pagination .current,
.ufs-library-latest-module .ufs-blog__load-more {
  min-height: 46px;
  min-width: 46px;
  border: 1px solid #785236;
  border-radius: 0;
  background: rgba(247, 239, 227, 0.9);
  color: #563924;
  font-weight: 760;
}

.ufs-library-latest-module .ufs-blog__pagination .current,
.ufs-library-latest-module .ufs-blog__load-more {
  background: #30231c var(--ufs-button-charcoal) center / 100% 100% no-repeat;
  color: #f8ecdc;
}

/* Dynamic Bible Study category archives. */
.ufs-category-hero .ufs-category-back {
  display: inline-block;
  margin: 0 0 17px;
  color: #e6bb8d !important;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.ufs-category-hero .ufs-category-back:hover,
.ufs-category-hero .ufs-category-back:focus {
  color: #fff2df !important;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.ufs-category-hero-copy h1 {
  text-wrap: balance;
}

.ufs-category-hero-copy p:last-child {
  max-width: 720px;
}

.ufs-category-results.et_pb_section {
  padding-top: 68px !important;
}

.ufs-category-results .ufs-library-heading {
  max-width: 900px;
}

.ufs-category-results .ufs-blog {
  align-items: stretch;
}

.ufs-category-results .ufs-blog__card {
  background:
    linear-gradient(rgba(248, 243, 234, 0.94), rgba(245, 238, 228, 0.94)),
    var(--ufs-site-parchment-texture, none);
}

.ufs-category-results .ufs-blog__pagination {
  margin-top: 38px;
}

.ufs-category-results .ufs-blog__pagination a,
.ufs-category-results .ufs-blog__pagination .current,
.ufs-category-results .ufs-blog__load-more {
  min-width: 48px;
  min-height: 47px;
  border: 1px solid #785236;
  border-radius: 0;
  background: rgba(247, 239, 227, 0.92);
  color: #563924;
  font-weight: 780;
}

.ufs-category-results .ufs-blog__pagination .current,
.ufs-category-results .ufs-blog__load-more {
  background: #30231c var(--ufs-button-charcoal) center / 100% 100% no-repeat;
  color: #f8ecdc;
}

.ufs-category-footer.et_pb_section {
  padding: 0 0 72px !important;
  background: transparent !important;
}

.ufs-category-footer-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 30px;
  align-items: center;
  padding: 28px 32px !important;
  border: 1px solid rgba(88, 60, 40, 0.27);
  border-left: 4px solid var(--ufs-library-copper);
  background: rgba(246, 239, 229, 0.88);
  box-shadow: 0 12px 30px rgba(45, 31, 22, 0.09);
}

.ufs-category-footer-row::after {
  display: none !important;
  content: none !important;
}

.ufs-category-footer-row > .et_pb_column {
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
}

.ufs-category-footer-copy h2 {
  margin: 0 0 5px !important;
  padding: 0 !important;
  font-size: clamp(1.9rem, 3vw, 2.55rem) !important;
  line-height: 1.04 !important;
}

.ufs-category-footer-copy p {
  margin: 0 !important;
  color: var(--ufs-library-soft-ink);
}

.ufs-category-footer-link a {
  display: inline-flex;
  min-height: 52px;
  padding: 13px 25px;
  align-items: center;
  justify-content: center;
  background: #30231c var(--ufs-button-charcoal) center / 100% 100% no-repeat;
  color: #f8ecdc !important;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-decoration: none;
  text-transform: uppercase;
}

.ufs-category-footer-link a:hover,
.ufs-category-footer-link a:focus {
  filter: brightness(1.14);
  transform: translateY(-1px);
}

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

@media (max-width: 980px) {
  .ufs-library-hero.et_pb_section {
    min-height: 370px;
    padding-top: 50px !important;
  }

  .ufs-library-search-row {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 28px !important;
  }

  .ufs-library-study-module .ufs-blog__image {
    height: 205px;
  }

  .ufs-category-footer-row {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 767px) {
  .ufs-library .et_pb_row {
    width: min(89%, 620px) !important;
  }

  body.ufs-study-library-page #page-container .ufs-library-hero.et_pb_section {
    min-height: 410px;
    padding: 54px 0 74px !important;
    background-image: url("https://unforsaken.org/wp-content/uploads/2026/09/bible-studies-hero-mobile.webp") !important;
    background-position: center 53% !important;
  }

  .ufs-library-hero.et_pb_section::before {
    background: linear-gradient(180deg, rgba(13, 12, 11, 0.16), rgba(13, 12, 11, 0.28));
  }

  .ufs-library-hero-copy h1 {
    font-size: clamp(3.2rem, 16vw, 4.4rem) !important;
  }

  .ufs-library-hero-copy p {
    max-width: 31rem;
    font-size: 1.04rem !important;
    line-height: 1.5 !important;
  }

  .ufs-library-search-section.et_pb_section {
    padding-bottom: 45px !important;
  }

  .ufs-library-search-row {
    gap: 18px;
    margin-top: -35px !important;
    padding: 25px 22px !important;
  }

  .ufs-library-search-copy h2 {
    font-size: 2.05rem !important;
  }

  .ufs-library-search-form input.et_pb_searchsubmit {
    flex-basis: 104px !important;
    width: 104px !important;
    min-width: 104px;
    padding-right: 12px !important;
    padding-left: 12px !important;
  }

  .ufs-library-content.et_pb_section {
    padding: 50px 0 !important;
  }

  .ufs-library-heading-row {
    padding-bottom: 20px !important;
  }

  .ufs-library-heading h2 {
    font-size: clamp(2.25rem, 11vw, 3.1rem) !important;
  }

  .ufs-library-route-row,
  .ufs-library-shelf-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .ufs-library-route.et_pb_module,
  .ufs-library-shelf.et_pb_module {
    min-height: 0;
  }

  .ufs-library-route.et_pb_module {
    padding: 23px 21px 21px !important;
  }

  .ufs-library-route.et_pb_module::before {
    margin-bottom: 18px;
  }

  .ufs-library-shelf-row {
    padding-bottom: 14px !important;
  }

  .ufs-library-study-module .ufs-blog__image,
  .ufs-library-featured-module .ufs-blog__image {
    height: auto;
    aspect-ratio: 16 / 10;
  }

  body.ufs-study-category-page #page-container .ufs-category-hero.et_pb_section {
    min-height: 410px;
    padding: 48px 0 72px !important;
    background-position: center 52% !important;
  }

  .ufs-category-hero .ufs-category-back {
    margin-bottom: 13px;
  }

  .ufs-category-results.et_pb_section {
    padding-top: 50px !important;
  }

  .ufs-category-footer.et_pb_section {
    padding-bottom: 52px !important;
  }

  .ufs-category-footer-row {
    width: min(89%, 620px) !important;
    padding: 25px 22px !important;
  }

  .ufs-category-footer-link a {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ufs-library-route,
  .ufs-library-shelf,
  .ufs-library-study-module .ufs-blog__card,
  .ufs-library-study-module .ufs-blog__image {
    transition: none !important;
  }
}
