@font-face {
    font-family: "Lexend";
    src: url(/fonts/Lexend-VariableFont_wght.ttf);
}

* {
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
  }

header {
    position: relative;
  align-items: center;
  justify-content: flex-start; /* button stays left */
  padding: 60px 20px 40px;
  animation: appear 1s;
  animation-timing-function: ease-in-out;

}

header h1 {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-size: 48px;
  color: #FFFFFF;
}

header h2 {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 4em;
  font-size: 25px;
  color: #FFFFFF;
}

.sidebar {
  height: 100%;
  width: 0;
  position: fixed;
  z-index: 1;
  top: 0;
  left: 0;
  background-color: #111;
  overflow-x: hidden;
  transition: 0.5s ease;
  padding-top: 60px;
  white-space: nowrap;
}

.sidebar a {
  padding: 8px 8px 8px 32px;
  text-decoration: none;
  font-size: 25px;
  color: #FFFFFF;
  display: block;
  transition: 0.3s;
}

.sidebar a:hover {
  color: #818181;
}

.sidebar .closebtn {
  position: absolute;
  top: 10px ;
  right: 25px;
  font-size: 36px;
  margin-left: 50px;
}

.openbtn {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 34px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #FFFFFF;
    padding: 10px 15px;
}

#main {
  padding: 16px;
  animation: appear 1s;
  animation-timing-function: ease-in;
}

.nav-container {
    position: relative;
    height: 60px;
}

#title-logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

#title-logo img {
    height: 100px;
}

.flag-container {
  position: fixed;
  top: 15px;
  right: 20px;
  display: flex;
  gap: 10px;
  z-index: 2000;
}

.flag-container img {
  width: 35px;
  height: auto;
  cursor: pointer;
  border-radius: 4px;
  transition: transform 0.2s ease;
}

.flag-container img:hover {
  transform: scale(1.1);
}

#language-flags {
  position: absolute;
  top: 55px;
  right: 35px;
  display: flex;
  gap: 20px;
  z-index: 9999;
  padding: 6px 10px;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
}

.flag {
  width: 36px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.flag:hover {
  transform: scale(1.1);
  opacity: 0.9;
}

body {
    margin: 0;
    background-image: linear-gradient(black, red);
}

#wrapper {
    padding-left: 15%;
    padding-right: 15%;
    animation: appear 1s;
    animation-timing-function: ease-in;

}

#book-container {
    animation: appear 2.5s;
    animation-timing-function: ease-out;

}

#author-page-container {
    padding-left: 15%;
    padding-right: 15%;
    margin-bottom: 10%;
    margin-top: 2%;
    color: #FFFFFF;
    animation: appear linear;
    animation-timeline: view();
    animation-range: entry 0% cover 40%;
    animation-timing-function: ease-in-out;
}

#author-page-container h2 {
    font-size: 48px;
    font-family: Lexend;
    font-weight: 500;
}

#author-page-container p {
    font-size: 22px;
    font-family: Lexend;
    font-weight: 200;
    line-height: 1.5em;

}

#book-cover img {
    float: left;
    width: auto;
    height: auto;
}

#wrapper h1 {
    color: #FFFFFF;
    text-align: center;
    padding-top: 1em;
    font-size: 48px;
    animation: appear 2s;
    animation-timing-function: ease-in-out;
    font-family: Lexend;
    font-weight: 500;
}

#author-page-container img{
    float: right;
    width: 40%;
    height: auto;
    margin-left: 5%;
    margin-bottom: 3em;
}

hr {
    border: 2.5px solid white;
    align-items: center;
}

aside h2 {
    font-size: 30px;
}


aside strong {
    font-weight: 600;
}

#side-text {
    margin-top: 5%;
    color: #FFFFFF;
}


#side-text h2{
    text-align: center;
    font-size: 36px;
    font-family: Lexend;
    font-weight: 350;
}

#side-text p {
    font-family: Lexend;
    font-weight: 200;
    font-size: 24px;
    line-height: 1.5em;
}

#side-text strong {
    font-weight: 600;
}

