@charset "utf-8";
/* CSS Document */

/* ==========================================================================
   main.css – Non-critical / below-the-fold styles for familytree-search.org
   Loaded asynchronously after critical CSS
   ========================================================================== */

/* Headings – appear after ATF in article */
h1, h2, h3 {
  text-align: center;
  color: #3c2f2f;
}
h1 { font-size: 2.1rem; margin: 1rem 0 1.5rem; }
h2 { font-size: 1.6rem; margin: 2.2rem 0 1rem; }
h3 { font-size: 1.3rem; margin: 1.8rem 0 0.8rem; }

/* Article content */
main article p {
  text-align: justify;
  hyphens: auto;
  margin: 0 0 1.2rem;
  text-indent: 1.8em;
}
main article h2 + p,
main article figure + p {
  text-indent: 0;
}

/* Figures / images (book covers, portraits – below fold) */
figure.book-cover {
  max-width: 520px;
  margin: 2rem auto;
  text-align: center;
}
figure.book-cover img {
  max-width: 100%;
  height: auto;
  border: 1px solid #d4c3a8;
  box-shadow: 0 6px 20px rgba(0,0,0,0.18);
  border-radius: 2px;
}
figure.book-cover figcaption {
  font-style: italic;
  color: #555;
  margin-top: 1rem;
  font-size: 0.95rem;
}

/* Aside, nav, footer – lower page */
aside, footer {
  border: 1px solid #c9a875;
  margin: 0 0 1.5rem;
  padding: 1.2rem;
  background-color: rgba(255, 250, 240, 0.4);
  border-radius: 3px;
}
aside {
  font-size: 0.96rem;
  background-color: #fdfaf2;
  padding: 1.2rem;
  border-left: 4px solid #a67c52;
}
footer {
  
  font-size: 0.92rem;
  color: #666;
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid #c9a875;
}



/* Article pagination (bottom navigation) */
.article-pagination {
  margin: 3rem 0 1rem;
  padding-top: 2rem;
  border-top: 1px solid #c9a875;
}
.pagination-container {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.pagination-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 6px;
  text-decoration: none;
  color: #2c1e0f;
  background-color: #fdfaf2;
  border: 1px solid #c9a875;
  transition: all 0.2s ease;
  flex: 1;
  max-width: 48%;
}
.pagination-link:hover {
  background-color: #f5f0e6;
  border-color: #a67c52;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}
.prev { text-align: left; }
.next { flex-direction: row-reverse; text-align: right; }
.label { font-size: 0.9rem; color: #666; font-weight: 500; }
.title { font-weight: 600; color: #2c1e0f; }
.arrow { font-size: 1.5rem; opacity: 0.8; }

/* Tables (if used lower on page) */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.98rem;
}
th, td {
  padding: 0.8rem 1rem;
  text-align: left;
  border-bottom: 1px solid #d4c3a8;
}
th {
  background-color: #f5f0e6;
  color: #3c2f2f;
  font-weight: bold;
}
tr:hover { background-color: #fdfaf2; }
.section-header {
  background-color: #e9e0d2 !important;
  font-weight: bold;
  font-size: 1.1rem;
  text-align: center;
  color: #3c2f2f;
}
.city-name {
  font-weight: bold;
  color: #5c4033;
}

/* Mobile adjustments for lower content */
@media (max-width: 640px) {
  .pagination-container { flex-direction: column; }
  .pagination-link { max-width: 100%; }
}
@media (max-width: 600px) {
  thead { display: none; }
  tr {
    display: block;
    margin-bottom: 1.2rem;
    border: 1px solid #c9a875;
    border-radius: 4px;
    background-color: #fdfaf2;
  }
  td {
    display: block;
    text-align: left;
    position: relative;
    padding-left: 2%;
    border: none;
  }
  td:before {
    content: attr(data-label);
    position: absolute;
    left: 1rem;
    width: 95%;
    font-weight: bold;
    text-align: left;
    color: #3c2f2f;
  }
}

/* If you ever add the header portrait image back */
header img {
  width: 180px;
  height: auto;
  max-height: 240px;
  object-fit: cover;
  border: 1px solid #d4c3a8;
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
  border-radius: 4px;
  flex-shrink: 0;
}
@media (max-width: 768px) {
  header img { width: 160px; max-height: 210px; }
}
@media (max-width: 480px) {
  header img { width: 140px; }
}