/**
 * Single blog post — polished article layout
 * @package RC_Hobby_Pro
 */

/* ---------- Hero ---------- */
.sp-article {
  background: #f4f5f7;
}

.sp-hero {
  position: relative;
  background: linear-gradient(145deg, #111827 0%, #1f2937 55%, #0f172a 100%);
  color: #fff;
  padding: 28px 0 40px;
  overflow: hidden;
}

.sp-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 85% 20%, rgba(249, 115, 22, 0.22), transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 90%, rgba(59, 130, 246, 0.12), transparent 50%);
  pointer-events: none;
}

.sp-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.sp-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 18px;
  line-height: 1.4;
}

.sp-breadcrumb a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: color 0.15s;
}

.sp-breadcrumb a:hover {
  color: #fb923c;
}

.sp-breadcrumb .sep {
  opacity: 0.45;
}

.sp-breadcrumb .current {
  color: rgba(255, 255, 255, 0.9);
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sp-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.sp-cat-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.2);
  border: 1px solid rgba(249, 115, 22, 0.45);
  color: #fdba74;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-transform: uppercase;
}

.sp-cat-badge:hover {
  background: rgba(249, 115, 22, 0.35);
  color: #fff;
}

.sp-title {
  margin: 0 0 22px;
  font-size: clamp(1.75rem, 4vw, 2.45rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #fff;
}

.sp-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sp-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sp-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(249, 115, 22, 0.5);
  object-fit: cover;
}

.sp-author-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sp-author-name {
  font-weight: 700;
  font-size: 15px;
  color: #fff;
}

.sp-author-date {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

.sp-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.sp-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}

a.sp-stat:hover {
  color: #fb923c;
}

.sp-stat svg {
  flex-shrink: 0;
  opacity: 0.85;
}

/* ---------- Featured image ---------- */
.sp-featured {
  margin-top: -8px;
  padding-bottom: 8px;
}

.sp-featured-figure {
  margin: 0 auto;
  max-width: 960px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
  background: #fff;
  position: relative;
  z-index: 2;
}

.sp-featured-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
  vertical-align: middle;
}

.sp-featured-figure figcaption {
  padding: 10px 16px;
  font-size: 13px;
  color: #6b7280;
  background: #fff;
  border-top: 1px solid #f3f4f6;
}

/* ---------- Layout ---------- */
.sp-body-wrap {
  padding: 32px 0 48px;
}

.sp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 32px;
  align-items: start;
}

.sp-main {
  min-width: 0;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
  padding: 36px 40px 40px;
}

/* ---------- Content typography ---------- */
.sp-content {
  font-size: 17px;
  line-height: 1.75;
  color: #1f2937;
}

.sp-content > *:first-child {
  margin-top: 0;
}

.sp-content h2,
.sp-content h3,
.sp-content h4 {
  margin: 1.6em 0 0.55em;
  font-weight: 750;
  line-height: 1.3;
  color: #111827;
  letter-spacing: -0.015em;
}

.sp-content h2 {
  font-size: 1.45rem;
  padding-bottom: 8px;
  border-bottom: 2px solid #f3f4f6;
}

.sp-content h3 {
  font-size: 1.2rem;
}

.sp-content p {
  margin: 0 0 1.15em;
}

.sp-content a {
  color: #ea580c;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sp-content a:hover {
  color: #c2410c;
}

.sp-content ul,
.sp-content ol {
  margin: 0 0 1.2em;
  padding-left: 1.35em;
}

.sp-content li {
  margin-bottom: 0.4em;
}

.sp-content blockquote {
  margin: 1.5em 0;
  padding: 16px 20px;
  border-left: 4px solid #f97316;
  background: #fff7ed;
  border-radius: 0 10px 10px 0;
  color: #9a3412;
  font-style: italic;
}

.sp-content blockquote p:last-child {
  margin-bottom: 0;
}

.sp-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 1.2em 0;
}

.sp-content pre,
.sp-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.sp-content code {
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

.sp-content pre {
  background: #111827;
  color: #e5e7eb;
  padding: 16px 18px;
  border-radius: 10px;
  overflow-x: auto;
  margin: 1.3em 0;
}

.sp-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.sp-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.3em 0;
  font-size: 0.95em;
}

