* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overscroll-behavior: none;
    box-sizing: border-box;
}

body {
    background-image: url('pictures/pattern.png');
    background-size: 120%;
    background-position: center;
    background-repeat: no-repeat;
    font-family: Arial, sans-serif;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

.background-container {
    position:relative;
    min-height: 240vh;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.2);
}

.picture-item {
    position: absolute;
    width:auto;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.picture {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.text-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.text-box h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
}

.text-box p {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.picture-item:hover {
    transform: scale(1.05);
    z-index: 10;
}

.picture-item:hover .picture {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.book-container {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  padding: 50px;
  justify-content: center;
  box-sizing: border-box;
}

/* 2. The Wrapper (This now controls the size) */
.book-card {
  position: relative;  /* Creates an anchor for the label to stick to */

  /* The math moves here: (100% - 5 gaps of 20px) / 6 items */
  width: calc((100% - 100px) / 7); 

  display: flex;       /* Removes tiny gaps under images */
  flex-direction: column;
}

/* 3. The Image */
.book-card img {
  width: 100%;         /* Forces image to fill the card */
  height: auto;
  display: block;      /* Fixes alignment issues */
  object-fit: cover;
}

.book-author {
  position: absolute;
  top: 10mm;
  left: 55%;
  transform: translateX(-50%);
  color: white;
  font-weight: bold;
  font-size: 1.5rem;
  text-align: center;
}

.book-name {
  position: absolute;
  bottom: 10mm;
  left: 55%;
  transform: translateX(-50%);
  color: white;
  font-weight: bold;
  font-size: 1.5rem;
  text-align: center;
}




