/* ===== Magazine Theme - White & Yellow ===== */
:root {
  --white: #ffffff;
  --yellow: #ffd600;
  --yellow-dark: #f5c400;
  --yellow-light: #fff9c4;
  --black: #1a1a1a;
  --gray: #666666;
  --gray-light: #f5f5f5;
  --border: #e0e0e0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  background-color: var(--white);
  color: var(--black);
  line-height: 1.7;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Header ===== */
.site-header {
  background: var(--yellow);
  border-bottom: 4px solid var(--yellow-dark);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
  flex-wrap: wrap;
  gap: 10px;
}

.site-logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--black);
  text-decoration: none;
  letter-spacing: 0.05em;
}

.site-logo:hover {
  color: #333;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 24px;
}

.main-nav a {
  color: var(--black);
  text-decoration: none;
  font-weight: 700;
  padding: 5px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}

.main-nav a:hover {
  border-bottom-color: var(--black);
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--yellow-light) 0%, var(--yellow) 100%);
  padding: 60px 0;
  border-bottom: 3px solid var(--yellow-dark);
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 10px;
  letter-spacing: 0.03em;
}

.hero p {
  font-size: 1.1rem;
  color: #333;
  max-width: 700px;
}

/* ===== Magazine Grid ===== */
.magazine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  padding: 40px 0 60px;
}

.magazine-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 4px solid var(--yellow);
  border-radius: 8px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 0.3s, transform 0.3s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.magazine-card:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  transform: translateY(-3px);
}

.card-category a {
  display: inline-block;
  background: var(--yellow);
  color: var(--black);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 20px;
  text-decoration: none;
  letter-spacing: 0.03em;
}

.card-category a:hover {
  background: var(--yellow-dark);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.4;
}

.card-title a {
  color: var(--black);
  text-decoration: none;
}

.card-title a:hover {
  color: #444;
  text-decoration: underline;
}

.card-excerpt {
  color: var(--gray);
  font-size: 0.95rem;
  flex-grow: 1;
}

.card-meta {
  font-size: 0.85rem;
  color: var(--gray);
  border-top: 1px dashed var(--border);
  padding-top: 10px;
}

/* ===== Single Post ===== */
.post-main {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.post-header {
  margin-bottom: 30px;
  padding-bottom: 24px;
  border-bottom: 3px solid var(--yellow);
}

.post-title {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.4;
  margin-bottom: 14px;
}

.post-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 0.9rem;
  color: var(--gray);
  flex-wrap: wrap;
}

.post-category {
  display: inline-block;
  background: var(--yellow);
  color: var(--black);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 3px 14px;
  border-radius: 20px;
  text-decoration: none;
}

.post-category:hover {
  background: var(--yellow-dark);
}

.post-content {
  font-size: 1.05rem;
}

.post-content h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 36px 0 16px;
  padding-left: 12px;
  border-left: 5px solid var(--yellow);
}

.post-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 28px 0 12px;
}

.post-content p {
  margin-bottom: 18px;
}

.post-content ul,
.post-content ol {
  margin: 0 0 18px 24px;
}

.post-content li {
  margin-bottom: 8px;
}

.post-content a {
  color: #b8860b;
  text-decoration: underline;
}

.post-content a:hover {
  color: var(--yellow-dark);
}

.post-content blockquote {
  border-left: 4px solid var(--yellow);
  background: var(--yellow-light);
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 0 6px 6px 0;
}

.post-content code {
  background: var(--gray-light);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

.post-content pre {
  background: var(--gray-light);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
  overflow-x: auto;
  margin-bottom: 18px;
}

.post-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 50px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  gap: 16px;
}

.post-navigation a {
  color: var(--black);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
}

.post-navigation a:hover {
  color: var(--yellow-dark);
}

/* ===== List Pages ===== */
.list-header {
  background: var(--yellow-light);
  border-bottom: 3px solid var(--yellow);
  padding: 36px 0;
}

.list-header h1 {
  font-size: 2rem;
  font-weight: 900;
}

.list-header p {
  color: var(--gray);
  margin-top: 6px;
}

.post-list {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.post-list-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.post-list-item:last-child {
  border-bottom: none;
}

.post-list-item h2 {
  font-size: 1.4rem;
  font-weight: 800;
}

.post-list-item h2 a {
  color: var(--black);
  text-decoration: none;
}

.post-list-item h2 a:hover {
  color: #444;
  text-decoration: underline;
}

.post-list-meta {
  font-size: 0.85rem;
  color: var(--gray);
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.post-list-excerpt {
  color: var(--gray);
  font-size: 0.95rem;
}

/* ===== Pagination ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 30px 0 60px;
  list-style: none;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  text-decoration: none;
  color: var(--black);
  font-weight: 700;
}

.pagination a:hover {
  background: var(--yellow);
  border-color: var(--yellow-dark);
}

.pagination .active {
  background: var(--yellow);
  border-color: var(--yellow-dark);
}

/* ===== Taxonomy Terms ===== */
.terms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  padding: 40px 0 60px;
}

.term-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--border);
  border-bottom: 4px solid var(--yellow);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  text-decoration: none;
  color: var(--black);
  transition: box-shadow 0.3s, transform 0.3s;
}

.term-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.term-card h2 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 5px;
}

.term-card p {
  color: var(--gray);
  font-size: 0.85rem;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--black);
  color: var(--white);
  padding: 30px 0;
  text-align: center;
}

.site-footer p {
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: #aaa;
}

.site-footer p:first-child {
  color: var(--yellow);
  font-weight: 700;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    text-align: center;
  }

  .main-nav ul {
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero {
    padding: 40px 0;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .magazine-grid {
    grid-template-columns: 1fr;
  }

  .post-title {
    font-size: 1.5rem;
  }

  .post-navigation {
    flex-direction: column;
  }
}