.sp-content th,
.sp-content td {
  border: 1px solid #e5e7eb;
  padding: 10px 12px;
  text-align: left;
}

.sp-content th {
  background: #f9fafb;
  font-weight: 700;
}

.sp-page-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #f3f4f6;
}

.sp-page-label {
  font-weight: 600;
  color: #6b7280;
  margin-right: 4px;
}

.sp-page-num,
.sp-page-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  background: #f3f4f6;
  color: #111827;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.sp-page-links a:hover {
  background: #ff9900;
  color: #111;
}

/* ---------- Tags ---------- */
.sp-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid #f3f4f6;
}

.sp-tags-label {
  font-size: 13px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sp-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sp-tag {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid #ffedd5;
  transition: background 0.15s, color 0.15s;
}

.sp-tag:hover {
  background: #ff9900;
  color: #111;
  border-color: #ff9900;
}

/* ---------- Share ---------- */
.sp-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}

.sp-share-label {
  font-size: 13px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sp-share-btns {
  display: flex;
  gap: 8px;
}

.sp-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #374151;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s, color 0.15s, border-color 0.15s;
}

.sp-share-btn:hover {
  transform: translateY(-2px);
  background: #111827;
  color: #fff;
  border-color: #111827;
}

.sp-share-btn.copied {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}

/* ---------- Author box ---------- */
.sp-author-box {
  display: flex;
  gap: 18px;
  margin-top: 28px;
  padding: 22px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff7ed 0%, #f8fafc 100%);
  border: 1px solid #ffedd5;
}

.sp-author-box-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.sp-author-box-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #ea580c;
  margin-bottom: 4px;
}

.sp-author-box-name {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 750;
  color: #111827;
}

.sp-author-box-bio {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.55;
  color: #4b5563;
}

.sp-author-box-link {
  font-size: 14px;
  font-weight: 700;
  color: #ea580c;
  text-decoration: none;
}

.sp-author-box-link:hover {
  text-decoration: underline;
}

/* ---------- Prev / Next ---------- */
.sp-post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 28px;
}

.sp-nav-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  min-height: 88px;
}

.sp-nav-card:hover {
  border-color: #fdba74;
  background: #fff7ed;
  box-shadow: 0 6px 16px rgba(249, 115, 22, 0.1);
}

.sp-nav-empty {
  visibility: hidden;
  pointer-events: none;
}

.sp-nav-next {
  text-align: right;
  align-items: flex-end;
}

.sp-nav-dir {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9ca3af;
}

.sp-nav-title {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sp-nav-card:hover .sp-nav-title {
  color: #c2410c;
}

/* ---------- Comments ---------- */
.sp-main .comments-area {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid #e5e7eb;
}

.sp-main .comments-title,
.sp-main .comment-reply-title {
  margin: 0 0 18px;
  font-size: 1.25rem;
  font-weight: 750;
  color: #111827;
}

.sp-main .comment-list {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
}

.sp-main .comment-list .children {
  list-style: none;
  margin: 12px 0 0 24px;
  padding: 0;
}

.sp-main .comment-body {
  display: flex;
  gap: 14px;
  padding: 16px;
  margin-bottom: 12px;
  background: #f9fafb;
  border-radius: 12px;
  border: 1px solid #f3f4f6;
}

.sp-main .comment-author-avatar img {
  border-radius: 50%;
  display: block;
}

.sp-main .comment-author-name {
  font-weight: 700;
  color: #111827;
  margin-right: 8px;
}

.sp-main .comment-date {
  font-size: 12px;
  color: #9ca3af;
}

.sp-main .comment-text {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.6;
  color: #374151;
}

.sp-main .comment-text p:last-child {
  margin-bottom: 0;
}

.sp-main .comment-reply a {
  font-size: 13px;
  font-weight: 600;
  color: #ea580c;
  text-decoration: none;
}

.sp-main .comment-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #4b5563;
  margin-bottom: 6px;
}

