/* ── Reset & base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 16px;
  line-height: 1.6;
  color: #222;
  min-height: 100vh;
}

/* ── Background ───────────────────────────────────────────────────────────── */
.site-bg {
  position: fixed;
  inset: 0;
  background: url('../images/wood_back_.jpg') center center / cover no-repeat;
  z-index: -1;
}

/* ── Main wrapper (white container) ──────────────────────────────────────── */
.site-wrap {
  max-width: 1050px;
  margin: 0 auto;
  background: #fff;
  min-height: 100vh;
  box-shadow: 0 0 40px rgba(0,0,0,0.5);
}

/* ── Header ───────────────────────────────────────────────────────────────── */
.site-header {
  display: block;
  text-align: center;
  background: #fff;
}

.site-header a {
  display: block;
}

.logo {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}


/* ── Content area ─────────────────────────────────────────────────────────── */
.site-content {
  padding: 20px 24px 30px;
}

/* ── Welcome block (main page) ───────────────────────────────────────────── */
.welcome-block {
  padding: 12px 24px 16px;
  border-bottom: 2px solid #e0e0e0;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.55;
  color: #333;
}

.welcome-block h1,
.welcome-block h2,
.welcome-block h3,
.welcome-block p:first-child {
  font-size: 18px;
  font-family: Arial, sans-serif;
  font-weight: bold;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.welcome-block img {
  max-width: 264px !important;
  height: auto !important;
  width: auto !important;
}

.welcome-block p {
  margin-bottom: 8px;
}

/* ── Mosaic grid (main page) ──────────────────────────────────────────────── */
.mosaic {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  padding: 10px 0;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 160px;
  text-decoration: none;
  color: #222;
  transition: transform 0.15s;
}

.card:hover {
  transform: translateY(-3px);
}

.card img {
  width: 160px;
  height: 180px;
  object-fit: cover;
  object-position: top center;
  border: 3px solid #ccc;
  display: block;
}

.card-no-photo {
  width: 160px;
  height: 180px;
  background: #ddd;
  border: 3px solid #ccc;
}

.card-name {
  display: block;
  text-align: center;
  font-size: 14px;
  font-family: Arial, sans-serif;
  font-weight: bold;
  margin-top: 5px;
  line-height: 1.3;
  color: #333;
  max-width: 155px;
}

/* ── Article page ─────────────────────────────────────────────────────────── */
.article-title {
  font-size: 22px;
  font-family: Arial, sans-serif;
  font-weight: bold;
  margin-bottom: 18px;
  color: #8b0000;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 8px;
}

.article-body {
  overflow: hidden;
}

.article-body img {
  max-width: 100%;
  height: auto;
  cursor: zoom-in;
  border: 4px solid #ccc;
}

.article-body p {
  margin-bottom: 12px;
  text-align: justify;
}

/* Lightbox anchor reset */
.article-body a.glightbox {
  display: inline;
  text-decoration: none;
}

/* ── Alphabet bar ─────────────────────────────────────────────────────────── */
.alpha-bar {
  background: #f5f0e8;
  border-top: 2px solid #8b0000;
  border-bottom: 2px solid #8b0000;
  padding: 8px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}

.alpha-bar a {
  color: #8b0000;
  text-decoration: none;
  font-size: 16px;
  font-family: Arial, sans-serif;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 3px;
  transition: background 0.15s;
}

.alpha-bar a:hover {
  background: #8b0000;
  color: #fff;
}

.alpha-search {
  margin-left: 8px;
  font-size: 18px;
  padding: 2px 8px;
}

/* ── Alphabet index page ──────────────────────────────────────────────────── */
.alpha-index-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.alpha-index-btn {
  display: inline-block;
  width: 56px;
  height: 56px;
  line-height: 56px;
  text-align: center;
  font-size: 24px;
  font-family: Arial, sans-serif;
  font-weight: bold;
  color: #fff;
  background: #8b0000;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.15s;
}

.alpha-index-btn:hover {
  background: #b00000;
}

.alpha-back {
  color: #8b0000;
  text-decoration: none;
  font-size: 16px;
  font-weight: normal;
}

.alpha-back:hover {
  text-decoration: underline;
}

.alpha-index-title {
  font-size: 22px;
  font-family: Arial, sans-serif;
  color: #8b0000;
  margin-bottom: 24px;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 8px;
}

.alpha-section {
  margin-bottom: 32px;
}

.alpha-letter {
  font-size: 28px;
  font-family: Arial, sans-serif;
  color: #8b0000;
  border-bottom: 1px solid #ddd;
  margin-bottom: 12px;
  padding-bottom: 4px;
}

.alpha-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.alpha-card {
  display: flex;
  gap: 14px;
  text-decoration: none;
  color: #222;
  padding: 10px;
  border: 1px solid #eee;
  border-radius: 4px;
  transition: background 0.15s;
}

.alpha-card:hover {
  background: #fdf6ee;
}

.alpha-card img {
  width: 90px;
  height: 100px;
  object-fit: cover;
  object-position: top center;
  border: 2px solid #ccc;
  flex-shrink: 0;
}

.alpha-card .card-no-photo {
  width: 90px;
  height: 100px;
  flex-shrink: 0;
}

.alpha-card-info {
  flex: 1;
}

.alpha-card-name {
  display: block;
  font-size: 16px;
  font-family: Arial, sans-serif;
  font-weight: bold;
  color: #8b0000;
  margin-bottom: 6px;
}

.alpha-card-snippet {
  font-size: 13px;
  color: #555;
  line-height: 1.5;
}

/* ── Search page ──────────────────────────────────────────────────────────── */
.search-page h1 {
  font-size: 22px;
  font-family: Arial, sans-serif;
  color: #8b0000;
  margin-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 8px;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
  background: #8b0000;
  color: rgba(255,255,255,0.8);
  text-align: center;
  font-size: 12px;
  font-family: Arial, sans-serif;
  padding: 12px;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .site-wrap {
    max-width: 100%;
    box-shadow: none;
  }

  .mosaic {
    gap: 8px;
  }

  .card {
    width: 130px;
  }

  .card img {
    width: 130px;
    height: 148px;
  }

  .card-no-photo {
    width: 130px;
    height: 148px;
  }

  .site-content {
    padding: 14px 12px 24px;
  }

  .article-title {
    font-size: 18px;
  }

  .alpha-card img {
    width: 70px;
    height: 78px;
  }
}