#buttons a:link, a:visited {
  background-color: white;
  padding: 15px 30px;
  text-align: center;
  text-decoration: none;
  font-family: Lexend;
  font-weight: 300;

}

#buttons a:hover, a:active {
  opacity: 80%;
}

#buttons {
    display: inline-flex;
    flex-direction: column;
    margin-bottom: 3em;
    margin-top: 2em;
    margin-left: 20%;
    margin-right: 66%;
}

.custom-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    justify-content: center;
}

#buttons img {
    width: 15%;
    height: auto;
}

#buttons-2 {
  align-items: center;
  justify-content: center;
}


#buttons-2 a:link, a:visited {
  background-color: #ffffff;
  padding: 15px 30px;
  text-align: center;
  text-decoration: none;
  font-family: Lexend;
  font-weight: 300;
  width: 70%;
  margin-left: 15%;
  margin-right: 15%;
  margin-bottom: 5%;
  gap: 15px;
}

.full-width-img {
  width: 100%;
  height: auto;
  display: block;
}

.small-icon {
  width: 15%;
  height: auto;
  vertical-align: middle;
}

#author-page {
    padding-left: 15%;
    padding-right: 15%;
}

#img-grid img {
    width: 100%;
    height: auto;
    animation: appear linear;
    animation-timeline: view();
    animation-range: entry 0% cover 40%;
    animation-timing-function: ease-in-out;
}

#container-1 h1 {
    text-align: center;
    font-size: 4em;
padding: 1em;
margin-bottom: 0;
}

#container-1 {
  padding-left: 10%;
  padding-right: 10%;
  text-align: center;
  padding-bottom: 2em;
}

#name-list {
    color: #FFFFFF;
}

#name-list ul {
    list-style-type: none;
    padding: 1em;
}

#name-list li {
    font-size: 24px;
    text-align: center;
    line-height: 1.5em;
    font-family: Lexend;
    font-weight: 300;
}

#image-tile {
  text-align: center;
}

.center-title {
  display: block;           /* ensures block behavior */
  width: 100%;              /* full width of parent */
  text-align: center;       /* center text */
  clear: both;              /* avoid float issues from boxes */
  margin: 0 auto 1.5em;     /* centers block and spacing */
  font-size: 4em;
  color: #FFFFFF;
  font-family: Lexend;
  font-weight: 500;
  animation: appear 2s;
  animation-timing-function: ease-in-out;
  font-family: Lexend;
  
}

#box-1 {
    width: auto;
    height: 400px;
    background-color: #A03233;
    animation: appear linear;
    animation-timeline: view();
    animation-range: entry 0% cover 60%;
    animation-timing-function: ease-out;
}

#box-1 img {
  float: left;
  width: auto;
  height: auto;
  padding: 2em;
  padding-left: 7em;
}

.box-1-content {
  padding: 1em;
}

.box-1-content h2 {
  text-align: center;
  font-size: 48px;
  color: #FFFFFF;
  font-family: Lexend;
  font-weight: 400;
}

.box-1-content p {
  font-size: 24px;
  padding-right: 5%;
  padding-left: 40%;
  color: #FFFFFF;
  font-family: Lexend;
  font-weight: 300;
}

#box-2 {
  width: auto;
  height: 400px;
  background-color: #BF6564;
  animation: appear linear;
  animation-timeline: view();
  animation-range: entry 0% cover 60%;
  animation-timing-function: ease-out;
}

#box-2 img {
  float: right;
  width: auto;
  height: auto;
  padding: 2em;
  padding-right: 7em;
}

.box-2-content {
  padding: 1em;
}

.box-2-content h2 {
  text-align: center;
  font-size: 48px;
  color: #FFFFFF;
  font-family: Lexend;
  font-weight: 400;
}

.box-2-content p {
  font-size: 24px;
  padding-right: 40%;
  padding-left: 5%;
  color: #FFFFFF;
  font-family: Lexend;
  font-weight: 300;
}

#box-3 {
  width: auto;
  height: 400px;
  background-color: #DD989B;
  animation: appear linear;
  animation-timeline: view();
  animation-range: entry 0% cover 60%;
  animation-timing-function: ease-out;
}

