/* ===== Base ===== */
* { box-sizing: border-box; }

body {
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
  padding: 0;
  color: #333;
  line-height: 1.6;
}

/* Fixed, viewport-sized background layer that content scrolls over.
   Reliable on mobile, where `background-attachment: fixed` is not. */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('https://images.unsplash.com/photo-1506744038136-46273834b3fb?auto=format&fit=crop&w=1500&q=80') no-repeat center center;
  background-size: cover;
  z-index: -1;
}

a { color: #007bff; }

/* ===== Header / Navigation ===== */
.site-header {
  background: #1f3a5f;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 12px 24px;
  gap: 8px;
}

.site-title {
  color: #fff;
  font-size: 1.3em;
  font-weight: bold;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.site-nav a {
  color: #dbe6f5;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 0.98em;
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.site-nav a.active {
  background: #007bff;
  color: #fff;
}

/* ===== Layout ===== */
.container {
  max-width: 800px;
  margin: 40px auto;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 32px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.container.wide {
  max-width: 1000px;
}

h1 { text-align: center; color: #333; margin-top: 0; }
h2 { color: #1f3a5f; }
.lead { font-size: 1.1em; text-align: center; color: #444; }
.text-center { text-align: center; }

/* Call-to-action button (link styled as button) */
.btn {
  display: inline-block;
  background: #007bff;
  color: #fff;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 4px;
  font-size: 1em;
  margin-top: 8px;
}
.btn:hover { background: #0056b3; }

/* ===== Books ===== */
.language-section { margin-bottom: 40px; }

.language-title {
  border-bottom: 2px solid #1f3a5f;
  padding-bottom: 6px;
  margin-bottom: 20px;
}

.books {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  margin-bottom: 16px;
}

.book {
  background: #f0f0f0;
  padding: 16px;
  border-radius: 6px;
  width: 240px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.book img {
  width: 120px;
  height: 180px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 12px;
  background: #ddd;
  cursor: pointer;
}

.book-title { font-weight: bold; font-size: 1.1em; margin-bottom: 4px; text-align: center; }
.book-author { font-size: 0.95em; color: #555; margin-bottom: 8px; text-align: center; }
.book-desc { font-size: 0.95em; color: #444; margin-bottom: 8px; text-align: center; }
.book-desc-esp { font-size: 0.9em; color: #666; font-style: italic; text-align: center; }

/* ===== Forms ===== */
form { display: flex; flex-direction: column; gap: 12px; }
label { font-weight: bold; }
input, select, textarea { padding: 8px; border-radius: 4px; border: 1px solid #bbb; font-family: inherit; }
fieldset { border: 1px solid #ccc; border-radius: 6px; }
.form-group-label { font-weight: bold; color: #1f3a5f; margin: 12px 0 4px; }
button {
  background: #007bff;
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 4px;
  font-size: 1em;
  cursor: pointer;
}
button:hover { background: #0056b3; }

/* ===== Footer ===== */
.site-footer {
  text-align: center;
  color: #eee;
  padding: 24px 16px;
  font-size: 0.9em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* ===== Lightbox ===== */
.lightbox {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0; top: 0; width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  text-align: center;
}

.lightbox:target { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 80vh;
  box-shadow: 0 0 20px #000;
  border-radius: 8px;
}

.lightbox .close {
  position: absolute;
  top: 30px; right: 40px;
  width: 32px; height: 32px;
  text-decoration: none;
  background: url('data:image/svg+xml;utf8,<svg fill=\"white\" viewBox=\"0 0 40 40\" xmlns=\"http://www.w3.org/2000/svg\"><line x1=\"10\" y1=\"10\" x2=\"30\" y2=\"30\" stroke=\"white\" stroke-width=\"4\"/><line x1=\"30\" y1=\"10\" x2=\"10\" y2=\"30\" stroke=\"white\" stroke-width=\"4\"/></svg>') no-repeat center center;
  background-size: 32px 32px;
  z-index: 1001;
  cursor: pointer;
}
