html {
  scroll-behavior: smooth;
}

body {
  font-family: "Lato", sans-serif;
  color: #222;
  margin: 0;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid blue;
  outline-offset: 3px;
  border-radius: 8px;
}

input:focus-visible,
textarea:focus-visible {
  outline: 2px solid blue;
  outline-offset: 2px;
}


:focus:not(:focus-visible) {
  outline: none;
}

.skip-link {
  position: absolute;
  left: -999px;
}

.skip-link:focus {
  left: 0;
  background: white;
  padding: 1rem;
  border: 2px solid black;
}

header {
  display: flex;
  flex-direction: row;
  background-color: #F5E5E1;
  justify-content: space-between;
}

.logo-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin-left: 30px;
  font-size: 16px;
  color: #174143;
}

.logo-container a {
  display: flex;
  align-items: flex-end;
}

.logo {
  margin: 0 10px 0 0;
  position: relative;
  top: 5px;
}

.nav-mobile {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  color: #174143;
  padding: 0.8rem 1.5rem;
  width: 50%;
}

.nav-mobile p {
  margin: 2px;
  font-size: 16px;
  color: #174143
}

.hamburger {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  position: relative;
  z-index: 2000;
  border: 1px solid #174143;
  border-radius: 6px;
  padding: 7px;
  background-color: #F5E5E1;
  color: #174143;
}

.hamburger span {
  display: block;
  height: 4px;
  width: 40px;
  background: #174143;
  margin: 4px 0;
  border-radius: 2px;
  transition: transform 0.4s ease, opacity 0.3s ease;
}

.hamburger.active span:nth-child(2) {
  transform: translateY(12px) rotate(45deg);
}

.hamburger.active span:nth-child(3) {
  opacity: 0;
}

.hamburger.active span:nth-child(4) {
  transform: translateY(-12px) rotate(-45deg);
}

.ham-menu-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: absolute;
  top: 50px;
  left: 0;
  right: 0;
  width: 100%;
  height: 400px;
  margin: 0;
  background: #F5E5E1;
  z-index: 1000;

  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0, 4s ease-in-out;
}

.ham-menu-list.show {
  max-height: 400px;
  opacity: 1;
  top: 80px;
  transform: translateY(0);
  transition: all 0.4s ease;
}

.nav-mobile span {
  font-size: 16px;
  display: flex;
  flex-direction: column;
}

.nav-mobile img {
  width: 45px;
  height: auto;
}


