/* =========================================================
   Single Post — modern article layout
   ========================================================= */

.gsp-single {
  padding: 36px 0 80px;
  background:
    radial-gradient(ellipse 80% 50% at 0% 0%, rgba(38, 49, 110, 0.04), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 10%, rgba(240, 88, 52, 0.05), transparent 50%),
    #fff;
}

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

/* ---------- Back / breadcrumb ---------- */
.gsp-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  font-size: 14px;
  color: var(--color-grey-800);
}

.gsp-nav a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition-fast);
}

.gsp-nav a:hover {
  color: var(--color-secondary);
}

.gsp-nav-sep {
  color: var(--color-grey-muted);
  user-select: none;
}

.gsp-nav-current {
  color: var(--color-grey-800);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 280px;
}

/* ---------- Article header ---------- */
.gsp-article {
  min-width: 0;
}

.gsp-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.gsp-cat {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: var(--color-secondary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius-pill);
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.gsp-cat:hover {
  background: var(--color-secondary-hover);
  color: #fff;
  transform: translateY(-1px);
}

.gsp-title {
  margin: 0 0 20px;
  font-family: var(--font-heading);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--color-dark);
  letter-spacing: -0.02em;
}

.gsp-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--color-grey-border);
}

.gsp-author-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--color-dark);
  font-weight: 600;
  font-size: 14px;
  transition: color var(--transition-fast);
}

.gsp-author-link:hover {
  color: var(--color-secondary);
}

.gsp-author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--color-grey-border);
}

.gsp-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--color-grey-800);
}

.gsp-meta-item svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.gsp-meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-grey-muted);
}

/* ---------- Featured image ---------- */
.gsp-featured {
  margin: 0 0 32px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--color-bg-soft);
}

.gsp-featured img {
  display: block;
  width: 100%;
  height: auto;
  /*max-height: 480px;*/
  object-fit: cover;
}

/* ---------- Content ---------- */
.gsp-content {
  color: var(--color-grey-800);
  font-size: 17px;
  line-height: 1.8;
}

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

.gsp-content h2,
.gsp-content h3,
.gsp-content h4 {
  color: var(--color-dark);
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  margin-top: 2em;
  margin-bottom: 0.6em;
  scroll-margin-top: 100px;
}

.gsp-content h2 {
  font-size: clamp(22px, 2.5vw, 28px);
}

.gsp-content h3 {
  font-size: clamp(18px, 2vw, 22px);
}

.gsp-content p {
  margin-bottom: 1.15em;
}

.gsp-content a {
  color: var(--color-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.gsp-content a:hover {
  color: var(--color-primary);
}

.gsp-content ul,
.gsp-content ol {
  margin: 0 0 1.25em;
  padding-left: 1.35em;
}

.gsp-content li {
  margin-bottom: 0.45em;
}

.gsp-content blockquote {
  margin: 1.75em 0;
  padding: 18px 22px;
  border-left: 4px solid var(--color-secondary);
  background: rgba(38, 49, 110, 0.04);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--color-dark);
  font-style: italic;
}

.gsp-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  margin: 1.5em 0;
}

.gsp-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 15px;
}

.gsp-content th,
.gsp-content td {
  border: 1px solid var(--color-grey-border);
  padding: 10px 12px;
  text-align: left;
}

.gsp-content th {
  background: rgba(38, 49, 110, 0.06);
  color: var(--color-dark);
}

/* ---------- Tags ---------- */
.gsp-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--color-grey-border);
}

.gsp-tags-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-dark);
}

.gsp-tag {
  display: inline-block;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-primary);
  background: rgba(38, 49, 110, 0.06);
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.gsp-tag:hover {
  background: var(--color-primary);
  color: #fff;
}

/* ---------- Author box ---------- */
.gsp-author-section {
  margin-top: 40px;
  padding: 28px;
  background: linear-gradient(135deg, rgba(38, 49, 110, 0.06) 0%, rgba(240, 88, 52, 0.06) 100%);
  border: 1px solid var(--color-grey-border);
  border-radius: 16px;
}

.gsp-author-section-title {
  margin: 0 0 18px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary);
}