#box-3 img {
  float: left;
  width: auto;
  height: auto;
  padding: 2em;
  padding-left: 7em;
}

.box-3-content {
  padding: 1em;
}

.box-3-content h2 {
  text-align: center;
  font-size: 48px;
  color: #000000;
  font-family: Lexend;
  font-weight: 400;
}

.box-3-content p {
  font-size: 24px;
  padding-right: 40%;
  padding-left: 5%;
  font-family: Lexend;
  font-weight: 300;
}


#box-4 {
    width: auto;
    height: 400px;
    background-color: #F1CECA;
    animation: appear linear;
    animation-timeline: view();
    animation-range: entry 0% cover 60%;
    animation-timing-function: ease-out;
}

#box-4 img {
    float: right;
    width: auto;
    height: auto;
    padding: 2em;
    padding-right: 7em;
}

.box-3-content {
    padding: 1em;
}

#box-4 {
  width: auto;
  height: 400px;
  background-color: #F1CECA;
  animation: appear linear;
  animation-timeline: view();
  animation-range: entry 0% cover 60%;
  animation-timing-function: ease-out;
}

#box-4 img {
  float: right;
  width: auto;
  height: auto;
  padding: 2em;
  padding-right: 7em;
}

.box-4-content {
  padding: 1em;
}

.box-4-content h2 {
  text-align: center;
  font-size: 48px;
  color: #000000;
  font-family: Lexend;
  font-weight: 400;
}

.box-4-content p {
  font-size: 24px;
  padding-right: 5%;
  padding-left: 40%;
  color: #000000;
  font-family: Lexend;
  font-weight: 300;
}

#box-5 {
  width: auto;
  height: 400px;
  background-color: #FFFFFF;
  animation: appear linear;
  animation-timeline: view();
  animation-range: entry 0% cover 60%;
  animation-timing-function: ease-out;
}

#box-5 img {
  float: left;
  width: auto;
  height: auto;
  padding: 2em;
  padding-left: 7em;
}


.accordion-group {
    margin-bottom: 10px; /* Space between each accordion+panel group */
  }

.accordion {
  background-color: #F6B2B2;
  color: #FFFFFF;
  cursor: pointer;
  padding: 18px;
  width: 100%;
  text-align: left;
  border: none;
  outline: none;
  font-family: Lexend;
  font-size: 22px;
  font-weight: 300;
  transition: 0.4s;
  animation: appear linear;
  animation-timeline: view();
  animation-range: entry 0% cover 50%;
  animation-timing-function: ease-out;

}

/* Add a background color to the button if it is clicked on (add the .active class with JS), and when you move the mouse over it (hover) */
.active, .accordion:hover {
  background-color: #ccc;
}

/* Style the accordion panel. Note: hidden by default */
.panel {
  padding: 0 18px;
  background-color: white;
  display: none;
  overflow: hidden;
}

.panel li {
    font-family: Lexend;
    font-size: 18px;
    font-weight: 300;
    text-align: left; 
}

.panel strong {
    font-weight: 600;
}

.responsive-iframe-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    /* Adjust padding-top for the desired aspect ratio */
    /* For 16:9 aspect ratio (common for videos): 9 / 16 * 100% = 56.25% */
    padding-top: 56.25%; 
  }
  
  .responsive-iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
  }


  .rev-section{
    margin: auto;
    padding: 0 1rem;
    max-width: 1100px;
    text-align: center;
  }
  
  .title{
    font-size: 3.5rem;
    color: rgb(50, 50, 50);
    margin-bottom: .5rem;
    color:#fff;
    font-family:cursive;
  }

  .reviews{
margin: 2rem auto;
    display: grid;
    flex-wrap: wrap;
    grid-template-columns: repeat(3, 1fr); /* 3 columns */
    justify-content: center; /* center all reviews */
    gap: 2rem;              /* space between review cards */
    align-items: stretch;    /* ensure all cards stretch equally */
  }

  .review{
    flex: 1 1 300px;         /* flexible, minimum width 300px */
    max-width: 350px;        /* prevents card from stretching too wide */
    margin: 0 auto;
    display: flex;            /* allows inner .body-review to stretch */
  }
  