.menu-item {
  color: #174143;
  text-decoration: none;
  font-size: 20px;
  padding: 0, 5rem 1rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

@media (max-width: 576px) {
  header {
    height: 16vh;
    width: 100%;
  }

  .nav-mobile {
    margin-right: 18px;
    padding: 0;
  }

  .nav-desktop {
    display: none;
  }

  .hero {
    align-items: center;
    display: flex;
    flex-direction: column;
    margin: 55px 0 45px 0;
  }

  .hero-img {
    width: 90%;
    height: auto;
    border-radius: 10px;
    justify-self: center;
  }
}

@media (min-width: 577px) and (max-width: 1024px) {
  header {
    height: 15vh;
    width: 100%;
  }

  .nav-desktop {
    display: none;
  }

  .hero {
    align-items: center;
    display: flex;
    flex-direction: column;
    margin: 55px 0 45px 0;
  }

  .hero-img {
    width: 90%;
    max-height: 270px;
    object-fit: cover;
    border-radius: 10px;
    justify-self: center;
  }


  @media (min-width: 750px) and (max-width: 1024px) {
    .hero {
      display: flex;
      flex-direction: row;
      margin: 50px 35px;
    }
  }
}


@media (min-width: 1025px) {

  header {
    height: 14vh;
    /* display: flex;
     justify-content: space-between; */
  }

  .nav-mobile {
    display: none;
  }

  .nav-desktop {
    align-self: center;
  }

  .hero {
    display: flex;
    flex-direction: row;
    justify-self: center;
    width: 80%;
    height: auto;
    margin: 90px 0 150px 0;
  }

  .hero-img {
    width: 450px;
    height: auto;
    border-radius: 10px;
    margin-top: 50px;
  }
}

ul {
  list-style-type: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  font-size: 18px;
  gap: 50px;
  margin-right: 100px;
}

li,
a {
  text-decoration: none;
  color: #174143;
}

.nav-button {
  font-size: 18px;
  font-family: "Lato", sans-serif;
  border-radius: 50px;
  padding: 12px 20px;
  border: none;
  background: #174143;
  color: white;
  transition: .3s ease;
}

.hero-text {
  display: flex;
  flex-direction: column;
  font-size: 16px;
  /*minimum text size*/
  margin-left: 35px;
  justify-content: center;
  align-content: center;
}

.motto-text {
  margin-bottom: 10px;
}

.hero-text h1 {
  margin: 0;
}

.hero-buttons {
  display: flex;
  flex-direction: row;
  gap: 20px;
}

.main-button,
.secondary-button,
.third-button {
  font-size: 16px;
  font-family: "Lato", sans-serif;
  border-radius: 50px;
  padding: 12px 20px;
  border: none;
  margin-top: 20px;
  transition: 0.3s ease;
}

.main-button {
  background: #174143;
  color: white;
}

.secondary-button {
  background: #f9b487;
  color: #174143;
}

.third-button {
  background: #fff;
  color: #174143;
  border: 2px solid #174143
}

.main-button:hover,
.nav-button:hover {
  background: #30504d;
}

.secondary-button:hover {
  background: #f7924f;
}

.third-button:hover {
  background: #f7924f;
  color: #174143;
}

/* Books section */
.main-books {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
  padding: 40px 5%;
}

.about-text {
  flex: 1 1 250px;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 16px;
}

.about-text h2 {
  font-size: 2rem;
  color: #000;
}

.about-books {
  flex: 3 1 600px;
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.about-books article {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 220px;
}

.book-cover {
  width: 220px;
  height: 340px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  margin-bottom: 12px;
}

.about-books h3 {
  font-size: 1rem;
  margin-bottom: 10px;
}

.listen-button {
  background-color: #f9b487;
  color: #174143;
  border: none;
  padding: 12px 20px;
  border-radius: 50px;
  margin: 4px 0;
  min-width: 152px;
  cursor: pointer;
  transition: background 0.3s;
}


.read-button {
  background-color: #174143;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 150px;
  margin: 4px 0;
  min-width: 152px;
  cursor: pointer;
  transition: background 0.3s;
}

.listen-button:hover {
  background-color: #f7924f;
}

.read-button:hover {
  background-color: #30504d;
  color: #fff;
}

/* Footer */
footer {
  display: flex;
  justify-content: space-evenly;
  align-items: flex-start;
  background-color: #174143;
  color: #fff;
  padding: 40px 5%;
  flex-wrap: wrap;
  gap: 24px;
}

#logoFooter {
  height: 15vh;
  width: auto;
  padding: 0;
  margin: 0;
}

.foot-contacts {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 1rem;
}

footer h3,
footer p {
  padding-bottom: 0;
  margin: 0;
}

footer a {
  color: #fff;
  transition: color 0.3s;
}

footer a:hover {
  color: #edffd6;
}

.foot-soc-media {
  display: flex;
  align-items: center;
  gap: 20px;
}

footer ion-icon {
  font-size: 36px;
  color: #fff;
  transition: transform 0.3s, color 0.3s;
}

footer ion-icon:hover {
  transform: scale(1.1);
  color: #edffd6;
}

/* Media Quieries */

/* Tablets (max 1024px) */
@media (min-width: 481px) and (max-width: 1024px) {
  .main-books {
    flex-direction: column;
    align-items: center;
  }

  .about-text {
    flex: auto;
    max-width: 600px;
    text-align: center;
  }

  .about-books {
    justify-content: center;
  }

  footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .foot-soc-media {
    justify-content: center;
  }
}

/* Mobile screen (max 480px) */
@media (max-width: 480px) {
  .main-books {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .about-books {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .book-cover {
    width: 160px;
    height: 250px;
  }

  .about-text {
    flex: auto;
  }

  .about-books article {
    max-width: 160px;
  }

  footer {
    gap: 16px;
  }

  footer ion-icon {
    font-size: 28px;
  }
}