.gsp-author-box {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.gsp-author-box-avatar {
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 4px 16px rgba(37, 40, 65, 0.12);
}

.gsp-author-box-name {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--color-dark);
  text-decoration: none;
}

.gsp-author-box-name:hover {
  color: var(--color-secondary);
}

.gsp-author-box-bio {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--color-grey-800);
}

.gsp-author-box-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-secondary);
  text-decoration: none;
}

.gsp-author-box-more:hover {
  color: var(--color-primary);
}

/* ---------- Share ---------- */
.gsp-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--color-grey-border);
}

.gsp-share-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-dark);
}

.gsp-share-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.gsp-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--color-grey-border);
  background: #fff;
  color: var(--color-primary);
  text-decoration: none;
  font-size: 15px;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.gsp-share-btn:hover {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
  color: #fff;
}

/* ---------- Sidebar ---------- */
.gsp-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.gsp-widget {
  background: #fff;
  border: 1px solid var(--color-grey-border);
  border-radius: 14px;
  padding: 22px;
}

.gsp-widget-title {
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-secondary);
  font-size: 16px;
  font-weight: 800;
  color: var(--color-dark);
}

.gsp-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.gsp-toc-list li {
  margin: 0 0 8px;
}

.gsp-toc-list a {
  display: block;
  padding: 6px 0 6px 12px;
  border-left: 2px solid transparent;
  color: var(--color-grey-800);
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.gsp-toc-list a:hover,
.gsp-toc-list a.is-active {
  color: var(--color-secondary);
  border-left-color: var(--color-secondary);
}

.gsp-toc-list .is-h3 a {
  padding-left: 24px;
  font-size: 13px;
}

.gsp-cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.gsp-cat-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--color-grey-border);
}

.gsp-cat-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.gsp-cat-list a {
  color: var(--color-grey-800);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.gsp-cat-list a:hover {
  color: var(--color-secondary);
}

.gsp-cat-count {
  flex-shrink: 0;
  min-width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background: rgba(38, 49, 110, 0.08);
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 700;
}

.gsp-recent-item {
  display: flex;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-grey-border);
  transition: opacity var(--transition-fast);
}

.gsp-recent-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.gsp-recent-item:hover {
  opacity: 0.85;
}

.gsp-recent-thumb {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--color-bg-soft);
}

.gsp-recent-title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gsp-recent-date {
  font-size: 12px;
  color: var(--color-grey-800);
  opacity: 0.75;
}

@media (min-width: 992px) {
  .gsp-sidebar-sticky {
    position: sticky;
    top: 100px;
  }
}

/* ---------- Related ---------- */
.gsp-related {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--color-grey-border);
}

.gsp-related-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.gsp-related-title {
  margin: 0;
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 800;
  color: var(--color-dark);
}

.gsp-related-all {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-secondary);
  text-decoration: none;
}

.gsp-related-all:hover {
  color: var(--color-primary);
}

.gsp-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.gsp-related-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--color-grey-border);
  background: #fff;
  transition: transform 250ms ease, box-shadow 250ms ease;
}

.gsp-related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(37, 40, 65, 0.1);
  color: inherit;
}

.gsp-related-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--color-bg-soft);
}

.gsp-related-card-body {
  padding: 16px 18px 20px;
}

.gsp-related-card-cat {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-secondary);
}

.gsp-related-card-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-dark);
}

.gsp-related-card-meta {
  font-size: 12px;
  color: var(--color-grey-800);
  opacity: 0.8;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .gsp-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .gsp-sidebar {
    order: 2;
  }

  .gsp-related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .gsp-single {
    padding: 24px 0 56px;
  }

  .gsp-meta {
    gap: 8px 12px;
  }

  .gsp-meta-dot {
    display: none;
  }

  .gsp-featured {
    border-radius: 12px;
    margin-left: -4px;
    margin-right: -4px;
  }

  .gsp-featured img {
    max-height: 260px;
  }

  .gsp-content {
    font-size: 16px;
  }

  .gsp-author-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .gsp-author-section {
    padding: 22px 18px;
  }

  .gsp-related-grid {
    grid-template-columns: 1fr;
  }

  .gsp-nav-current {
    max-width: 100%;
    white-space: normal;
  }
}
