/*
Theme Name: Furry Memorial
Theme URI: https://furryjinianguan.com
Author: Furry Memorial Team
Description: 毛茸茸纪念馆 - 一个庄重、优雅的纪念主题。卡片式布局，深色色调，为纪念而设计。
Version: 1.0
Requires PHP: 7.4
Text Domain: furry-memorial
*/

/* ============================================================
   1. Reset & Base
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #1a1a1a;
  color: #d4c5a9;
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Main content fills available space to push footer down */
.site-content {
  flex: 1 0 auto;
}

a {
  color: #c9a96e;
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: #d4b77a;
}

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

h1, h2, h3, h4 {
  font-family: "Noto Serif SC", "STSong", "SimSun", "PingFang SC", serif;
  color: #e8dcc8;
  font-weight: 400;
  line-height: 1.4;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

ul, ol { list-style: none; }

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
}

/* ============================================================
   2. Site Header
   ============================================================ */
.site-header {
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
  border-top: 2px solid #c9a96e;
}

.site-branding {
  max-width: 720px;
  margin: 0 auto;
}

.site-title {
  font-size: 1.8rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  margin-bottom: 0.4rem;
}

.site-title a {
  color: #e8dcc8;
}
.site-title a:hover {
  color: #c9a96e;
}

.site-description {
  font-size: 0.9rem;
  color: #8a8070;
  letter-spacing: 0.08em;
}

/* ============================================================
   3. Navigation
   ============================================================ */
.site-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  padding: 1rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: #8a8070;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links .current-menu-item a {
  color: #d4c5a9;
}

.nav-search-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #333;
  border-radius: 50%;
  color: #8a8070;
  transition: all 0.2s;
}
.nav-search-toggle:hover {
  border-color: #c9a96e;
  color: #c9a96e;
}

/* Search dropdown */
.search-dropdown {
  display: none;
  padding: 0 1.5rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}
.search-dropdown.active {
  display: block;
}

.search-dropdown .search-form {
  max-width: 500px;
  margin: 0 auto;
}

/* ============================================================
   4. Card Grid (Home / Archive / Search)
   ============================================================ */
.cards-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

.cards-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

/* Single card */
.memorial-card {
  flex: 0 0 calc((100% - 3rem) / 3);
  background: #242424;
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.2s;
  opacity: 0;
  transform: translateY(20px);
}
.memorial-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.memorial-card:hover {
  background: #2a2a2a;
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}
.memorial-card.visible:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #1a1a1a;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.memorial-card:hover .card-thumb img {
  transform: scale(1.05);
}

.card-thumb .no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e1e1e 0%, #252525 100%);
  border: 1px solid #2a2a2a;
  border-radius: 2px;
}

.card-body {
  padding: 1.2rem 1.2rem 1rem;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-title a {
  color: #e8dcc8;
}
.card-title a:hover {
  color: #c9a96e;
}

.card-date {
  font-size: 0.8rem;
  color: #6a6050;
  letter-spacing: 0.05em;
}

.card-excerpt {
  font-size: 0.85rem;
  color: #9a9080;
  margin-top: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

/* Responsive card grid */
@media (max-width: 900px) {
  .memorial-card {
    flex: 0 0 calc((100% - 1rem) / 2);
  }
  .cards-grid {
    gap: 1rem;
  }
}

@media (max-width: 560px) {
  .memorial-card {
    flex: 0 0 100%;
  }
  .site-title {
    font-size: 1.4rem;
  }
}

/* ============================================================
   5. Pagination
   ============================================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem 1.5rem;
  flex-wrap: wrap;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.8rem;
  border: 1px solid #333;
  border-radius: 4px;
  color: #8a8070;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.pagination .page-numbers.current {
  border-color: #c9a96e;
  color: #c9a96e;
}

.pagination .page-numbers:hover {
  border-color: #555;
  color: #d4c5a9;
}

/* ============================================================
   6. Single Post
   ============================================================ */
.single-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.single-hero {
  margin: 0 -1.5rem 2rem;
  max-height: 60vh;
  overflow: hidden;
  background: #1a1a1a;
}

.single-hero img {
  width: 100%;
  height: 60vh;
  object-fit: cover;
}

.single-content {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 3rem;
}

.single-title {
  font-size: 2rem;
  margin-bottom: 0.8rem;
  text-align: center;
}

.single-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  color: #7a7060;
  font-size: 0.9rem;
}

.single-meta .date {
  letter-spacing: 0.05em;
}

/* Like button */
.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  border: 1px solid #333;
  border-radius: 20px;
  color: #8a8070;
  font-size: 0.9rem;
  transition: all 0.2s;
  cursor: pointer;
}
.like-btn:hover {
  border-color: #c9a96e;
  color: #c9a96e;
}
.like-btn.liked {
  border-color: #c9a96e;
  color: #c9a96e;
  background: rgba(201, 169, 110, 0.1);
}

