/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;500;600;700&family=Poppins:wght@300;400;700&display=swap');

html {
  scroll-behavior: smooth;
}

a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 3px solid #007bff !important;
  outline-offset: 2px;
}

/* General Styles */
body {
  font-family: 'Poppins', sans-serif;
  overflow-x: hidden !important;
  width: 100%;
  max-width: 100%;
}

/* Header Styles */
header {
  position: absolute;
  width: 100%;
  background-color: transparent;
  padding: 0.75em 0;
}

header #logo {
  width: 100%;
  max-width: 244px;
}

header #book-taco-logo {
  width: 100%;
  max-width: 296px;
}

#navbarNav ul {
  gap: 9px;
  align-items: center;
}

#navbarNav ul li a {
  color: #FFF;
  font-weight: 600;
  font-size: 20px;
  font-family: 'Nunito', sans-serif;
}

#navbarNav ul li a:hover {
  color: #FFF;
  text-decoration: none;
}

/* Button Styles */
.btn-cta {
  display: inline-flex;
  padding: 16px 24px;
  justify-content: center;
  align-items: center;
  gap: 16px;
  border-radius: 55px;
  color: #0F7A58;
  font-weight: bold;
  font-size: 18px;
  background: linear-gradient(135deg, #E7FFD1, #B8FFA9);
  border: 1px solid #00800017;
  transition: all 0.3s ease-in-out;
  position: relative;
  overflow: hidden;
}

.btn-cta::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -150%;
  width: 200%;
  height: 200%;
  background: linear-gradient(30deg,
      transparent 20%,
      rgba(255, 255, 255, 0.6) 50%,
      transparent 80%);
  animation: sword-glow 4s infinite 2s cubic-bezier(0.4, 0, 0.2, 1);
  transform: rotate(30deg);
  pointer-events: none;
}

@keyframes sword-glow {
  0% {
    transform: translateX(-100%) rotate(30deg);
  }

  100% {
    transform: translateX(200%) rotate(30deg);
  }
}

.btn-cta:hover,
.btn-cta:active,
.btn-cta:hover,
.btn-cta:focus-visible {
  background: linear-gradient(135deg, #D4F5BC, #A0E895) !important;
  color: #0C5D43 !important;
  transform: scale(1.02);
}

.btn-cta:hover::before {
  opacity: 0.8;
  animation-duration: 1.5s;
}

.btn-cta img {
  transition: transform 0.3s ease;
}

.btn-cta:hover img {
  transform: translateX(8px);
}

.card {
  border: 0;
  display: inline-block;
  transition: all 0.3s ease;
}

.card img {
  transition: all 0.3s ease;
  width: 100%;
  border-radius: 10px;
}

.card img:hover {
  transform: scale(1.1);
}

.emoji {
  -webkit-background-clip: initial;
  -webkit-text-fill-color: initial;
}

@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50.2222%);
  }
}

@keyframes scroll-right {
  0% {
    transform: translateX(-50.2222%);
  }

  100% {
    transform: translateX(0);
  }
}

/* Footer Styles */
footer {
  background: #252525;
  padding: 2em 0;
}

footer a {
  color: #B2B3CF;
  text-decoration: none;
}

footer a:hover {
  cursor: pointer;
  color: #FFF;
}

footer span {
  color: #B2B3CF;
  display: block;
}

/* Inner Header */
#inner-header {
  background: #e9f8ff;
  padding: 1.6em;
}

#inner-header h1 {
  font-weight: bold;
  margin-bottom: 0;
  color: #004379;
}

/* Cookie Banner */
#cookie-banner {
  background: #ffffffcf;
  padding: 1em 1em;
  border-radius: 7px;
  flex-direction: column;
  max-width: 390px;
  margin: 0 auto;
  gap: 10px;
  bottom: 8px;
  align-items: center;
  justify-content: center;
  text-align: center;
  right: 10px;
  left: auto;
  backdrop-filter: blur(5px);
  border: 2px solid #EAEAEA;
  box-shadow: 1px 1px 9px -2px #CCC;
  display: none;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* --- HERO SECTION --- */
