/*
Theme Name: SteedWeb Blog
Theme URI: https://steedweb.com/news/
Author: SteedWeb
Description: SteedWeb 技术博客主题 — matches the main SteedWeb website (zh-CN).
Version: 1.2.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: steedweb
*/

/* Blog-specific overrides; colors/fonts come from /assets/css/main.css */

.steedweb-prose {
  color: #2d2a26;
  line-height: 1.8;
  font-size: 1rem;
}

.steedweb-prose h2,
.steedweb-prose h3,
.steedweb-prose h4 {
  color: #1a1816;
  font-weight: 700;
  margin-top: 2em;
  margin-bottom: 0.75em;
  line-height: 1.35;
}

.steedweb-prose h2 {
  font-size: 1.375rem;
  padding-bottom: 0.35em;
  border-bottom: 1px solid #e8e0d6;
}

.steedweb-prose h3 {
  font-size: 1.125rem;
}

.steedweb-prose p {
  margin-bottom: 1.25em;
}

.steedweb-prose a {
  color: #9a7840;
  text-decoration: underline;
}

.steedweb-prose a:hover {
  color: #403019;
}

.steedweb-prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

.steedweb-prose ul,
.steedweb-prose ol {
  margin-bottom: 1.25em;
  padding-left: 1.5em;
}

.steedweb-prose blockquote {
  margin: 1.5em 0;
  padding: 0.75em 1.25em;
  border-left: 4px solid #b89150;
  background: #faf6ef;
  color: #2d2a26;
  font-size: 1.05rem;
  line-height: 1.65;
}

.steedweb-prose blockquote p:last-child {
  margin-bottom: 0;
}

.steedweb-prose pre {
  margin: 1.25em 0;
  padding: 1em 1.25em;
  background: #1a1816;
  color: #f5f0ea;
  border-radius: 0.5rem;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.6;
}

.steedweb-prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875em;
}

.steedweb-prose :not(pre) > code {
  padding: 0.15em 0.4em;
  background: #f5f0ea;
  border-radius: 0.25rem;
  color: #403019;
}

.steedweb-prose pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

/* Subnav tabs */
.blog-subnav__scroll {
  scrollbar-width: none;
}

.blog-subnav__scroll::-webkit-scrollbar {
  display: none;
}

.blog-subnav__tab {
  display: inline-block;
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #2d2a26;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.blog-subnav__tab:hover {
  color: #9a7840;
}

.blog-subnav__tab--active {
  color: #9a7840;
  border-bottom-color: #9a7840;
}

/* Horizontal list item */
.blog-list-item {
  display: flex;
  gap: 1rem;
  padding: 1.25rem 1rem;
  transition: background-color 0.15s;
}

@media (min-width: 768px) {
  .blog-list-item {
    padding: 1.5rem 1.25rem;
    gap: 1.25rem;
  }
}

.blog-list-item:hover {
  background-color: #faf8f5;
}

.blog-list-item__thumb {
  width: 7.5rem;
  height: 5rem;
}

.blog-list-item__thumb--placeholder {
  width: 7.5rem;
  height: 5rem;
}

.blog-list-item__excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Two-column blog layout */
@media (min-width: 1024px) {
  .blog-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
  }
}

.blog-layout__sidebar {
  margin-top: 2rem;
}

@media (min-width: 1024px) {
  .blog-layout__sidebar {
    margin-top: 0;
  }
}

@media (min-width: 1024px) {
  .blog-sidebar {
    position: sticky;
    top: calc(var(--header-height, 4rem) + 1rem);
  }
}

/* Featured cards */
.blog-featured__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .blog-featured__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.blog-featured__card h3 a {
  text-decoration: none;
}

/* Meta links in single */
.blog-meta a {
  color: #9a7840;
  text-decoration: none;
}

.blog-meta a:hover {
  text-decoration: underline;
}

.steedweb-blog-card__excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.steedweb-login-gate {
  max-width: 28rem;
  margin: 0 auto;
}

.steedweb-login-gate label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #2d2a26;
  margin-bottom: 0.25rem;
}

.steedweb-login-gate input[type="text"],
.steedweb-login-gate input[type="password"] {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #e8e0d6;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.steedweb-login-gate input[type="submit"] {
  width: 100%;
}

.steedweb-mobile-nav {
  display: none;
}

.steedweb-mobile-nav.is-open {
  display: block;
}

.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
