/* ==========================================================================
   LitLovers Child Template - Custom Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties (Color Scheme)
   -------------------------------------------------------------------------- */
:root {
  --ll-red-1: #c11233;
  --ll-red-2: #c41130;
  --ll-red-3: #c00;
  --ll-red-4: #950d25;
  --ll-orange: #e2a856;
  --ll-peach: #f3e1c9;
  --ll-white: #fff;
  --ll-card-bg: #faf3ea;
  --ll-card-border: #e0d5c5;
  --ll-fa-family: "Font Awesome 5 Free", "Font Awesome 5 Pro", FontAwesome;

  /* Override Cassiopeia defaults */
  --cassiopeia-color-primary: #c11233;
  --cassiopeia-color-link: #c41130;
  --cassiopeia-color-hover: #950d25;
  --cassiopeia-font-family-body: Verdana, Arial, Helvetica, sans-serif;
  --cassiopeia-font-family-headings: Arial, Helvetica, sans-serif;
  --cassiopeia-font-weight-normal: 400;
  --cassiopeia-font-weight-headings: 700;
}

/* --------------------------------------------------------------------------
   Base Typography
   -------------------------------------------------------------------------- */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 11rem;
}

h1, h2, h3, h4, h5, h6 {
  text-wrap: pretty;
}

a {
  color: var(--ll-red-2);
}

a:hover {
  color: var(--ll-red-4);
}

/* --------------------------------------------------------------------------
   Header & Navigation
-------------------------------------------------------------------------- */
.container-header {
  background-color: var(--ll-white);
  background-image: none;
}

.container-header .mod-menu {
  justify-content: flex-end;
}

.container-header .mod-menu > li > a,
.container-header .mod-menu > li > .nav-header {
  color: var(--ll-red-2);
}

.container-nav {
  border-top: solid 1px var(--ll-red-3);
}

.container-nav .mod-menu {
  text-transform: uppercase;
  font-size: 1.3rem;
}

.container-nav .mod-menu .nav-link:hover {
  border-bottom: solid 1px var(--ll-red-3);
}

.container-nav .mod-menu .active > .nav-link {
  box-shadow: none;
}

/* --------------------------------------------------------------------------
   Top Ads / Topbar
-------------------------------------------------------------------------- */
.container-topbar {
  text-align: right;
}

/* --------------------------------------------------------------------------
   Main Content Area
-------------------------------------------------------------------------- */
.container-component {
  border: solid 1px var(--ll-red-3);
  padding: 1rem;
}

