/* ==========================================================================
   Main
   ========================================================================== */

/* Fonts
   ========================================================================== */

/* Dharma */
@font-face {
  font-family:'dharma';
  font-weight: light;
  src: url('dharma-light.woff2') format('woff2');
}
@font-face {
  font-family: 'dharma';
  font-weight: bold;
  src: url('dharma-bold.woff2') format('woff2');
}

/* Lora */
@font-face {
  font-family: 'lora';
  font-style: normal;
  src: url('assets/fonts/lora/lora.woff2') format('woff2');
}
@font-face {
  font-family: 'lora';
  font-style: italic;
  src: url('assets/fonts/lora/lora-italic.woff2') format('woff2');
}

/* Montserrat */
@font-face {
  font-family: 'montserrat';
  font-style: normal;
  src: url('assets/fonts/montserrat/montserrat.woff2') format('woff2');
}
@font-face {
  font-family: 'montserrat';
  font-style: italic;
  src: url('assets/fonts/montserrat/montserrat-italic.woff2') format('woff2');
}

/* Colors
   ========================================================================== */

:root {
  /* sand */
  --color-sand: #f2e4cf;
  --color-sand-light: #f8f3ed;
  --color-sand-dark: #daaa63;
  --color-sand-white: #fbfaf9;
  --color-sand-black: #2c1810;
  --color-sand-gray: #7c6f68;

  /* backgrounds */
  --color-bg: var(--color-sand);;
  --color-bg-light: var(--color-sand-light);;
  --color-bg-dark: var(--color-sand-dark);;

  /* texts */
  --color-text: var(--color-sand-black);
  --color-text-gray: var(--color-sand-gray);
  --color-text-white: var(--color-sand-white);
  --color-text-sand: var(--color-sand-dark);

  /* transition */
  --transition-duration-fast: 0.2s;
  --transition-duration: 0.4s;

  /* roundness */
  --border-round: 4px;
}

/* Global
   ========================================================================== */

html {
  scroll-behavior: smooth;
}
body{
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: 'lora';
  font-size: 16px;
}

.wrapper {
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 40px;
}

/*
@media only screen and (max-width: 1920px) {
  body {
    font-size: 14px;
    font-size: 0.875em;
  }
}
@media only screen and (max-width: 1400px) {
  body {
    font-size: 13px;
  }
}
@media only screen and (max-width: 1200px) {
  body {
    font-size: 12px;
  }
}
@media only screen and (max-width: 768px) {
  body {
  }
  .wrapper {
    padding: 0 20px;
  }
}
@media only screen and (max-width: 576px) {
  body {
  }
  .wrapper {
    padding: 0 10px;
  }
}
*/

/* ==========================================================================
   Books list
   ========================================================================== */

.books-list {
  user-select: none;
  background-color: var(--color-bg-light);
  box-shadow:
    rgba(50, 50, 93, 0.25) 0px 13px 27px -5px,
    rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
  padding: 0 40px;
  border-radius: 4px;
}

/* Books list -- Header
   ========================================================================== */

.books-list h2 {font-family:'dharma';text-align:center;margin:40px 0;overflow:hidden;}
.books-list h2 span {position:relative;color:var(--fg-bolor);}
.books-list h2 span::before,
.books-list h2 span::after {content:'';display:block;border-bottom:3px double var(--fg-color);top:10px;position:absolute;width:900px;}
.books-list h2 span::before {right:100%;margin-right:20px;}
.books-list h2 span::after {left:100%;margin-left:20px;}


/* Books list -- Grid
   ========================================================================== */

.books-list ul {
  display: grid;
  grid-column-gap: 40px;
  grid-row-gap: 40px;
  grid-template-columns:repeat(7,1fr);
}

  .wrapper {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 40px;
  }