.rating img {
    width: 24px;
    height: 24px;
}  
  .body-review{
background-color: #FFFFFF;
    padding: 2.5em;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 
                0 6px 20px 0 rgba(0, 0, 0, 0.19);
    flex: 1;                  /* make all cards stretch to fill .review height */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 350px;        /* base height for uniformity */
  }
  .name-review{
    color: rgb(253, 180, 42);
    margin: 1rem 0;
    display: flex;
    justify-content: center;
    gap: 0.25rem;
  }
  .place-review{
    color: violet;
    font-style: italic;
  }
  .rating{
    color: rgb(253, 180, 42);
    margin: 1rem 0;
  }
.desc-review {
    line-height: 1.5rem;
    letter-spacing: 1px;
    color: rgb(100, 100, 100);
    text-align: justify;
    flex-grow: 1;
}

#book-preview {
  width: 100%;
  gap: 2em;
  margin: 2rem auto;
  display: grid;
  flex-wrap: wrap;
  grid-template-columns: repeat(2, 1fr); /* 3 columns */
  justify-content: center; /* center all reviews */
  align-items: stretch;    /* ensure all cards stretch equally */
}

.footer {
display: block;
    box-sizing: border-box;
    background-color: #FFFFFF;
    padding-bottom: 40px;
    text-align: center;
    margin-top: 3%;
    padding-left: 15%;
    padding-right: 15%;
  }

#container-1 p {
    color: #FFFFFF;
    text-align: center;
    font-family: Lexend;
    font-size: 18px;
}

#container-1 a {
    text-decoration: none;
}

.footer img {
 width: 20%;
    max-width: 250px;   /* prevents image from getting too big */
    height: auto;
    padding: 20px;
    display: block;
    margin: 0 auto;
  }

.footer hr {
    border: 2.5px solid red;
}

.footer-list {
display: flex;            
  justify-content: center;   /* center horizontally */
  gap: 20px;                 /* space between each <p> */
  flex-wrap: wrap;           /* wrap if screen is too small */
  align-items: center;       /* vertically center items */
  margin: 0;
  padding: 2em;
}

.footer-list a {
  margin: 0;                /* remove default margin */
  text-decoration: none;
  color: #000000;
}

.footer-list h5 {
    color: #565656;
    font-size: 17px;
}

@keyframes appear {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (max-width: 480px) {
  /* Logo & Header */
  #title-logo img { height: 60px; }

  .openbtn {
    font-size: 20px;
    margin-top: 1em;
  }

  #language-flags {
    right: 15px;
    gap: 10px;
    padding: 4px 6px;
    display: inline-grid;
  }

  .flag {
    width: 28px;
    height: 18px;
  }

  #wrapper { padding: 0 5%; }

  #wrapper h1 { font-size: 24px; text-align: center; }

  #side-text h2 { font-size: 16px; text-align: center; }
  aside p { font-size: 14px; text-align: center; }

  #book-cover img,
  #author-page-container img {
    width: 100%;
    height: auto;
    margin: 1em 0;
  }

  #buttons,
  #buttons-2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 1em auto;
    text-align: center;
    gap: 10px;
  }

  .custom-btn {
    width: 80%;
    max-width: 300px;
  }

  #author-page { padding: 0 5%; }

  #author-page-container h2 {
    text-align: center;
    font-size: 20px;
  }

  #author-page-container p {
    text-align: center;
    font-size: 14px;
  }

  /* Image Tile / Boxes */
  #container-1 h1,
  #image-tile h1 {
    font-size: 1.5em;
    text-align: center;
  }

  #box-1, #box-2, #box-3, #box-4, #box-5 {
    height: auto;
    padding-bottom: 1.5em;
  }

  #box-1 img,
  #box-2 img,
  #box-3 img,
  #box-4 img,
  #box-5 img {
    float: none;
    display: block;
    margin: 0 auto;
    width: 90%;
    height: auto;
    padding: 1em;
  }

  .box-1-content,
  .box-2-content,
  .box-3-content,
  .box-4-content {
    text-align: center;
    padding: 0 1em;
  }

  .box-1-content h2,
  .box-2-content h2,
  .box-3-content h2,
  .box-4-content h2 {
    font-size: 20px;
    margin-top: 0.5em;
  }

  .box-1-content p,
  .box-2-content p,
  .box-3-content p,
  .box-4-content p {
    font-size: 14px;
    padding: 0 5%;
  }

  /* Accordion */
  .accordion { font-size: 16px; }
  .panel li { font-size: 14px; }

 .reviews {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;  /* center single-column reviews */
        grid-template-columns: repeat(1, 1fr); /* 3 columns */
    }
        .title {
        font-size: 2rem;
    }
