/* Reset & body */
body {
  margin: 0;
  font-family: 'Georgia', serif;
  background: #f9f9f9;
  color: #333;
  text-align: center;
}

/* Header */
header {
  padding: 60px 20px 30px; /* top, left/right, bottom */
}

h1 {
  font-size: 2.5em;
  margin-bottom: 0.2em;
}

.tagline {
  font-style: italic;
  color: #666;
}

/* Books grid */
.books {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* desktop default */
  gap: 15px 15px;      /* row gap 15px, column gap 15px */
  justify-items: center;
  padding: 0px 120px;  /* space around grid edges */
}

.books a img {
  width: 100%;
  max-width: 280px;     /* larger covers */
  height: auto;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin: 15px 0;       /* vertical space between rows */
}

.books a img:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* About section */
.about {
  max-width: 600px;
  margin: 60px auto;   /* space above & below */
  padding: 0 20px;
  text-align: center;
}

/* Contact section */
.contact {
  margin: 40px auto;
  padding: 0 20px;
}

.button {
  display: inline-block;
  margin: 20px;
  padding: 10px 20px;
  background: #333;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  transition: background 0.2s ease;
}

.button:hover {
  background: #555;
}

/* Footer */
footer {
  padding: 20px;
  color: #888;
  font-size: 0.9em;
}

/* Responsive breakpoints */

/* Medium screens (small desktop / large tablet) */
@media (max-width: 1200px) {
  .books {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Tablet screens */
@media (max-width: 900px) {
  .books {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile screens */
@media (max-width: 768px) {
  .books {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 40px 20px;
  }

  .books a img {
    max-width: 90vw;
    margin: 10px 0;
  }
}
