/* =========================
   Single Blog Post
   File: assets/css/single-post.css
========================= */

.single-post-page {
  background: linear-gradient(180deg, #f7fbff 0%, #ffffff 45%, #f7fbff 100%);
}

/* Hero with featured image as background */
.single-post-hero {
  position: relative;
  min-height: 520px;
  padding: 120px 0 72px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background-color: #071846;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

.single-post-hero.no-bg {
  background:
    radial-gradient(circle at 82% 24%, rgba(73, 94, 255, 0.18), transparent 26%),
    radial-gradient(circle at 20% 10%, rgba(96, 40, 255, 0.12), transparent 22%),
    linear-gradient(180deg, #071846 0%, #0a1f58 100%);
}

.single-post-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(4, 12, 34, 0.08) 0%,
      rgba(4, 12, 34, 0.38) 36%,
      rgba(4, 12, 34, 0.72) 100%
    );
  z-index: 1;
}

.single-post-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 120px;
  background: linear-gradient(180deg, transparent 0%, #f7fbff 100%);
  z-index: 1;
  pointer-events: none;
}

.single-post-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 960px;
  color: #fff;
}

.single-post-category {
  display: inline-flex;
  align-items: center;
  margin-bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 10px;
  line-height: 1;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  backdrop-filter: blur(8px);
}

.single-post-category:hover {
  background: rgba(255, 255, 255, 0.22);
}

.single-post-hero h1 {
  max-width: 980px;
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(44px, 5.2vw, 74px);
  line-height: 0.96;
  letter-spacing: -0.07em;
  font-weight: 950;
}

.single-post-excerpt {
  max-width: 760px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  line-height: 1.65;
}

.single-post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 12px;
  font-weight: 850;
}

.single-post-author {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.single-post-author img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Main content layout */
.single-post-body-section {
  position: relative;
  z-index: 3;
  margin-top: -34px;
  padding: 0 0 58px;
}

.single-post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 34px;
  align-items: start;
}

.single-post-content {
  padding: 38px;
  border: 1px solid #dfe7f6;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 40px rgba(19, 55, 120, 0.08);
  color: #24324e;
  font-size: 16px;
  line-height: 1.78;
}

.single-post-content > *:first-child {
  margin-top: 0;
}

.single-post-content > *:last-child {
  margin-bottom: 0;
}

.single-post-content h2,
.single-post-content h3,
.single-post-content h4,
.single-post-content h5,
.single-post-content h6 {
  color: #071026;
  line-height: 1.12;
  letter-spacing: -0.04em;
  font-weight: 950;
}

.single-post-content h2 {
  margin: 34px 0 14px;
  font-size: 32px;
}

.single-post-content h3 {
  margin: 28px 0 12px;
  font-size: 24px;
}

.single-post-content h4 {
  margin: 24px 0 10px;
  font-size: 20px;
}

.single-post-content p {
  margin: 0 0 18px;
}

.single-post-content a {
  color: #075cff;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.single-post-content ul,
.single-post-content ol {
  margin: 18px 0;
  padding-left: 22px;
}

.single-post-content li {
  margin: 8px 0;
}

.single-post-content blockquote {
  margin: 28px 0;
  padding: 22px 24px;
  border-left: 4px solid #075cff;
  border-radius: 14px;
  background: #f3f7ff;
  color: #071026;
  font-size: 18px;
  line-height: 1.55;
  font-weight: 800;
}

.single-post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
}

.single-post-content figure {
  margin: 28px 0;
}

.single-post-content figcaption {
  margin-top: 8px;
  color: #66708c;
  font-size: 12px;
  text-align: center;
}

.single-post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  overflow: hidden;
  border: 1px solid #dfe7f6;
  border-radius: 14px;
  font-size: 14px;
}

.single-post-content th,
.single-post-content td {
  padding: 12px 14px;
  border-bottom: 1px solid #edf2fb;
  text-align: left;
}

.single-post-content th {
  color: #071026;
  background: #f3f7ff;
  font-weight: 950;
}

.single-post-content pre {
  overflow-x: auto;
  margin: 24px 0;
  padding: 18px;
  border-radius: 14px;
  background: #071846;
  color: #e8eeff;
  font-size: 13px;
  line-height: 1.6;
}

.single-post-content code {
  padding: 2px 5px;
  border-radius: 6px;
  background: #eef3ff;
  color: #1238c6;
  font-size: 0.92em;
}

.single-post-content pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

/* Sidebar */
.single-post-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 16px;
}

.single-sidebar-card {
  padding: 22px;
  border: 1px solid #dfe7f6;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 35px rgba(19, 55, 120, 0.055);
}

.single-sidebar-card h3 {
  margin: 0 0 10px;
  color: #071026;
  font-size: 19px;
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 950;
}

.single-sidebar-card p {
  margin: 0 0 16px;
  color: #56627b;
  font-size: 13px;
  line-height: 1.55;
}

.single-sidebar-card .btn {
  width: 100%;
  padding-left: 14px;
  padding-right: 14px;
  font-size: 12px;
}

.single-category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.single-category-list a {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  background: #eef3ff;
  color: #315bff;
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
}

.single-category-list a:hover {
  color: #fff;
  background: linear-gradient(135deg, #075cff, #6420ff);
}

/* Related articles */
.single-related-section {
  padding: 10px 0 64px;
}

.single-related-section .section-head {
  margin-bottom: 18px;
}

/* WordPress alignment support */
.single-post-content .alignleft {
  float: left;
  margin: 8px 24px 18px 0;
}

.single-post-content .alignright {
  float: right;
  margin: 8px 0 18px 24px;
}

.single-post-content .aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.single-post-content .wp-caption {
  max-width: 100%;
}

.single-post-content .wp-caption-text {
  margin-top: 8px;
  color: #66708c;
  font-size: 12px;
  text-align: center;
}

/* Responsive */
@media (max-width: 980px) {
  .single-post-layout {
    grid-template-columns: 1fr;
  }

  .single-post-sidebar {
    position: static;
  }
}

@media (max-width: 780px) {
  .single-post-hero {
    min-height: 420px;
    padding: 84px 0 42px;
  }

  .single-post-hero h1 {
    font-size: 42px;
    line-height: 1;
    letter-spacing: -0.055em;
  }

  .single-post-excerpt {
    font-size: 15px;
    line-height: 1.55;
  }

  .single-post-meta {
    gap: 10px;
  }

  .single-post-body-section {
    margin-top: -22px;
    padding-bottom: 42px;
  }

  .single-post-content {
    padding: 24px;
    border-radius: 18px;
    font-size: 15px;
  }

  .single-post-content h2 {
    font-size: 26px;
  }

  .single-post-content h3 {
    font-size: 21px;
  }

  .single-post-content blockquote {
    padding: 18px;
    font-size: 16px;
  }

  .single-post-content .alignleft,
  .single-post-content .alignright {
    float: none;
    display: block;
    margin: 20px auto;
  }
}

@media (max-width: 520px) {
  .single-post-hero {
    min-height: 390px;
  }

  .single-post-hero h1 {
    font-size: 36px;
  }

  .single-post-content {
    padding: 20px;
  }
}