.body-review {
        min-height: 350px;    /* keeps all cards same height */
        padding: 1.5em;
    }
        .desc-review {
        font-size: 0.9rem;
    }
    .rating img {
        width: 20px;
        height: 20px;
    }
      #side-text p {
    font-size: 14px;
  }

   .footer img {
        width: 50%;  /* takes more width on mobile */
    }


}

/* ====================================================== */
/* 💻 TABLET (481px–1024px) — merged version             */
/* ====================================================== */
@media (min-width: 481px) and (max-width: 1024px) {
  #wrapper { padding: 0 10%; }

  #wrapper h1 { font-size: 36px; }

  #side-text h2 { font-size: 24px; }
  aside p { font-size: 18px; text-align: center; }

  #book-cover img,
  #author-page-container img {
    width: 50%;
    height: auto;
    display: block;
    margin: 1em 1em;
  }

  #buttons,
  #buttons-2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 1em auto;
    gap: 15px;
  }

  .custom-btn {
    width: 60%;
    max-width: 400px;
  }

  #author-page-container h2 {
    font-size: 28px;
  }

  #author-page-container p {
    text-align: left;
    font-size: 18px;
  }

  #box-1, #box-2, #box-3, #box-4, #box-5 {
    height: auto;
    padding: 1em 0;
  }

  #box-1 img,
  #box-2 img,
  #box-3 img,
  #box-4 img,
  #box-5 img {
    float: none;
    width: 70%;
    height: auto;
    margin: 0 auto;
    padding: 1em;
  }

  .box-1-content h2,
  .box-2-content h2,
  .box-3-content h2,
  .box-4-content h2 {
    font-size: 24px;
  }

  .box-1-content p,
  .box-2-content p,
  .box-3-content p,
  .box-4-content p {
    font-size: 16px;
    padding: 0 10%;
  }

  .accordion { font-size: 18px; }
  .panel li { font-size: 16px; }

      .title {
        font-size: 2.8rem;
    }
    .body-review {
        min-height: auto;       /* let height adjust based on content */
        padding: 2em;
    }
    .desc-review {
        font-size: 0.95rem;
    }
    .rating img {
        width: 22px;
        height: 22px;
    }

#name-list li {
    font-size: 18px;
    text-align: center;
    line-height: 1.5em;
    font-family: Lexend;
    font-weight: 300;
}

.reviews {
    grid-template-columns: repeat(1, 1fr); /* 3 columns */

}  

 .footer img {
        width: 50%;  /* takes more width on mobile */
    }    

}

/* ====================================================== */
/* 🖥️  General max-width rule (for safety)                */
/* ====================================================== */
@media (max-width: 1024px) {
  #box-1, #box-2, #box-3, #box-4, #box-5 {
    height: auto;
  }

     .body-review {
        min-height: 350px;    /* keeps cards same height on tablet */
        padding: 2em;
    }

    #book-preview {
      grid-template-columns: repeat(1, 1fr); /* 3 columns */
    }

}

@media (min-width: 1024px) {
  .reviews {
    flex-wrap: nowrap;        /* prevent wrapping */
    justify-content: space-between; /* spread cards evenly */
    align-items: stretch;     /* make all cards equal height */
    grid-template-columns: repeat(3, 1fr); /* 3 columns */
  }

  .review {
    flex: 1 1 0;              /* all cards take equal width */
    max-width: none;          /* remove max-width restriction */
    margin: 0 0.5rem;         /* small spacing between cards */
  }

  .body-review {
    min-height: 350px;        /* all cards same height */
  }

  
}