.sp-main .comment-form input[type="text"],
.sp-main .comment-form input[type="email"],
.sp-main .comment-form input[type="url"],
.sp-main .comment-form textarea {
  width: 100%;
  max-width: 100%;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.sp-main .comment-form input:focus,
.sp-main .comment-form textarea:focus {
  outline: none;
  border-color: #fb923c;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

.sp-main .comment-form textarea {
  min-height: 120px;
  resize: vertical;
}

.sp-main .comment-form .form-submit {
  margin-top: 12px;
}

.sp-main .comment-form .btn,
.sp-main .comment-form button[type="submit"] {
  display: inline-flex;
  align-items: center;
  padding: 11px 22px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #ff9900, #f97316);
  color: #111;
  font-weight: 750;
  font-size: 14px;
  cursor: pointer;
  transition: filter 0.15s, transform 0.15s;
}

.sp-main .comment-form .btn:hover,
.sp-main .comment-form button[type="submit"]:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.sp-main .no-comments {
  color: #6b7280;
  font-size: 14px;
}

/* ---------- Sidebar ---------- */
.sp-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sp-side-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.sp-side-sticky {
  position: sticky;
  top: 88px;
}

.sp-side-title {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 750;
  color: #111827;
  letter-spacing: -0.01em;
}

.sp-side-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sp-side-item + .sp-side-item {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f3f4f6;
}

.sp-side-link {
  display: flex;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.sp-side-thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sp-side-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sp-side-thumb-ph {
  font-size: 20px;
}

.sp-side-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.sp-side-item-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  color: #111827;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sp-side-link:hover .sp-side-item-title {
  color: #ea580c;
}

.sp-side-item-date {
  font-size: 12px;
  color: #9ca3af;
}

.sp-side-more {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 700;
  color: #ea580c;
  text-decoration: none;
}

.sp-side-more:hover {
  text-decoration: underline;
}

.sp-side-cta {
  background: linear-gradient(145deg, #111827, #1f2937);
  border-color: transparent;
  color: #fff;
}

.sp-side-cta .sp-side-title {
  color: #fff;
}

.sp-side-cta p {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.7);
}

.sp-side-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ff9900, #f97316);
  color: #111;
  font-weight: 750;
  font-size: 13px;
  text-decoration: none;
  transition: filter 0.15s;
}

.sp-side-btn:hover {
  filter: brightness(1.06);
  color: #111;
}

.sp-side-widgets .widget {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 12px;
}

.sp-side-widgets .widget-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 750;
}

/* ---------- Related ---------- */
.sp-related {
  padding: 40px 0 56px;
  background: #fff;
  border-top: 1px solid #e5e7eb;
}

.sp-related-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.sp-related-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.02em;
}

.sp-related-all {
  font-size: 14px;
  font-weight: 700;
  color: #ea580c;
  text-decoration: none;
  white-space: nowrap;
}

.sp-related-all:hover {
  text-decoration: underline;
}

.sp-related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.sp-related-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.sp-related-card:hover {
  border-color: #fdba74;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
  transform: translateY(-3px);
}

.sp-related-thumb {
  display: block;
  aspect-ratio: 16 / 10;
  background: #f3f4f6;
  overflow: hidden;
}

.sp-related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.sp-related-card:hover .sp-related-thumb img {
  transform: scale(1.05);
}

.sp-related-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 32px;
  background: linear-gradient(135deg, #fff7ed, #f3f4f6);
}

.sp-related-body {
  padding: 14px 14px 16px;
}

.sp-related-date {
  display: block;
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 6px;
}

.sp-related-card-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.35;
}

.sp-related-card-title a {
  color: #111827;
  text-decoration: none;
}

.sp-related-card-title a:hover {
  color: #ea580c;
}

.sp-related-excerpt {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #6b7280;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .sp-layout {
    grid-template-columns: 1fr;
  }

  .sp-side-sticky {
    position: static;
  }

  .sp-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .sp-hero {
    padding: 20px 0 28px;
  }

  .sp-main {
    padding: 22px 18px 28px;
    border-radius: 12px;
  }

  .sp-content {
    font-size: 16px;
  }

  .sp-author-box {
    flex-direction: column;
    align-items: flex-start;
  }

  .sp-post-nav {
    grid-template-columns: 1fr;
  }

  .sp-nav-next {
    text-align: left;
    align-items: flex-start;
  }

  .sp-nav-empty {
    display: none;
  }

  .sp-related-grid {
    grid-template-columns: 1fr;
  }

  .sp-featured-img {
    max-height: 260px;
  }
}