.like-btn .heart-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.3s;
}
.like-btn.liked .heart-icon {
  transform: scale(1.2);
}

/* Post body content */
.entry-content {
  line-height: 1.9;
  font-size: 1rem;
  color: #c5b89a;
}

.entry-content p {
  margin-bottom: 1.5rem;
}

.entry-content img {
  border-radius: 4px;
  margin: 1.5rem auto;
}

.entry-content figure {
  margin: 1.5rem 0;
}

.entry-content figcaption {
  text-align: center;
  font-size: 0.85rem;
  color: #6a6050;
  margin-top: 0.5rem;
}

.entry-content blockquote {
  border-left: 2px solid #c9a96e;
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: #9a9080;
  font-style: italic;
}

.entry-content a {
  border-bottom: 1px solid rgba(201, 169, 110, 0.3);
}
.entry-content a:hover {
  border-bottom-color: #c9a96e;
}

/* Post navigation */
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #2a2a2a;
}

.post-nav a {
  font-size: 0.9rem;
  color: #8a8070;
}
.post-nav a:hover {
  color: #c9a96e;
}

.post-nav .nav-label {
  display: block;
  font-size: 0.75rem;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.2rem;
}

/* ============================================================
   7. Search Form Component
   ============================================================ */
.search-form {
  display: flex;
  gap: 0.5rem;
}

.search-form .search-field {
  flex: 1;
  padding: 0.6rem 1rem;
  background: #242424;
  border: 1px solid #333;
  border-radius: 4px;
  color: #d4c5a9;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
.search-form .search-field:focus {
  border-color: #c9a96e;
}
.search-form .search-field::placeholder {
  color: #555;
}

.search-form .search-submit {
  padding: 0.6rem 1.2rem;
  background: #2a2a2a;
  border: 1px solid #333;
  border-radius: 4px;
  color: #8a8070;
  font-size: 0.9rem;
  transition: all 0.2s;
}
.search-form .search-submit:hover {
  background: #333;
  border-color: #c9a96e;
  color: #c9a96e;
}

/* ============================================================
   8. No Results / Empty State
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
  color: #8a8070;
}

.empty-state h2 {
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 0.9rem;
  color: #6a6050;
}

/* ============================================================
   9. 404 Page
   ============================================================ */
.error-404 {
  text-align: center;
  padding: 6rem 1.5rem;
}

.error-404 h1 {
  font-size: 5rem;
  color: #c9a96e;
  font-weight: 300;
  margin-bottom: 0.5rem;
}

.error-404 p {
  color: #8a8070;
  margin-bottom: 1.5rem;
}

.error-404 .home-link {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  border: 1px solid #555;
  border-radius: 4px;
  color: #c9a96e;
  transition: all 0.2s;
}
.error-404 .home-link:hover {
  border-color: #c9a96e;
  background: rgba(201, 169, 110, 0.05);
}

/* ============================================================
   10. Site Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid #1f1f1f;
  color: #555;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

.footer-widgets {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 0;
}

.footer-widget {
  color: #8a8070;
  font-size: 0.85rem;
  line-height: 1.7;
  text-align: center;
}

.footer-widget a {
  color: #c9a96e;
}
.footer-widget a:hover {
  color: #d4b77a;
}

.footer-widget-title {
  font-size: 0.95rem;
  color: #c5b89a;
  margin-bottom: 0.6rem;
}

.footer-content {
  text-align: center;
  padding: 1.5rem 1.5rem 0.5rem;
}

.footer-line {
  color: #8a8070;
  font-size: 0.85rem;
  line-height: 1.8;
}

.email-highlight {
  color: #c9a96e;
}

.footer-bottom {
  text-align: center;
  padding: 0.5rem 1.5rem 2rem;
  color: #6a6050;
  font-size: 0.8rem;
}

/* ============================================================
   11. Animations
   ============================================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Staggered animation delays via JS-applied inline style or class */
.memorial-card.visible {
  animation: fadeInUp 0.5s ease forwards;
}

/* ============================================================
   12. Search Results Header
   ============================================================ */
.search-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0.5rem;
  color: #8a8070;
  font-size: 0.9rem;
}

.search-header strong {
  color: #c9a96e;
}
