/*
Theme Name: UFO/UAP Wiki
Theme URI: https://example.com
Author: Steve
Description: A clean, Wikipedia-style wiki theme built for the UFO/UAP Wiki project. Provides category-indexed browsing, an alphabetical article listing, and a simple top navigation around infobox-style articles. Designed to work with Posts and Categories imported via WXR.
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ufo-uap-wiki
*/

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0;
  background: #f2f3f4;
  color: #202122;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

a { color: #0645ad; text-decoration: none; }
a:hover { text-decoration: underline; }
a:visited { color: #0b0080; }

img { max-width: 100%; height: auto; }

.site-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Top bar ---------- */
.site-topbar {
  background: #202122;
  color: #fff;
  padding: 10px 0;
  font-size: 12px;
}
.site-topbar .site-wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.site-topbar a { color: #c8ccd1; }
.site-topbar a:hover { color: #fff; }

/* ---------- Header ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid #a2a9b1;
  padding: 18px 0;
}
.site-header .site-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.site-branding { display: flex; align-items: center; gap: 12px; }
.site-branding img.custom-logo { max-height: 48px; width: auto; }
.site-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: bold;
  margin: 0;
  letter-spacing: -0.5px;
}
.site-title a { color: #202122; }
.site-description {
  font-size: 12px;
  color: #54595d;
  margin: 2px 0 0;
}

/* ---------- Nav menu ---------- */
.primary-nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.primary-nav li { margin: 0; }
.primary-nav a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 3px;
  color: #202122;
  font-size: 14px;
  font-weight: 600;
}
.primary-nav a:hover { background: #eaecf0; text-decoration: none; }

/* ---------- Search form ---------- */
.site-search { display: flex; }
.site-search input[type="search"] {
  border: 1px solid #a2a9b1;
  border-right: none;
  border-radius: 3px 0 0 3px;
  padding: 7px 10px;
  font-size: 13px;
  width: 170px;
}
.site-search button {
  border: 1px solid #a2a9b1;
  background: #eaecf0;
  border-radius: 0 3px 3px 0;
  padding: 7px 12px;
  cursor: pointer;
}
.site-search button:hover { background: #dadde3; }

/* ---------- Main content card ---------- */
.content-area {
  max-width: 960px;
  margin: 24px auto 60px;
  background: #fff;
  border: 1px solid #a2a9b1;
  padding: 28px 34px 34px;
}

.breadcrumb {
  font-size: 12.5px;
  color: #54595d;
  margin-bottom: 14px;
}
.breadcrumb a { color: #0645ad; }

/* ---------- Homepage ---------- */
.hero {
  background: #fff;
  border: 1px solid #a2a9b1;
  padding: 36px 34px;
  margin: 24px auto 0;
  max-width: 960px;
  text-align: center;
}
.hero h1 {
  font-family: Georgia, serif;
  font-size: 32px;
  margin: 0 0 10px;
}
.hero p { color: #54595d; font-size: 15px; max-width: 640px; margin: 0 auto; }

.category-cards {
  max-width: 960px;
  margin: 24px auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 720px) { .category-cards { grid-template-columns: 1fr; } }
.category-card {
  background: #fff;
  border: 1px solid #a2a9b1;
  padding: 22px;
  text-align: center;
}
.category-card h2 {
  font-family: Georgia, serif;
  font-size: 20px;
  margin: 0 0 6px;
}
.category-card .count {
  display: inline-block;
  background: #eaecf0;
  color: #54595d;
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 10px;
  margin-bottom: 10px;
}
.category-card p { color: #54595d; font-size: 13.5px; margin: 0 0 14px; }

.recent-list {
  max-width: 960px;
  margin: 24px auto 60px;
  background: #fff;
  border: 1px solid #a2a9b1;
  padding: 24px 32px;
}
.recent-list h2 {
  font-family: Georgia, serif;
  font-size: 19px;
  border-bottom: 1px solid #a2a9b1;
  padding-bottom: 8px;
  margin-top: 0;
}

/* ---------- Article index (category / archive / search) ---------- */
.index-header {
  margin-bottom: 18px;
  border-bottom: 1px solid #a2a9b1;
  padding-bottom: 12px;
}
.index-header h1 {
  font-family: Georgia, serif;
  font-size: 26px;
  margin: 0 0 4px;
}
.index-count { color: #54595d; font-size: 13px; }

.article-index-list { list-style: none; margin: 0; padding: 0; }
.article-index-list li {
  padding: 12px 0;
  border-bottom: 1px solid #eaecf0;
}
.article-index-list li:last-child { border-bottom: none; }
.article-index-list .entry-title {
  font-family: Georgia, serif;
  font-size: 17px;
  font-weight: bold;
}
.article-index-list .entry-desc {
  color: #54595d;
  font-size: 13.5px;
  margin-top: 2px;
}
.article-index-list .entry-cats {
  font-size: 11.5px;
  color: #72777d;
  margin-top: 4px;
}
.article-index-list .entry-cats a { color: #72777d; margin-right: 6px; }

.letter-jump {
  margin: 16px 0 22px;
  font-size: 13px;
  line-height: 2.2;
}
.letter-jump a {
  display: inline-block;
  width: 24px;
  text-align: center;
  color: #0645ad;
}
.letter-jump span.inactive {
  display: inline-block;
  width: 24px;
  text-align: center;
  color: #c8ccd1;
}
.letter-group-heading {
  font-family: Georgia, serif;
  font-size: 18px;
  background: #eaecf0;
  padding: 6px 12px;
  margin: 22px 0 0;
}

/* ---------- Pagination ---------- */
.wiki-pagination {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #a2a9b1;
  font-size: 13px;
}
.wiki-pagination a, .wiki-pagination span {
  display: inline-block;
  padding: 5px 10px;
  margin-right: 4px;
  border: 1px solid #a2a9b1;
  border-radius: 3px;
}
.wiki-pagination span.current { background: #202122; color: #fff; border-color: #202122; }
.wiki-pagination a:hover { background: #eaecf0; text-decoration: none; }

/* ---------- Single article ---------- */
.single-article h1.entry-title {
  font-family: Georgia, serif;
  font-size: 30px;
  border-bottom: 3px solid #a2a9b1;
  padding-bottom: 6px;
  margin: 0 0 4px;
}
.entry-content { clear: none; }
.entry-content table { border-collapse: collapse; }
.entry-content h2 { clear: left; }

/* ---------- Footer ---------- */
.site-footer {
  background: #202122;
  color: #a2a9b1;
  font-size: 12px;
  padding: 26px 0 36px;
  margin-top: 40px;
}
.site-footer a { color: #c8ccd1; }
.site-footer a:hover { color: #fff; }
.site-footer .site-wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- 404 / search-empty ---------- */
.not-found { text-align: center; padding: 40px 0; }
.not-found h1 { font-family: Georgia, serif; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .content-area { padding: 18px 18px 24px; margin: 14px auto 40px; }
  .site-header .site-wrap { flex-direction: column; align-items: flex-start; }
  .site-search input[type="search"] { width: 130px; }
  .hero, .recent-list { margin-left: 14px; margin-right: 14px; }
  .category-cards { margin-left: 14px; margin-right: 14px; }
}