.hero {
  height: 20rem;
  display: flex;
  align-items: end;
  background: linear-gradient(to right, #e8f5e9, #e3f2fd);
}

/* Grade filter pills colors */
.bg-grades1 {
  background: linear-gradient(45deg, #2196F3, #1976D2);
}

.bg-grades2 {
  background: linear-gradient(45deg, #4CAF50, #388E3C);
}

.bg-grades3 {
  background: linear-gradient(45deg, #9C27B0, #7B1FA2);
}

/* --- DETAILS --- */
.book-details {
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
}

.book-title {
  font-size: 14px;
  font-weight: 700;
  color: #344563;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  min-height: 2.6em;
  /* 2 linhas * 1.3 line-height */
  max-height: 2.6em;
}

.book-author {
  font-size: 12px;
  color: #5a5a5a;
  margin-bottom: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Call to Action Banner Styles */
.cta-banner {
  background: linear-gradient(to bottom right, #E8F5E9 0%, #FFF 75%, #E3F2FD 100%);
  padding-top: 3em;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cta-banner img {
  max-width: 100%;
}

.cta-banner h5 {
  color: #394B55;
  font-size: 46px;
  font-style: normal;
  font-weight: 700;
  line-height: 59px;
}

.cta-banner h6 {
  margin-top: 1em;
  color: #1C272D;
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: 30px;
}

.powered-by-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-left: auto;
  position: relative;
}

.powered-by-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.powered-by-link:hover {
  background: rgba(237, 152, 48, 0.1);
  transform: translateY(-2px);
}

.powered-by-text {
  color: #ed9830;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s ease;
}

.powered-by-logo {
  height: 24px;
  width: auto;
  transition: all 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.powered-by-link:hover .powered-by-logo {
  filter: drop-shadow(0 4px 8px rgzba(237, 152, 48, 0.2));
}

.powered-by-link:hover .powered-by-text {
  color: #ff8c00;
}

/* Media Queries */
/* Small devices (landscape phones, 576px and up) */
@media (max-width: 767px) {
  .book-grid {
    grid-template-columns: 1fr;
  }

  body {
    padding: 0 !important;
  }

  header {
    z-index: 2;
  }

  header #logo {
    width: 100%;
    max-width: 224px;
  }

  .hero {
    min-height: 34rem;
    padding: 1.5rem 0;
  }

  .hero h1 {
    font-size: 1.75rem;
    padding: 0 1rem;
  }

  .hero p {
    font-size: 0.95rem;
  }

  .hero .grade-filters {
    gap: 0.25rem;
    padding: 0 0.5rem;
  }

  .hero .pill-bubble {
    padding: 0.35rem 0.75rem;
    gap: 4px;
  }

  .hero .emoji-wrapper {
    font-size: 1.1rem;
  }

  .btn-cta {
    padding: 10px 18px;
    font-size: 14px;
  }

  .btn-top50 {
    padding: 10px 24px !important;
    font-size: 12px !important;
    width: 90%;
    max-width: 320px;
    text-align: center;
    justify-content: center;
  }

  .btn-top50-content {
    justify-content: center;
    gap: 8px;
  }

  .powered-by-wrapper {
    margin-left: 0;
    margin-top: 4px;
  }
  
  .powered-by-text {
    font-size: 8px;
  }
  
  .powered-by-logo {
    height: 18px;
  }

  .hero > .container .btn-warning {
    width: 100%;
  }

  .navbar-toggler {
    background: #FFF !important;
    color: #A03EEA !important;
  }

  #navbarNav ul {
    align-items: flex-start;
    padding: 2em;
  }

  #navbarNav ul li {
    margin-bottom: 1em;
  }

  #navbarNav ul li a {
    display: block;
    text-align: left;
    width: 100%;
  }
}

@media (min-width: 768px) and (max-width: 992px) { /* lg */
  .book-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  header {
    z-index: 2;
  }

  .hero {
    min-height: 26rem;
  }
  
  #navbarNav ul li a {
    font-size: 16px;
  }
}

@media (min-width: 992px) and (max-width: 1200px) { /* xl */
  .book-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero {
    min-height: 24rem;
  }
}

@media (min-width: 1200px) and  (max-width: 1400px) { /* xxl */
  .book-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  header #logo {
    width: 364px;
  }
}

@media (min-width: 1400px) and (max-width: 1799px) {

}