/* --------------------------------------------------------------------------
   Sidebars — strip Cassiopeia's .card chrome to match production
-------------------------------------------------------------------------- */
.container-sidebar-left .card,
.container-sidebar-right .card,
.container-bottom-a .card,
.container-bottom-b .card {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.container-sidebar-left .card > .card-header,
.container-sidebar-right .card > .card-header,
.container-bottom-a .card > .card-header,
.container-bottom-b .card > .card-header {
  padding: 0;
  background: transparent;
  border: 0;
}

.container-sidebar-left .card > .card-body,
.container-sidebar-right .card > .card-body,
.container-bottom-a .card > .card-body,
.container-bottom-b .card > .card-body {
  padding: 0;
}

/* --------------------------------------------------------------------------
   Sidebar Right
-------------------------------------------------------------------------- */
.container-sidebar-right {
  border-top: none;
  padding-top: 0;
}

.container-sidebar-right .card:first-child {
  padding-top: 0;
  margin-top: 0;
}

.container-sidebar-right .mod-finder__search {
  flex-flow: row nowrap;
}

.container-sidebar-right .mod-finder__search .btn.btn-primary {
  border-radius: 0;
}

.container-sidebar-right .mod-finder__search .btn.btn-primary .icon-search {
  display: none;
}

.awesomplete input {
  border-radius: 0;
}

/* --------------------------------------------------------------------------
   Sidebar Left
-------------------------------------------------------------------------- */
.container-sidebar-left {
  border-top: solid 1px var(--ll-red-3);
  padding: 2rem 0 3rem 0;
}

.container-sidebar-left .mod-menu {
  margin: 0.5rem 0;
  font-size: 14px;
}

.container-sidebar-left .mod-menu li {
  width: 100%;
}

.container-sidebar-left .mod-menu .parent {
  position: relative;
}

.container-sidebar-left .mod-menu .parent::after {
  position: absolute;
  top: 3px;
  right: 0;
  font-family: var(--ll-fa-family);
  content: "\f0d7";
  color: var(--ll-red-2);
}

.container-sidebar-left .moduletable .nav li {
  margin-bottom: 0;
}

.container-sidebar-left .mod-menu__sub {
  margin-left: 0;
  padding: 0 5px;
  list-style: none;
  background-color: #efefef;
}

/* --------------------------------------------------------------------------
   Footer
-------------------------------------------------------------------------- */
.container-footer {
  background-color: var(--ll-white);
  background-image: none;
  border-top: solid 1px var(--ll-red-3);
  padding: 1rem 0;
  color: inherit;
}

.container-footer a {
  color: var(--ll-red-2);
}

.container-footer .ll-copyright {
  font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   Utility Classes
   -------------------------------------------------------------------------- */
.gold-bold-14,
.heading-gold {
  font-family: var(--cassiopeia-font-family-headings);
  font-weight: var(--cassiopeia-font-weight-headings);
  color: var(--ll-orange);
}

.gold-bold-14 {
  font-size: 14px;
  line-height: 18px;
}

.heading-gold {
  font-size: 18px;
  line-height: 22px;
}

.red {
  color: var(--ll-red-2);
}

.red-bold-14,
.red-bold {
  font-weight: 700;
  color: var(--ll-red-2);
}

.red-italics-bold {
  color: var(--ll-red-2);
  font-style: italic;
  font-weight: 700;
}

.red-italics {
  font-style: italic;
  color: var(--ll-red-2);
}

.bg-info {
  background-color: var(--ll-orange) !important;
  color: #000;
}

/* --------------------------------------------------------------------------
   Book Title Decorator
   -------------------------------------------------------------------------- */
.bookTitle {
  line-height: 1;
  margin-top: 0;
  margin-bottom: 10px;
  position: relative;
}

.bookTitle::after {
  content: "";
  background: url(../images/elements/books.png) center center no-repeat;
  background-size: contain;
  width: 22px;
  height: 19px;
  position: absolute;
  margin-left: 5px;
  top: 3px;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn,
button {
  border-radius: 0 !important;
}

/* --------------------------------------------------------------------------
   Above Content
   -------------------------------------------------------------------------- */
.main-top h1,
.main-top h2,
.main-top h3 {
  text-align: center;
}

/* --------------------------------------------------------------------------
   Smart Search
   -------------------------------------------------------------------------- */
.com-finder__search .input-group {
  display: flex;
  gap: 1rem;
}

.com-finder {
  border-bottom: solid 1px var(--ll-red-2);
  padding-bottom: 2rem;
}

/* --------------------------------------------------------------------------
   Emphasis & Tables
   -------------------------------------------------------------------------- */
em {
  color: var(--ll-red-2);
}

table {
  width: 100% !important;
  height: auto !important;
}

td:has(img) {
  width: 200px;
}

tr, td, th {
  vertical-align: top;
}

/* --------------------------------------------------------------------------
   Article Styles
   -------------------------------------------------------------------------- */
.card.float-end.article-index,
.pagenavcounter {
  display: none;
}

.com-content-article.item-page .page-header {
  border-bottom: solid 1px var(--ll-red-2);
}

.com-content-article.item-page .page-header h1,
.com-content-article.item-page .page-header h2,
.com-content-article.item-page .page-header h3 {
  margin: 0 0 0.5em;
}

.com-content-article__body table {
  margin: auto;
  border: none;
}

.com-content-article__body p {
  position: relative;
}

.com-content-article__body .afterIsbn {
  margin-top: 110px;
}

.com-content-article__body .articleAd {
  margin-top: 50px;
  text-align: center;
}

.com-content-article__body .articleImg {
  margin-left: 20px;
  float: right;
  margin-top: 0;
}

.com-content-article__body .articleFlex {
  display: flex;
  gap: 1rem;
  justify-content: space-around;
}

/* Course Tables */
.com-content-article__body table.course-summary-table,
.com-content-article__body table.course-table,
.com-content-article__body table.course-guide-table {
  border: none;
}

.com-content-article__body table.course-summary-table td,
.com-content-article__body table.course-table td,
.com-content-article__body table.course-guide-table td {
  padding: 1rem 0;
}

.course-table-header td:last-of-type {
  display: none;
}

.course-table-body p {
  padding: 0 !important;
}

.course-table-body .body-small {
  line-height: 1.3 !important;
}

.course-table-block {
  width: auto !important;
  padding: 1rem !important;
  background-color: var(--ll-peach);
  border: 1px solid #999;
  margin: 0 auto 1rem !important;
  float: none !important;
}

/* Course Menu (sidebar within content) */
.course-menu.moduletable {
  border: solid #ccc 1px;
  margin-top: 60px;
}

.course-menu h3 {
  border-bottom: solid 1px #ccc;
  font-size: 1.2rem;
  padding: 0.5rem;
  margin: 0;
  background: var(--ll-peach);
  color: var(--ll-red-2);
}

.course-menu .mod-menu {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0.5rem;
}

.course-menu .mod-menu li {
  margin-bottom: 0;
}

.course-menu .mod-menu li.active > a {
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   Mini Menu
   -------------------------------------------------------------------------- */
.miniMenu .mod-menu {
  margin: 0;
}

.miniMenu .mod-menu li a {
  padding: 0 !important;
}

.miniMenu .bookTitle::after {
  content: "\f02d";
  background: none;
  font-family: var(--ll-fa-family);
  width: 22px;
  height: 19px;
  position: absolute;
  right: 0;
  font-weight: 100;
  font-size: 1rem;
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */
.pager {
  border-top: solid 1px var(--ll-red-2);
}

.pagination {
  width: fit-content;
  margin: 1rem auto 0;
}

.pagination .page-item .page-link {
  border-radius: 0;
  border: none;
  background: transparent;
  color: var(--ll-red-2);
}

.pagination .page-item .page-link:hover {
  border-bottom: solid 1px var(--ll-red-2);
}

/* --------------------------------------------------------------------------
   Blog Links
   -------------------------------------------------------------------------- */
.com-content-blog__links {
  list-style: disc;
}

/* --------------------------------------------------------------------------
   Contact Page
   -------------------------------------------------------------------------- */
.com-contact.contact h3,
.com-contact.contact .page-header,
.com-contact.contact .icon-info-circle,
.com-contact.contact legend {
  display: none;
}

.com-contact.contact .contact-misc p:last-of-type {
  margin-bottom: -3rem;
}

#contact-form .controls input,
#contact-form .controls textarea {
  border-radius: 0;
}

#contact-form .control-group:last-of-type {
  margin-top: 0;
}

#contact-form .controls .btn-primary.validate {
  font-size: 1rem;
  padding: 0.5rem 1rem;
  margin-left: 15px;
}

/* --------------------------------------------------------------------------
   Homepage (itemid-101) — source: homepage.css
   -------------------------------------------------------------------------- */
.itemid-101 .page-header {
  display: none;
}

.itemid-101 .container-top-a {
  display: block !important;
}

/* Cassiopeia wraps each module in .card > .card-body; the homepage sections
   must read as one continuous page, so strip that chrome here only. */
.itemid-101 .container-component > .main-top.card {
  border: 0;
  box-shadow: none;
  margin: 0;
}

.itemid-101 .container-component > .main-top.card > .card-body {
  padding: 0;
}

/* Align the GetLit card with the top of the hero */
.itemid-101 .container-sidebar-left {
  padding-top: 0;
}

/* Hero Box */
.heroBox {
  background: url('../../../../../images/front-page-slides/library.jpg');
  background-size: cover;
  background-position: center 35%;
  aspect-ratio: 16 / 9;
  max-height: 500px;
  padding: 20px;
  position: relative;
}

.heroBox .heroVerbiage {
  background: var(--ll-white);
  padding: 15px 20px;
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  text-align: center;
}

.heroBox .heroVerbiage h1 {
  font-size: 1.75rem;
}

.heroBox .heroVerbiage p {
  font-size: 0.9rem;
}

.heroBox .heroButtons {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-flow: row wrap;
  gap: 1rem;
  padding: 10px;
}

.heroBox .heroButtons a {
  background: var(--ll-red-1);
  color: var(--ll-white);
  width: 250px;
  text-align: center;
  padding: 10px 20px;
  font-size: 14px;
}

.heroBox .heroButtons a:hover {
  background: var(--ll-red-4);
}

/* Grid Cards (Find a Book, Visit Our Blog, Take a Tour) */
.fp-grid-cards {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}

.fp-grid-cards .fp-card,
.fp-resources > div {
  background: var(--ll-card-bg);
  border: 1px solid var(--ll-card-border);
  padding: 1rem;
}

.fp-grid-cards .fp-card {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.fp-grid-cards .fp-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.fp-grid-cards .fp-card .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: auto;
  background: var(--ll-red-1);
  color: var(--ll-white);
  padding: 8px 16px;
}

.fp-grid-cards .fp-card .btn:hover {
  background: var(--ll-red-4);
}

/* Resources (Top Picks, Book Club, Discussion Starters) */
.fp-resources {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 1rem 0 2rem;
}

.fp-resources h3 {
  color: var(--ll-red-1);
}

/* --------------------------------------------------------------------------
   Recipes (itemid-562)
   -------------------------------------------------------------------------- */
.itemid-562 .item-content table,
.itemid-562 .item-content p {
  display: none;
}

.recipeMenu ul.mod-articlescategory {
  columns: 4;
  width: 100%;
}

.recipeMenu > ul > li > ul > li {
  display: none;
}

.recipeMenu > ul > li > ul > li:first-of-type {
  display: inherit;
}

.recipeMenu a.mod-articles-category-title,
.recipeMenu .mod-articles-category-group {
  display: none;
}

/* --------------------------------------------------------------------------
   Countries Menu
   -------------------------------------------------------------------------- */
.countriesMenu ul {
  display: inherit;
  column-count: 4;
}

/* --------------------------------------------------------------------------
   CLS Fix - Reserve Space for AdSense Units
   -------------------------------------------------------------------------- */
.container-sidebar-right .adsbygoogle {
  min-height: 250px;
}

.bottom-ad .adsbygoogle {
  min-height: 90px;
}

.afterIsbn .adsbygoogle {
  min-height: 250px;
}

/* --------------------------------------------------------------------------
   Grid Columns — narrower sidebars than Cassiopeia's default

   Cassiopeia ships:
     [full-start] minmax(0,1fr) [main-start] repeat(4, minmax(0,25%)) [main-end]
     minmax(0,1fr) [full-end]
   i.e. sidebars 25%, content 50% (content spans the middle two tracks).

   LitLovers wants 20% / 30% / 30% / 20% => sidebars 20%, content 60%.

   The named lines MUST be restated. Cassiopeia places every region with
   grid-template-areas (". side-l comp comp side-r ."), and those areas resolve
   against full-start/main-start/main-end/full-end. Overriding
   grid-template-columns with bare tracks deletes the names, every grid-area
   fails to resolve, and the whole layout collapses into single-character
   columns.
   -------------------------------------------------------------------------- */
@media (min-width: 992px) {
  body.wrapper-fluid .site-grid {
    grid-template-columns:
      [full-start] minmax(0, 1fr)
      [main-start] minmax(0, 20%) repeat(2, minmax(0, 30%)) minmax(0, 20%)
      [main-end] minmax(0, 1fr) [full-end];
  }
}

/* --------------------------------------------------------------------------
   Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media screen and (max-width: 1047px) {
  .articleFlex {
    flex-direction: column;
    flex-flow: column-reverse;
    align-items: center;
  }
}

@media screen and (max-width: 1020px) {
  .heroBox .heroVerbiage {
    position: relative;
    bottom: inherit;
    left: inherit;
    right: inherit;
  }
}

@media screen and (max-width: 1010px) {
  .countriesMenu ul {
    column-count: 2;
  }
}

@media screen and (max-width: 1000px) {
  .container-nav .mod-menu {
    justify-content: center;
  }
}

@media (max-width: 767px) {
  /* On mobile, reorder grid so content comes first */
  .site-grid {
    display: flex;
    flex-direction: column;
  }

  .container-sidebar-left {
    order: 2;
  }

  .container-component {
    order: 1;
  }

  .container-sidebar-right {
    order: 3;
  }

  /* Hide sidebar search on mobile (mobile search in header) */
  .container-sidebar-right .sidebar.moduletable.searchMod {
    display: none;
  }

  /* Stack homepage grids on mobile */
  .fp-grid-cards,
  .fp-resources {
    grid-template-columns: 1fr !important;
  }
}

@media screen and (max-width: 600px) {
  .articleImg {
    display: block;
    float: inherit !important;
    margin: 50px auto !important;
  }
}