@media only screen and (max-width: 2400px) {
}
@media only screen and (max-width: 1800px) {
  .wrapper {
    width: 1300px;
    padding: 0 40px;
  }
  .books-list {
    padding: 0 26px;
  }
  .books-list ul {
    grid-column-gap: 26px;
  }
  .books-list ul {
    grid-template-columns:repeat(6, 1fr);
  }
}
@media only screen and (max-width: 1400px) {
  .wrapper {
    width: 1160px;
    padding: 0 40px;
  }
  .books-list {
    padding: 0 24px;
  }
  .books-list ul {
    grid-column-gap: 24px;
  }
  .books-list ul {
    grid-template-columns:repeat(6, 1fr);
  }
}
@media only screen and (max-width: 1200px) {
  .wrapper {
    width: 990px;
    padding: 0 40px;
  }
  .books-list {
    padding: 0 20px;
  }
  .books-list ul {
    grid-column-gap: 20px;
  }
  .books-list ul {
    grid-template-columns:repeat(5, 1fr);
  }
}
@media only screen and (max-width: 992px) {
  .wrapper {
    width: 760px;
    padding: 0 30px;
  }
  .books-list {
    padding: 0 20px;
  }
  .books-list ul {
    grid-column-gap: 20px;
  }
  .books-list ul {
    grid-template-columns:repeat(4, 1fr);
  }
}
@media only screen and (max-width: 768px) {
  .wrapper {
    width: 570px;
    padding: 0 20px;
  }
  .books-list {
    padding: 0 20px;
  }
  .books-list ul {
    grid-column-gap: 20px;
  }
  .books-list ul {
    grid-template-columns:repeat(3, 1fr);
  }
}
@media only screen and (max-width: 576px) {
  .wrapper {
    width: 100%;
    padding: 0 20px;
  }
  .books-list {
    padding: 0 20px;
  }
  .books-list ul {
    grid-column-gap: 20px;
  }
  .books-list ul {
    grid-template-columns:repeat(2, 1fr);
  }
}

nav.letters {
display: flex;
    justify-content: center;
    justify-content: space-evenly;
    padding: 0 300px;
}

/* Books list -- Card
   ========================================================================== */

.books-list ul li  {
  display: grid;
  overflow: hidden;
  padding: 0;
  padding-bottom: 16px;
  border-radius: 4px;
  transition: background-color var(--transition-duration-fast) ease-in-out;
}
.books-list ul li:hover {
  background-color: var(--color-bg-dark);
}
.books-list .cover {
  position: relative;
  width: 100%;
}
.books-list .cover:after {
  content: '';
  display: block;
  padding-bottom: 100%;
}
.books-list .cover img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: scale var(--transition-duration) ease-in-out;
  filter: drop-shadow(3px 3px 4px rgba(0, 0, 0, 0.8));
  scale: 55%;
}

.books-list ul li:hover .cover img {
  scale: 66%;
}

.books-list .title,
.books-list .subtitle,
.books-list .authors,
.books-list .stars {
  font-weight: 700;
  text-overflow: ellipsis;
  text-align: center;
  padding: 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.books-list .title {
  letter-spacing: -0.05em;
  margin-top: 17px;
  line-height: 1.3125em;
  margin-bottom: 0.4em;
  -webkit-line-clamp: 2;
}
.books-list .subtitle {
  font-size: 0.8125em;
  letter-spacing: -0.03em;
  font-weight: 600;
}
.books-list .authors {
  margin-top: 4px;
  color: var(--color-text-gray);
  font-family: 'montserrat';
  font-size: 0.9125em;
  font-weight: 500;
  transition: color var(--transition-duration-fast) ease-in-out;
}
.books-list ul li:hover .authors {
  color: var(--color-text-white);
}
.books-list .stars {
  top: -5px;
  position: relative;
  color: var(--color-text-sand);
  transition: color var(--transition-duration-fast) ease-in-out;
}
.books-list .stars span {
  color: var(--color-text-gray);
  opacity: 0.2;
  transition:
    color var(--transition-duration-fast) ease-in-out,
    opacity var(--transition-duration-fast) ease-in-out;
}
.books-list ul li:hover .stars {
  color: var(--color-text-white);
}
.books-list ul li:hover .stars span {
  color: var(--color-text-white);
  opacity: 0.4;
}



