:root {
  --yellow-lighter: #fdfdec;
  --yellow-light: #f8f8b4;
  --yellow: #f4f482;
  --green-lime: #bdf195;
  --green-blue: #15e6cd;
  --blue-light: #31bfda;
  --blue: #3b94b5;
  --blue-dark: #407fa3;
  --green: #206466;
  --green-dark: #004829;
}
/* -- -- */
body {
  font-family: "Montserrat", sans-serif;
  font-weight: 300;
  line-height: 1.1;
  background-image: url('/public/assets/img/bgMinisterio.jpg');
  background-attachment: fixed;
  overflow-x: hidden;
  background-size: cover;
}

body::before{
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/public/assets/img/suit.png');
    background-attachment: fixed;
    opacity: 0.3;
    pointer-events: none;
}

em {
  font-style: italic;
}

* {
  box-sizing: border-box;
}

.container {
  min-height: 100vh;
  max-width: 70rem;
  margin: auto;
  padding: 1rem 8rem 1rem 12rem;
}

h1 {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.03rem;
  line-height: 1;
  color: var(--green);
  font-size: clamp(2.5rem, 6vw, 5rem);
  margin: 2rem auto 1rem;
  width: 100%;
}

h1 small {
  display: none;
}

@media (max-width: 1024px) {
  h1 {
    text-align: center;
  }
  h1 br {
    display: none;
  }
}

@media (min-width: 1024px) {
  h1 {
    line-height: 0.9;
    position: relative;
  }
  h1 span {
    display: inline-block;
    margin-top: 14rem;
  }
  h1 small {
    display: block;
    position: absolute;
    font-weight: 300;
    font-size: clamp(1rem, 1.8vw, 1.3rem);
    text-transform: none;
    top: 30%;
    right: 110%;
    height: 60%;
    line-height: 1.2;
  }
  h1 small span {
    display: inline-block;
    transform: translate(0.15rem, 0.2rem);
    margin-top: 0;
    font-size: 140%;
    font-family: "Dancing Script", cursive;
  }
}

h4 {
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(1.5rem, 1.5vw, 1.5rem);
  line-height: 1;
}

.kdrama {
  background: var(--yellow);
  color: var(--green);
}

.anime {
  background: var(--green-blue);
  color: var(--yellow-lighter);
}

.western {
  background: var(--blue-light);
  color: var(--yellow-lighter);
}

.box {
  padding: 1.5rem;
  margin: 1rem auto;
}

.box p {
  margin-top: 0.5rem;
  font-size: clamp(1rem, 1.2vw, 1rem);
}

/* Estilo unificado para as Capas dos Livros (PNG) */
.box[style*="--bg-img"] {
  padding-right: 110px; /* Evita que o texto encavale com a capa */
}
.box[style*="--bg-img"]::after {
  content: "";
  position: absolute;
  width: 80px;
  height: 115px;
  background: var(--bg-img) no-repeat center center / cover;
  bottom: 15px;
  right: 15px;
  border-radius: 5px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.25);
  z-index: 2;
  transition: transform 0.3s ease;
}
.box:hover[style*="--bg-img"]::after {
  transform: translateY(-10px) scale(1.05);
}

/* --- NOVO GRID RESPONSIVO E AUTOMÁTICO --- */
@media (min-width: 700px) {
  .box {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;    
    margin: 0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
    position: relative;
  }
  .box:hover { transform: translateY(-5px); }

  .container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    grid-auto-rows: minmax(160px, auto);
    grid-auto-flow: dense; /* A mágica do Masonry acontece aqui */
    gap: 1.5rem;
    padding: 2rem;
  }
  h1, .legend {
    grid-column: 1 / -1; /* Faz o título e a legenda ocuparem a linha inteira */
    text-align: center;
  }
  h1 br, h1 small { display: none; }

  /* Efeito para variar o tamanho de alguns cards e criar o mosaico */
  .box:nth-child(5n+1) { grid-row-end: span 2; }
  .box:nth-child(7n+3) { grid-column-end: span 2; }
}

.more-info {
  display: flex;
  align-items: center;
  background: var(--blue-dark);
  color: var(--yellow-light);
}

.more-info a {
  color: var(--yellow-light);
}

.more-info .image {
  flex: 0 0 30%;
  max-width: 10rem;
  line-height: 0;
}

.more-info .image img {
  width: 100%;
}

.more-info p {
  flex: 1;
  padding: 0 1.5rem;
}

footer{
    display:none !important;
}